1 # aclocal.m4 generated automatically by aclocal 1.5
3 # Copyright 1996, 1997, 1998, 1999, 2000, 2001
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 # This file is part of DisOrder.
15 # Copyright (C) 2004 Richard Kettlewell
17 # This program is free software; you can redistribute it and/or modify
18 # it under the terms of the GNU General Public License as published by
19 # the Free Software Foundation; either version 2 of the License, or
20 # (at your option) any later version.
22 # This program is distributed in the hope that it will be useful, but
23 # WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
25 # General Public License for more details.
27 # You should have received a copy of the GNU General Public License
28 # along with this program; if not, write to the Free Software
29 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
33 AC_DEFUN([RJK_FIND_GC_H],[
34 AC_CACHE_CHECK([looking for <gc.h>],[rjk_cv_gc_h],[
38 [rjk_cv_gc_h="on default include path"],[
39 oldCPPFLAGS="${CPPFLAGS}"
40 for dir in /usr/include/gc /usr/local/include/gc; do
41 if test "x$GCC" = xyes; then
42 CPPFLAGS="${oldCPPFLAGS} -isystem $dir"
44 CPPFLAGS="${oldCPPFLAGS} -I$dir"
49 [rjk_cv_gc_h=$dir;break],[rjk_cv_gc_h="not found"])
51 CPPFLAGS="${oldCPPFLAGS}"
54 case "$rjk_cv_gc_h" in
56 missing_headers="$missing_headers gc.h"
59 if test "x$GCC" = xyes; then
60 CPPFLAGS="${CPPFLAGS} -isystem $rjk_cv_gc_h"
62 CPPFLAGS="${CPPFLAGS} -I$rjk_cv_gc_h"
68 # Do all the work for Automake. This macro actually does too much --
69 # some checks are only needed if your package does certain things.
70 # But this isn't really a big deal.
74 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
75 # written in clear, in which case automake, when reading aclocal.m4,
76 # will think it sees a *use*, and therefore will trigger all it's
77 # C support machinery. Also note that it means that autoscan, seeing
78 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
81 # We require 2.13 because we rely on SHELL being computed by configure.
84 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
85 # -----------------------------------------------------------
86 # If MACRO-NAME is provided do IF-PROVIDED, else IF-NOT-PROVIDED.
87 # The purpose of this macro is to provide the user with a means to
88 # check macros which are provided without letting her know how the
89 # information is coded.
90 # If this macro is not defined by Autoconf, define it here.
91 ifdef([AC_PROVIDE_IFELSE],
93 [define([AC_PROVIDE_IFELSE],
94 [ifdef([AC_PROVIDE_$1],
98 # AM_INIT_AUTOMAKE(PACKAGE,VERSION, [NO-DEFINE])
99 # ----------------------------------------------
100 AC_DEFUN([AM_INIT_AUTOMAKE],
101 [AC_REQUIRE([AC_PROG_INSTALL])dnl
102 # test to see if srcdir already configured
103 if test "`CDPATH=:; cd $srcdir && pwd`" != "`pwd`" &&
104 test -f $srcdir/config.status; then
105 AC_MSG_ERROR([source directory already configured; run \"make distclean\" there first])
108 # Define the identity of the package.
114 [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
115 AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
117 # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow
118 # the ones we care about.
119 ifdef([m4_pattern_allow],
120 [m4_pattern_allow([^AM_[A-Z]+FLAGS])])dnl
122 # Autoconf 2.50 always computes EXEEXT. However we need to be
123 # compatible with 2.13, for now. So we always define EXEEXT, but we
126 # Similar for OBJEXT -- only we only use OBJEXT if the user actually
127 # requests that it be used. This is a bit dumb.
131 # Some tools Automake needs.
132 AC_REQUIRE([AM_SANITY_CHECK])dnl
133 AC_REQUIRE([AC_ARG_PROGRAM])dnl
134 AM_MISSING_PROG(ACLOCAL, aclocal)
135 AM_MISSING_PROG(AUTOCONF, autoconf)
136 AM_MISSING_PROG(AUTOMAKE, automake)
137 AM_MISSING_PROG(AUTOHEADER, autoheader)
138 AM_MISSING_PROG(MAKEINFO, makeinfo)
139 AM_MISSING_PROG(AMTAR, tar)
141 AM_PROG_INSTALL_STRIP
142 # We need awk for the "check" target. The system "awk" is bad on
144 AC_REQUIRE([AC_PROG_AWK])dnl
145 AC_REQUIRE([AC_PROG_MAKE_SET])dnl
146 AC_REQUIRE([AM_DEP_TRACK])dnl
147 AC_REQUIRE([AM_SET_DEPDIR])dnl
148 AC_PROVIDE_IFELSE([AC_PROG_][CC],
149 [_AM_DEPENDENCIES(CC)],
150 [define([AC_PROG_][CC],
151 defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl
152 AC_PROVIDE_IFELSE([AC_PROG_][CXX],
153 [_AM_DEPENDENCIES(CXX)],
154 [define([AC_PROG_][CXX],
155 defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl
159 # Check to make sure that the build environment is sane.
166 AC_DEFUN([AM_SANITY_CHECK],
167 [AC_MSG_CHECKING([whether build environment is sane])
170 echo timestamp > conftest.file
171 # Do `set' in a subshell so we don't clobber the current shell's
172 # arguments. Must try -L first in case configure is actually a
173 # symlink; some systems play weird games with the mod time of symlinks
174 # (eg FreeBSD returns the mod time of the symlink's containing
177 set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
178 if test "$[*]" = "X"; then
180 set X `ls -t $srcdir/configure conftest.file`
183 if test "$[*]" != "X $srcdir/configure conftest.file" \
184 && test "$[*]" != "X conftest.file $srcdir/configure"; then
186 # If neither matched, then we have a broken ls. This can happen
187 # if, for instance, CONFIG_SHELL is bash and it inherits a
188 # broken ls alias from the environment. This has actually
189 # happened. Such a system could not be considered "sane".
190 AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
191 alias in your environment])
194 test "$[2]" = conftest.file
200 AC_MSG_ERROR([newly created file is older than distributed files!
201 Check your system clock])
208 # AM_MISSING_PROG(NAME, PROGRAM)
209 # ------------------------------
210 AC_DEFUN([AM_MISSING_PROG],
211 [AC_REQUIRE([AM_MISSING_HAS_RUN])
212 $1=${$1-"${am_missing_run}$2"}
218 # Define MISSING if not defined so far and test if it supports --run.
219 # If it does, set am_missing_run to use it, otherwise, to nothing.
220 AC_DEFUN([AM_MISSING_HAS_RUN],
221 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
222 test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
223 # Use eval to expand $SHELL
224 if eval "$MISSING --run true"; then
225 am_missing_run="$MISSING --run "
229 AC_MSG_WARN([${am_backtick}missing' script is too old or missing])
235 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
236 # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
237 # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
239 # Of course, Automake must honor this variable whenever it calls a
240 # tool from the auxiliary directory. The problem is that $srcdir (and
241 # therefore $ac_aux_dir as well) can be either absolute or relative,
242 # depending on how configure is run. This is pretty annoying, since
243 # it makes $ac_aux_dir quite unusable in subdirectories: in the top
244 # source directory, any form will work fine, but in subdirectories a
245 # relative path needs to be adjusted first.
247 # $ac_aux_dir/missing
248 # fails when called from a subdirectory if $ac_aux_dir is relative
249 # $top_srcdir/$ac_aux_dir/missing
250 # fails if $ac_aux_dir is absolute,
251 # fails when called from a subdirectory in a VPATH build with
252 # a relative $ac_aux_dir
254 # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
255 # are both prefixed by $srcdir. In an in-source build this is usually
256 # harmless because $srcdir is `.', but things will broke when you
257 # start a VPATH build or use an absolute $srcdir.
259 # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
260 # iff we strip the leading $srcdir from $ac_aux_dir. That would be:
261 # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
262 # and then we would define $MISSING as
263 # MISSING="\${SHELL} $am_aux_dir/missing"
264 # This will work as long as MISSING is not called from configure, because
265 # unfortunately $(top_srcdir) has no meaning in configure.
266 # However there are other variables, like CC, which are often used in
267 # configure, and could therefore not use this "fixed" $ac_aux_dir.
269 # Another solution, used here, is to always expand $ac_aux_dir to an
270 # absolute PATH. The drawback is that using absolute paths prevent a
271 # configured tree to be moved without reconfiguration.
273 AC_DEFUN([AM_AUX_DIR_EXPAND], [
274 # expand $ac_aux_dir to an absolute path
275 am_aux_dir=`CDPATH=:; cd $ac_aux_dir && pwd`
280 # Define $install_sh.
281 AC_DEFUN([AM_PROG_INSTALL_SH],
282 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
283 install_sh=${install_sh-"$am_aux_dir/install-sh"}
284 AC_SUBST(install_sh)])
286 # One issue with vendor `install' (even GNU) is that you can't
287 # specify the program used to strip binaries. This is especially
288 # annoying in cross-compiling environments, where the build's strip
289 # is unlikely to handle the host's binaries.
290 # Fortunately install-sh will honor a STRIPPROG variable, so we
291 # always use install-sh in `make install-strip', and initialize
292 # STRIPPROG with the value of the STRIP variable (set by the user).
293 AC_DEFUN([AM_PROG_INSTALL_STRIP],
294 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
295 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
296 AC_SUBST([INSTALL_STRIP_PROGRAM])])
298 # serial 4 -*- Autoconf -*-
302 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
303 # written in clear, in which case automake, when reading aclocal.m4,
304 # will think it sees a *use*, and therefore will trigger all it's
305 # C support machinery. Also note that it means that autoscan, seeing
306 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...
310 # _AM_DEPENDENCIES(NAME)
311 # ---------------------
312 # See how the compiler implements dependency checking.
313 # NAME is "CC", "CXX" or "OBJC".
314 # We try a few techniques and use that to set a single cache variable.
316 # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
317 # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
318 # dependency, and given that the user is not expected to run this macro,
319 # just rely on AC_PROG_CC.
320 AC_DEFUN([_AM_DEPENDENCIES],
321 [AC_REQUIRE([AM_SET_DEPDIR])dnl
322 AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
323 AC_REQUIRE([AM_MAKE_INCLUDE])dnl
324 AC_REQUIRE([AM_DEP_TRACK])dnl
326 ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
327 [$1], CXX, [depcc="$CXX" am_compiler_list=],
328 [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc']
329 [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
330 [depcc="$$1" am_compiler_list=])
332 AC_CACHE_CHECK([dependency style of $depcc],
333 [am_cv_$1_dependencies_compiler_type],
334 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
335 # We make a subdir and do the tests there. Otherwise we can end up
336 # making bogus files that we don't know about and never remove. For
337 # instance it was reported that on HP-UX the gcc test will end up
338 # making a dummy file named `D' -- because `-MD' means `put the output
341 # Copy depcomp to subdir because otherwise we won't find it if we're
342 # using a relative directory.
343 cp "$am_depcomp" conftest.dir
346 am_cv_$1_dependencies_compiler_type=none
347 if test "$am_compiler_list" = ""; then
348 am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
350 for depmode in $am_compiler_list; do
351 # We need to recreate these files for each test, as the compiler may
352 # overwrite some of them when testing with obscure command lines.
353 # This happens at least with the AIX C compiler.
354 echo '#include "conftest.h"' > conftest.c
355 echo 'int i;' > conftest.h
356 echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf
360 # after this tag, mechanisms are not by side-effect, so they'll
361 # only be used when explicitly requested
362 if test "x$enable_dependency_tracking" = xyes; then
370 # We check with `-c' and `-o' for the sake of the "dashmstdout"
371 # mode. It turns out that the SunPro C++ compiler does not properly
372 # handle `-M -o', and we need to detect this.
373 if depmode=$depmode \
374 source=conftest.c object=conftest.o \
375 depfile=conftest.Po tmpdepfile=conftest.TPo \
376 $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&
377 grep conftest.h conftest.Po > /dev/null 2>&1 &&
378 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
379 am_cv_$1_dependencies_compiler_type=$depmode
387 am_cv_$1_dependencies_compiler_type=none
390 $1DEPMODE="depmode=$am_cv_$1_dependencies_compiler_type"
391 AC_SUBST([$1DEPMODE])
397 # Choose a directory name for dependency files.
398 # This macro is AC_REQUIREd in _AM_DEPENDENCIES
399 AC_DEFUN([AM_SET_DEPDIR],
400 [rm -f .deps 2>/dev/null
401 mkdir .deps 2>/dev/null
402 if test -d .deps; then
405 # MS-DOS does not allow filenames that begin with a dot.
408 rmdir .deps 2>/dev/null
415 AC_DEFUN([AM_DEP_TRACK],
416 [AC_ARG_ENABLE(dependency-tracking,
417 [ --disable-dependency-tracking Speeds up one-time builds
418 --enable-dependency-tracking Do not reject slow dependency extractors])
419 if test "x$enable_dependency_tracking" != xno; then
420 am_depcomp="$ac_aux_dir/depcomp"
423 AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
424 pushdef([subst], defn([AC_SUBST]))
425 subst(AMDEPBACKSLASH)
429 # Generate code to set up dependency tracking.
430 # This macro should only be invoked once -- use via AC_REQUIRE.
432 # AM_OUTPUT_DEPENDENCY_COMMANDS
435 # This code is only required when automatic dependency tracking
436 # is enabled. FIXME. This creates each `.P' file that we will
437 # need in order to bootstrap the dependency handling code.
438 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],[
440 test x"$AMDEP_TRUE" != x"" ||
441 for mf in $CONFIG_FILES; do
443 Makefile) dirpart=.;;
444 */Makefile) dirpart=`echo "$mf" | sed -e 's|/[^/]*$||'`;;
447 grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
448 # Extract the definition of DEP_FILES from the Makefile without
450 DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
451 test -z "$DEPDIR" && continue
452 # When using ansi2knr, U may be empty or an underscore; expand it
453 U=`sed -n -e '/^U = / s///p' < "$mf"`
454 test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
455 # We invoke sed twice because it is the simplest approach to
456 # changing $(DEPDIR) to its actual value in the expansion.
457 for file in `sed -n -e '
458 /^DEP_FILES = .*\\\\$/ {
467 /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \
468 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
469 # Make sure the directory exists.
470 test -f "$dirpart/$file" && continue
471 fdir=`echo "$file" | sed -e 's|/[^/]*$||'`
472 $ac_aux_dir/mkinstalldirs "$dirpart/$fdir" > /dev/null 2>&1
473 # echo "creating $dirpart/$file"
474 echo '# dummy' > "$dirpart/$file"
477 ], [AMDEP_TRUE="$AMDEP_TRUE"
478 ac_aux_dir="$ac_aux_dir"])])
482 # Check to see how make treats includes.
483 AC_DEFUN([AM_MAKE_INCLUDE],
484 [am_make=${MAKE-make}
485 cat > confinc << 'END'
489 # If we don't find an include directive, just comment out the code.
490 AC_MSG_CHECKING([for style of include used by $am_make])
494 # First try GNU make style include.
495 echo "include confinc" > confmf
496 # We grep out `Entering directory' and `Leaving directory'
497 # messages which can occur if `w' ends up in MAKEFLAGS.
498 # In particular we don't look at `^make:' because GNU make might
499 # be invoked under some other name (usually "gmake"), in which
500 # case it prints its new name instead of `make'.
501 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then
506 # Now try BSD make style include.
507 if test "$am__include" = "#"; then
508 echo '.include "confinc"' > confmf
509 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
515 AC_SUBST(am__include)
517 AC_MSG_RESULT($_am_result)
523 # AM_CONDITIONAL(NAME, SHELL-CONDITION)
524 # -------------------------------------
525 # Define a conditional.
527 # FIXME: Once using 2.50, use this:
528 # m4_match([$1], [^TRUE\|FALSE$], [AC_FATAL([$0: invalid condition: $1])])dnl
529 AC_DEFUN([AM_CONDITIONAL],
530 [ifelse([$1], [TRUE],
531 [errprint(__file__:__line__: [$0: invalid condition: $1
534 ifelse([$1], [FALSE],
535 [errprint(__file__:__line__: [$0: invalid condition: $1
548 # Like AC_CONFIG_HEADER, but automatically create stamp file.
552 # When config.status generates a header, we must update the stamp-h file.
553 # This file resides in the same directory as the config header
554 # that is generated. We must strip everything past the first ":",
555 # and everything past the last "/".
559 AC_DEFUN([AM_CONFIG_HEADER],
560 [ifdef([AC_FOREACH],dnl
561 [dnl init our file count if it isn't already
562 m4_ifndef([_AM_Config_Header_Index], m4_define([_AM_Config_Header_Index], [0]))
563 dnl prepare to store our destination file list for use in config.status
564 AC_FOREACH([_AM_File], [$1],
565 [m4_pushdef([_AM_Dest], m4_patsubst(_AM_File, [:.*]))
566 m4_define([_AM_Config_Header_Index], m4_incr(_AM_Config_Header_Index))
567 dnl and add it to the list of files AC keeps track of, along
569 AC_CONFIG_HEADERS(_AM_File,
570 dnl COMMANDS, [, INIT-CMDS]
571 [# update the timestamp
572 echo timestamp >"AS_ESCAPE(_AM_DIRNAME(]_AM_Dest[))/stamp-h]_AM_Config_Header_Index["
573 ][$2]m4_ifval([$3], [, [$3]]))dnl AC_CONFIG_HEADERS
574 m4_popdef([_AM_Dest])])],dnl
575 [AC_CONFIG_HEADER([$1])
577 ifelse(patsubst([$1], [[^ ]], []),
579 [test -z "$CONFIG_HEADERS" || echo timestamp >dnl
580 patsubst([$1], [^\([^:]*/\)?.*], [\1])stamp-h]),dnl
582 for am_file in $1; do
583 case " \$CONFIG_HEADERS " in
585 am_dir=\`echo \$am_file |sed 's%:.*%%;s%[^/]*\$%%'\`
586 if test -n "\$am_dir"; then
587 am_tmpdir=\`echo \$am_dir |sed 's%^\(/*\).*\$%\1%'\`
588 for am_subdir in \`echo \$am_dir |sed 's%/% %'\`; do
589 am_tmpdir=\$am_tmpdir\$am_subdir/
590 if test ! -d \$am_tmpdir; then
595 echo timestamp > "\$am_dir"stamp-h\$am_indx
598 am_indx=\`expr \$am_indx + 1\`
600 ])]) # AM_CONFIG_HEADER
604 # Like AS_DIRNAME, only do it during macro expansion
605 AC_DEFUN([_AM_DIRNAME],
606 [m4_if(m4_regexp([$1], [^.*[^/]//*[^/][^/]*/*$]), -1,
607 m4_if(m4_regexp([$1], [^//\([^/]\|$\)]), -1,
608 m4_if(m4_regexp([$1], [^/.*]), -1,
610 m4_patsubst([$1], [^\(/\).*], [\1])),
611 m4_patsubst([$1], [^\(//\)\([^/].*\|$\)], [\1])),
612 m4_patsubst([$1], [^\(.*[^/]\)//*[^/][^/]*/*$], [\1]))[]dnl
617 # Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT
618 AC_DEFUN([AM_PROG_LEX],
619 [AC_REQUIRE([AM_MISSING_HAS_RUN])
620 AC_CHECK_PROGS(LEX, flex lex, [${am_missing_run}flex])
624 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
626 # serial 46 AC_PROG_LIBTOOL
628 AC_DEFUN([AC_PROG_LIBTOOL],
629 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
631 # This can be used to rebuild libtool when needed
632 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
634 # Always use our own libtool.
635 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
638 # Prevent multiple expansion
639 define([AC_PROG_LIBTOOL], [])
642 AC_DEFUN([AC_LIBTOOL_SETUP],
644 AC_REQUIRE([AC_ENABLE_SHARED])dnl
645 AC_REQUIRE([AC_ENABLE_STATIC])dnl
646 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
647 AC_REQUIRE([AC_CANONICAL_HOST])dnl
648 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
649 AC_REQUIRE([AC_PROG_CC])dnl
650 AC_REQUIRE([AC_PROG_LD])dnl
651 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
652 AC_REQUIRE([AC_PROG_NM])dnl
653 AC_REQUIRE([AC_PROG_LN_S])dnl
654 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
655 AC_REQUIRE([AC_OBJEXT])dnl
656 AC_REQUIRE([AC_EXEEXT])dnl
659 _LT_AC_PROG_ECHO_BACKSLASH
660 # Only perform the check for file, if the check method requires it
661 case $deplibs_check_method in
663 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
669 AC_CHECK_TOOL(RANLIB, ranlib, :)
670 AC_CHECK_TOOL(STRIP, strip, :)
672 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
673 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
674 enable_win32_dll=yes, enable_win32_dll=no)
676 AC_ARG_ENABLE(libtool-lock,
677 [ --disable-libtool-lock avoid locking (might break parallel builds)])
678 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
680 # Some flags need to be propagated to the compiler or linker for good
684 # Find out which ABI we are using.
685 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
686 if AC_TRY_EVAL(ac_compile); then
687 case `/usr/bin/file conftest.$ac_objext` in
703 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
704 SAVE_CFLAGS="$CFLAGS"
705 CFLAGS="$CFLAGS -belf"
706 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
709 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
711 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
712 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
713 CFLAGS="$SAVE_CFLAGS"
717 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
718 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
719 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
720 AC_CHECK_TOOL(AS, as, false)
721 AC_CHECK_TOOL(OBJDUMP, objdump, false)
723 # recent cygwin and mingw systems supply a stub DllMain which the user
724 # can override, but on older systems we have to supply one
725 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
727 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
729 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
732 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
733 # old mingw systems require "-dll" to link a DLL, while more recent ones
735 SAVE_CFLAGS="$CFLAGS"
736 CFLAGS="$CFLAGS -mdll"
737 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
738 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
739 CFLAGS="$SAVE_CFLAGS" ;;
740 *-*-cygwin* | *-*-pw32*)
741 # cygwin systems need to pass --dll to the linker, and not link
742 # crt.o which will require a WinMain@16 definition.
743 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
753 # AC_LIBTOOL_HEADER_ASSERT
754 # ------------------------
755 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
756 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
757 [lt_cv_func_assert_works],
760 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
761 case `$CC --version 2>/dev/null` in
762 [[12]].*) lt_cv_func_assert_works=no ;;
763 *) lt_cv_func_assert_works=yes ;;
769 if test "x$lt_cv_func_assert_works" = xyes; then
770 AC_CHECK_HEADERS(assert.h)
772 ])# AC_LIBTOOL_HEADER_ASSERT
775 # --------------------
776 AC_DEFUN([_LT_AC_CHECK_DLFCN],
777 [AC_CHECK_HEADERS(dlfcn.h)
778 ])# _LT_AC_CHECK_DLFCN
780 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
781 # ---------------------------------
782 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
783 [AC_REQUIRE([AC_CANONICAL_HOST])
784 AC_REQUIRE([AC_PROG_NM])
785 AC_REQUIRE([AC_OBJEXT])
786 # Check for command to grab the raw symbol name followed by C symbol from nm.
787 AC_MSG_CHECKING([command to parse $NM output])
788 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
790 # These are sane defaults that work on at least a few old systems.
791 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
793 # Character class describing NM global symbol codes.
794 symcode='[[BCDEGRST]]'
796 # Regexp to match symbols that can be accessed directly from C.
797 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
799 # Transform the above into a raw symbol and a C symbol.
802 # Transform an extracted symbol line into a proper C declaration
803 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
805 # Transform an extracted symbol line into symbol name and symbol address
806 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'"
808 # Define system-specific variables.
813 cygwin* | mingw* | pw32*)
814 symcode='[[ABCDGISTW]]'
816 hpux*) # Its linker distinguishes data from code symbols
817 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
818 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'"
821 symcode='[[BCDEGRST]]'
831 # Handle CRLF in mingw tool chain
835 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
839 # If we're using GNU nm, then use its standard symbol codes.
840 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
841 symcode='[[ABCDGISTW]]'
844 # Try without a prefix undercore, then with it.
845 for ac_symprfx in "" "_"; do
847 # Write the raw and C identifiers.
848 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
850 # Check to see that the pipe works correctly.
853 cat > conftest.$ac_ext <<EOF
858 void nm_test_func(){}
862 int main(){nm_test_var='a';nm_test_func();return(0);}
865 if AC_TRY_EVAL(ac_compile); then
866 # Now try to grab the symbols.
868 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
869 # Try sorting and uniquifying the output.
870 if sort "$nlist" | uniq > "$nlist"T; then
871 mv -f "$nlist"T "$nlist"
876 # Make sure that we snagged all the symbols we need.
877 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
878 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
879 cat <<EOF > conftest.$ac_ext
885 # Now generate the symbol file.
886 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
888 cat <<EOF >> conftest.$ac_ext
889 #if defined (__STDC__) && __STDC__
890 # define lt_ptr void *
892 # define lt_ptr char *
896 /* The mapping between symbol names and symbols. */
901 lt_preloaded_symbols[[]] =
904 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
905 cat <<\EOF >> conftest.$ac_ext
913 # Now try linking the two files.
914 mv conftest.$ac_objext conftstm.$ac_objext
916 save_CFLAGS="$CFLAGS"
917 LIBS="conftstm.$ac_objext"
918 CFLAGS="$CFLAGS$no_builtin_flag"
919 if AC_TRY_EVAL(ac_link) && test -s conftest; then
923 CFLAGS="$save_CFLAGS"
925 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
928 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
931 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
934 echo "$progname: failed program was:" >&AC_FD_CC
935 cat conftest.$ac_ext >&5
937 rm -f conftest* conftst*
939 # Do not use the global_symbol_pipe unless it works.
940 if test "$pipe_works" = yes; then
943 lt_cv_sys_global_symbol_pipe=
947 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
948 if test -z "$lt_cv_sys_global_symbol_pipe"; then
949 global_symbol_to_cdecl=
950 global_symbol_to_c_name_address=
952 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
953 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
955 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
957 AC_MSG_RESULT(failed)
961 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
963 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
964 # ---------------------------------
965 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
966 [# Find the correct PATH separator. Usually this is `:', but
967 # DJGPP uses `;' like DOS.
968 if test "X${PATH_SEPARATOR+set}" != Xset; then
969 UNAME=${UNAME-`uname 2>/dev/null`}
971 *-DOS) lt_cv_sys_path_separator=';' ;;
972 *) lt_cv_sys_path_separator=':' ;;
974 PATH_SEPARATOR=$lt_cv_sys_path_separator
976 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
978 # _LT_AC_PROG_ECHO_BACKSLASH
979 # --------------------------
980 # Add some code to the start of the generated configure script which
981 # will find an echo command which doesn't interpret backslashes.
982 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
983 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
984 [AC_DIVERT_PUSH(NOTICE)])
985 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
987 # Check that we are running under the correct shell.
988 SHELL=${CONFIG_SHELL-/bin/sh}
992 # Remove one level of quotation (which was required for Make).
993 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
998 if test "X[$]1" = X--no-reexec; then
999 # Discard the --no-reexec flag, and continue.
1001 elif test "X[$]1" = X--fallback-echo; then
1002 # Avoid inline document here, it may be left over
1004 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
1005 # Yippee, $echo works!
1008 # Restart under the correct shell.
1009 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
1012 if test "X[$]1" = X--fallback-echo; then
1013 # used as fallback echo
1021 # The HP-UX ksh and POSIX shell print the target directory to stdout
1023 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
1025 if test -z "$ECHO"; then
1026 if test "X${echo_test_string+set}" != Xset; then
1027 # find a string as large as possible, as long as the shell can cope with it
1028 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
1029 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
1030 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
1031 echo_test_string="`eval $cmd`" &&
1032 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
1039 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1040 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1041 test "X$echo_testing_string" = "X$echo_test_string"; then
1044 # The Solaris, AIX, and Digital Unix default echo programs unquote
1045 # backslashes. This makes it impossible to quote backslashes using
1046 # echo "$something" | sed 's/\\/\\\\/g'
1048 # So, first we look for a working echo in the user's PATH.
1050 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
1051 for dir in $PATH /usr/ucb; do
1052 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
1053 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
1054 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
1055 test "X$echo_testing_string" = "X$echo_test_string"; then
1062 if test "X$echo" = Xecho; then
1063 # We didn't find a better echo, so look for alternatives.
1064 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
1065 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
1066 test "X$echo_testing_string" = "X$echo_test_string"; then
1067 # This shell has a builtin print -r that does the trick.
1069 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
1070 test "X$CONFIG_SHELL" != X/bin/ksh; then
1071 # If we have ksh, try running configure again with it.
1072 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
1073 export ORIGINAL_CONFIG_SHELL
1074 CONFIG_SHELL=/bin/ksh
1076 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
1080 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
1081 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
1082 test "X$echo_testing_string" = "X$echo_test_string"; then
1083 # Cool, printf works
1085 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1086 test "X$echo_testing_string" = 'X\t' &&
1087 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1088 test "X$echo_testing_string" = "X$echo_test_string"; then
1089 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
1091 SHELL="$CONFIG_SHELL"
1093 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1094 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
1095 test "X$echo_testing_string" = 'X\t' &&
1096 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
1097 test "X$echo_testing_string" = "X$echo_test_string"; then
1098 echo="$CONFIG_SHELL [$]0 --fallback-echo"
1100 # maybe with a smaller string...
1103 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
1104 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
1111 if test "$prev" != 'sed 50q "[$]0"'; then
1112 echo_test_string=`eval $prev`
1113 export echo_test_string
1114 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
1116 # Oops. We lost completely, so just stick with echo.
1125 # Copy echo and quote the copy suitably for passing to libtool from
1126 # the Makefile, instead of quoting the original, which is used later.
1128 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
1129 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
1134 ])# _LT_AC_PROG_ECHO_BACKSLASH
1136 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
1137 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
1138 # ------------------------------------------------------------------
1139 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
1140 [if test "$cross_compiling" = yes; then :
1143 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1144 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1145 lt_status=$lt_dlunknown
1146 cat > conftest.$ac_ext <<EOF
1147 [#line __oline__ "configure"
1148 #include "confdefs.h"
1157 # define LT_DLGLOBAL RTLD_GLOBAL
1160 # define LT_DLGLOBAL DL_GLOBAL
1162 # define LT_DLGLOBAL 0
1166 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1167 find out it does not work in some platform. */
1168 #ifndef LT_DLLAZY_OR_NOW
1170 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1173 # define LT_DLLAZY_OR_NOW DL_LAZY
1176 # define LT_DLLAZY_OR_NOW RTLD_NOW
1179 # define LT_DLLAZY_OR_NOW DL_NOW
1181 # define LT_DLLAZY_OR_NOW 0
1189 extern "C" void exit (int);
1192 void fnord() { int i=42;}
1195 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1196 int status = $lt_dlunknown;
1200 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1201 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1202 /* dlclose (self); */
1208 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1209 (./conftest; exit; ) 2>/dev/null
1212 x$lt_dlno_uscore) $1 ;;
1213 x$lt_dlneed_uscore) $2 ;;
1214 x$lt_unknown|x*) $3 ;;
1217 # compilation failed
1222 ])# _LT_AC_TRY_DLOPEN_SELF
1224 # AC_LIBTOOL_DLOPEN_SELF
1225 # -------------------
1226 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1227 [if test "x$enable_dlopen" != xyes; then
1228 enable_dlopen=unknown
1229 enable_dlopen_self=unknown
1230 enable_dlopen_self_static=unknown
1237 lt_cv_dlopen="load_add_on"
1239 lt_cv_dlopen_self=yes
1242 cygwin* | mingw* | pw32*)
1243 lt_cv_dlopen="LoadLibrary"
1248 AC_CHECK_FUNC([shl_load],
1249 [lt_cv_dlopen="shl_load"],
1250 [AC_CHECK_LIB([dld], [shl_load],
1251 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1252 [AC_CHECK_FUNC([dlopen],
1253 [lt_cv_dlopen="dlopen"],
1254 [AC_CHECK_LIB([dl], [dlopen],
1255 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1256 [AC_CHECK_LIB([svld], [dlopen],
1257 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1258 [AC_CHECK_LIB([dld], [dld_link],
1259 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1268 if test "x$lt_cv_dlopen" != xno; then
1274 case $lt_cv_dlopen in
1276 save_CPPFLAGS="$CPPFLAGS"
1277 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1278 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1280 save_LDFLAGS="$LDFLAGS"
1281 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1284 LIBS="$lt_cv_dlopen_libs $LIBS"
1286 AC_CACHE_CHECK([whether a program can dlopen itself],
1287 lt_cv_dlopen_self, [dnl
1288 _LT_AC_TRY_DLOPEN_SELF(
1289 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1290 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1293 if test "x$lt_cv_dlopen_self" = xyes; then
1294 LDFLAGS="$LDFLAGS $link_static_flag"
1295 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1296 lt_cv_dlopen_self_static, [dnl
1297 _LT_AC_TRY_DLOPEN_SELF(
1298 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1299 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1303 CPPFLAGS="$save_CPPFLAGS"
1304 LDFLAGS="$save_LDFLAGS"
1309 case $lt_cv_dlopen_self in
1310 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1311 *) enable_dlopen_self=unknown ;;
1314 case $lt_cv_dlopen_self_static in
1315 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1316 *) enable_dlopen_self_static=unknown ;;
1319 ])# AC_LIBTOOL_DLOPEN_SELF
1321 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1322 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1323 # Sed substitution that helps us do robust quoting. It backslashifies
1324 # metacharacters that are still active within double-quoted strings.
1325 Xsed='sed -e s/^X//'
1326 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1328 # Same as above, but do not quote variable references.
1329 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1331 # Sed substitution to delay expansion of an escaped shell variable in a
1332 # double_quote_subst'ed string.
1333 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1339 default_ofile=libtool
1340 can_build_shared=yes
1342 # All known linkers require a `.a' archive for static linking (except M$VC,
1343 # which needs '.lib').
1345 ltmain="$ac_aux_dir/ltmain.sh"
1346 ofile="$default_ofile"
1347 with_gnu_ld="$lt_cv_prog_gnu_ld"
1348 need_locks="$enable_libtool_lock"
1351 old_CFLAGS="$CFLAGS"
1353 # Set sane defaults for various variables
1354 test -z "$AR" && AR=ar
1355 test -z "$AR_FLAGS" && AR_FLAGS=cru
1356 test -z "$AS" && AS=as
1357 test -z "$CC" && CC=cc
1358 test -z "$DLLTOOL" && DLLTOOL=dlltool
1359 test -z "$LD" && LD=ld
1360 test -z "$LN_S" && LN_S="ln -s"
1361 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1362 test -z "$NM" && NM=nm
1363 test -z "$OBJDUMP" && OBJDUMP=objdump
1364 test -z "$RANLIB" && RANLIB=:
1365 test -z "$STRIP" && STRIP=:
1366 test -z "$ac_objext" && ac_objext=o
1368 if test x"$host" != x"$build"; then
1369 ac_tool_prefix=${host_alias}-
1374 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1377 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1382 # AIX sometimes has problems with the GCC collect2 program. For some
1383 # reason, if we set the COLLECT_NAMES environment variable, the problems
1384 # vanish in a puff of smoke.
1385 if test "X${COLLECT_NAMES+set}" != Xset; then
1387 export COLLECT_NAMES
1392 # Determine commands to create old-style static archives.
1393 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1394 old_postinstall_cmds='chmod 644 $oldlib'
1395 old_postuninstall_cmds=
1397 if test -n "$RANLIB"; then
1400 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1403 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1406 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1409 # Allow CC to be a program name with arguments.
1413 AC_MSG_CHECKING([for objdir])
1414 rm -f .libs 2>/dev/null
1415 mkdir .libs 2>/dev/null
1416 if test -d .libs; then
1419 # MS-DOS does not allow filenames that begin with a dot.
1422 rmdir .libs 2>/dev/null
1423 AC_MSG_RESULT($objdir)
1427 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1428 pic_mode="$withval", pic_mode=default)
1429 test -z "$pic_mode" && pic_mode=default
1431 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1432 # in isolation, and that seeing it set (from the cache) indicates that
1433 # the associated values are set (in the cache) correctly too.
1434 AC_MSG_CHECKING([for $compiler option to produce PIC])
1435 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1436 [ lt_cv_prog_cc_pic=
1437 lt_cv_prog_cc_shlib=
1439 lt_cv_prog_cc_static=
1440 lt_cv_prog_cc_no_builtin=
1441 lt_cv_prog_cc_can_build_shared=$can_build_shared
1443 if test "$GCC" = yes; then
1444 lt_cv_prog_cc_wl='-Wl,'
1445 lt_cv_prog_cc_static='-static'
1449 # Below there is a dirty hack to force normal static linking with -ldl
1450 # The problem is because libdl dynamically linked with both libc and
1451 # libC (AIX C++ library), which obviously doesn't included in libraries
1452 # list by gcc. This cause undefined symbols with -static flags.
1453 # This hack allows C programs to be linked with "-static -ldl", but
1454 # not sure about C++ programs.
1455 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1458 # FIXME: we need at least 68020 code to build shared libraries, but
1459 # adding the `-m68020' flag to GCC prevents building anything better,
1461 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1463 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1464 # PIC is the default for these OSes.
1466 darwin* | rhapsody*)
1467 # PIC is the default on this platform
1468 # Common symbols not allowed in MH_DYLIB files
1469 lt_cv_prog_cc_pic='-fno-common'
1471 cygwin* | mingw* | pw32* | os2*)
1472 # This hack is so that the source file can tell whether it is being
1473 # built for inclusion in a dll (and should export symbols for example).
1474 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1477 if test -d /usr/nec; then
1478 lt_cv_prog_cc_pic=-Kconform_pic
1482 lt_cv_prog_cc_pic='-fPIC'
1486 # PORTME Check for PIC flags for the system compiler.
1488 aix3* | aix4* | aix5*)
1489 lt_cv_prog_cc_wl='-Wl,'
1490 # All AIX code is PIC.
1491 if test "$host_cpu" = ia64; then
1492 # AIX 5 now supports IA64 processor
1493 lt_cv_prog_cc_static='-Bstatic'
1495 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1499 hpux9* | hpux10* | hpux11*)
1500 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1501 lt_cv_prog_cc_wl='-Wl,'
1502 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1503 lt_cv_prog_cc_pic='+Z'
1506 irix5* | irix6* | nonstopux*)
1507 lt_cv_prog_cc_wl='-Wl,'
1508 lt_cv_prog_cc_static='-non_shared'
1509 # PIC (with -KPIC) is the default.
1512 cygwin* | mingw* | pw32* | os2*)
1513 # This hack is so that the source file can tell whether it is being
1514 # built for inclusion in a dll (and should export symbols for example).
1515 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1519 lt_cv_prog_cc_pic='-KPIC'
1520 lt_cv_prog_cc_static='-Bstatic'
1523 osf3* | osf4* | osf5*)
1524 # All OSF/1 code is PIC.
1525 lt_cv_prog_cc_wl='-Wl,'
1526 lt_cv_prog_cc_static='-non_shared'
1530 lt_cv_prog_cc_pic='-Kpic'
1531 lt_cv_prog_cc_static='-dn'
1532 lt_cv_prog_cc_shlib='-belf'
1536 lt_cv_prog_cc_pic='-KPIC'
1537 lt_cv_prog_cc_static='-Bstatic'
1538 lt_cv_prog_cc_wl='-Wl,'
1542 lt_cv_prog_cc_pic='-PIC'
1543 lt_cv_prog_cc_static='-Bstatic'
1544 lt_cv_prog_cc_wl='-Qoption ld '
1547 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1548 lt_cv_prog_cc_pic='-KPIC'
1549 lt_cv_prog_cc_static='-Bstatic'
1550 if test "x$host_vendor" = xsni; then
1551 lt_cv_prog_cc_wl='-LD'
1553 lt_cv_prog_cc_wl='-Wl,'
1558 lt_cv_prog_cc_pic='-pic'
1559 lt_cv_prog_cc_static='-Bstatic'
1563 if test -d /usr/nec ;then
1564 lt_cv_prog_cc_pic='-Kconform_pic'
1565 lt_cv_prog_cc_static='-Bstatic'
1570 lt_cv_prog_cc_can_build_shared=no
1575 if test -z "$lt_cv_prog_cc_pic"; then
1576 AC_MSG_RESULT([none])
1578 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1580 # Check to make sure the pic_flag actually works.
1581 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1582 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1583 save_CFLAGS="$CFLAGS"
1584 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1585 AC_TRY_COMPILE([], [], [dnl
1587 hpux9* | hpux10* | hpux11*)
1588 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1589 # they create non-PIC objects. So, if there were any warnings, we
1590 # assume that PIC is not supported.
1591 if test -s conftest.err; then
1592 lt_cv_prog_cc_pic_works=no
1594 lt_cv_prog_cc_pic_works=yes
1598 lt_cv_prog_cc_pic_works=yes
1602 lt_cv_prog_cc_pic_works=no
1604 CFLAGS="$save_CFLAGS"
1607 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1609 lt_cv_prog_cc_can_build_shared=no
1611 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1614 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1617 # Check for any special shared library compilation flags.
1618 if test -n "$lt_cv_prog_cc_shlib"; then
1619 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1620 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1622 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1623 lt_cv_prog_cc_can_build_shared=no
1627 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1628 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1629 lt_cv_prog_cc_static_works=no
1630 save_LDFLAGS="$LDFLAGS"
1631 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1632 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1633 LDFLAGS="$save_LDFLAGS"
1636 # Belt *and* braces to stop my trousers falling down:
1637 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1638 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1640 pic_flag="$lt_cv_prog_cc_pic"
1641 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1642 wl="$lt_cv_prog_cc_wl"
1643 link_static_flag="$lt_cv_prog_cc_static"
1644 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1645 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1648 # Check to see if options -o and -c are simultaneously supported by compiler
1649 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1650 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1651 $rm -r conftest 2>/dev/null
1654 echo "int some_variable = 0;" > conftest.$ac_ext
1656 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1657 # that will create temporary files in the current directory regardless of
1658 # the output directory. Thus, making CWD read-only will cause this test
1659 # to fail, enabling locking or at least warning the user not to do parallel
1662 save_CFLAGS="$CFLAGS"
1663 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1665 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1666 # The compiler can only warn and ignore the option if not recognized
1667 # So say no if there are warnings
1668 if test -s out/conftest.err; then
1669 lt_cv_compiler_c_o=no
1671 lt_cv_compiler_c_o=yes
1674 # Append any errors to the config.log.
1675 cat out/conftest.err 1>&AC_FD_CC
1676 lt_cv_compiler_c_o=no
1678 CFLAGS="$save_CFLAGS"
1684 $rm -r conftest 2>/dev/null
1686 compiler_c_o=$lt_cv_compiler_c_o
1687 AC_MSG_RESULT([$compiler_c_o])
1689 if test x"$compiler_c_o" = x"yes"; then
1690 # Check to see if we can write to a .lo
1691 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1692 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1693 lt_cv_compiler_o_lo=no
1694 save_CFLAGS="$CFLAGS"
1695 CFLAGS="$CFLAGS -c -o conftest.lo"
1696 save_objext="$ac_objext"
1698 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1699 # The compiler can only warn and ignore the option if not recognized
1700 # So say no if there are warnings
1701 if test -s conftest.err; then
1702 lt_cv_compiler_o_lo=no
1704 lt_cv_compiler_o_lo=yes
1707 ac_objext="$save_objext"
1708 CFLAGS="$save_CFLAGS"
1710 compiler_o_lo=$lt_cv_compiler_o_lo
1711 AC_MSG_RESULT([$compiler_o_lo])
1716 # Check to see if we can do hard links to lock some files if needed
1717 hard_links="nottested"
1718 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1719 # do not overwrite the value of need_locks provided by the user
1720 AC_MSG_CHECKING([if we can lock with hard links])
1723 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1725 ln conftest.a conftest.b 2>&5 || hard_links=no
1726 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1727 AC_MSG_RESULT([$hard_links])
1728 if test "$hard_links" = no; then
1729 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1736 if test "$GCC" = yes; then
1737 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1738 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1739 echo "int some_variable = 0;" > conftest.$ac_ext
1740 save_CFLAGS="$CFLAGS"
1741 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1742 compiler_rtti_exceptions=no
1743 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1744 # The compiler can only warn and ignore the option if not recognized
1745 # So say no if there are warnings
1746 if test -s conftest.err; then
1747 compiler_rtti_exceptions=no
1749 compiler_rtti_exceptions=yes
1752 CFLAGS="$save_CFLAGS"
1753 AC_MSG_RESULT([$compiler_rtti_exceptions])
1755 if test "$compiler_rtti_exceptions" = "yes"; then
1756 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1758 no_builtin_flag=' -fno-builtin'
1762 # See if the linker supports building shared libraries.
1763 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1765 allow_undefined_flag=
1767 need_lib_prefix=unknown
1768 need_version=unknown
1769 # when you set need_version to no, make sure it does not cause -set_version
1770 # flags to be left without arguments
1772 archive_expsym_cmds=
1773 old_archive_from_new_cmds=
1774 old_archive_from_expsyms_cmds=
1775 export_dynamic_flag_spec=
1776 whole_archive_flag_spec=
1777 thread_safe_flag_spec=
1778 hardcode_into_libs=no
1779 hardcode_libdir_flag_spec=
1780 hardcode_libdir_separator=
1783 hardcode_shlibpath_var=unsupported
1785 link_all_deplibs=unknown
1786 always_export_symbols=no
1787 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1788 # include_expsyms should be a list of space-separated symbols to be *always*
1789 # included in the symbol list
1791 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1792 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1793 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1794 # as well as any symbol that contains `d'.
1795 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1796 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1797 # platforms (ab)use it in PIC code, but their linkers get confused if
1798 # the symbol is explicitly referenced. Since portable code cannot
1799 # rely on this symbol name, it's probably fine to never include it in
1800 # preloaded symbol tables.
1801 extract_expsyms_cmds=
1804 cygwin* | mingw* | pw32*)
1805 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1806 # When not using gcc, we currently assume that we are using
1807 # Microsoft Visual C++.
1808 if test "$GCC" != yes; then
1818 if test "$with_gnu_ld" = yes; then
1819 # If archive_cmds runs LD, not CC, wlarc should be empty
1822 # See if GNU ld supports shared libraries.
1824 aix3* | aix4* | aix5*)
1825 # On AIX, the GNU linker is very broken
1826 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1830 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1831 *** to be unable to reliably create shared libraries on AIX.
1832 *** Therefore, libtool is disabling shared libraries support. If you
1833 *** really care for shared libraries, you may want to modify your PATH
1834 *** so that a non-GNU linker is found, and then restart.
1840 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)'
1841 hardcode_libdir_flag_spec='-L$libdir'
1842 hardcode_minus_L=yes
1844 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1845 # that the semantics of dynamic libraries on AmigaOS, at least up
1846 # to version 4, is to share data among multiple programs linked
1847 # with the same dynamic library. Since this doesn't match the
1848 # behavior of shared libraries on other platforms, we can use
1854 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1855 allow_undefined_flag=unsupported
1856 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1857 # support --undefined. This deserves some investigation. FIXME
1858 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1864 cygwin* | mingw* | pw32*)
1865 # hardcode_libdir_flag_spec is actually meaningless, as there is
1866 # no search path for DLLs.
1867 hardcode_libdir_flag_spec='-L$libdir'
1868 allow_undefined_flag=unsupported
1869 always_export_symbols=yes
1871 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1872 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1873 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1874 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1875 else $CC -o impgen impgen.c ; fi)~
1876 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1878 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1880 # cygwin and mingw dlls have different entry points and sets of symbols
1882 # FIXME: what about values for MSVC?
1883 dll_entry=__cygwin_dll_entry@12
1884 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1888 dll_entry=_DllMainCRTStartup@12
1889 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1893 # mingw and cygwin differ, and it's simplest to just exclude the union
1894 # of the two symbol sets.
1895 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1897 # recent cygwin and mingw systems supply a stub DllMain which the user
1898 # can override, but on older systems we have to supply one (in ltdll.c)
1899 if test "x$lt_cv_need_dllmain" = "xyes"; then
1900 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1901 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~
1902 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1908 # Extract the symbol export list from an `--export-all' def file,
1909 # then regenerate the def file from the symbol export list, so that
1910 # the compiled dll only exports the symbol export list.
1911 # Be careful not to strip the DATA tag left be newer dlltools.
1912 export_symbols_cmds="$ltdll_cmds"'
1913 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1914 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1916 # If the export-symbols file already is a .def file (1st line
1917 # is EXPORTS), use it as is.
1918 # If DATA tags from a recent dlltool are present, honour them!
1919 archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
1920 cp $export_symbols $output_objdir/$soname-def;
1922 echo EXPORTS > $output_objdir/$soname-def;
1924 cat $export_symbols | while read symbol; do
1927 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1928 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1930 _lt_hint=`expr 1 + \$_lt_hint`;
1934 $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~
1935 $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~
1936 $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~
1937 $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~
1938 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1942 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1943 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1946 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1947 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1952 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1956 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1957 *** create shared libraries on Solaris systems. Therefore, libtool
1958 *** is disabling shared libraries support. We urge you to upgrade GNU
1959 *** binutils to release 2.9.1 or newer. Another option is to modify
1960 *** your PATH or compiler configuration so that the native linker is
1961 *** used, and then restart.
1964 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1965 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1966 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1973 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1976 hardcode_shlibpath_var=no
1980 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1981 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1982 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1989 if test "$ld_shlibs" = yes; then
1990 runpath_var=LD_RUN_PATH
1991 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1992 export_dynamic_flag_spec='${wl}--export-dynamic'
1994 cygwin* | mingw* | pw32*)
1995 # dlltool doesn't understand --whole-archive et. al.
1996 whole_archive_flag_spec=
1999 # ancient GNU ld didn't support --whole-archive et. al.
2000 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
2001 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2003 whole_archive_flag_spec=
2009 # PORTME fill in a description of your system's linker (not GNU ld)
2012 allow_undefined_flag=unsupported
2013 always_export_symbols=yes
2014 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'
2015 # Note: this linker hardcodes the directories in LIBPATH if there
2016 # are no directories specified by -L.
2017 hardcode_minus_L=yes
2018 if test "$GCC" = yes && test -z "$link_static_flag"; then
2019 # Neither direct hardcoding nor static linking is supported with a
2021 hardcode_direct=unsupported
2026 if test "$host_cpu" = ia64; then
2027 # On IA64, the linker does run time linking by default, so we don't
2028 # have to do anything special.
2029 aix_use_runtimelinking=no
2030 exp_sym_flag='-Bexport'
2033 aix_use_runtimelinking=no
2035 # Test if we are trying to use run time linking or normal
2036 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2037 # need to do runtime linking.
2038 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2039 for ld_flag in $LDFLAGS; do
2040 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
2041 aix_use_runtimelinking=yes
2047 exp_sym_flag='-bexport'
2048 no_entry_flag='-bnoentry'
2051 # When large executables or shared objects are built, AIX ld can
2052 # have problems creating the table of contents. If linking a library
2053 # or program results in "error TOC overflow" add -mminimal-toc to
2054 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2055 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2059 hardcode_libdir_separator=':'
2060 if test "$GCC" = yes; then
2061 case $host_os in aix4.[[012]]|aix4.[[012]].*)
2062 collect2name=`${CC} -print-prog-name=collect2`
2063 if test -f "$collect2name" && \
2064 strings "$collect2name" | grep resolve_lib_name >/dev/null
2066 # We have reworked collect2
2069 # We have old collect2
2070 hardcode_direct=unsupported
2071 # It fails to find uninstalled libraries when the uninstalled
2072 # path is not listed in the libpath. Setting hardcode_minus_L
2073 # to unsupported forces relinking
2074 hardcode_minus_L=yes
2075 hardcode_libdir_flag_spec='-L$libdir'
2076 hardcode_libdir_separator=
2080 shared_flag='-shared'
2083 if test "$host_cpu" = ia64; then
2084 shared_flag='${wl}-G'
2086 if test "$aix_use_runtimelinking" = yes; then
2087 shared_flag='${wl}-G'
2089 shared_flag='${wl}-bM:SRE'
2094 # It seems that -bexpall can do strange things, so it is better to
2095 # generate a list of symbols to export.
2096 always_export_symbols=yes
2097 if test "$aix_use_runtimelinking" = yes; then
2098 # Warning - without using the other runtime loading flags (-brtl),
2099 # -berok will link without error, but may produce a broken library.
2100 allow_undefined_flag='-berok'
2101 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
2102 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"
2104 if test "$host_cpu" = ia64; then
2105 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
2106 allow_undefined_flag="-z nodefs"
2107 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"
2109 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
2110 # Warning - without using the other run time loading flags,
2111 # -berok will link without error, but may produce a broken library.
2112 allow_undefined_flag='${wl}-berok'
2113 # This is a bit strange, but is similar to how AIX traditionally builds
2114 # it's shared libraries.
2115 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'
2121 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)'
2122 hardcode_libdir_flag_spec='-L$libdir'
2123 hardcode_minus_L=yes
2124 # see comment about different semantics on the GNU ld section
2128 cygwin* | mingw* | pw32*)
2129 # When not using gcc, we currently assume that we are using
2130 # Microsoft Visual C++.
2131 # hardcode_libdir_flag_spec is actually meaningless, as there is
2132 # no search path for DLLs.
2133 hardcode_libdir_flag_spec=' '
2134 allow_undefined_flag=unsupported
2135 # Tell ltmain to make .lib files, not .a files.
2137 # FIXME: Setting linknames here is a bad hack.
2138 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
2139 # The linker will automatically build a .lib file if we build a DLL.
2140 old_archive_from_new_cmds='true'
2141 # FIXME: Should let the user specify the lib program.
2142 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2143 fix_srcfile_path='`cygpath -w "$srcfile"`'
2146 darwin* | rhapsody*)
2148 rhapsody* | darwin1.[[012]])
2149 allow_undefined_flag='-undefined suppress'
2152 allow_undefined_flag='-flat_namespace -undefined suppress'
2155 # FIXME: Relying on posixy $() will cause problems for
2156 # cross-compilation, but unfortunately the echo tests do not
2157 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
2158 # `"' quotes if we put them in here... so don't!
2159 archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2160 # We need to add '_' to the symbols in $export_symbols first
2161 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2163 hardcode_shlibpath_var=no
2164 whole_archive_flag_spec='-all_load $convenience'
2171 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2172 # support. Future versions do this automatically, but an explicit c++rt0.o
2173 # does not break anything, and helps significantly (at the cost of a little
2176 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2177 hardcode_libdir_flag_spec='-R$libdir'
2179 hardcode_shlibpath_var=no
2182 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2184 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2186 hardcode_minus_L=yes
2187 hardcode_shlibpath_var=no
2190 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2192 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2193 hardcode_libdir_flag_spec='-R$libdir'
2195 hardcode_shlibpath_var=no
2198 hpux9* | hpux10* | hpux11*)
2200 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' ;;
2201 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2203 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2204 hardcode_libdir_separator=:
2206 hardcode_minus_L=yes # Not in the search PATH, but as the default
2207 # location of the library.
2208 export_dynamic_flag_spec='${wl}-E'
2211 irix5* | irix6* | nonstopux*)
2212 if test "$GCC" = yes; then
2213 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'
2215 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'
2217 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2218 hardcode_libdir_separator=:
2219 link_all_deplibs=yes
2223 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2224 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2226 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2228 hardcode_libdir_flag_spec='-R$libdir'
2230 hardcode_shlibpath_var=no
2234 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2236 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2237 hardcode_libdir_separator=:
2238 hardcode_shlibpath_var=no
2243 hardcode_shlibpath_var=no
2244 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2245 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2246 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2247 export_dynamic_flag_spec='${wl}-E'
2250 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2251 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2252 hardcode_libdir_flag_spec='-R$libdir'
2255 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2256 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2263 hardcode_libdir_flag_spec='-L$libdir'
2264 hardcode_minus_L=yes
2265 allow_undefined_flag=unsupported
2266 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'
2267 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2271 if test "$GCC" = yes; then
2272 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2273 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'
2275 allow_undefined_flag=' -expect_unresolved \*'
2276 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'
2278 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2279 hardcode_libdir_separator=:
2282 osf4* | osf5*) # as osf3* with the addition of -msym flag
2283 if test "$GCC" = yes; then
2284 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2285 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'
2286 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2288 allow_undefined_flag=' -expect_unresolved \*'
2289 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'
2290 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2291 $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'
2293 #Both c and cxx compiler support -rpath directly
2294 hardcode_libdir_flag_spec='-rpath $libdir'
2296 hardcode_libdir_separator=:
2300 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2301 hardcode_shlibpath_var=no
2302 runpath_var=LD_RUN_PATH
2303 hardcode_runpath_var=yes
2304 export_dynamic_flag_spec='${wl}-Bexport'
2308 # gcc --version < 3.0 without binutils cannot create self contained
2309 # shared libraries reliably, requiring libgcc.a to resolve some of
2310 # the object symbols generated in some cases. Libraries that use
2311 # assert need libgcc.a to resolve __eprintf, for example. Linking
2312 # a copy of libgcc.a into every shared library to guarantee resolving
2313 # such symbols causes other problems: According to Tim Van Holder
2314 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2315 # (to the application) exception stack for one thing.
2316 no_undefined_flag=' -z defs'
2317 if test "$GCC" = yes; then
2318 case `$CC --version 2>/dev/null` in
2322 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2323 *** create self contained shared libraries on Solaris systems, without
2324 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2325 *** -no-undefined support, which will at least allow you to build shared
2326 *** libraries. However, you may find that when you link such libraries
2327 *** into an application without using GCC, you have to manually add
2328 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2329 *** upgrade to a newer version of GCC. Another option is to rebuild your
2330 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2337 # $CC -shared without GNU ld will not create a library from C++
2338 # object files and a static libstdc++, better avoid it by now
2339 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2340 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2341 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2342 hardcode_libdir_flag_spec='-R$libdir'
2343 hardcode_shlibpath_var=no
2345 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2346 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2347 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2349 link_all_deplibs=yes
2353 if test "x$host_vendor" = xsequent; then
2354 # Use $CC to link under sequent, because it throws in some extra .o
2355 # files that make .init and .fini sections work.
2356 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2358 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2360 hardcode_libdir_flag_spec='-L$libdir'
2362 hardcode_minus_L=yes
2363 hardcode_shlibpath_var=no
2367 if test "x$host_vendor" = xsno; then
2368 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
2369 hardcode_direct=yes # is this really true???
2371 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2372 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2374 runpath_var='LD_RUN_PATH'
2375 hardcode_shlibpath_var=no
2379 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2380 hardcode_shlibpath_var=no
2381 export_dynamic_flag_spec='-Bexport'
2385 no_undefined_flag=' -z text'
2386 # $CC -shared without GNU ld will not create a library from C++
2387 # object files and a static libstdc++, better avoid it by now
2388 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2389 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2390 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2391 hardcode_libdir_flag_spec=
2392 hardcode_shlibpath_var=no
2393 runpath_var='LD_RUN_PATH'
2397 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2398 hardcode_libdir_flag_spec='-L$libdir'
2399 hardcode_shlibpath_var=no
2403 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2404 hardcode_libdir_flag_spec='-L$libdir'
2405 hardcode_shlibpath_var=no
2409 if test -d /usr/nec; then
2410 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2411 hardcode_shlibpath_var=no
2412 runpath_var=LD_RUN_PATH
2413 hardcode_runpath_var=yes
2419 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2422 hardcode_shlibpath_var=no
2423 hardcode_runpath_var=yes
2424 runpath_var=LD_RUN_PATH
2427 sysv5uw7* | unixware7*)
2428 no_undefined_flag='${wl}-z ${wl}text'
2429 if test "$GCC" = yes; then
2430 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2432 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2434 runpath_var='LD_RUN_PATH'
2435 hardcode_shlibpath_var=no
2443 AC_MSG_RESULT([$ld_shlibs])
2444 test "$ld_shlibs" = no && can_build_shared=no
2446 # Check hardcoding attributes.
2447 AC_MSG_CHECKING([how to hardcode library paths into programs])
2449 if test -n "$hardcode_libdir_flag_spec" || \
2450 test -n "$runpath_var"; then
2452 # We can hardcode non-existant directories.
2453 if test "$hardcode_direct" != no &&
2454 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2455 # have to relink, otherwise we might link with an installed library
2456 # when we should be linking with a yet-to-be-installed one
2457 ## test "$hardcode_shlibpath_var" != no &&
2458 test "$hardcode_minus_L" != no; then
2459 # Linking always hardcodes the temporary library directory.
2460 hardcode_action=relink
2462 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2463 hardcode_action=immediate
2466 # We cannot hardcode anything, or else we can only hardcode existing
2468 hardcode_action=unsupported
2470 AC_MSG_RESULT([$hardcode_action])
2474 AC_MSG_CHECKING([whether stripping libraries is possible])
2475 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2476 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2477 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2478 AC_MSG_RESULT([yes])
2483 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2484 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2486 # PORTME Fill in your ld.so characteristics
2487 AC_MSG_CHECKING([dynamic linker characteristics])
2489 libname_spec='lib$name'
2496 shlibpath_overrides_runpath=unknown
2498 dynamic_linker="$host_os ld.so"
2499 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2500 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2505 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2506 shlibpath_var=LIBPATH
2508 # AIX has no versioning support, so we append a major version to the name.
2509 soname_spec='${libname}${release}.so$major'
2514 if test "$host_cpu" = ia64; then
2515 # AIX 5 supports IA64
2516 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2517 shlibpath_var=LD_LIBRARY_PATH
2519 # With GCC up to 2.95.x, collect2 would create an import file
2520 # for dependence libraries. The import file would start with
2521 # the line `#! .'. This would cause the generated library to
2522 # depend on `.', always an invalid library. This was fixed in
2523 # development snapshots of GCC prior to 3.0.
2525 aix4 | aix4.[[01]] | aix4.[[01]].*)
2526 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2528 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2535 # AIX (on Power*) has no versioning support, so currently we can
2536 # not hardcode correct soname into executable. Probably we can
2537 # add versioning support to collect2, so additional links can
2538 # be useful in future.
2539 if test "$aix_use_runtimelinking" = yes; then
2540 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2541 # instead of lib<name>.a to let people know that these are not
2542 # typical AIX shared libraries.
2543 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2545 # We preserve .a as extension for shared libraries through AIX4.2
2546 # and later when we are not doing run time linking.
2547 library_names_spec='${libname}${release}.a $libname.a'
2548 soname_spec='${libname}${release}.so$major'
2550 shlibpath_var=LIBPATH
2555 library_names_spec='$libname.ixlibrary $libname.a'
2556 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2557 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'
2561 library_names_spec='${libname}.so'
2562 dynamic_linker="$host_os ld.so"
2563 shlibpath_var=LIBRARY_PATH
2569 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2570 soname_spec='${libname}${release}.so$major'
2571 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2572 shlibpath_var=LD_LIBRARY_PATH
2573 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2574 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2575 export_dynamic_flag_spec=-rdynamic
2576 # the default ld.so.conf also contains /usr/contrib/lib and
2577 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2578 # libtool to hard-code these into programs
2581 cygwin* | mingw* | pw32*)
2582 version_type=windows
2585 case $GCC,$host_os in
2587 library_names_spec='$libname.dll.a'
2588 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2589 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2590 dldir=$destdir/`dirname \$dlpath`~
2591 test -d \$dldir || mkdir -p \$dldir~
2592 $install_prog .libs/$dlname \$dldir/$dlname'
2593 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2594 dlpath=$dir/\$dldll~
2598 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2599 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2602 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2605 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2608 dynamic_linker='Win32 ld.exe'
2609 # FIXME: first we should search . and the directory the executable is in
2613 darwin* | rhapsody*)
2614 dynamic_linker="$host_os dyld"
2618 # FIXME: Relying on posixy $() will cause problems for
2619 # cross-compilation, but unfortunately the echo tests do not
2620 # yet detect zsh echo's removal of \ escapes.
2621 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)'
2622 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2623 shlibpath_overrides_runpath=yes
2624 shlibpath_var=DYLD_LIBRARY_PATH
2632 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2633 version_type=freebsd-$objformat
2634 case $version_type in
2636 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2641 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2645 shlibpath_var=LD_LIBRARY_PATH
2648 shlibpath_overrides_runpath=yes
2651 shlibpath_overrides_runpath=no
2652 hardcode_into_libs=yes
2661 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2662 soname_spec='${libname}${release}.so$major'
2663 shlibpath_var=LD_LIBRARY_PATH
2664 hardcode_into_libs=yes
2667 hpux9* | hpux10* | hpux11*)
2668 # Give a soname corresponding to the major version so that dld.sl refuses to
2669 # link against other versions.
2670 dynamic_linker="$host_os dld.sl"
2674 shlibpath_var=SHLIB_PATH
2675 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2676 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2677 soname_spec='${libname}${release}.sl$major'
2678 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2679 postinstall_cmds='chmod 555 $lib'
2682 irix5* | irix6* | nonstopux*)
2684 nonstopux*) version_type=nonstopux ;;
2685 *) version_type=irix ;;
2689 soname_spec='${libname}${release}.so$major'
2690 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2692 irix5* | nonstopux*)
2696 case $LD in # libtool.m4 will add one of these switches to LD
2697 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2698 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2699 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2700 *) libsuff= shlibsuff= libmagic=never-match;;
2704 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2705 shlibpath_overrides_runpath=no
2706 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2707 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2710 # No shared lib support for Linux oldld, aout, or coff.
2711 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2715 # This must be Linux ELF.
2720 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2721 soname_spec='${libname}${release}.so$major'
2722 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2723 shlibpath_var=LD_LIBRARY_PATH
2724 shlibpath_overrides_runpath=no
2725 # This implies no fast_install, which is unacceptable.
2726 # Some rework will be needed to allow for fast_install
2727 # before this can be enabled.
2728 hardcode_into_libs=yes
2730 # We used to test for /lib/ld.so.1 and disable shared libraries on
2731 # powerpc, because MkLinux only supported shared libraries with the
2732 # GNU dynamic linker. Since this was broken with cross compilers,
2733 # most powerpc-linux boxes support dynamic linking these days and
2734 # people can always --disable-shared, the test was removed, and we
2735 # assume the GNU/Linux dynamic linker is in use.
2736 dynamic_linker='GNU/Linux ld.so'
2743 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2744 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2745 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2746 dynamic_linker='NetBSD (a.out) ld.so'
2748 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2749 soname_spec='${libname}${release}.so$major'
2750 dynamic_linker='NetBSD ld.elf_so'
2752 shlibpath_var=LD_LIBRARY_PATH
2753 shlibpath_overrides_runpath=yes
2754 hardcode_into_libs=yes
2759 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2760 shlibpath_var=LD_LIBRARY_PATH
2761 shlibpath_overrides_runpath=yes
2768 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2770 openbsd2.[[89]] | openbsd2.[[89]].*)
2771 shlibpath_overrides_runpath=no
2774 shlibpath_overrides_runpath=yes
2778 shlibpath_overrides_runpath=yes
2780 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2781 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2782 shlibpath_var=LD_LIBRARY_PATH
2786 libname_spec='$name'
2788 library_names_spec='$libname.dll $libname.a'
2789 dynamic_linker='OS/2 ld.exe'
2790 shlibpath_var=LIBPATH
2793 osf3* | osf4* | osf5*)
2797 soname_spec='${libname}${release}.so'
2798 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2799 shlibpath_var=LD_LIBRARY_PATH
2800 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2801 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2806 soname_spec='${libname}${release}.so$major'
2807 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2808 shlibpath_var=LD_LIBRARY_PATH
2815 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2816 soname_spec='${libname}${release}.so$major'
2817 shlibpath_var=LD_LIBRARY_PATH
2818 shlibpath_overrides_runpath=yes
2819 hardcode_into_libs=yes
2820 # ldd complains unless libraries are executable
2821 postinstall_cmds='chmod +x $lib'
2826 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2827 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2828 shlibpath_var=LD_LIBRARY_PATH
2829 shlibpath_overrides_runpath=yes
2830 if test "$with_gnu_ld" = yes; then
2836 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2838 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2839 soname_spec='${libname}${release}.so$major'
2840 shlibpath_var=LD_LIBRARY_PATH
2841 case $host_vendor in
2843 shlibpath_overrides_runpath=no
2848 shlibpath_overrides_runpath=no
2849 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2856 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2857 soname_spec='${libname}${release}.so$major'
2858 shlibpath_var=LD_LIBRARY_PATH
2865 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2866 soname_spec='${libname}${release}.so$major'
2867 shlibpath_var=LD_LIBRARY_PATH
2871 if test -d /usr/nec ;then
2873 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2874 soname_spec='$libname.so.$major'
2875 shlibpath_var=LD_LIBRARY_PATH
2883 AC_MSG_RESULT([$dynamic_linker])
2884 test "$dynamic_linker" = no && can_build_shared=no
2886 # Report the final consequences.
2887 AC_MSG_CHECKING([if libtool supports shared libraries])
2888 AC_MSG_RESULT([$can_build_shared])
2890 AC_MSG_CHECKING([whether to build shared libraries])
2891 test "$can_build_shared" = "no" && enable_shared=no
2893 # On AIX, shared libraries and static libraries use the same namespace, and
2894 # are all built from PIC.
2897 test "$enable_shared" = yes && enable_static=no
2898 if test -n "$RANLIB"; then
2899 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2900 postinstall_cmds='$RANLIB $lib'
2905 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2906 test "$enable_shared" = yes && enable_static=no
2910 AC_MSG_RESULT([$enable_shared])
2912 AC_MSG_CHECKING([whether to build static libraries])
2913 # Make sure either enable_shared or enable_static is yes.
2914 test "$enable_shared" = yes || enable_static=yes
2915 AC_MSG_RESULT([$enable_static])
2917 if test "$hardcode_action" = relink; then
2918 # Fast installation is not supported
2919 enable_fast_install=no
2920 elif test "$shlibpath_overrides_runpath" = yes ||
2921 test "$enable_shared" = no; then
2922 # Fast installation is not necessary
2923 enable_fast_install=needless
2926 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2927 if test "$GCC" = yes; then
2928 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2931 AC_LIBTOOL_DLOPEN_SELF
2933 if test "$enable_shared" = yes && test "$GCC" = yes; then
2934 case $archive_cmds in
2936 # FIXME: we may have to deal with multi-command sequences.
2939 # Test whether the compiler implicitly links with -lc since on some
2940 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2941 # to ld, don't add -lc before -lgcc.
2942 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2943 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2945 echo 'static int dummy;' > conftest.$ac_ext
2947 if AC_TRY_EVAL(ac_compile); then
2950 libobjs=conftest.$ac_objext
2952 wl=$lt_cv_prog_cc_wl
2958 save_allow_undefined_flag=$allow_undefined_flag
2959 allow_undefined_flag=
2960 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2962 lt_cv_archive_cmds_need_lc=no
2964 lt_cv_archive_cmds_need_lc=yes
2966 allow_undefined_flag=$save_allow_undefined_flag
2968 cat conftest.err 1>&5
2970 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2974 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2976 # The second clause should only fire when bootstrapping the
2977 # libtool distribution, otherwise you forgot to ship ltmain.sh
2978 # with your package, and you will get complaints that there are
2979 # no rules to generate ltmain.sh.
2980 if test -f "$ltmain"; then
2983 # If there is no Makefile yet, we rely on a make rule to execute
2984 # `config.status --recheck' to rerun these tests and create the
2985 # libtool script then.
2986 test -f Makefile && make "$ltmain"
2989 if test -f "$ltmain"; then
2990 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2993 echo creating $ofile
2995 # Now quote all the things that may contain metacharacters while being
2996 # careful not to overquote the AC_SUBSTed values. We take copies of the
2997 # variables and quote the copies for generation of the libtool script.
2998 for var in echo old_CC old_CFLAGS \
2999 AR AR_FLAGS CC LD LN_S NM SHELL \
3000 reload_flag reload_cmds wl \
3001 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
3002 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
3003 library_names_spec soname_spec \
3004 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
3005 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
3006 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
3007 old_striplib striplib file_magic_cmd export_symbols_cmds \
3008 deplibs_check_method allow_undefined_flag no_undefined_flag \
3009 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
3010 global_symbol_to_c_name_address \
3011 hardcode_libdir_flag_spec hardcode_libdir_separator \
3012 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
3013 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
3016 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
3017 old_postinstall_cmds | old_postuninstall_cmds | \
3018 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
3019 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
3020 postinstall_cmds | postuninstall_cmds | \
3021 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
3022 # Double-quote double-evaled strings.
3023 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
3026 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
3031 cat <<__EOF__ > "${ofile}T"
3034 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
3035 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
3036 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
3038 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
3039 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
3041 # This program is free software; you can redistribute it and/or modify
3042 # it under the terms of the GNU General Public License as published by
3043 # the Free Software Foundation; either version 2 of the License, or
3044 # (at your option) any later version.
3046 # This program is distributed in the hope that it will be useful, but
3047 # WITHOUT ANY WARRANTY; without even the implied warranty of
3048 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3049 # General Public License for more details.
3051 # You should have received a copy of the GNU General Public License
3052 # along with this program; if not, write to the Free Software
3053 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3055 # As a special exception to the GNU General Public License, if you
3056 # distribute this file as part of a program that contains a
3057 # configuration script generated by Autoconf, you may include it under
3058 # the same distribution terms that you use for the rest of that program.
3060 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
3061 Xsed="sed -e s/^X//"
3063 # The HP-UX ksh and POSIX shell print the target directory to stdout
3065 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
3067 # ### BEGIN LIBTOOL CONFIG
3069 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
3071 # Shell to use when invoking shell scripts.
3074 # Whether or not to build shared libraries.
3075 build_libtool_libs=$enable_shared
3077 # Whether or not to build static libraries.
3078 build_old_libs=$enable_static
3080 # Whether or not to add -lc for building shared libraries.
3081 build_libtool_need_lc=$need_lc
3083 # Whether or not to optimize for fast installation.
3084 fast_install=$enable_fast_install
3087 host_alias=$host_alias
3090 # An echo program that does not interpret backslashes.
3095 AR_FLAGS=$lt_AR_FLAGS
3097 # The default C compiler.
3100 # Is the compiler the GNU C compiler?
3103 # The linker used to build libraries.
3106 # Whether we need hard or soft links.
3109 # A BSD-compatible nm program.
3112 # A symbol stripping program
3115 # Used to examine libraries when file_magic_cmd begins "file"
3116 MAGIC_CMD=$MAGIC_CMD
3118 # Used on cygwin: DLL creation program.
3121 # Used on cygwin: object dumper.
3124 # Used on cygwin: assembler.
3127 # The name of the directory that contains temporary libtool files.
3130 # How to create reloadable object files.
3131 reload_flag=$lt_reload_flag
3132 reload_cmds=$lt_reload_cmds
3134 # How to pass a linker flag through the compiler.
3137 # Object file suffix (normally "o").
3140 # Old archive suffix (normally "a").
3143 # Executable file suffix (normally "").
3146 # Additional compiler flags for building library objects.
3147 pic_flag=$lt_pic_flag
3150 # Does compiler simultaneously support -c and -o options?
3151 compiler_c_o=$lt_compiler_c_o
3153 # Can we write directly to a .lo ?
3154 compiler_o_lo=$lt_compiler_o_lo
3156 # Must we lock files when doing compilation ?
3157 need_locks=$lt_need_locks
3159 # Do we need the lib prefix for modules?
3160 need_lib_prefix=$need_lib_prefix
3162 # Do we need a version for libraries?
3163 need_version=$need_version
3165 # Whether dlopen is supported.
3166 dlopen_support=$enable_dlopen
3168 # Whether dlopen of programs is supported.
3169 dlopen_self=$enable_dlopen_self
3171 # Whether dlopen of statically linked programs is supported.
3172 dlopen_self_static=$enable_dlopen_self_static
3174 # Compiler flag to prevent dynamic linking.
3175 link_static_flag=$lt_link_static_flag
3177 # Compiler flag to turn off builtin functions.
3178 no_builtin_flag=$lt_no_builtin_flag
3180 # Compiler flag to allow reflexive dlopens.
3181 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3183 # Compiler flag to generate shared objects directly from archives.
3184 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3186 # Compiler flag to generate thread-safe objects.
3187 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3189 # Library versioning type.
3190 version_type=$version_type
3192 # Format of library name prefix.
3193 libname_spec=$lt_libname_spec
3195 # List of archive names. First name is the real one, the rest are links.
3196 # The last name is the one that the linker finds with -lNAME.
3197 library_names_spec=$lt_library_names_spec
3199 # The coded name of the library, if different from the real name.
3200 soname_spec=$lt_soname_spec
3202 # Commands used to build and install an old-style archive.
3204 old_archive_cmds=$lt_old_archive_cmds
3205 old_postinstall_cmds=$lt_old_postinstall_cmds
3206 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3208 # Create an old-style archive from a shared archive.
3209 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3211 # Create a temporary old-style archive to link instead of a shared archive.
3212 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3214 # Commands used to build and install a shared archive.
3215 archive_cmds=$lt_archive_cmds
3216 archive_expsym_cmds=$lt_archive_expsym_cmds
3217 postinstall_cmds=$lt_postinstall_cmds
3218 postuninstall_cmds=$lt_postuninstall_cmds
3220 # Commands to strip libraries.
3221 old_striplib=$lt_old_striplib
3222 striplib=$lt_striplib
3224 # Method to check whether dependent libraries are shared objects.
3225 deplibs_check_method=$lt_deplibs_check_method
3227 # Command to use when deplibs_check_method == file_magic.
3228 file_magic_cmd=$lt_file_magic_cmd
3230 # Flag that allows shared libraries with undefined symbols to be built.
3231 allow_undefined_flag=$lt_allow_undefined_flag
3233 # Flag that forces no undefined symbols.
3234 no_undefined_flag=$lt_no_undefined_flag
3236 # Commands used to finish a libtool library installation in a directory.
3237 finish_cmds=$lt_finish_cmds
3239 # Same as above, but a single script fragment to be evaled but not shown.
3240 finish_eval=$lt_finish_eval
3242 # Take the output of nm and produce a listing of raw symbols and C names.
3243 global_symbol_pipe=$lt_global_symbol_pipe
3245 # Transform the output of nm in a proper C declaration
3246 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3248 # Transform the output of nm in a C name address pair
3249 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3251 # This is the shared library runtime path variable.
3252 runpath_var=$runpath_var
3254 # This is the shared library path variable.
3255 shlibpath_var=$shlibpath_var
3257 # Is shlibpath searched before the hard-coded library search path?
3258 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3260 # How to hardcode a shared library path into an executable.
3261 hardcode_action=$hardcode_action
3263 # Whether we should hardcode library paths into libraries.
3264 hardcode_into_libs=$hardcode_into_libs
3266 # Flag to hardcode \$libdir into a binary during linking.
3267 # This must work even if \$libdir does not exist.
3268 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3270 # Whether we need a single -rpath flag with a separated argument.
3271 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3273 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3275 hardcode_direct=$hardcode_direct
3277 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3279 hardcode_minus_L=$hardcode_minus_L
3281 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3282 # the resulting binary.
3283 hardcode_shlibpath_var=$hardcode_shlibpath_var
3285 # Variables whose values should be saved in libtool wrapper scripts and
3286 # restored at relink time.
3287 variables_saved_for_relink="$variables_saved_for_relink"
3289 # Whether libtool must link a program against all its dependency libraries.
3290 link_all_deplibs=$link_all_deplibs
3292 # Compile-time system search path for libraries
3293 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3295 # Run-time system search path for libraries
3296 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3298 # Fix the shell variable \$srcfile for the compiler.
3299 fix_srcfile_path="$fix_srcfile_path"
3301 # Set to yes if exported symbols are required.
3302 always_export_symbols=$always_export_symbols
3304 # The commands to list exported symbols.
3305 export_symbols_cmds=$lt_export_symbols_cmds
3307 # The commands to extract the exported symbol list from a shared archive.
3308 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3310 # Symbols that should not be listed in the preloaded symbols.
3311 exclude_expsyms=$lt_exclude_expsyms
3313 # Symbols that must always be exported.
3314 include_expsyms=$lt_include_expsyms
3316 # ### END LIBTOOL CONFIG
3322 cat <<\EOF >> "${ofile}T"
3324 # AIX sometimes has problems with the GCC collect2 program. For some
3325 # reason, if we set the COLLECT_NAMES environment variable, the problems
3326 # vanish in a puff of smoke.
3327 if test "X${COLLECT_NAMES+set}" != Xset; then
3329 export COLLECT_NAMES
3336 cygwin* | mingw* | pw32* | os2*)
3337 cat <<'EOF' >> "${ofile}T"
3338 # This is a source program that is used to create dlls on Windows
3339 # Don't remove nor modify the starting and closing comments
3340 # /* ltdll.c starts here */
3341 # #define WIN32_LEAN_AND_MEAN
3342 # #include <windows.h>
3343 # #undef WIN32_LEAN_AND_MEAN
3344 # #include <stdio.h>
3346 # #ifndef __CYGWIN__
3347 # # ifdef __CYGWIN32__
3348 # # define __CYGWIN__ __CYGWIN32__
3352 # #ifdef __cplusplus
3355 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3356 # #ifdef __cplusplus
3361 # #include <cygwin/cygwin_dll.h>
3362 # DECLARE_CYGWIN_DLL( DllMain );
3364 # HINSTANCE __hDllInstance_base;
3367 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3369 # __hDllInstance_base = hInst;
3372 # /* ltdll.c ends here */
3373 # This is a source program that is used to create import libraries
3374 # on Windows for dlls which lack them. Don't remove nor modify the
3375 # starting and closing comments
3376 # /* impgen.c starts here */
3377 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3379 # This file is part of GNU libtool.
3381 # This program is free software; you can redistribute it and/or modify
3382 # it under the terms of the GNU General Public License as published by
3383 # the Free Software Foundation; either version 2 of the License, or
3384 # (at your option) any later version.
3386 # This program is distributed in the hope that it will be useful,
3387 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3388 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3389 # GNU General Public License for more details.
3391 # You should have received a copy of the GNU General Public License
3392 # along with this program; if not, write to the Free Software
3393 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3396 # #include <stdio.h> /* for printf() */
3397 # #include <unistd.h> /* for open(), lseek(), read() */
3398 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3399 # #include <string.h> /* for strdup() */
3401 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3403 # #define O_BINARY 0
3406 # static unsigned int
3407 # pe_get16 (fd, offset)
3411 # unsigned char b[2];
3412 # lseek (fd, offset, SEEK_SET);
3414 # return b[0] + (b[1]<<8);
3417 # static unsigned int
3418 # pe_get32 (fd, offset)
3422 # unsigned char b[4];
3423 # lseek (fd, offset, SEEK_SET);
3425 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3428 # static unsigned int
3432 # unsigned char *b = ptr;
3433 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3442 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3443 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3444 # unsigned long name_rvas, nexp;
3445 # unsigned char *expdata, *erva;
3446 # char *filename, *dll_name;
3448 # filename = argv[1];
3450 # dll = open(filename, O_RDONLY|O_BINARY);
3454 # dll_name = filename;
3456 # for (i=0; filename[i]; i++)
3457 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3458 # dll_name = filename + i +1;
3460 # pe_header_offset = pe_get32 (dll, 0x3c);
3461 # opthdr_ofs = pe_header_offset + 4 + 20;
3462 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3464 # if (num_entries < 1) /* no exports */
3467 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3468 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3469 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3470 # secptr = (pe_header_offset + 4 + 20 +
3471 # pe_get16 (dll, pe_header_offset + 4 + 16));
3474 # for (i = 0; i < nsections; i++)
3477 # unsigned long secptr1 = secptr + 40 * i;
3478 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3479 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3480 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3481 # lseek(dll, secptr1, SEEK_SET);
3482 # read(dll, sname, 8);
3483 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3485 # expptr = fptr + (export_rva - vaddr);
3486 # if (export_rva + export_size > vaddr + vsize)
3487 # export_size = vsize - (export_rva - vaddr);
3492 # expdata = (unsigned char*)malloc(export_size);
3493 # lseek (dll, expptr, SEEK_SET);
3494 # read (dll, expdata, export_size);
3495 # erva = expdata - export_rva;
3497 # nexp = pe_as32 (expdata+24);
3498 # name_rvas = pe_as32 (expdata+32);
3500 # printf ("EXPORTS\n");
3501 # for (i = 0; i<nexp; i++)
3503 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3504 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3509 # /* impgen.c ends here */
3515 # We use sed instead of cat because bash on DJGPP gets confused if
3516 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3517 # text mode, it properly converts lines to CR/LF. This bash problem
3518 # is reportedly fixed, but why not run on old versions too?
3519 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3521 mv -f "${ofile}T" "$ofile" || \
3522 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3526 ])# _LT_AC_LTCONFIG_HACK
3528 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3529 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3531 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3532 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3534 # AC_ENABLE_SHARED - implement the --enable-shared flag
3535 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3536 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3538 AC_DEFUN([AC_ENABLE_SHARED],
3539 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3540 AC_ARG_ENABLE(shared,
3541 changequote(<<, >>)dnl
3542 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3543 changequote([, ])dnl
3544 [p=${PACKAGE-default}
3546 yes) enable_shared=yes ;;
3547 no) enable_shared=no ;;
3550 # Look at the argument we got. We use all the common list separators.
3551 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3552 for pkg in $enableval; do
3553 if test "X$pkg" = "X$p"; then
3560 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3563 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3564 AC_DEFUN([AC_DISABLE_SHARED],
3565 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3566 AC_ENABLE_SHARED(no)])
3568 # AC_ENABLE_STATIC - implement the --enable-static flag
3569 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3570 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3572 AC_DEFUN([AC_ENABLE_STATIC],
3573 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3574 AC_ARG_ENABLE(static,
3575 changequote(<<, >>)dnl
3576 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3577 changequote([, ])dnl
3578 [p=${PACKAGE-default}
3580 yes) enable_static=yes ;;
3581 no) enable_static=no ;;
3584 # Look at the argument we got. We use all the common list separators.
3585 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3586 for pkg in $enableval; do
3587 if test "X$pkg" = "X$p"; then
3594 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3597 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3598 AC_DEFUN([AC_DISABLE_STATIC],
3599 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3600 AC_ENABLE_STATIC(no)])
3603 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3604 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3605 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3607 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3608 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3609 AC_ARG_ENABLE(fast-install,
3610 changequote(<<, >>)dnl
3611 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3612 changequote([, ])dnl
3613 [p=${PACKAGE-default}
3615 yes) enable_fast_install=yes ;;
3616 no) enable_fast_install=no ;;
3618 enable_fast_install=no
3619 # Look at the argument we got. We use all the common list separators.
3620 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3621 for pkg in $enableval; do
3622 if test "X$pkg" = "X$p"; then
3623 enable_fast_install=yes
3629 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3632 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3633 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3634 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3635 AC_ENABLE_FAST_INSTALL(no)])
3637 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3638 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3639 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3641 AC_DEFUN([AC_LIBTOOL_PICMODE],
3642 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3643 pic_mode=ifelse($#,1,$1,default)])
3646 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3647 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3648 [AC_MSG_CHECKING([for $1])
3649 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3652 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3655 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3658 ac_save_MAGIC_CMD="$MAGIC_CMD"
3659 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3660 dnl $ac_dummy forces splitting on constant user-supplied paths.
3661 dnl POSIX.2 word splitting is done only on the output of word expansions,
3662 dnl not every word. This closes a longstanding sh security hole.
3663 ac_dummy="ifelse([$2], , $PATH, [$2])"
3664 for ac_dir in $ac_dummy; do
3665 test -z "$ac_dir" && ac_dir=.
3666 if test -f $ac_dir/$1; then
3667 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3668 if test -n "$file_magic_test_file"; then
3669 case $deplibs_check_method in
3671 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3672 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3673 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3674 egrep "$file_magic_regex" > /dev/null; then
3679 *** Warning: the command libtool uses to detect shared libraries,
3680 *** $file_magic_cmd, produces output that libtool cannot recognize.
3681 *** The result is that libtool may fail to recognize shared libraries
3682 *** as such. This will affect the creation of libtool libraries that
3683 *** depend on shared libraries, but programs linked with such libtool
3684 *** libraries will work regardless of this problem. Nevertheless, you
3685 *** may want to report the problem to your system manager and/or to
3686 *** bug-libtool@gnu.org
3696 MAGIC_CMD="$ac_save_MAGIC_CMD"
3699 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3700 if test -n "$MAGIC_CMD"; then
3701 AC_MSG_RESULT($MAGIC_CMD)
3708 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3709 AC_DEFUN([AC_PATH_MAGIC],
3710 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3711 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3712 if test -z "$lt_cv_path_MAGIC_CMD"; then
3713 if test -n "$ac_tool_prefix"; then
3714 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3722 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3723 AC_DEFUN([AC_PROG_LD],
3724 [AC_ARG_WITH(gnu-ld,
3725 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3726 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3727 AC_REQUIRE([AC_PROG_CC])dnl
3728 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3729 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3730 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3732 if test "$GCC" = yes; then
3733 # Check if gcc -print-prog-name=ld gives a path.
3734 AC_MSG_CHECKING([for ld used by GCC])
3737 # gcc leaves a trailing carriage return which upsets mingw
3738 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3740 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3743 # Accept absolute paths.
3744 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3745 re_direlt='/[[^/]][[^/]]*/\.\./'
3746 # Canonicalize the path of ld
3747 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3748 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3749 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3751 test -z "$LD" && LD="$ac_prog"
3754 # If it fails, then pretend we aren't using GCC.
3758 # If it is relative, then search for the first ld in PATH.
3762 elif test "$with_gnu_ld" = yes; then
3763 AC_MSG_CHECKING([for GNU ld])
3765 AC_MSG_CHECKING([for non-GNU ld])
3767 AC_CACHE_VAL(lt_cv_path_LD,
3768 [if test -z "$LD"; then
3769 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3770 for ac_dir in $PATH; do
3771 test -z "$ac_dir" && ac_dir=.
3772 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3773 lt_cv_path_LD="$ac_dir/$ac_prog"
3774 # Check to see if the program is GNU ld. I'd rather use --version,
3775 # but apparently some GNU ld's only accept -v.
3776 # Break only if it was the GNU/non-GNU ld that we prefer.
3777 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3778 test "$with_gnu_ld" != no && break
3780 test "$with_gnu_ld" != yes && break
3786 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3789 if test -n "$LD"; then
3794 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3799 AC_DEFUN([AC_PROG_LD_GNU],
3800 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3801 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3802 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3803 lt_cv_prog_gnu_ld=yes
3805 lt_cv_prog_gnu_ld=no
3807 with_gnu_ld=$lt_cv_prog_gnu_ld
3810 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3811 # -- PORTME Some linkers may need a different reload flag.
3812 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3813 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3814 [lt_cv_ld_reload_flag='-r'])
3815 reload_flag=$lt_cv_ld_reload_flag
3816 test -n "$reload_flag" && reload_flag=" $reload_flag"
3819 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3820 # -- PORTME fill in with the dynamic library characteristics
3821 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3822 [AC_CACHE_CHECK([how to recognise dependant libraries],
3823 lt_cv_deplibs_check_method,
3824 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3825 lt_cv_file_magic_test_file=
3826 lt_cv_deplibs_check_method='unknown'
3827 # Need to set the preceding variable on all platforms that support
3828 # interlibrary dependencies.
3829 # 'none' -- dependencies not supported.
3830 # `unknown' -- same as none, but documents that we really don't know.
3831 # 'pass_all' -- all dependencies passed with no checks.
3832 # 'test_compile' -- check by making test program.
3833 # 'file_magic [[regex]]' -- check by looking for files in library path
3834 # which responds to the $file_magic_cmd with a given egrep regex.
3835 # If you have `file' or equivalent on your system and you're not sure
3836 # whether `pass_all' will *always* work, you probably want this one.
3840 lt_cv_deplibs_check_method=pass_all
3844 lt_cv_deplibs_check_method=pass_all
3848 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3849 lt_cv_file_magic_cmd='/usr/bin/file -L'
3850 lt_cv_file_magic_test_file=/shlib/libc.so
3853 cygwin* | mingw* | pw32*)
3854 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3855 lt_cv_file_magic_cmd='$OBJDUMP -f'
3858 darwin* | rhapsody*)
3859 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3860 lt_cv_file_magic_cmd='/usr/bin/file -L'
3862 rhapsody* | darwin1.[[012]])
3863 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3866 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3872 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3875 # Not sure whether the presence of OpenBSD here was a mistake.
3876 # Let's accept both of them until this is cleared up.
3877 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3878 lt_cv_file_magic_cmd=/usr/bin/file
3879 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3883 lt_cv_deplibs_check_method=pass_all
3888 lt_cv_deplibs_check_method=pass_all
3892 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3893 lt_cv_file_magic_cmd=/usr/bin/file
3894 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3897 irix5* | irix6* | nonstopux*)
3899 irix5* | nonstopux*)
3900 # this will be overridden with pass_all, but let us keep it just in case
3901 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3905 *-32|*"-32 ") libmagic=32-bit;;
3906 *-n32|*"-n32 ") libmagic=N32;;
3907 *-64|*"-64 ") libmagic=64-bit;;
3908 *) libmagic=never-match;;
3910 # this will be overridden with pass_all, but let us keep it just in case
3911 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3914 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3915 lt_cv_deplibs_check_method=pass_all
3918 # This must be Linux ELF.
3920 lt_cv_deplibs_check_method=pass_all
3921 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3925 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3926 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3928 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3933 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3934 lt_cv_file_magic_cmd=/usr/bin/file
3935 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3939 lt_cv_file_magic_cmd=/usr/bin/file
3940 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3941 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3942 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3944 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3948 osf3* | osf4* | osf5*)
3949 # this will be overridden with pass_all, but let us keep it just in case
3950 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3951 lt_cv_file_magic_test_file=/shlib/libc.so
3952 lt_cv_deplibs_check_method=pass_all
3956 lt_cv_deplibs_check_method=pass_all
3960 lt_cv_deplibs_check_method=pass_all
3961 lt_cv_file_magic_test_file=/lib/libc.so
3964 sysv5uw[[78]]* | sysv4*uw2*)
3965 lt_cv_deplibs_check_method=pass_all
3968 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3969 case $host_vendor in
3971 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]]'
3972 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3975 lt_cv_deplibs_check_method=pass_all
3978 lt_cv_file_magic_cmd='/bin/file'
3979 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3982 lt_cv_file_magic_cmd='/bin/file'
3983 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3984 lt_cv_file_magic_test_file=/lib/libc.so
3990 file_magic_cmd=$lt_cv_file_magic_cmd
3991 deplibs_check_method=$lt_cv_deplibs_check_method
3995 # AC_PROG_NM - find the path to a BSD-compatible name lister
3996 AC_DEFUN([AC_PROG_NM],
3997 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3998 AC_MSG_CHECKING([for BSD-compatible nm])
3999 AC_CACHE_VAL(lt_cv_path_NM,
4000 [if test -n "$NM"; then
4001 # Let the user override the test.
4004 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
4005 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
4006 test -z "$ac_dir" && ac_dir=.
4007 tmp_nm=$ac_dir/${ac_tool_prefix}nm
4008 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
4009 # Check to see if the nm accepts a BSD-compat flag.
4010 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
4011 # nm: unknown option "B" ignored
4012 # Tru64's nm complains that /dev/null is an invalid object file
4013 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
4014 lt_cv_path_NM="$tmp_nm -B"
4016 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
4017 lt_cv_path_NM="$tmp_nm -p"
4020 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
4021 continue # so that we can try to find one that supports BSD flags
4026 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
4029 AC_MSG_RESULT([$NM])
4032 # AC_CHECK_LIBM - check for math library
4033 AC_DEFUN([AC_CHECK_LIBM],
4034 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
4037 *-*-beos* | *-*-cygwin* | *-*-pw32*)
4038 # These system don't have libm
4041 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
4042 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
4045 AC_CHECK_LIB(m, main, LIBM="-lm")
4050 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
4051 # the libltdl convenience library and LTDLINCL to the include flags for
4052 # the libltdl header and adds --enable-ltdl-convenience to the
4053 # configure arguments. Note that LIBLTDL and LTDLINCL are not
4054 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
4055 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
4056 # with '${top_builddir}/' and LTDLINCL will be prefixed with
4057 # '${top_srcdir}/' (note the single quotes!). If your package is not
4058 # flat and you're not using automake, define top_builddir and
4059 # top_srcdir appropriately in the Makefiles.
4060 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
4061 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4062 case $enable_ltdl_convenience in
4063 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
4064 "") enable_ltdl_convenience=yes
4065 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
4067 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
4068 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4069 # For backwards non-gettext consistent compatibility...
4073 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
4074 # the libltdl installable library and LTDLINCL to the include flags for
4075 # the libltdl header and adds --enable-ltdl-install to the configure
4076 # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
4077 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
4078 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
4079 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
4080 # with '${top_srcdir}/' (note the single quotes!). If your package is
4081 # not flat and you're not using automake, define top_builddir and
4082 # top_srcdir appropriately in the Makefiles.
4083 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4084 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4085 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4086 AC_CHECK_LIB(ltdl, main,
4087 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4088 [if test x"$enable_ltdl_install" = xno; then
4089 AC_MSG_WARN([libltdl not installed, but installation disabled])
4091 enable_ltdl_install=yes
4094 if test x"$enable_ltdl_install" = x"yes"; then
4095 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4096 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4097 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4099 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4103 # For backwards non-gettext consistent compatibility...
4108 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4109 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4110 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4111 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4112 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4113 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4114 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4116 # This is just to silence aclocal about the macro not being used
4117 ifelse([AC_DISABLE_FAST_INSTALL])