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