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