1 # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-
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.
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
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
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; }])
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"
31 if AC_TRY_EVAL2(ac_compile); then
32 ifelse([$3], , :, [rm -rf conftest*
35 echo "configure: failed program was:" >&AC_FD_CC
36 cat conftest.$ac_ext >&AC_FD_CC
37 ifelse([$4], , , [ rm -rf conftest*
43 # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*-
45 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
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)
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.
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
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 "/".
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,
79 patsubst([$1], [^\(/\).*], [\1])),
80 patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
81 patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
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])
93 # The name of the stamp file for HEADER.
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])
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])"
112 ])# _AM_CONFIG_HEADER
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])])
121 # Do all the work for Automake. -*- Autoconf -*-
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.
126 # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002
127 # Free Software Foundation, Inc.
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)
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.
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
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...
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
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])
179 # Define the identity of the package.
180 dnl Distinguish between old-style and new-style calls.
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
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
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)
203 AM_PROG_INSTALL_STRIP
204 # We need awk for the "check" target. The system "awk" is bad on
206 AC_REQUIRE([AC_PROG_AWK])dnl
207 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
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
221 # Copyright 2002 Free Software Foundation, Inc.
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)
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.
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
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"])
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])])
250 # Helper functions for option handling. -*- Autoconf -*-
252 # Copyright 2001, 2002 Free Software Foundation, Inc.
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)
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.
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
271 # _AM_MANGLE_OPTION(NAME)
272 # -----------------------
273 AC_DEFUN([_AM_MANGLE_OPTION],
274 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
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)])
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)])])
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])])
295 # Check to make sure that the build environment is sane.
298 # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
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)
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.
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
319 AC_DEFUN([AM_SANITY_CHECK],
320 [AC_MSG_CHECKING([whether build environment is sane])
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
330 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
331 if test "$[*]" = "X"; then
333 set X `ls -t $srcdir/configure conftest.file`
336 if test "$[*]" != "X $srcdir/configure conftest.file" \
337 && test "$[*]" != "X conftest.file $srcdir/configure"; then
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])
347 test "$[2]" = conftest.file
353 AC_MSG_ERROR([newly created file is older than distributed files!
354 Check your system clock])
361 # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
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)
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.
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
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"}
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 "
400 AC_MSG_WARN([`missing' script is too old or missing])
406 # Copyright 2001 Free Software Foundation, Inc.
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)
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.
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
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/../..'.
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.
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
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.
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.
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.
461 # Rely on autoconf to set up CDPATH properly.
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`
471 # Define $install_sh.
473 # Copyright 2001 Free Software Foundation, Inc.
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)
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.
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
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)])
495 # AM_PROG_INSTALL_STRIP
497 # Copyright 2001 Free Software Foundation, Inc.
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)
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.
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
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], :)
531 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
532 AC_SUBST([INSTALL_STRIP_PROGRAM])])
534 # serial 4 -*- Autoconf -*-
536 # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.
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)
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.
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
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...
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.
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
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=])
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
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
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`
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
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
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
639 am_cv_$1_dependencies_compiler_type=none
642 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
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
656 # MS-DOS does not allow filenames that begin with a dot.
659 rmdir .deps 2>/dev/null
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"
674 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
675 AC_SUBST([AMDEPBACKSLASH])
678 # Generate code to set up dependency tracking. -*- Autoconf -*-
680 # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
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)
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.
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
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")`
716 grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
717 # Extract the definition of DEP_FILES from the Makefile without
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 = .*\\\\$/ {
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"
746 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
749 # AM_OUTPUT_DEPENDENCY_COMMANDS
750 # -----------------------------
751 # This macro should only be invoked once -- use via AC_REQUIRE.
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"])
762 # Copyright 2001 Free Software Foundation, Inc. -*- Autoconf -*-
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)
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.
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
783 # Check to see how make treats includes.
784 AC_DEFUN([AM_MAKE_INCLUDE],
785 [am_make=${MAKE-make}
786 cat > confinc << '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])
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
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
816 AC_SUBST(am__include)
818 AC_MSG_RESULT($_am_result)
822 # AM_CONDITIONAL -*- Autoconf -*-
824 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
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)
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.
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
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
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.])
867 # Copyright 1996, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
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)
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.
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
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
892 AC_DEFINE(PROTOTYPES,1,[Define if compiler has function prototypes])
896 U=_ ANSI2KNR=./ansi2knr
898 # Ensure some checks needed by ansi2knr itself.
900 AC_CHECK_HEADERS(string.h)
902 AC_SUBST(ANSI2KNR)dnl
906 # Copyright 1996, 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
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)
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.
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
925 # @defmac AC_PROG_CC_STDC
926 # @maindex PROG_CC_STDC
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.
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.
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
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
954 # Don't try gcc -ansi; that turns off useful extensions and
955 # breaks some systems' header files.
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__"
963 CC="$ac_save_CC $ac_arg"
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)
978 static char *f (char * (*g) (char **, int), char **p, ...)
983 s = g (p, va_arg (v,int));
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);
994 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
996 [am_cv_prog_cc_stdc="$ac_arg"; break])
1000 if test -z "$am_cv_prog_cc_stdc"; then
1001 AC_MSG_RESULT([none needed])
1003 AC_MSG_RESULT([$am_cv_prog_cc_stdc])
1005 case "x$am_cv_prog_cc_stdc" in
1007 *) CC="$CC $am_cv_prog_cc_stdc" ;;
1011 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
1013 # serial 46 AC_PROG_LIBTOOL
1015 AC_DEFUN([AC_PROG_LIBTOOL],
1016 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
1018 # This can be used to rebuild libtool when needed
1019 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
1021 # Always use our own libtool.
1022 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
1023 AC_SUBST(LIBTOOL)dnl
1025 # Prevent multiple expansion
1026 define([AC_PROG_LIBTOOL], [])
1029 AC_DEFUN([AC_LIBTOOL_SETUP],
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
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
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
1052 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
1058 AC_CHECK_TOOL(RANLIB, ranlib, :)
1059 AC_CHECK_TOOL(STRIP, strip, :)
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)
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
1069 # Some flags need to be propagated to the compiler or linker for good
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
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,
1098 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
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"
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)
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,
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])])
1121 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
1122 # old mingw systems require "-dll" to link a DLL, while more recent ones
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" ;;
1138 _LT_AC_LTCONFIG_HACK
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],
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 ;;
1158 if test "x$lt_cv_func_assert_works" = xyes; then
1159 AC_CHECK_HEADERS(assert.h)
1161 ])# AC_LIBTOOL_HEADER_ASSERT
1163 # _LT_AC_CHECK_DLFCN
1164 # --------------------
1165 AC_DEFUN([_LT_AC_CHECK_DLFCN],
1166 [AC_CHECK_HEADERS(dlfcn.h)
1167 ])# _LT_AC_CHECK_DLFCN
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
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?!! ;)]
1182 # Character class describing NM global symbol codes.
1183 symcode='[[BCDEGRST]]'
1185 # Regexp to match symbols that can be accessed directly from C.
1186 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
1188 # Transform the above into a raw symbol and a C symbol.
1189 symxfrm='\1 \2\3 \3'
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'"
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'"
1197 # Define system-specific variables.
1202 cygwin* | mingw* | pw32*)
1203 symcode='[[ABCDGISTW]]'
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'"
1210 symcode='[[BCDEGRST]]'
1213 symcode='[[BCDEGQRST]]'
1219 symcode='[[DFNSTU]]'
1223 # Handle CRLF in mingw tool chain
1227 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
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]]'
1236 # Try without a prefix undercore, then with it.
1237 for ac_symprfx in "" "_"; do
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'"
1242 # Check to see that the pipe works correctly.
1245 cat > conftest.$ac_ext <<EOF
1250 void nm_test_func(){}
1254 int main(){nm_test_var='a';nm_test_func();return(0);}
1257 if AC_TRY_EVAL(ac_compile); then
1258 # Now try to grab the symbols.
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"
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
1277 # Now generate the symbol file.
1278 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
1280 cat <<EOF >> conftest.$ac_ext
1281 #if defined (__STDC__) && __STDC__
1282 # define lt_ptr void *
1284 # define lt_ptr char *
1288 /* The mapping between symbol names and symbols. */
1293 lt_preloaded_symbols[[]] =
1296 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
1297 cat <<\EOF >> conftest.$ac_ext
1305 # Now try linking the two files.
1306 mv conftest.$ac_objext conftstm.$ac_objext
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
1315 CFLAGS="$save_CFLAGS"
1317 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
1320 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
1323 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
1326 echo "$progname: failed program was:" >&AC_FD_CC
1327 cat conftest.$ac_ext >&5
1329 rm -f conftest* conftst*
1331 # Do not use the global_symbol_pipe unless it works.
1332 if test "$pipe_works" = yes; then
1335 lt_cv_sys_global_symbol_pipe=
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=
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"
1347 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
1349 AC_MSG_RESULT(failed)
1353 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
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`}
1363 *-DOS) lt_cv_sys_path_separator=';' ;;
1364 *) lt_cv_sys_path_separator=':' ;;
1366 PATH_SEPARATOR=$lt_cv_sys_path_separator
1368 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
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
1379 # Check that we are running under the correct shell.
1380 SHELL=${CONFIG_SHELL-/bin/sh}
1384 # Remove one level of quotation (which was required for Make).
1385 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
1390 if test "X[$]1" = X--no-reexec; then
1391 # Discard the --no-reexec flag, and continue.
1393 elif test "X[$]1" = X--fallback-echo; then
1394 # Avoid inline document here, it may be left over
1396 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1397 # Yippee, $echo works!
1400 # Restart under the correct shell.
1401 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1404 if test "X[$]1" = X--fallback-echo; then
1405 # used as fallback echo
1413 # The HP-UX ksh and POSIX shell print the target directory to stdout
1415 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
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
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
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'
1440 # So, first we look for a working echo in the user's PATH.
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
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.
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
1468 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
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
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
1483 SHELL="$CONFIG_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"
1492 # maybe with a smaller string...
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
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+"[$]@"}
1508 # Oops. We lost completely, so just stick with echo.
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.
1520 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1521 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1526 ])# _LT_AC_PROG_ECHO_BACKSLASH
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 :
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"
1549 # define LT_DLGLOBAL RTLD_GLOBAL
1552 # define LT_DLGLOBAL DL_GLOBAL
1554 # define LT_DLGLOBAL 0
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
1562 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1565 # define LT_DLLAZY_OR_NOW DL_LAZY
1568 # define LT_DLLAZY_OR_NOW RTLD_NOW
1571 # define LT_DLLAZY_OR_NOW DL_NOW
1573 # define LT_DLLAZY_OR_NOW 0
1581 extern "C" void exit (int);
1584 void fnord() { int i=42;}
1587 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1588 int status = $lt_dlunknown;
1592 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1593 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1594 /* dlclose (self); */
1600 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1601 (./conftest; exit; ) 2>/dev/null
1604 x$lt_dlno_uscore) $1 ;;
1605 x$lt_dlneed_uscore) $2 ;;
1606 x$lt_unknown|x*) $3 ;;
1609 # compilation failed
1614 ])# _LT_AC_TRY_DLOPEN_SELF
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
1629 lt_cv_dlopen="load_add_on"
1631 lt_cv_dlopen_self=yes
1634 cygwin* | mingw* | pw32*)
1635 lt_cv_dlopen="LoadLibrary"
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"])
1660 if test "x$lt_cv_dlopen" != xno; then
1666 case $lt_cv_dlopen in
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"
1672 save_LDFLAGS="$LDFLAGS"
1673 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1676 LIBS="$lt_cv_dlopen_libs $LIBS"
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)
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)
1695 CPPFLAGS="$save_CPPFLAGS"
1696 LDFLAGS="$save_LDFLAGS"
1701 case $lt_cv_dlopen_self in
1702 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1703 *) enable_dlopen_self=unknown ;;
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 ;;
1711 ])# AC_LIBTOOL_DLOPEN_SELF
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'
1720 # Same as above, but do not quote variable references.
1721 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
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'
1731 default_ofile=libtool
1732 can_build_shared=yes
1734 # All known linkers require a `.a' archive for static linking (except M$VC,
1735 # which needs '.lib').
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"
1743 old_CFLAGS="$CFLAGS"
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
1760 if test x"$host" != x"$build"; then
1761 ac_tool_prefix=${host_alias}-
1766 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1769 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
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
1779 export COLLECT_NAMES
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=
1789 if test -n "$RANLIB"; then
1792 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1795 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1798 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1801 # Allow CC to be a program name with arguments.
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
1811 # MS-DOS does not allow filenames that begin with a dot.
1814 rmdir .libs 2>/dev/null
1815 AC_MSG_RESULT($objdir)
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
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=
1831 lt_cv_prog_cc_static=
1832 lt_cv_prog_cc_no_builtin=
1833 lt_cv_prog_cc_can_build_shared=$can_build_shared
1835 if test "$GCC" = yes; then
1836 lt_cv_prog_cc_wl='-Wl,'
1837 lt_cv_prog_cc_static='-static'
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"
1850 # FIXME: we need at least 68020 code to build shared libraries, but
1851 # adding the `-m68020' flag to GCC prevents building anything better,
1853 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1855 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1856 # PIC is the default for these OSes.
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'
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'
1869 if test -d /usr/nec; then
1870 lt_cv_prog_cc_pic=-Kconform_pic
1874 lt_cv_prog_cc_pic='-fPIC'
1878 # PORTME Check for PIC flags for the system compiler.
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'
1887 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
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'
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.
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'
1911 lt_cv_prog_cc_pic='-KPIC'
1912 lt_cv_prog_cc_static='-Bstatic'
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'
1922 lt_cv_prog_cc_pic='-Kpic'
1923 lt_cv_prog_cc_static='-dn'
1924 lt_cv_prog_cc_shlib='-belf'
1928 lt_cv_prog_cc_pic='-KPIC'
1929 lt_cv_prog_cc_static='-Bstatic'
1930 lt_cv_prog_cc_wl='-Wl,'
1934 lt_cv_prog_cc_pic='-PIC'
1935 lt_cv_prog_cc_static='-Bstatic'
1936 lt_cv_prog_cc_wl='-Qoption ld '
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,'
1946 lt_cv_prog_cc_pic='-pic'
1947 lt_cv_prog_cc_static='-Bstatic'
1951 if test -d /usr/nec ;then
1952 lt_cv_prog_cc_pic='-Kconform_pic'
1953 lt_cv_prog_cc_static='-Bstatic'
1958 lt_cv_prog_cc_can_build_shared=no
1963 if test -z "$lt_cv_prog_cc_pic"; then
1964 AC_MSG_RESULT([none])
1966 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
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
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
1982 lt_cv_prog_cc_pic_works=yes
1986 lt_cv_prog_cc_pic_works=yes
1990 lt_cv_prog_cc_pic_works=no
1992 CFLAGS="$save_CFLAGS"
1995 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1997 lt_cv_prog_cc_can_build_shared=no
1999 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
2002 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
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 :
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
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"
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])
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"
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
2042 echo "int some_variable = 0;" > conftest.$ac_ext
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
2050 save_CFLAGS="$CFLAGS"
2051 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
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
2059 lt_cv_compiler_c_o=yes
2062 # Append any errors to the config.log.
2063 cat out/conftest.err 1>&AC_FD_CC
2064 lt_cv_compiler_c_o=no
2066 CFLAGS="$save_CFLAGS"
2072 $rm -r conftest 2>/dev/null
2074 compiler_c_o=$lt_cv_compiler_c_o
2075 AC_MSG_RESULT([$compiler_c_o])
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"
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
2092 lt_cv_compiler_o_lo=yes
2095 ac_objext="$save_objext"
2096 CFLAGS="$save_CFLAGS"
2098 compiler_o_lo=$lt_cv_compiler_o_lo
2099 AC_MSG_RESULT([$compiler_o_lo])
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])
2111 ln conftest.a conftest.b 2>/dev/null && hard_links=no
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])
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
2137 compiler_rtti_exceptions=yes
2140 CFLAGS="$save_CFLAGS"
2141 AC_MSG_RESULT([$compiler_rtti_exceptions])
2143 if test "$compiler_rtti_exceptions" = "yes"; then
2144 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
2146 no_builtin_flag=' -fno-builtin'
2150 # See if the linker supports building shared libraries.
2151 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
2153 allow_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
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=
2171 hardcode_shlibpath_var=unsupported
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
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=
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
2206 if test "$with_gnu_ld" = yes; then
2207 # If archive_cmds runs LD, not CC, wlarc should be empty
2210 # See if GNU ld supports shared libraries.
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.
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.
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
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
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'
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
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'
2266 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
2268 # cygwin and mingw dlls have different entry points and sets of symbols
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~
2276 dll_entry=_DllMainCRTStartup@12
2277 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
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
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)~'
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'
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;
2310 echo EXPORTS > $output_objdir/$soname-def;
2312 cat $export_symbols | while read symbol; do
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;;
2319 _lt_hint=`expr 1 + \$_lt_hint`;
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'
2331 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2332 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
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'
2341 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
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.
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'
2362 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2365 hardcode_shlibpath_var=no
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'
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'
2383 cygwin* | mingw* | pw32*)
2384 # dlltool doesn't understand --whole-archive et. al.
2385 whole_archive_flag_spec=
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'
2392 whole_archive_flag_spec=
2398 # PORTME fill in a description of your system's linker (not GNU ld)
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
2410 hardcode_direct=unsupported
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'
2422 aix_use_runtimelinking=no
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
2431 aix_use_runtimelinking=yes
2438 exp_sym_flag='-bexport'
2439 no_entry_flag='-bnoentry'
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.
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
2457 # We have reworked collect2
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=
2471 shared_flag='-shared'
2474 if test "$host_cpu" = ia64; then
2475 shared_flag='${wl}-G'
2477 if test "$aix_use_runtimelinking" = yes; then
2478 shared_flag='${wl}-G'
2480 shared_flag='${wl}-bM:SRE'
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"
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"
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'
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
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.
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"`'
2537 darwin* | rhapsody*)
2539 rhapsody* | darwin1.[[012]])
2540 allow_undefined_flag='-undefined suppress'
2543 allow_undefined_flag='-flat_namespace -undefined suppress'
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'
2554 hardcode_shlibpath_var=no
2555 whole_archive_flag_spec='-all_load $convenience'
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
2567 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2568 hardcode_libdir_flag_spec='-R$libdir'
2570 hardcode_shlibpath_var=no
2573 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2575 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2577 hardcode_minus_L=yes
2578 hardcode_shlibpath_var=no
2581 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2583 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2584 hardcode_libdir_flag_spec='-R$libdir'
2586 hardcode_shlibpath_var=no
2589 hpux9* | hpux10* | hpux11*)
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' ;;
2594 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2595 hardcode_libdir_separator=:
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'
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'
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'
2610 hardcode_libdir_separator=:
2611 link_all_deplibs=yes
2615 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2616 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2618 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2620 hardcode_libdir_flag_spec='-R$libdir'
2622 hardcode_shlibpath_var=no
2626 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2628 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2629 hardcode_libdir_separator=:
2630 hardcode_shlibpath_var=no
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'
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'
2647 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
2648 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
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'
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'
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'
2670 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2671 hardcode_libdir_separator=:
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'
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'
2685 #Both c and cxx compiler support -rpath directly
2686 hardcode_libdir_flag_spec='-rpath $libdir'
2688 hardcode_libdir_separator=:
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'
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
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.
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
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' ;;
2741 link_all_deplibs=yes
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'
2750 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2752 hardcode_libdir_flag_spec='-L$libdir'
2754 hardcode_minus_L=yes
2755 hardcode_shlibpath_var=no
2759 case $host_vendor in
2761 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2762 hardcode_direct=yes # is this really true???
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'
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
2776 runpath_var='LD_RUN_PATH'
2777 hardcode_shlibpath_var=no
2781 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2782 hardcode_shlibpath_var=no
2783 export_dynamic_flag_spec='-Bexport'
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'
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
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
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
2821 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2824 hardcode_shlibpath_var=no
2825 hardcode_runpath_var=yes
2826 runpath_var=LD_RUN_PATH
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'
2834 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2836 runpath_var='LD_RUN_PATH'
2837 hardcode_shlibpath_var=no
2845 AC_MSG_RESULT([$ld_shlibs])
2846 test "$ld_shlibs" = no && can_build_shared=no
2848 # Check hardcoding attributes.
2849 AC_MSG_CHECKING([how to hardcode library paths into programs])
2851 if test -n "$hardcode_libdir_flag_spec" || \
2852 test -n "$runpath_var"; then
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
2864 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2865 hardcode_action=immediate
2868 # We cannot hardcode anything, or else we can only hardcode existing
2870 hardcode_action=unsupported
2872 AC_MSG_RESULT([$hardcode_action])
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])
2885 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2886 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2888 # PORTME Fill in your ld.so characteristics
2889 AC_MSG_CHECKING([dynamic linker characteristics])
2891 libname_spec='lib$name'
2898 shlibpath_overrides_runpath=unknown
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"
2907 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2908 shlibpath_var=LIBPATH
2910 # AIX has no versioning support, so we append a major version to the name.
2911 soname_spec='${libname}${release}.so$major'
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
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.
2930 aix4 | aix4.[[01]] | aix4.[[01]].*)
2931 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2933 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
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'
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'
2955 shlibpath_var=LIBPATH
2957 hardcode_into_libs=yes
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'
2967 library_names_spec='${libname}.so'
2968 dynamic_linker="$host_os ld.so"
2969 shlibpath_var=LIBRARY_PATH
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
2987 cygwin* | mingw* | pw32*)
2988 version_type=windows
2991 case $GCC,$host_os in
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~
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"`
3008 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
3011 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
3014 dynamic_linker='Win32 ld.exe'
3015 # FIXME: first we should search . and the directory the executable is in
3019 darwin* | rhapsody*)
3020 dynamic_linker="$host_os dyld"
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
3038 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
3039 version_type=freebsd-$objformat
3040 case $version_type in
3042 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
3047 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
3051 shlibpath_var=LD_LIBRARY_PATH
3054 shlibpath_overrides_runpath=yes
3057 shlibpath_overrides_runpath=no
3058 hardcode_into_libs=yes
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
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"
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'
3088 irix5* | irix6* | nonstopux*)
3090 nonstopux*) version_type=nonstopux ;;
3091 *) version_type=irix ;;
3095 soname_spec='${libname}${release}.so$major'
3096 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
3098 irix5* | nonstopux*)
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;;
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}"
3116 # No shared lib support for Linux oldld, aout, or coff.
3117 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
3121 # This must be Linux ELF.
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
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'
3144 # Find out which ABI we are using (multilib Linux x86_64 hack).
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
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}"
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'
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'
3178 shlibpath_var=LD_LIBRARY_PATH
3179 shlibpath_overrides_runpath=yes
3180 hardcode_into_libs=yes
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
3194 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3196 openbsd2.[[89]] | openbsd2.[[89]].*)
3197 shlibpath_overrides_runpath=no
3200 shlibpath_overrides_runpath=yes
3204 shlibpath_overrides_runpath=yes
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
3212 libname_spec='$name'
3214 library_names_spec='$libname.dll $libname.a'
3215 dynamic_linker='OS/2 ld.exe'
3216 shlibpath_var=LIBPATH
3219 osf3* | osf4* | osf5*)
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
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
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'
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
3262 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
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
3269 shlibpath_overrides_runpath=no
3271 export_dynamic_flag_spec='${wl}-Blargedynsym'
3272 runpath_var=LD_RUN_PATH
3280 shlibpath_overrides_runpath=no
3281 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
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
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
3303 if test -d /usr/nec ;then
3305 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
3306 soname_spec='$libname.so.$major'
3307 shlibpath_var=LD_LIBRARY_PATH
3315 AC_MSG_RESULT([$dynamic_linker])
3316 test "$dynamic_linker" = no && can_build_shared=no
3318 # Report the final consequences.
3319 AC_MSG_CHECKING([if libtool supports shared libraries])
3320 AC_MSG_RESULT([$can_build_shared])
3322 AC_MSG_CHECKING([whether to build shared libraries])
3323 test "$can_build_shared" = "no" && enable_shared=no
3325 # On AIX, shared libraries and static libraries use the same namespace, and
3326 # are all built from PIC.
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'
3337 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3338 test "$enable_shared" = yes && enable_static=no
3342 AC_MSG_RESULT([$enable_shared])
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])
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
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"
3363 AC_LIBTOOL_DLOPEN_SELF
3365 if test "$enable_shared" = yes && test "$GCC" = yes; then
3366 case $archive_cmds in
3368 # FIXME: we may have to deal with multi-command sequences.
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],
3377 echo 'static int dummy;' > conftest.$ac_ext
3379 if AC_TRY_EVAL(ac_compile); then
3382 libobjs=conftest.$ac_objext
3384 wl=$lt_cv_prog_cc_wl
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)
3394 lt_cv_archive_cmds_need_lc=no
3396 lt_cv_archive_cmds_need_lc=yes
3398 allow_undefined_flag=$save_allow_undefined_flag
3400 cat conftest.err 1>&5
3402 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
3406 need_lc=${lt_cv_archive_cmds_need_lc-yes}
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
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"
3421 if test -f "$ltmain"; then
3422 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
3425 echo creating $ofile
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
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\"\`\\\""
3458 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3463 cat <<__EOF__ > "${ofile}T"
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.
3470 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3471 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
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.
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.
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.
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.
3492 # A sed that does not truncate output.
3495 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3496 Xsed="${SED} -e s/^X//"
3498 # The HP-UX ksh and POSIX shell print the target directory to stdout
3500 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3502 # ### BEGIN LIBTOOL CONFIG
3504 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3506 # Shell to use when invoking shell scripts.
3509 # Whether or not to build shared libraries.
3510 build_libtool_libs=$enable_shared
3512 # Whether or not to build static libraries.
3513 build_old_libs=$enable_static
3515 # Whether or not to add -lc for building shared libraries.
3516 build_libtool_need_lc=$need_lc
3518 # Whether or not to optimize for fast installation.
3519 fast_install=$enable_fast_install
3522 host_alias=$host_alias
3525 # An echo program that does not interpret backslashes.
3530 AR_FLAGS=$lt_AR_FLAGS
3532 # The default C compiler.
3535 # Is the compiler the GNU C compiler?
3538 # The linker used to build libraries.
3541 # Whether we need hard or soft links.
3544 # A BSD-compatible nm program.
3547 # A symbol stripping program
3550 # Used to examine libraries when file_magic_cmd begins "file"
3551 MAGIC_CMD=$MAGIC_CMD
3553 # Used on cygwin: DLL creation program.
3556 # Used on cygwin: object dumper.
3559 # Used on cygwin: assembler.
3562 # The name of the directory that contains temporary libtool files.
3565 # How to create reloadable object files.
3566 reload_flag=$lt_reload_flag
3567 reload_cmds=$lt_reload_cmds
3569 # How to pass a linker flag through the compiler.
3572 # Object file suffix (normally "o").
3575 # Old archive suffix (normally "a").
3578 # Executable file suffix (normally "").
3581 # Additional compiler flags for building library objects.
3582 pic_flag=$lt_pic_flag
3585 # Does compiler simultaneously support -c and -o options?
3586 compiler_c_o=$lt_compiler_c_o
3588 # Can we write directly to a .lo ?
3589 compiler_o_lo=$lt_compiler_o_lo
3591 # Must we lock files when doing compilation ?
3592 need_locks=$lt_need_locks
3594 # Do we need the lib prefix for modules?
3595 need_lib_prefix=$need_lib_prefix
3597 # Do we need a version for libraries?
3598 need_version=$need_version
3600 # Whether dlopen is supported.
3601 dlopen_support=$enable_dlopen
3603 # Whether dlopen of programs is supported.
3604 dlopen_self=$enable_dlopen_self
3606 # Whether dlopen of statically linked programs is supported.
3607 dlopen_self_static=$enable_dlopen_self_static
3609 # Compiler flag to prevent dynamic linking.
3610 link_static_flag=$lt_link_static_flag
3612 # Compiler flag to turn off builtin functions.
3613 no_builtin_flag=$lt_no_builtin_flag
3615 # Compiler flag to allow reflexive dlopens.
3616 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3618 # Compiler flag to generate shared objects directly from archives.
3619 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3621 # Compiler flag to generate thread-safe objects.
3622 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3624 # Library versioning type.
3625 version_type=$version_type
3627 # Format of library name prefix.
3628 libname_spec=$lt_libname_spec
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
3634 # The coded name of the library, if different from the real name.
3635 soname_spec=$lt_soname_spec
3637 # Commands used to build and install an old-style archive.
3639 old_archive_cmds=$lt_old_archive_cmds
3640 old_postinstall_cmds=$lt_old_postinstall_cmds
3641 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3643 # Create an old-style archive from a shared archive.
3644 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
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
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
3655 # Commands to strip libraries.
3656 old_striplib=$lt_old_striplib
3657 striplib=$lt_striplib
3659 # Method to check whether dependent libraries are shared objects.
3660 deplibs_check_method=$lt_deplibs_check_method
3662 # Command to use when deplibs_check_method == file_magic.
3663 file_magic_cmd=$lt_file_magic_cmd
3665 # Flag that allows shared libraries with undefined symbols to be built.
3666 allow_undefined_flag=$lt_allow_undefined_flag
3668 # Flag that forces no undefined symbols.
3669 no_undefined_flag=$lt_no_undefined_flag
3671 # Commands used to finish a libtool library installation in a directory.
3672 finish_cmds=$lt_finish_cmds
3674 # Same as above, but a single script fragment to be evaled but not shown.
3675 finish_eval=$lt_finish_eval
3677 # Take the output of nm and produce a listing of raw symbols and C names.
3678 global_symbol_pipe=$lt_global_symbol_pipe
3680 # Transform the output of nm in a proper C declaration
3681 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
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
3686 # This is the shared library runtime path variable.
3687 runpath_var=$runpath_var
3689 # This is the shared library path variable.
3690 shlibpath_var=$shlibpath_var
3692 # Is shlibpath searched before the hard-coded library search path?
3693 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3695 # How to hardcode a shared library path into an executable.
3696 hardcode_action=$hardcode_action
3698 # Whether we should hardcode library paths into libraries.
3699 hardcode_into_libs=$hardcode_into_libs
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
3705 # Whether we need a single -rpath flag with a separated argument.
3706 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3708 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3710 hardcode_direct=$hardcode_direct
3712 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3714 hardcode_minus_L=$hardcode_minus_L
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
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"
3724 # Whether libtool must link a program against all its dependency libraries.
3725 link_all_deplibs=$link_all_deplibs
3727 # Compile-time system search path for libraries
3728 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3730 # Run-time system search path for libraries
3731 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3733 # Fix the shell variable \$srcfile for the compiler.
3734 fix_srcfile_path="$fix_srcfile_path"
3736 # Set to yes if exported symbols are required.
3737 always_export_symbols=$always_export_symbols
3739 # The commands to list exported symbols.
3740 export_symbols_cmds=$lt_export_symbols_cmds
3742 # The commands to extract the exported symbol list from a shared archive.
3743 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3745 # Symbols that should not be listed in the preloaded symbols.
3746 exclude_expsyms=$lt_exclude_expsyms
3748 # Symbols that must always be exported.
3749 include_expsyms=$lt_include_expsyms
3751 # ### END LIBTOOL CONFIG
3757 cat <<\EOF >> "${ofile}T"
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
3764 export COLLECT_NAMES
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>
3781 # #ifndef __CYGWIN__
3782 # # ifdef __CYGWIN32__
3783 # # define __CYGWIN__ __CYGWIN32__
3787 # #ifdef __cplusplus
3790 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3791 # #ifdef __cplusplus
3796 # #include <cygwin/cygwin_dll.h>
3797 # DECLARE_CYGWIN_DLL( DllMain );
3799 # HINSTANCE __hDllInstance_base;
3802 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3804 # __hDllInstance_base = hInst;
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.
3814 # This file is part of GNU libtool.
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.
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.
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.
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() */
3836 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3838 # #define O_BINARY 0
3841 # static unsigned int
3842 # pe_get16 (fd, offset)
3846 # unsigned char b[2];
3847 # lseek (fd, offset, SEEK_SET);
3849 # return b[0] + (b[1]<<8);
3852 # static unsigned int
3853 # pe_get32 (fd, offset)
3857 # unsigned char b[4];
3858 # lseek (fd, offset, SEEK_SET);
3860 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3863 # static unsigned int
3867 # unsigned char *b = ptr;
3868 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
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;
3883 # filename = argv[1];
3885 # dll = open(filename, O_RDONLY|O_BINARY);
3889 # dll_name = filename;
3891 # for (i=0; filename[i]; i++)
3892 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3893 # dll_name = filename + i +1;
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);
3899 # if (num_entries < 1) /* no exports */
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));
3909 # for (i = 0; i < nsections; i++)
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)
3920 # expptr = fptr + (export_rva - vaddr);
3921 # if (export_rva + export_size > vaddr + vsize)
3922 # export_size = vsize - (export_rva - vaddr);
3927 # expdata = (unsigned char*)malloc(export_size);
3928 # lseek (dll, expptr, SEEK_SET);
3929 # read (dll, expdata, export_size);
3930 # erva = expdata - export_rva;
3932 # nexp = pe_as32 (expdata+24);
3933 # name_rvas = pe_as32 (expdata+32);
3935 # printf ("EXPORTS\n");
3936 # for (i = 0; i<nexp; i++)
3938 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3939 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3944 # /* impgen.c ends here */
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)
3956 mv -f "${ofile}T" "$ofile" || \
3957 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3961 ])# _LT_AC_LTCONFIG_HACK
3963 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3964 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
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])])
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
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}
3981 yes) enable_shared=yes ;;
3982 no) 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
3995 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
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)])
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
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}
4015 yes) enable_static=yes ;;
4016 no) 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
4029 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
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)])
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
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}
4050 yes) enable_fast_install=yes ;;
4051 no) enable_fast_install=no ;;
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
4064 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
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)])
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
4076 AC_DEFUN([AC_LIBTOOL_PICMODE],
4077 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4078 pic_mode=ifelse($#,1,$1,default)])
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,
4087 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4090 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
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
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
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
4131 MAGIC_CMD="$ac_save_MAGIC_CMD"
4134 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4135 if test -n "$MAGIC_CMD"; then
4136 AC_MSG_RESULT($MAGIC_CMD)
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)
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
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])
4172 # gcc leaves a trailing carriage return which upsets mingw
4173 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
4175 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
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%/%"`
4186 test -z "$LD" && LD="$ac_prog"
4189 # If it fails, then pretend we aren't using GCC.
4193 # If it is relative, then search for the first ld in PATH.
4197 elif test "$with_gnu_ld" = yes; then
4198 AC_MSG_CHECKING([for GNU ld])
4200 AC_MSG_CHECKING([for non-GNU ld])
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
4215 test "$with_gnu_ld" != yes && break
4221 lt_cv_path_LD="$LD" # Let the user override the test with a path.
4224 if test -n "$LD"; then
4229 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
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
4240 lt_cv_prog_gnu_ld=no
4242 with_gnu_ld=$lt_cv_prog_gnu_ld
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"
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.
4275 lt_cv_deplibs_check_method=pass_all
4279 lt_cv_deplibs_check_method=pass_all
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
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'
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'
4297 rhapsody* | darwin1.[[012]])
4298 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
4301 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
4307 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
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.*`
4318 lt_cv_deplibs_check_method=pass_all
4323 lt_cv_deplibs_check_method=pass_all
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
4332 irix5* | irix6* | nonstopux*)
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"
4340 *-32|*"-32 ") libmagic=32-bit;;
4341 *-n32|*"-n32 ") libmagic=N32;;
4342 *-64|*"-64 ") libmagic=64-bit;;
4343 *) libmagic=never-match;;
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"
4349 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
4350 lt_cv_deplibs_check_method=pass_all
4353 # This must be Linux ELF.
4356 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64* | s390* | x86_64*)
4357 lt_cv_deplibs_check_method=pass_all ;;
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 )' ;;
4362 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
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]]+$'
4369 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
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
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'
4385 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
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
4397 lt_cv_deplibs_check_method=pass_all
4401 lt_cv_deplibs_check_method=pass_all
4402 lt_cv_file_magic_test_file=/lib/libc.so
4405 sysv5uw[[78]]* | sysv4*uw2*)
4406 lt_cv_deplibs_check_method=pass_all
4409 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4410 case $host_vendor in
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*`
4416 lt_cv_deplibs_check_method=pass_all
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 )'
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
4428 lt_cv_deplibs_check_method=pass_all
4434 file_magic_cmd=$lt_cv_file_magic_cmd
4435 deplibs_check_method=$lt_cv_deplibs_check_method
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.
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"
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"
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
4470 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4473 AC_MSG_RESULT([$NM])
4476 # AC_CHECK_LIBM - check for math library
4477 AC_DEFUN([AC_CHECK_LIBM],
4478 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4481 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4482 # These system don't have libm
4485 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4486 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4489 AC_CHECK_LIB(m, main, LIBM="-lm")
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" ;;
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...
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])
4535 enable_ltdl_install=yes
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'])
4543 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4547 # For backwards non-gettext consistent compatibility...
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])
4560 # This is just to silence aclocal about the macro not being used
4561 ifelse([AC_DISABLE_FAST_INSTALL])
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. #
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
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"
4591 # Create a temporary directory, and hook for its removal unless debugging.
4594 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4595 trap '{ (exit 1); exit 1; }' 1 2 13 15
4598 # Create a (secure) tmp directory for tmp files.
4601 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4602 test -n "$tmp" && test -d "$tmp"
4605 tmp=$TMPDIR/sed$$-$RANDOM
4606 (umask 077 && mkdir $tmp)
4609 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4610 { (exit 1); exit 1; }
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"
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}
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
4638 lt_cv_path_SED=$_sed
4644 if test "X$SED" != "X"; then
4649 AC_MSG_RESULT([$SED])
4652 # Add --enable-maintainer-mode option to configure.
4655 # Copyright 1996, 1998, 2000, 2001 Free Software Foundation, Inc.
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.
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.
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
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