Updated aclocal.m4 with aclocal 1.7.3 (was created with aclocal 1.5)
[freeglut] / aclocal.m4
1 # generated automatically by aclocal 1.7.3 -*- 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 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 9
38
39 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
40 # written in clear, in which case automake, when reading aclocal.m4,
41 # will think it sees a *use*, and therefore will trigger all it's
42 # C support machinery.  Also note that it means that autoscan, seeing
43 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
44
45
46 AC_PREREQ([2.54])
47
48 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
49 # the ones we care about.
50 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
51
52 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
53 # AM_INIT_AUTOMAKE([OPTIONS])
54 # -----------------------------------------------
55 # The call with PACKAGE and VERSION arguments is the old style
56 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
57 # and VERSION should now be passed to AC_INIT and removed from
58 # the call to AM_INIT_AUTOMAKE.
59 # We support both call styles for the transition.  After
60 # the next Automake release, Autoconf can make the AC_INIT
61 # arguments mandatory, and then we can depend on a new Autoconf
62 # release and drop the old call support.
63 AC_DEFUN([AM_INIT_AUTOMAKE],
64 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
65  AC_REQUIRE([AC_PROG_INSTALL])dnl
66 # test to see if srcdir already configured
67 if test "`cd $srcdir && pwd`" != "`pwd`" &&
68    test -f $srcdir/config.status; then
69   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
70 fi
71
72 # test whether we have cygpath
73 if test -z "$CYGPATH_W"; then
74   if (cygpath --version) >/dev/null 2>/dev/null; then
75     CYGPATH_W='cygpath -w'
76   else
77     CYGPATH_W=echo
78   fi
79 fi
80 AC_SUBST([CYGPATH_W])
81
82 # Define the identity of the package.
83 dnl Distinguish between old-style and new-style calls.
84 m4_ifval([$2],
85 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
86  AC_SUBST([PACKAGE], [$1])dnl
87  AC_SUBST([VERSION], [$2])],
88 [_AM_SET_OPTIONS([$1])dnl
89  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
90  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
91
92 _AM_IF_OPTION([no-define],,
93 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
94  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
95
96 # Some tools Automake needs.
97 AC_REQUIRE([AM_SANITY_CHECK])dnl
98 AC_REQUIRE([AC_ARG_PROGRAM])dnl
99 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
100 AM_MISSING_PROG(AUTOCONF, autoconf)
101 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
102 AM_MISSING_PROG(AUTOHEADER, autoheader)
103 AM_MISSING_PROG(MAKEINFO, makeinfo)
104 AM_MISSING_PROG(AMTAR, tar)
105 AM_PROG_INSTALL_SH
106 AM_PROG_INSTALL_STRIP
107 # We need awk for the "check" target.  The system "awk" is bad on
108 # some platforms.
109 AC_REQUIRE([AC_PROG_AWK])dnl
110 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
111 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
112
113 _AM_IF_OPTION([no-dependencies],,
114 [AC_PROVIDE_IFELSE([AC_PROG_CC],
115                   [_AM_DEPENDENCIES(CC)],
116                   [define([AC_PROG_CC],
117                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
118 AC_PROVIDE_IFELSE([AC_PROG_CXX],
119                   [_AM_DEPENDENCIES(CXX)],
120                   [define([AC_PROG_CXX],
121                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
122 ])
123 ])
124
125
126 # When config.status generates a header, we must update the stamp-h file.
127 # This file resides in the same directory as the config header
128 # that is generated.  The stamp files are numbered to have different names.
129
130 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
131 # loop where config.status creates the headers, so we can generate
132 # our stamp files there.
133 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
134 [# Compute $1's index in $config_headers.
135 _am_stamp_count=1
136 for _am_header in $config_headers :; do
137   case $_am_header in
138     $1 | $1:* )
139       break ;;
140     * )
141       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
142   esac
143 done
144 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
145
146 # Copyright 2002  Free Software Foundation, Inc.
147
148 # This program is free software; you can redistribute it and/or modify
149 # it under the terms of the GNU General Public License as published by
150 # the Free Software Foundation; either version 2, or (at your option)
151 # any later version.
152
153 # This program is distributed in the hope that it will be useful,
154 # but WITHOUT ANY WARRANTY; without even the implied warranty of
155 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
156 # GNU General Public License for more details.
157
158 # You should have received a copy of the GNU General Public License
159 # along with this program; if not, write to the Free Software
160 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
161
162 # AM_AUTOMAKE_VERSION(VERSION)
163 # ----------------------------
164 # Automake X.Y traces this macro to ensure aclocal.m4 has been
165 # generated from the m4 files accompanying Automake X.Y.
166 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
167
168 # AM_SET_CURRENT_AUTOMAKE_VERSION
169 # -------------------------------
170 # Call AM_AUTOMAKE_VERSION so it can be traced.
171 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
172 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
173          [AM_AUTOMAKE_VERSION([1.7.3])])
174
175 # Helper functions for option handling.                    -*- Autoconf -*-
176
177 # Copyright 2001, 2002  Free Software Foundation, Inc.
178
179 # This program is free software; you can redistribute it and/or modify
180 # it under the terms of the GNU General Public License as published by
181 # the Free Software Foundation; either version 2, or (at your option)
182 # any later version.
183
184 # This program is distributed in the hope that it will be useful,
185 # but WITHOUT ANY WARRANTY; without even the implied warranty of
186 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
187 # GNU General Public License for more details.
188
189 # You should have received a copy of the GNU General Public License
190 # along with this program; if not, write to the Free Software
191 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
192 # 02111-1307, USA.
193
194 # serial 2
195
196 # _AM_MANGLE_OPTION(NAME)
197 # -----------------------
198 AC_DEFUN([_AM_MANGLE_OPTION],
199 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
200
201 # _AM_SET_OPTION(NAME)
202 # ------------------------------
203 # Set option NAME.  Presently that only means defining a flag for this option.
204 AC_DEFUN([_AM_SET_OPTION],
205 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
206
207 # _AM_SET_OPTIONS(OPTIONS)
208 # ----------------------------------
209 # OPTIONS is a space-separated list of Automake options.
210 AC_DEFUN([_AM_SET_OPTIONS],
211 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
212
213 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
214 # -------------------------------------------
215 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
216 AC_DEFUN([_AM_IF_OPTION],
217 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
218
219 #
220 # Check to make sure that the build environment is sane.
221 #
222
223 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
224
225 # This program is free software; you can redistribute it and/or modify
226 # it under the terms of the GNU General Public License as published by
227 # the Free Software Foundation; either version 2, or (at your option)
228 # any later version.
229
230 # This program is distributed in the hope that it will be useful,
231 # but WITHOUT ANY WARRANTY; without even the implied warranty of
232 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
233 # GNU General Public License for more details.
234
235 # You should have received a copy of the GNU General Public License
236 # along with this program; if not, write to the Free Software
237 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
238 # 02111-1307, USA.
239
240 # serial 3
241
242 # AM_SANITY_CHECK
243 # ---------------
244 AC_DEFUN([AM_SANITY_CHECK],
245 [AC_MSG_CHECKING([whether build environment is sane])
246 # Just in case
247 sleep 1
248 echo timestamp > conftest.file
249 # Do `set' in a subshell so we don't clobber the current shell's
250 # arguments.  Must try -L first in case configure is actually a
251 # symlink; some systems play weird games with the mod time of symlinks
252 # (eg FreeBSD returns the mod time of the symlink's containing
253 # directory).
254 if (
255    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
256    if test "$[*]" = "X"; then
257       # -L didn't work.
258       set X `ls -t $srcdir/configure conftest.file`
259    fi
260    rm -f conftest.file
261    if test "$[*]" != "X $srcdir/configure conftest.file" \
262       && test "$[*]" != "X conftest.file $srcdir/configure"; then
263
264       # If neither matched, then we have a broken ls.  This can happen
265       # if, for instance, CONFIG_SHELL is bash and it inherits a
266       # broken ls alias from the environment.  This has actually
267       # happened.  Such a system could not be considered "sane".
268       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
269 alias in your environment])
270    fi
271
272    test "$[2]" = conftest.file
273    )
274 then
275    # Ok.
276    :
277 else
278    AC_MSG_ERROR([newly created file is older than distributed files!
279 Check your system clock])
280 fi
281 AC_MSG_RESULT(yes)])
282
283 #  -*- Autoconf -*-
284
285
286 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
287
288 # This program is free software; you can redistribute it and/or modify
289 # it under the terms of the GNU General Public License as published by
290 # the Free Software Foundation; either version 2, or (at your option)
291 # any later version.
292
293 # This program is distributed in the hope that it will be useful,
294 # but WITHOUT ANY WARRANTY; without even the implied warranty of
295 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
296 # GNU General Public License for more details.
297
298 # You should have received a copy of the GNU General Public License
299 # along with this program; if not, write to the Free Software
300 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
301 # 02111-1307, USA.
302
303 # serial 3
304
305 # AM_MISSING_PROG(NAME, PROGRAM)
306 # ------------------------------
307 AC_DEFUN([AM_MISSING_PROG],
308 [AC_REQUIRE([AM_MISSING_HAS_RUN])
309 $1=${$1-"${am_missing_run}$2"}
310 AC_SUBST($1)])
311
312
313 # AM_MISSING_HAS_RUN
314 # ------------------
315 # Define MISSING if not defined so far and test if it supports --run.
316 # If it does, set am_missing_run to use it, otherwise, to nothing.
317 AC_DEFUN([AM_MISSING_HAS_RUN],
318 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
319 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
320 # Use eval to expand $SHELL
321 if eval "$MISSING --run true"; then
322   am_missing_run="$MISSING --run "
323 else
324   am_missing_run=
325   AC_MSG_WARN([`missing' script is too old or missing])
326 fi
327 ])
328
329 # AM_AUX_DIR_EXPAND
330
331 # Copyright 2001 Free Software Foundation, Inc.
332
333 # This program is free software; you can redistribute it and/or modify
334 # it under the terms of the GNU General Public License as published by
335 # the Free Software Foundation; either version 2, or (at your option)
336 # any later version.
337
338 # This program is distributed in the hope that it will be useful,
339 # but WITHOUT ANY WARRANTY; without even the implied warranty of
340 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
341 # GNU General Public License for more details.
342
343 # You should have received a copy of the GNU General Public License
344 # along with this program; if not, write to the Free Software
345 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
346 # 02111-1307, USA.
347
348 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
349 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
350 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
351 #
352 # Of course, Automake must honor this variable whenever it calls a
353 # tool from the auxiliary directory.  The problem is that $srcdir (and
354 # therefore $ac_aux_dir as well) can be either absolute or relative,
355 # depending on how configure is run.  This is pretty annoying, since
356 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
357 # source directory, any form will work fine, but in subdirectories a
358 # relative path needs to be adjusted first.
359 #
360 # $ac_aux_dir/missing
361 #    fails when called from a subdirectory if $ac_aux_dir is relative
362 # $top_srcdir/$ac_aux_dir/missing
363 #    fails if $ac_aux_dir is absolute,
364 #    fails when called from a subdirectory in a VPATH build with
365 #          a relative $ac_aux_dir
366 #
367 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
368 # are both prefixed by $srcdir.  In an in-source build this is usually
369 # harmless because $srcdir is `.', but things will broke when you
370 # start a VPATH build or use an absolute $srcdir.
371 #
372 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
373 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
374 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
375 # and then we would define $MISSING as
376 #   MISSING="\${SHELL} $am_aux_dir/missing"
377 # This will work as long as MISSING is not called from configure, because
378 # unfortunately $(top_srcdir) has no meaning in configure.
379 # However there are other variables, like CC, which are often used in
380 # configure, and could therefore not use this "fixed" $ac_aux_dir.
381 #
382 # Another solution, used here, is to always expand $ac_aux_dir to an
383 # absolute PATH.  The drawback is that using absolute paths prevent a
384 # configured tree to be moved without reconfiguration.
385
386 # Rely on autoconf to set up CDPATH properly.
387 AC_PREREQ([2.50])
388
389 AC_DEFUN([AM_AUX_DIR_EXPAND], [
390 # expand $ac_aux_dir to an absolute path
391 am_aux_dir=`cd $ac_aux_dir && pwd`
392 ])
393
394 # AM_PROG_INSTALL_SH
395 # ------------------
396 # Define $install_sh.
397
398 # Copyright 2001 Free Software Foundation, Inc.
399
400 # This program is free software; you can redistribute it and/or modify
401 # it under the terms of the GNU General Public License as published by
402 # the Free Software Foundation; either version 2, or (at your option)
403 # any later version.
404
405 # This program is distributed in the hope that it will be useful,
406 # but WITHOUT ANY WARRANTY; without even the implied warranty of
407 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
408 # GNU General Public License for more details.
409
410 # You should have received a copy of the GNU General Public License
411 # along with this program; if not, write to the Free Software
412 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
413 # 02111-1307, USA.
414
415 AC_DEFUN([AM_PROG_INSTALL_SH],
416 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
417 install_sh=${install_sh-"$am_aux_dir/install-sh"}
418 AC_SUBST(install_sh)])
419
420 # AM_PROG_INSTALL_STRIP
421
422 # Copyright 2001 Free Software Foundation, Inc.
423
424 # This program is free software; you can redistribute it and/or modify
425 # it under the terms of the GNU General Public License as published by
426 # the Free Software Foundation; either version 2, or (at your option)
427 # any later version.
428
429 # This program is distributed in the hope that it will be useful,
430 # but WITHOUT ANY WARRANTY; without even the implied warranty of
431 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
432 # GNU General Public License for more details.
433
434 # You should have received a copy of the GNU General Public License
435 # along with this program; if not, write to the Free Software
436 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
437 # 02111-1307, USA.
438
439 # One issue with vendor `install' (even GNU) is that you can't
440 # specify the program used to strip binaries.  This is especially
441 # annoying in cross-compiling environments, where the build's strip
442 # is unlikely to handle the host's binaries.
443 # Fortunately install-sh will honor a STRIPPROG variable, so we
444 # always use install-sh in `make install-strip', and initialize
445 # STRIPPROG with the value of the STRIP variable (set by the user).
446 AC_DEFUN([AM_PROG_INSTALL_STRIP],
447 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
448 # Installed binaries are usually stripped using `strip' when the user
449 # run `make install-strip'.  However `strip' might not be the right
450 # tool to use in cross-compilation environments, therefore Automake
451 # will honor the `STRIP' environment variable to overrule this program.
452 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
453 if test "$cross_compiling" != no; then
454   AC_CHECK_TOOL([STRIP], [strip], :)
455 fi
456 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
457 AC_SUBST([INSTALL_STRIP_PROGRAM])])
458
459 #                                                          -*- Autoconf -*-
460 # Copyright (C) 2003  Free Software Foundation, Inc.
461
462 # This program is free software; you can redistribute it and/or modify
463 # it under the terms of the GNU General Public License as published by
464 # the Free Software Foundation; either version 2, or (at your option)
465 # any later version.
466
467 # This program is distributed in the hope that it will be useful,
468 # but WITHOUT ANY WARRANTY; without even the implied warranty of
469 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
470 # GNU General Public License for more details.
471
472 # You should have received a copy of the GNU General Public License
473 # along with this program; if not, write to the Free Software
474 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
475 # 02111-1307, USA.
476
477 # serial 1
478
479 # Check whether the underlying file-system supports filenames
480 # with a leading dot.  For instance MS-DOS doesn't.
481 AC_DEFUN([AM_SET_LEADING_DOT],
482 [rm -rf .tst 2>/dev/null
483 mkdir .tst 2>/dev/null
484 if test -d .tst; then
485   am__leading_dot=.
486 else
487   am__leading_dot=_
488 fi
489 rmdir .tst 2>/dev/null
490 AC_SUBST([am__leading_dot])])
491
492 # serial 5                                              -*- Autoconf -*-
493
494 # Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
495
496 # This program is free software; you can redistribute it and/or modify
497 # it under the terms of the GNU General Public License as published by
498 # the Free Software Foundation; either version 2, or (at your option)
499 # any later version.
500
501 # This program is distributed in the hope that it will be useful,
502 # but WITHOUT ANY WARRANTY; without even the implied warranty of
503 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
504 # GNU General Public License for more details.
505
506 # You should have received a copy of the GNU General Public License
507 # along with this program; if not, write to the Free Software
508 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
509 # 02111-1307, USA.
510
511
512 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
513 # written in clear, in which case automake, when reading aclocal.m4,
514 # will think it sees a *use*, and therefore will trigger all it's
515 # C support machinery.  Also note that it means that autoscan, seeing
516 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
517
518
519
520 # _AM_DEPENDENCIES(NAME)
521 # ----------------------
522 # See how the compiler implements dependency checking.
523 # NAME is "CC", "CXX", "GCJ", or "OBJC".
524 # We try a few techniques and use that to set a single cache variable.
525 #
526 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
527 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
528 # dependency, and given that the user is not expected to run this macro,
529 # just rely on AC_PROG_CC.
530 AC_DEFUN([_AM_DEPENDENCIES],
531 [AC_REQUIRE([AM_SET_DEPDIR])dnl
532 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
533 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
534 AC_REQUIRE([AM_DEP_TRACK])dnl
535
536 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
537        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
538        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
539        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
540                    [depcc="$$1"   am_compiler_list=])
541
542 AC_CACHE_CHECK([dependency style of $depcc],
543                [am_cv_$1_dependencies_compiler_type],
544 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
545   # We make a subdir and do the tests there.  Otherwise we can end up
546   # making bogus files that we don't know about and never remove.  For
547   # instance it was reported that on HP-UX the gcc test will end up
548   # making a dummy file named `D' -- because `-MD' means `put the output
549   # in D'.
550   mkdir conftest.dir
551   # Copy depcomp to subdir because otherwise we won't find it if we're
552   # using a relative directory.
553   cp "$am_depcomp" conftest.dir
554   cd conftest.dir
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     # We need to recreate these files for each test, as the compiler may
562     # overwrite some of them when testing with obscure command lines.
563     # This happens at least with the AIX C compiler.
564     echo '#include "conftest.h"' > conftest.c
565     echo 'int i;' > conftest.h
566     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
567
568     case $depmode in
569     nosideeffect)
570       # after this tag, mechanisms are not by side-effect, so they'll
571       # only be used when explicitly requested
572       if test "x$enable_dependency_tracking" = xyes; then
573         continue
574       else
575         break
576       fi
577       ;;
578     none) break ;;
579     esac
580     # We check with `-c' and `-o' for the sake of the "dashmstdout"
581     # mode.  It turns out that the SunPro C++ compiler does not properly
582     # handle `-M -o', and we need to detect this.
583     if depmode=$depmode \
584        source=conftest.c object=conftest.o \
585        depfile=conftest.Po tmpdepfile=conftest.TPo \
586        $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
587          >/dev/null 2>conftest.err &&
588        grep conftest.h conftest.Po > /dev/null 2>&1 &&
589        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
590       # icc doesn't choke on unknown options, it will just issue warnings
591       # (even with -Werror).  So we grep stderr for any message
592       # that says an option was ignored.
593       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
594         am_cv_$1_dependencies_compiler_type=$depmode
595         break
596       fi
597     fi
598   done
599
600   cd ..
601   rm -rf conftest.dir
602 else
603   am_cv_$1_dependencies_compiler_type=none
604 fi
605 ])
606 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
607 AM_CONDITIONAL([am__fastdep$1], [
608   test "x$enable_dependency_tracking" != xno \
609   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
610 ])
611
612
613 # AM_SET_DEPDIR
614 # -------------
615 # Choose a directory name for dependency files.
616 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
617 AC_DEFUN([AM_SET_DEPDIR],
618 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
619 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
620 ])
621
622
623 # AM_DEP_TRACK
624 # ------------
625 AC_DEFUN([AM_DEP_TRACK],
626 [AC_ARG_ENABLE(dependency-tracking,
627 [  --disable-dependency-tracking Speeds up one-time builds
628   --enable-dependency-tracking  Do not reject slow dependency extractors])
629 if test "x$enable_dependency_tracking" != xno; then
630   am_depcomp="$ac_aux_dir/depcomp"
631   AMDEPBACKSLASH='\'
632 fi
633 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
634 AC_SUBST([AMDEPBACKSLASH])
635 ])
636
637 # Generate code to set up dependency tracking.   -*- Autoconf -*-
638
639 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
640
641 # This program is free software; you can redistribute it and/or modify
642 # it under the terms of the GNU General Public License as published by
643 # the Free Software Foundation; either version 2, or (at your option)
644 # any later version.
645
646 # This program is distributed in the hope that it will be useful,
647 # but WITHOUT ANY WARRANTY; without even the implied warranty of
648 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
649 # GNU General Public License for more details.
650
651 # You should have received a copy of the GNU General Public License
652 # along with this program; if not, write to the Free Software
653 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
654 # 02111-1307, USA.
655
656 #serial 2
657
658 # _AM_OUTPUT_DEPENDENCY_COMMANDS
659 # ------------------------------
660 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
661 [for mf in $CONFIG_FILES; do
662   # Strip MF so we end up with the name of the file.
663   mf=`echo "$mf" | sed -e 's/:.*$//'`
664   # Check whether this is an Automake generated Makefile or not.
665   # We used to match only the files named `Makefile.in', but
666   # some people rename them; so instead we look at the file content.
667   # Grep'ing the first line is not enough: some people post-process
668   # each Makefile.in and add a new line on top of each file to say so.
669   # So let's grep whole file.
670   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
671     dirpart=`AS_DIRNAME("$mf")`
672   else
673     continue
674   fi
675   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
676   # Extract the definition of DEP_FILES from the Makefile without
677   # running `make'.
678   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
679   test -z "$DEPDIR" && continue
680   # When using ansi2knr, U may be empty or an underscore; expand it
681   U=`sed -n -e '/^U = / s///p' < "$mf"`
682   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
683   # We invoke sed twice because it is the simplest approach to
684   # changing $(DEPDIR) to its actual value in the expansion.
685   for file in `sed -n -e '
686     /^DEP_FILES = .*\\\\$/ {
687       s/^DEP_FILES = //
688       :loop
689         s/\\\\$//
690         p
691         n
692         /\\\\$/ b loop
693       p
694     }
695     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
696        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
697     # Make sure the directory exists.
698     test -f "$dirpart/$file" && continue
699     fdir=`AS_DIRNAME(["$file"])`
700     AS_MKDIR_P([$dirpart/$fdir])
701     # echo "creating $dirpart/$file"
702     echo '# dummy' > "$dirpart/$file"
703   done
704 done
705 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
706
707
708 # AM_OUTPUT_DEPENDENCY_COMMANDS
709 # -----------------------------
710 # This macro should only be invoked once -- use via AC_REQUIRE.
711 #
712 # This code is only required when automatic dependency tracking
713 # is enabled.  FIXME.  This creates each `.P' file that we will
714 # need in order to bootstrap the dependency handling code.
715 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
716 [AC_CONFIG_COMMANDS([depfiles],
717      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
718      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
719 ])
720
721 # Check to see how 'make' treats includes.      -*- Autoconf -*-
722
723 # Copyright (C) 2001, 2002 Free Software Foundation, Inc.
724
725 # This program is free software; you can redistribute it and/or modify
726 # it under the terms of the GNU General Public License as published by
727 # the Free Software Foundation; either version 2, or (at your option)
728 # any later version.
729
730 # This program is distributed in the hope that it will be useful,
731 # but WITHOUT ANY WARRANTY; without even the implied warranty of
732 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
733 # GNU General Public License for more details.
734
735 # You should have received a copy of the GNU General Public License
736 # along with this program; if not, write to the Free Software
737 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
738 # 02111-1307, USA.
739
740 # serial 2
741
742 # AM_MAKE_INCLUDE()
743 # -----------------
744 # Check to see how make treats includes.
745 AC_DEFUN([AM_MAKE_INCLUDE],
746 [am_make=${MAKE-make}
747 cat > confinc << 'END'
748 doit:
749         @echo done
750 END
751 # If we don't find an include directive, just comment out the code.
752 AC_MSG_CHECKING([for style of include used by $am_make])
753 am__include="#"
754 am__quote=
755 _am_result=none
756 # First try GNU make style include.
757 echo "include confinc" > confmf
758 # We grep out `Entering directory' and `Leaving directory'
759 # messages which can occur if `w' ends up in MAKEFLAGS.
760 # In particular we don't look at `^make:' because GNU make might
761 # be invoked under some other name (usually "gmake"), in which
762 # case it prints its new name instead of `make'.
763 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
764    am__include=include
765    am__quote=
766    _am_result=GNU
767 fi
768 # Now try BSD make style include.
769 if test "$am__include" = "#"; then
770    echo '.include "confinc"' > confmf
771    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
772       am__include=.include
773       am__quote="\""
774       _am_result=BSD
775    fi
776 fi
777 AC_SUBST(am__include)
778 AC_SUBST(am__quote)
779 AC_MSG_RESULT($_am_result)
780 rm -f confinc confmf
781 ])
782
783 # AM_CONDITIONAL                                              -*- Autoconf -*-
784
785 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
786
787 # This program is free software; you can redistribute it and/or modify
788 # it under the terms of the GNU General Public License as published by
789 # the Free Software Foundation; either version 2, or (at your option)
790 # any later version.
791
792 # This program is distributed in the hope that it will be useful,
793 # but WITHOUT ANY WARRANTY; without even the implied warranty of
794 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
795 # GNU General Public License for more details.
796
797 # You should have received a copy of the GNU General Public License
798 # along with this program; if not, write to the Free Software
799 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
800 # 02111-1307, USA.
801
802 # serial 5
803
804 AC_PREREQ(2.52)
805
806 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
807 # -------------------------------------
808 # Define a conditional.
809 AC_DEFUN([AM_CONDITIONAL],
810 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
811         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
812 AC_SUBST([$1_TRUE])
813 AC_SUBST([$1_FALSE])
814 if $2; then
815   $1_TRUE=
816   $1_FALSE='#'
817 else
818   $1_TRUE='#'
819   $1_FALSE=
820 fi
821 AC_CONFIG_COMMANDS_PRE(
822 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
823   AC_MSG_ERROR([conditional "$1" was never defined.
824 Usually this means the macro was only invoked conditionally.])
825 fi])])
826
827 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
828
829 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
830
831 # This program is free software; you can redistribute it and/or modify
832 # it under the terms of the GNU General Public License as published by
833 # the Free Software Foundation; either version 2, or (at your option)
834 # any later version.
835
836 # This program is distributed in the hope that it will be useful,
837 # but WITHOUT ANY WARRANTY; without even the implied warranty of
838 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
839 # GNU General Public License for more details.
840
841 # You should have received a copy of the GNU General Public License
842 # along with this program; if not, write to the Free Software
843 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
844 # 02111-1307, USA.
845
846 AC_PREREQ([2.52])
847
848 # serial 6
849
850 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
851 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
852
853 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
854
855 # serial 47 AC_PROG_LIBTOOL
856
857
858 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
859 # -----------------------------------------------------------
860 # If this macro is not defined by Autoconf, define it here.
861 m4_ifdef([AC_PROVIDE_IFELSE],
862          [],
863          [m4_define([AC_PROVIDE_IFELSE],
864                  [m4_ifdef([AC_PROVIDE_$1],
865                            [$2], [$3])])])
866
867
868 # AC_PROG_LIBTOOL
869 # ---------------
870 AC_DEFUN([AC_PROG_LIBTOOL],
871 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
872 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
873 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
874   AC_PROVIDE_IFELSE([AC_PROG_CXX],
875     [AC_LIBTOOL_CXX],
876     [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
877   ])])
878 dnl And a similar setup for Fortran 77 support
879   AC_PROVIDE_IFELSE([AC_PROG_F77],
880     [AC_LIBTOOL_F77],
881     [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
882 ])])
883
884 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
885 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
886 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
887   AC_PROVIDE_IFELSE([AC_PROG_GCJ],
888     [AC_LIBTOOL_GCJ],
889     [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
890       [AC_LIBTOOL_GCJ],
891       [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
892         [AC_LIBTOOL_GCJ],
893       [ifdef([AC_PROG_GCJ],
894              [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
895        ifdef([A][M_PROG_GCJ],
896              [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
897        ifdef([LT_AC_PROG_GCJ],
898              [define([LT_AC_PROG_GCJ],
899                 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
900 ])])# AC_PROG_LIBTOOL
901
902
903 # _AC_PROG_LIBTOOL
904 # ----------------
905 AC_DEFUN([_AC_PROG_LIBTOOL],
906 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
907 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
908 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
909 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
910
911 # This can be used to rebuild libtool when needed
912 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
913
914 # Always use our own libtool.
915 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
916 AC_SUBST(LIBTOOL)dnl
917
918 # Prevent multiple expansion
919 define([AC_PROG_LIBTOOL], [])
920 ])# _AC_PROG_LIBTOOL
921
922
923 # AC_LIBTOOL_SETUP
924 # ----------------
925 AC_DEFUN([AC_LIBTOOL_SETUP],
926 [AC_PREREQ(2.50)dnl
927 AC_REQUIRE([AC_ENABLE_SHARED])dnl
928 AC_REQUIRE([AC_ENABLE_STATIC])dnl
929 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
930 AC_REQUIRE([AC_CANONICAL_HOST])dnl
931 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
932 AC_REQUIRE([AC_PROG_CC])dnl
933 AC_REQUIRE([AC_PROG_LD])dnl
934 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
935 AC_REQUIRE([AC_PROG_NM])dnl
936
937 AC_REQUIRE([AC_PROG_LN_S])dnl
938 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
939 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
940 AC_REQUIRE([AC_OBJEXT])dnl
941 AC_REQUIRE([AC_EXEEXT])dnl
942 dnl
943
944 AC_LIBTOOL_SYS_MAX_CMD_LEN
945 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
946 AC_LIBTOOL_OBJDIR
947
948 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
949 _LT_AC_PROG_ECHO_BACKSLASH
950
951 case $host_os in
952 aix3*)
953   # AIX sometimes has problems with the GCC collect2 program.  For some
954   # reason, if we set the COLLECT_NAMES environment variable, the problems
955   # vanish in a puff of smoke.
956   if test "X${COLLECT_NAMES+set}" != Xset; then
957     COLLECT_NAMES=
958     export COLLECT_NAMES
959   fi
960   ;;
961 esac
962
963 # Sed substitution that helps us do robust quoting.  It backslashifies
964 # metacharacters that are still active within double-quoted strings.
965 Xsed='sed -e s/^X//'
966 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
967
968 # Same as above, but do not quote variable references.
969 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
970
971 # Sed substitution to delay expansion of an escaped shell variable in a
972 # double_quote_subst'ed string.
973 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
974
975 # Sed substitution to avoid accidental globbing in evaled expressions
976 no_glob_subst='s/\*/\\\*/g'
977
978 # Constants:
979 rm="rm -f"
980
981 # Global variables:
982 default_ofile=libtool
983 can_build_shared=yes
984
985 # All known linkers require a `.a' archive for static linking (except M$VC,
986 # which needs '.lib').
987 libext=a
988 ltmain="$ac_aux_dir/ltmain.sh"
989 ofile="$default_ofile"
990 with_gnu_ld="$lt_cv_prog_gnu_ld"
991
992 AC_CHECK_TOOL(AR, ar, false)
993 AC_CHECK_TOOL(RANLIB, ranlib, :)
994 AC_CHECK_TOOL(STRIP, strip, :)
995
996 old_CC="$CC"
997 old_CFLAGS="$CFLAGS"
998
999 # Set sane defaults for various variables
1000 test -z "$AR" && AR=ar
1001 test -z "$AR_FLAGS" && AR_FLAGS=cru
1002 test -z "$AS" && AS=as
1003 test -z "$CC" && CC=cc
1004 test -z "$LTCC" && LTCC=$CC
1005 test -z "$DLLTOOL" && DLLTOOL=dlltool
1006 test -z "$LD" && LD=ld
1007 test -z "$LN_S" && LN_S="ln -s"
1008 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1009 test -z "$NM" && NM=nm
1010 test -z "$SED" && SED=sed
1011 test -z "$OBJDUMP" && OBJDUMP=objdump
1012 test -z "$RANLIB" && RANLIB=:
1013 test -z "$STRIP" && STRIP=:
1014 test -z "$ac_objext" && ac_objext=o
1015
1016 # Determine commands to create old-style static archives.
1017 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1018 old_postinstall_cmds='chmod 644 $oldlib'
1019 old_postuninstall_cmds=
1020
1021 if test -n "$RANLIB"; then
1022   case $host_os in
1023   openbsd*)
1024     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1025     ;;
1026   *)
1027     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1028     ;;
1029   esac
1030   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1031 fi
1032
1033 # Only perform the check for file, if the check method requires it
1034 case $deplibs_check_method in
1035 file_magic*)
1036   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1037     AC_PATH_MAGIC
1038   fi
1039   ;;
1040 esac
1041
1042 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
1043 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1044 enable_win32_dll=yes, enable_win32_dll=no)
1045
1046 AC_ARG_ENABLE([libtool-lock],
1047     [AC_HELP_STRING([--disable-libtool-lock],
1048         [avoid locking (might break parallel builds)])])
1049 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1050
1051 AC_ARG_WITH([pic],
1052     [AC_HELP_STRING([--with-pic],
1053         [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1054     [pic_mode="$withval"],
1055     [pic_mode=default])
1056 test -z "$pic_mode" && pic_mode=default
1057
1058 # Use C for the default configuration in the libtool script
1059 tagname=
1060 AC_LIBTOOL_LANG_C_CONFIG
1061 _LT_AC_TAGCONFIG
1062 ])# AC_LIBTOOL_SETUP
1063
1064
1065 # _LT_AC_SYS_COMPILER
1066 # -------------------
1067 AC_DEFUN([_LT_AC_SYS_COMPILER],
1068 [AC_REQUIRE([AC_PROG_CC])dnl
1069
1070 # If no C compiler was specified, use CC.
1071 LTCC=${LTCC-"$CC"}
1072
1073 # Allow CC to be a program name with arguments.
1074 compiler=$CC
1075 ])# _LT_AC_SYS_COMPILER
1076
1077
1078 # _LT_AC_SYS_LIBPATH_AIX
1079 # ----------------------
1080 # Links a minimal program and checks the executable
1081 # for the system default hardcoded library path. In most cases,
1082 # this is /usr/lib:/lib, but when the MPI compilers are used
1083 # the location of the communication and MPI libs are included too.
1084 # If we don't find anything, use the default library path according
1085 # to the aix ld manual.
1086 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
1087 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
1088 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
1089 }'`
1090 # Check for a 64-bit object if we didn't find anything.
1091 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; }
1092 }'`; fi],[])
1093 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
1094 ])# _LT_AC_SYS_LIBPATH_AIX
1095
1096
1097 # _LT_AC_SHELL_INIT(ARG)
1098 # ----------------------
1099 AC_DEFUN([_LT_AC_SHELL_INIT],
1100 [ifdef([AC_DIVERSION_NOTICE],
1101              [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1102          [AC_DIVERT_PUSH(NOTICE)])
1103 $1
1104 AC_DIVERT_POP
1105 ])# _LT_AC_SHELL_INIT
1106
1107
1108 # _LT_AC_PROG_ECHO_BACKSLASH
1109 # --------------------------
1110 # Add some code to the start of the generated configure script which
1111 # will find an echo command which doesn't interpret backslashes.
1112 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1113 [_LT_AC_SHELL_INIT([
1114 # Check that we are running under the correct shell.
1115 SHELL=${CONFIG_SHELL-/bin/sh}
1116
1117 case X$ECHO in
1118 X*--fallback-echo)
1119   # Remove one level of quotation (which was required for Make).
1120   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1121   ;;
1122 esac
1123
1124 echo=${ECHO-echo}
1125 if test "X[$]1" = X--no-reexec; then
1126   # Discard the --no-reexec flag, and continue.
1127   shift
1128 elif test "X[$]1" = X--fallback-echo; then
1129   # Avoid inline document here, it may be left over
1130   :
1131 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
1132   # Yippee, $echo works!
1133   :
1134 else
1135   # Restart under the correct shell.
1136   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1137 fi
1138
1139 if test "X[$]1" = X--fallback-echo; then
1140   # used as fallback echo
1141   shift
1142   cat <<EOF
1143 [$]*
1144 EOF
1145   exit 0
1146 fi
1147
1148 # The HP-UX ksh and POSIX shell print the target directory to stdout
1149 # if CDPATH is set.
1150 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1151
1152 if test -z "$ECHO"; then
1153 if test "X${echo_test_string+set}" != Xset; then
1154 # find a string as large as possible, as long as the shell can cope with it
1155   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1156     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1157     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1158        echo_test_string="`eval $cmd`" &&
1159        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1160     then
1161       break
1162     fi
1163   done
1164 fi
1165
1166 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1167    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1168    test "X$echo_testing_string" = "X$echo_test_string"; then
1169   :
1170 else
1171   # The Solaris, AIX, and Digital Unix default echo programs unquote
1172   # backslashes.  This makes it impossible to quote backslashes using
1173   #   echo "$something" | sed 's/\\/\\\\/g'
1174   #
1175   # So, first we look for a working echo in the user's PATH.
1176
1177   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1178   for dir in $PATH /usr/ucb; do
1179     IFS="$lt_save_ifs"
1180     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1181        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1182        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1183        test "X$echo_testing_string" = "X$echo_test_string"; then
1184       echo="$dir/echo"
1185       break
1186     fi
1187   done
1188   IFS="$lt_save_ifs"
1189
1190   if test "X$echo" = Xecho; then
1191     # We didn't find a better echo, so look for alternatives.
1192     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1193        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1194        test "X$echo_testing_string" = "X$echo_test_string"; then
1195       # This shell has a builtin print -r that does the trick.
1196       echo='print -r'
1197     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1198          test "X$CONFIG_SHELL" != X/bin/ksh; then
1199       # If we have ksh, try running configure again with it.
1200       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1201       export ORIGINAL_CONFIG_SHELL
1202       CONFIG_SHELL=/bin/ksh
1203       export CONFIG_SHELL
1204       exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1205     else
1206       # Try using printf.
1207       echo='printf %s\n'
1208       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1209          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1210          test "X$echo_testing_string" = "X$echo_test_string"; then
1211         # Cool, printf works
1212         :
1213       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1214            test "X$echo_testing_string" = 'X\t' &&
1215            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1216            test "X$echo_testing_string" = "X$echo_test_string"; then
1217         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1218         export CONFIG_SHELL
1219         SHELL="$CONFIG_SHELL"
1220         export SHELL
1221         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1222       elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1223            test "X$echo_testing_string" = 'X\t' &&
1224            echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1225            test "X$echo_testing_string" = "X$echo_test_string"; then
1226         echo="$CONFIG_SHELL [$]0 --fallback-echo"
1227       else
1228         # maybe with a smaller string...
1229         prev=:
1230
1231         for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1232           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1233           then
1234             break
1235           fi
1236           prev="$cmd"
1237         done
1238
1239         if test "$prev" != 'sed 50q "[$]0"'; then
1240           echo_test_string=`eval $prev`
1241           export echo_test_string
1242           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1243         else
1244           # Oops.  We lost completely, so just stick with echo.
1245           echo=echo
1246         fi
1247       fi
1248     fi
1249   fi
1250 fi
1251 fi
1252
1253 # Copy echo and quote the copy suitably for passing to libtool from
1254 # the Makefile, instead of quoting the original, which is used later.
1255 ECHO=$echo
1256 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1257    ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1258 fi
1259
1260 AC_SUBST(ECHO)
1261 ])])# _LT_AC_PROG_ECHO_BACKSLASH
1262
1263
1264 # _LT_AC_LOCK
1265 # -----------
1266 AC_DEFUN([_LT_AC_LOCK],
1267 [AC_ARG_ENABLE([libtool-lock],
1268     [AC_HELP_STRING([--disable-libtool-lock],
1269         [avoid locking (might break parallel builds)])])
1270 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
1271
1272 # Some flags need to be propagated to the compiler or linker for good
1273 # libtool support.
1274 case $host in
1275 ia64-*-hpux*)
1276   # Find out which ABI we are using.
1277   echo 'int i;' > conftest.$ac_ext
1278   if AC_TRY_EVAL(ac_compile); then
1279     case `/usr/bin/file conftest.$ac_objext` in
1280     *ELF-32*)
1281       HPUX_IA64_MODE="32"
1282       ;;
1283     *ELF-64*)
1284       HPUX_IA64_MODE="64"
1285       ;;
1286     esac
1287   fi
1288   rm -rf conftest*
1289   ;;
1290 *-*-irix6*)
1291   # Find out which ABI we are using.
1292   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1293   if AC_TRY_EVAL(ac_compile); then
1294    if test "$lt_cv_prog_gnu_ld" = yes; then
1295     case `/usr/bin/file conftest.$ac_objext` in
1296     *32-bit*)
1297       LD="${LD-ld} -melf32bsmip"
1298       ;;
1299     *N32*)
1300       LD="${LD-ld} -melf32bmipn32"
1301       ;;
1302     *64-bit*)
1303       LD="${LD-ld} -melf64bmip"
1304       ;;
1305     esac
1306    else
1307     case `/usr/bin/file conftest.$ac_objext` in
1308     *32-bit*)
1309       LD="${LD-ld} -32"
1310       ;;
1311     *N32*)
1312       LD="${LD-ld} -n32"
1313       ;;
1314     *64-bit*)
1315       LD="${LD-ld} -64"
1316       ;;
1317     esac
1318    fi
1319   fi
1320   rm -rf conftest*
1321   ;;
1322
1323 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
1324   # Find out which ABI we are using.
1325   echo 'int i;' > conftest.$ac_ext
1326   if AC_TRY_EVAL(ac_compile); then
1327     case "`/usr/bin/file conftest.o`" in
1328     *32-bit*)
1329       case $host in
1330         x86_64-*linux*)
1331           LD="${LD-ld} -m elf_i386"
1332           ;;
1333         ppc64-*linux*)
1334           LD="${LD-ld} -m elf32ppclinux"
1335           ;;
1336         s390x-*linux*)
1337           LD="${LD-ld} -m elf_s390"
1338           ;;
1339         sparc64-*linux*)
1340           LD="${LD-ld} -m elf32_sparc"
1341           ;;
1342       esac
1343       ;;
1344     *64-bit*)
1345       case $host in
1346         x86_64-*linux*)
1347           LD="${LD-ld} -m elf_x86_64"
1348           ;;
1349         ppc*-*linux*|powerpc*-*linux*)
1350           LD="${LD-ld} -m elf64ppc"
1351           ;;
1352         s390*-*linux*)
1353           LD="${LD-ld} -m elf64_s390"
1354           ;;
1355         sparc*-*linux*)
1356           LD="${LD-ld} -m elf64_sparc"
1357           ;;
1358       esac
1359       ;;
1360     esac
1361   fi
1362   rm -rf conftest*
1363   ;;
1364
1365 *-*-sco3.2v5*)
1366   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
1367   SAVE_CFLAGS="$CFLAGS"
1368   CFLAGS="$CFLAGS -belf"
1369   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
1370     [AC_LANG_PUSH(C)
1371      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
1372      AC_LANG_POP])
1373   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
1374     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
1375     CFLAGS="$SAVE_CFLAGS"
1376   fi
1377   ;;
1378 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
1379 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
1380   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
1381   AC_CHECK_TOOL(AS, as, false)
1382   AC_CHECK_TOOL(OBJDUMP, objdump, false)
1383   ;;
1384   ])
1385 esac
1386
1387 need_locks="$enable_libtool_lock"
1388
1389 ])# _LT_AC_LOCK
1390
1391
1392 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1393 #               [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
1394 # ----------------------------------------------------------------
1395 # Check whether the given compiler option works
1396 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
1397 [AC_CACHE_CHECK([$1], [$2],
1398   [$2=no
1399   ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
1400    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1401    lt_compiler_flag="$3"
1402    # Insert the option either (1) after the last *FLAGS variable, or
1403    # (2) before a word containing "conftest.", or (3) at the end.
1404    # Note that $ac_compile itself does not contain backslashes and begins
1405    # with a dollar sign (not a hyphen), so the echo should work correctly.
1406    # The option is referenced via a variable to avoid confusing sed.
1407    lt_compile=`echo "$ac_compile" | $SED \
1408    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1409    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1410    -e 's:$: $lt_compiler_flag:'`
1411    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1412    (eval "$lt_compile" 2>conftest.err)
1413    ac_status=$?
1414    cat conftest.err >&AS_MESSAGE_LOG_FD
1415    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1416    if (exit $ac_status) && test -s "$ac_outfile"; then
1417      # The compiler can only warn and ignore the option if not recognized
1418      # So say no if there are warnings
1419      if test ! -s conftest.err; then
1420        $2=yes
1421      fi
1422    fi
1423    $rm conftest*
1424 ])
1425
1426 if test x"[$]$2" = xyes; then
1427     ifelse([$5], , :, [$5])
1428 else
1429     ifelse([$6], , :, [$6])
1430 fi
1431 ])# AC_LIBTOOL_COMPILER_OPTION
1432
1433
1434 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
1435 #                          [ACTION-SUCCESS], [ACTION-FAILURE])
1436 # ------------------------------------------------------------
1437 # Check whether the given compiler option works
1438 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
1439 [AC_CACHE_CHECK([$1], [$2],
1440   [$2=no
1441    save_LDFLAGS="$LDFLAGS"
1442    LDFLAGS="$LDFLAGS $3"
1443    printf "$lt_simple_link_test_code" > conftest.$ac_ext
1444    if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
1445      # The compiler can only warn and ignore the option if not recognized
1446      # So say no if there are warnings
1447      if test -s conftest.err; then
1448        # Append any errors to the config.log.
1449        cat conftest.err 1>&AS_MESSAGE_LOG_FD
1450      else
1451        $2=yes
1452      fi
1453    fi
1454    $rm conftest*
1455    LDFLAGS="$save_LDFLAGS"
1456 ])
1457
1458 if test x"[$]$2" = xyes; then
1459     ifelse([$4], , :, [$4])
1460 else
1461     ifelse([$5], , :, [$5])
1462 fi
1463 ])# AC_LIBTOOL_LINKER_OPTION
1464
1465
1466 # AC_LIBTOOL_SYS_MAX_CMD_LEN
1467 # --------------------------
1468 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
1469 [# find the maximum length of command line arguments
1470 AC_MSG_CHECKING([the maximum length of command line arguments])
1471 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
1472   i=0
1473   testring="ABCD"
1474
1475   case $build_os in
1476   msdosdjgpp*)
1477     # On DJGPP, this test can blow up pretty badly due to problems in libc
1478     # (any single argument exceeding 2000 bytes causes a buffer overrun
1479     # during glob expansion).  Even if it were fixed, the result of this
1480     # check would be larger than it should be.
1481     lt_cv_sys_max_cmd_len=12288;    # 12K is about right
1482     ;;
1483
1484   gnu*)
1485     # Under GNU Hurd, this test is not required because there is
1486     # no limit to the length of command line arguments.
1487     # Libtool will interpret -1 as no limit whatsoever
1488     lt_cv_sys_max_cmd_len=-1;
1489     ;;
1490
1491   cygwin* | mingw*)
1492     # On Win9x/ME, this test blows up -- it succeeds, but takes
1493     # about 5 minutes as the teststring grows exponentially.
1494     # Worse, since 9x/ME are not pre-emptively multitasking,
1495     # you end up with a "frozen" computer, even though with patience
1496     # the test eventually succeeds (with a max line length of 256k).
1497     # Instead, let's just punt: use the minimum linelength reported by
1498     # all of the supported platforms: 8192 (on NT/2K/XP).
1499     lt_cv_sys_max_cmd_len=8192;
1500     ;;
1501
1502  *)
1503     # If test is not a shell built-in, we'll probably end up computing a
1504     # maximum length that is only half of the actual maximum length, but
1505     # we can't tell.
1506     while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
1507                = "XX$testring") >/dev/null 2>&1 &&
1508             new_result=`expr "X$testring" : ".*" 2>&1` &&
1509             lt_cv_sys_max_cmd_len=$new_result &&
1510             test $i != 17 # 1/2 MB should be enough
1511     do
1512       i=`expr $i + 1`
1513       testring=$testring$testring
1514     done
1515     testring=
1516     # Add a significant safety factor because C++ compilers can tack on massive
1517     # amounts of additional arguments before passing them to the linker.
1518     # It appears as though 1/2 is a usable value.
1519     lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
1520     ;;
1521   esac
1522 ])
1523 if test -n $lt_cv_sys_max_cmd_len ; then
1524   AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
1525 else
1526   AC_MSG_RESULT(none)
1527 fi
1528 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
1529
1530
1531 # _LT_AC_CHECK_DLFCN
1532 # --------------------
1533 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1534 [AC_CHECK_HEADERS(dlfcn.h)dnl
1535 ])# _LT_AC_CHECK_DLFCN
1536
1537
1538 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1539 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1540 # ------------------------------------------------------------------
1541 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1542 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1543 if test "$cross_compiling" = yes; then :
1544   [$4]
1545 else
1546   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1547   lt_status=$lt_dlunknown
1548   cat > conftest.$ac_ext <<EOF
1549 [#line __oline__ "configure"
1550 #include "confdefs.h"
1551
1552 #if HAVE_DLFCN_H
1553 #include <dlfcn.h>
1554 #endif
1555
1556 #include <stdio.h>
1557
1558 #ifdef RTLD_GLOBAL
1559 #  define LT_DLGLOBAL           RTLD_GLOBAL
1560 #else
1561 #  ifdef DL_GLOBAL
1562 #    define LT_DLGLOBAL         DL_GLOBAL
1563 #  else
1564 #    define LT_DLGLOBAL         0
1565 #  endif
1566 #endif
1567
1568 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1569    find out it does not work in some platform. */
1570 #ifndef LT_DLLAZY_OR_NOW
1571 #  ifdef RTLD_LAZY
1572 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1573 #  else
1574 #    ifdef DL_LAZY
1575 #      define LT_DLLAZY_OR_NOW          DL_LAZY
1576 #    else
1577 #      ifdef RTLD_NOW
1578 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
1579 #      else
1580 #        ifdef DL_NOW
1581 #          define LT_DLLAZY_OR_NOW      DL_NOW
1582 #        else
1583 #          define LT_DLLAZY_OR_NOW      0
1584 #        endif
1585 #      endif
1586 #    endif
1587 #  endif
1588 #endif
1589
1590 #ifdef __cplusplus
1591 extern "C" void exit (int);
1592 #endif
1593
1594 void fnord() { int i=42;}
1595 int main ()
1596 {
1597   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1598   int status = $lt_dlunknown;
1599
1600   if (self)
1601     {
1602       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1603       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1604       /* dlclose (self); */
1605     }
1606
1607     exit (status);
1608 }]
1609 EOF
1610   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1611     (./conftest; exit; ) 2>/dev/null
1612     lt_status=$?
1613     case x$lt_status in
1614       x$lt_dlno_uscore) $1 ;;
1615       x$lt_dlneed_uscore) $2 ;;
1616       x$lt_unknown|x*) $3 ;;
1617     esac
1618   else :
1619     # compilation failed
1620     $3
1621   fi
1622 fi
1623 rm -fr conftest*
1624 ])# _LT_AC_TRY_DLOPEN_SELF
1625
1626
1627 # AC_LIBTOOL_DLOPEN_SELF
1628 # -------------------
1629 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1630 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1631 if test "x$enable_dlopen" != xyes; then
1632   enable_dlopen=unknown
1633   enable_dlopen_self=unknown
1634   enable_dlopen_self_static=unknown
1635 else
1636   lt_cv_dlopen=no
1637   lt_cv_dlopen_libs=
1638
1639   case $host_os in
1640   beos*)
1641     lt_cv_dlopen="load_add_on"
1642     lt_cv_dlopen_libs=
1643     lt_cv_dlopen_self=yes
1644     ;;
1645
1646   mingw* | pw32*)
1647     lt_cv_dlopen="LoadLibrary"
1648     lt_cv_dlopen_libs=
1649    ;;
1650
1651   cygwin*)
1652     lt_cv_dlopen="dlopen"
1653     lt_cv_dlopen_libs=
1654    ;;
1655
1656   darwin*)
1657   # if libdl is installed we need to link against it
1658     AC_CHECK_LIB([dl], [dlopen],
1659                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1660     lt_cv_dlopen="dyld"
1661     lt_cv_dlopen_libs=
1662     lt_cv_dlopen_self=yes
1663     ])
1664    ;;
1665     
1666   *)
1667     AC_CHECK_FUNC([shl_load],
1668           [lt_cv_dlopen="shl_load"],
1669       [AC_CHECK_LIB([dld], [shl_load],
1670             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1671         [AC_CHECK_FUNC([dlopen],
1672               [lt_cv_dlopen="dlopen"],
1673           [AC_CHECK_LIB([dl], [dlopen],
1674                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1675             [AC_CHECK_LIB([svld], [dlopen],
1676                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1677               [AC_CHECK_LIB([dld], [dld_link],
1678                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1679               ])
1680             ])
1681           ])
1682         ])
1683       ])
1684     ;;
1685   esac
1686
1687   if test "x$lt_cv_dlopen" != xno; then
1688     enable_dlopen=yes
1689   else
1690     enable_dlopen=no
1691   fi
1692
1693   case $lt_cv_dlopen in
1694   dlopen)
1695     save_CPPFLAGS="$CPPFLAGS"
1696     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1697
1698     save_LDFLAGS="$LDFLAGS"
1699     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1700
1701     save_LIBS="$LIBS"
1702     LIBS="$lt_cv_dlopen_libs $LIBS"
1703
1704     AC_CACHE_CHECK([whether a program can dlopen itself],
1705           lt_cv_dlopen_self, [dnl
1706           _LT_AC_TRY_DLOPEN_SELF(
1707             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1708             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1709     ])
1710
1711     if test "x$lt_cv_dlopen_self" = xyes; then
1712       LDFLAGS="$LDFLAGS $link_static_flag"
1713       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1714           lt_cv_dlopen_self_static, [dnl
1715           _LT_AC_TRY_DLOPEN_SELF(
1716             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1717             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1718       ])
1719     fi
1720
1721     CPPFLAGS="$save_CPPFLAGS"
1722     LDFLAGS="$save_LDFLAGS"
1723     LIBS="$save_LIBS"
1724     ;;
1725   esac
1726
1727   case $lt_cv_dlopen_self in
1728   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1729   *) enable_dlopen_self=unknown ;;
1730   esac
1731
1732   case $lt_cv_dlopen_self_static in
1733   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1734   *) enable_dlopen_self_static=unknown ;;
1735   esac
1736 fi
1737 ])# AC_LIBTOOL_DLOPEN_SELF
1738
1739
1740 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1741 # ---------------------------------
1742 # Check to see if options -c and -o are simultaneously supported by compiler
1743 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1744 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1745 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1746   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1747   [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1748    $rm -r conftest 2>/dev/null
1749    mkdir conftest
1750    cd conftest
1751    mkdir out
1752    printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1753
1754    # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1755    # that will create temporary files in the current directory regardless of
1756    # the output directory.  Thus, making CWD read-only will cause this test
1757    # to fail, enabling locking or at least warning the user not to do parallel
1758    # builds.
1759    chmod -w .
1760
1761    lt_compiler_flag="-o out/conftest2.$ac_objext"
1762    # Insert the option either (1) after the last *FLAGS variable, or
1763    # (2) before a word containing "conftest.", or (3) at the end.
1764    # Note that $ac_compile itself does not contain backslashes and begins
1765    # with a dollar sign (not a hyphen), so the echo should work correctly.
1766    lt_compile=`echo "$ac_compile" | $SED \
1767    -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1768    -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1769    -e 's:$: $lt_compiler_flag:'`
1770    (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1771    (eval "$lt_compile" 2>out/conftest.err)
1772    ac_status=$?
1773    cat out/conftest.err >&AS_MESSAGE_LOG_FD
1774    echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1775    if (exit $ac_status) && test -s out/conftest2.$ac_objext
1776    then
1777      # The compiler can only warn and ignore the option if not recognized
1778      # So say no if there are warnings
1779      if test ! -s out/conftest.err; then
1780        _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1781      fi
1782    fi
1783    chmod u+w .
1784    $rm conftest* out/*
1785    rmdir out
1786    cd ..
1787    rmdir conftest
1788    $rm conftest*
1789 ])
1790 ])# AC_LIBTOOL_PROG_CC_C_O
1791
1792
1793 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1794 # -----------------------------------------
1795 # Check to see if we can do hard links to lock some files if needed
1796 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1797 [AC_REQUIRE([_LT_AC_LOCK])dnl
1798
1799 hard_links="nottested"
1800 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1801   # do not overwrite the value of need_locks provided by the user
1802   AC_MSG_CHECKING([if we can lock with hard links])
1803   hard_links=yes
1804   $rm conftest*
1805   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1806   touch conftest.a
1807   ln conftest.a conftest.b 2>&5 || hard_links=no
1808   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1809   AC_MSG_RESULT([$hard_links])
1810   if test "$hard_links" = no; then
1811     AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1812     need_locks=warn
1813   fi
1814 else
1815   need_locks=no
1816 fi
1817 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1818
1819
1820 # AC_LIBTOOL_OBJDIR
1821 # -----------------
1822 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1823 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1824 [rm -f .libs 2>/dev/null
1825 mkdir .libs 2>/dev/null
1826 if test -d .libs; then
1827   lt_cv_objdir=.libs
1828 else
1829   # MS-DOS does not allow filenames that begin with a dot.
1830   lt_cv_objdir=_libs
1831 fi
1832 rmdir .libs 2>/dev/null])
1833 objdir=$lt_cv_objdir
1834 ])# AC_LIBTOOL_OBJDIR
1835
1836
1837 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1838 # ----------------------------------------------
1839 # Check hardcoding attributes.
1840 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1841 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1842 _LT_AC_TAGVAR(hardcode_action, $1)=
1843 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1844    test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1845    test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1846
1847   # We can hardcode non-existant directories.
1848   if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1849      # If the only mechanism to avoid hardcoding is shlibpath_var, we
1850      # have to relink, otherwise we might link with an installed library
1851      # when we should be linking with a yet-to-be-installed one
1852      ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1853      test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1854     # Linking always hardcodes the temporary library directory.
1855     _LT_AC_TAGVAR(hardcode_action, $1)=relink
1856   else
1857     # We can link without hardcoding, and we can hardcode nonexisting dirs.
1858     _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1859   fi
1860 else
1861   # We cannot hardcode anything, or else we can only hardcode existing
1862   # directories.
1863   _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1864 fi
1865 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1866
1867 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1868   # Fast installation is not supported
1869   enable_fast_install=no
1870 elif test "$shlibpath_overrides_runpath" = yes ||
1871      test "$enable_shared" = no; then
1872   # Fast installation is not necessary
1873   enable_fast_install=needless
1874 fi
1875 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1876
1877
1878 # AC_LIBTOOL_SYS_LIB_STRIP
1879 # ------------------------
1880 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1881 [striplib=
1882 old_striplib=
1883 AC_MSG_CHECKING([whether stripping libraries is possible])
1884 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1885   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1886   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1887   AC_MSG_RESULT([yes])
1888 else
1889 # FIXME - insert some real tests, host_os isn't really good enough
1890   case $host_os in
1891    darwin*)
1892        if test -n "$STRIP" ; then
1893          striplib="$STRIP -x"
1894          AC_MSG_RESULT([yes])
1895        else
1896   AC_MSG_RESULT([no])
1897 fi
1898        ;;
1899    *)
1900   AC_MSG_RESULT([no])
1901     ;;
1902   esac  
1903 fi
1904 ])# AC_LIBTOOL_SYS_LIB_STRIP
1905
1906
1907 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1908 # -----------------------------
1909 # PORTME Fill in your ld.so characteristics
1910 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1911 [AC_MSG_CHECKING([dynamic linker characteristics])
1912 library_names_spec=
1913 libname_spec='lib$name'
1914 soname_spec=
1915 shrext=".so"
1916 postinstall_cmds=
1917 postuninstall_cmds=
1918 finish_cmds=
1919 finish_eval=
1920 shlibpath_var=
1921 shlibpath_overrides_runpath=unknown
1922 version_type=none
1923 dynamic_linker="$host_os ld.so"
1924 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1925 if test "$GCC" = yes; then
1926   sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1927   if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1928     # if the path contains ";" then we assume it to be the separator
1929     # otherwise default to the standard path separator (i.e. ":") - it is
1930     # assumed that no part of a normal pathname contains ";" but that should
1931     # okay in the real world where ";" in dirpaths is itself problematic.
1932     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1933   else
1934     sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1935   fi
1936 else
1937   sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1938 fi
1939 need_lib_prefix=unknown
1940 hardcode_into_libs=no
1941
1942 # when you set need_version to no, make sure it does not cause -set_version
1943 # flags to be left without arguments
1944 need_version=unknown
1945
1946 case $host_os in
1947 aix3*)
1948   version_type=linux
1949   library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1950   shlibpath_var=LIBPATH
1951
1952   # AIX 3 has no versioning support, so we append a major version to the name.
1953   soname_spec='${libname}${release}${shared_ext}$major'
1954   ;;
1955
1956 aix4* | aix5*)
1957   version_type=linux
1958   need_lib_prefix=no
1959   need_version=no
1960   hardcode_into_libs=yes
1961   if test "$host_cpu" = ia64; then
1962     # AIX 5 supports IA64
1963     library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1964     shlibpath_var=LD_LIBRARY_PATH
1965   else
1966     # With GCC up to 2.95.x, collect2 would create an import file
1967     # for dependence libraries.  The import file would start with
1968     # the line `#! .'.  This would cause the generated library to
1969     # depend on `.', always an invalid library.  This was fixed in
1970     # development snapshots of GCC prior to 3.0.
1971     case $host_os in
1972       aix4 | aix4.[[01]] | aix4.[[01]].*)
1973       if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1974            echo ' yes '
1975            echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1976         :
1977       else
1978         can_build_shared=no
1979       fi
1980       ;;
1981     esac
1982     # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1983     # soname into executable. Probably we can add versioning support to
1984     # collect2, so additional links can be useful in future.
1985     if test "$aix_use_runtimelinking" = yes; then
1986       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1987       # instead of lib<name>.a to let people know that these are not
1988       # typical AIX shared libraries.
1989       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1990     else
1991       # We preserve .a as extension for shared libraries through AIX4.2
1992       # and later when we are not doing run time linking.
1993       library_names_spec='${libname}${release}.a $libname.a'
1994       soname_spec='${libname}${release}${shared_ext}$major'
1995     fi
1996     shlibpath_var=LIBPATH
1997   fi
1998   ;;
1999
2000 amigaos*)
2001   library_names_spec='$libname.ixlibrary $libname.a'
2002   # Create ${libname}_ixlibrary.a entries in /sys/libs.
2003   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'
2004   ;;
2005
2006 beos*)
2007   library_names_spec='${libname}${shared_ext}'
2008   dynamic_linker="$host_os ld.so"
2009   shlibpath_var=LIBRARY_PATH
2010   ;;
2011
2012 bsdi4*)
2013   version_type=linux
2014   need_version=no
2015   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2016   soname_spec='${libname}${release}${shared_ext}$major'
2017   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2018   shlibpath_var=LD_LIBRARY_PATH
2019   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2020   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2021   # the default ld.so.conf also contains /usr/contrib/lib and
2022   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2023   # libtool to hard-code these into programs
2024   ;;
2025
2026 cygwin* | mingw* | pw32*)
2027   version_type=windows
2028   shrext=".dll"
2029   need_version=no
2030   need_lib_prefix=no
2031
2032   case $GCC,$host_os in
2033   yes,cygwin* | yes,mingw* | yes,pw32*)
2034     library_names_spec='$libname.dll.a'
2035     # DLL is installed to $(libdir)/../bin by postinstall_cmds
2036     postinstall_cmds='base_file=`basename \${file}`~
2037       dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
2038       dldir=$destdir/`dirname \$dlpath`~
2039       test -d \$dldir || mkdir -p \$dldir~
2040       $install_prog $dir/$dlname \$dldir/$dlname'
2041     postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
2042       dlpath=$dir/\$dldll~
2043        $rm \$dlpath'
2044     shlibpath_overrides_runpath=yes
2045
2046     case $host_os in
2047     cygwin*)
2048       # Cygwin DLLs use 'cyg' prefix rather than 'lib'
2049       soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2050       sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib"
2051       ;;
2052     mingw*)
2053       # MinGW DLLs use traditional 'lib' prefix
2054       soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
2055       sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
2056       if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
2057         # It is most probably a Windows format PATH printed by
2058         # mingw gcc, but we are running on Cygwin. Gcc prints its search
2059         # path with ; separators, and with drive letters. We can handle the
2060         # drive letters (cygwin fileutils understands them), so leave them,
2061         # especially as we might pass files found there to a mingw objdump,
2062         # which wouldn't understand a cygwinified path. Ahh.
2063         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
2064       else
2065         sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
2066       fi
2067       ;;
2068     pw32*)
2069       # pw32 DLLs use 'pw' prefix rather than 'lib'
2070       library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
2071       ;;
2072     esac
2073     ;;
2074
2075   *)
2076     library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
2077     ;;
2078   esac
2079   dynamic_linker='Win32 ld.exe'
2080   # FIXME: first we should search . and the directory the executable is in
2081   shlibpath_var=PATH
2082   ;;
2083
2084 darwin* | rhapsody*)
2085   dynamic_linker="$host_os dyld"
2086   version_type=darwin
2087   need_lib_prefix=no
2088   need_version=no
2089   # FIXME: Relying on posixy $() will cause problems for
2090   #        cross-compilation, but unfortunately the echo tests do not
2091   #        yet detect zsh echo's removal of \ escapes.
2092   library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
2093   soname_spec='${libname}${release}${major}$shared_ext'
2094   shlibpath_overrides_runpath=yes
2095   shlibpath_var=DYLD_LIBRARY_PATH
2096   shrext='$(test .$module = .yes && echo .so || echo .dylib)'
2097   # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
2098   if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
2099   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"`
2100   fi
2101   sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
2102   ;;
2103
2104 dgux*)
2105   version_type=linux
2106   need_lib_prefix=no
2107   need_version=no
2108   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
2109   soname_spec='${libname}${release}${shared_ext}$major'
2110   shlibpath_var=LD_LIBRARY_PATH
2111   ;;
2112
2113 freebsd1*)
2114   dynamic_linker=no
2115   ;;
2116
2117 freebsd*)
2118   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2119   version_type=freebsd-$objformat
2120   case $version_type in
2121     freebsd-elf*)
2122       library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
2123       need_version=no
2124       need_lib_prefix=no
2125       ;;
2126     freebsd-*)
2127       library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
2128       need_version=yes
2129       ;;
2130   esac
2131   shlibpath_var=LD_LIBRARY_PATH
2132   case $host_os in
2133   freebsd2*)
2134     shlibpath_overrides_runpath=yes
2135     ;;
2136   freebsd3.[01]* | freebsdelf3.[01]*)
2137     shlibpath_overrides_runpath=yes
2138     hardcode_into_libs=yes
2139     ;;
2140   *) # from 3.2 on
2141     shlibpath_overrides_runpath=no
2142     hardcode_into_libs=yes
2143     ;;
2144   esac
2145   ;;
2146
2147 gnu*)
2148   version_type=linux
2149   need_lib_prefix=no
2150   need_version=no
2151   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
2152   soname_spec='${libname}${release}${shared_ext}$major'
2153   shlibpath_var=LD_LIBRARY_PATH
2154   hardcode_into_libs=yes
2155   ;;
2156
2157 hpux9* | hpux10* | hpux11*)
2158   # Give a soname corresponding to the major version so that dld.sl refuses to
2159   # link against other versions.
2160   version_type=sunos
2161   need_lib_prefix=no
2162   need_version=no
2163   case "$host_cpu" in
2164   ia64*)
2165     shrext='.so'
2166     hardcode_into_libs=yes
2167     dynamic_linker="$host_os dld.so"
2168     shlibpath_var=LD_LIBRARY_PATH
2169     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2170     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2171     soname_spec='${libname}${release}${shared_ext}$major'
2172     if test "X$HPUX_IA64_MODE" = X32; then
2173       sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
2174     else
2175       sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
2176     fi
2177     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2178     ;;
2179    hppa*64*)
2180      shrext='.sl'
2181      hardcode_into_libs=yes
2182      dynamic_linker="$host_os dld.sl"
2183      shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
2184      shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
2185      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2186      soname_spec='${libname}${release}${shared_ext}$major'
2187      sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
2188      sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
2189      ;;
2190    *)
2191     shrext='.sl'
2192     dynamic_linker="$host_os dld.sl"
2193     shlibpath_var=SHLIB_PATH
2194     shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2195     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2196     soname_spec='${libname}${release}${shared_ext}$major'
2197     ;;
2198   esac
2199   # HP-UX runs *really* slowly unless shared libraries are mode 555.
2200   postinstall_cmds='chmod 555 $lib'
2201   ;;
2202
2203 irix5* | irix6* | nonstopux*)
2204   case $host_os in
2205     nonstopux*) version_type=nonstopux ;;
2206     *)
2207         if test "$lt_cv_prog_gnu_ld" = yes; then
2208                 version_type=linux
2209         else
2210                 version_type=irix
2211         fi ;;
2212   esac
2213   need_lib_prefix=no
2214   need_version=no
2215   soname_spec='${libname}${release}${shared_ext}$major'
2216   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
2217   case $host_os in
2218   irix5* | nonstopux*)
2219     libsuff= shlibsuff=
2220     ;;
2221   *)
2222     case $LD in # libtool.m4 will add one of these switches to LD
2223     *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
2224       libsuff= shlibsuff= libmagic=32-bit;;
2225     *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
2226       libsuff=32 shlibsuff=N32 libmagic=N32;;
2227     *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
2228       libsuff=64 shlibsuff=64 libmagic=64-bit;;
2229     *) libsuff= shlibsuff= libmagic=never-match;;
2230     esac
2231     ;;
2232   esac
2233   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2234   shlibpath_overrides_runpath=no
2235   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2236   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2237   hardcode_into_libs=yes
2238   ;;
2239
2240 # No shared lib support for Linux oldld, aout, or coff.
2241 linux*oldld* | linux*aout* | linux*coff*)
2242   dynamic_linker=no
2243   ;;
2244
2245 # This must be Linux ELF.
2246 linux*)
2247   version_type=linux
2248   need_lib_prefix=no
2249   need_version=no
2250   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2251   soname_spec='${libname}${release}${shared_ext}$major'
2252   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2253   shlibpath_var=LD_LIBRARY_PATH
2254   shlibpath_overrides_runpath=no
2255   # This implies no fast_install, which is unacceptable.
2256   # Some rework will be needed to allow for fast_install
2257   # before this can be enabled.
2258   hardcode_into_libs=yes
2259
2260   # We used to test for /lib/ld.so.1 and disable shared libraries on
2261   # powerpc, because MkLinux only supported shared libraries with the
2262   # GNU dynamic linker.  Since this was broken with cross compilers,
2263   # most powerpc-linux boxes support dynamic linking these days and
2264   # people can always --disable-shared, the test was removed, and we
2265   # assume the GNU/Linux dynamic linker is in use.
2266   dynamic_linker='GNU/Linux ld.so'
2267   ;;
2268
2269 netbsd*)
2270   version_type=sunos
2271   need_lib_prefix=no
2272   need_version=no
2273   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2274     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2275     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2276     dynamic_linker='NetBSD (a.out) ld.so'
2277   else
2278     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
2279     soname_spec='${libname}${release}${shared_ext}$major'
2280     dynamic_linker='NetBSD ld.elf_so'
2281   fi
2282   shlibpath_var=LD_LIBRARY_PATH
2283   shlibpath_overrides_runpath=yes
2284   hardcode_into_libs=yes
2285   ;;
2286
2287 newsos6)
2288   version_type=linux
2289   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2290   shlibpath_var=LD_LIBRARY_PATH
2291   shlibpath_overrides_runpath=yes
2292   ;;
2293
2294 nto-qnx)
2295   version_type=linux
2296   need_lib_prefix=no
2297   need_version=no
2298   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2299   soname_spec='${libname}${release}${shared_ext}$major'
2300   shlibpath_var=LD_LIBRARY_PATH
2301   shlibpath_overrides_runpath=yes
2302   ;;
2303
2304 openbsd*)
2305   version_type=sunos
2306   need_lib_prefix=no
2307   need_version=no
2308   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2309   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2310   shlibpath_var=LD_LIBRARY_PATH
2311   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2312     case $host_os in
2313       openbsd2.[[89]] | openbsd2.[[89]].*)
2314         shlibpath_overrides_runpath=no
2315         ;;
2316       *)
2317         shlibpath_overrides_runpath=yes
2318         ;;
2319       esac
2320   else
2321     shlibpath_overrides_runpath=yes
2322   fi
2323   ;;
2324
2325 os2*)
2326   libname_spec='$name'
2327   shrext=".dll"
2328   need_lib_prefix=no
2329   library_names_spec='$libname${shared_ext} $libname.a'
2330   dynamic_linker='OS/2 ld.exe'
2331   shlibpath_var=LIBPATH
2332   ;;
2333
2334 osf3* | osf4* | osf5*)
2335   version_type=osf
2336   need_lib_prefix=no
2337   need_version=no
2338   soname_spec='${libname}${release}${shared_ext}$major'
2339   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2340   shlibpath_var=LD_LIBRARY_PATH
2341   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2342   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2343   ;;
2344
2345 sco3.2v5*)
2346   version_type=osf
2347   soname_spec='${libname}${release}${shared_ext}$major'
2348   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2349   shlibpath_var=LD_LIBRARY_PATH
2350   ;;
2351
2352 solaris*)
2353   version_type=linux
2354   need_lib_prefix=no
2355   need_version=no
2356   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2357   soname_spec='${libname}${release}${shared_ext}$major'
2358   shlibpath_var=LD_LIBRARY_PATH
2359   shlibpath_overrides_runpath=yes
2360   hardcode_into_libs=yes
2361   # ldd complains unless libraries are executable
2362   postinstall_cmds='chmod +x $lib'
2363   ;;
2364
2365 sunos4*)
2366   version_type=sunos
2367   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
2368   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2369   shlibpath_var=LD_LIBRARY_PATH
2370   shlibpath_overrides_runpath=yes
2371   if test "$with_gnu_ld" = yes; then
2372     need_lib_prefix=no
2373   fi
2374   need_version=yes
2375   ;;
2376
2377 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2378   version_type=linux
2379   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2380   soname_spec='${libname}${release}${shared_ext}$major'
2381   shlibpath_var=LD_LIBRARY_PATH
2382   case $host_vendor in
2383     sni)
2384       shlibpath_overrides_runpath=no
2385       need_lib_prefix=no
2386       export_dynamic_flag_spec='${wl}-Blargedynsym'
2387       runpath_var=LD_RUN_PATH
2388       ;;
2389     siemens)
2390       need_lib_prefix=no
2391       ;;
2392     motorola)
2393       need_lib_prefix=no
2394       need_version=no
2395       shlibpath_overrides_runpath=no
2396       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2397       ;;
2398   esac
2399   ;;
2400
2401 sysv4*MP*)
2402   if test -d /usr/nec ;then
2403     version_type=linux
2404     library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
2405     soname_spec='$libname${shared_ext}.$major'
2406     shlibpath_var=LD_LIBRARY_PATH
2407   fi
2408   ;;
2409
2410 uts4*)
2411   version_type=linux
2412   library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
2413   soname_spec='${libname}${release}${shared_ext}$major'
2414   shlibpath_var=LD_LIBRARY_PATH
2415   ;;
2416
2417 *)
2418   dynamic_linker=no
2419   ;;
2420 esac
2421 AC_MSG_RESULT([$dynamic_linker])
2422 test "$dynamic_linker" = no && can_build_shared=no
2423 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
2424
2425
2426 # _LT_AC_TAGCONFIG
2427 # ----------------
2428 AC_DEFUN([_LT_AC_TAGCONFIG],
2429 [AC_ARG_WITH([tags],
2430     [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
2431         [include additional configurations @<:@automatic@:>@])],
2432     [tagnames="$withval"])
2433
2434 if test -f "$ltmain" && test -n "$tagnames"; then
2435   if test ! -f "${ofile}"; then
2436     AC_MSG_WARN([output file `$ofile' does not exist])
2437   fi
2438
2439   if test -z "$LTCC"; then
2440     eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
2441     if test -z "$LTCC"; then
2442       AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
2443     else
2444       AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
2445     fi
2446   fi
2447
2448   # Extract list of available tagged configurations in $ofile.
2449   # Note that this assumes the entire list is on one line.
2450   available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
2451
2452   lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2453   for tagname in $tagnames; do
2454     IFS="$lt_save_ifs"
2455     # Check whether tagname contains only valid characters
2456     case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
2457     "") ;;
2458     *)  AC_MSG_ERROR([invalid tag name: $tagname])
2459         ;;
2460     esac
2461
2462     if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
2463     then
2464       AC_MSG_ERROR([tag name \"$tagname\" already exists])
2465     fi
2466
2467     # Update the list of available tags.
2468     if test -n "$tagname"; then
2469       echo appending configuration tag \"$tagname\" to $ofile
2470
2471       case $tagname in
2472       CXX)
2473         if test -n "$CXX" && test "X$CXX" != "Xno"; then
2474           AC_LIBTOOL_LANG_CXX_CONFIG
2475         else
2476           tagname=""
2477         fi
2478         ;;
2479
2480       F77)
2481         if test -n "$F77" && test "X$F77" != "Xno"; then
2482           AC_LIBTOOL_LANG_F77_CONFIG
2483         else
2484           tagname=""
2485         fi
2486         ;;
2487
2488       GCJ)
2489         if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
2490           AC_LIBTOOL_LANG_GCJ_CONFIG
2491         else
2492           tagname=""
2493         fi
2494         ;;
2495
2496       RC)
2497         AC_LIBTOOL_LANG_RC_CONFIG
2498         ;;
2499
2500       *)
2501         AC_MSG_ERROR([Unsupported tag name: $tagname])
2502         ;;
2503       esac
2504
2505       # Append the new tag name to the list of available tags.
2506       if test -n "$tagname" ; then
2507       available_tags="$available_tags $tagname"
2508     fi
2509     fi
2510   done
2511   IFS="$lt_save_ifs"
2512
2513   # Now substitute the updated list of available tags.
2514   if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
2515     mv "${ofile}T" "$ofile"
2516     chmod +x "$ofile"
2517   else
2518     rm -f "${ofile}T"
2519     AC_MSG_ERROR([unable to update list of available tagged configurations.])
2520   fi
2521 fi
2522 ])# _LT_AC_TAGCONFIG
2523
2524
2525 # AC_LIBTOOL_DLOPEN
2526 # -----------------
2527 # enable checks for dlopen support
2528 AC_DEFUN([AC_LIBTOOL_DLOPEN],
2529  [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2530 ])# AC_LIBTOOL_DLOPEN
2531
2532
2533 # AC_LIBTOOL_WIN32_DLL
2534 # --------------------
2535 # declare package support for building win32 dll's
2536 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2537 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2538 ])# AC_LIBTOOL_WIN32_DLL
2539
2540
2541 # AC_ENABLE_SHARED([DEFAULT])
2542 # ---------------------------
2543 # implement the --enable-shared flag
2544 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2545 AC_DEFUN([AC_ENABLE_SHARED],
2546 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2547 AC_ARG_ENABLE([shared],
2548     [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
2549         [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
2550     [p=${PACKAGE-default}
2551     case $enableval in
2552     yes) enable_shared=yes ;;
2553     no) enable_shared=no ;;
2554     *)
2555       enable_shared=no
2556       # Look at the argument we got.  We use all the common list separators.
2557       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2558       for pkg in $enableval; do
2559         IFS="$lt_save_ifs"
2560         if test "X$pkg" = "X$p"; then
2561           enable_shared=yes
2562         fi
2563       done
2564       IFS="$lt_save_ifs"
2565       ;;
2566     esac],
2567     [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2568 ])# AC_ENABLE_SHARED
2569
2570
2571 # AC_DISABLE_SHARED
2572 # -----------------
2573 #- set the default shared flag to --disable-shared
2574 AC_DEFUN([AC_DISABLE_SHARED],
2575 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2576 AC_ENABLE_SHARED(no)
2577 ])# AC_DISABLE_SHARED
2578
2579
2580 # AC_ENABLE_STATIC([DEFAULT])
2581 # ---------------------------
2582 # implement the --enable-static flag
2583 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2584 AC_DEFUN([AC_ENABLE_STATIC],
2585 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2586 AC_ARG_ENABLE([static],
2587     [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2588         [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2589     [p=${PACKAGE-default}
2590     case $enableval in
2591     yes) enable_static=yes ;;
2592     no) enable_static=no ;;
2593     *)
2594      enable_static=no
2595       # Look at the argument we got.  We use all the common list separators.
2596       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2597       for pkg in $enableval; do
2598         IFS="$lt_save_ifs"
2599         if test "X$pkg" = "X$p"; then
2600           enable_static=yes
2601         fi
2602       done
2603       IFS="$lt_save_ifs"
2604       ;;
2605     esac],
2606     [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2607 ])# AC_ENABLE_STATIC
2608
2609
2610 # AC_DISABLE_STATIC
2611 # -----------------
2612 # set the default static flag to --disable-static
2613 AC_DEFUN([AC_DISABLE_STATIC],
2614 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2615 AC_ENABLE_STATIC(no)
2616 ])# AC_DISABLE_STATIC
2617
2618
2619 # AC_ENABLE_FAST_INSTALL([DEFAULT])
2620 # ---------------------------------
2621 # implement the --enable-fast-install flag
2622 # DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2623 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2624 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2625 AC_ARG_ENABLE([fast-install],
2626     [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2627     [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2628     [p=${PACKAGE-default}
2629     case $enableval in
2630     yes) enable_fast_install=yes ;;
2631     no) enable_fast_install=no ;;
2632     *)
2633       enable_fast_install=no
2634       # Look at the argument we got.  We use all the common list separators.
2635       lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2636       for pkg in $enableval; do
2637         IFS="$lt_save_ifs"
2638         if test "X$pkg" = "X$p"; then
2639           enable_fast_install=yes
2640         fi
2641       done
2642       IFS="$lt_save_ifs"
2643       ;;
2644     esac],
2645     [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2646 ])# AC_ENABLE_FAST_INSTALL
2647
2648
2649 # AC_DISABLE_FAST_INSTALL
2650 # -----------------------
2651 # set the default to --disable-fast-install
2652 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2653 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2654 AC_ENABLE_FAST_INSTALL(no)
2655 ])# AC_DISABLE_FAST_INSTALL
2656
2657
2658 # AC_LIBTOOL_PICMODE([MODE])
2659 # --------------------------
2660 # implement the --with-pic flag
2661 # MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2662 AC_DEFUN([AC_LIBTOOL_PICMODE],
2663 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2664 pic_mode=ifelse($#,1,$1,default)
2665 ])# AC_LIBTOOL_PICMODE
2666
2667
2668 # AC_PROG_EGREP
2669 # -------------
2670 # This is predefined starting with Autoconf 2.54, so this conditional
2671 # definition can be removed once we require Autoconf 2.54 or later.
2672 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2673 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2674    [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2675     then ac_cv_prog_egrep='grep -E'
2676     else ac_cv_prog_egrep='egrep'
2677     fi])
2678  EGREP=$ac_cv_prog_egrep
2679  AC_SUBST([EGREP])
2680 ])])
2681
2682
2683 # AC_PATH_TOOL_PREFIX
2684 # -------------------
2685 # find a file program which can recognise shared library
2686 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2687 [AC_REQUIRE([AC_PROG_EGREP])dnl
2688 AC_MSG_CHECKING([for $1])
2689 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2690 [case $MAGIC_CMD in
2691 [[\\/*] |  ?:[\\/]*])
2692   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2693   ;;
2694 *)
2695   lt_save_MAGIC_CMD="$MAGIC_CMD"
2696   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2697 dnl $ac_dummy forces splitting on constant user-supplied paths.
2698 dnl POSIX.2 word splitting is done only on the output of word expansions,
2699 dnl not every word.  This closes a longstanding sh security hole.
2700   ac_dummy="ifelse([$2], , $PATH, [$2])"
2701   for ac_dir in $ac_dummy; do
2702     IFS="$lt_save_ifs"
2703     test -z "$ac_dir" && ac_dir=.
2704     if test -f $ac_dir/$1; then
2705       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2706       if test -n "$file_magic_test_file"; then
2707         case $deplibs_check_method in
2708         "file_magic "*)
2709           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2710           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2711           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2712             $EGREP "$file_magic_regex" > /dev/null; then
2713             :
2714           else
2715             cat <<EOF 1>&2
2716
2717 *** Warning: the command libtool uses to detect shared libraries,
2718 *** $file_magic_cmd, produces output that libtool cannot recognize.
2719 *** The result is that libtool may fail to recognize shared libraries
2720 *** as such.  This will affect the creation of libtool libraries that
2721 *** depend on shared libraries, but programs linked with such libtool
2722 *** libraries will work regardless of this problem.  Nevertheless, you
2723 *** may want to report the problem to your system manager and/or to
2724 *** bug-libtool@gnu.org
2725
2726 EOF
2727           fi ;;
2728         esac
2729       fi
2730       break
2731     fi
2732   done
2733   IFS="$lt_save_ifs"
2734   MAGIC_CMD="$lt_save_MAGIC_CMD"
2735   ;;
2736 esac])
2737 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2738 if test -n "$MAGIC_CMD"; then
2739   AC_MSG_RESULT($MAGIC_CMD)
2740 else
2741   AC_MSG_RESULT(no)
2742 fi
2743 ])# AC_PATH_TOOL_PREFIX
2744
2745
2746 # AC_PATH_MAGIC
2747 # -------------
2748 # find a file program which can recognise a shared library
2749 AC_DEFUN([AC_PATH_MAGIC],
2750 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2751 if test -z "$lt_cv_path_MAGIC_CMD"; then
2752   if test -n "$ac_tool_prefix"; then
2753     AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2754   else
2755     MAGIC_CMD=:
2756   fi
2757 fi
2758 ])# AC_PATH_MAGIC
2759
2760
2761 # AC_PROG_LD
2762 # ----------
2763 # find the path to the GNU or non-GNU linker
2764 AC_DEFUN([AC_PROG_LD],
2765 [AC_ARG_WITH([gnu-ld],
2766     [AC_HELP_STRING([--with-gnu-ld],
2767         [assume the C compiler uses GNU ld @<:@default=no@:>@])],
2768     [test "$withval" = no || with_gnu_ld=yes],
2769     [with_gnu_ld=no])
2770 AC_REQUIRE([LT_AC_PROG_SED])dnl
2771 AC_REQUIRE([AC_PROG_CC])dnl
2772 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2773 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2774 ac_prog=ld
2775 if test "$GCC" = yes; then
2776   # Check if gcc -print-prog-name=ld gives a path.
2777   AC_MSG_CHECKING([for ld used by $CC])
2778   case $host in
2779   *-*-mingw*)
2780     # gcc leaves a trailing carriage return which upsets mingw
2781     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2782   *)
2783     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2784   esac
2785   case $ac_prog in
2786     # Accept absolute paths.
2787     [[\\/]]* | ?:[[\\/]]*)
2788       re_direlt='/[[^/]][[^/]]*/\.\./'
2789       # Canonicalize the path of ld
2790       ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2791       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2792         ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2793       done
2794       test -z "$LD" && LD="$ac_prog"
2795       ;;
2796   "")
2797     # If it fails, then pretend we aren't using GCC.
2798     ac_prog=ld
2799     ;;
2800   *)
2801     # If it is relative, then search for the first ld in PATH.
2802     with_gnu_ld=unknown
2803     ;;
2804   esac
2805 elif test "$with_gnu_ld" = yes; then
2806   AC_MSG_CHECKING([for GNU ld])
2807 else
2808   AC_MSG_CHECKING([for non-GNU ld])
2809 fi
2810 AC_CACHE_VAL(lt_cv_path_LD,
2811 [if test -z "$LD"; then
2812   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2813   for ac_dir in $PATH; do
2814     IFS="$lt_save_ifs"
2815     test -z "$ac_dir" && ac_dir=.
2816     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2817       lt_cv_path_LD="$ac_dir/$ac_prog"
2818       # Check to see if the program is GNU ld.  I'd rather use --version,
2819       # but apparently some GNU ld's only accept -v.
2820       # Break only if it was the GNU/non-GNU ld that we prefer.
2821       case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2822       *GNU* | *'with BFD'*)
2823         test "$with_gnu_ld" != no && break
2824         ;;
2825       *)
2826         test "$with_gnu_ld" != yes && break
2827         ;;
2828       esac
2829     fi
2830   done
2831   IFS="$lt_save_ifs"
2832 else
2833   lt_cv_path_LD="$LD" # Let the user override the test with a path.
2834 fi])
2835 LD="$lt_cv_path_LD"
2836 if test -n "$LD"; then
2837   AC_MSG_RESULT($LD)
2838 else
2839   AC_MSG_RESULT(no)
2840 fi
2841 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2842 AC_PROG_LD_GNU
2843 ])# AC_PROG_LD
2844
2845
2846 # AC_PROG_LD_GNU
2847 # --------------
2848 AC_DEFUN([AC_PROG_LD_GNU],
2849 [AC_REQUIRE([AC_PROG_EGREP])dnl
2850 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2851 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2852 case `"$LD" -v 2>&1 </dev/null` in
2853 *GNU* | *'with BFD'*)
2854   lt_cv_prog_gnu_ld=yes
2855   ;;
2856 *)
2857   lt_cv_prog_gnu_ld=no
2858   ;;
2859 esac])
2860 with_gnu_ld=$lt_cv_prog_gnu_ld
2861 ])# AC_PROG_LD_GNU
2862
2863
2864 # AC_PROG_LD_RELOAD_FLAG
2865 # ----------------------
2866 # find reload flag for linker
2867 #   -- PORTME Some linkers may need a different reload flag.
2868 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2869 [AC_CACHE_CHECK([for $LD option to reload object files],
2870   lt_cv_ld_reload_flag,
2871   [lt_cv_ld_reload_flag='-r'])
2872 reload_flag=$lt_cv_ld_reload_flag
2873 case $reload_flag in
2874 "" | " "*) ;;
2875 *) reload_flag=" $reload_flag" ;;
2876 esac
2877 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2878 ])# AC_PROG_LD_RELOAD_FLAG
2879
2880
2881 # AC_DEPLIBS_CHECK_METHOD
2882 # -----------------------
2883 # how to check for library dependencies
2884 #  -- PORTME fill in with the dynamic library characteristics
2885 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2886 [AC_CACHE_CHECK([how to recognise dependent libraries],
2887 lt_cv_deplibs_check_method,
2888 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2889 lt_cv_file_magic_test_file=
2890 lt_cv_deplibs_check_method='unknown'
2891 # Need to set the preceding variable on all platforms that support
2892 # interlibrary dependencies.
2893 # 'none' -- dependencies not supported.
2894 # `unknown' -- same as none, but documents that we really don't know.
2895 # 'pass_all' -- all dependencies passed with no checks.
2896 # 'test_compile' -- check by making test program.
2897 # 'file_magic [[regex]]' -- check by looking for files in library path
2898 # which responds to the $file_magic_cmd with a given extended regex.
2899 # If you have `file' or equivalent on your system and you're not sure
2900 # whether `pass_all' will *always* work, you probably want this one.
2901
2902 case $host_os in
2903 aix4* | aix5*)
2904   lt_cv_deplibs_check_method=pass_all
2905   ;;
2906
2907 beos*)
2908   lt_cv_deplibs_check_method=pass_all
2909   ;;
2910
2911 bsdi4*)
2912   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2913   lt_cv_file_magic_cmd='/usr/bin/file -L'
2914   lt_cv_file_magic_test_file=/shlib/libc.so
2915   ;;
2916
2917 cygwin* | mingw* | pw32*)
2918   # win32_libid is a shell function defined in ltmain.sh
2919   lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2920   lt_cv_file_magic_cmd='win32_libid'
2921   ;;
2922
2923 darwin* | rhapsody*)
2924   # this will be overwritten by pass_all, but leave it in just in case
2925   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2926   lt_cv_file_magic_cmd='/usr/bin/file -L'
2927   case "$host_os" in
2928   rhapsody* | darwin1.[[012]])
2929     lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2930     ;;
2931   *) # Darwin 1.3 on
2932     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2933     ;;
2934   esac
2935   lt_cv_deplibs_check_method=pass_all
2936   ;;
2937
2938 freebsd*)
2939   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2940     case $host_cpu in
2941     i*86 )
2942       # Not sure whether the presence of OpenBSD here was a mistake.
2943       # Let's accept both of them until this is cleared up.
2944       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2945       lt_cv_file_magic_cmd=/usr/bin/file
2946       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2947       ;;
2948     esac
2949   else
2950     lt_cv_deplibs_check_method=pass_all
2951   fi
2952   ;;
2953
2954 gnu*)
2955   lt_cv_deplibs_check_method=pass_all
2956   ;;
2957
2958 hpux10.20* | hpux11*)
2959   lt_cv_file_magic_cmd=/usr/bin/file
2960   case "$host_cpu" in
2961   ia64*)
2962     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2963     lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2964     ;;
2965   hppa*64*)
2966     [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]']
2967     lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2968     ;;
2969   *)
2970     lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2971     lt_cv_file_magic_test_file=/usr/lib/libc.sl
2972     ;;
2973   esac
2974   ;;
2975
2976 irix5* | irix6* | nonstopux*)
2977   case $host_os in
2978   irix5* | nonstopux*)
2979     # this will be overridden with pass_all, but let us keep it just in case
2980     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2981     ;;
2982   *)
2983     case $LD in
2984     *-32|*"-32 ") libmagic=32-bit;;
2985     *-n32|*"-n32 ") libmagic=N32;;
2986     *-64|*"-64 ") libmagic=64-bit;;
2987     *) libmagic=never-match;;
2988     esac
2989     # this will be overridden with pass_all, but let us keep it just in case
2990     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
2991     ;;
2992   esac
2993   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2994   lt_cv_deplibs_check_method=pass_all
2995   ;;
2996
2997 # This must be Linux ELF.
2998 linux*)
2999   case $host_cpu in
3000   alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
3001     lt_cv_deplibs_check_method=pass_all ;;
3002   *)
3003     # glibc up to 2.1.1 does not perform some relocations on ARM
3004     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3005   esac
3006   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3007   ;;
3008
3009 netbsd*)
3010   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3011     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
3012   else
3013     lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
3014   fi
3015   ;;
3016
3017 newos6*)
3018   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3019   lt_cv_file_magic_cmd=/usr/bin/file
3020   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3021   ;;
3022
3023 nto-qnx)
3024   lt_cv_deplibs_check_method=unknown
3025   ;;
3026
3027 openbsd*)
3028   lt_cv_file_magic_cmd=/usr/bin/file
3029   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3030   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3031     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3032   else
3033     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3034   fi
3035   ;;
3036
3037 osf3* | osf4* | osf5*)
3038   # this will be overridden with pass_all, but let us keep it just in case
3039   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3040   lt_cv_file_magic_test_file=/shlib/libc.so
3041   lt_cv_deplibs_check_method=pass_all
3042   ;;
3043
3044 sco3.2v5*)
3045   lt_cv_deplibs_check_method=pass_all
3046   ;;
3047
3048 solaris*)
3049   lt_cv_deplibs_check_method=pass_all
3050   lt_cv_file_magic_test_file=/lib/libc.so
3051   ;;
3052
3053 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3054   case $host_vendor in
3055   motorola)
3056     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]]'
3057     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3058     ;;
3059   ncr)
3060     lt_cv_deplibs_check_method=pass_all
3061     ;;
3062   sequent)
3063     lt_cv_file_magic_cmd='/bin/file'
3064     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3065     ;;
3066   sni)
3067     lt_cv_file_magic_cmd='/bin/file'
3068     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3069     lt_cv_file_magic_test_file=/lib/libc.so
3070     ;;
3071   siemens)
3072     lt_cv_deplibs_check_method=pass_all
3073     ;;
3074   esac
3075   ;;
3076
3077 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
3078   lt_cv_deplibs_check_method=pass_all
3079   ;;
3080 esac
3081 ])
3082 file_magic_cmd=$lt_cv_file_magic_cmd
3083 deplibs_check_method=$lt_cv_deplibs_check_method
3084 test -z "$deplibs_check_method" && deplibs_check_method=unknown
3085 ])# AC_DEPLIBS_CHECK_METHOD
3086
3087
3088 # AC_PROG_NM
3089 # ----------
3090 # find the path to a BSD-compatible name lister
3091 AC_DEFUN([AC_PROG_NM],
3092 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
3093 [if test -n "$NM"; then
3094   # Let the user override the test.
3095   lt_cv_path_NM="$NM"
3096 else
3097   lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3098   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3099     IFS="$lt_save_ifs"
3100     test -z "$ac_dir" && ac_dir=.
3101     tmp_nm="$ac_dir/${ac_tool_prefix}nm"
3102     if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
3103       # Check to see if the nm accepts a BSD-compat flag.
3104       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3105       #   nm: unknown option "B" ignored
3106       # Tru64's nm complains that /dev/null is an invalid object file
3107       case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
3108       */dev/null* | *'Invalid file or object type'*)
3109         lt_cv_path_NM="$tmp_nm -B"
3110         break
3111         ;;
3112       *)
3113         case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
3114         */dev/null*)
3115           lt_cv_path_NM="$tmp_nm -p"
3116           break
3117           ;;
3118         *)
3119           lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3120           continue # so that we can try to find one that supports BSD flags
3121           ;;
3122         esac
3123       esac
3124     fi
3125   done
3126   IFS="$lt_save_ifs"
3127   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3128 fi])
3129 NM="$lt_cv_path_NM"
3130 ])# AC_PROG_NM
3131
3132
3133 # AC_CHECK_LIBM
3134 # -------------
3135 # check for math library
3136 AC_DEFUN([AC_CHECK_LIBM],
3137 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3138 LIBM=
3139 case $host in
3140 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
3141   # These system don't have libm, or don't need it
3142   ;;
3143 *-ncr-sysv4.3*)
3144   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3145   AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
3146   ;;
3147 *)
3148   AC_CHECK_LIB(m, cos, LIBM="-lm")
3149   ;;
3150 esac
3151 ])# AC_CHECK_LIBM
3152
3153
3154 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
3155 # -----------------------------------
3156 # sets LIBLTDL to the link flags for the libltdl convenience library and
3157 # LTDLINCL to the include flags for the libltdl header and adds
3158 # --enable-ltdl-convenience to the configure arguments.  Note that LIBLTDL
3159 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
3160 # DIRECTORY is not provided, it is assumed to be `libltdl'.  LIBLTDL will
3161 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
3162 # '${top_srcdir}/' (note the single quotes!).  If your package is not
3163 # flat and you're not using automake, define top_builddir and
3164 # top_srcdir appropriately in the Makefiles.
3165 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3166 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3167   case $enable_ltdl_convenience in
3168   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3169   "") enable_ltdl_convenience=yes
3170       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3171   esac
3172   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3173   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3174   # For backwards non-gettext consistent compatibility...
3175   INCLTDL="$LTDLINCL"
3176 ])# AC_LIBLTDL_CONVENIENCE
3177
3178
3179 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
3180 # -----------------------------------
3181 # sets LIBLTDL to the link flags for the libltdl installable library and
3182 # LTDLINCL to the include flags for the libltdl header and adds
3183 # --enable-ltdl-install to the configure arguments.  Note that LIBLTDL
3184 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If
3185 # DIRECTORY is not provided and an installed libltdl is not found, it is
3186 # assumed to be `libltdl'.  LIBLTDL will be prefixed with '${top_builddir}/'
3187 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
3188 # quotes!).  If your package is not flat and you're not using automake,
3189 # define top_builddir and top_srcdir appropriately in the Makefiles.
3190 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3191 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3192 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3193   AC_CHECK_LIB(ltdl, lt_dlinit,
3194   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3195   [if test x"$enable_ltdl_install" = xno; then
3196      AC_MSG_WARN([libltdl not installed, but installation disabled])
3197    else
3198      enable_ltdl_install=yes
3199    fi
3200   ])
3201   if test x"$enable_ltdl_install" = x"yes"; then
3202     ac_configure_args="$ac_configure_args --enable-ltdl-install"
3203     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3204     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3205   else
3206     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3207     LIBLTDL="-lltdl"
3208     LTDLINCL=
3209   fi
3210   # For backwards non-gettext consistent compatibility...
3211   INCLTDL="$LTDLINCL"
3212 ])# AC_LIBLTDL_INSTALLABLE
3213
3214
3215 # AC_LIBTOOL_CXX
3216 # --------------
3217 # enable support for C++ libraries
3218 AC_DEFUN([AC_LIBTOOL_CXX],
3219 [AC_REQUIRE([_LT_AC_LANG_CXX])
3220 ])# AC_LIBTOOL_CXX
3221
3222
3223 # _LT_AC_LANG_CXX
3224 # ---------------
3225 AC_DEFUN([_LT_AC_LANG_CXX],
3226 [AC_REQUIRE([AC_PROG_CXX])
3227 AC_REQUIRE([AC_PROG_CXXCPP])
3228 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
3229 ])# _LT_AC_LANG_CXX
3230
3231
3232 # AC_LIBTOOL_F77
3233 # --------------
3234 # enable support for Fortran 77 libraries
3235 AC_DEFUN([AC_LIBTOOL_F77],
3236 [AC_REQUIRE([_LT_AC_LANG_F77])
3237 ])# AC_LIBTOOL_F77
3238
3239
3240 # _LT_AC_LANG_F77
3241 # ---------------
3242 AC_DEFUN([_LT_AC_LANG_F77],
3243 [AC_REQUIRE([AC_PROG_F77])
3244 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
3245 ])# _LT_AC_LANG_F77
3246
3247
3248 # AC_LIBTOOL_GCJ
3249 # --------------
3250 # enable support for GCJ libraries
3251 AC_DEFUN([AC_LIBTOOL_GCJ],
3252 [AC_REQUIRE([_LT_AC_LANG_GCJ])
3253 ])# AC_LIBTOOL_GCJ
3254
3255
3256 # _LT_AC_LANG_GCJ
3257 # ---------------
3258 AC_DEFUN([_LT_AC_LANG_GCJ],
3259 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
3260   [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
3261     [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
3262       [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
3263          [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
3264            [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
3265 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
3266 ])# _LT_AC_LANG_GCJ
3267
3268
3269 # AC_LIBTOOL_RC
3270 # --------------
3271 # enable support for Windows resource files
3272 AC_DEFUN([AC_LIBTOOL_RC],
3273 [AC_REQUIRE([LT_AC_PROG_RC])
3274 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
3275 ])# AC_LIBTOOL_RC
3276
3277
3278 # AC_LIBTOOL_LANG_C_CONFIG
3279 # ------------------------
3280 # Ensure that the configuration vars for the C compiler are
3281 # suitably defined.  Those variables are subsequently used by
3282 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3283 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
3284 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
3285 [lt_save_CC="$CC"
3286 AC_LANG_PUSH(C)
3287
3288 # Source file extension for C test sources.
3289 ac_ext=c
3290
3291 # Object file extension for compiled C test sources.
3292 objext=o
3293 _LT_AC_TAGVAR(objext, $1)=$objext
3294
3295 # Code to be used in simple compile tests
3296 lt_simple_compile_test_code="int some_variable = 0;\n"
3297
3298 # Code to be used in simple link tests
3299 lt_simple_link_test_code='int main(){return(0);}\n'
3300
3301 _LT_AC_SYS_COMPILER
3302
3303 #
3304 # Check for any special shared library compilation flags.
3305 #
3306 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
3307 if test "$GCC" = no; then
3308   case $host_os in
3309   sco3.2v5*)
3310     _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
3311     ;;
3312   esac
3313 fi
3314 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
3315   AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
3316   if echo "$old_CC $old_CFLAGS " | grep "[[     ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[      ]]" >/dev/null; then :
3317   else
3318     AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
3319     _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
3320   fi
3321 fi
3322
3323
3324 #
3325 # Check to make sure the static flag actually works.
3326 #
3327 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
3328   _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
3329   $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
3330   [],
3331   [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
3332
3333
3334 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3335 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3336 AC_LIBTOOL_PROG_CC_C_O($1)
3337 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3338 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3339 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3340 AC_LIBTOOL_SYS_LIB_STRIP
3341 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3342 AC_LIBTOOL_DLOPEN_SELF($1)
3343
3344 # Report which librarie types wil actually be built
3345 AC_MSG_CHECKING([if libtool supports shared libraries])
3346 AC_MSG_RESULT([$can_build_shared])
3347
3348 AC_MSG_CHECKING([whether to build shared libraries])
3349 test "$can_build_shared" = "no" && enable_shared=no
3350
3351 # On AIX, shared libraries and static libraries use the same namespace, and
3352 # are all built from PIC.
3353 case "$host_os" in
3354 aix3*)
3355   test "$enable_shared" = yes && enable_static=no
3356   if test -n "$RANLIB"; then
3357     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3358     postinstall_cmds='$RANLIB $lib'
3359   fi
3360   ;;
3361
3362 aix4*)
3363   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3364     test "$enable_shared" = yes && enable_static=no
3365   fi
3366   ;;
3367   darwin* | rhapsody*)
3368   if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
3369     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3370     case "$host_os" in
3371     rhapsody* | darwin1.[[012]])
3372       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3373       ;;
3374     *) # Darwin 1.3 on
3375       test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3376       ;;
3377     esac
3378     # FIXME: Relying on posixy $() will cause problems for
3379     #        cross-compilation, but unfortunately the echo tests do not
3380     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
3381     #          `"' quotes if we put them in here... so don't!
3382                 output_verbose_link_cmd='echo'
3383     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
3384     _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
3385     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3386                   _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}'
3387                   _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3388     _LT_AC_TAGVAR(hardcode_direct, $1)=no
3389     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3390     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3391     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3392     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3393     fi
3394     ;;  
3395 esac
3396 AC_MSG_RESULT([$enable_shared])
3397
3398 AC_MSG_CHECKING([whether to build static libraries])
3399 # Make sure either enable_shared or enable_static is yes.
3400 test "$enable_shared" = yes || enable_static=yes
3401 AC_MSG_RESULT([$enable_static])
3402
3403 AC_LIBTOOL_CONFIG($1)
3404
3405 AC_LANG_POP
3406 CC="$lt_save_CC"
3407 ])# AC_LIBTOOL_LANG_C_CONFIG
3408
3409
3410 # AC_LIBTOOL_LANG_CXX_CONFIG
3411 # --------------------------
3412 # Ensure that the configuration vars for the C compiler are
3413 # suitably defined.  Those variables are subsequently used by
3414 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3415 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
3416 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
3417 [AC_LANG_PUSH(C++)
3418 AC_REQUIRE([AC_PROG_CXX])
3419 AC_REQUIRE([AC_PROG_CXXCPP])
3420
3421 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3422 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3423 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3424 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3425 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3426 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3427 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3428 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3429 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3430 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3431 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3432 _LT_AC_TAGVAR(module_cmds, $1)=
3433 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3434 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3435 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3436 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3437 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3438 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3439
3440 # Dependencies to place before and after the object being linked:
3441 _LT_AC_TAGVAR(predep_objects, $1)=
3442 _LT_AC_TAGVAR(postdep_objects, $1)=
3443 _LT_AC_TAGVAR(predeps, $1)=
3444 _LT_AC_TAGVAR(postdeps, $1)=
3445 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
3446
3447 # Source file extension for C++ test sources.
3448 ac_ext=cc
3449
3450 # Object file extension for compiled C++ test sources.
3451 objext=o
3452 _LT_AC_TAGVAR(objext, $1)=$objext
3453
3454 # Code to be used in simple compile tests
3455 lt_simple_compile_test_code="int some_variable = 0;\n"
3456
3457 # Code to be used in simple link tests
3458 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
3459
3460 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3461 _LT_AC_SYS_COMPILER
3462
3463 # Allow CC to be a program name with arguments.
3464 lt_save_CC=$CC
3465 lt_save_LD=$LD
3466 lt_save_GCC=$GCC
3467 GCC=$GXX
3468 lt_save_with_gnu_ld=$with_gnu_ld
3469 lt_save_path_LD=$lt_cv_path_LD
3470 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
3471   lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
3472 else
3473   unset lt_cv_prog_gnu_ld
3474 fi
3475 if test -n "${lt_cv_path_LDCXX+set}"; then
3476   lt_cv_path_LD=$lt_cv_path_LDCXX
3477 else
3478   unset lt_cv_path_LD
3479 fi
3480 test -z "${LDCXX+set}" || LD=$LDCXX
3481 CC=${CXX-"c++"}
3482 compiler=$CC
3483 _LT_AC_TAGVAR(compiler, $1)=$CC
3484 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3485
3486 # We don't want -fno-exception wen compiling C++ code, so set the
3487 # no_builtin_flag separately
3488 if test "$GXX" = yes; then
3489   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
3490 else
3491   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
3492 fi
3493
3494 if test "$GXX" = yes; then
3495   # Set up default GNU C++ configuration
3496
3497   AC_PROG_LD
3498
3499   # Check if GNU C++ uses GNU ld as the underlying linker, since the
3500   # archiving commands below assume that GNU ld is being used.
3501   if test "$with_gnu_ld" = yes; then
3502     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3503     _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'
3504
3505     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3506     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3507
3508     # If archive_cmds runs LD, not CC, wlarc should be empty
3509     # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
3510     #     investigate it a little bit more. (MM)
3511     wlarc='${wl}'
3512
3513     # ancient GNU ld didn't support --whole-archive et. al.
3514     if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
3515         grep 'no-whole-archive' > /dev/null; then
3516       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3517     else
3518       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3519     fi
3520   else
3521     with_gnu_ld=no
3522     wlarc=
3523
3524     # A generic and very simple default shared library creation
3525     # command for GNU C++ for the case where it uses the native
3526     # linker, instead of GNU ld.  If possible, this setting should
3527     # overridden to take advantage of the native linker features on
3528     # the platform it is being used on.
3529     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3530   fi
3531
3532   # Commands to make compiler produce verbose output that lists
3533   # what "hidden" libraries, object files and flags are used when
3534   # linking a shared library.
3535   output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3536
3537 else
3538   GXX=no
3539   with_gnu_ld=no
3540   wlarc=
3541 fi
3542
3543 # PORTME: fill in a description of your system's C++ link characteristics
3544 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
3545 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3546 case $host_os in
3547   aix3*)
3548     # FIXME: insert proper C++ library support
3549     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3550     ;;
3551   aix4* | aix5*)
3552     if test "$host_cpu" = ia64; then
3553       # On IA64, the linker does run time linking by default, so we don't
3554       # have to do anything special.
3555       aix_use_runtimelinking=no
3556       exp_sym_flag='-Bexport'
3557       no_entry_flag=""
3558     else
3559       aix_use_runtimelinking=no
3560
3561       # Test if we are trying to use run time linking or normal
3562       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
3563       # need to do runtime linking.
3564       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
3565         for ld_flag in $LDFLAGS; do
3566           case $ld_flag in
3567           *-brtl*)
3568             aix_use_runtimelinking=yes
3569             break
3570             ;;
3571           esac
3572         done
3573       esac
3574
3575       exp_sym_flag='-bexport'
3576       no_entry_flag='-bnoentry'
3577     fi
3578
3579     # When large executables or shared objects are built, AIX ld can
3580     # have problems creating the table of contents.  If linking a library
3581     # or program results in "error TOC overflow" add -mminimal-toc to
3582     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
3583     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
3584
3585     _LT_AC_TAGVAR(archive_cmds, $1)=''
3586     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3587     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3588     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3589
3590     if test "$GXX" = yes; then
3591       case $host_os in aix4.[012]|aix4.[012].*)
3592       # We only want to do this on AIX 4.2 and lower, the check
3593       # below for broken collect2 doesn't work under 4.3+
3594         collect2name=`${CC} -print-prog-name=collect2`
3595         if test -f "$collect2name" && \
3596            strings "$collect2name" | grep resolve_lib_name >/dev/null
3597         then
3598           # We have reworked collect2
3599           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3600         else
3601           # We have old collect2
3602           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3603           # It fails to find uninstalled libraries when the uninstalled
3604           # path is not listed in the libpath.  Setting hardcode_minus_L
3605           # to unsupported forces relinking
3606           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3607           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3608           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3609         fi
3610       esac
3611       shared_flag='-shared'
3612     else
3613       # not using gcc
3614       if test "$host_cpu" = ia64; then
3615         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3616         # chokes on -Wl,-G. The following line is correct:
3617         shared_flag='-G'
3618       else
3619         if test "$aix_use_runtimelinking" = yes; then
3620           shared_flag='${wl}-G'
3621         else
3622           shared_flag='${wl}-bM:SRE'
3623         fi
3624       fi
3625     fi
3626
3627     # It seems that -bexpall does not export symbols beginning with
3628     # underscore (_), so it is better to generate a list of symbols to export.
3629     _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3630     if test "$aix_use_runtimelinking" = yes; then
3631       # Warning - without using the other runtime loading flags (-brtl),
3632       # -berok will link without error, but may produce a broken library.
3633       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3634       # Determine the default libpath from the value encoded in an empty executable.
3635       _LT_AC_SYS_LIBPATH_AIX
3636       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3637
3638       _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"
3639      else
3640       if test "$host_cpu" = ia64; then
3641         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3642         _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3643         _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"
3644       else
3645         # Determine the default libpath from the value encoded in an empty executable.
3646         _LT_AC_SYS_LIBPATH_AIX
3647         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3648         # Warning - without using the other run time loading flags,
3649         # -berok will link without error, but may produce a broken library.
3650         _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3651         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3652         # -bexpall does not export symbols beginning with underscore (_)
3653         _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3654         # Exported symbols can be pulled into shared objects from archives
3655         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3656         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3657         # This is similar to how AIX traditionally builds it's shared libraries.
3658         _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'
3659       fi
3660     fi
3661     ;;
3662   chorus*)
3663     case $cc_basename in
3664       *)
3665         # FIXME: insert proper C++ library support
3666         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3667         ;;
3668     esac
3669     ;;
3670
3671   cygwin* | mingw* | pw32*)
3672     # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3673     # as there is no search path for DLLs.
3674     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3675     _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3676     _LT_AC_TAGVAR(always_export_symbols, $1)=no
3677     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3678
3679     if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3680       _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'
3681       # If the export-symbols file already is a .def file (1st line
3682       # is EXPORTS), use it as is; otherwise, prepend...
3683       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3684         cp $export_symbols $output_objdir/$soname.def;
3685       else
3686         echo EXPORTS > $output_objdir/$soname.def;
3687         cat $export_symbols >> $output_objdir/$soname.def;
3688       fi~
3689       $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'
3690     else
3691       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3692     fi
3693   ;;
3694
3695   darwin* | rhapsody*)
3696    if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
3697     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3698     case "$host_os" in
3699     rhapsody* | darwin1.[[012]])
3700       _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3701       ;;
3702     *) # Darwin 1.3 on
3703       test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3704       ;;
3705     esac
3706         lt_int_apple_cc_single_mod=no
3707         output_verbose_link_cmd='echo'
3708         if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3709           lt_int_apple_cc_single_mod=yes
3710         fi
3711         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3712           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3713         else
3714         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
3715       fi
3716       _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
3717
3718     # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3719       if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3720         _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}'
3721       else
3722         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
3723       fi
3724         _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3725     _LT_AC_TAGVAR(hardcode_direct, $1)=no
3726     _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3727     _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3728     _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3729     _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3730    fi 
3731     ;;
3732
3733   dgux*)
3734     case $cc_basename in
3735       ec++)
3736         # FIXME: insert proper C++ library support
3737         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3738         ;;
3739       ghcx)
3740         # Green Hills C++ Compiler
3741         # FIXME: insert proper C++ library support
3742         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3743         ;;
3744       *)
3745         # FIXME: insert proper C++ library support
3746         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3747         ;;
3748     esac
3749     ;;
3750   freebsd[12]*)
3751     # C++ shared libraries reported to be fairly broken before switch to ELF
3752     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3753     ;;
3754   freebsd-elf*)
3755     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3756     ;;
3757   freebsd*)
3758     # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3759     # conventions
3760     _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3761     ;;
3762   gnu*)
3763     ;;
3764   hpux9*)
3765     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3766     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3767     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3768     _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3769     _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3770                                 # but as the default
3771                                 # location of the library.
3772
3773     case $cc_basename in
3774     CC)
3775       # FIXME: insert proper C++ library support
3776       _LT_AC_TAGVAR(ld_shlibs, $1)=no
3777       ;;
3778     aCC)
3779       _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'
3780       # Commands to make compiler produce verbose output that lists
3781       # what "hidden" libraries, object files and flags are used when
3782       # linking a shared library.
3783       #
3784       # There doesn't appear to be a way to prevent this compiler from
3785       # explicitly linking system object files so we need to strip them
3786       # from the output so that they don't get included in the library
3787       # dependencies.
3788       output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3789       ;;
3790     *)
3791       if test "$GXX" = yes; then
3792         _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'
3793       else
3794         # FIXME: insert proper C++ library support
3795         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3796       fi
3797       ;;
3798     esac
3799     ;;
3800   hpux10*|hpux11*)
3801     if test $with_gnu_ld = no; then
3802       case "$host_cpu" in
3803       hppa*64*)
3804         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3805         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3806         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3807         ;;
3808       ia64*)
3809         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3810         ;;
3811       *)
3812         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3813         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3814         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3815         ;;
3816       esac
3817     fi
3818     case "$host_cpu" in
3819     hppa*64*)
3820       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3821       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3822       ;;
3823     ia64*)
3824       _LT_AC_TAGVAR(hardcode_direct, $1)=no
3825       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3826       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3827                                               # but as the default
3828                                               # location of the library.
3829       ;;
3830     *)
3831       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3832       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3833                                               # but as the default
3834                                               # location of the library.
3835       ;;
3836     esac
3837
3838     case $cc_basename in
3839       CC)
3840         # FIXME: insert proper C++ library support
3841         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3842         ;;
3843       aCC)
3844         case "$host_cpu" in
3845         hppa*64*|ia64*)
3846           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3847           ;;
3848         *)
3849           _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'
3850           ;;
3851         esac
3852         # Commands to make compiler produce verbose output that lists
3853         # what "hidden" libraries, object files and flags are used when
3854         # linking a shared library.
3855         #
3856         # There doesn't appear to be a way to prevent this compiler from
3857         # explicitly linking system object files so we need to strip them
3858         # from the output so that they don't get included in the library
3859         # dependencies.
3860         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'
3861         ;;
3862       *)
3863         if test "$GXX" = yes; then
3864           if test $with_gnu_ld = no; then
3865             case "$host_cpu" in
3866             ia64*|hppa*64*)
3867               _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3868               ;;
3869             *)
3870               _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'
3871               ;;
3872             esac
3873           fi
3874         else
3875           # FIXME: insert proper C++ library support
3876           _LT_AC_TAGVAR(ld_shlibs, $1)=no
3877         fi
3878         ;;
3879     esac
3880     ;;
3881   irix5* | irix6*)
3882     case $cc_basename in
3883       CC)
3884         # SGI C++
3885         _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 ${objdir}/so_locations -o $lib'
3886
3887         # Archives containing C++ object files must be created using
3888         # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3889         # necessary to make sure instantiated templates are included
3890         # in the archive.
3891         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3892         ;;
3893       *)
3894         if test "$GXX" = yes; then
3895           if test "$with_gnu_ld" = no; then
3896             _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}${objdir}/so_locations -o $lib'
3897           else
3898             _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'
3899           fi
3900         fi
3901         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3902         ;;
3903     esac
3904     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3905     _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3906     ;;
3907   linux*)
3908     case $cc_basename in
3909       KCC)
3910         # Kuck and Associates, Inc. (KAI) C++ Compiler
3911
3912         # KCC will only create a shared library if the output file
3913         # ends with ".so" (or ".sl" for HP-UX), so rename the library
3914         # to its proper name (with version) after linking.
3915         _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'
3916         _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'
3917         # Commands to make compiler produce verbose output that lists
3918         # what "hidden" libraries, object files and flags are used when
3919         # linking a shared library.
3920         #
3921         # There doesn't appear to be a way to prevent this compiler from
3922         # explicitly linking system object files so we need to strip them
3923         # from the output so that they don't get included in the library
3924         # dependencies.
3925         output_verbose_link_cmd='templist=`$CC $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'
3926
3927         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3928         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3929
3930         # Archives containing C++ object files must be created using
3931         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3932         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3933         ;;
3934       icpc)
3935         # Intel C++
3936         with_gnu_ld=yes
3937         _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3938         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3939         _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'
3940         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3941         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3942         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3943         ;;
3944       cxx)
3945         # Compaq C++
3946         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3947         _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'
3948
3949         runpath_var=LD_RUN_PATH
3950         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3951         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3952
3953         # Commands to make compiler produce verbose output that lists
3954         # what "hidden" libraries, object files and flags are used when
3955         # linking a shared library.
3956         #
3957         # There doesn't appear to be a way to prevent this compiler from
3958         # explicitly linking system object files so we need to strip them
3959         # from the output so that they don't get included in the library
3960         # dependencies.
3961         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'
3962         ;;
3963     esac
3964     ;;
3965   lynxos*)
3966     # FIXME: insert proper C++ library support
3967     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3968     ;;
3969   m88k*)
3970     # FIXME: insert proper C++ library support
3971     _LT_AC_TAGVAR(ld_shlibs, $1)=no
3972     ;;
3973   mvs*)
3974     case $cc_basename in
3975       cxx)
3976         # FIXME: insert proper C++ library support
3977         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3978         ;;
3979       *)
3980         # FIXME: insert proper C++ library support
3981         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3982         ;;
3983     esac
3984     ;;
3985   netbsd*)
3986     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3987       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3988       wlarc=
3989       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3990       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3991       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3992     fi
3993     # Workaround some broken pre-1.5 toolchains
3994     output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3995     ;;
3996   osf3*)
3997     case $cc_basename in
3998       KCC)
3999         # Kuck and Associates, Inc. (KAI) C++ Compiler
4000
4001         # KCC will only create a shared library if the output file
4002         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4003         # to its proper name (with version) after linking.
4004         _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'
4005
4006         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4007         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4008
4009         # Archives containing C++ object files must be created using
4010         # "CC -Bstatic", where "CC" is the KAI C++ compiler.
4011         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
4012
4013         ;;
4014       RCC)
4015         # Rational C++ 2.4.1
4016         # FIXME: insert proper C++ library support
4017         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4018         ;;
4019       cxx)
4020         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4021         _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 ${objdir}/so_locations -o $lib'
4022
4023         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4024         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4025
4026         # Commands to make compiler produce verbose output that lists
4027         # what "hidden" libraries, object files and flags are used when
4028         # linking a shared library.
4029         #
4030         # There doesn't appear to be a way to prevent this compiler from
4031         # explicitly linking system object files so we need to strip them
4032         # from the output so that they don't get included in the library
4033         # dependencies.
4034         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'
4035         ;;
4036       *)
4037         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4038           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4039           _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}${objdir}/so_locations -o $lib'
4040
4041           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4042           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4043
4044           # Commands to make compiler produce verbose output that lists
4045           # what "hidden" libraries, object files and flags are used when
4046           # linking a shared library.
4047           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4048
4049         else
4050           # FIXME: insert proper C++ library support
4051           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4052         fi
4053         ;;
4054     esac
4055     ;;
4056   osf4* | osf5*)
4057     case $cc_basename in
4058       KCC)
4059         # Kuck and Associates, Inc. (KAI) C++ Compiler
4060
4061         # KCC will only create a shared library if the output file
4062         # ends with ".so" (or ".sl" for HP-UX), so rename the library
4063         # to its proper name (with version) after linking.
4064         _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'
4065
4066         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
4067         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4068
4069         # Archives containing C++ object files must be created using
4070         # the KAI C++ compiler.
4071         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
4072         ;;
4073       RCC)
4074         # Rational C++ 2.4.1
4075         # FIXME: insert proper C++ library support
4076         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4077         ;;
4078       cxx)
4079         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
4080         _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 ${objdir}/so_locations -o $lib'
4081         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
4082           echo "-hidden">> $lib.exp~
4083           $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 $objdir/so_locations -o $lib~
4084           $rm $lib.exp'
4085
4086         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
4087         _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4088
4089         # Commands to make compiler produce verbose output that lists
4090         # what "hidden" libraries, object files and flags are used when
4091         # linking a shared library.
4092         #
4093         # There doesn't appear to be a way to prevent this compiler from
4094         # explicitly linking system object files so we need to strip them
4095         # from the output so that they don't get included in the library
4096         # dependencies.
4097         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'
4098         ;;
4099       *)
4100         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4101           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
4102          _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}${objdir}/so_locations -o $lib'
4103
4104           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
4105           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
4106
4107           # Commands to make compiler produce verbose output that lists
4108           # what "hidden" libraries, object files and flags are used when
4109           # linking a shared library.
4110           output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
4111
4112         else
4113           # FIXME: insert proper C++ library support
4114           _LT_AC_TAGVAR(ld_shlibs, $1)=no
4115         fi
4116         ;;
4117     esac
4118     ;;
4119   psos*)
4120     # FIXME: insert proper C++ library support
4121     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4122     ;;
4123   sco*)
4124     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4125     case $cc_basename in
4126       CC)
4127         # FIXME: insert proper C++ library support
4128         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4129         ;;
4130       *)
4131         # FIXME: insert proper C++ library support
4132         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4133         ;;
4134     esac
4135     ;;
4136   sunos4*)
4137     case $cc_basename in
4138       CC)
4139         # Sun C++ 4.x
4140         # FIXME: insert proper C++ library support
4141         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4142         ;;
4143       lcc)
4144         # Lucid
4145         # FIXME: insert proper C++ library support
4146         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4147         ;;
4148       *)
4149         # FIXME: insert proper C++ library support
4150         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4151         ;;
4152     esac
4153     ;;
4154   solaris*)
4155     case $cc_basename in
4156       CC)
4157         # Sun C++ 4.2, 5.x and Centerline C++
4158         _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
4159         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
4160         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4161         $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4162
4163         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
4164         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
4165         case $host_os in
4166           solaris2.[0-5] | solaris2.[0-5].*) ;;
4167           *)
4168             # The C++ compiler is used as linker so we must use $wl
4169             # flag to pass the commands to the underlying system
4170             # linker.
4171             # Supported since Solaris 2.6 (maybe 2.5.1?)
4172             _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
4173             ;;
4174         esac
4175         _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
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 -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
4186
4187         # Archives containing C++ object files must be created using
4188         # "CC -xar", where "CC" is the Sun C++ compiler.  This is
4189         # necessary to make sure instantiated templates are included
4190         # in the archive.
4191         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
4192         ;;
4193       gcx)
4194         # Green Hills C++ Compiler
4195         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4196
4197         # The C++ compiler must be used to create the archive.
4198         _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
4199         ;;
4200       *)
4201         # GNU C++ compiler with Solaris linker
4202         if test "$GXX" = yes && test "$with_gnu_ld" = no; then
4203           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
4204           if $CC --version | grep -v '^2\.7' > /dev/null; then
4205             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4206             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4207                 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4208
4209             # Commands to make compiler produce verbose output that lists
4210             # what "hidden" libraries, object files and flags are used when
4211             # linking a shared library.
4212             output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4213           else
4214             # g++ 2.7 appears to require `-G' NOT `-shared' on this
4215             # platform.
4216             _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
4217             _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
4218                 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
4219
4220             # Commands to make compiler produce verbose output that lists
4221             # what "hidden" libraries, object files and flags are used when
4222             # linking a shared library.
4223             output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
4224           fi
4225
4226           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
4227         fi
4228         ;;
4229     esac
4230     ;;
4231   sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
4232     _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4233     ;;
4234   tandem*)
4235     case $cc_basename in
4236       NCC)
4237         # NonStop-UX NCC 3.20
4238         # FIXME: insert proper C++ library support
4239         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4240         ;;
4241       *)
4242         # FIXME: insert proper C++ library support
4243         _LT_AC_TAGVAR(ld_shlibs, $1)=no
4244         ;;
4245     esac
4246     ;;
4247   vxworks*)
4248     # FIXME: insert proper C++ library support
4249     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4250     ;;
4251   *)
4252     # FIXME: insert proper C++ library support
4253     _LT_AC_TAGVAR(ld_shlibs, $1)=no
4254     ;;
4255 esac
4256 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
4257 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4258
4259 _LT_AC_TAGVAR(GCC, $1)="$GXX"
4260 _LT_AC_TAGVAR(LD, $1)="$LD"
4261
4262 AC_LIBTOOL_POSTDEP_PREDEP($1)
4263 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4264 AC_LIBTOOL_PROG_CC_C_O($1)
4265 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4266 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4267 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4268 AC_LIBTOOL_SYS_LIB_STRIP
4269 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4270 AC_LIBTOOL_DLOPEN_SELF($1)
4271
4272 AC_LIBTOOL_CONFIG($1)
4273
4274 AC_LANG_POP
4275 CC=$lt_save_CC
4276 LDCXX=$LD
4277 LD=$lt_save_LD
4278 GCC=$lt_save_GCC
4279 with_gnu_ldcxx=$with_gnu_ld
4280 with_gnu_ld=$lt_save_with_gnu_ld
4281 lt_cv_path_LDCXX=$lt_cv_path_LD
4282 lt_cv_path_LD=$lt_save_path_LD
4283 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
4284 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
4285 ])# AC_LIBTOOL_LANG_CXX_CONFIG
4286
4287 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
4288 # ------------------------
4289 # Figure out "hidden" library dependencies from verbose
4290 # compiler output when linking a shared library.
4291 # Parse the compiler output and extract the necessary
4292 # objects, libraries and library flags.
4293 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
4294 dnl we can't use the lt_simple_compile_test_code here,
4295 dnl because it contains code intended for an executable,
4296 dnl not a library.  It's possible we should let each
4297 dnl tag define a new lt_????_link_test_code variable,
4298 dnl but it's only used here...
4299 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
4300 int a;
4301 void foo (void) { a = 0; }
4302 EOF
4303 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
4304 class Foo
4305 {
4306 public:
4307   Foo (void) { a = 0; }
4308 private:
4309   int a;
4310 };
4311 EOF
4312 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
4313       subroutine foo
4314       implicit none
4315       integer*4 a
4316       a=0
4317       return
4318       end
4319 EOF
4320 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
4321 public class foo {
4322   private int a;
4323   public void bar (void) {
4324     a = 0;
4325   }
4326 };
4327 EOF
4328 ])
4329 dnl Parse the compiler output and extract the necessary
4330 dnl objects, libraries and library flags.
4331 if AC_TRY_EVAL(ac_compile); then
4332   # Parse the compiler output and extract the necessary
4333   # objects, libraries and library flags.
4334
4335   # Sentinel used to keep track of whether or not we are before
4336   # the conftest object file.
4337   pre_test_object_deps_done=no
4338
4339   # The `*' in the case matches for architectures that use `case' in
4340   # $output_verbose_cmd can trigger glob expansion during the loop
4341   # eval without this substitution.
4342   output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
4343
4344   for p in `eval $output_verbose_link_cmd`; do
4345     case $p in
4346
4347     -L* | -R* | -l*)
4348        # Some compilers place space between "-{L,R}" and the path.
4349        # Remove the space.
4350        if test $p = "-L" \
4351           || test $p = "-R"; then
4352          prev=$p
4353          continue
4354        else
4355          prev=
4356        fi
4357
4358        if test "$pre_test_object_deps_done" = no; then
4359          case $p in
4360          -L* | -R*)
4361            # Internal compiler library paths should come after those
4362            # provided the user.  The postdeps already come after the
4363            # user supplied libs so there is no need to process them.
4364            if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
4365              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
4366            else
4367              _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
4368            fi
4369            ;;
4370          # The "-l" case would never come before the object being
4371          # linked, so don't bother handling this case.
4372          esac
4373        else
4374          if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
4375            _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
4376          else
4377            _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
4378          fi
4379        fi
4380        ;;
4381
4382     *.$objext)
4383        # This assumes that the test object file only shows up
4384        # once in the compiler output.
4385        if test "$p" = "conftest.$objext"; then
4386          pre_test_object_deps_done=yes
4387          continue
4388        fi
4389
4390        if test "$pre_test_object_deps_done" = no; then
4391          if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
4392            _LT_AC_TAGVAR(predep_objects, $1)="$p"
4393          else
4394            _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
4395          fi
4396        else
4397          if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
4398            _LT_AC_TAGVAR(postdep_objects, $1)="$p"
4399          else
4400            _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
4401          fi
4402        fi
4403        ;;
4404
4405     *) ;; # Ignore the rest.
4406
4407     esac
4408   done
4409
4410   # Clean up.
4411   rm -f a.out a.exe
4412 else
4413   echo "libtool.m4: error: problem compiling $1 test program"
4414 fi
4415
4416 $rm -f confest.$objext
4417
4418 case " $_LT_AC_TAGVAR(postdeps, $1) " in
4419 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4420 esac
4421 ])# AC_LIBTOOL_POSTDEP_PREDEP
4422
4423 # AC_LIBTOOL_LANG_F77_CONFIG
4424 # ------------------------
4425 # Ensure that the configuration vars for the C compiler are
4426 # suitably defined.  Those variables are subsequently used by
4427 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4428 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4429 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4430 [AC_REQUIRE([AC_PROG_F77])
4431 AC_LANG_PUSH(Fortran 77)
4432
4433 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4434 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
4435 _LT_AC_TAGVAR(always_export_symbols, $1)=no
4436 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4437 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4438 _LT_AC_TAGVAR(hardcode_direct, $1)=no
4439 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4440 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4441 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4442 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4443 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
4444 _LT_AC_TAGVAR(module_cmds, $1)=
4445 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
4446 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4447 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4448 _LT_AC_TAGVAR(no_undefined_flag, $1)=
4449 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4450 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4451
4452 # Source file extension for f77 test sources.
4453 ac_ext=f
4454
4455 # Object file extension for compiled f77 test sources.
4456 objext=o
4457 _LT_AC_TAGVAR(objext, $1)=$objext
4458
4459 # Code to be used in simple compile tests
4460 lt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
4461
4462 # Code to be used in simple link tests
4463 lt_simple_link_test_code="      program t\n      end\n"
4464
4465 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4466 _LT_AC_SYS_COMPILER
4467
4468 # Allow CC to be a program name with arguments.
4469 lt_save_CC="$CC"
4470 CC=${F77-"f77"}
4471 compiler=$CC
4472 _LT_AC_TAGVAR(compiler, $1)=$CC
4473 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
4474
4475 AC_MSG_CHECKING([if libtool supports shared libraries])
4476 AC_MSG_RESULT([$can_build_shared])
4477
4478 AC_MSG_CHECKING([whether to build shared libraries])
4479 test "$can_build_shared" = "no" && enable_shared=no
4480
4481 # On AIX, shared libraries and static libraries use the same namespace, and
4482 # are all built from PIC.
4483 case "$host_os" in
4484 aix3*)
4485   test "$enable_shared" = yes && enable_static=no
4486   if test -n "$RANLIB"; then
4487     archive_cmds="$archive_cmds~\$RANLIB \$lib"
4488     postinstall_cmds='$RANLIB $lib'
4489   fi
4490   ;;
4491 aix4*)
4492   test "$enable_shared" = yes && enable_static=no
4493   ;;
4494 esac
4495 AC_MSG_RESULT([$enable_shared])
4496
4497 AC_MSG_CHECKING([whether to build static libraries])
4498 # Make sure either enable_shared or enable_static is yes.
4499 test "$enable_shared" = yes || enable_static=yes
4500 AC_MSG_RESULT([$enable_static])
4501
4502 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
4503
4504 _LT_AC_TAGVAR(GCC, $1)="$G77"
4505 _LT_AC_TAGVAR(LD, $1)="$LD"
4506
4507 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4508 AC_LIBTOOL_PROG_CC_C_O($1)
4509 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4510 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4511 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4512 AC_LIBTOOL_SYS_LIB_STRIP
4513 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4514
4515 AC_LIBTOOL_CONFIG($1)
4516
4517 AC_LANG_POP
4518 CC="$lt_save_CC"
4519 ])# AC_LIBTOOL_LANG_F77_CONFIG
4520
4521
4522 # AC_LIBTOOL_LANG_GCJ_CONFIG
4523 # --------------------------
4524 # Ensure that the configuration vars for the C compiler are
4525 # suitably defined.  Those variables are subsequently used by
4526 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4527 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4528 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4529 [AC_LANG_SAVE
4530
4531 # Source file extension for Java test sources.
4532 ac_ext=java
4533
4534 # Object file extension for compiled Java test sources.
4535 objext=o
4536 _LT_AC_TAGVAR(objext, $1)=$objext
4537
4538 # Code to be used in simple compile tests
4539 lt_simple_compile_test_code="class foo {}\n"
4540
4541 # Code to be used in simple link tests
4542 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
4543
4544 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4545 _LT_AC_SYS_COMPILER
4546
4547 # Allow CC to be a program name with arguments.
4548 lt_save_CC="$CC"
4549 CC=${GCJ-"gcj"}
4550 compiler=$CC
4551 _LT_AC_TAGVAR(compiler, $1)=$CC
4552
4553 # GCJ did not exist at the time GCC didn't implicitly link libc in.
4554 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4555
4556 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4557 AC_LIBTOOL_PROG_COMPILER_PIC($1)
4558 AC_LIBTOOL_PROG_CC_C_O($1)
4559 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4560 AC_LIBTOOL_PROG_LD_SHLIBS($1)
4561 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4562 AC_LIBTOOL_SYS_LIB_STRIP
4563 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4564 AC_LIBTOOL_DLOPEN_SELF($1)
4565
4566 AC_LIBTOOL_CONFIG($1)
4567
4568 AC_LANG_RESTORE
4569 CC="$lt_save_CC"
4570 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
4571
4572
4573 # AC_LIBTOOL_LANG_RC_CONFIG
4574 # --------------------------
4575 # Ensure that the configuration vars for the Windows resource compiler are
4576 # suitably defined.  Those variables are subsequently used by
4577 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4578 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4579 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4580 [AC_LANG_SAVE
4581
4582 # Source file extension for RC test sources.
4583 ac_ext=rc
4584
4585 # Object file extension for compiled RC test sources.
4586 objext=o
4587 _LT_AC_TAGVAR(objext, $1)=$objext
4588
4589 # Code to be used in simple compile tests
4590 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4591
4592 # Code to be used in simple link tests
4593 lt_simple_link_test_code="$lt_simple_compile_test_code"
4594
4595 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
4596 _LT_AC_SYS_COMPILER
4597
4598 # Allow CC to be a program name with arguments.
4599 lt_save_CC="$CC"
4600 CC=${RC-"windres"}
4601 compiler=$CC
4602 _LT_AC_TAGVAR(compiler, $1)=$CC
4603 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4604
4605 AC_LIBTOOL_CONFIG($1)
4606
4607 AC_LANG_RESTORE
4608 CC="$lt_save_CC"
4609 ])# AC_LIBTOOL_LANG_RC_CONFIG
4610
4611
4612 # AC_LIBTOOL_CONFIG([TAGNAME])
4613 # ----------------------------
4614 # If TAGNAME is not passed, then create an initial libtool script
4615 # with a default configuration from the untagged config vars.  Otherwise
4616 # add code to config.status for appending the configuration named by
4617 # TAGNAME from the matching tagged config vars.
4618 AC_DEFUN([AC_LIBTOOL_CONFIG],
4619 [# The else clause should only fire when bootstrapping the
4620 # libtool distribution, otherwise you forgot to ship ltmain.sh
4621 # with your package, and you will get complaints that there are
4622 # no rules to generate ltmain.sh.
4623 if test -f "$ltmain"; then
4624   # See if we are running on zsh, and set the options which allow our commands through
4625   # without removal of \ escapes.
4626   if test -n "${ZSH_VERSION+set}" ; then
4627     setopt NO_GLOB_SUBST
4628   fi  
4629   # Now quote all the things that may contain metacharacters while being
4630   # careful not to overquote the AC_SUBSTed values.  We take copies of the
4631   # variables and quote the copies for generation of the libtool script.
4632   for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
4633     libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4634     old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4635     deplibs_check_method reload_flag reload_cmds need_locks \
4636     lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4637     lt_cv_sys_global_symbol_to_c_name_address \
4638     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4639     old_postinstall_cmds old_postuninstall_cmds \
4640     _LT_AC_TAGVAR(compiler, $1) \
4641     _LT_AC_TAGVAR(CC, $1) \
4642     _LT_AC_TAGVAR(LD, $1) \
4643     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4644     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4645     _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4646     _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4647     _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4648     _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4649     _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4650     _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4651     _LT_AC_TAGVAR(old_archive_cmds, $1) \
4652     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4653     _LT_AC_TAGVAR(predep_objects, $1) \
4654     _LT_AC_TAGVAR(postdep_objects, $1) \
4655     _LT_AC_TAGVAR(predeps, $1) \
4656     _LT_AC_TAGVAR(postdeps, $1) \
4657     _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4658     _LT_AC_TAGVAR(archive_cmds, $1) \
4659     _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4660     _LT_AC_TAGVAR(postinstall_cmds, $1) \
4661     _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4662     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4663     _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4664     _LT_AC_TAGVAR(no_undefined_flag, $1) \
4665     _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4666     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4667     _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4668     _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4669     _LT_AC_TAGVAR(hardcode_automatic, $1) \
4670     _LT_AC_TAGVAR(module_cmds, $1) \
4671     _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4672     _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4673     _LT_AC_TAGVAR(exclude_expsyms, $1) \
4674     _LT_AC_TAGVAR(include_expsyms, $1); do
4675
4676     case $var in
4677     _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4678     _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4679     _LT_AC_TAGVAR(archive_cmds, $1) | \
4680     _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4681     _LT_AC_TAGVAR(module_cmds, $1) | \
4682     _LT_AC_TAGVAR(module_expsym_cmds, $1) | \   
4683     _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4684     _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4685     extract_expsyms_cmds | reload_cmds | finish_cmds | \
4686     postinstall_cmds | postuninstall_cmds | \
4687     old_postinstall_cmds | old_postuninstall_cmds | \
4688     sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4689       # Double-quote double-evaled strings.
4690       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4691       ;;
4692     *)
4693       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4694       ;;
4695     esac
4696   done
4697
4698   case $lt_echo in
4699   *'\[$]0 --fallback-echo"')
4700     lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4701     ;;
4702   esac
4703
4704 ifelse([$1], [],
4705   [cfgfile="${ofile}T"
4706   trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4707   $rm -f "$cfgfile"
4708   AC_MSG_NOTICE([creating $ofile])],
4709   [cfgfile="$ofile"])
4710
4711   cat <<__EOF__ >> "$cfgfile"
4712 ifelse([$1], [],
4713 [#! $SHELL
4714
4715 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4716 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4717 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4718 #
4719 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4720 # Free Software Foundation, Inc.
4721 #
4722 # This file is part of GNU Libtool:
4723 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4724 #
4725 # This program is free software; you can redistribute it and/or modify
4726 # it under the terms of the GNU General Public License as published by
4727 # the Free Software Foundation; either version 2 of the License, or
4728 # (at your option) any later version.
4729 #
4730 # This program is distributed in the hope that it will be useful, but
4731 # WITHOUT ANY WARRANTY; without even the implied warranty of
4732 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4733 # General Public License for more details.
4734 #
4735 # You should have received a copy of the GNU General Public License
4736 # along with this program; if not, write to the Free Software
4737 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4738 #
4739 # As a special exception to the GNU General Public License, if you
4740 # distribute this file as part of a program that contains a
4741 # configuration script generated by Autoconf, you may include it under
4742 # the same distribution terms that you use for the rest of that program.
4743
4744 # A sed program that does not truncate output.
4745 SED=$lt_SED
4746
4747 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4748 Xsed="$SED -e s/^X//"
4749
4750 # The HP-UX ksh and POSIX shell print the target directory to stdout
4751 # if CDPATH is set.
4752 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4753
4754 # The names of the tagged configurations supported by this script.
4755 available_tags=
4756
4757 # ### BEGIN LIBTOOL CONFIG],
4758 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4759
4760 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4761
4762 # Shell to use when invoking shell scripts.
4763 SHELL=$lt_SHELL
4764
4765 # Whether or not to build shared libraries.
4766 build_libtool_libs=$enable_shared
4767
4768 # Whether or not to build static libraries.
4769 build_old_libs=$enable_static
4770
4771 # Whether or not to add -lc for building shared libraries.
4772 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4773
4774 # Whether or not to disallow shared libs when runtime libs are static
4775 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4776
4777 # Whether or not to optimize for fast installation.
4778 fast_install=$enable_fast_install
4779
4780 # The host system.
4781 host_alias=$host_alias
4782 host=$host
4783
4784 # An echo program that does not interpret backslashes.
4785 echo=$lt_echo
4786
4787 # The archiver.
4788 AR=$lt_AR
4789 AR_FLAGS=$lt_AR_FLAGS
4790
4791 # A C compiler.
4792 LTCC=$lt_LTCC
4793
4794 # A language-specific compiler.
4795 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4796
4797 # Is the compiler the GNU C compiler?
4798 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4799
4800 # An ERE matcher.
4801 EGREP=$lt_EGREP
4802
4803 # The linker used to build libraries.
4804 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4805
4806 # Whether we need hard or soft links.
4807 LN_S=$lt_LN_S
4808
4809 # A BSD-compatible nm program.
4810 NM=$lt_NM
4811
4812 # A symbol stripping program
4813 STRIP=$STRIP
4814
4815 # Used to examine libraries when file_magic_cmd begins "file"
4816 MAGIC_CMD=$MAGIC_CMD
4817
4818 # Used on cygwin: DLL creation program.
4819 DLLTOOL="$DLLTOOL"
4820
4821 # Used on cygwin: object dumper.
4822 OBJDUMP="$OBJDUMP"
4823
4824 # Used on cygwin: assembler.
4825 AS="$AS"
4826
4827 # The name of the directory that contains temporary libtool files.
4828 objdir=$objdir
4829
4830 # How to create reloadable object files.
4831 reload_flag=$lt_reload_flag
4832 reload_cmds=$lt_reload_cmds
4833
4834 # How to pass a linker flag through the compiler.
4835 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4836
4837 # Object file suffix (normally "o").
4838 objext="$ac_objext"
4839
4840 # Old archive suffix (normally "a").
4841 libext="$libext"
4842
4843 # Shared library suffix (normally ".so").
4844 shrext='$shrext'
4845
4846 # Executable file suffix (normally "").
4847 exeext="$exeext"
4848
4849 # Additional compiler flags for building library objects.
4850 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4851 pic_mode=$pic_mode
4852
4853 # What is the maximum length of a command?
4854 max_cmd_len=$lt_cv_sys_max_cmd_len
4855
4856 # Does compiler simultaneously support -c and -o options?
4857 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4858
4859 # Must we lock files when doing compilation ?
4860 need_locks=$lt_need_locks
4861
4862 # Do we need the lib prefix for modules?
4863 need_lib_prefix=$need_lib_prefix
4864
4865 # Do we need a version for libraries?
4866 need_version=$need_version
4867
4868 # Whether dlopen is supported.
4869 dlopen_support=$enable_dlopen
4870
4871 # Whether dlopen of programs is supported.
4872 dlopen_self=$enable_dlopen_self
4873
4874 # Whether dlopen of statically linked programs is supported.
4875 dlopen_self_static=$enable_dlopen_self_static
4876
4877 # Compiler flag to prevent dynamic linking.
4878 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4879
4880 # Compiler flag to turn off builtin functions.
4881 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4882
4883 # Compiler flag to allow reflexive dlopens.
4884 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4885
4886 # Compiler flag to generate shared objects directly from archives.
4887 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4888
4889 # Compiler flag to generate thread-safe objects.
4890 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4891
4892 # Library versioning type.
4893 version_type=$version_type
4894
4895 # Format of library name prefix.
4896 libname_spec=$lt_libname_spec
4897
4898 # List of archive names.  First name is the real one, the rest are links.
4899 # The last name is the one that the linker finds with -lNAME.
4900 library_names_spec=$lt_library_names_spec
4901
4902 # The coded name of the library, if different from the real name.
4903 soname_spec=$lt_soname_spec
4904
4905 # Commands used to build and install an old-style archive.
4906 RANLIB=$lt_RANLIB
4907 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4908 old_postinstall_cmds=$lt_old_postinstall_cmds
4909 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4910
4911 # Create an old-style archive from a shared archive.
4912 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4913
4914 # Create a temporary old-style archive to link instead of a shared archive.
4915 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4916
4917 # Commands used to build and install a shared archive.
4918 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4919 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4920 postinstall_cmds=$lt_postinstall_cmds
4921 postuninstall_cmds=$lt_postuninstall_cmds
4922
4923 # Commands used to build a loadable module (assumed same as above if empty)
4924 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4925 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4926
4927 # Commands to strip libraries.
4928 old_striplib=$lt_old_striplib
4929 striplib=$lt_striplib
4930
4931 # Dependencies to place before the objects being linked to create a
4932 # shared library.
4933 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4934
4935 # Dependencies to place after the objects being linked to create a
4936 # shared library.
4937 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4938
4939 # Dependencies to place before the objects being linked to create a
4940 # shared library.
4941 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4942
4943 # Dependencies to place after the objects being linked to create a
4944 # shared library.
4945 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4946
4947 # The library search path used internally by the compiler when linking
4948 # a shared library.
4949 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4950
4951 # Method to check whether dependent libraries are shared objects.
4952 deplibs_check_method=$lt_deplibs_check_method
4953
4954 # Command to use when deplibs_check_method == file_magic.
4955 file_magic_cmd=$lt_file_magic_cmd
4956
4957 # Flag that allows shared libraries with undefined symbols to be built.
4958 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4959
4960 # Flag that forces no undefined symbols.
4961 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4962
4963 # Commands used to finish a libtool library installation in a directory.
4964 finish_cmds=$lt_finish_cmds
4965
4966 # Same as above, but a single script fragment to be evaled but not shown.
4967 finish_eval=$lt_finish_eval
4968
4969 # Take the output of nm and produce a listing of raw symbols and C names.
4970 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4971
4972 # Transform the output of nm in a proper C declaration
4973 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4974
4975 # Transform the output of nm in a C name address pair
4976 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4977
4978 # This is the shared library runtime path variable.
4979 runpath_var=$runpath_var
4980
4981 # This is the shared library path variable.
4982 shlibpath_var=$shlibpath_var
4983
4984 # Is shlibpath searched before the hard-coded library search path?
4985 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4986
4987 # How to hardcode a shared library path into an executable.
4988 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4989
4990 # Whether we should hardcode library paths into libraries.
4991 hardcode_into_libs=$hardcode_into_libs
4992
4993 # Flag to hardcode \$libdir into a binary during linking.
4994 # This must work even if \$libdir does not exist.
4995 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4996
4997 # If ld is used when linking, flag to hardcode \$libdir into
4998 # a binary during linking. This must work even if \$libdir does
4999 # not exist.
5000 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
5001
5002 # Whether we need a single -rpath flag with a separated argument.
5003 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
5004
5005 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
5006 # resulting binary.
5007 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
5008
5009 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
5010 # resulting binary.
5011 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
5012
5013 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
5014 # the resulting binary.
5015 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
5016
5017 # Set to yes if building a shared library automatically hardcodes DIR into the library
5018 # and all subsequent libraries and executables linked against it.
5019 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
5020
5021 # Variables whose values should be saved in libtool wrapper scripts and
5022 # restored at relink time.
5023 variables_saved_for_relink="$variables_saved_for_relink"
5024
5025 # Whether libtool must link a program against all its dependency libraries.
5026 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
5027
5028 # Compile-time system search path for libraries
5029 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
5030
5031 # Run-time system search path for libraries
5032 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
5033
5034 # Fix the shell variable \$srcfile for the compiler.
5035 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
5036
5037 # Set to yes if exported symbols are required.
5038 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
5039
5040 # The commands to list exported symbols.
5041 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
5042
5043 # The commands to extract the exported symbol list from a shared archive.
5044 extract_expsyms_cmds=$lt_extract_expsyms_cmds
5045
5046 # Symbols that should not be listed in the preloaded symbols.
5047 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
5048
5049 # Symbols that must always be exported.
5050 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
5051
5052 ifelse([$1],[],
5053 [# ### END LIBTOOL CONFIG],
5054 [# ### END LIBTOOL TAG CONFIG: $tagname])
5055
5056 __EOF__
5057
5058 ifelse([$1],[], [
5059   case $host_os in
5060   aix3*)
5061     cat <<\EOF >> "$cfgfile"
5062
5063 # AIX sometimes has problems with the GCC collect2 program.  For some
5064 # reason, if we set the COLLECT_NAMES environment variable, the problems
5065 # vanish in a puff of smoke.
5066 if test "X${COLLECT_NAMES+set}" != Xset; then
5067   COLLECT_NAMES=
5068   export COLLECT_NAMES
5069 fi
5070 EOF
5071     ;;
5072   esac
5073
5074   # We use sed instead of cat because bash on DJGPP gets confused if
5075   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
5076   # text mode, it properly converts lines to CR/LF.  This bash problem
5077   # is reportedly fixed, but why not run on old versions too?
5078   sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
5079
5080   mv -f "$cfgfile" "$ofile" || \
5081     (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
5082   chmod +x "$ofile"
5083 ])
5084 else
5085   # If there is no Makefile yet, we rely on a make rule to execute
5086   # `config.status --recheck' to rerun these tests and create the
5087   # libtool script then.
5088   test -f Makefile && make "$ltmain"
5089 fi
5090 ])# AC_LIBTOOL_CONFIG
5091
5092
5093 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
5094 # -------------------------------------------
5095 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
5096 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
5097
5098 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
5099
5100 if test "$GCC" = yes; then
5101   _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
5102
5103   AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
5104     lt_cv_prog_compiler_rtti_exceptions,
5105     [-fno-rtti -fno-exceptions], [],
5106     [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
5107 fi
5108 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
5109
5110
5111 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5112 # ---------------------------------
5113 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
5114 [AC_REQUIRE([AC_CANONICAL_HOST])
5115 AC_REQUIRE([AC_PROG_NM])
5116 AC_REQUIRE([AC_OBJEXT])
5117 # Check for command to grab the raw symbol name followed by C symbol from nm.
5118 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
5119 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
5120 [
5121 # These are sane defaults that work on at least a few old systems.
5122 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
5123
5124 # Character class describing NM global symbol codes.
5125 symcode='[[BCDEGRST]]'
5126
5127 # Regexp to match symbols that can be accessed directly from C.
5128 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
5129
5130 # Transform the above into a raw symbol and a C symbol.
5131 symxfrm='\1 \2\3 \3'
5132
5133 # Transform an extracted symbol line into a proper C declaration
5134 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
5135
5136 # Transform an extracted symbol line into symbol name and symbol address
5137 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'"
5138
5139 # Define system-specific variables.
5140 case $host_os in
5141 aix*)
5142   symcode='[[BCDT]]'
5143   ;;
5144 cygwin* | mingw* | pw32*)
5145   symcode='[[ABCDGISTW]]'
5146   ;;
5147 hpux*) # Its linker distinguishes data from code symbols
5148   if test "$host_cpu" = ia64; then
5149     symcode='[[ABCDEGRST]]'
5150   fi
5151   lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
5152   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'"
5153   ;;
5154 irix* | nonstopux*)
5155   symcode='[[BCDEGRST]]'
5156   ;;
5157 osf*)
5158   symcode='[[BCDEGQRST]]'
5159   ;;
5160 solaris* | sysv5*)
5161   symcode='[[BDT]]'
5162   ;;
5163 sysv4)
5164   symcode='[[DFNSTU]]'
5165   ;;
5166 esac
5167
5168 # Handle CRLF in mingw tool chain
5169 opt_cr=
5170 case $build_os in
5171 mingw*)
5172   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
5173   ;;
5174 esac
5175
5176 # If we're using GNU nm, then use its standard symbol codes.
5177 case `$NM -V 2>&1` in
5178 *GNU* | *'with BFD'*)
5179   symcode='[[ABCDGISTW]]' ;;
5180 esac
5181
5182 # Try without a prefix undercore, then with it.
5183 for ac_symprfx in "" "_"; do
5184
5185   # Write the raw and C identifiers.
5186   lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[      ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
5187
5188   # Check to see that the pipe works correctly.
5189   pipe_works=no
5190
5191   rm -f conftest*
5192   cat > conftest.$ac_ext <<EOF
5193 #ifdef __cplusplus
5194 extern "C" {
5195 #endif
5196 char nm_test_var;
5197 void nm_test_func(){}
5198 #ifdef __cplusplus
5199 }
5200 #endif
5201 int main(){nm_test_var='a';nm_test_func();return(0);}
5202 EOF
5203
5204   if AC_TRY_EVAL(ac_compile); then
5205     # Now try to grab the symbols.
5206     nlist=conftest.nm
5207     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
5208       # Try sorting and uniquifying the output.
5209       if sort "$nlist" | uniq > "$nlist"T; then
5210         mv -f "$nlist"T "$nlist"
5211       else
5212         rm -f "$nlist"T
5213       fi
5214
5215       # Make sure that we snagged all the symbols we need.
5216       if grep ' nm_test_var$' "$nlist" >/dev/null; then
5217         if grep ' nm_test_func$' "$nlist" >/dev/null; then
5218           cat <<EOF > conftest.$ac_ext
5219 #ifdef __cplusplus
5220 extern "C" {
5221 #endif
5222
5223 EOF
5224           # Now generate the symbol file.
5225           eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
5226
5227           cat <<EOF >> conftest.$ac_ext
5228 #if defined (__STDC__) && __STDC__
5229 # define lt_ptr_t void *
5230 #else
5231 # define lt_ptr_t char *
5232 # define const
5233 #endif
5234
5235 /* The mapping between symbol names and symbols. */
5236 const struct {
5237   const char *name;
5238   lt_ptr_t address;
5239 }
5240 lt_preloaded_symbols[[]] =
5241 {
5242 EOF
5243           $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
5244           cat <<\EOF >> conftest.$ac_ext
5245   {0, (lt_ptr_t) 0}
5246 };
5247
5248 #ifdef __cplusplus
5249 }
5250 #endif
5251 EOF
5252           # Now try linking the two files.
5253           mv conftest.$ac_objext conftstm.$ac_objext
5254           lt_save_LIBS="$LIBS"
5255           lt_save_CFLAGS="$CFLAGS"
5256           LIBS="conftstm.$ac_objext"
5257           CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
5258           if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
5259             pipe_works=yes
5260           fi
5261           LIBS="$lt_save_LIBS"
5262           CFLAGS="$lt_save_CFLAGS"
5263         else
5264           echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
5265         fi
5266       else
5267         echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
5268       fi
5269     else
5270       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
5271     fi
5272   else
5273     echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
5274     cat conftest.$ac_ext >&5
5275   fi
5276   rm -f conftest* conftst*
5277
5278   # Do not use the global_symbol_pipe unless it works.
5279   if test "$pipe_works" = yes; then
5280     break
5281   else
5282     lt_cv_sys_global_symbol_pipe=
5283   fi
5284 done
5285 ])
5286 if test -z "$lt_cv_sys_global_symbol_pipe"; then
5287   lt_cv_sys_global_symbol_to_cdecl=
5288 fi
5289 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
5290   AC_MSG_RESULT(failed)
5291 else
5292   AC_MSG_RESULT(ok)
5293 fi
5294 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
5295
5296
5297 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
5298 # ---------------------------------------
5299 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
5300 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
5301 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5302 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
5303
5304 AC_MSG_CHECKING([for $compiler option to produce PIC])
5305  ifelse([$1],[CXX],[
5306   # C++ specific cases for pic, static, wl, etc.
5307   if test "$GXX" = yes; then
5308     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5309     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5310
5311     case $host_os in
5312     aix*)
5313       # All AIX code is PIC.
5314       if test "$host_cpu" = ia64; then
5315         # AIX 5 now supports IA64 processor
5316         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5317       fi
5318       ;;
5319     amigaos*)
5320       # FIXME: we need at least 68020 code to build shared libraries, but
5321       # adding the `-m68020' flag to GCC prevents building anything better,
5322       # like `-m68040'.
5323       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5324       ;;
5325     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5326       # PIC is the default for these OSes.
5327       ;;
5328     mingw* | os2* | pw32*)
5329       # This hack is so that the source file can tell whether it is being
5330       # built for inclusion in a dll (and should export symbols for example).
5331       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5332       ;;
5333     darwin* | rhapsody*)
5334       # PIC is the default on this platform
5335       # Common symbols not allowed in MH_DYLIB files
5336       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5337       ;;
5338     *djgpp*)
5339       # DJGPP does not support shared libraries at all
5340       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5341       ;;
5342     sysv4*MP*)
5343       if test -d /usr/nec; then
5344         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5345       fi
5346       ;;
5347     hpux*)
5348       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5349       # not for PA HP-UX.
5350       case "$host_cpu" in
5351       hppa*64*|ia64*)
5352         ;;
5353       *)
5354         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5355         ;;
5356       esac
5357       ;;
5358     *)
5359       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5360       ;;
5361     esac
5362   else
5363     case $host_os in
5364       aix4* | aix5*)
5365         # All AIX code is PIC.
5366         if test "$host_cpu" = ia64; then
5367           # AIX 5 now supports IA64 processor
5368           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5369         else
5370           _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5371         fi
5372         ;;
5373       chorus*)
5374         case $cc_basename in
5375         cxch68)
5376           # Green Hills C++ Compiler
5377           # _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"
5378           ;;
5379         esac
5380         ;;
5381       dgux*)
5382         case $cc_basename in
5383           ec++)
5384             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5385             ;;
5386           ghcx)
5387             # Green Hills C++ Compiler
5388             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5389             ;;
5390           *)
5391             ;;
5392         esac
5393         ;;
5394       freebsd*)
5395         # FreeBSD uses GNU C++
5396         ;;
5397       hpux9* | hpux10* | hpux11*)
5398         case $cc_basename in
5399           CC)
5400             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5401             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5402             if test "$host_cpu" != ia64; then
5403               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5404             fi
5405             ;;
5406           aCC)
5407             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5408             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
5409             case "$host_cpu" in
5410             hppa*64*|ia64*)
5411               # +Z the default
5412               ;;
5413             *)
5414               _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5415               ;;
5416             esac
5417             ;;
5418           *)
5419             ;;
5420         esac
5421         ;;
5422       irix5* | irix6* | nonstopux*)
5423         case $cc_basename in
5424           CC)
5425             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5426             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5427             # CC pic flag -KPIC is the default.
5428             ;;
5429           *)
5430             ;;
5431         esac
5432         ;;
5433       linux*)
5434         case $cc_basename in
5435           KCC)
5436             # KAI C++ Compiler
5437             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5438             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5439             ;;
5440           icpc)
5441             # Intel C++
5442             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5443             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5444             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5445             ;; 
5446           cxx)
5447             # Compaq C++
5448             # Make sure the PIC flag is empty.  It appears that all Alpha
5449             # Linux and Compaq Tru64 Unix objects are PIC.
5450             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5451             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5452             ;;
5453           *)
5454             ;;
5455         esac
5456         ;;
5457       lynxos*)
5458         ;;
5459       m88k*)
5460         ;;
5461       mvs*)
5462         case $cc_basename in
5463           cxx)
5464             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5465             ;;
5466           *)
5467             ;;
5468         esac
5469         ;;
5470       netbsd*)
5471         ;;
5472       osf3* | osf4* | osf5*)
5473         case $cc_basename in
5474           KCC)
5475             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5476             ;;
5477           RCC)
5478             # Rational C++ 2.4.1
5479             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5480             ;;
5481           cxx)
5482             # Digital/Compaq C++
5483             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5484             # Make sure the PIC flag is empty.  It appears that all Alpha
5485             # Linux and Compaq Tru64 Unix objects are PIC.
5486             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5487             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5488             ;;
5489           *)
5490             ;;
5491         esac
5492         ;;
5493       psos*)
5494         ;;
5495       sco*)
5496         case $cc_basename in
5497           CC)
5498             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5499             ;;
5500           *)
5501             ;;
5502         esac
5503         ;;
5504       solaris*)
5505         case $cc_basename in
5506           CC)
5507             # Sun C++ 4.2, 5.x and Centerline C++
5508             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5509             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5510             _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5511             ;;
5512           gcx)
5513             # Green Hills C++ Compiler
5514             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5515             ;;
5516           *)
5517             ;;
5518         esac
5519         ;;
5520       sunos4*)
5521         case $cc_basename in
5522           CC)
5523             # Sun C++ 4.x
5524             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5525             _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5526             ;;
5527           lcc)
5528             # Lucid
5529             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5530             ;;
5531           *)
5532             ;;
5533         esac
5534         ;;
5535       tandem*)
5536         case $cc_basename in
5537           NCC)
5538             # NonStop-UX NCC 3.20
5539             _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5540             ;;
5541           *)
5542             ;;
5543         esac
5544         ;;
5545       unixware*)
5546         ;;
5547       vxworks*)
5548         ;;
5549       *)
5550         _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5551         ;;
5552     esac
5553   fi
5554 ],
5555 [
5556   if test "$GCC" = yes; then
5557     _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5558     _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5559
5560     case $host_os in
5561       aix*)
5562       # All AIX code is PIC.
5563       if test "$host_cpu" = ia64; then
5564         # AIX 5 now supports IA64 processor
5565         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5566       fi
5567       ;;
5568
5569     amigaos*)
5570       # FIXME: we need at least 68020 code to build shared libraries, but
5571       # adding the `-m68020' flag to GCC prevents building anything better,
5572       # like `-m68040'.
5573       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5574       ;;
5575
5576     beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5577       # PIC is the default for these OSes.
5578       ;;
5579
5580     mingw* | pw32* | os2*)
5581       # This hack is so that the source file can tell whether it is being
5582       # built for inclusion in a dll (and should export symbols for example).
5583       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5584       ;;
5585
5586     darwin* | rhapsody*)
5587       # PIC is the default on this platform
5588       # Common symbols not allowed in MH_DYLIB files
5589       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5590       ;;
5591
5592     msdosdjgpp*)
5593       # Just because we use GCC doesn't mean we suddenly get shared libraries
5594       # on systems that don't support them.
5595       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5596       enable_shared=no
5597       ;;
5598
5599     sysv4*MP*)
5600       if test -d /usr/nec; then
5601         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5602       fi
5603       ;;
5604
5605     hpux*)
5606       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5607       # not for PA HP-UX.
5608       case "$host_cpu" in
5609       hppa*64*|ia64*)
5610         # +Z the default
5611         ;;
5612       *)
5613         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5614         ;;
5615       esac
5616       ;;
5617
5618     *)
5619       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5620       ;;
5621     esac
5622   else
5623     # PORTME Check for flag to pass linker flags through the system compiler.
5624     case $host_os in
5625     aix*)
5626       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5627       if test "$host_cpu" = ia64; then
5628         # AIX 5 now supports IA64 processor
5629         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5630       else
5631         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5632       fi
5633       ;;
5634
5635     mingw* | pw32* | os2*)
5636       # This hack is so that the source file can tell whether it is being
5637       # built for inclusion in a dll (and should export symbols for example).
5638       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5639       ;;
5640
5641     hpux9* | hpux10* | hpux11*)
5642       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5643       # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5644       # not for PA HP-UX.
5645       case "$host_cpu" in
5646       hppa*64*|ia64*)
5647         # +Z the default
5648         ;;
5649       *)
5650         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5651         ;;
5652       esac
5653       # Is there a better lt_prog_compiler_static that works with the bundled CC?
5654       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5655       ;;
5656
5657     irix5* | irix6* | nonstopux*)
5658       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5659       # PIC (with -KPIC) is the default.
5660       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5661       ;;
5662
5663     newsos6)
5664       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5665       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5666       ;;
5667
5668     linux*)
5669       case $CC in
5670       icc|ecc)
5671         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5672         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5673         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5674         ;;
5675       ccc)
5676         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5677         # All Alpha code is PIC.
5678         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5679         ;;
5680       esac
5681       ;;
5682
5683     osf3* | osf4* | osf5*)
5684       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5685       # All OSF/1 code is PIC.
5686       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5687       ;;
5688
5689     sco3.2v5*)
5690       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5691       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5692       ;;
5693
5694     solaris*)
5695       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5696       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5697       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5698       ;;
5699
5700     sunos4*)
5701       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5702       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5703       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5704       ;;
5705
5706     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5707       _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5708       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5709       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5710       ;;
5711
5712     sysv4*MP*)
5713       if test -d /usr/nec ;then
5714         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5715         _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5716       fi
5717       ;;
5718
5719     uts4*)
5720       _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5721       _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5722       ;;
5723
5724     *)
5725       _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5726       ;;
5727     esac
5728   fi
5729 ])
5730 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5731
5732 #
5733 # Check to make sure the PIC flag actually works.
5734 #
5735 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5736   AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5737     _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5738     [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5739     [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5740      "" | " "*) ;;
5741      *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5742      esac],
5743     [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5744      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5745 fi
5746 case "$host_os" in
5747   # For platforms which do not support PIC, -DPIC is meaningless:
5748   *djgpp*)
5749     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5750     ;;
5751   *)
5752     _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5753     ;;
5754 esac
5755 ])
5756
5757
5758 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5759 # ------------------------------------
5760 # See if the linker supports building shared libraries.
5761 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5762 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5763 ifelse([$1],[CXX],[
5764   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5765   case $host_os in
5766   aix4* | aix5*)
5767     # If we're using GNU nm, then we don't want the "-C" option.
5768     # -C means demangle to AIX nm, but means don't demangle with GNU nm
5769     if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5770       _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'
5771     else
5772       _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'
5773     fi
5774     ;;
5775   pw32*)
5776     _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5777   ;;
5778   cygwin* | mingw*)
5779     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5780   ;;
5781   *)
5782     _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5783   ;;
5784   esac
5785 ],[
5786   runpath_var=
5787   _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5788   _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5789   _LT_AC_TAGVAR(archive_cmds, $1)=
5790   _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5791   _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5792   _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5793   _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5794   _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5795   _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5796   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5797   _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5798   _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5799   _LT_AC_TAGVAR(hardcode_direct, $1)=no
5800   _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5801   _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5802   _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5803   _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5804   _LT_AC_TAGVAR(module_cmds, $1)=
5805   _LT_AC_TAGVAR(module_expsym_cmds, $1)=  
5806   _LT_AC_TAGVAR(always_export_symbols, $1)=no
5807   _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5808   # include_expsyms should be a list of space-separated symbols to be *always*
5809   # included in the symbol list
5810   _LT_AC_TAGVAR(include_expsyms, $1)=
5811   # exclude_expsyms can be an extended regexp of symbols to exclude
5812   # it will be wrapped by ` (' and `)$', so one must not match beginning or
5813   # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5814   # as well as any symbol that contains `d'.
5815   _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5816   # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5817   # platforms (ab)use it in PIC code, but their linkers get confused if
5818   # the symbol is explicitly referenced.  Since portable code cannot
5819   # rely on this symbol name, it's probably fine to never include it in
5820   # preloaded symbol tables.
5821   extract_expsyms_cmds=
5822
5823   case $host_os in
5824   cygwin* | mingw* | pw32*)
5825     # FIXME: the MSVC++ port hasn't been tested in a loooong time
5826     # When not using gcc, we currently assume that we are using
5827     # Microsoft Visual C++.
5828     if test "$GCC" != yes; then
5829       with_gnu_ld=no
5830     fi
5831     ;;
5832   openbsd*)
5833     with_gnu_ld=no
5834     ;;
5835   esac
5836
5837   _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5838   if test "$with_gnu_ld" = yes; then
5839     # If archive_cmds runs LD, not CC, wlarc should be empty
5840     wlarc='${wl}'
5841
5842     # See if GNU ld supports shared libraries.
5843     case $host_os in
5844     aix3* | aix4* | aix5*)
5845       # On AIX/PPC, the GNU linker is very broken
5846       if test "$host_cpu" != ia64; then
5847         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5848         cat <<EOF 1>&2
5849
5850 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5851 *** to be unable to reliably create shared libraries on AIX.
5852 *** Therefore, libtool is disabling shared libraries support.  If you
5853 *** really care for shared libraries, you may want to modify your PATH
5854 *** so that a non-GNU linker is found, and then restart.
5855
5856 EOF
5857       fi
5858       ;;
5859
5860     amigaos*)
5861       _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)'
5862       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5863       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5864
5865       # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5866       # that the semantics of dynamic libraries on AmigaOS, at least up
5867       # to version 4, is to share data among multiple programs linked
5868       # with the same dynamic library.  Since this doesn't match the
5869       # behavior of shared libraries on other platforms, we can't use
5870       # them.
5871       _LT_AC_TAGVAR(ld_shlibs, $1)=no
5872       ;;
5873
5874     beos*)
5875       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5876         _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5877         # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5878         # support --undefined.  This deserves some investigation.  FIXME
5879         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5880       else
5881         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5882       fi
5883       ;;
5884
5885     cygwin* | mingw* | pw32*)
5886       # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5887       # as there is no search path for DLLs.
5888       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5889       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5890       _LT_AC_TAGVAR(always_export_symbols, $1)=no
5891       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5892       _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5893
5894       if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5895         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5896         # If the export-symbols file already is a .def file (1st line
5897         # is EXPORTS), use it as is; otherwise, prepend...
5898         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5899           cp $export_symbols $output_objdir/$soname.def;
5900         else
5901           echo EXPORTS > $output_objdir/$soname.def;
5902           cat $export_symbols >> $output_objdir/$soname.def;
5903         fi~
5904         $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000  ${wl}--out-implib,$lib'
5905       else
5906         ld_shlibs=no
5907       fi
5908       ;;
5909
5910     netbsd*)
5911       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5912         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5913         wlarc=
5914       else
5915         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5916         _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'
5917       fi
5918       ;;
5919
5920     solaris* | sysv5*)
5921       if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5922         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5923         cat <<EOF 1>&2
5924
5925 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5926 *** create shared libraries on Solaris systems.  Therefore, libtool
5927 *** is disabling shared libraries support.  We urge you to upgrade GNU
5928 *** binutils to release 2.9.1 or newer.  Another option is to modify
5929 *** your PATH or compiler configuration so that the native linker is
5930 *** used, and then restart.
5931
5932 EOF
5933       elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5934         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5935         _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'
5936       else
5937         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5938       fi
5939       ;;
5940
5941     sunos4*)
5942       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5943       wlarc=
5944       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5945       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5946       ;;
5947
5948     *)
5949       if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5950         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5951         _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'
5952       else
5953         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5954       fi
5955       ;;
5956     esac
5957
5958     if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5959       runpath_var=LD_RUN_PATH
5960       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5961       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5962       # ancient GNU ld didn't support --whole-archive et. al.
5963       if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5964         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5965       else
5966         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5967       fi
5968     fi
5969   else
5970     # PORTME fill in a description of your system's linker (not GNU ld)
5971     case $host_os in
5972     aix3*)
5973       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5974       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5975       _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'
5976       # Note: this linker hardcodes the directories in LIBPATH if there
5977       # are no directories specified by -L.
5978       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5979       if test "$GCC" = yes && test -z "$link_static_flag"; then
5980         # Neither direct hardcoding nor static linking is supported with a
5981         # broken collect2.
5982         _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5983       fi
5984       ;;
5985
5986     aix4* | aix5*)
5987       if test "$host_cpu" = ia64; then
5988         # On IA64, the linker does run time linking by default, so we don't
5989         # have to do anything special.
5990         aix_use_runtimelinking=no
5991         exp_sym_flag='-Bexport'
5992         no_entry_flag=""
5993       else
5994         # If we're using GNU nm, then we don't want the "-C" option.
5995         # -C means demangle to AIX nm, but means don't demangle with GNU nm
5996         if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5997           _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'
5998         else
5999           _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'
6000         fi
6001         aix_use_runtimelinking=no
6002
6003         # Test if we are trying to use run time linking or normal
6004         # AIX style linking. If -brtl is somewhere in LDFLAGS, we
6005         # need to do runtime linking.
6006         case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
6007           for ld_flag in $LDFLAGS; do
6008           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
6009             aix_use_runtimelinking=yes
6010             break
6011           fi
6012           done
6013         esac
6014
6015         exp_sym_flag='-bexport'
6016         no_entry_flag='-bnoentry'
6017       fi
6018
6019       # When large executables or shared objects are built, AIX ld can
6020       # have problems creating the table of contents.  If linking a library
6021       # or program results in "error TOC overflow" add -mminimal-toc to
6022       # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
6023       # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6024
6025       _LT_AC_TAGVAR(archive_cmds, $1)=''
6026       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6027       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6028       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6029
6030       if test "$GCC" = yes; then
6031         case $host_os in aix4.[012]|aix4.[012].*)
6032         # We only want to do this on AIX 4.2 and lower, the check
6033         # below for broken collect2 doesn't work under 4.3+
6034           collect2name=`${CC} -print-prog-name=collect2`
6035           if test -f "$collect2name" && \
6036            strings "$collect2name" | grep resolve_lib_name >/dev/null
6037           then
6038           # We have reworked collect2
6039           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6040           else
6041           # We have old collect2
6042           _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
6043           # It fails to find uninstalled libraries when the uninstalled
6044           # path is not listed in the libpath.  Setting hardcode_minus_L
6045           # to unsupported forces relinking
6046           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6047           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6048           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
6049           fi
6050         esac
6051         shared_flag='-shared'
6052       else
6053         # not using gcc
6054         if test "$host_cpu" = ia64; then
6055         # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
6056         # chokes on -Wl,-G. The following line is correct:
6057           shared_flag='-G'
6058         else
6059         if test "$aix_use_runtimelinking" = yes; then
6060             shared_flag='${wl}-G'
6061           else
6062             shared_flag='${wl}-bM:SRE'
6063         fi
6064         fi
6065       fi
6066
6067       # It seems that -bexpall does not export symbols beginning with
6068       # underscore (_), so it is better to generate a list of symbols to export.
6069       _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6070       if test "$aix_use_runtimelinking" = yes; then
6071         # Warning - without using the other runtime loading flags (-brtl),
6072         # -berok will link without error, but may produce a broken library.
6073         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
6074        # Determine the default libpath from the value encoded in an empty executable.
6075        _LT_AC_SYS_LIBPATH_AIX
6076        _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6077         _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"
6078        else
6079         if test "$host_cpu" = ia64; then
6080           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
6081           _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
6082           _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"
6083         else
6084          # Determine the default libpath from the value encoded in an empty executable.
6085          _LT_AC_SYS_LIBPATH_AIX
6086          _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
6087           # Warning - without using the other run time loading flags,
6088           # -berok will link without error, but may produce a broken library.
6089           _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
6090           _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
6091           # -bexpall does not export symbols beginning with underscore (_)
6092           _LT_AC_TAGVAR(always_export_symbols, $1)=yes
6093           # Exported symbols can be pulled into shared objects from archives
6094           _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
6095           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6096           # This is similar to how AIX traditionally builds it's shared libraries.
6097           _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'
6098         fi
6099       fi
6100       ;;
6101
6102     amigaos*)
6103       _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)'
6104       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6105       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6106       # see comment about different semantics on the GNU ld section
6107       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6108       ;;
6109
6110     bsdi4*)
6111       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
6112       ;;
6113
6114     cygwin* | mingw* | pw32*)
6115       # When not using gcc, we currently assume that we are using
6116       # Microsoft Visual C++.
6117       # hardcode_libdir_flag_spec is actually meaningless, as there is
6118       # no search path for DLLs.
6119       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
6120       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6121       # Tell ltmain to make .lib files, not .a files.
6122       libext=lib
6123       # Tell ltmain to make .dll files, not .so files.
6124       shrext=".dll"
6125       # FIXME: Setting linknames here is a bad hack.
6126       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
6127       # The linker will automatically build a .lib file if we build a DLL.
6128       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
6129       # FIXME: Should let the user specify the lib program.
6130       _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
6131       fix_srcfile_path='`cygpath -w "$srcfile"`'
6132       _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
6133       ;;
6134
6135     darwin* | rhapsody*)
6136     if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then 
6137       _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6138       case "$host_os" in
6139       rhapsody* | darwin1.[[012]])
6140         _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
6141         ;;
6142       *) # Darwin 1.3 on
6143         test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
6144         ;;
6145       esac
6146       # FIXME: Relying on posixy $() will cause problems for
6147       #        cross-compilation, but unfortunately the echo tests do not
6148       #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
6149       #        `"' quotes if we put them in here... so don't!
6150         lt_int_apple_cc_single_mod=no
6151         output_verbose_link_cmd='echo'
6152         if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
6153           lt_int_apple_cc_single_mod=yes
6154         fi
6155         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6156           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6157         else
6158         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -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'
6159       fi
6160       _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
6161       # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
6162         if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
6163           _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}'
6164         else
6165           _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -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}'
6166         fi
6167           _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag  -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6168       _LT_AC_TAGVAR(hardcode_direct, $1)=no
6169       _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6170       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6171       _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
6172       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6173     fi  
6174       ;;
6175
6176     dgux*)
6177       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6178       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6179       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6180       ;;
6181
6182     freebsd1*)
6183       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6184       ;;
6185
6186     # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6187     # support.  Future versions do this automatically, but an explicit c++rt0.o
6188     # does not break anything, and helps significantly (at the cost of a little
6189     # extra space).
6190     freebsd2.2*)
6191       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6192       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6193       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6194       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6195       ;;
6196
6197     # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6198     freebsd2*)
6199       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6200       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6201       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6202       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6203       ;;
6204
6205     # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6206     freebsd*)
6207       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6208       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6209       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6210       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6211       ;;
6212
6213     hpux9*)
6214       if test "$GCC" = yes; then
6215         _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'
6216       else
6217         _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'
6218       fi
6219       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6220       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6221       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6222
6223       # hardcode_minus_L: Not really in the search PATH,
6224       # but as the default location of the library.
6225       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6226       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6227       ;;
6228
6229     hpux10* | hpux11*)
6230       if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6231         case "$host_cpu" in
6232         hppa*64*|ia64*)
6233           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6234           ;;
6235         *)
6236           _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6237           ;;
6238         esac
6239       else
6240         case "$host_cpu" in
6241         hppa*64*|ia64*)
6242           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
6243           ;;
6244         *)
6245           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6246           ;;
6247         esac
6248       fi
6249       if test "$with_gnu_ld" = no; then
6250         case "$host_cpu" in
6251         hppa*64*)
6252           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6253           _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6254           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6255           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6256           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6257           ;;
6258         ia64*)
6259           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6260           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6261           _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6262
6263           # hardcode_minus_L: Not really in the search PATH,
6264           # but as the default location of the library.
6265           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6266           ;;
6267         *)
6268           _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6269           _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6270           _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6271           _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6272
6273           # hardcode_minus_L: Not really in the search PATH,
6274           # but as the default location of the library.
6275           _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6276           ;;
6277         esac
6278       fi
6279       ;;
6280
6281     irix5* | irix6* | nonstopux*)
6282       if test "$GCC" = yes; then
6283         _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'
6284       else
6285         _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'
6286         _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6287       fi
6288       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6289       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6290       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6291       ;;
6292
6293     netbsd*)
6294       if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6295         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6296       else
6297         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6298       fi
6299       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6300       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6301       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6302       ;;
6303
6304     newsos6)
6305       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6306       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6307       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6308       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6309       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6310       ;;
6311
6312     openbsd*)
6313       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6314       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6315       if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6316         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6317         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6318         _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6319       else
6320        case $host_os in
6321          openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6322            _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6323            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6324            ;;
6325          *)
6326            _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6327            _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6328            ;;
6329        esac
6330       fi
6331       ;;
6332
6333     os2*)
6334       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6335       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6336       _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6337       _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'
6338       _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6339       ;;
6340
6341     osf3*)
6342       if test "$GCC" = yes; then
6343         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6344         _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'
6345       else
6346         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6347         _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'
6348       fi
6349       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6350       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6351       ;;
6352
6353     osf4* | osf5*)      # as osf3* with the addition of -msym flag
6354       if test "$GCC" = yes; then
6355         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6356         _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'
6357         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6358       else
6359         _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6360         _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'
6361         _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~
6362         $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp'
6363
6364         # Both c and cxx compiler support -rpath directly
6365         _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6366       fi
6367       _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6368       ;;
6369
6370     sco3.2v5*)
6371       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6372       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6373       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6374       runpath_var=LD_RUN_PATH
6375       hardcode_runpath_var=yes
6376       ;;
6377
6378     solaris*)
6379       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6380       if test "$GCC" = yes; then
6381         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6382         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6383           $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6384       else
6385         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6386         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6387         $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6388       fi
6389       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6390       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6391       case $host_os in
6392       solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6393       *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6394         _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6395       esac
6396       _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6397       ;;
6398
6399     sunos4*)
6400       if test "x$host_vendor" = xsequent; then
6401         # Use $CC to link under sequent, because it throws in some extra .o
6402         # files that make .init and .fini sections work.
6403         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6404       else
6405         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6406       fi
6407       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6408       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6409       _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6410       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6411       ;;
6412
6413     sysv4)
6414       case $host_vendor in
6415         sni)
6416           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6417           _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6418         ;;
6419         siemens)
6420           ## LD is ld it makes a PLAMLIB
6421           ## CC just makes a GrossModule.
6422           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6423           _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6424           _LT_AC_TAGVAR(hardcode_direct, $1)=no
6425         ;;
6426         motorola)
6427           _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6428           _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6429         ;;
6430       esac
6431       runpath_var='LD_RUN_PATH'
6432       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6433       ;;
6434
6435     sysv4.3*)
6436       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6437       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6438       _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6439       ;;
6440
6441     sysv4*MP*)
6442       if test -d /usr/nec; then
6443         _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6444         _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6445         runpath_var=LD_RUN_PATH
6446         hardcode_runpath_var=yes
6447         _LT_AC_TAGVAR(ld_shlibs, $1)=yes
6448       fi
6449       ;;
6450
6451     sysv4.2uw2*)
6452       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6453       _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6454       _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
6455       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6456       hardcode_runpath_var=yes
6457       runpath_var=LD_RUN_PATH
6458       ;;
6459
6460    sysv5OpenUNIX8* | sysv5UnixWare7* |  sysv5uw[[78]]* | unixware7*)
6461       _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
6462       if test "$GCC" = yes; then
6463         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6464       else
6465         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6466       fi
6467       runpath_var='LD_RUN_PATH'
6468       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6469       ;;
6470
6471     sysv5*)
6472       _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6473       # $CC -shared without GNU ld will not create a library from C++
6474       # object files and a static libstdc++, better avoid it by now
6475       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6476       _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6477                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6478       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
6479       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6480       runpath_var='LD_RUN_PATH'
6481       ;;
6482
6483     uts4*)
6484       _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6485       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6486       _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6487       ;;
6488
6489     *)
6490       _LT_AC_TAGVAR(ld_shlibs, $1)=no
6491       ;;
6492     esac
6493   fi
6494 ])
6495 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6496 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6497
6498 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6499 if test "$GCC" = yes; then
6500   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6501 fi
6502
6503 #
6504 # Do we need to explicitly link libc?
6505 #
6506 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6507 x|xyes)
6508   # Assume -lc should be added
6509   _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6510
6511   if test "$enable_shared" = yes && test "$GCC" = yes; then
6512     case $_LT_AC_TAGVAR(archive_cmds, $1) in
6513     *'~'*)
6514       # FIXME: we may have to deal with multi-command sequences.
6515       ;;
6516     '$CC '*)
6517       # Test whether the compiler implicitly links with -lc since on some
6518       # systems, -lgcc has to come before -lc. If gcc already passes -lc
6519       # to ld, don't add -lc before -lgcc.
6520       AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6521       $rm conftest*
6522       printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6523   
6524       if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6525         soname=conftest
6526         lib=conftest
6527         libobjs=conftest.$ac_objext
6528         deplibs=
6529         wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6530         compiler_flags=-v
6531         linker_flags=-v
6532         verstring=
6533         output_objdir=.
6534         libname=conftest
6535         lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6536         _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6537         if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6538         then
6539           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6540         else
6541           _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6542         fi
6543         _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6544       else
6545         cat conftest.err 1>&5
6546       fi
6547       $rm conftest*
6548       AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6549       ;;
6550     esac
6551   fi
6552   ;;
6553 esac
6554 ])# AC_LIBTOOL_PROG_LD_SHLIBS
6555
6556
6557 # _LT_AC_FILE_LTDLL_C
6558 # -------------------
6559 # Be careful that the start marker always follows a newline.
6560 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6561 # /* ltdll.c starts here */
6562 # #define WIN32_LEAN_AND_MEAN
6563 # #include <windows.h>
6564 # #undef WIN32_LEAN_AND_MEAN
6565 # #include <stdio.h>
6566 #
6567 # #ifndef __CYGWIN__
6568 # #  ifdef __CYGWIN32__
6569 # #    define __CYGWIN__ __CYGWIN32__
6570 # #  endif
6571 # #endif
6572 #
6573 # #ifdef __cplusplus
6574 # extern "C" {
6575 # #endif
6576 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6577 # #ifdef __cplusplus
6578 # }
6579 # #endif
6580 #
6581 # #ifdef __CYGWIN__
6582 # #include <cygwin/cygwin_dll.h>
6583 # DECLARE_CYGWIN_DLL( DllMain );
6584 # #endif
6585 # HINSTANCE __hDllInstance_base;
6586 #
6587 # BOOL APIENTRY
6588 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6589 # {
6590 #   __hDllInstance_base = hInst;
6591 #   return TRUE;
6592 # }
6593 # /* ltdll.c ends here */
6594 ])# _LT_AC_FILE_LTDLL_C
6595
6596
6597 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6598 # ---------------------------------
6599 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6600
6601
6602 # old names
6603 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6604 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6605 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6606 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6607 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6608 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6609 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6610
6611 # This is just to silence aclocal about the macro not being used
6612 ifelse([AC_DISABLE_FAST_INSTALL])
6613
6614 AC_DEFUN([LT_AC_PROG_GCJ],
6615 [AC_CHECK_TOOL(GCJ, gcj, no)
6616   test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6617   AC_SUBST(GCJFLAGS)
6618 ])
6619
6620 AC_DEFUN([LT_AC_PROG_RC],
6621 [AC_CHECK_TOOL(RC, windres, no)
6622 ])
6623
6624 # NOTE: This macro has been submitted for inclusion into   #
6625 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6626 #  a released version of Autoconf we should remove this    #
6627 #  macro and use it instead.                               #
6628 # LT_AC_PROG_SED
6629 # --------------
6630 # Check for a fully-functional sed program, that truncates
6631 # as few characters as possible.  Prefer GNU sed if found.
6632 AC_DEFUN([LT_AC_PROG_SED],
6633 [AC_MSG_CHECKING([for a sed that does not truncate output])
6634 AC_CACHE_VAL(lt_cv_path_SED,
6635 [# Loop through the user's path and test for sed and gsed.
6636 # Then use that list of sed's as ones to test for truncation.
6637 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6638 for as_dir in $PATH
6639 do
6640   IFS=$as_save_IFS
6641   test -z "$as_dir" && as_dir=.
6642   for lt_ac_prog in sed gsed; do
6643     for ac_exec_ext in '' $ac_executable_extensions; do
6644       if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6645         lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6646       fi
6647     done
6648   done
6649 done
6650 lt_ac_max=0
6651 lt_ac_count=0
6652 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6653 # along with /bin/sed that truncates output.
6654 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6655   test ! -f $lt_ac_sed && break
6656   cat /dev/null > conftest.in
6657   lt_ac_count=0
6658   echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6659   # Check for GNU sed and select it if it is found.
6660   if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6661     lt_cv_path_SED=$lt_ac_sed
6662     break
6663   fi
6664   while true; do
6665     cat conftest.in conftest.in >conftest.tmp
6666     mv conftest.tmp conftest.in
6667     cp conftest.in conftest.nl
6668     echo >>conftest.nl
6669     $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6670     cmp -s conftest.out conftest.nl || break
6671     # 10000 chars as input seems more than enough
6672     test $lt_ac_count -gt 10 && break
6673     lt_ac_count=`expr $lt_ac_count + 1`
6674     if test $lt_ac_count -gt $lt_ac_max; then
6675       lt_ac_max=$lt_ac_count
6676       lt_cv_path_SED=$lt_ac_sed
6677     fi
6678   done
6679 done
6680 SED=$lt_cv_path_SED
6681 ])
6682 AC_MSG_RESULT([$SED])
6683 ])
6684