http://prdownloads.sourceforge.net/lufs/lufs-0.9.6.tar.gz?download
[lufs.git] / aclocal.m4
1 # generated automatically by aclocal 1.7.5 -*- Autoconf -*-
2
3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
4 # Free Software Foundation, Inc.
5 # This file is free software; the Free Software Foundation
6 # gives unlimited permission to copy and/or distribute it,
7 # with or without modifications, as long as this notice is preserved.
8
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11 # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12 # PARTICULAR PURPOSE.
13
14 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
15
16 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
17
18 # This program is free software; you can redistribute it and/or modify
19 # it under the terms of the GNU General Public License as published by
20 # the Free Software Foundation; either version 2, or (at your option)
21 # any later version.
22
23 # This program is distributed in the hope that it will be useful,
24 # but WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26 # GNU General Public License for more details.
27
28 # You should have received a copy of the GNU General Public License
29 # along with this program; if not, write to the Free Software
30 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
31 # 02111-1307, USA.
32
33 AC_PREREQ([2.52])
34
35 # serial 6
36
37 # AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
38 AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
39
40 # Do all the work for Automake.                            -*- Autoconf -*-
41
42 # This macro actually does too much some checks are only needed if
43 # your package does certain things.  But this isn't really a big deal.
44
45 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
46 # Free Software Foundation, Inc.
47
48 # This program is free software; you can redistribute it and/or modify
49 # it under the terms of the GNU General Public License as published by
50 # the Free Software Foundation; either version 2, or (at your option)
51 # any later version.
52
53 # This program is distributed in the hope that it will be useful,
54 # but WITHOUT ANY WARRANTY; without even the implied warranty of
55 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
56 # GNU General Public License for more details.
57
58 # You should have received a copy of the GNU General Public License
59 # along with this program; if not, write to the Free Software
60 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
61 # 02111-1307, USA.
62
63 # serial 10
64
65 AC_PREREQ([2.54])
66
67 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
68 # the ones we care about.
69 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
70
71 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
72 # AM_INIT_AUTOMAKE([OPTIONS])
73 # -----------------------------------------------
74 # The call with PACKAGE and VERSION arguments is the old style
75 # call (pre autoconf-2.50), which is being phased out.  PACKAGE
76 # and VERSION should now be passed to AC_INIT and removed from
77 # the call to AM_INIT_AUTOMAKE.
78 # We support both call styles for the transition.  After
79 # the next Automake release, Autoconf can make the AC_INIT
80 # arguments mandatory, and then we can depend on a new Autoconf
81 # release and drop the old call support.
82 AC_DEFUN([AM_INIT_AUTOMAKE],
83 [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
84  AC_REQUIRE([AC_PROG_INSTALL])dnl
85 # test to see if srcdir already configured
86 if test "`cd $srcdir && pwd`" != "`pwd`" &&
87    test -f $srcdir/config.status; then
88   AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
89 fi
90
91 # test whether we have cygpath
92 if test -z "$CYGPATH_W"; then
93   if (cygpath --version) >/dev/null 2>/dev/null; then
94     CYGPATH_W='cygpath -w'
95   else
96     CYGPATH_W=echo
97   fi
98 fi
99 AC_SUBST([CYGPATH_W])
100
101 # Define the identity of the package.
102 dnl Distinguish between old-style and new-style calls.
103 m4_ifval([$2],
104 [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
105  AC_SUBST([PACKAGE], [$1])dnl
106  AC_SUBST([VERSION], [$2])],
107 [_AM_SET_OPTIONS([$1])dnl
108  AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
109  AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
110
111 _AM_IF_OPTION([no-define],,
112 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
113  AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
114
115 # Some tools Automake needs.
116 AC_REQUIRE([AM_SANITY_CHECK])dnl
117 AC_REQUIRE([AC_ARG_PROGRAM])dnl
118 AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
119 AM_MISSING_PROG(AUTOCONF, autoconf)
120 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
121 AM_MISSING_PROG(AUTOHEADER, autoheader)
122 AM_MISSING_PROG(MAKEINFO, makeinfo)
123 AM_MISSING_PROG(AMTAR, tar)
124 AM_PROG_INSTALL_SH
125 AM_PROG_INSTALL_STRIP
126 # We need awk for the "check" target.  The system "awk" is bad on
127 # some platforms.
128 AC_REQUIRE([AC_PROG_AWK])dnl
129 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
130 AC_REQUIRE([AM_SET_LEADING_DOT])dnl
131
132 _AM_IF_OPTION([no-dependencies],,
133 [AC_PROVIDE_IFELSE([AC_PROG_CC],
134                   [_AM_DEPENDENCIES(CC)],
135                   [define([AC_PROG_CC],
136                           defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
137 AC_PROVIDE_IFELSE([AC_PROG_CXX],
138                   [_AM_DEPENDENCIES(CXX)],
139                   [define([AC_PROG_CXX],
140                           defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
141 ])
142 ])
143
144
145 # When config.status generates a header, we must update the stamp-h file.
146 # This file resides in the same directory as the config header
147 # that is generated.  The stamp files are numbered to have different names.
148
149 # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
150 # loop where config.status creates the headers, so we can generate
151 # our stamp files there.
152 AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
153 [# Compute $1's index in $config_headers.
154 _am_stamp_count=1
155 for _am_header in $config_headers :; do
156   case $_am_header in
157     $1 | $1:* )
158       break ;;
159     * )
160       _am_stamp_count=`expr $_am_stamp_count + 1` ;;
161   esac
162 done
163 echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
164
165 # Copyright 2002  Free Software Foundation, Inc.
166
167 # This program is free software; you can redistribute it and/or modify
168 # it under the terms of the GNU General Public License as published by
169 # the Free Software Foundation; either version 2, or (at your option)
170 # any later version.
171
172 # This program is distributed in the hope that it will be useful,
173 # but WITHOUT ANY WARRANTY; without even the implied warranty of
174 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
175 # GNU General Public License for more details.
176
177 # You should have received a copy of the GNU General Public License
178 # along with this program; if not, write to the Free Software
179 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
180
181 # AM_AUTOMAKE_VERSION(VERSION)
182 # ----------------------------
183 # Automake X.Y traces this macro to ensure aclocal.m4 has been
184 # generated from the m4 files accompanying Automake X.Y.
185 AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
186
187 # AM_SET_CURRENT_AUTOMAKE_VERSION
188 # -------------------------------
189 # Call AM_AUTOMAKE_VERSION so it can be traced.
190 # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
191 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
192          [AM_AUTOMAKE_VERSION([1.7.5])])
193
194 # Helper functions for option handling.                    -*- Autoconf -*-
195
196 # Copyright 2001, 2002  Free Software Foundation, Inc.
197
198 # This program is free software; you can redistribute it and/or modify
199 # it under the terms of the GNU General Public License as published by
200 # the Free Software Foundation; either version 2, or (at your option)
201 # any later version.
202
203 # This program is distributed in the hope that it will be useful,
204 # but WITHOUT ANY WARRANTY; without even the implied warranty of
205 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
206 # GNU General Public License for more details.
207
208 # You should have received a copy of the GNU General Public License
209 # along with this program; if not, write to the Free Software
210 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
211 # 02111-1307, USA.
212
213 # serial 2
214
215 # _AM_MANGLE_OPTION(NAME)
216 # -----------------------
217 AC_DEFUN([_AM_MANGLE_OPTION],
218 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
219
220 # _AM_SET_OPTION(NAME)
221 # ------------------------------
222 # Set option NAME.  Presently that only means defining a flag for this option.
223 AC_DEFUN([_AM_SET_OPTION],
224 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
225
226 # _AM_SET_OPTIONS(OPTIONS)
227 # ----------------------------------
228 # OPTIONS is a space-separated list of Automake options.
229 AC_DEFUN([_AM_SET_OPTIONS],
230 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
231
232 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
233 # -------------------------------------------
234 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
235 AC_DEFUN([_AM_IF_OPTION],
236 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
237
238 #
239 # Check to make sure that the build environment is sane.
240 #
241
242 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
243
244 # This program is free software; you can redistribute it and/or modify
245 # it under the terms of the GNU General Public License as published by
246 # the Free Software Foundation; either version 2, or (at your option)
247 # any later version.
248
249 # This program is distributed in the hope that it will be useful,
250 # but WITHOUT ANY WARRANTY; without even the implied warranty of
251 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
252 # GNU General Public License for more details.
253
254 # You should have received a copy of the GNU General Public License
255 # along with this program; if not, write to the Free Software
256 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
257 # 02111-1307, USA.
258
259 # serial 3
260
261 # AM_SANITY_CHECK
262 # ---------------
263 AC_DEFUN([AM_SANITY_CHECK],
264 [AC_MSG_CHECKING([whether build environment is sane])
265 # Just in case
266 sleep 1
267 echo timestamp > conftest.file
268 # Do `set' in a subshell so we don't clobber the current shell's
269 # arguments.  Must try -L first in case configure is actually a
270 # symlink; some systems play weird games with the mod time of symlinks
271 # (eg FreeBSD returns the mod time of the symlink's containing
272 # directory).
273 if (
274    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
275    if test "$[*]" = "X"; then
276       # -L didn't work.
277       set X `ls -t $srcdir/configure conftest.file`
278    fi
279    rm -f conftest.file
280    if test "$[*]" != "X $srcdir/configure conftest.file" \
281       && test "$[*]" != "X conftest.file $srcdir/configure"; then
282
283       # If neither matched, then we have a broken ls.  This can happen
284       # if, for instance, CONFIG_SHELL is bash and it inherits a
285       # broken ls alias from the environment.  This has actually
286       # happened.  Such a system could not be considered "sane".
287       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
288 alias in your environment])
289    fi
290
291    test "$[2]" = conftest.file
292    )
293 then
294    # Ok.
295    :
296 else
297    AC_MSG_ERROR([newly created file is older than distributed files!
298 Check your system clock])
299 fi
300 AC_MSG_RESULT(yes)])
301
302 #  -*- Autoconf -*-
303
304
305 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
306
307 # This program is free software; you can redistribute it and/or modify
308 # it under the terms of the GNU General Public License as published by
309 # the Free Software Foundation; either version 2, or (at your option)
310 # any later version.
311
312 # This program is distributed in the hope that it will be useful,
313 # but WITHOUT ANY WARRANTY; without even the implied warranty of
314 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
315 # GNU General Public License for more details.
316
317 # You should have received a copy of the GNU General Public License
318 # along with this program; if not, write to the Free Software
319 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
320 # 02111-1307, USA.
321
322 # serial 3
323
324 # AM_MISSING_PROG(NAME, PROGRAM)
325 # ------------------------------
326 AC_DEFUN([AM_MISSING_PROG],
327 [AC_REQUIRE([AM_MISSING_HAS_RUN])
328 $1=${$1-"${am_missing_run}$2"}
329 AC_SUBST($1)])
330
331
332 # AM_MISSING_HAS_RUN
333 # ------------------
334 # Define MISSING if not defined so far and test if it supports --run.
335 # If it does, set am_missing_run to use it, otherwise, to nothing.
336 AC_DEFUN([AM_MISSING_HAS_RUN],
337 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
338 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
339 # Use eval to expand $SHELL
340 if eval "$MISSING --run true"; then
341   am_missing_run="$MISSING --run "
342 else
343   am_missing_run=
344   AC_MSG_WARN([`missing' script is too old or missing])
345 fi
346 ])
347
348 # AM_AUX_DIR_EXPAND
349
350 # Copyright 2001 Free Software Foundation, Inc.
351
352 # This program is free software; you can redistribute it and/or modify
353 # it under the terms of the GNU General Public License as published by
354 # the Free Software Foundation; either version 2, or (at your option)
355 # any later version.
356
357 # This program is distributed in the hope that it will be useful,
358 # but WITHOUT ANY WARRANTY; without even the implied warranty of
359 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
360 # GNU General Public License for more details.
361
362 # You should have received a copy of the GNU General Public License
363 # along with this program; if not, write to the Free Software
364 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
365 # 02111-1307, USA.
366
367 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
368 # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
369 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
370 #
371 # Of course, Automake must honor this variable whenever it calls a
372 # tool from the auxiliary directory.  The problem is that $srcdir (and
373 # therefore $ac_aux_dir as well) can be either absolute or relative,
374 # depending on how configure is run.  This is pretty annoying, since
375 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
376 # source directory, any form will work fine, but in subdirectories a
377 # relative path needs to be adjusted first.
378 #
379 # $ac_aux_dir/missing
380 #    fails when called from a subdirectory if $ac_aux_dir is relative
381 # $top_srcdir/$ac_aux_dir/missing
382 #    fails if $ac_aux_dir is absolute,
383 #    fails when called from a subdirectory in a VPATH build with
384 #          a relative $ac_aux_dir
385 #
386 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
387 # are both prefixed by $srcdir.  In an in-source build this is usually
388 # harmless because $srcdir is `.', but things will broke when you
389 # start a VPATH build or use an absolute $srcdir.
390 #
391 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
392 # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
393 #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
394 # and then we would define $MISSING as
395 #   MISSING="\${SHELL} $am_aux_dir/missing"
396 # This will work as long as MISSING is not called from configure, because
397 # unfortunately $(top_srcdir) has no meaning in configure.
398 # However there are other variables, like CC, which are often used in
399 # configure, and could therefore not use this "fixed" $ac_aux_dir.
400 #
401 # Another solution, used here, is to always expand $ac_aux_dir to an
402 # absolute PATH.  The drawback is that using absolute paths prevent a
403 # configured tree to be moved without reconfiguration.
404
405 # Rely on autoconf to set up CDPATH properly.
406 AC_PREREQ([2.50])
407
408 AC_DEFUN([AM_AUX_DIR_EXPAND], [
409 # expand $ac_aux_dir to an absolute path
410 am_aux_dir=`cd $ac_aux_dir && pwd`
411 ])
412
413 # AM_PROG_INSTALL_SH
414 # ------------------
415 # Define $install_sh.
416
417 # Copyright 2001 Free Software Foundation, Inc.
418
419 # This program is free software; you can redistribute it and/or modify
420 # it under the terms of the GNU General Public License as published by
421 # the Free Software Foundation; either version 2, or (at your option)
422 # any later version.
423
424 # This program is distributed in the hope that it will be useful,
425 # but WITHOUT ANY WARRANTY; without even the implied warranty of
426 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
427 # GNU General Public License for more details.
428
429 # You should have received a copy of the GNU General Public License
430 # along with this program; if not, write to the Free Software
431 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
432 # 02111-1307, USA.
433
434 AC_DEFUN([AM_PROG_INSTALL_SH],
435 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
436 install_sh=${install_sh-"$am_aux_dir/install-sh"}
437 AC_SUBST(install_sh)])
438
439 # AM_PROG_INSTALL_STRIP
440
441 # Copyright 2001 Free Software Foundation, Inc.
442
443 # This program is free software; you can redistribute it and/or modify
444 # it under the terms of the GNU General Public License as published by
445 # the Free Software Foundation; either version 2, or (at your option)
446 # any later version.
447
448 # This program is distributed in the hope that it will be useful,
449 # but WITHOUT ANY WARRANTY; without even the implied warranty of
450 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
451 # GNU General Public License for more details.
452
453 # You should have received a copy of the GNU General Public License
454 # along with this program; if not, write to the Free Software
455 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
456 # 02111-1307, USA.
457
458 # One issue with vendor `install' (even GNU) is that you can't
459 # specify the program used to strip binaries.  This is especially
460 # annoying in cross-compiling environments, where the build's strip
461 # is unlikely to handle the host's binaries.
462 # Fortunately install-sh will honor a STRIPPROG variable, so we
463 # always use install-sh in `make install-strip', and initialize
464 # STRIPPROG with the value of the STRIP variable (set by the user).
465 AC_DEFUN([AM_PROG_INSTALL_STRIP],
466 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
467 # Installed binaries are usually stripped using `strip' when the user
468 # run `make install-strip'.  However `strip' might not be the right
469 # tool to use in cross-compilation environments, therefore Automake
470 # will honor the `STRIP' environment variable to overrule this program.
471 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
472 if test "$cross_compiling" != no; then
473   AC_CHECK_TOOL([STRIP], [strip], :)
474 fi
475 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
476 AC_SUBST([INSTALL_STRIP_PROGRAM])])
477
478 #                                                          -*- Autoconf -*-
479 # Copyright (C) 2003  Free Software Foundation, Inc.
480
481 # This program is free software; you can redistribute it and/or modify
482 # it under the terms of the GNU General Public License as published by
483 # the Free Software Foundation; either version 2, or (at your option)
484 # any later version.
485
486 # This program is distributed in the hope that it will be useful,
487 # but WITHOUT ANY WARRANTY; without even the implied warranty of
488 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
489 # GNU General Public License for more details.
490
491 # You should have received a copy of the GNU General Public License
492 # along with this program; if not, write to the Free Software
493 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
494 # 02111-1307, USA.
495
496 # serial 1
497
498 # Check whether the underlying file-system supports filenames
499 # with a leading dot.  For instance MS-DOS doesn't.
500 AC_DEFUN([AM_SET_LEADING_DOT],
501 [rm -rf .tst 2>/dev/null
502 mkdir .tst 2>/dev/null
503 if test -d .tst; then
504   am__leading_dot=.
505 else
506   am__leading_dot=_
507 fi
508 rmdir .tst 2>/dev/null
509 AC_SUBST([am__leading_dot])])
510
511 # serial 5                                              -*- Autoconf -*-
512
513 # Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
514
515 # This program is free software; you can redistribute it and/or modify
516 # it under the terms of the GNU General Public License as published by
517 # the Free Software Foundation; either version 2, or (at your option)
518 # any later version.
519
520 # This program is distributed in the hope that it will be useful,
521 # but WITHOUT ANY WARRANTY; without even the implied warranty of
522 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
523 # GNU General Public License for more details.
524
525 # You should have received a copy of the GNU General Public License
526 # along with this program; if not, write to the Free Software
527 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
528 # 02111-1307, USA.
529
530
531 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
532 # written in clear, in which case automake, when reading aclocal.m4,
533 # will think it sees a *use*, and therefore will trigger all it's
534 # C support machinery.  Also note that it means that autoscan, seeing
535 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
536
537
538
539 # _AM_DEPENDENCIES(NAME)
540 # ----------------------
541 # See how the compiler implements dependency checking.
542 # NAME is "CC", "CXX", "GCJ", or "OBJC".
543 # We try a few techniques and use that to set a single cache variable.
544 #
545 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
546 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
547 # dependency, and given that the user is not expected to run this macro,
548 # just rely on AC_PROG_CC.
549 AC_DEFUN([_AM_DEPENDENCIES],
550 [AC_REQUIRE([AM_SET_DEPDIR])dnl
551 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
552 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
553 AC_REQUIRE([AM_DEP_TRACK])dnl
554
555 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
556        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
557        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
558        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
559                    [depcc="$$1"   am_compiler_list=])
560
561 AC_CACHE_CHECK([dependency style of $depcc],
562                [am_cv_$1_dependencies_compiler_type],
563 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
564   # We make a subdir and do the tests there.  Otherwise we can end up
565   # making bogus files that we don't know about and never remove.  For
566   # instance it was reported that on HP-UX the gcc test will end up
567   # making a dummy file named `D' -- because `-MD' means `put the output
568   # in D'.
569   mkdir conftest.dir
570   # Copy depcomp to subdir because otherwise we won't find it if we're
571   # using a relative directory.
572   cp "$am_depcomp" conftest.dir
573   cd conftest.dir
574
575   am_cv_$1_dependencies_compiler_type=none
576   if test "$am_compiler_list" = ""; then
577      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
578   fi
579   for depmode in $am_compiler_list; do
580     # We need to recreate these files for each test, as the compiler may
581     # overwrite some of them when testing with obscure command lines.
582     # This happens at least with the AIX C compiler.
583     echo '#include "conftest.h"' > conftest.c
584     echo 'int i;' > conftest.h
585     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
586
587     case $depmode in
588     nosideeffect)
589       # after this tag, mechanisms are not by side-effect, so they'll
590       # only be used when explicitly requested
591       if test "x$enable_dependency_tracking" = xyes; then
592         continue
593       else
594         break
595       fi
596       ;;
597     none) break ;;
598     esac
599     # We check with `-c' and `-o' for the sake of the "dashmstdout"
600     # mode.  It turns out that the SunPro C++ compiler does not properly
601     # handle `-M -o', and we need to detect this.
602     if depmode=$depmode \
603        source=conftest.c object=conftest.o \
604        depfile=conftest.Po tmpdepfile=conftest.TPo \
605        $SHELL ./depcomp $depcc -c -o conftest.o conftest.c \
606          >/dev/null 2>conftest.err &&
607        grep conftest.h conftest.Po > /dev/null 2>&1 &&
608        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
609       # icc doesn't choke on unknown options, it will just issue warnings
610       # (even with -Werror).  So we grep stderr for any message
611       # that says an option was ignored.
612       if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
613         am_cv_$1_dependencies_compiler_type=$depmode
614         break
615       fi
616     fi
617   done
618
619   cd ..
620   rm -rf conftest.dir
621 else
622   am_cv_$1_dependencies_compiler_type=none
623 fi
624 ])
625 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
626 AM_CONDITIONAL([am__fastdep$1], [
627   test "x$enable_dependency_tracking" != xno \
628   && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
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 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
638 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
639 ])
640
641
642 # AM_DEP_TRACK
643 # ------------
644 AC_DEFUN([AM_DEP_TRACK],
645 [AC_ARG_ENABLE(dependency-tracking,
646 [  --disable-dependency-tracking Speeds up one-time builds
647   --enable-dependency-tracking  Do not reject slow dependency extractors])
648 if test "x$enable_dependency_tracking" != xno; then
649   am_depcomp="$ac_aux_dir/depcomp"
650   AMDEPBACKSLASH='\'
651 fi
652 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
653 AC_SUBST([AMDEPBACKSLASH])
654 ])
655
656 # Generate code to set up dependency tracking.   -*- Autoconf -*-
657
658 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
659
660 # This program is free software; you can redistribute it and/or modify
661 # it under the terms of the GNU General Public License as published by
662 # the Free Software Foundation; either version 2, or (at your option)
663 # any later version.
664
665 # This program is distributed in the hope that it will be useful,
666 # but WITHOUT ANY WARRANTY; without even the implied warranty of
667 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
668 # GNU General Public License for more details.
669
670 # You should have received a copy of the GNU General Public License
671 # along with this program; if not, write to the Free Software
672 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
673 # 02111-1307, USA.
674
675 #serial 2
676
677 # _AM_OUTPUT_DEPENDENCY_COMMANDS
678 # ------------------------------
679 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
680 [for mf in $CONFIG_FILES; do
681   # Strip MF so we end up with the name of the file.
682   mf=`echo "$mf" | sed -e 's/:.*$//'`
683   # Check whether this is an Automake generated Makefile or not.
684   # We used to match only the files named `Makefile.in', but
685   # some people rename them; so instead we look at the file content.
686   # Grep'ing the first line is not enough: some people post-process
687   # each Makefile.in and add a new line on top of each file to say so.
688   # So let's grep whole file.
689   if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
690     dirpart=`AS_DIRNAME("$mf")`
691   else
692     continue
693   fi
694   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
695   # Extract the definition of DEP_FILES from the Makefile without
696   # running `make'.
697   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
698   test -z "$DEPDIR" && continue
699   # When using ansi2knr, U may be empty or an underscore; expand it
700   U=`sed -n -e '/^U = / s///p' < "$mf"`
701   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
702   # We invoke sed twice because it is the simplest approach to
703   # changing $(DEPDIR) to its actual value in the expansion.
704   for file in `sed -n -e '
705     /^DEP_FILES = .*\\\\$/ {
706       s/^DEP_FILES = //
707       :loop
708         s/\\\\$//
709         p
710         n
711         /\\\\$/ b loop
712       p
713     }
714     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
715        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
716     # Make sure the directory exists.
717     test -f "$dirpart/$file" && continue
718     fdir=`AS_DIRNAME(["$file"])`
719     AS_MKDIR_P([$dirpart/$fdir])
720     # echo "creating $dirpart/$file"
721     echo '# dummy' > "$dirpart/$file"
722   done
723 done
724 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
725
726
727 # AM_OUTPUT_DEPENDENCY_COMMANDS
728 # -----------------------------
729 # This macro should only be invoked once -- use via AC_REQUIRE.
730 #
731 # This code is only required when automatic dependency tracking
732 # is enabled.  FIXME.  This creates each `.P' file that we will
733 # need in order to bootstrap the dependency handling code.
734 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
735 [AC_CONFIG_COMMANDS([depfiles],
736      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
737      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
738 ])
739
740 # Check to see how 'make' treats includes.      -*- Autoconf -*-
741
742 # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
743
744 # This program is free software; you can redistribute it and/or modify
745 # it under the terms of the GNU General Public License as published by
746 # the Free Software Foundation; either version 2, or (at your option)
747 # any later version.
748
749 # This program is distributed in the hope that it will be useful,
750 # but WITHOUT ANY WARRANTY; without even the implied warranty of
751 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
752 # GNU General Public License for more details.
753
754 # You should have received a copy of the GNU General Public License
755 # along with this program; if not, write to the Free Software
756 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
757 # 02111-1307, USA.
758
759 # serial 2
760
761 # AM_MAKE_INCLUDE()
762 # -----------------
763 # Check to see how make treats includes.
764 AC_DEFUN([AM_MAKE_INCLUDE],
765 [am_make=${MAKE-make}
766 cat > confinc << 'END'
767 am__doit:
768         @echo done
769 .PHONY: am__doit
770 END
771 # If we don't find an include directive, just comment out the code.
772 AC_MSG_CHECKING([for style of include used by $am_make])
773 am__include="#"
774 am__quote=
775 _am_result=none
776 # First try GNU make style include.
777 echo "include confinc" > confmf
778 # We grep out `Entering directory' and `Leaving directory'
779 # messages which can occur if `w' ends up in MAKEFLAGS.
780 # In particular we don't look at `^make:' because GNU make might
781 # be invoked under some other name (usually "gmake"), in which
782 # case it prints its new name instead of `make'.
783 if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
784    am__include=include
785    am__quote=
786    _am_result=GNU
787 fi
788 # Now try BSD make style include.
789 if test "$am__include" = "#"; then
790    echo '.include "confinc"' > confmf
791    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
792       am__include=.include
793       am__quote="\""
794       _am_result=BSD
795    fi
796 fi
797 AC_SUBST([am__include])
798 AC_SUBST([am__quote])
799 AC_MSG_RESULT([$_am_result])
800 rm -f confinc confmf
801 ])
802
803 # AM_CONDITIONAL                                              -*- Autoconf -*-
804
805 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
806
807 # This program is free software; you can redistribute it and/or modify
808 # it under the terms of the GNU General Public License as published by
809 # the Free Software Foundation; either version 2, or (at your option)
810 # any later version.
811
812 # This program is distributed in the hope that it will be useful,
813 # but WITHOUT ANY WARRANTY; without even the implied warranty of
814 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
815 # GNU General Public License for more details.
816
817 # You should have received a copy of the GNU General Public License
818 # along with this program; if not, write to the Free Software
819 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
820 # 02111-1307, USA.
821
822 # serial 5
823
824 AC_PREREQ(2.52)
825
826 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
827 # -------------------------------------
828 # Define a conditional.
829 AC_DEFUN([AM_CONDITIONAL],
830 [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
831         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
832 AC_SUBST([$1_TRUE])
833 AC_SUBST([$1_FALSE])
834 if $2; then
835   $1_TRUE=
836   $1_FALSE='#'
837 else
838   $1_TRUE='#'
839   $1_FALSE=
840 fi
841 AC_CONFIG_COMMANDS_PRE(
842 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
843   AC_MSG_ERROR([conditional "$1" was never defined.
844 Usually this means the macro was only invoked conditionally.])
845 fi])])
846
847 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
848
849 # serial 46 AC_PROG_LIBTOOL
850
851 AC_DEFUN([AC_PROG_LIBTOOL],
852 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
853
854 # This can be used to rebuild libtool when needed
855 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
856
857 # Always use our own libtool.
858 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
859 AC_SUBST(LIBTOOL)dnl
860
861 # Prevent multiple expansion
862 define([AC_PROG_LIBTOOL], [])
863 ])
864
865 AC_DEFUN([AC_LIBTOOL_SETUP],
866 [AC_PREREQ(2.13)dnl
867 AC_REQUIRE([AC_ENABLE_SHARED])dnl
868 AC_REQUIRE([AC_ENABLE_STATIC])dnl
869 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
870 AC_REQUIRE([AC_CANONICAL_HOST])dnl
871 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
872 AC_REQUIRE([AC_PROG_CC])dnl
873 AC_REQUIRE([AC_PROG_LD])dnl
874 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
875 AC_REQUIRE([AC_PROG_NM])dnl
876 AC_REQUIRE([LT_AC_PROG_SED])dnl
877
878 AC_REQUIRE([AC_PROG_LN_S])dnl
879 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
880 AC_REQUIRE([AC_OBJEXT])dnl
881 AC_REQUIRE([AC_EXEEXT])dnl
882 dnl
883
884 _LT_AC_PROG_ECHO_BACKSLASH
885 # Only perform the check for file, if the check method requires it
886 case $deplibs_check_method in
887 file_magic*)
888   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
889     AC_PATH_MAGIC
890   fi
891   ;;
892 esac
893
894 AC_CHECK_TOOL(RANLIB, ranlib, :)
895 AC_CHECK_TOOL(STRIP, strip, :)
896
897 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
898 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
899 enable_win32_dll=yes, enable_win32_dll=no)
900
901 AC_ARG_ENABLE(libtool-lock,
902   [  --disable-libtool-lock  avoid locking (might break parallel builds)])
903 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
904
905 # Some flags need to be propagated to the compiler or linker for good
906 # libtool support.
907 case $host in
908 *-*-irix6*)
909   # Find out which ABI we are using.
910   echo '[#]line __oline__ "configure"' > conftest.$ac_ext
911   if AC_TRY_EVAL(ac_compile); then
912     case `/usr/bin/file conftest.$ac_objext` in
913     *32-bit*)
914       LD="${LD-ld} -32"
915       ;;
916     *N32*)
917       LD="${LD-ld} -n32"
918       ;;
919     *64-bit*)
920       LD="${LD-ld} -64"
921       ;;
922     esac
923   fi
924   rm -rf conftest*
925   ;;
926
927 *-*-linux*)
928   # Test if the compiler is 64bit
929   echo 'int i;' > conftest.$ac_ext
930   lt_cv_cc_64bit_output=no
931   if AC_TRY_EVAL(ac_compile); then
932     case `/usr/bin/file conftest.$ac_objext` in
933     *"ELF 64"*)
934       lt_cv_cc_64bit_output=yes
935       ;;
936     esac
937   fi
938   rm -rf conftest*
939   ;;
940   
941 *-*-sco3.2v5*)
942   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
943   SAVE_CFLAGS="$CFLAGS"
944   CFLAGS="$CFLAGS -belf"
945   AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
946     [AC_LANG_SAVE
947      AC_LANG_C
948      AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
949      AC_LANG_RESTORE])
950   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
951     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
952     CFLAGS="$SAVE_CFLAGS"
953   fi
954   ;;
955
956 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
957 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
958   AC_CHECK_TOOL(DLLTOOL, dlltool, false)
959   AC_CHECK_TOOL(AS, as, false)
960   AC_CHECK_TOOL(OBJDUMP, objdump, false)
961
962   # recent cygwin and mingw systems supply a stub DllMain which the user
963   # can override, but on older systems we have to supply one
964   AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
965     [AC_TRY_LINK([],
966       [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
967       DllMain (0, 0, 0);],
968       [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
969
970   case $host/$CC in
971   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
972     # old mingw systems require "-dll" to link a DLL, while more recent ones
973     # require "-mdll"
974     SAVE_CFLAGS="$CFLAGS"
975     CFLAGS="$CFLAGS -mdll"
976     AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
977       [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
978     CFLAGS="$SAVE_CFLAGS" ;;
979   *-*-cygwin* | *-*-pw32*)
980     # cygwin systems need to pass --dll to the linker, and not link
981     # crt.o which will require a WinMain@16 definition.
982     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
983   esac
984   ;;
985   ])
986 esac
987
988 _LT_AC_LTCONFIG_HACK
989
990 ])
991
992 # AC_LIBTOOL_HEADER_ASSERT
993 # ------------------------
994 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
995 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
996     [lt_cv_func_assert_works],
997     [case $host in
998     *-*-solaris*)
999       if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
1000         case `$CC --version 2>/dev/null` in
1001         [[12]].*) lt_cv_func_assert_works=no ;;
1002         *)        lt_cv_func_assert_works=yes ;;
1003         esac
1004       fi
1005       ;;
1006     esac])
1007
1008 if test "x$lt_cv_func_assert_works" = xyes; then
1009   AC_CHECK_HEADERS(assert.h)
1010 fi
1011 ])# AC_LIBTOOL_HEADER_ASSERT
1012
1013 # _LT_AC_CHECK_DLFCN
1014 # --------------------
1015 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1016 [AC_CHECK_HEADERS(dlfcn.h)
1017 ])# _LT_AC_CHECK_DLFCN
1018
1019 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1020 # ---------------------------------
1021 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
1022 [AC_REQUIRE([AC_CANONICAL_HOST])
1023 AC_REQUIRE([AC_PROG_NM])
1024 AC_REQUIRE([AC_OBJEXT])
1025 # Check for command to grab the raw symbol name followed by C symbol from nm.
1026 AC_MSG_CHECKING([command to parse $NM output])
1027 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
1028
1029 # These are sane defaults that work on at least a few old systems.
1030 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
1031
1032 # Character class describing NM global symbol codes.
1033 symcode='[[BCDEGRST]]'
1034
1035 # Regexp to match symbols that can be accessed directly from C.
1036 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1037
1038 # Transform the above into a raw symbol and a C symbol.
1039 symxfrm='\1 \2\3 \3'
1040
1041 # Transform an extracted symbol line into a proper C declaration
1042 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
1043
1044 # Transform an extracted symbol line into symbol name and symbol address
1045 lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1046
1047 # Define system-specific variables.
1048 case $host_os in
1049 aix*)
1050   symcode='[[BCDT]]'
1051   ;;
1052 cygwin* | mingw* | pw32*)
1053   symcode='[[ABCDGISTW]]'
1054   ;;
1055 hpux*) # Its linker distinguishes data from code symbols
1056   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
1057   lt_cv_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
1058   ;;
1059 irix* | nonstopux*)
1060   symcode='[[BCDEGRST]]'
1061   ;;
1062 osf*)
1063   symcode='[[BCDEGQRST]]'
1064   ;;
1065 solaris* | sysv5*)
1066   symcode='[[BDT]]'
1067   ;;
1068 sysv4)
1069   symcode='[[DFNSTU]]'
1070   ;;
1071 esac
1072
1073 # Handle CRLF in mingw tool chain
1074 opt_cr=
1075 case $host_os in
1076 mingw*)
1077   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
1078   ;;
1079 esac
1080
1081 # If we're using GNU nm, then use its standard symbol codes.
1082 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
1083   symcode='[[ABCDGISTW]]'
1084 fi
1085
1086 # Try without a prefix undercore, then with it.
1087 for ac_symprfx in "" "_"; do
1088
1089   # Write the raw and C identifiers.
1090 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[        ]]\($symcode$symcode*\)[[       ]][[    ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
1091
1092   # Check to see that the pipe works correctly.
1093   pipe_works=no
1094   rm -f conftest*
1095   cat > conftest.$ac_ext <<EOF
1096 #ifdef __cplusplus
1097 extern "C" {
1098 #endif
1099 char nm_test_var;
1100 void nm_test_func(){}
1101 #ifdef __cplusplus
1102 }
1103 #endif
1104 int main(){nm_test_var='a';nm_test_func();return(0);}
1105 EOF
1106
1107   if AC_TRY_EVAL(ac_compile); then
1108     # Now try to grab the symbols.
1109     nlist=conftest.nm
1110     if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
1111       # Try sorting and uniquifying the output.
1112       if sort "$nlist" | uniq > "$nlist"T; then
1113         mv -f "$nlist"T "$nlist"
1114       else
1115         rm -f "$nlist"T
1116       fi
1117
1118       # Make sure that we snagged all the symbols we need.
1119       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
1120         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
1121           cat <<EOF > conftest.$ac_ext
1122 #ifdef __cplusplus
1123 extern "C" {
1124 #endif
1125
1126 EOF
1127           # Now generate the symbol file.
1128           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1129
1130           cat <<EOF >> conftest.$ac_ext
1131 #if defined (__STDC__) && __STDC__
1132 # define lt_ptr void *
1133 #else
1134 # define lt_ptr char *
1135 # define const
1136 #endif
1137
1138 /* The mapping between symbol names and symbols. */
1139 const struct {
1140   const char *name;
1141   lt_ptr address;
1142 }
1143 lt_preloaded_symbols[[]] =
1144 {
1145 EOF
1146           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1147           cat <<\EOF >> conftest.$ac_ext
1148   {0, (lt_ptr) 0}
1149 };
1150
1151 #ifdef __cplusplus
1152 }
1153 #endif
1154 EOF
1155           # Now try linking the two files.
1156           mv conftest.$ac_objext conftstm.$ac_objext
1157           save_LIBS="$LIBS"
1158           save_CFLAGS="$CFLAGS"
1159           LIBS="conftstm.$ac_objext"
1160           CFLAGS="$CFLAGS$no_builtin_flag"
1161           if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
1162             pipe_works=yes
1163           fi
1164           LIBS="$save_LIBS"
1165           CFLAGS="$save_CFLAGS"
1166         else
1167           echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1168         fi
1169       else
1170         echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1171       fi
1172     else
1173       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1174     fi
1175   else
1176     echo "$progname: failed program was:" >&AC_FD_CC
1177     cat conftest.$ac_ext >&5
1178   fi
1179   rm -f conftest* conftst*
1180
1181   # Do not use the global_symbol_pipe unless it works.
1182   if test "$pipe_works" = yes; then
1183     break
1184   else
1185     lt_cv_sys_global_symbol_pipe=
1186   fi
1187 done
1188 ])
1189 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
1190 if test -z "$lt_cv_sys_global_symbol_pipe"; then
1191   global_symbol_to_cdecl=
1192   global_symbol_to_c_name_address=
1193 else
1194   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
1195   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
1196 fi
1197 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1198 then
1199   AC_MSG_RESULT(failed)
1200 else
1201   AC_MSG_RESULT(ok)
1202 fi
1203 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
1204
1205 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1206 # ---------------------------------
1207 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
1208 [# Find the correct PATH separator.  Usually this is `:', but
1209 # DJGPP uses `;' like DOS.
1210 if test "X${PATH_SEPARATOR+set}" != Xset; then
1211   UNAME=${UNAME-`uname 2>/dev/null`}
1212   case X$UNAME in
1213     *-DOS) lt_cv_sys_path_separator=';' ;;
1214     *)     lt_cv_sys_path_separator=':' ;;
1215   esac
1216   PATH_SEPARATOR=$lt_cv_sys_path_separator
1217 fi
1218 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1219
1220 # _LT_AC_PROG_ECHO_BACKSLASH
1221 # --------------------------
1222 # Add some code to the start of the generated configure script which
1223 # will find an echo command which doesn't interpret backslashes.
1224 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
1225 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
1226                               [AC_DIVERT_PUSH(NOTICE)])
1227 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
1228
1229 # Check that we are running under the correct shell.
1230 SHELL=${CONFIG_SHELL-/bin/sh}
1231
1232 case X$ECHO in
1233 X*--fallback-echo)
1234   # Remove one level of quotation (which was required for Make).
1235   ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1236   ;;
1237 esac
1238
1239 echo=${ECHO-echo}
1240 if test "X[$]1" = X--no-reexec; then
1241   # Discard the --no-reexec flag, and continue.
1242   shift
1243 elif test "X[$]1" = X--fallback-echo; then
1244   # Avoid inline document here, it may be left over
1245   :
1246 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1247   # Yippee, $echo works!
1248   :
1249 else
1250   # Restart under the correct shell.
1251   exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1252 fi
1253
1254 if test "X[$]1" = X--fallback-echo; then
1255   # used as fallback echo
1256   shift
1257   cat <<EOF
1258 $*
1259 EOF
1260   exit 0
1261 fi
1262
1263 # The HP-UX ksh and POSIX shell print the target directory to stdout
1264 # if CDPATH is set.
1265 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1266
1267 if test -z "$ECHO"; then
1268 if test "X${echo_test_string+set}" != Xset; then
1269 # find a string as large as possible, as long as the shell can cope with it
1270   for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1271     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1272     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1273        echo_test_string="`eval $cmd`" &&
1274        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1275     then
1276       break
1277     fi
1278   done
1279 fi
1280
1281 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1282    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1283    test "X$echo_testing_string" = "X$echo_test_string"; then
1284   :
1285 else
1286   # The Solaris, AIX, and Digital Unix default echo programs unquote
1287   # backslashes.  This makes it impossible to quote backslashes using
1288   #   echo "$something" | sed 's/\\/\\\\/g'
1289   #
1290   # So, first we look for a working echo in the user's PATH.
1291
1292   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1293   for dir in $PATH /usr/ucb; do
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="$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 AC_DIVERT_POP
1376 ])# _LT_AC_PROG_ECHO_BACKSLASH
1377
1378 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1379 #                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1380 # ------------------------------------------------------------------
1381 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1382 [if test "$cross_compiling" = yes; then :
1383   [$4]
1384 else
1385   AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1386   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1387   lt_status=$lt_dlunknown
1388   cat > conftest.$ac_ext <<EOF
1389 [#line __oline__ "configure"
1390 #include "confdefs.h"
1391
1392 #if HAVE_DLFCN_H
1393 #include <dlfcn.h>
1394 #endif
1395
1396 #include <stdio.h>
1397
1398 #ifdef RTLD_GLOBAL
1399 #  define LT_DLGLOBAL           RTLD_GLOBAL
1400 #else
1401 #  ifdef DL_GLOBAL
1402 #    define LT_DLGLOBAL         DL_GLOBAL
1403 #  else
1404 #    define LT_DLGLOBAL         0
1405 #  endif
1406 #endif
1407
1408 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1409    find out it does not work in some platform. */
1410 #ifndef LT_DLLAZY_OR_NOW
1411 #  ifdef RTLD_LAZY
1412 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
1413 #  else
1414 #    ifdef DL_LAZY
1415 #      define LT_DLLAZY_OR_NOW          DL_LAZY
1416 #    else
1417 #      ifdef RTLD_NOW
1418 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
1419 #      else
1420 #        ifdef DL_NOW
1421 #          define LT_DLLAZY_OR_NOW      DL_NOW
1422 #        else
1423 #          define LT_DLLAZY_OR_NOW      0
1424 #        endif
1425 #      endif
1426 #    endif
1427 #  endif
1428 #endif
1429
1430 #ifdef __cplusplus
1431 extern "C" void exit (int);
1432 #endif
1433
1434 void fnord() { int i=42;}
1435 int main ()
1436 {
1437   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1438   int status = $lt_dlunknown;
1439
1440   if (self)
1441     {
1442       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
1443       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1444       /* dlclose (self); */
1445     }
1446
1447     exit (status);
1448 }]
1449 EOF
1450   if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1451     (./conftest; exit; ) 2>/dev/null
1452     lt_status=$?
1453     case x$lt_status in
1454       x$lt_dlno_uscore) $1 ;;
1455       x$lt_dlneed_uscore) $2 ;;
1456       x$lt_unknown|x*) $3 ;;
1457     esac
1458   else :
1459     # compilation failed
1460     $3
1461   fi
1462 fi
1463 rm -fr conftest*
1464 ])# _LT_AC_TRY_DLOPEN_SELF
1465
1466 # AC_LIBTOOL_DLOPEN_SELF
1467 # -------------------
1468 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1469 [if test "x$enable_dlopen" != xyes; then
1470   enable_dlopen=unknown
1471   enable_dlopen_self=unknown
1472   enable_dlopen_self_static=unknown
1473 else
1474   lt_cv_dlopen=no
1475   lt_cv_dlopen_libs=
1476
1477   case $host_os in
1478   beos*)
1479     lt_cv_dlopen="load_add_on"
1480     lt_cv_dlopen_libs=
1481     lt_cv_dlopen_self=yes
1482     ;;
1483
1484   cygwin* | mingw* | pw32*)
1485     lt_cv_dlopen="LoadLibrary"
1486     lt_cv_dlopen_libs=
1487    ;;
1488
1489   *)
1490     AC_CHECK_FUNC([shl_load],
1491           [lt_cv_dlopen="shl_load"],
1492       [AC_CHECK_LIB([dld], [shl_load],
1493             [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1494         [AC_CHECK_FUNC([dlopen],
1495               [lt_cv_dlopen="dlopen"],
1496           [AC_CHECK_LIB([dl], [dlopen],
1497                 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1498             [AC_CHECK_LIB([svld], [dlopen],
1499                   [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1500               [AC_CHECK_LIB([dld], [dld_link],
1501                     [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1502               ])
1503             ])
1504           ])
1505         ])
1506       ])
1507     ;;
1508   esac
1509
1510   if test "x$lt_cv_dlopen" != xno; then
1511     enable_dlopen=yes
1512   else
1513     enable_dlopen=no
1514   fi
1515
1516   case $lt_cv_dlopen in
1517   dlopen)
1518     save_CPPFLAGS="$CPPFLAGS"
1519     AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1520     test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1521
1522     save_LDFLAGS="$LDFLAGS"
1523     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1524
1525     save_LIBS="$LIBS"
1526     LIBS="$lt_cv_dlopen_libs $LIBS"
1527
1528     AC_CACHE_CHECK([whether a program can dlopen itself],
1529           lt_cv_dlopen_self, [dnl
1530           _LT_AC_TRY_DLOPEN_SELF(
1531             lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1532             lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1533     ])
1534
1535     if test "x$lt_cv_dlopen_self" = xyes; then
1536       LDFLAGS="$LDFLAGS $link_static_flag"
1537       AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1538           lt_cv_dlopen_self_static, [dnl
1539           _LT_AC_TRY_DLOPEN_SELF(
1540             lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1541             lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1542       ])
1543     fi
1544
1545     CPPFLAGS="$save_CPPFLAGS"
1546     LDFLAGS="$save_LDFLAGS"
1547     LIBS="$save_LIBS"
1548     ;;
1549   esac
1550
1551   case $lt_cv_dlopen_self in
1552   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1553   *) enable_dlopen_self=unknown ;;
1554   esac
1555
1556   case $lt_cv_dlopen_self_static in
1557   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1558   *) enable_dlopen_self_static=unknown ;;
1559   esac
1560 fi
1561 ])# AC_LIBTOOL_DLOPEN_SELF
1562
1563 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1564 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1565 # Sed substitution that helps us do robust quoting.  It backslashifies
1566 # metacharacters that are still active within double-quoted strings.
1567 Xsed='sed -e s/^X//'
1568 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1569
1570 # Same as above, but do not quote variable references.
1571 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1572
1573 # Sed substitution to delay expansion of an escaped shell variable in a
1574 # double_quote_subst'ed string.
1575 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1576
1577 # Constants:
1578 rm="rm -f"
1579
1580 # Global variables:
1581 default_ofile=libtool
1582 can_build_shared=yes
1583
1584 # All known linkers require a `.a' archive for static linking (except M$VC,
1585 # which needs '.lib').
1586 libext=a
1587 ltmain="$ac_aux_dir/ltmain.sh"
1588 ofile="$default_ofile"
1589 with_gnu_ld="$lt_cv_prog_gnu_ld"
1590 need_locks="$enable_libtool_lock"
1591
1592 old_CC="$CC"
1593 old_CFLAGS="$CFLAGS"
1594
1595 # Set sane defaults for various variables
1596 test -z "$AR" && AR=ar
1597 test -z "$AR_FLAGS" && AR_FLAGS=cru
1598 test -z "$AS" && AS=as
1599 test -z "$CC" && CC=cc
1600 test -z "$DLLTOOL" && DLLTOOL=dlltool
1601 test -z "$LD" && LD=ld
1602 test -z "$LN_S" && LN_S="ln -s"
1603 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1604 test -z "$NM" && NM=nm
1605 test -z "$OBJDUMP" && OBJDUMP=objdump
1606 test -z "$RANLIB" && RANLIB=:
1607 test -z "$STRIP" && STRIP=:
1608 test -z "$ac_objext" && ac_objext=o
1609
1610 if test x"$host" != x"$build"; then
1611   ac_tool_prefix=${host_alias}-
1612 else
1613   ac_tool_prefix=
1614 fi
1615
1616 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1617 case $host_os in
1618 linux-gnu*) ;;
1619 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1620 esac
1621
1622 case $host_os in
1623 aix3*)
1624   # AIX sometimes has problems with the GCC collect2 program.  For some
1625   # reason, if we set the COLLECT_NAMES environment variable, the problems
1626   # vanish in a puff of smoke.
1627   if test "X${COLLECT_NAMES+set}" != Xset; then
1628     COLLECT_NAMES=
1629     export COLLECT_NAMES
1630   fi
1631   ;;
1632 esac
1633
1634 # Determine commands to create old-style static archives.
1635 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1636 old_postinstall_cmds='chmod 644 $oldlib'
1637 old_postuninstall_cmds=
1638
1639 if test -n "$RANLIB"; then
1640   case $host_os in
1641   openbsd*)
1642     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1643     ;;
1644   *)
1645     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1646     ;;
1647   esac
1648   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1649 fi
1650
1651 # Allow CC to be a program name with arguments.
1652 set dummy $CC
1653 compiler="[$]2"
1654
1655 AC_MSG_CHECKING([for objdir])
1656 rm -f .libs 2>/dev/null
1657 mkdir .libs 2>/dev/null
1658 if test -d .libs; then
1659   objdir=.libs
1660 else
1661   # MS-DOS does not allow filenames that begin with a dot.
1662   objdir=_libs
1663 fi
1664 rmdir .libs 2>/dev/null
1665 AC_MSG_RESULT($objdir)
1666
1667
1668 AC_ARG_WITH(pic,
1669 [  --with-pic              try to use only PIC/non-PIC objects [default=use both]],
1670 pic_mode="$withval", pic_mode=default)
1671 test -z "$pic_mode" && pic_mode=default
1672
1673 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1674 # in isolation, and that seeing it set (from the cache) indicates that
1675 # the associated values are set (in the cache) correctly too.
1676 AC_MSG_CHECKING([for $compiler option to produce PIC])
1677 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1678 [ lt_cv_prog_cc_pic=
1679   lt_cv_prog_cc_shlib=
1680   lt_cv_prog_cc_wl=
1681   lt_cv_prog_cc_static=
1682   lt_cv_prog_cc_no_builtin=
1683   lt_cv_prog_cc_can_build_shared=$can_build_shared
1684
1685   if test "$GCC" = yes; then
1686     lt_cv_prog_cc_wl='-Wl,'
1687     lt_cv_prog_cc_static='-static'
1688
1689     case $host_os in
1690     aix*)
1691       # Below there is a dirty hack to force normal static linking with -ldl
1692       # The problem is because libdl dynamically linked with both libc and
1693       # libC (AIX C++ library), which obviously doesn't included in libraries
1694       # list by gcc. This cause undefined symbols with -static flags.
1695       # This hack allows C programs to be linked with "-static -ldl", but
1696       # not sure about C++ programs.
1697       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1698       ;;
1699     amigaos*)
1700       # FIXME: we need at least 68020 code to build shared libraries, but
1701       # adding the `-m68020' flag to GCC prevents building anything better,
1702       # like `-m68040'.
1703       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1704       ;;
1705     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1706       # PIC is the default for these OSes.
1707       ;;
1708     darwin* | rhapsody*)
1709       # PIC is the default on this platform
1710       # Common symbols not allowed in MH_DYLIB files
1711       lt_cv_prog_cc_pic='-fno-common'
1712       ;;
1713     cygwin* | mingw* | pw32* | os2*)
1714       # This hack is so that the source file can tell whether it is being
1715       # built for inclusion in a dll (and should export symbols for example).
1716       lt_cv_prog_cc_pic='-DDLL_EXPORT'
1717       ;;
1718     sysv4*MP*)
1719       if test -d /usr/nec; then
1720          lt_cv_prog_cc_pic=-Kconform_pic
1721       fi
1722       ;;
1723     *)
1724       lt_cv_prog_cc_pic='-fPIC'
1725       ;;
1726     esac
1727   else
1728     # PORTME Check for PIC flags for the system compiler.
1729     case $host_os in
1730     aix3* | aix4* | aix5*)
1731       lt_cv_prog_cc_wl='-Wl,'
1732       # All AIX code is PIC.
1733       if test "$host_cpu" = ia64; then
1734         # AIX 5 now supports IA64 processor
1735         lt_cv_prog_cc_static='-Bstatic'
1736       else
1737         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1738       fi
1739       ;;
1740
1741     hpux9* | hpux10* | hpux11*)
1742       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1743       lt_cv_prog_cc_wl='-Wl,'
1744       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1745       lt_cv_prog_cc_pic='+Z'
1746       ;;
1747
1748     irix5* | irix6* | nonstopux*)
1749       lt_cv_prog_cc_wl='-Wl,'
1750       lt_cv_prog_cc_static='-non_shared'
1751       # PIC (with -KPIC) is the default.
1752       ;;
1753
1754     cygwin* | mingw* | pw32* | os2*)
1755       # This hack is so that the source file can tell whether it is being
1756       # built for inclusion in a dll (and should export symbols for example).
1757       lt_cv_prog_cc_pic='-DDLL_EXPORT'
1758       ;;
1759
1760     newsos6)
1761       lt_cv_prog_cc_pic='-KPIC'
1762       lt_cv_prog_cc_static='-Bstatic'
1763       ;;
1764
1765     osf3* | osf4* | osf5*)
1766       # All OSF/1 code is PIC.
1767       lt_cv_prog_cc_wl='-Wl,'
1768       lt_cv_prog_cc_static='-non_shared'
1769       ;;
1770
1771     sco3.2v5*)
1772       lt_cv_prog_cc_pic='-Kpic'
1773       lt_cv_prog_cc_static='-dn'
1774       lt_cv_prog_cc_shlib='-belf'
1775       ;;
1776
1777     solaris*)
1778       lt_cv_prog_cc_pic='-KPIC'
1779       lt_cv_prog_cc_static='-Bstatic'
1780       lt_cv_prog_cc_wl='-Wl,'
1781       ;;
1782
1783     sunos4*)
1784       lt_cv_prog_cc_pic='-PIC'
1785       lt_cv_prog_cc_static='-Bstatic'
1786       lt_cv_prog_cc_wl='-Qoption ld '
1787       ;;
1788
1789     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1790       lt_cv_prog_cc_pic='-KPIC'
1791       lt_cv_prog_cc_static='-Bstatic'
1792       lt_cv_prog_cc_wl='-Wl,'
1793       ;;
1794
1795     uts4*)
1796       lt_cv_prog_cc_pic='-pic'
1797       lt_cv_prog_cc_static='-Bstatic'
1798       ;;
1799
1800     sysv4*MP*)
1801       if test -d /usr/nec ;then
1802         lt_cv_prog_cc_pic='-Kconform_pic'
1803         lt_cv_prog_cc_static='-Bstatic'
1804       fi
1805       ;;
1806
1807     *)
1808       lt_cv_prog_cc_can_build_shared=no
1809       ;;
1810     esac
1811   fi
1812 ])
1813 if test -z "$lt_cv_prog_cc_pic"; then
1814   AC_MSG_RESULT([none])
1815 else
1816   AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1817
1818   # Check to make sure the pic_flag actually works.
1819   AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1820   AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1821     save_CFLAGS="$CFLAGS"
1822     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1823     AC_TRY_COMPILE([], [], [dnl
1824       case $host_os in
1825       hpux9* | hpux10* | hpux11*)
1826         # On HP-UX, both CC and GCC only warn that PIC is supported... then
1827         # they create non-PIC objects.  So, if there were any warnings, we
1828         # assume that PIC is not supported.
1829         if test -s conftest.err; then
1830           lt_cv_prog_cc_pic_works=no
1831         else
1832           lt_cv_prog_cc_pic_works=yes
1833         fi
1834         ;;
1835       *)
1836         lt_cv_prog_cc_pic_works=yes
1837         ;;
1838       esac
1839     ], [dnl
1840       lt_cv_prog_cc_pic_works=no
1841     ])
1842     CFLAGS="$save_CFLAGS"
1843   ])
1844
1845   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1846     lt_cv_prog_cc_pic=
1847     lt_cv_prog_cc_can_build_shared=no
1848   else
1849     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1850   fi
1851
1852   AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1853 fi
1854
1855 # Check for any special shared library compilation flags.
1856 if test -n "$lt_cv_prog_cc_shlib"; then
1857   AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1858   if echo "$old_CC $old_CFLAGS " | egrep -e "[[         ]]$lt_cv_prog_cc_shlib[[        ]]" >/dev/null; then :
1859   else
1860    AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1861     lt_cv_prog_cc_can_build_shared=no
1862   fi
1863 fi
1864
1865 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1866 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1867   lt_cv_prog_cc_static_works=no
1868   save_LDFLAGS="$LDFLAGS"
1869   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1870   AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1871   LDFLAGS="$save_LDFLAGS"
1872 ])
1873
1874 # Belt *and* braces to stop my trousers falling down:
1875 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1876 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1877
1878 pic_flag="$lt_cv_prog_cc_pic"
1879 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1880 wl="$lt_cv_prog_cc_wl"
1881 link_static_flag="$lt_cv_prog_cc_static"
1882 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1883 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1884
1885
1886 # Check to see if options -o and -c are simultaneously supported by compiler
1887 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1888 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1889 $rm -r conftest 2>/dev/null
1890 mkdir conftest
1891 cd conftest
1892 echo "int some_variable = 0;" > conftest.$ac_ext
1893 mkdir out
1894 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1895 # that will create temporary files in the current directory regardless of
1896 # the output directory.  Thus, making CWD read-only will cause this test
1897 # to fail, enabling locking or at least warning the user not to do parallel
1898 # builds.
1899 chmod -w .
1900 save_CFLAGS="$CFLAGS"
1901 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1902 compiler_c_o=no
1903 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1904   # The compiler can only warn and ignore the option if not recognized
1905   # So say no if there are warnings
1906   if test -s out/conftest.err; then
1907     lt_cv_compiler_c_o=no
1908   else
1909     lt_cv_compiler_c_o=yes
1910   fi
1911 else
1912   # Append any errors to the config.log.
1913   cat out/conftest.err 1>&AC_FD_CC
1914   lt_cv_compiler_c_o=no
1915 fi
1916 CFLAGS="$save_CFLAGS"
1917 chmod u+w .
1918 $rm conftest* out/*
1919 rmdir out
1920 cd ..
1921 rmdir conftest
1922 $rm -r conftest 2>/dev/null
1923 ])
1924 compiler_c_o=$lt_cv_compiler_c_o
1925 AC_MSG_RESULT([$compiler_c_o])
1926
1927 if test x"$compiler_c_o" = x"yes"; then
1928   # Check to see if we can write to a .lo
1929   AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1930   AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1931   lt_cv_compiler_o_lo=no
1932   save_CFLAGS="$CFLAGS"
1933   CFLAGS="$CFLAGS -c -o conftest.lo"
1934   save_objext="$ac_objext"
1935   ac_objext=lo
1936   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1937     # The compiler can only warn and ignore the option if not recognized
1938     # So say no if there are warnings
1939     if test -s conftest.err; then
1940       lt_cv_compiler_o_lo=no
1941     else
1942       lt_cv_compiler_o_lo=yes
1943     fi
1944   ])
1945   ac_objext="$save_objext"
1946   CFLAGS="$save_CFLAGS"
1947   ])
1948   compiler_o_lo=$lt_cv_compiler_o_lo
1949   AC_MSG_RESULT([$compiler_o_lo])
1950 else
1951   compiler_o_lo=no
1952 fi
1953
1954 # Check to see if we can do hard links to lock some files if needed
1955 hard_links="nottested"
1956 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1957   # do not overwrite the value of need_locks provided by the user
1958   AC_MSG_CHECKING([if we can lock with hard links])
1959   hard_links=yes
1960   $rm conftest*
1961   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1962   touch conftest.a
1963   ln conftest.a conftest.b 2>&5 || hard_links=no
1964   ln conftest.a conftest.b 2>/dev/null && hard_links=no
1965   AC_MSG_RESULT([$hard_links])
1966   if test "$hard_links" = no; then
1967     AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1968     need_locks=warn
1969   fi
1970 else
1971   need_locks=no
1972 fi
1973
1974 if test "$GCC" = yes; then
1975   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1976   AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1977   echo "int some_variable = 0;" > conftest.$ac_ext
1978   save_CFLAGS="$CFLAGS"
1979   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1980   compiler_rtti_exceptions=no
1981   AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1982     # The compiler can only warn and ignore the option if not recognized
1983     # So say no if there are warnings
1984     if test -s conftest.err; then
1985       compiler_rtti_exceptions=no
1986     else
1987       compiler_rtti_exceptions=yes
1988     fi
1989   ])
1990   CFLAGS="$save_CFLAGS"
1991   AC_MSG_RESULT([$compiler_rtti_exceptions])
1992
1993   if test "$compiler_rtti_exceptions" = "yes"; then
1994     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1995   else
1996     no_builtin_flag=' -fno-builtin'
1997   fi
1998 fi
1999
2000 # See if the linker supports building shared libraries.
2001 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2002
2003 allow_undefined_flag=
2004 no_undefined_flag=
2005 need_lib_prefix=unknown
2006 need_version=unknown
2007 # when you set need_version to no, make sure it does not cause -set_version
2008 # flags to be left without arguments
2009 archive_cmds=
2010 archive_expsym_cmds=
2011 old_archive_from_new_cmds=
2012 old_archive_from_expsyms_cmds=
2013 export_dynamic_flag_spec=
2014 whole_archive_flag_spec=
2015 thread_safe_flag_spec=
2016 hardcode_into_libs=no
2017 hardcode_libdir_flag_spec=
2018 hardcode_libdir_separator=
2019 hardcode_direct=no
2020 hardcode_minus_L=no
2021 hardcode_shlibpath_var=unsupported
2022 runpath_var=
2023 link_all_deplibs=unknown
2024 always_export_symbols=no
2025 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
2026 # include_expsyms should be a list of space-separated symbols to be *always*
2027 # included in the symbol list
2028 include_expsyms=
2029 # exclude_expsyms can be an egrep regular expression of symbols to exclude
2030 # it will be wrapped by ` (' and `)$', so one must not match beginning or
2031 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
2032 # as well as any symbol that contains `d'.
2033 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
2034 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
2035 # platforms (ab)use it in PIC code, but their linkers get confused if
2036 # the symbol is explicitly referenced.  Since portable code cannot
2037 # rely on this symbol name, it's probably fine to never include it in
2038 # preloaded symbol tables.
2039 extract_expsyms_cmds=
2040
2041 case $host_os in
2042 cygwin* | mingw* | pw32*)
2043   # FIXME: the MSVC++ port hasn't been tested in a loooong time
2044   # When not using gcc, we currently assume that we are using
2045   # Microsoft Visual C++.
2046   if test "$GCC" != yes; then
2047     with_gnu_ld=no
2048   fi
2049   ;;
2050 openbsd*)
2051   with_gnu_ld=no
2052   ;;
2053 esac
2054
2055 ld_shlibs=yes
2056 if test "$with_gnu_ld" = yes; then
2057   # If archive_cmds runs LD, not CC, wlarc should be empty
2058   wlarc='${wl}'
2059
2060   # See if GNU ld supports shared libraries.
2061   case $host_os in
2062   aix3* | aix4* | aix5*)
2063     # On AIX, the GNU linker is very broken
2064     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
2065     ld_shlibs=no
2066     cat <<EOF 1>&2
2067
2068 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
2069 *** to be unable to reliably create shared libraries on AIX.
2070 *** Therefore, libtool is disabling shared libraries support.  If you
2071 *** really care for shared libraries, you may want to modify your PATH
2072 *** so that a non-GNU linker is found, and then restart.
2073
2074 EOF
2075     ;;
2076
2077   amigaos*)
2078     archive_cmds='$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)'
2079     hardcode_libdir_flag_spec='-L$libdir'
2080     hardcode_minus_L=yes
2081
2082     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
2083     # that the semantics of dynamic libraries on AmigaOS, at least up
2084     # to version 4, is to share data among multiple programs linked
2085     # with the same dynamic library.  Since this doesn't match the
2086     # behavior of shared libraries on other platforms, we can use
2087     # them.
2088     ld_shlibs=no
2089     ;;
2090
2091   beos*)
2092     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2093       allow_undefined_flag=unsupported
2094       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2095       # support --undefined.  This deserves some investigation.  FIXME
2096       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2097     else
2098       ld_shlibs=no
2099     fi
2100     ;;
2101
2102   cygwin* | mingw* | pw32*)
2103     # hardcode_libdir_flag_spec is actually meaningless, as there is
2104     # no search path for DLLs.
2105     hardcode_libdir_flag_spec='-L$libdir'
2106     allow_undefined_flag=unsupported
2107     always_export_symbols=yes
2108
2109     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
2110       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
2111       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
2112       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
2113       else $CC -o impgen impgen.c ; fi)~
2114       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
2115
2116     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2117
2118     # cygwin and mingw dlls have different entry points and sets of symbols
2119     # to exclude.
2120     # FIXME: what about values for MSVC?
2121     dll_entry=__cygwin_dll_entry@12
2122     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
2123     case $host_os in
2124     mingw*)
2125       # mingw values
2126       dll_entry=_DllMainCRTStartup@12
2127       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
2128       ;;
2129     esac
2130
2131     # mingw and cygwin differ, and it's simplest to just exclude the union
2132     # of the two symbol sets.
2133     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
2134
2135     # recent cygwin and mingw systems supply a stub DllMain which the user
2136     # can override, but on older systems we have to supply one (in ltdll.c)
2137     if test "x$lt_cv_need_dllmain" = "xyes"; then
2138       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
2139       ltdll_cmds='test -f $output_objdir/$soname-ltdll.c || sed -e "/^# \/\* ltdll\.c starts here \*\//,/^# \/\* ltdll.c ends here \*\// { s/^# //; p; }" -e d < $''0 > $output_objdir/$soname-ltdll.c~
2140         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
2141     else
2142       ltdll_obj=
2143       ltdll_cmds=
2144     fi
2145
2146     # Extract the symbol export list from an `--export-all' def file,
2147     # then regenerate the def file from the symbol export list, so that
2148     # the compiled dll only exports the symbol export list.
2149     # Be careful not to strip the DATA tag left be newer dlltools.
2150     export_symbols_cmds="$ltdll_cmds"'
2151       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
2152       sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
2153
2154     # If the export-symbols file already is a .def file (1st line
2155     # is EXPORTS), use it as is.
2156     # If DATA tags from a recent dlltool are present, honour them!
2157     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
2158         cp $export_symbols $output_objdir/$soname-def;
2159       else
2160         echo EXPORTS > $output_objdir/$soname-def;
2161         _lt_hint=1;
2162         cat $export_symbols | while read symbol; do
2163          set dummy \$symbol;
2164          case \[$]# in
2165            2) echo "   \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
2166            4) echo "   \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
2167            *) echo "     \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
2168          esac;
2169          _lt_hint=`expr 1 + \$_lt_hint`;
2170         done;
2171       fi~
2172       '"$ltdll_cmds"'
2173       $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2174       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp~
2175       $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags~
2176       $DLLTOOL --as=$AS --dllname $soname --exclude-symbols '$dll_exclude_symbols' --def $output_objdir/$soname-def --base-file $output_objdir/$soname-base --output-exp $output_objdir/$soname-exp --output-lib $output_objdir/$libname.dll.a~
2177       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
2178     ;;
2179
2180   netbsd*)
2181     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2182       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
2183       wlarc=
2184     else
2185       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2186       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2187     fi
2188     ;;
2189
2190   solaris* | sysv5*)
2191     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
2192       ld_shlibs=no
2193       cat <<EOF 1>&2
2194
2195 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
2196 *** create shared libraries on Solaris systems.  Therefore, libtool
2197 *** is disabling shared libraries support.  We urge you to upgrade GNU
2198 *** binutils to release 2.9.1 or newer.  Another option is to modify
2199 *** your PATH or compiler configuration so that the native linker is
2200 *** used, and then restart.
2201
2202 EOF
2203     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2204       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2205       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2206     else
2207       ld_shlibs=no
2208     fi
2209     ;;
2210
2211   sunos4*)
2212     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2213     wlarc=
2214     hardcode_direct=yes
2215     hardcode_shlibpath_var=no
2216     ;;
2217
2218   *)
2219     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
2220       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2221       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2222     else
2223       ld_shlibs=no
2224     fi
2225     ;;
2226   esac
2227
2228   if test "$ld_shlibs" = yes; then
2229     runpath_var=LD_RUN_PATH
2230     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
2231     export_dynamic_flag_spec='${wl}--export-dynamic'
2232     case $host_os in
2233     cygwin* | mingw* | pw32*)
2234       # dlltool doesn't understand --whole-archive et. al.
2235       whole_archive_flag_spec=
2236       ;;
2237     *)
2238       # ancient GNU ld didn't support --whole-archive et. al.
2239       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2240         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2241       else
2242         whole_archive_flag_spec=
2243       fi
2244       ;;
2245     esac
2246   fi
2247 else
2248   # PORTME fill in a description of your system's linker (not GNU ld)
2249   case $host_os in
2250   aix3*)
2251     allow_undefined_flag=unsupported
2252     always_export_symbols=yes
2253     archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
2254     # Note: this linker hardcodes the directories in LIBPATH if there
2255     # are no directories specified by -L.
2256     hardcode_minus_L=yes
2257     if test "$GCC" = yes && test -z "$link_static_flag"; then
2258       # Neither direct hardcoding nor static linking is supported with a
2259       # broken collect2.
2260       hardcode_direct=unsupported
2261     fi
2262     ;;
2263
2264   aix4* | aix5*)
2265     if test "$host_cpu" = ia64; then
2266       # On IA64, the linker does run time linking by default, so we don't
2267       # have to do anything special.
2268       aix_use_runtimelinking=no
2269       exp_sym_flag='-Bexport'
2270       no_entry_flag=""
2271     else
2272       aix_use_runtimelinking=no
2273
2274       # Test if we are trying to use run time linking or normal
2275       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2276       # need to do runtime linking.
2277       case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2278         for ld_flag in $LDFLAGS; do
2279           case $ld_flag in
2280           *-brtl*)
2281             aix_use_runtimelinking=yes
2282             break
2283           ;;
2284           esac
2285         done
2286       esac
2287
2288       exp_sym_flag='-bexport'
2289       no_entry_flag='-bnoentry'
2290     fi
2291
2292     # When large executables or shared objects are built, AIX ld can
2293     # have problems creating the table of contents.  If linking a library
2294     # or program results in "error TOC overflow" add -mminimal-toc to
2295     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2296     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2297
2298     hardcode_direct=yes
2299     archive_cmds=''
2300     hardcode_libdir_separator=':'
2301     if test "$GCC" = yes; then
2302       case $host_os in aix4.[[012]]|aix4.[[012]].*)
2303         collect2name=`${CC} -print-prog-name=collect2`
2304         if test -f "$collect2name" && \
2305           strings "$collect2name" | grep resolve_lib_name >/dev/null
2306         then
2307           # We have reworked collect2
2308           hardcode_direct=yes
2309         else
2310           # We have old collect2
2311           hardcode_direct=unsupported
2312           # It fails to find uninstalled libraries when the uninstalled
2313           # path is not listed in the libpath.  Setting hardcode_minus_L
2314           # to unsupported forces relinking
2315           hardcode_minus_L=yes
2316           hardcode_libdir_flag_spec='-L$libdir'
2317           hardcode_libdir_separator=
2318         fi
2319       esac
2320
2321       shared_flag='-shared'
2322     else
2323       # not using gcc
2324       if test "$host_cpu" = ia64; then
2325         shared_flag='${wl}-G'
2326       else
2327         if test "$aix_use_runtimelinking" = yes; then
2328           shared_flag='${wl}-G'
2329         else
2330           shared_flag='${wl}-bM:SRE'
2331         fi
2332       fi
2333     fi
2334
2335     # It seems that -bexpall can do strange things, so it is better to
2336     # generate a list of symbols to export.
2337     always_export_symbols=yes
2338     if test "$aix_use_runtimelinking" = yes; then
2339       # Warning - without using the other runtime loading flags (-brtl),
2340       # -berok will link without error, but may produce a broken library.
2341       allow_undefined_flag='-berok'
2342       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2343       archive_expsym_cmds="\$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"
2344     else
2345       if test "$host_cpu" = ia64; then
2346         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2347         allow_undefined_flag="-z nodefs"
2348         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname ${wl}-h$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
2349       else
2350         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2351         # Warning - without using the other run time loading flags,
2352         # -berok will link without error, but may produce a broken library.
2353         allow_undefined_flag='${wl}-berok'
2354         # This is a bit strange, but is similar to how AIX traditionally builds
2355         # it's shared libraries.
2356         archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"' ~$AR -crlo $objdir/$libname$release.a $objdir/$soname'
2357       fi
2358     fi
2359     ;;
2360
2361   amigaos*)
2362     archive_cmds='$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)'
2363     hardcode_libdir_flag_spec='-L$libdir'
2364     hardcode_minus_L=yes
2365     # see comment about different semantics on the GNU ld section
2366     ld_shlibs=no
2367     ;;
2368
2369   cygwin* | mingw* | pw32*)
2370     # When not using gcc, we currently assume that we are using
2371     # Microsoft Visual C++.
2372     # hardcode_libdir_flag_spec is actually meaningless, as there is
2373     # no search path for DLLs.
2374     hardcode_libdir_flag_spec=' '
2375     allow_undefined_flag=unsupported
2376     # Tell ltmain to make .lib files, not .a files.
2377     libext=lib
2378     # FIXME: Setting linknames here is a bad hack.
2379     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2380     # The linker will automatically build a .lib file if we build a DLL.
2381     old_archive_from_new_cmds='true'
2382     # FIXME: Should let the user specify the lib program.
2383     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2384     fix_srcfile_path='`cygpath -w "$srcfile"`'
2385     ;;
2386
2387   darwin* | rhapsody*)
2388     case "$host_os" in
2389     rhapsody* | darwin1.[[012]])
2390       allow_undefined_flag='-undefined suppress'
2391       ;;
2392     *) # Darwin 1.3 on
2393       allow_undefined_flag='-flat_namespace -undefined suppress'
2394       ;;
2395     esac
2396     # FIXME: Relying on posixy $() will cause problems for
2397     #        cross-compilation, but unfortunately the echo tests do not
2398     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
2399     #        `"' quotes if we put them in here... so don't!
2400     archive_cmds='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs && $CC $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib ${lib}-master.o $deplibs$linker_flags $(test .$module != .yes && echo -install_name $rpath/$soname $verstring)'
2401     # We need to add '_' to the symbols in $export_symbols first
2402     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2403     hardcode_direct=yes
2404     hardcode_shlibpath_var=no
2405     whole_archive_flag_spec='-all_load $convenience'
2406     ;;
2407
2408   freebsd1*)
2409     ld_shlibs=no
2410     ;;
2411
2412   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2413   # support.  Future versions do this automatically, but an explicit c++rt0.o
2414   # does not break anything, and helps significantly (at the cost of a little
2415   # extra space).
2416   freebsd2.2*)
2417     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2418     hardcode_libdir_flag_spec='-R$libdir'
2419     hardcode_direct=yes
2420     hardcode_shlibpath_var=no
2421     ;;
2422
2423   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2424   freebsd2*)
2425     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2426     hardcode_direct=yes
2427     hardcode_minus_L=yes
2428     hardcode_shlibpath_var=no
2429     ;;
2430
2431   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2432   freebsd*)
2433     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2434     hardcode_libdir_flag_spec='-R$libdir'
2435     hardcode_direct=yes
2436     hardcode_shlibpath_var=no
2437     ;;
2438
2439   hpux9* | hpux10* | hpux11*)
2440     case $host_os in
2441     hpux9*) archive_cmds='$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' ;;
2442     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2443     esac
2444     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2445     hardcode_libdir_separator=:
2446     hardcode_direct=yes
2447     hardcode_minus_L=yes # Not in the search PATH, but as the default
2448                          # location of the library.
2449     export_dynamic_flag_spec='${wl}-E'
2450     ;;
2451
2452   irix5* | irix6* | nonstopux*)
2453     if test "$GCC" = yes; then
2454       archive_cmds='$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'
2455       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2456     else
2457       archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
2458       hardcode_libdir_flag_spec='-rpath $libdir'
2459     fi
2460     hardcode_libdir_separator=:
2461     link_all_deplibs=yes
2462     ;;
2463
2464   netbsd*)
2465     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2466       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
2467     else
2468       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
2469     fi
2470     hardcode_libdir_flag_spec='-R$libdir'
2471     hardcode_direct=yes
2472     hardcode_shlibpath_var=no
2473     ;;
2474
2475   newsos6)
2476     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2477     hardcode_direct=yes
2478     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2479     hardcode_libdir_separator=:
2480     hardcode_shlibpath_var=no
2481     ;;
2482
2483   openbsd*)
2484     hardcode_direct=yes
2485     hardcode_shlibpath_var=no
2486     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2487       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2488       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2489       export_dynamic_flag_spec='${wl}-E'
2490     else
2491       case "$host_os" in
2492       openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2493         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2494         hardcode_libdir_flag_spec='-R$libdir'
2495         ;;
2496       *)
2497         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2498         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2499         ;;
2500       esac
2501     fi
2502     ;;
2503
2504   os2*)
2505     hardcode_libdir_flag_spec='-L$libdir'
2506     hardcode_minus_L=yes
2507     allow_undefined_flag=unsupported
2508     archive_cmds='$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'
2509     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2510     ;;
2511
2512   osf3*)
2513     if test "$GCC" = yes; then
2514       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2515       archive_cmds='$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'
2516     else
2517       allow_undefined_flag=' -expect_unresolved \*'
2518       archive_cmds='$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'
2519     fi
2520     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2521     hardcode_libdir_separator=:
2522     ;;
2523
2524   osf4* | osf5*)        # as osf3* with the addition of -msym flag
2525     if test "$GCC" = yes; then
2526       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2527       archive_cmds='$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'
2528       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2529     else
2530       allow_undefined_flag=' -expect_unresolved \*'
2531       archive_cmds='$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'
2532       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2533       $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'
2534
2535       #Both c and cxx compiler support -rpath directly
2536       hardcode_libdir_flag_spec='-rpath $libdir'
2537     fi
2538     hardcode_libdir_separator=:
2539     ;;
2540
2541   sco3.2v5*)
2542     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2543     hardcode_shlibpath_var=no
2544     runpath_var=LD_RUN_PATH
2545     hardcode_runpath_var=yes
2546     export_dynamic_flag_spec='${wl}-Bexport'
2547     ;;
2548
2549   solaris*)
2550     # gcc --version < 3.0 without binutils cannot create self contained
2551     # shared libraries reliably, requiring libgcc.a to resolve some of
2552     # the object symbols generated in some cases.  Libraries that use
2553     # assert need libgcc.a to resolve __eprintf, for example.  Linking
2554     # a copy of libgcc.a into every shared library to guarantee resolving
2555     # such symbols causes other problems:  According to Tim Van Holder
2556     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2557     # (to the application) exception stack for one thing.
2558     no_undefined_flag=' -z defs'
2559     if test "$GCC" = yes; then
2560       case `$CC --version 2>/dev/null` in
2561       [[12]].*)
2562         cat <<EOF 1>&2
2563
2564 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2565 *** create self contained shared libraries on Solaris systems, without
2566 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
2567 *** -no-undefined support, which will at least allow you to build shared
2568 *** libraries.  However, you may find that when you link such libraries
2569 *** into an application without using GCC, you have to manually add
2570 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
2571 *** upgrade to a newer version of GCC.  Another option is to rebuild your
2572 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2573
2574 EOF
2575         no_undefined_flag=
2576         ;;
2577       esac
2578     fi
2579     # $CC -shared without GNU ld will not create a library from C++
2580     # object files and a static libstdc++, better avoid it by now
2581     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2582     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2583                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2584     hardcode_libdir_flag_spec='-R$libdir'
2585     hardcode_shlibpath_var=no
2586     case $host_os in
2587     solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2588     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2589       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2590     esac
2591     link_all_deplibs=yes
2592     ;;
2593
2594   sunos4*)
2595     if test "x$host_vendor" = xsequent; then
2596       # Use $CC to link under sequent, because it throws in some extra .o
2597       # files that make .init and .fini sections work.
2598       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2599     else
2600       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2601     fi
2602     hardcode_libdir_flag_spec='-L$libdir'
2603     hardcode_direct=yes
2604     hardcode_minus_L=yes
2605     hardcode_shlibpath_var=no
2606     ;;
2607
2608   sysv4)
2609     case $host_vendor in
2610       sni)
2611         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2612         hardcode_direct=yes # is this really true???
2613         ;;
2614       siemens)
2615         ## LD is ld it makes a PLAMLIB
2616         ## CC just makes a GrossModule.
2617         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2618         reload_cmds='$CC -r -o $output$reload_objs'
2619         hardcode_direct=no
2620         ;;
2621       motorola)
2622         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2623         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2624         ;;
2625     esac
2626     runpath_var='LD_RUN_PATH'
2627     hardcode_shlibpath_var=no
2628     ;;
2629
2630   sysv4.3*)
2631     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2632     hardcode_shlibpath_var=no
2633     export_dynamic_flag_spec='-Bexport'
2634     ;;
2635
2636   sysv5*)
2637     no_undefined_flag=' -z text'
2638     # $CC -shared without GNU ld will not create a library from C++
2639     # object files and a static libstdc++, better avoid it by now
2640     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2641     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2642                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2643     hardcode_libdir_flag_spec=
2644     hardcode_shlibpath_var=no
2645     runpath_var='LD_RUN_PATH'
2646     ;;
2647
2648   uts4*)
2649     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2650     hardcode_libdir_flag_spec='-L$libdir'
2651     hardcode_shlibpath_var=no
2652     ;;
2653
2654   dgux*)
2655     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2656     hardcode_libdir_flag_spec='-L$libdir'
2657     hardcode_shlibpath_var=no
2658     ;;
2659
2660   sysv4*MP*)
2661     if test -d /usr/nec; then
2662       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2663       hardcode_shlibpath_var=no
2664       runpath_var=LD_RUN_PATH
2665       hardcode_runpath_var=yes
2666       ld_shlibs=yes
2667     fi
2668     ;;
2669
2670   sysv4.2uw2*)
2671     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2672     hardcode_direct=yes
2673     hardcode_minus_L=no
2674     hardcode_shlibpath_var=no
2675     hardcode_runpath_var=yes
2676     runpath_var=LD_RUN_PATH
2677     ;;
2678
2679   sysv5uw7* | unixware7*)
2680     no_undefined_flag='${wl}-z ${wl}text'
2681     if test "$GCC" = yes; then
2682       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2683     else
2684       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2685     fi
2686     runpath_var='LD_RUN_PATH'
2687     hardcode_shlibpath_var=no
2688     ;;
2689
2690   *)
2691     ld_shlibs=no
2692     ;;
2693   esac
2694 fi
2695 AC_MSG_RESULT([$ld_shlibs])
2696 test "$ld_shlibs" = no && can_build_shared=no
2697
2698 # Check hardcoding attributes.
2699 AC_MSG_CHECKING([how to hardcode library paths into programs])
2700 hardcode_action=
2701 if test -n "$hardcode_libdir_flag_spec" || \
2702    test -n "$runpath_var"; then
2703
2704   # We can hardcode non-existant directories.
2705   if test "$hardcode_direct" != no &&
2706      # If the only mechanism to avoid hardcoding is shlibpath_var, we
2707      # have to relink, otherwise we might link with an installed library
2708      # when we should be linking with a yet-to-be-installed one
2709      ## test "$hardcode_shlibpath_var" != no &&
2710      test "$hardcode_minus_L" != no; then
2711     # Linking always hardcodes the temporary library directory.
2712     hardcode_action=relink
2713   else
2714     # We can link without hardcoding, and we can hardcode nonexisting dirs.
2715     hardcode_action=immediate
2716   fi
2717 else
2718   # We cannot hardcode anything, or else we can only hardcode existing
2719   # directories.
2720   hardcode_action=unsupported
2721 fi
2722 AC_MSG_RESULT([$hardcode_action])
2723
2724 striplib=
2725 old_striplib=
2726 AC_MSG_CHECKING([whether stripping libraries is possible])
2727 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2728   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2729   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2730   AC_MSG_RESULT([yes])
2731 else
2732   AC_MSG_RESULT([no])
2733 fi
2734
2735 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2736 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2737
2738 # PORTME Fill in your ld.so characteristics
2739 AC_MSG_CHECKING([dynamic linker characteristics])
2740 library_names_spec=
2741 libname_spec='lib$name'
2742 soname_spec=
2743 postinstall_cmds=
2744 postuninstall_cmds=
2745 finish_cmds=
2746 finish_eval=
2747 shlibpath_var=
2748 shlibpath_overrides_runpath=unknown
2749 version_type=none
2750 dynamic_linker="$host_os ld.so"
2751 sys_lib_dlsearch_path_spec="/lib /usr/lib /usr/X11R6/lib"
2752 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib /usr/X11R6/lib"
2753
2754 case $host_os in
2755 aix3*)
2756   version_type=linux
2757   library_names_spec='${libname}${release}.so$versuffix $libname.a'
2758   shlibpath_var=LIBPATH
2759
2760   # AIX has no versioning support, so we append a major version to the name.
2761   soname_spec='${libname}${release}.so$major'
2762   ;;
2763
2764 aix4* | aix5*)
2765   version_type=linux
2766   need_lib_prefix=no
2767   need_version=no
2768   hardcode_into_libs=yes
2769   if test "$host_cpu" = ia64; then
2770     # AIX 5 supports IA64
2771     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2772     shlibpath_var=LD_LIBRARY_PATH
2773   else
2774     # With GCC up to 2.95.x, collect2 would create an import file
2775     # for dependence libraries.  The import file would start with
2776     # the line `#! .'.  This would cause the generated library to
2777     # depend on `.', always an invalid library.  This was fixed in
2778     # development snapshots of GCC prior to 3.0.
2779     case $host_os in
2780       aix4 | aix4.[[01]] | aix4.[[01]].*)
2781         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2782              echo ' yes '
2783              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2784           :
2785         else
2786           can_build_shared=no
2787         fi
2788         ;;
2789     esac
2790     # AIX (on Power*) has no versioning support, so currently we can
2791     # not hardcode correct soname into executable. Probably we can
2792     # add versioning support to collect2, so additional links can
2793     # be useful in future.
2794     if test "$aix_use_runtimelinking" = yes; then
2795       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2796       # instead of lib<name>.a to let people know that these are not
2797       # typical AIX shared libraries.
2798       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2799     else
2800       # We preserve .a as extension for shared libraries through AIX4.2
2801       # and later when we are not doing run time linking.
2802       library_names_spec='${libname}${release}.a $libname.a'
2803       soname_spec='${libname}${release}.so$major'
2804     fi
2805     shlibpath_var=LIBPATH
2806   fi
2807   hardcode_into_libs=yes
2808   ;;
2809
2810 amigaos*)
2811   library_names_spec='$libname.ixlibrary $libname.a'
2812   # Create ${libname}_ixlibrary.a entries in /sys/libs.
2813   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'
2814   ;;
2815
2816 beos*)
2817   library_names_spec='${libname}.so'
2818   dynamic_linker="$host_os ld.so"
2819   shlibpath_var=LIBRARY_PATH
2820   ;;
2821
2822 bsdi4*)
2823   version_type=linux
2824   need_version=no
2825   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2826   soname_spec='${libname}${release}.so$major'
2827   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2828   shlibpath_var=LD_LIBRARY_PATH
2829   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2830   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2831   export_dynamic_flag_spec=-rdynamic
2832   # the default ld.so.conf also contains /usr/contrib/lib and
2833   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2834   # libtool to hard-code these into programs
2835   ;;
2836
2837 cygwin* | mingw* | pw32*)
2838   version_type=windows
2839   need_version=no
2840   need_lib_prefix=no
2841   case $GCC,$host_os in
2842   yes,cygwin*)
2843     library_names_spec='$libname.dll.a'
2844     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2845     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2846       dldir=$destdir/`dirname \$dlpath`~
2847       test -d \$dldir || mkdir -p \$dldir~
2848       $install_prog .libs/$dlname \$dldir/$dlname'
2849     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2850       dlpath=$dir/\$dldll~
2851        $rm \$dlpath'
2852     ;;
2853   yes,mingw*)
2854     library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2855     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
2856     ;;
2857   yes,pw32*)
2858     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2859     ;;
2860   *)
2861     library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2862     ;;
2863   esac
2864   dynamic_linker='Win32 ld.exe'
2865   # FIXME: first we should search . and the directory the executable is in
2866   shlibpath_var=PATH
2867   ;;
2868
2869 darwin* | rhapsody*)
2870   dynamic_linker="$host_os dyld"
2871   version_type=darwin
2872   need_lib_prefix=no
2873   need_version=no
2874   # FIXME: Relying on posixy $() will cause problems for
2875   #        cross-compilation, but unfortunately the echo tests do not
2876   #        yet detect zsh echo's removal of \ escapes.
2877   library_names_spec='${libname}${release}${versuffix}.$(test .$module = .yes && echo so || echo dylib) ${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib) ${libname}.$(test .$module = .yes && echo so || echo dylib)'
2878   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2879   shlibpath_overrides_runpath=yes
2880   shlibpath_var=DYLD_LIBRARY_PATH
2881   ;;
2882
2883 freebsd1*)
2884   dynamic_linker=no
2885   ;;
2886
2887 freebsd*)
2888   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2889   version_type=freebsd-$objformat
2890   case $version_type in
2891     freebsd-elf*)
2892       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2893       need_version=no
2894       need_lib_prefix=no
2895       ;;
2896     freebsd-*)
2897       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2898       need_version=yes
2899       ;;
2900   esac
2901   shlibpath_var=LD_LIBRARY_PATH
2902   case $host_os in
2903   freebsd2*)
2904     shlibpath_overrides_runpath=yes
2905     ;;
2906   *)
2907     shlibpath_overrides_runpath=no
2908     hardcode_into_libs=yes
2909     ;;
2910   esac
2911   ;;
2912
2913 gnu*)
2914   version_type=linux
2915   need_lib_prefix=no
2916   need_version=no
2917   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2918   soname_spec='${libname}${release}.so$major'
2919   shlibpath_var=LD_LIBRARY_PATH
2920   hardcode_into_libs=yes
2921   ;;
2922
2923 hpux9* | hpux10* | hpux11*)
2924   # Give a soname corresponding to the major version so that dld.sl refuses to
2925   # link against other versions.
2926   dynamic_linker="$host_os dld.sl"
2927   version_type=sunos
2928   need_lib_prefix=no
2929   need_version=no
2930   shlibpath_var=SHLIB_PATH
2931   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2932   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2933   soname_spec='${libname}${release}.sl$major'
2934   # HP-UX runs *really* slowly unless shared libraries are mode 555.
2935   postinstall_cmds='chmod 555 $lib'
2936   ;;
2937
2938 irix5* | irix6* | nonstopux*)
2939   case $host_os in
2940     nonstopux*) version_type=nonstopux ;;
2941     *)          version_type=irix ;;
2942   esac
2943   need_lib_prefix=no
2944   need_version=no
2945   soname_spec='${libname}${release}.so$major'
2946   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2947   case $host_os in
2948   irix5* | nonstopux*)
2949     libsuff= shlibsuff=
2950     ;;
2951   *)
2952     case $LD in # libtool.m4 will add one of these switches to LD
2953     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2954     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2955     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2956     *) libsuff= shlibsuff= libmagic=never-match;;
2957     esac
2958     ;;
2959   esac
2960   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2961   shlibpath_overrides_runpath=no
2962   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2963   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2964   ;;
2965
2966 # No shared lib support for Linux oldld, aout, or coff.
2967 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2968   dynamic_linker=no
2969   ;;
2970
2971 # This must be Linux ELF.
2972 linux-gnu*)
2973   version_type=linux
2974   need_lib_prefix=no
2975   need_version=no
2976   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2977   soname_spec='${libname}${release}.so$major'
2978   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2979   shlibpath_var=LD_LIBRARY_PATH
2980   shlibpath_overrides_runpath=no
2981   # This implies no fast_install, which is unacceptable.
2982   # Some rework will be needed to allow for fast_install
2983   # before this can be enabled.
2984   hardcode_into_libs=yes
2985
2986   case $host_cpu:$lt_cv_cc_64bit_output in
2987   powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes)
2988     sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /usr/X11R6/lib64"
2989     sys_lib_search_path_spec="/lib64 /usr/lib64 /usr/local/lib64 /usr/X11R6/lib64"
2990     ;;
2991   esac
2992
2993   # We used to test for /lib/ld.so.1 and disable shared libraries on
2994   # powerpc, because MkLinux only supported shared libraries with the
2995   # GNU dynamic linker.  Since this was broken with cross compilers,
2996   # most powerpc-linux boxes support dynamic linking these days and
2997   # people can always --disable-shared, the test was removed, and we
2998   # assume the GNU/Linux dynamic linker is in use.
2999   dynamic_linker='GNU/Linux ld.so'
3000   ;;
3001
3002 netbsd*)
3003   version_type=sunos
3004   need_lib_prefix=no
3005   need_version=no
3006   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3007     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3008     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3009     dynamic_linker='NetBSD (a.out) ld.so'
3010   else
3011     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
3012     soname_spec='${libname}${release}.so$major'
3013     dynamic_linker='NetBSD ld.elf_so'
3014   fi
3015   shlibpath_var=LD_LIBRARY_PATH
3016   shlibpath_overrides_runpath=yes
3017   hardcode_into_libs=yes
3018   ;;
3019
3020 newsos6)
3021   version_type=linux
3022   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3023   shlibpath_var=LD_LIBRARY_PATH
3024   shlibpath_overrides_runpath=yes
3025   ;;
3026
3027 openbsd*)
3028   version_type=sunos
3029   need_lib_prefix=no
3030   need_version=no
3031   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3032     case "$host_os" in
3033     openbsd2.[[89]] | openbsd2.[[89]].*)
3034       shlibpath_overrides_runpath=no
3035       ;;
3036     *)
3037       shlibpath_overrides_runpath=yes
3038       ;;
3039     esac
3040   else
3041     shlibpath_overrides_runpath=yes
3042   fi
3043   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3044   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
3045   shlibpath_var=LD_LIBRARY_PATH
3046   ;;
3047
3048 os2*)
3049   libname_spec='$name'
3050   need_lib_prefix=no
3051   library_names_spec='$libname.dll $libname.a'
3052   dynamic_linker='OS/2 ld.exe'
3053   shlibpath_var=LIBPATH
3054   ;;
3055
3056 osf3* | osf4* | osf5*)
3057   version_type=osf
3058   need_version=no
3059   soname_spec='${libname}${release}.so$major'
3060   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3061   shlibpath_var=LD_LIBRARY_PATH
3062   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
3063   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
3064   hardcode_into_libs=yes
3065   ;;
3066
3067 sco3.2v5*)
3068   version_type=osf
3069   soname_spec='${libname}${release}.so$major'
3070   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3071   shlibpath_var=LD_LIBRARY_PATH
3072   ;;
3073
3074 solaris*)
3075   version_type=linux
3076   need_lib_prefix=no
3077   need_version=no
3078   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3079   soname_spec='${libname}${release}.so$major'
3080   shlibpath_var=LD_LIBRARY_PATH
3081   shlibpath_overrides_runpath=yes
3082   hardcode_into_libs=yes
3083   # ldd complains unless libraries are executable
3084   postinstall_cmds='chmod +x $lib'
3085   ;;
3086
3087 sunos4*)
3088   version_type=sunos
3089   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
3090   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
3091   shlibpath_var=LD_LIBRARY_PATH
3092   shlibpath_overrides_runpath=yes
3093   if test "$with_gnu_ld" = yes; then
3094     need_lib_prefix=no
3095   fi
3096   need_version=yes
3097   ;;
3098
3099 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3100   version_type=linux
3101   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3102   soname_spec='${libname}${release}.so$major'
3103   shlibpath_var=LD_LIBRARY_PATH
3104   case $host_vendor in
3105     sni)
3106       shlibpath_overrides_runpath=no
3107       need_lib_prefix=no
3108       export_dynamic_flag_spec='${wl}-Blargedynsym'
3109       runpath_var=LD_RUN_PATH
3110       ;;
3111     siemens)
3112       need_lib_prefix=no
3113       ;;
3114     motorola)
3115       need_lib_prefix=no
3116       need_version=no
3117       shlibpath_overrides_runpath=no
3118       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
3119       ;;
3120   esac
3121   ;;
3122
3123 uts4*)
3124   version_type=linux
3125   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3126   soname_spec='${libname}${release}.so$major'
3127   shlibpath_var=LD_LIBRARY_PATH
3128   ;;
3129
3130 dgux*)
3131   version_type=linux
3132   need_lib_prefix=no
3133   need_version=no
3134   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
3135   soname_spec='${libname}${release}.so$major'
3136   shlibpath_var=LD_LIBRARY_PATH
3137   ;;
3138
3139 sysv4*MP*)
3140   if test -d /usr/nec ;then
3141     version_type=linux
3142     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3143     soname_spec='$libname.so.$major'
3144     shlibpath_var=LD_LIBRARY_PATH
3145   fi
3146   ;;
3147
3148 *)
3149   dynamic_linker=no
3150   ;;
3151 esac
3152 AC_MSG_RESULT([$dynamic_linker])
3153 test "$dynamic_linker" = no && can_build_shared=no
3154
3155 # Report the final consequences.
3156 AC_MSG_CHECKING([if libtool supports shared libraries])
3157 AC_MSG_RESULT([$can_build_shared])
3158
3159 AC_MSG_CHECKING([whether to build shared libraries])
3160 test "$can_build_shared" = "no" && enable_shared=no
3161
3162 # On AIX, shared libraries and static libraries use the same namespace, and
3163 # are all built from PIC.
3164 case "$host_os" in
3165 aix3*)
3166   test "$enable_shared" = yes && enable_static=no
3167   if test -n "$RANLIB"; then
3168     archive_cmds="$archive_cmds~\$RANLIB \$lib"
3169     postinstall_cmds='$RANLIB $lib'
3170   fi
3171   ;;
3172
3173 aix4*)
3174   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3175     test "$enable_shared" = yes && enable_static=no
3176   fi
3177   ;;
3178 esac
3179 AC_MSG_RESULT([$enable_shared])
3180
3181 AC_MSG_CHECKING([whether to build static libraries])
3182 # Make sure either enable_shared or enable_static is yes.
3183 test "$enable_shared" = yes || enable_static=yes
3184 AC_MSG_RESULT([$enable_static])
3185
3186 if test "$hardcode_action" = relink; then
3187   # Fast installation is not supported
3188   enable_fast_install=no
3189 elif test "$shlibpath_overrides_runpath" = yes ||
3190      test "$enable_shared" = no; then
3191   # Fast installation is not necessary
3192   enable_fast_install=needless
3193 fi
3194
3195 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
3196 if test "$GCC" = yes; then
3197   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
3198 fi
3199
3200 AC_LIBTOOL_DLOPEN_SELF
3201
3202 if test "$enable_shared" = yes && test "$GCC" = yes; then
3203   case $archive_cmds in
3204   *'~'*)
3205     # FIXME: we may have to deal with multi-command sequences.
3206     ;;
3207   '$CC '*)
3208     # Test whether the compiler implicitly links with -lc since on some
3209     # systems, -lgcc has to come before -lc. If gcc already passes -lc
3210     # to ld, don't add -lc before -lgcc.
3211     AC_MSG_CHECKING([whether -lc should be explicitly linked in])
3212     AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
3213     [$rm conftest*
3214     echo 'static int dummy;' > conftest.$ac_ext
3215
3216     if AC_TRY_EVAL(ac_compile); then
3217       soname=conftest
3218       lib=conftest
3219       libobjs=conftest.$ac_objext
3220       deplibs=
3221       wl=$lt_cv_prog_cc_wl
3222       compiler_flags=-v
3223       linker_flags=-v
3224       verstring=
3225       output_objdir=.
3226       libname=conftest
3227       save_allow_undefined_flag=$allow_undefined_flag
3228       allow_undefined_flag=
3229       if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
3230       then
3231         lt_cv_archive_cmds_need_lc=no
3232       else
3233         lt_cv_archive_cmds_need_lc=yes
3234       fi
3235       allow_undefined_flag=$save_allow_undefined_flag
3236     else
3237       cat conftest.err 1>&5
3238     fi])
3239     AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3240     ;;
3241   esac
3242 fi
3243 need_lc=${lt_cv_archive_cmds_need_lc-yes}
3244
3245 # The second clause should only fire when bootstrapping the
3246 # libtool distribution, otherwise you forgot to ship ltmain.sh
3247 # with your package, and you will get complaints that there are
3248 # no rules to generate ltmain.sh.
3249 if test -f "$ltmain"; then
3250   :
3251 else
3252   # If there is no Makefile yet, we rely on a make rule to execute
3253   # `config.status --recheck' to rerun these tests and create the
3254   # libtool script then.
3255   test -f Makefile && make "$ltmain"
3256 fi
3257
3258 if test -f "$ltmain"; then
3259   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3260   $rm -f "${ofile}T"
3261
3262   echo creating $ofile
3263
3264   # Now quote all the things that may contain metacharacters while being
3265   # careful not to overquote the AC_SUBSTed values.  We take copies of the
3266   # variables and quote the copies for generation of the libtool script.
3267   for var in echo old_CC old_CFLAGS SED \
3268     AR AR_FLAGS CC LD LN_S NM SHELL \
3269     reload_flag reload_cmds wl \
3270     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3271     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3272     library_names_spec soname_spec \
3273     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3274     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3275     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3276     old_striplib striplib file_magic_cmd export_symbols_cmds \
3277     deplibs_check_method allow_undefined_flag no_undefined_flag \
3278     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3279     global_symbol_to_c_name_address \
3280     hardcode_libdir_flag_spec hardcode_libdir_separator  \
3281     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3282     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3283
3284     case $var in
3285     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3286     old_postinstall_cmds | old_postuninstall_cmds | \
3287     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3288     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3289     postinstall_cmds | postuninstall_cmds | \
3290     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3291       # Double-quote double-evaled strings.
3292       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3293       ;;
3294     *)
3295       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3296       ;;
3297     esac
3298   done
3299
3300   cat <<__EOF__ > "${ofile}T"
3301 #! $SHELL
3302
3303 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3304 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3305 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3306 #
3307 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3308 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3309 #
3310 # This program is free software; you can redistribute it and/or modify
3311 # it under the terms of the GNU General Public License as published by
3312 # the Free Software Foundation; either version 2 of the License, or
3313 # (at your option) any later version.
3314 #
3315 # This program is distributed in the hope that it will be useful, but
3316 # WITHOUT ANY WARRANTY; without even the implied warranty of
3317 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3318 # General Public License for more details.
3319 #
3320 # You should have received a copy of the GNU General Public License
3321 # along with this program; if not, write to the Free Software
3322 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3323 #
3324 # As a special exception to the GNU General Public License, if you
3325 # distribute this file as part of a program that contains a
3326 # configuration script generated by Autoconf, you may include it under
3327 # the same distribution terms that you use for the rest of that program.
3328
3329 # A sed that does not truncate output.
3330 SED=$lt_SED
3331
3332 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3333 Xsed="${SED} -e s/^X//"
3334
3335 # The HP-UX ksh and POSIX shell print the target directory to stdout
3336 # if CDPATH is set.
3337 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3338
3339 # ### BEGIN LIBTOOL CONFIG
3340
3341 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3342
3343 # Shell to use when invoking shell scripts.
3344 SHELL=$lt_SHELL
3345
3346 # Whether or not to build shared libraries.
3347 build_libtool_libs=$enable_shared
3348
3349 # Whether or not to build static libraries.
3350 build_old_libs=$enable_static
3351
3352 # Whether or not to add -lc for building shared libraries.
3353 build_libtool_need_lc=$need_lc
3354
3355 # Whether or not to optimize for fast installation.
3356 fast_install=$enable_fast_install
3357
3358 # The host system.
3359 host_alias=$host_alias
3360 host=$host
3361
3362 # An echo program that does not interpret backslashes.
3363 echo=$lt_echo
3364
3365 # The archiver.
3366 AR=$lt_AR
3367 AR_FLAGS=$lt_AR_FLAGS
3368
3369 # The default C compiler.
3370 CC=$lt_CC
3371
3372 # Is the compiler the GNU C compiler?
3373 with_gcc=$GCC
3374
3375 # The linker used to build libraries.
3376 LD=$lt_LD
3377
3378 # Whether we need hard or soft links.
3379 LN_S=$lt_LN_S
3380
3381 # A BSD-compatible nm program.
3382 NM=$lt_NM
3383
3384 # A symbol stripping program
3385 STRIP=$STRIP
3386
3387 # Used to examine libraries when file_magic_cmd begins "file"
3388 MAGIC_CMD=$MAGIC_CMD
3389
3390 # Used on cygwin: DLL creation program.
3391 DLLTOOL="$DLLTOOL"
3392
3393 # Used on cygwin: object dumper.
3394 OBJDUMP="$OBJDUMP"
3395
3396 # Used on cygwin: assembler.
3397 AS="$AS"
3398
3399 # The name of the directory that contains temporary libtool files.
3400 objdir=$objdir
3401
3402 # How to create reloadable object files.
3403 reload_flag=$lt_reload_flag
3404 reload_cmds=$lt_reload_cmds
3405
3406 # How to pass a linker flag through the compiler.
3407 wl=$lt_wl
3408
3409 # Object file suffix (normally "o").
3410 objext="$ac_objext"
3411
3412 # Old archive suffix (normally "a").
3413 libext="$libext"
3414
3415 # Executable file suffix (normally "").
3416 exeext="$exeext"
3417
3418 # Additional compiler flags for building library objects.
3419 pic_flag=$lt_pic_flag
3420 pic_mode=$pic_mode
3421
3422 # Does compiler simultaneously support -c and -o options?
3423 compiler_c_o=$lt_compiler_c_o
3424
3425 # Can we write directly to a .lo ?
3426 compiler_o_lo=$lt_compiler_o_lo
3427
3428 # Must we lock files when doing compilation ?
3429 need_locks=$lt_need_locks
3430
3431 # Do we need the lib prefix for modules?
3432 need_lib_prefix=$need_lib_prefix
3433
3434 # Do we need a version for libraries?
3435 need_version=$need_version
3436
3437 # Whether dlopen is supported.
3438 dlopen_support=$enable_dlopen
3439
3440 # Whether dlopen of programs is supported.
3441 dlopen_self=$enable_dlopen_self
3442
3443 # Whether dlopen of statically linked programs is supported.
3444 dlopen_self_static=$enable_dlopen_self_static
3445
3446 # Compiler flag to prevent dynamic linking.
3447 link_static_flag=$lt_link_static_flag
3448
3449 # Compiler flag to turn off builtin functions.
3450 no_builtin_flag=$lt_no_builtin_flag
3451
3452 # Compiler flag to allow reflexive dlopens.
3453 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3454
3455 # Compiler flag to generate shared objects directly from archives.
3456 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3457
3458 # Compiler flag to generate thread-safe objects.
3459 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3460
3461 # Library versioning type.
3462 version_type=$version_type
3463
3464 # Format of library name prefix.
3465 libname_spec=$lt_libname_spec
3466
3467 # List of archive names.  First name is the real one, the rest are links.
3468 # The last name is the one that the linker finds with -lNAME.
3469 library_names_spec=$lt_library_names_spec
3470
3471 # The coded name of the library, if different from the real name.
3472 soname_spec=$lt_soname_spec
3473
3474 # Commands used to build and install an old-style archive.
3475 RANLIB=$lt_RANLIB
3476 old_archive_cmds=$lt_old_archive_cmds
3477 old_postinstall_cmds=$lt_old_postinstall_cmds
3478 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3479
3480 # Create an old-style archive from a shared archive.
3481 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3482
3483 # Create a temporary old-style archive to link instead of a shared archive.
3484 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3485
3486 # Commands used to build and install a shared archive.
3487 archive_cmds=$lt_archive_cmds
3488 archive_expsym_cmds=$lt_archive_expsym_cmds
3489 postinstall_cmds=$lt_postinstall_cmds
3490 postuninstall_cmds=$lt_postuninstall_cmds
3491
3492 # Commands to strip libraries.
3493 old_striplib=$lt_old_striplib
3494 striplib=$lt_striplib
3495
3496 # Method to check whether dependent libraries are shared objects.
3497 deplibs_check_method=$lt_deplibs_check_method
3498
3499 # Command to use when deplibs_check_method == file_magic.
3500 file_magic_cmd=$lt_file_magic_cmd
3501
3502 # Flag that allows shared libraries with undefined symbols to be built.
3503 allow_undefined_flag=$lt_allow_undefined_flag
3504
3505 # Flag that forces no undefined symbols.
3506 no_undefined_flag=$lt_no_undefined_flag
3507
3508 # Commands used to finish a libtool library installation in a directory.
3509 finish_cmds=$lt_finish_cmds
3510
3511 # Same as above, but a single script fragment to be evaled but not shown.
3512 finish_eval=$lt_finish_eval
3513
3514 # Take the output of nm and produce a listing of raw symbols and C names.
3515 global_symbol_pipe=$lt_global_symbol_pipe
3516
3517 # Transform the output of nm in a proper C declaration
3518 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3519
3520 # Transform the output of nm in a C name address pair
3521 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3522
3523 # This is the shared library runtime path variable.
3524 runpath_var=$runpath_var
3525
3526 # This is the shared library path variable.
3527 shlibpath_var=$shlibpath_var
3528
3529 # Is shlibpath searched before the hard-coded library search path?
3530 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3531
3532 # How to hardcode a shared library path into an executable.
3533 hardcode_action=$hardcode_action
3534
3535 # Whether we should hardcode library paths into libraries.
3536 hardcode_into_libs=$hardcode_into_libs
3537
3538 # Flag to hardcode \$libdir into a binary during linking.
3539 # This must work even if \$libdir does not exist.
3540 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3541
3542 # Whether we need a single -rpath flag with a separated argument.
3543 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3544
3545 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3546 # resulting binary.
3547 hardcode_direct=$hardcode_direct
3548
3549 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3550 # resulting binary.
3551 hardcode_minus_L=$hardcode_minus_L
3552
3553 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3554 # the resulting binary.
3555 hardcode_shlibpath_var=$hardcode_shlibpath_var
3556
3557 # Variables whose values should be saved in libtool wrapper scripts and
3558 # restored at relink time.
3559 variables_saved_for_relink="$variables_saved_for_relink"
3560
3561 # Whether libtool must link a program against all its dependency libraries.
3562 link_all_deplibs=$link_all_deplibs
3563
3564 # Compile-time system search path for libraries
3565 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3566
3567 # Run-time system search path for libraries
3568 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3569
3570 # Fix the shell variable \$srcfile for the compiler.
3571 fix_srcfile_path="$fix_srcfile_path"
3572
3573 # Set to yes if exported symbols are required.
3574 always_export_symbols=$always_export_symbols
3575
3576 # The commands to list exported symbols.
3577 export_symbols_cmds=$lt_export_symbols_cmds
3578
3579 # The commands to extract the exported symbol list from a shared archive.
3580 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3581
3582 # Symbols that should not be listed in the preloaded symbols.
3583 exclude_expsyms=$lt_exclude_expsyms
3584
3585 # Symbols that must always be exported.
3586 include_expsyms=$lt_include_expsyms
3587
3588 # ### END LIBTOOL CONFIG
3589
3590 __EOF__
3591
3592   case $host_os in
3593   aix3*)
3594     cat <<\EOF >> "${ofile}T"
3595
3596 # AIX sometimes has problems with the GCC collect2 program.  For some
3597 # reason, if we set the COLLECT_NAMES environment variable, the problems
3598 # vanish in a puff of smoke.
3599 if test "X${COLLECT_NAMES+set}" != Xset; then
3600   COLLECT_NAMES=
3601   export COLLECT_NAMES
3602 fi
3603 EOF
3604     ;;
3605   esac
3606
3607   case $host_os in
3608   cygwin* | mingw* | pw32* | os2*)
3609     cat <<'EOF' >> "${ofile}T"
3610       # This is a source program that is used to create dlls on Windows
3611       # Don't remove nor modify the starting and closing comments
3612 # /* ltdll.c starts here */
3613 # #define WIN32_LEAN_AND_MEAN
3614 # #include <windows.h>
3615 # #undef WIN32_LEAN_AND_MEAN
3616 # #include <stdio.h>
3617 #
3618 # #ifndef __CYGWIN__
3619 # #  ifdef __CYGWIN32__
3620 # #    define __CYGWIN__ __CYGWIN32__
3621 # #  endif
3622 # #endif
3623 #
3624 # #ifdef __cplusplus
3625 # extern "C" {
3626 # #endif
3627 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3628 # #ifdef __cplusplus
3629 # }
3630 # #endif
3631 #
3632 # #ifdef __CYGWIN__
3633 # #include <cygwin/cygwin_dll.h>
3634 # DECLARE_CYGWIN_DLL( DllMain );
3635 # #endif
3636 # HINSTANCE __hDllInstance_base;
3637 #
3638 # BOOL APIENTRY
3639 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3640 # {
3641 #   __hDllInstance_base = hInst;
3642 #   return TRUE;
3643 # }
3644 # /* ltdll.c ends here */
3645         # This is a source program that is used to create import libraries
3646         # on Windows for dlls which lack them. Don't remove nor modify the
3647         # starting and closing comments
3648 # /* impgen.c starts here */
3649 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
3650 #
3651 #  This file is part of GNU libtool.
3652 #
3653 #  This program is free software; you can redistribute it and/or modify
3654 #  it under the terms of the GNU General Public License as published by
3655 #  the Free Software Foundation; either version 2 of the License, or
3656 #  (at your option) any later version.
3657 #
3658 #  This program is distributed in the hope that it will be useful,
3659 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
3660 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3661 #  GNU General Public License for more details.
3662 #
3663 #  You should have received a copy of the GNU General Public License
3664 #  along with this program; if not, write to the Free Software
3665 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3666 #  */
3667 #
3668 # #include <stdio.h>            /* for printf() */
3669 # #include <unistd.h>           /* for open(), lseek(), read() */
3670 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
3671 # #include <string.h>           /* for strdup() */
3672 #
3673 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3674 # #ifndef O_BINARY
3675 # #define O_BINARY 0
3676 # #endif
3677 #
3678 # static unsigned int
3679 # pe_get16 (fd, offset)
3680 #      int fd;
3681 #      int offset;
3682 # {
3683 #   unsigned char b[2];
3684 #   lseek (fd, offset, SEEK_SET);
3685 #   read (fd, b, 2);
3686 #   return b[0] + (b[1]<<8);
3687 # }
3688 #
3689 # static unsigned int
3690 # pe_get32 (fd, offset)
3691 #     int fd;
3692 #     int offset;
3693 # {
3694 #   unsigned char b[4];
3695 #   lseek (fd, offset, SEEK_SET);
3696 #   read (fd, b, 4);
3697 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3698 # }
3699 #
3700 # static unsigned int
3701 # pe_as32 (ptr)
3702 #      void *ptr;
3703 # {
3704 #   unsigned char *b = ptr;
3705 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3706 # }
3707 #
3708 # int
3709 # main (argc, argv)
3710 #     int argc;
3711 #     char *argv[];
3712 # {
3713 #     int dll;
3714 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3715 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
3716 #     unsigned long name_rvas, nexp;
3717 #     unsigned char *expdata, *erva;
3718 #     char *filename, *dll_name;
3719 #
3720 #     filename = argv[1];
3721 #
3722 #     dll = open(filename, O_RDONLY|O_BINARY);
3723 #     if (dll < 1)
3724 #       return 1;
3725 #
3726 #     dll_name = filename;
3727 #
3728 #     for (i=0; filename[i]; i++)
3729 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
3730 #           dll_name = filename + i +1;
3731 #
3732 #     pe_header_offset = pe_get32 (dll, 0x3c);
3733 #     opthdr_ofs = pe_header_offset + 4 + 20;
3734 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
3735 #
3736 #     if (num_entries < 1) /* no exports */
3737 #       return 1;
3738 #
3739 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
3740 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
3741 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3742 #     secptr = (pe_header_offset + 4 + 20 +
3743 #             pe_get16 (dll, pe_header_offset + 4 + 16));
3744 #
3745 #     expptr = 0;
3746 #     for (i = 0; i < nsections; i++)
3747 #     {
3748 #       char sname[8];
3749 #       unsigned long secptr1 = secptr + 40 * i;
3750 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3751 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3752 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3753 #       lseek(dll, secptr1, SEEK_SET);
3754 #       read(dll, sname, 8);
3755 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
3756 #       {
3757 #           expptr = fptr + (export_rva - vaddr);
3758 #           if (export_rva + export_size > vaddr + vsize)
3759 #               export_size = vsize - (export_rva - vaddr);
3760 #           break;
3761 #       }
3762 #     }
3763 #
3764 #     expdata = (unsigned char*)malloc(export_size);
3765 #     lseek (dll, expptr, SEEK_SET);
3766 #     read (dll, expdata, export_size);
3767 #     erva = expdata - export_rva;
3768 #
3769 #     nexp = pe_as32 (expdata+24);
3770 #     name_rvas = pe_as32 (expdata+32);
3771 #
3772 #     printf ("EXPORTS\n");
3773 #     for (i = 0; i<nexp; i++)
3774 #     {
3775 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3776 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3777 #     }
3778 #
3779 #     return 0;
3780 # }
3781 # /* impgen.c ends here */
3782
3783 EOF
3784     ;;
3785   esac
3786
3787   # We use sed instead of cat because bash on DJGPP gets confused if
3788   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
3789   # text mode, it properly converts lines to CR/LF.  This bash problem
3790   # is reportedly fixed, but why not run on old versions too?
3791   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3792
3793   mv -f "${ofile}T" "$ofile" || \
3794     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3795   chmod +x "$ofile"
3796 fi
3797
3798 ])# _LT_AC_LTCONFIG_HACK
3799
3800 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3801 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3802
3803 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3804 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3805
3806 # AC_ENABLE_SHARED - implement the --enable-shared flag
3807 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3808 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3809 #   `yes'.
3810 AC_DEFUN([AC_ENABLE_SHARED],
3811 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3812 AC_ARG_ENABLE(shared,
3813 changequote(<<, >>)dnl
3814 <<  --enable-shared[=PKGS]  build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3815 changequote([, ])dnl
3816 [p=${PACKAGE-default}
3817 case $enableval in
3818 yes) enable_shared=yes ;;
3819 no) enable_shared=no ;;
3820 *)
3821   enable_shared=no
3822   # Look at the argument we got.  We use all the common list separators.
3823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3824   for pkg in $enableval; do
3825     if test "X$pkg" = "X$p"; then
3826       enable_shared=yes
3827     fi
3828   done
3829   IFS="$ac_save_ifs"
3830   ;;
3831 esac],
3832 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3833 ])
3834
3835 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3836 AC_DEFUN([AC_DISABLE_SHARED],
3837 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3838 AC_ENABLE_SHARED(no)])
3839
3840 # AC_ENABLE_STATIC - implement the --enable-static flag
3841 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3842 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3843 #   `yes'.
3844 AC_DEFUN([AC_ENABLE_STATIC],
3845 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3846 AC_ARG_ENABLE(static,
3847 changequote(<<, >>)dnl
3848 <<  --enable-static[=PKGS]  build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3849 changequote([, ])dnl
3850 [p=${PACKAGE-default}
3851 case $enableval in
3852 yes) enable_static=yes ;;
3853 no) enable_static=no ;;
3854 *)
3855   enable_static=no
3856   # Look at the argument we got.  We use all the common list separators.
3857   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3858   for pkg in $enableval; do
3859     if test "X$pkg" = "X$p"; then
3860       enable_static=yes
3861     fi
3862   done
3863   IFS="$ac_save_ifs"
3864   ;;
3865 esac],
3866 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3867 ])
3868
3869 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3870 AC_DEFUN([AC_DISABLE_STATIC],
3871 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3872 AC_ENABLE_STATIC(no)])
3873
3874
3875 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3876 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3877 #   Where DEFAULT is either `yes' or `no'.  If omitted, it defaults to
3878 #   `yes'.
3879 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3880 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3881 AC_ARG_ENABLE(fast-install,
3882 changequote(<<, >>)dnl
3883 <<  --enable-fast-install[=PKGS]  optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3884 changequote([, ])dnl
3885 [p=${PACKAGE-default}
3886 case $enableval in
3887 yes) enable_fast_install=yes ;;
3888 no) enable_fast_install=no ;;
3889 *)
3890   enable_fast_install=no
3891   # Look at the argument we got.  We use all the common list separators.
3892   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3893   for pkg in $enableval; do
3894     if test "X$pkg" = "X$p"; then
3895       enable_fast_install=yes
3896     fi
3897   done
3898   IFS="$ac_save_ifs"
3899   ;;
3900 esac],
3901 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3902 ])
3903
3904 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3905 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3906 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3907 AC_ENABLE_FAST_INSTALL(no)])
3908
3909 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3910 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3911 #   Where MODE is either `yes' or `no'.  If omitted, it defaults to
3912 #   `both'.
3913 AC_DEFUN([AC_LIBTOOL_PICMODE],
3914 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3915 pic_mode=ifelse($#,1,$1,default)])
3916
3917
3918 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3919 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3920 [AC_MSG_CHECKING([for $1])
3921 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3922 [case $MAGIC_CMD in
3923   /*)
3924   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3925   ;;
3926   ?:/*)
3927   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3928   ;;
3929   *)
3930   ac_save_MAGIC_CMD="$MAGIC_CMD"
3931   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3932 dnl $ac_dummy forces splitting on constant user-supplied paths.
3933 dnl POSIX.2 word splitting is done only on the output of word expansions,
3934 dnl not every word.  This closes a longstanding sh security hole.
3935   ac_dummy="ifelse([$2], , $PATH, [$2])"
3936   for ac_dir in $ac_dummy; do
3937     test -z "$ac_dir" && ac_dir=.
3938     if test -f $ac_dir/$1; then
3939       lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3940       if test -n "$file_magic_test_file"; then
3941         case $deplibs_check_method in
3942         "file_magic "*)
3943           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3944           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3945           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3946             egrep "$file_magic_regex" > /dev/null; then
3947             :
3948           else
3949             cat <<EOF 1>&2
3950
3951 *** Warning: the command libtool uses to detect shared libraries,
3952 *** $file_magic_cmd, produces output that libtool cannot recognize.
3953 *** The result is that libtool may fail to recognize shared libraries
3954 *** as such.  This will affect the creation of libtool libraries that
3955 *** depend on shared libraries, but programs linked with such libtool
3956 *** libraries will work regardless of this problem.  Nevertheless, you
3957 *** may want to report the problem to your system manager and/or to
3958 *** bug-libtool@gnu.org
3959
3960 EOF
3961           fi ;;
3962         esac
3963       fi
3964       break
3965     fi
3966   done
3967   IFS="$ac_save_ifs"
3968   MAGIC_CMD="$ac_save_MAGIC_CMD"
3969   ;;
3970 esac])
3971 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3972 if test -n "$MAGIC_CMD"; then
3973   AC_MSG_RESULT($MAGIC_CMD)
3974 else
3975   AC_MSG_RESULT(no)
3976 fi
3977 ])
3978
3979
3980 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3981 AC_DEFUN([AC_PATH_MAGIC],
3982 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3983 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3984 if test -z "$lt_cv_path_MAGIC_CMD"; then
3985   if test -n "$ac_tool_prefix"; then
3986     AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3987   else
3988     MAGIC_CMD=:
3989   fi
3990 fi
3991 ])
3992
3993
3994 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3995 AC_DEFUN([AC_PROG_LD],
3996 [AC_ARG_WITH(gnu-ld,
3997 [  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]],
3998 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3999 AC_REQUIRE([AC_PROG_CC])dnl
4000 AC_REQUIRE([AC_CANONICAL_HOST])dnl
4001 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
4002 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4003 ac_prog=ld
4004 if test "$GCC" = yes; then
4005   # Check if gcc -print-prog-name=ld gives a path.
4006   AC_MSG_CHECKING([for ld used by GCC])
4007   case $host in
4008   *-*-mingw*)
4009     # gcc leaves a trailing carriage return which upsets mingw
4010     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4011   *)
4012     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
4013   esac
4014   case $ac_prog in
4015     # Accept absolute paths.
4016     [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
4017       re_direlt='/[[^/]][[^/]]*/\.\./'
4018       # Canonicalize the path of ld
4019       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
4020       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
4021         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
4022       done
4023       test -z "$LD" && LD="$ac_prog"
4024       ;;
4025   "")
4026     # If it fails, then pretend we aren't using GCC.
4027     ac_prog=ld
4028     ;;
4029   *)
4030     # If it is relative, then search for the first ld in PATH.
4031     with_gnu_ld=unknown
4032     ;;
4033   esac
4034 elif test "$with_gnu_ld" = yes; then
4035   AC_MSG_CHECKING([for GNU ld])
4036 else
4037   AC_MSG_CHECKING([for non-GNU ld])
4038 fi
4039 AC_CACHE_VAL(lt_cv_path_LD,
4040 [if test -z "$LD"; then
4041   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4042   for ac_dir in $PATH; do
4043     test -z "$ac_dir" && ac_dir=.
4044     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
4045       lt_cv_path_LD="$ac_dir/$ac_prog"
4046       # Check to see if the program is GNU ld.  I'd rather use --version,
4047       # but apparently some GNU ld's only accept -v.
4048       # Break only if it was the GNU/non-GNU ld that we prefer.
4049       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
4050         test "$with_gnu_ld" != no && break
4051       else
4052         test "$with_gnu_ld" != yes && break
4053       fi
4054     fi
4055   done
4056   IFS="$ac_save_ifs"
4057 else
4058   lt_cv_path_LD="$LD" # Let the user override the test with a path.
4059 fi])
4060 LD="$lt_cv_path_LD"
4061 if test -n "$LD"; then
4062   AC_MSG_RESULT($LD)
4063 else
4064   AC_MSG_RESULT(no)
4065 fi
4066 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
4067 AC_PROG_LD_GNU
4068 ])
4069
4070 # AC_PROG_LD_GNU -
4071 AC_DEFUN([AC_PROG_LD_GNU],
4072 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
4073 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
4074 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
4075   lt_cv_prog_gnu_ld=yes
4076 else
4077   lt_cv_prog_gnu_ld=no
4078 fi])
4079 with_gnu_ld=$lt_cv_prog_gnu_ld
4080 ])
4081
4082 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
4083 #   -- PORTME Some linkers may need a different reload flag.
4084 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
4085 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
4086 [lt_cv_ld_reload_flag='-r'])
4087 reload_flag=$lt_cv_ld_reload_flag
4088 test -n "$reload_flag" && reload_flag=" $reload_flag"
4089 ])
4090
4091 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
4092 #  -- PORTME fill in with the dynamic library characteristics
4093 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
4094 [AC_CACHE_CHECK([how to recognise dependent libraries],
4095 lt_cv_deplibs_check_method,
4096 [lt_cv_file_magic_cmd='$MAGIC_CMD'
4097 lt_cv_file_magic_test_file=
4098 lt_cv_deplibs_check_method='unknown'
4099 # Need to set the preceding variable on all platforms that support
4100 # interlibrary dependencies.
4101 # 'none' -- dependencies not supported.
4102 # `unknown' -- same as none, but documents that we really don't know.
4103 # 'pass_all' -- all dependencies passed with no checks.
4104 # 'test_compile' -- check by making test program.
4105 # 'file_magic [[regex]]' -- check by looking for files in library path
4106 # which responds to the $file_magic_cmd with a given egrep regex.
4107 # If you have `file' or equivalent on your system and you're not sure
4108 # whether `pass_all' will *always* work, you probably want this one.
4109
4110 case $host_os in
4111 aix4* | aix5*)
4112   lt_cv_deplibs_check_method=pass_all
4113   ;;
4114
4115 beos*)
4116   lt_cv_deplibs_check_method=pass_all
4117   ;;
4118
4119 bsdi4*)
4120   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
4121   lt_cv_file_magic_cmd='/usr/bin/file -L'
4122   lt_cv_file_magic_test_file=/shlib/libc.so
4123   ;;
4124
4125 cygwin* | mingw* | pw32*)
4126   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
4127   lt_cv_file_magic_cmd='$OBJDUMP -f'
4128   ;;
4129
4130 darwin* | rhapsody*)
4131   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
4132   lt_cv_file_magic_cmd='/usr/bin/file -L'
4133   case "$host_os" in
4134   rhapsody* | darwin1.[[012]])
4135     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4136     ;;
4137   *) # Darwin 1.3 on
4138     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4139     ;;
4140   esac
4141   ;;
4142
4143 freebsd*)
4144   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4145     case $host_cpu in
4146     i*86 )
4147       # Not sure whether the presence of OpenBSD here was a mistake.
4148       # Let's accept both of them until this is cleared up.
4149       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
4150       lt_cv_file_magic_cmd=/usr/bin/file
4151       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4152       ;;
4153     esac
4154   else
4155     lt_cv_deplibs_check_method=pass_all
4156   fi
4157   ;;
4158
4159 gnu*)
4160   lt_cv_deplibs_check_method=pass_all
4161   ;;
4162
4163 hpux10.20*|hpux11*)
4164   lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
4165   lt_cv_file_magic_cmd=/usr/bin/file
4166   lt_cv_file_magic_test_file=/usr/lib/libc.sl
4167   ;;
4168
4169 irix5* | irix6* | nonstopux*)
4170   case $host_os in
4171   irix5* | nonstopux*)
4172     # this will be overridden with pass_all, but let us keep it just in case
4173     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
4174     ;;
4175   *)
4176     case $LD in
4177     *-32|*"-32 ") libmagic=32-bit;;
4178     *-n32|*"-n32 ") libmagic=N32;;
4179     *-64|*"-64 ") libmagic=64-bit;;
4180     *) libmagic=never-match;;
4181     esac
4182     # this will be overridden with pass_all, but let us keep it just in case
4183     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
4184     ;;
4185   esac
4186   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4187   lt_cv_deplibs_check_method=pass_all
4188   ;;
4189
4190 # This must be Linux ELF.
4191 linux-gnu*)
4192   case $host_cpu in
4193   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | x86_64*)
4194     lt_cv_deplibs_check_method=pass_all ;;
4195   *)
4196     # glibc up to 2.1.1 does not perform some relocations on ARM
4197     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
4198   esac
4199   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
4200   ;;
4201
4202 netbsd*)
4203   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
4204     lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
4205   else
4206     lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
4207   fi
4208   ;;
4209
4210 newos6*)
4211   lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
4212   lt_cv_file_magic_cmd=/usr/bin/file
4213   lt_cv_file_magic_test_file=/usr/lib/libnls.so
4214   ;;
4215
4216 openbsd*)
4217   lt_cv_file_magic_cmd=/usr/bin/file
4218   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
4219   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
4220     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
4221   else
4222     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
4223   fi
4224   ;;
4225
4226 osf3* | osf4* | osf5*)
4227   # this will be overridden with pass_all, but let us keep it just in case
4228   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
4229   lt_cv_file_magic_test_file=/shlib/libc.so
4230   lt_cv_deplibs_check_method=pass_all
4231   ;;
4232
4233 sco3.2v5*)
4234   lt_cv_deplibs_check_method=pass_all
4235   ;;
4236
4237 solaris*)
4238   lt_cv_deplibs_check_method=pass_all
4239   lt_cv_file_magic_test_file=/lib/libc.so
4240   ;;
4241
4242 sysv5uw[[78]]* | sysv4*uw2*)
4243   lt_cv_deplibs_check_method=pass_all
4244   ;;
4245
4246 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4247   case $host_vendor in
4248   motorola)
4249     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]]'
4250     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
4251     ;;
4252   ncr)
4253     lt_cv_deplibs_check_method=pass_all
4254     ;;
4255   sequent)
4256     lt_cv_file_magic_cmd='/bin/file'
4257     lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
4258     ;;
4259   sni)
4260     lt_cv_file_magic_cmd='/bin/file'
4261     lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
4262     lt_cv_file_magic_test_file=/lib/libc.so
4263     ;;
4264   siemens)
4265     lt_cv_deplibs_check_method=pass_all
4266     ;;
4267   esac
4268   ;;
4269 esac
4270 ])
4271 file_magic_cmd=$lt_cv_file_magic_cmd
4272 deplibs_check_method=$lt_cv_deplibs_check_method
4273 ])
4274
4275
4276 # AC_PROG_NM - find the path to a BSD-compatible name lister
4277 AC_DEFUN([AC_PROG_NM],
4278 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
4279 AC_MSG_CHECKING([for BSD-compatible nm])
4280 AC_CACHE_VAL(lt_cv_path_NM,
4281 [if test -n "$NM"; then
4282   # Let the user override the test.
4283   lt_cv_path_NM="$NM"
4284 else
4285   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4286   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4287     test -z "$ac_dir" && ac_dir=.
4288     tmp_nm=$ac_dir/${ac_tool_prefix}nm
4289     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4290       # Check to see if the nm accepts a BSD-compat flag.
4291       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4292       #   nm: unknown option "B" ignored
4293       # Tru64's nm complains that /dev/null is an invalid object file
4294       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4295         lt_cv_path_NM="$tmp_nm -B"
4296         break
4297       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4298         lt_cv_path_NM="$tmp_nm -p"
4299         break
4300       else
4301         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4302         continue # so that we can try to find one that supports BSD flags
4303       fi
4304     fi
4305   done
4306   IFS="$ac_save_ifs"
4307   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4308 fi])
4309 NM="$lt_cv_path_NM"
4310 AC_MSG_RESULT([$NM])
4311 ])
4312
4313 # AC_CHECK_LIBM - check for math library
4314 AC_DEFUN([AC_CHECK_LIBM],
4315 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4316 LIBM=
4317 case $host in
4318 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4319   # These system don't have libm
4320   ;;
4321 *-ncr-sysv4.3*)
4322   AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4323   AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4324   ;;
4325 *)
4326   AC_CHECK_LIB(m, main, LIBM="-lm")
4327   ;;
4328 esac
4329 ])
4330
4331 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4332 # the libltdl convenience library and LTDLINCL to the include flags for
4333 # the libltdl header and adds --enable-ltdl-convenience to the
4334 # configure arguments.  Note that LIBLTDL and LTDLINCL are not
4335 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called.  If DIR is not
4336 # provided, it is assumed to be `libltdl'.  LIBLTDL will be prefixed
4337 # with '${top_builddir}/' and LTDLINCL will be prefixed with
4338 # '${top_srcdir}/' (note the single quotes!).  If your package is not
4339 # flat and you're not using automake, define top_builddir and
4340 # top_srcdir appropriately in the Makefiles.
4341 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4342 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4343   case $enable_ltdl_convenience in
4344   no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4345   "") enable_ltdl_convenience=yes
4346       ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4347   esac
4348   LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4349   LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4350   # For backwards non-gettext consistent compatibility...
4351   INCLTDL="$LTDLINCL"
4352 ])
4353
4354 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4355 # the libltdl installable library and LTDLINCL to the include flags for
4356 # the libltdl header and adds --enable-ltdl-install to the configure
4357 # arguments.  Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4358 # AC_CONFIG_SUBDIRS called.  If DIR is not provided and an installed
4359 # libltdl is not found, it is assumed to be `libltdl'.  LIBLTDL will
4360 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4361 # with '${top_srcdir}/' (note the single quotes!).  If your package is
4362 # not flat and you're not using automake, define top_builddir and
4363 # top_srcdir appropriately in the Makefiles.
4364 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4365 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4366 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4367   AC_CHECK_LIB(ltdl, main,
4368   [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4369   [if test x"$enable_ltdl_install" = xno; then
4370      AC_MSG_WARN([libltdl not installed, but installation disabled])
4371    else
4372      enable_ltdl_install=yes
4373    fi
4374   ])
4375   if test x"$enable_ltdl_install" = x"yes"; then
4376     ac_configure_args="$ac_configure_args --enable-ltdl-install"
4377     LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4378     LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4379   else
4380     ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4381     LIBLTDL="-lltdl"
4382     LTDLINCL=
4383   fi
4384   # For backwards non-gettext consistent compatibility...
4385   INCLTDL="$LTDLINCL"
4386 ])
4387
4388 # old names
4389 AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
4390 AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
4391 AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
4392 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4393 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4394 AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
4395 AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
4396
4397 # This is just to silence aclocal about the macro not being used
4398 ifelse([AC_DISABLE_FAST_INSTALL])
4399
4400 # NOTE: This macro has been submitted for inclusion into   #
4401 #  GNU Autoconf as AC_PROG_SED.  When it is available in   #
4402 #  a released version of Autoconf we should remove this    #
4403 #  macro and use it instead.                               #
4404 # LT_AC_PROG_SED
4405 # --------------
4406 # Check for a fully-functional sed program, that truncates
4407 # as few characters as possible.  Prefer GNU sed if found.
4408 AC_DEFUN([LT_AC_PROG_SED],
4409 [AC_MSG_CHECKING([for a sed that does not truncate output])
4410 AC_CACHE_VAL(lt_cv_path_SED,
4411 [# Loop through the user's path and test for sed and gsed.
4412 # Then use that list of sed's as ones to test for truncation.
4413 as_executable_p="test -f"
4414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415 for as_dir in $PATH
4416 do
4417   IFS=$as_save_IFS
4418   test -z "$as_dir" && as_dir=.
4419   for ac_prog in sed gsed; do
4420     for ac_exec_ext in '' $ac_executable_extensions; do
4421       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4422         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4423       fi
4424     done
4425   done
4426 done
4427
4428   # Create a temporary directory, and hook for its removal unless debugging.
4429 $debug ||
4430 {
4431   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4432   trap '{ (exit 1); exit 1; }' 1 2 13 15
4433 }
4434
4435 # Create a (secure) tmp directory for tmp files.
4436 : ${TMPDIR=/tmp}
4437 {
4438   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4439   test -n "$tmp" && test -d "$tmp"
4440 }  ||
4441 {
4442   tmp=$TMPDIR/sed$$-$RANDOM
4443   (umask 077 && mkdir $tmp)
4444 } ||
4445 {
4446    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4447    { (exit 1); exit 1; }
4448 }
4449   _max=0
4450   _count=0
4451   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4452   # along with /bin/sed that truncates output.
4453   for _sed in $_sed_list /usr/xpg4/bin/sed; do
4454     test ! -f ${_sed} && break
4455     cat /dev/null > "$tmp/sed.in"
4456     _count=0
4457     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4458     # Check for GNU sed and select it if it is found.
4459     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4460       lt_cv_path_SED=${_sed}
4461       break
4462     fi
4463     while true; do
4464       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4465       mv "$tmp/sed.tmp" "$tmp/sed.in"
4466       cp "$tmp/sed.in" "$tmp/sed.nl"
4467       echo >>"$tmp/sed.nl"
4468       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4469       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4470       # 40000 chars as input seems more than enough
4471       test $_count -gt 10 && break
4472       _count=`expr $_count + 1`
4473       if test $_count -gt $_max; then
4474         _max=$_count
4475         lt_cv_path_SED=$_sed
4476       fi
4477     done
4478   done
4479   rm -rf "$tmp"
4480 ])
4481 if test "X$SED" != "X"; then
4482   lt_cv_path_SED=$SED
4483 else
4484   SED=$lt_cv_path_SED
4485 fi
4486 AC_MSG_RESULT([$SED])
4487 ])
4488