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