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