1 dnl Macros to configure gpgme
3 dnl GNUPG_FIX_HDR_VERSION(FILE, NAME)
4 dnl Make the version number in gcrypt/gcrypt.h the same as the one here.
5 dnl (this is easier than to have a .in file just for one substitution)
6 dnl We must use a temp file in the current directory because make distcheck
7 dnl install all sourcefiles RO.
9 AC_DEFUN(GNUPG_FIX_HDR_VERSION,
10 [ sed "s/^#define $2 \".*/#define $2 \"$VERSION\"/" $srcdir/$1 > fixhdr.tmp
11 if cmp -s $srcdir/$1 fixhdr.tmp 2>/dev/null; then
15 if mv fixhdr.tmp $srcdir/$1 ; then
20 *** Failed to fix the version string macro $2 in $1.
21 *** The old file has been saved as fixhdr.tmp
24 AC_MSG_WARN([fixed the $2 macro in $1])
30 dnl ## GNU Pth - The GNU Portable Threads
31 dnl ## Copyright (c) 1999-2002 Ralf S. Engelschall <rse@engelschall.com>
33 dnl ## This file is part of GNU Pth, a non-preemptive thread scheduling
34 dnl ## library which can be found at http://www.gnu.org/software/pth/.
36 dnl ## This library is free software; you can redistribute it and/or
37 dnl ## modify it under the terms of the GNU Lesser General Public
38 dnl ## License as published by the Free Software Foundation; either
39 dnl ## version 2.1 of the License, or (at your option) any later version.
41 dnl ## This library is distributed in the hope that it will be useful,
42 dnl ## but WITHOUT ANY WARRANTY; without even the implied warranty of
43 dnl ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
44 dnl ## Lesser General Public License for more details.
46 dnl ## You should have received a copy of the GNU Lesser General Public
47 dnl ## License along with this library; if not, write to the Free Software
48 dnl ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
49 dnl ## USA, or contact Ralf S. Engelschall <rse@engelschall.com>.
51 dnl ## pth.m4: Autoconf macro for locating GNU Pth from within
52 dnl ## configure.in of third-party software packages
57 dnl ## AC_CHECK_PTH([MIN-VERSION [, # minimum Pth version, e.g. 1.2.0
58 dnl ## DEFAULT-WITH-PTH [, # default value for --with-pth option
59 dnl ## DEFAULT-WITH-PTH-TEST [,# default value for --with-pth-test option
60 dnl ## EXTEND-VARS [, # whether CFLAGS/LDFLAGS/etc are extended
61 dnl ## ACTION-IF-FOUND [, # action to perform if Pth was found
62 dnl ## ACTION-IF-NOT-FOUND # action to perform if Pth was not found
65 dnl ## AC_CHECK_PTH(1.2.0)
66 dnl ## AC_CHECK_PTH(1.2.0,,,no,CFLAGS="$CFLAGS -DHAVE_PTH $PTH_CFLAGS")
67 dnl ## AC_CHECK_PTH(1.2.0,yes,yes,yes,CFLAGS="$CFLAGS -DHAVE_PTH")
70 dnl # auxilliary macros
71 AC_DEFUN(_AC_PTH_ERROR, [dnl
72 AC_MSG_RESULT([*FAILED*])
73 dnl define(_ac_pth_line,dnl
74 dnl "+------------------------------------------------------------------------+")
75 dnl echo " _ac_pth_line" 1>&2
76 cat <<EOT | sed -e 's/^[[ ]]*/ | /' -e 's/>>/ /' 1>&2
79 dnl echo " _ac_pth_line" 1>&2
80 dnl undefine(_ac_pth_line)
83 AC_DEFUN(_AC_PTH_VERBOSE, [dnl
84 if test ".$verbose" = .yes; then
89 AC_DEFUN(AC_CHECK_PTH, [dnl
92 AC_REQUIRE([AC_PROG_CC])dnl
93 AC_REQUIRE([AC_PROG_CPP])dnl
99 AC_SUBST(PTH_CPPFLAGS)
101 AC_SUBST(PTH_LDFLAGS)
103 dnl # command line options
104 AC_MSG_CHECKING(for GNU Pth)
107 [ --with-pth[=ARG] Build with GNU Pth Library (default=]ifelse([$2],,yes,$2)[)],dnl
109 with_pth="ifelse([$2],,yes,$2)"
111 AC_ARG_WITH(pth-test,dnl
112 [ --with-pth-test Perform GNU Pth Sanity Test (default=]ifelse([$3],,yes,$3)[)],dnl
114 with_pth_test="ifelse([$3],,yes,$3)"
116 _AC_PTH_VERBOSE([+ Command Line Options:])
117 _AC_PTH_VERBOSE([ o --with-pth=$with_pth])
118 _AC_PTH_VERBOSE([ o --with-pth-test=$with_pth_test])
121 if test ".$with_pth" != .no; then
128 _pth_subdir_opts=`echo $with_pth | sed -e 's/^subdir:[^ ]*[ ]*//'`
129 with_pth=`echo $with_pth | sed -e 's/^subdir:\([^ ]*\).*$/\1/'`
140 if test ".$with_pth" = .yes; then
141 # via config script in $PATH
143 _pth_version=`(pth-config --version) 2>/dev/null |\
144 sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'`
146 if test ".$_pth_version" != .; then
147 _pth_location=`pth-config --prefix`
148 _pth_type='installed'
149 _pth_cppflags=`pth-config --cflags`
150 _pth_cflags=`pth-config --cflags`
151 _pth_ldflags=`pth-config --ldflags`
152 _pth_libs=`pth-config --libs`
154 elif test -d "$with_pth"; then
155 with_pth=`echo $with_pth | sed -e 's;/*$;;'`
157 # via locally included source tree
158 if test ".$_pth_subdir" = .yes; then
159 _pth_location="$with_pth"
161 _pth_cppflags="-I$with_pth"
162 _pth_cflags="-I$with_pth"
163 if test -f "$with_pth/ltconfig"; then
164 _pth_ldflags="-L$with_pth/.libs"
166 _pth_ldflags="-L$with_pth"
170 _pth_version=`grep '^const char PTH_Hello' $with_pth/pth_vers.c |\
171 sed -e 's;^.*Version[ ]*\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'`
174 ac_configure_args="$ac_configure_args --enable-subdir $_pth_subdir_opts"
177 # via config script under a specified directory
178 # (a standard installation, but not a source tree)
179 if test ".$_pth_found" = .no; then
180 for _dir in $with_pth/bin $with_pth; do
181 if test -f "$_dir/pth-config"; then
182 test -f "$_dir/pth-config.in" && continue # pth-config in source tree!
184 _pth_version=`($_dir/pth-config --version) 2>/dev/null |\
185 sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'`
187 if test ".$_pth_version" != .; then
188 _pth_location=`$_dir/pth-config --prefix`
189 _pth_type="installed"
190 _pth_cppflags=`$_dir/pth-config --cflags`
191 _pth_cflags=`$_dir/pth-config --cflags`
192 _pth_ldflags=`$_dir/pth-config --ldflags`
193 _pth_libs=`$_dir/pth-config --libs`
200 # in any subarea under a specified directory
201 # (either a special installation or a Pth source tree)
202 if test ".$_pth_found" = .no; then
205 for _file in x `find $with_pth -name "pth.h" -type f -print`; do
206 test .$_file = .x && continue
207 _dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
208 _pth_version=`($_dir/pth-config --version) 2>/dev/null |\
209 sed -e 's/^.*\([0-9]\.[0-9]*[ab.][0-9]*\).*$/\1/'`
210 if test ".$_pth_version" = .; then
211 _pth_version=`grep '^#define PTH_VERSION_STR' $_file |\
212 sed -e 's;^#define[ ]*PTH_VERSION_STR[ ]*"\([0-9]*\.[0-9]*[.ab][0-9]*\)[ ].*$;\1;'`
214 _pth_cppflags="-I$_dir"
215 _pth_cflags="-I$_dir"
216 _pth_found=`expr $_pth_found + 1`
218 for _file in x `find $with_pth -name "libpth.[aso]" -type f -print`; do
219 test .$_file = .x && continue
220 _dir=`echo $_file | sed -e 's;[^/]*$;;' -e 's;\(.\)/$;\1;'`
221 _pth_ldflags="-L$_dir"
223 _pth_found=`expr $_pth_found + 1`
226 if test ".$_pth_found" = .2; then
227 _pth_location="$with_pth"
228 _pth_type="uninstalled"
234 _AC_PTH_VERBOSE([+ Determined Location:])
235 _AC_PTH_VERBOSE([ o path: $_pth_location])
236 _AC_PTH_VERBOSE([ o type: $_pth_type])
237 if test ".$_pth_version" = .; then
240 dnl if test ".$with_pth" != .yes; then
241 dnl _AC_PTH_ERROR([dnl
242 dnl Unable to locate GNU Pth under $with_pth.
243 dnl Please specify the correct path to either a GNU Pth installation tree
244 dnl (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in
245 dnl the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a
246 dnl path to a pth-X.Y.Z/ directory; but make sure the package is already
247 dnl built, i.e., the "configure; make" step was already performed there).])
249 dnl _AC_PTH_ERROR([dnl
250 dnl Unable to locate GNU Pth in any system-wide location (see \$PATH).
251 dnl Please specify the correct path to either a GNU Pth installation tree
252 dnl (use --with-pth=DIR if you used --prefix=DIR for installing GNU Pth in
253 dnl the past) or to a GNU Pth source tree (use --with-pth=DIR if DIR is a
254 dnl path to a pth-X.Y.Z/ directory; but make sure the package is already
255 dnl built, i.e., the "configure; make" step was already performed there).])
259 dnl # Check whether the found version is sufficiently new
261 _req_version="ifelse([$1],,1.0.0,$1)"
262 for _var in _pth_version _req_version; do
263 eval "_val=\"\$${_var}\""
264 _major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'`
265 _minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'`
266 _rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'`
267 _micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'`
273 _hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \
274 "major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"`
275 eval "${_var}_hex=\"\$_hex\""
277 _AC_PTH_VERBOSE([+ Determined Versions:])
278 _AC_PTH_VERBOSE([ o existing: $_pth_version -> 0x$_pth_version_hex])
279 _AC_PTH_VERBOSE([ o required: $_req_version -> 0x$_req_version_hex])
281 if test ".$_pth_version_hex" != .; then
282 if test ".$_req_version_hex" != .; then
283 if test $_pth_version_hex -ge $_req_version_hex; then
288 if test ".$_ok" = .0; then
290 Found Pth version $_pth_version, but required at least version $_req_version.
291 Upgrade Pth under $_pth_location to $_req_version or higher first, please.])
294 dnl # Perform Pth Sanity Compile Check
296 if test ".$with_pth_test" = .yes; then
297 _ac_save_CPPFLAGS="$CPPFLAGS"
298 _ac_save_CFLAGS="$CFLAGS"
299 _ac_save_LDFLAGS="$LDFLAGS"
300 _ac_save_LIBS="$LIBS"
301 CPPFLAGS="$CPPFLAGS $_pth_cppflags"
302 CFLAGS="$CFLAGS $_pth_cflags"
303 LDFLAGS="$LDFLAGS $_pth_ldflags"
304 LIBS="$LIBS $_pth_libs"
305 _AC_PTH_VERBOSE([+ Test Build Environment:])
306 _AC_PTH_VERBOSE([ o CPPFLAGS=\"$CPPFLAGS\"])
307 _AC_PTH_VERBOSE([ o CFLAGS=\"$CFLAGS\"])
308 _AC_PTH_VERBOSE([ o LDFLAGS=\"$LDFLAGS\"])
309 _AC_PTH_VERBOSE([ o LIBS=\"$LIBS\"])
316 int main(int argc, char *argv[])
319 if (!(fp = fopen("conftestval", "w")))
325 if (!(fp = fopen("conftestval", "w")))
332 _AC_PTH_VERBOSE([+ Performing Sanity Checks:])
333 _AC_PTH_VERBOSE([ o pre-processor test])
334 AC_TRY_CPP(_code1, _ok=yes, _ok=no)
335 if test ".$_ok" != .yes; then
337 Found GNU Pth $_pth_version under $_pth_location, but
338 was unable to perform a sanity pre-processor check. This means
339 the GNU Pth header pth.h was not found.
340 We used the following build environment:
342 >> CPPFLAGS="$CPPFLAGS"
343 See config.log for possibly more details.])
345 _AC_PTH_VERBOSE([ o link check])
346 AC_TRY_LINK(_code1, _code2, _ok=yes, _ok=no)
347 if test ".$_ok" != .yes; then
349 Found GNU Pth $_pth_version under $_pth_location, but
350 was unable to perform a sanity linker check. This means
351 the GNU Pth library libpth.a was not found.
352 We used the following build environment:
355 >> LDFLAGS="$LDFLAGS"
357 See config.log for possibly more details.])
359 _AC_PTH_VERBOSE([ o run-time check])
360 AC_TRY_RUN(_code1 _code2, _ok=`cat conftestval`, _ok=no, _ok=no)
361 if test ".$_ok" != .yes; then
362 if test ".$_ok" = .no; then
364 Found GNU Pth $_pth_version under $_pth_location, but
365 was unable to perform a sanity execution check. This usually
366 means that the GNU Pth shared library libpth.so is present
367 but \$LD_LIBRARY_PATH is incomplete to execute a Pth test.
368 In this case either disable this test via --without-pth-test,
369 or extend \$LD_LIBRARY_PATH, or build GNU Pth as a static
370 library only via its --disable-shared Autoconf option.
371 We used the following build environment:
374 >> LDFLAGS="$LDFLAGS"
376 See config.log for possibly more details.])
379 Found GNU Pth $_pth_version under $_pth_location, but
380 was unable to perform a sanity run-time check. This usually
381 means that the GNU Pth library failed to work and possibly
382 caused a core dump in the test program. In this case it
383 is strongly recommended that you re-install GNU Pth and this
384 time make sure that it really passes its "make test" procedure.
385 We used the following build environment:
388 >> LDFLAGS="$LDFLAGS"
390 See config.log for possibly more details.])
393 _extendvars="ifelse([$4],,yes,$4)"
394 if test ".$_extendvars" != .yes; then
395 CPPFLAGS="$_ac_save_CPPFLAGS"
396 CFLAGS="$_ac_save_CFLAGS"
397 LDFLAGS="$_ac_save_LDFLAGS"
398 LIBS="$_ac_save_LIBS"
401 _extendvars="ifelse([$4],,yes,$4)"
402 if test ".$_extendvars" = .yes; then
403 if test ".$_pth_subdir" = .yes; then
404 CPPFLAGS="$CPPFLAGS $_pth_cppflags"
405 CFLAGS="$CFLAGS $_pth_cflags"
406 LDFLAGS="$LDFLAGS $_pth_ldflags"
407 LIBS="$LIBS $_pth_libs"
411 PTH_CPPFLAGS="$_pth_cppflags"
412 PTH_CFLAGS="$_pth_cflags"
413 PTH_LDFLAGS="$_pth_ldflags"
414 PTH_LIBS="$_pth_libs"
415 AC_SUBST(PTH_CPPFLAGS)
417 AC_SUBST(PTH_LDFLAGS)
419 _AC_PTH_VERBOSE([+ Final Results:])
420 _AC_PTH_VERBOSE([ o PTH_CPPFLAGS=\"$PTH_CPPFLAGS\"])
421 _AC_PTH_VERBOSE([ o PTH_CFLAGS=\"$PTH_CFLAGS\"])
422 _AC_PTH_VERBOSE([ o PTH_LDFLAGS=\"$PTH_LDFLAGS\"])
423 _AC_PTH_VERBOSE([ o PTH_LIBS=\"$PTH_LIBS\"])
426 if test ".$with_pth" != .no; then
427 AC_MSG_RESULT([version $_pth_version, $_pth_type under $_pth_location])
428 ifelse([$5], , :, [$5])
431 ifelse([$6], , :, [$6])
435 # libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
436 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
437 ## Free Software Foundation, Inc.
438 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
440 ## This program is free software; you can redistribute it and/or modify
441 ## it under the terms of the GNU General Public License as published by
442 ## the Free Software Foundation; either version 2 of the License, or
443 ## (at your option) any later version.
445 ## This program is distributed in the hope that it will be useful, but
446 ## WITHOUT ANY WARRANTY; without even the implied warranty of
447 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
448 ## General Public License for more details.
450 ## You should have received a copy of the GNU General Public License
451 ## along with this program; if not, write to the Free Software
452 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
454 ## As a special exception to the GNU General Public License, if you
455 ## distribute this file as part of a program that contains a
456 ## configuration script generated by Autoconf, you may include it under
457 ## the same distribution terms that you use for the rest of that program.
459 # serial 46 AC_PROG_LIBTOOL
461 AC_DEFUN([AC_PROG_LIBTOOL],
462 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
464 # This can be used to rebuild libtool when needed
465 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
467 # Always use our own libtool.
468 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
471 # Prevent multiple expansion
472 define([AC_PROG_LIBTOOL], [])
475 AC_DEFUN([AC_LIBTOOL_SETUP],
477 AC_REQUIRE([AC_ENABLE_SHARED])dnl
478 AC_REQUIRE([AC_ENABLE_STATIC])dnl
479 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
480 AC_REQUIRE([AC_CANONICAL_HOST])dnl
481 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
482 AC_REQUIRE([AC_PROG_CC])dnl
483 AC_REQUIRE([AC_PROG_LD])dnl
484 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
485 AC_REQUIRE([AC_PROG_NM])dnl
486 AC_REQUIRE([LT_AC_PROG_SED])dnl
488 AC_REQUIRE([AC_PROG_LN_S])dnl
489 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
490 AC_REQUIRE([AC_OBJEXT])dnl
491 AC_REQUIRE([AC_EXEEXT])dnl
494 _LT_AC_PROG_ECHO_BACKSLASH
495 # Only perform the check for file, if the check method requires it
496 case $deplibs_check_method in
498 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
504 AC_CHECK_TOOL(RANLIB, ranlib, :)
505 AC_CHECK_TOOL(STRIP, strip, :)
507 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
508 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
509 enable_win32_dll=yes, enable_win32_dll=no)
511 AC_ARG_ENABLE(libtool-lock,
512 [ --disable-libtool-lock avoid locking (might break parallel builds)])
513 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
515 # Some flags need to be propagated to the compiler or linker for good
519 # Find out which ABI we are using.
520 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
521 if AC_TRY_EVAL(ac_compile); then
522 case `/usr/bin/file conftest.$ac_objext` in
538 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
539 SAVE_CFLAGS="$CFLAGS"
540 CFLAGS="$CFLAGS -belf"
541 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
544 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
546 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
547 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
548 CFLAGS="$SAVE_CFLAGS"
552 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
553 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
554 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
555 AC_CHECK_TOOL(AS, as, false)
556 AC_CHECK_TOOL(OBJDUMP, objdump, false)
558 # recent cygwin and mingw systems supply a stub DllMain which the user
559 # can override, but on older systems we have to supply one
560 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
562 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
564 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
567 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
568 # old mingw systems require "-dll" to link a DLL, while more recent ones
570 SAVE_CFLAGS="$CFLAGS"
571 CFLAGS="$CFLAGS -mdll"
572 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
573 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
574 CFLAGS="$SAVE_CFLAGS" ;;
575 *-*-cygwin* | *-*-pw32*)
576 # cygwin systems need to pass --dll to the linker, and not link
577 # crt.o which will require a WinMain@16 definition.
578 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
588 # AC_LIBTOOL_HEADER_ASSERT
589 # ------------------------
590 AC_DEFUN([AC_LIBTOOL_HEADER_ASSERT],
591 [AC_CACHE_CHECK([whether $CC supports assert without backlinking],
592 [lt_cv_func_assert_works],
595 if test "$GCC" = yes && test "$with_gnu_ld" != yes; then
596 case `$CC --version 2>/dev/null` in
597 [[12]].*) lt_cv_func_assert_works=no ;;
598 *) lt_cv_func_assert_works=yes ;;
604 if test "x$lt_cv_func_assert_works" = xyes; then
605 AC_CHECK_HEADERS(assert.h)
607 ])# AC_LIBTOOL_HEADER_ASSERT
610 # --------------------
611 AC_DEFUN([_LT_AC_CHECK_DLFCN],
612 [AC_CHECK_HEADERS(dlfcn.h)
613 ])# _LT_AC_CHECK_DLFCN
615 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
616 # ---------------------------------
617 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
618 [AC_REQUIRE([AC_CANONICAL_HOST])
619 AC_REQUIRE([AC_PROG_NM])
620 AC_REQUIRE([AC_OBJEXT])
621 # Check for command to grab the raw symbol name followed by C symbol from nm.
622 AC_MSG_CHECKING([command to parse $NM output])
623 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
625 # These are sane defaults that work on at least a few old systems.
626 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
628 # Character class describing NM global symbol codes.
629 symcode='[[BCDEGRST]]'
631 # Regexp to match symbols that can be accessed directly from C.
632 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
634 # Transform the above into a raw symbol and a C symbol.
637 # Transform an extracted symbol line into a proper C declaration
638 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
640 # Transform an extracted symbol line into symbol name and symbol address
641 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'"
643 # Define system-specific variables.
648 cygwin* | mingw* | pw32*)
649 symcode='[[ABCDGISTW]]'
651 hpux*) # Its linker distinguishes data from code symbols
652 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
653 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'"
656 symcode='[[BCDEGRST]]'
666 # Handle CRLF in mingw tool chain
670 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
674 # If we're using GNU nm, then use its standard symbol codes.
675 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
676 symcode='[[ABCDGISTW]]'
679 # Try without a prefix undercore, then with it.
680 for ac_symprfx in "" "_"; do
682 # Write the raw and C identifiers.
683 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
685 # Check to see that the pipe works correctly.
688 cat > conftest.$ac_ext <<EOF
693 void nm_test_func(){}
697 int main(){nm_test_var='a';nm_test_func();return(0);}
700 if AC_TRY_EVAL(ac_compile); then
701 # Now try to grab the symbols.
703 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
704 # Try sorting and uniquifying the output.
705 if sort "$nlist" | uniq > "$nlist"T; then
706 mv -f "$nlist"T "$nlist"
711 # Make sure that we snagged all the symbols we need.
712 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
713 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
714 cat <<EOF > conftest.$ac_ext
720 # Now generate the symbol file.
721 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
723 cat <<EOF >> conftest.$ac_ext
724 #if defined (__STDC__) && __STDC__
725 # define lt_ptr void *
727 # define lt_ptr char *
731 /* The mapping between symbol names and symbols. */
736 lt_preloaded_symbols[[]] =
739 sed "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
740 cat <<\EOF >> conftest.$ac_ext
748 # Now try linking the two files.
749 mv conftest.$ac_objext conftstm.$ac_objext
751 save_CFLAGS="$CFLAGS"
752 LIBS="conftstm.$ac_objext"
753 CFLAGS="$CFLAGS$no_builtin_flag"
754 if AC_TRY_EVAL(ac_link) && test -s conftest; then
758 CFLAGS="$save_CFLAGS"
760 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
763 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
766 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
769 echo "$progname: failed program was:" >&AC_FD_CC
770 cat conftest.$ac_ext >&5
772 rm -f conftest* conftst*
774 # Do not use the global_symbol_pipe unless it works.
775 if test "$pipe_works" = yes; then
778 lt_cv_sys_global_symbol_pipe=
782 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
783 if test -z "$lt_cv_sys_global_symbol_pipe"; then
784 global_symbol_to_cdecl=
785 global_symbol_to_c_name_address=
787 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
788 global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
790 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
792 AC_MSG_RESULT(failed)
796 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
798 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
799 # ---------------------------------
800 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
801 [# Find the correct PATH separator. Usually this is `:', but
802 # DJGPP uses `;' like DOS.
803 if test "X${PATH_SEPARATOR+set}" != Xset; then
804 UNAME=${UNAME-`uname 2>/dev/null`}
806 *-DOS) lt_cv_sys_path_separator=';' ;;
807 *) lt_cv_sys_path_separator=':' ;;
809 PATH_SEPARATOR=$lt_cv_sys_path_separator
811 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
813 # _LT_AC_PROG_ECHO_BACKSLASH
814 # --------------------------
815 # Add some code to the start of the generated configure script which
816 # will find an echo command which doesn't interpret backslashes.
817 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
818 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
819 [AC_DIVERT_PUSH(NOTICE)])
820 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
822 # Check that we are running under the correct shell.
823 SHELL=${CONFIG_SHELL-/bin/sh}
827 # Remove one level of quotation (which was required for Make).
828 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
833 if test "X[$]1" = X--no-reexec; then
834 # Discard the --no-reexec flag, and continue.
836 elif test "X[$]1" = X--fallback-echo; then
837 # Avoid inline document here, it may be left over
839 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
840 # Yippee, $echo works!
843 # Restart under the correct shell.
844 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
847 if test "X[$]1" = X--fallback-echo; then
848 # used as fallback echo
856 # The HP-UX ksh and POSIX shell print the target directory to stdout
858 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
860 if test -z "$ECHO"; then
861 if test "X${echo_test_string+set}" != Xset; then
862 # find a string as large as possible, as long as the shell can cope with it
863 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
864 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
865 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
866 echo_test_string="`eval $cmd`" &&
867 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
874 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
875 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
876 test "X$echo_testing_string" = "X$echo_test_string"; then
879 # The Solaris, AIX, and Digital Unix default echo programs unquote
880 # backslashes. This makes it impossible to quote backslashes using
881 # echo "$something" | sed 's/\\/\\\\/g'
883 # So, first we look for a working echo in the user's PATH.
885 IFS="${IFS= }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
886 for dir in $PATH /usr/ucb; do
887 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
888 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
889 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
890 test "X$echo_testing_string" = "X$echo_test_string"; then
897 if test "X$echo" = Xecho; then
898 # We didn't find a better echo, so look for alternatives.
899 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
900 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
901 test "X$echo_testing_string" = "X$echo_test_string"; then
902 # This shell has a builtin print -r that does the trick.
904 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
905 test "X$CONFIG_SHELL" != X/bin/ksh; then
906 # If we have ksh, try running configure again with it.
907 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
908 export ORIGINAL_CONFIG_SHELL
909 CONFIG_SHELL=/bin/ksh
911 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
915 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
916 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
917 test "X$echo_testing_string" = "X$echo_test_string"; then
920 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
921 test "X$echo_testing_string" = 'X\t' &&
922 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
923 test "X$echo_testing_string" = "X$echo_test_string"; then
924 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
926 SHELL="$CONFIG_SHELL"
928 echo="$CONFIG_SHELL [$]0 --fallback-echo"
929 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
930 test "X$echo_testing_string" = 'X\t' &&
931 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
932 test "X$echo_testing_string" = "X$echo_test_string"; then
933 echo="$CONFIG_SHELL [$]0 --fallback-echo"
935 # maybe with a smaller string...
938 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
939 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
946 if test "$prev" != 'sed 50q "[$]0"'; then
947 echo_test_string=`eval $prev`
948 export echo_test_string
949 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
951 # Oops. We lost completely, so just stick with echo.
960 # Copy echo and quote the copy suitably for passing to libtool from
961 # the Makefile, instead of quoting the original, which is used later.
963 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
964 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
969 ])# _LT_AC_PROG_ECHO_BACKSLASH
971 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
972 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
973 # ------------------------------------------------------------------
974 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
975 [if test "$cross_compiling" = yes; then :
978 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
979 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
980 lt_status=$lt_dlunknown
981 cat > conftest.$ac_ext <<EOF
982 [#line __oline__ "configure"
983 #include "confdefs.h"
992 # define LT_DLGLOBAL RTLD_GLOBAL
995 # define LT_DLGLOBAL DL_GLOBAL
997 # define LT_DLGLOBAL 0
1001 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
1002 find out it does not work in some platform. */
1003 #ifndef LT_DLLAZY_OR_NOW
1005 # define LT_DLLAZY_OR_NOW RTLD_LAZY
1008 # define LT_DLLAZY_OR_NOW DL_LAZY
1011 # define LT_DLLAZY_OR_NOW RTLD_NOW
1014 # define LT_DLLAZY_OR_NOW DL_NOW
1016 # define LT_DLLAZY_OR_NOW 0
1024 extern "C" void exit (int);
1027 void fnord() { int i=42;}
1030 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
1031 int status = $lt_dlunknown;
1035 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
1036 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
1037 /* dlclose (self); */
1043 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1044 (./conftest; exit; ) 2>/dev/null
1047 x$lt_dlno_uscore) $1 ;;
1048 x$lt_dlneed_uscore) $2 ;;
1049 x$lt_unknown|x*) $3 ;;
1052 # compilation failed
1057 ])# _LT_AC_TRY_DLOPEN_SELF
1059 # AC_LIBTOOL_DLOPEN_SELF
1060 # -------------------
1061 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1062 [if test "x$enable_dlopen" != xyes; then
1063 enable_dlopen=unknown
1064 enable_dlopen_self=unknown
1065 enable_dlopen_self_static=unknown
1072 lt_cv_dlopen="load_add_on"
1074 lt_cv_dlopen_self=yes
1077 cygwin* | mingw* | pw32*)
1078 lt_cv_dlopen="LoadLibrary"
1083 AC_CHECK_FUNC([shl_load],
1084 [lt_cv_dlopen="shl_load"],
1085 [AC_CHECK_LIB([dld], [shl_load],
1086 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1087 [AC_CHECK_FUNC([dlopen],
1088 [lt_cv_dlopen="dlopen"],
1089 [AC_CHECK_LIB([dl], [dlopen],
1090 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1091 [AC_CHECK_LIB([svld], [dlopen],
1092 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1093 [AC_CHECK_LIB([dld], [dld_link],
1094 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1103 if test "x$lt_cv_dlopen" != xno; then
1109 case $lt_cv_dlopen in
1111 save_CPPFLAGS="$CPPFLAGS"
1112 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1113 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1115 save_LDFLAGS="$LDFLAGS"
1116 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1119 LIBS="$lt_cv_dlopen_libs $LIBS"
1121 AC_CACHE_CHECK([whether a program can dlopen itself],
1122 lt_cv_dlopen_self, [dnl
1123 _LT_AC_TRY_DLOPEN_SELF(
1124 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1125 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1128 if test "x$lt_cv_dlopen_self" = xyes; then
1129 LDFLAGS="$LDFLAGS $link_static_flag"
1130 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1131 lt_cv_dlopen_self_static, [dnl
1132 _LT_AC_TRY_DLOPEN_SELF(
1133 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1134 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1138 CPPFLAGS="$save_CPPFLAGS"
1139 LDFLAGS="$save_LDFLAGS"
1144 case $lt_cv_dlopen_self in
1145 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1146 *) enable_dlopen_self=unknown ;;
1149 case $lt_cv_dlopen_self_static in
1150 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1151 *) enable_dlopen_self_static=unknown ;;
1154 ])# AC_LIBTOOL_DLOPEN_SELF
1156 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
1157 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
1158 # Sed substitution that helps us do robust quoting. It backslashifies
1159 # metacharacters that are still active within double-quoted strings.
1160 Xsed='sed -e s/^X//'
1161 sed_quote_subst='s/\([[\\"\\`$\\\\]]\)/\\\1/g'
1163 # Same as above, but do not quote variable references.
1164 double_quote_subst='s/\([[\\"\\`\\\\]]\)/\\\1/g'
1166 # Sed substitution to delay expansion of an escaped shell variable in a
1167 # double_quote_subst'ed string.
1168 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1174 default_ofile=libtool
1175 can_build_shared=yes
1177 # All known linkers require a `.a' archive for static linking (except M$VC,
1178 # which needs '.lib').
1180 ltmain="$ac_aux_dir/ltmain.sh"
1181 ofile="$default_ofile"
1182 with_gnu_ld="$lt_cv_prog_gnu_ld"
1183 need_locks="$enable_libtool_lock"
1186 old_CFLAGS="$CFLAGS"
1188 # Set sane defaults for various variables
1189 test -z "$AR" && AR=ar
1190 test -z "$AR_FLAGS" && AR_FLAGS=cru
1191 test -z "$AS" && AS=as
1192 test -z "$CC" && CC=cc
1193 test -z "$DLLTOOL" && DLLTOOL=dlltool
1194 test -z "$LD" && LD=ld
1195 test -z "$LN_S" && LN_S="ln -s"
1196 test -z "$MAGIC_CMD" && MAGIC_CMD=file
1197 test -z "$NM" && NM=nm
1198 test -z "$OBJDUMP" && OBJDUMP=objdump
1199 test -z "$RANLIB" && RANLIB=:
1200 test -z "$STRIP" && STRIP=:
1201 test -z "$ac_objext" && ac_objext=o
1203 if test x"$host" != x"$build"; then
1204 ac_tool_prefix=${host_alias}-
1209 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
1212 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
1217 # AIX sometimes has problems with the GCC collect2 program. For some
1218 # reason, if we set the COLLECT_NAMES environment variable, the problems
1219 # vanish in a puff of smoke.
1220 if test "X${COLLECT_NAMES+set}" != Xset; then
1222 export COLLECT_NAMES
1227 # Determine commands to create old-style static archives.
1228 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
1229 old_postinstall_cmds='chmod 644 $oldlib'
1230 old_postuninstall_cmds=
1232 if test -n "$RANLIB"; then
1235 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
1238 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
1241 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
1244 # Allow CC to be a program name with arguments.
1248 ## FIXME: this should be a separate macro
1250 AC_MSG_CHECKING([for objdir])
1251 rm -f .libs 2>/dev/null
1252 mkdir .libs 2>/dev/null
1253 if test -d .libs; then
1256 # MS-DOS does not allow filenames that begin with a dot.
1259 rmdir .libs 2>/dev/null
1260 AC_MSG_RESULT($objdir)
1265 ## FIXME: this should be a separate macro
1268 [ --with-pic try to use only PIC/non-PIC objects [default=use both]],
1269 pic_mode="$withval", pic_mode=default)
1270 test -z "$pic_mode" && pic_mode=default
1272 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
1273 # in isolation, and that seeing it set (from the cache) indicates that
1274 # the associated values are set (in the cache) correctly too.
1275 AC_MSG_CHECKING([for $compiler option to produce PIC])
1276 AC_CACHE_VAL(lt_cv_prog_cc_pic,
1277 [ lt_cv_prog_cc_pic=
1278 lt_cv_prog_cc_shlib=
1280 lt_cv_prog_cc_static=
1281 lt_cv_prog_cc_no_builtin=
1282 lt_cv_prog_cc_can_build_shared=$can_build_shared
1284 if test "$GCC" = yes; then
1285 lt_cv_prog_cc_wl='-Wl,'
1286 lt_cv_prog_cc_static='-static'
1290 # Below there is a dirty hack to force normal static linking with -ldl
1291 # The problem is because libdl dynamically linked with both libc and
1292 # libC (AIX C++ library), which obviously doesn't included in libraries
1293 # list by gcc. This cause undefined symbols with -static flags.
1294 # This hack allows C programs to be linked with "-static -ldl", but
1295 # not sure about C++ programs.
1296 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
1299 # FIXME: we need at least 68020 code to build shared libraries, but
1300 # adding the `-m68020' flag to GCC prevents building anything better,
1302 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
1304 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
1305 # PIC is the default for these OSes.
1307 darwin* | rhapsody*)
1308 # PIC is the default on this platform
1309 # Common symbols not allowed in MH_DYLIB files
1310 lt_cv_prog_cc_pic='-fno-common'
1312 cygwin* | mingw* | pw32* | os2*)
1313 # This hack is so that the source file can tell whether it is being
1314 # built for inclusion in a dll (and should export symbols for example).
1315 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1318 if test -d /usr/nec; then
1319 lt_cv_prog_cc_pic=-Kconform_pic
1323 lt_cv_prog_cc_pic='-fPIC'
1327 # PORTME Check for PIC flags for the system compiler.
1329 aix3* | aix4* | aix5*)
1330 lt_cv_prog_cc_wl='-Wl,'
1331 # All AIX code is PIC.
1332 if test "$host_cpu" = ia64; then
1333 # AIX 5 now supports IA64 processor
1334 lt_cv_prog_cc_static='-Bstatic'
1336 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
1340 hpux9* | hpux10* | hpux11*)
1341 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
1342 lt_cv_prog_cc_wl='-Wl,'
1343 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
1344 lt_cv_prog_cc_pic='+Z'
1347 irix5* | irix6* | nonstopux*)
1348 lt_cv_prog_cc_wl='-Wl,'
1349 lt_cv_prog_cc_static='-non_shared'
1350 # PIC (with -KPIC) is the default.
1353 cygwin* | mingw* | pw32* | os2*)
1354 # This hack is so that the source file can tell whether it is being
1355 # built for inclusion in a dll (and should export symbols for example).
1356 lt_cv_prog_cc_pic='-DDLL_EXPORT'
1360 lt_cv_prog_cc_pic='-KPIC'
1361 lt_cv_prog_cc_static='-Bstatic'
1364 osf3* | osf4* | osf5*)
1365 # All OSF/1 code is PIC.
1366 lt_cv_prog_cc_wl='-Wl,'
1367 lt_cv_prog_cc_static='-non_shared'
1371 lt_cv_prog_cc_pic='-Kpic'
1372 lt_cv_prog_cc_static='-dn'
1373 lt_cv_prog_cc_shlib='-belf'
1377 lt_cv_prog_cc_pic='-KPIC'
1378 lt_cv_prog_cc_static='-Bstatic'
1379 lt_cv_prog_cc_wl='-Wl,'
1383 lt_cv_prog_cc_pic='-PIC'
1384 lt_cv_prog_cc_static='-Bstatic'
1385 lt_cv_prog_cc_wl='-Qoption ld '
1388 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1389 lt_cv_prog_cc_pic='-KPIC'
1390 lt_cv_prog_cc_static='-Bstatic'
1391 lt_cv_prog_cc_wl='-Wl,'
1395 lt_cv_prog_cc_pic='-pic'
1396 lt_cv_prog_cc_static='-Bstatic'
1400 if test -d /usr/nec ;then
1401 lt_cv_prog_cc_pic='-Kconform_pic'
1402 lt_cv_prog_cc_static='-Bstatic'
1407 lt_cv_prog_cc_can_build_shared=no
1412 if test -z "$lt_cv_prog_cc_pic"; then
1413 AC_MSG_RESULT([none])
1415 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
1417 # Check to make sure the pic_flag actually works.
1418 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
1419 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
1420 save_CFLAGS="$CFLAGS"
1421 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
1422 AC_TRY_COMPILE([], [], [dnl
1424 hpux9* | hpux10* | hpux11*)
1425 # On HP-UX, both CC and GCC only warn that PIC is supported... then
1426 # they create non-PIC objects. So, if there were any warnings, we
1427 # assume that PIC is not supported.
1428 if test -s conftest.err; then
1429 lt_cv_prog_cc_pic_works=no
1431 lt_cv_prog_cc_pic_works=yes
1435 lt_cv_prog_cc_pic_works=yes
1439 lt_cv_prog_cc_pic_works=no
1441 CFLAGS="$save_CFLAGS"
1444 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
1446 lt_cv_prog_cc_can_build_shared=no
1448 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
1451 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
1456 # Check for any special shared library compilation flags.
1457 if test -n "$lt_cv_prog_cc_shlib"; then
1458 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
1459 if echo "$old_CC $old_CFLAGS " | egrep -e "[[ ]]$lt_cv_prog_cc_shlib[[ ]]" >/dev/null; then :
1461 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
1462 lt_cv_prog_cc_can_build_shared=no
1466 ## FIXME: this should be a separate macro
1468 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
1469 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
1470 lt_cv_prog_cc_static_works=no
1471 save_LDFLAGS="$LDFLAGS"
1472 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
1473 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
1474 LDFLAGS="$save_LDFLAGS"
1477 # Belt *and* braces to stop my trousers falling down:
1478 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
1479 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
1481 pic_flag="$lt_cv_prog_cc_pic"
1482 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
1483 wl="$lt_cv_prog_cc_wl"
1484 link_static_flag="$lt_cv_prog_cc_static"
1485 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
1486 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1491 ## FIXME: this should be a separate macro
1493 # Check to see if options -o and -c are simultaneously supported by compiler
1494 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1495 AC_CACHE_VAL([lt_cv_compiler_c_o], [
1496 $rm -r conftest 2>/dev/null
1499 echo "int some_variable = 0;" > conftest.$ac_ext
1501 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1502 # that will create temporary files in the current directory regardless of
1503 # the output directory. Thus, making CWD read-only will cause this test
1504 # to fail, enabling locking or at least warning the user not to do parallel
1507 save_CFLAGS="$CFLAGS"
1508 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1510 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1511 # The compiler can only warn and ignore the option if not recognized
1512 # So say no if there are warnings
1513 if test -s out/conftest.err; then
1514 lt_cv_compiler_c_o=no
1516 lt_cv_compiler_c_o=yes
1519 # Append any errors to the config.log.
1520 cat out/conftest.err 1>&AC_FD_CC
1521 lt_cv_compiler_c_o=no
1523 CFLAGS="$save_CFLAGS"
1529 $rm -r conftest 2>/dev/null
1531 compiler_c_o=$lt_cv_compiler_c_o
1532 AC_MSG_RESULT([$compiler_c_o])
1534 if test x"$compiler_c_o" = x"yes"; then
1535 # Check to see if we can write to a .lo
1536 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1537 AC_CACHE_VAL([lt_cv_compiler_o_lo], [
1538 lt_cv_compiler_o_lo=no
1539 save_CFLAGS="$CFLAGS"
1540 CFLAGS="$CFLAGS -c -o conftest.lo"
1541 save_objext="$ac_objext"
1543 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1544 # The compiler can only warn and ignore the option if not recognized
1545 # So say no if there are warnings
1546 if test -s conftest.err; then
1547 lt_cv_compiler_o_lo=no
1549 lt_cv_compiler_o_lo=yes
1552 ac_objext="$save_objext"
1553 CFLAGS="$save_CFLAGS"
1555 compiler_o_lo=$lt_cv_compiler_o_lo
1556 AC_MSG_RESULT([$compiler_o_lo])
1563 ## FIXME: this should be a separate macro
1565 # Check to see if we can do hard links to lock some files if needed
1566 hard_links="nottested"
1567 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1568 # do not overwrite the value of need_locks provided by the user
1569 AC_MSG_CHECKING([if we can lock with hard links])
1572 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1574 ln conftest.a conftest.b 2>&5 || hard_links=no
1575 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1576 AC_MSG_RESULT([$hard_links])
1577 if test "$hard_links" = no; then
1578 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1587 ## FIXME: this should be a separate macro
1589 if test "$GCC" = yes; then
1590 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1591 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1592 echo "int some_variable = 0;" > conftest.$ac_ext
1593 save_CFLAGS="$CFLAGS"
1594 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1595 compiler_rtti_exceptions=no
1596 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1597 # The compiler can only warn and ignore the option if not recognized
1598 # So say no if there are warnings
1599 if test -s conftest.err; then
1600 compiler_rtti_exceptions=no
1602 compiler_rtti_exceptions=yes
1605 CFLAGS="$save_CFLAGS"
1606 AC_MSG_RESULT([$compiler_rtti_exceptions])
1608 if test "$compiler_rtti_exceptions" = "yes"; then
1609 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1611 no_builtin_flag=' -fno-builtin'
1617 ## FIXME: this should be a separate macro
1619 # See if the linker supports building shared libraries.
1620 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1622 allow_undefined_flag=
1624 need_lib_prefix=unknown
1625 need_version=unknown
1626 # when you set need_version to no, make sure it does not cause -set_version
1627 # flags to be left without arguments
1629 archive_expsym_cmds=
1630 old_archive_from_new_cmds=
1631 old_archive_from_expsyms_cmds=
1632 export_dynamic_flag_spec=
1633 whole_archive_flag_spec=
1634 thread_safe_flag_spec=
1635 hardcode_into_libs=no
1636 hardcode_libdir_flag_spec=
1637 hardcode_libdir_separator=
1640 hardcode_shlibpath_var=unsupported
1642 link_all_deplibs=unknown
1643 always_export_symbols=no
1644 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1645 # include_expsyms should be a list of space-separated symbols to be *always*
1646 # included in the symbol list
1648 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1649 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1650 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1651 # as well as any symbol that contains `d'.
1652 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1653 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1654 # platforms (ab)use it in PIC code, but their linkers get confused if
1655 # the symbol is explicitly referenced. Since portable code cannot
1656 # rely on this symbol name, it's probably fine to never include it in
1657 # preloaded symbol tables.
1658 extract_expsyms_cmds=
1661 cygwin* | mingw* | pw32*)
1662 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1663 # When not using gcc, we currently assume that we are using
1664 # Microsoft Visual C++.
1665 if test "$GCC" != yes; then
1675 if test "$with_gnu_ld" = yes; then
1676 # If archive_cmds runs LD, not CC, wlarc should be empty
1679 # See if GNU ld supports shared libraries.
1681 aix3* | aix4* | aix5*)
1682 # On AIX, the GNU linker is very broken
1683 # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
1687 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1688 *** to be unable to reliably create shared libraries on AIX.
1689 *** Therefore, libtool is disabling shared libraries support. If you
1690 *** really care for shared libraries, you may want to modify your PATH
1691 *** so that a non-GNU linker is found, and then restart.
1697 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)'
1698 hardcode_libdir_flag_spec='-L$libdir'
1699 hardcode_minus_L=yes
1701 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1702 # that the semantics of dynamic libraries on AmigaOS, at least up
1703 # to version 4, is to share data among multiple programs linked
1704 # with the same dynamic library. Since this doesn't match the
1705 # behavior of shared libraries on other platforms, we can use
1711 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1712 allow_undefined_flag=unsupported
1713 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1714 # support --undefined. This deserves some investigation. FIXME
1715 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1721 cygwin* | mingw* | pw32*)
1722 # hardcode_libdir_flag_spec is actually meaningless, as there is
1723 # no search path for DLLs.
1724 hardcode_libdir_flag_spec='-L$libdir'
1725 allow_undefined_flag=unsupported
1726 always_export_symbols=yes
1728 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1729 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1730 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1731 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1732 else $CC -o impgen impgen.c ; fi)~
1733 $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
1735 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1737 # cygwin and mingw dlls have different entry points and sets of symbols
1739 # FIXME: what about values for MSVC?
1740 dll_entry=__cygwin_dll_entry@12
1741 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1745 dll_entry=_DllMainCRTStartup@12
1746 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1750 # mingw and cygwin differ, and it's simplest to just exclude the union
1751 # of the two symbol sets.
1752 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1754 # recent cygwin and mingw systems supply a stub DllMain which the user
1755 # can override, but on older systems we have to supply one (in ltdll.c)
1756 if test "x$lt_cv_need_dllmain" = "xyes"; then
1757 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1758 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~
1759 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1765 # Extract the symbol export list from an `--export-all' def file,
1766 # then regenerate the def file from the symbol export list, so that
1767 # the compiled dll only exports the symbol export list.
1768 # Be careful not to strip the DATA tag left be newer dlltools.
1769 export_symbols_cmds="$ltdll_cmds"'
1770 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1771 sed -e "1,/EXPORTS/d" -e "s/ @ [[0-9]]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
1773 # If the export-symbols file already is a .def file (1st line
1774 # is EXPORTS), use it as is.
1775 # If DATA tags from a recent dlltool are present, honour them!
1776 archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
1777 cp $export_symbols $output_objdir/$soname-def;
1779 echo EXPORTS > $output_objdir/$soname-def;
1781 cat $export_symbols | while read symbol; do
1784 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1785 4) echo " \[$]2 \[$]3 \[$]4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
1786 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1788 _lt_hint=`expr 1 + \$_lt_hint`;
1792 $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~
1793 $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~
1794 $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~
1795 $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~
1796 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1800 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1801 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1804 archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1805 archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1810 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1814 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1815 *** create shared libraries on Solaris systems. Therefore, libtool
1816 *** is disabling shared libraries support. We urge you to upgrade GNU
1817 *** binutils to release 2.9.1 or newer. Another option is to modify
1818 *** your PATH or compiler configuration so that the native linker is
1819 *** used, and then restart.
1822 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1823 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1824 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1831 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1834 hardcode_shlibpath_var=no
1838 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1839 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1840 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1847 if test "$ld_shlibs" = yes; then
1848 runpath_var=LD_RUN_PATH
1849 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1850 export_dynamic_flag_spec='${wl}--export-dynamic'
1852 cygwin* | mingw* | pw32*)
1853 # dlltool doesn't understand --whole-archive et. al.
1854 whole_archive_flag_spec=
1857 # ancient GNU ld didn't support --whole-archive et. al.
1858 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1859 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1861 whole_archive_flag_spec=
1867 # PORTME fill in a description of your system's linker (not GNU ld)
1870 allow_undefined_flag=unsupported
1871 always_export_symbols=yes
1872 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'
1873 # Note: this linker hardcodes the directories in LIBPATH if there
1874 # are no directories specified by -L.
1875 hardcode_minus_L=yes
1876 if test "$GCC" = yes && test -z "$link_static_flag"; then
1877 # Neither direct hardcoding nor static linking is supported with a
1879 hardcode_direct=unsupported
1884 if test "$host_cpu" = ia64; then
1885 # On IA64, the linker does run time linking by default, so we don't
1886 # have to do anything special.
1887 aix_use_runtimelinking=no
1888 exp_sym_flag='-Bexport'
1891 aix_use_runtimelinking=no
1893 # Test if we are trying to use run time linking or normal
1894 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1895 # need to do runtime linking.
1896 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
1897 for ld_flag in $LDFLAGS; do
1898 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
1899 aix_use_runtimelinking=yes
1905 exp_sym_flag='-bexport'
1906 no_entry_flag='-bnoentry'
1909 # When large executables or shared objects are built, AIX ld can
1910 # have problems creating the table of contents. If linking a library
1911 # or program results in "error TOC overflow" add -mminimal-toc to
1912 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
1913 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
1917 hardcode_libdir_separator=':'
1918 if test "$GCC" = yes; then
1919 case $host_os in aix4.[[012]]|aix4.[[012]].*)
1920 collect2name=`${CC} -print-prog-name=collect2`
1921 if test -f "$collect2name" && \
1922 strings "$collect2name" | grep resolve_lib_name >/dev/null
1924 # We have reworked collect2
1927 # We have old collect2
1928 hardcode_direct=unsupported
1929 # It fails to find uninstalled libraries when the uninstalled
1930 # path is not listed in the libpath. Setting hardcode_minus_L
1931 # to unsupported forces relinking
1932 hardcode_minus_L=yes
1933 hardcode_libdir_flag_spec='-L$libdir'
1934 hardcode_libdir_separator=
1938 shared_flag='-shared'
1941 if test "$host_cpu" = ia64; then
1942 shared_flag='${wl}-G'
1944 if test "$aix_use_runtimelinking" = yes; then
1945 shared_flag='${wl}-G'
1947 shared_flag='${wl}-bM:SRE'
1952 # It seems that -bexpall can do strange things, so it is better to
1953 # generate a list of symbols to export.
1954 always_export_symbols=yes
1955 if test "$aix_use_runtimelinking" = yes; then
1956 # Warning - without using the other runtime loading flags (-brtl),
1957 # -berok will link without error, but may produce a broken library.
1958 allow_undefined_flag='-berok'
1959 hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
1960 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"
1962 if test "$host_cpu" = ia64; then
1963 hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1964 allow_undefined_flag="-z nodefs"
1965 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"
1967 hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
1968 # Warning - without using the other run time loading flags,
1969 # -berok will link without error, but may produce a broken library.
1970 allow_undefined_flag='${wl}-berok'
1971 # This is a bit strange, but is similar to how AIX traditionally builds
1972 # it's shared libraries.
1973 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'
1979 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)'
1980 hardcode_libdir_flag_spec='-L$libdir'
1981 hardcode_minus_L=yes
1982 # see comment about different semantics on the GNU ld section
1986 cygwin* | mingw* | pw32*)
1987 # When not using gcc, we currently assume that we are using
1988 # Microsoft Visual C++.
1989 # hardcode_libdir_flag_spec is actually meaningless, as there is
1990 # no search path for DLLs.
1991 hardcode_libdir_flag_spec=' '
1992 allow_undefined_flag=unsupported
1993 # Tell ltmain to make .lib files, not .a files.
1995 # FIXME: Setting linknames here is a bad hack.
1996 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1997 # The linker will automatically build a .lib file if we build a DLL.
1998 old_archive_from_new_cmds='true'
1999 # FIXME: Should let the user specify the lib program.
2000 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
2001 fix_srcfile_path='`cygpath -w "$srcfile"`'
2004 darwin* | rhapsody*)
2006 rhapsody* | darwin1.[[012]])
2007 allow_undefined_flag='-undefined suppress'
2010 allow_undefined_flag='-flat_namespace -undefined suppress'
2013 # FIXME: Relying on posixy $() will cause problems for
2014 # cross-compilation, but unfortunately the echo tests do not
2015 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
2016 # `"' quotes if we put them in here... so don't!
2017 archive_cmds='$nonopt $(test .$module = .yes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
2018 # We need to add '_' to the symbols in $export_symbols first
2019 #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
2021 hardcode_shlibpath_var=no
2022 whole_archive_flag_spec='-all_load $convenience'
2029 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
2030 # support. Future versions do this automatically, but an explicit c++rt0.o
2031 # does not break anything, and helps significantly (at the cost of a little
2034 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
2035 hardcode_libdir_flag_spec='-R$libdir'
2037 hardcode_shlibpath_var=no
2040 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
2042 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2044 hardcode_minus_L=yes
2045 hardcode_shlibpath_var=no
2048 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
2050 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
2051 hardcode_libdir_flag_spec='-R$libdir'
2053 hardcode_shlibpath_var=no
2056 hpux9* | hpux10* | hpux11*)
2058 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' ;;
2059 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
2061 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
2062 hardcode_libdir_separator=:
2064 hardcode_minus_L=yes # Not in the search PATH, but as the default
2065 # location of the library.
2066 export_dynamic_flag_spec='${wl}-E'
2069 irix5* | irix6* | nonstopux*)
2070 if test "$GCC" = yes; then
2071 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'
2073 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'
2075 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2076 hardcode_libdir_separator=:
2077 link_all_deplibs=yes
2081 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2082 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
2084 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
2086 hardcode_libdir_flag_spec='-R$libdir'
2088 hardcode_shlibpath_var=no
2092 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2094 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2095 hardcode_libdir_separator=:
2096 hardcode_shlibpath_var=no
2101 hardcode_shlibpath_var=no
2102 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2103 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2104 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2105 export_dynamic_flag_spec='${wl}-E'
2108 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
2109 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
2110 hardcode_libdir_flag_spec='-R$libdir'
2113 archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
2114 hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
2121 hardcode_libdir_flag_spec='-L$libdir'
2122 hardcode_minus_L=yes
2123 allow_undefined_flag=unsupported
2124 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'
2125 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
2129 if test "$GCC" = yes; then
2130 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2131 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'
2133 allow_undefined_flag=' -expect_unresolved \*'
2134 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'
2136 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2137 hardcode_libdir_separator=:
2140 osf4* | osf5*) # as osf3* with the addition of -msym flag
2141 if test "$GCC" = yes; then
2142 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
2143 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'
2144 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
2146 allow_undefined_flag=' -expect_unresolved \*'
2147 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'
2148 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
2149 $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'
2151 #Both c and cxx compiler support -rpath directly
2152 hardcode_libdir_flag_spec='-rpath $libdir'
2154 hardcode_libdir_separator=:
2158 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2159 hardcode_shlibpath_var=no
2160 runpath_var=LD_RUN_PATH
2161 hardcode_runpath_var=yes
2162 export_dynamic_flag_spec='${wl}-Bexport'
2166 # gcc --version < 3.0 without binutils cannot create self contained
2167 # shared libraries reliably, requiring libgcc.a to resolve some of
2168 # the object symbols generated in some cases. Libraries that use
2169 # assert need libgcc.a to resolve __eprintf, for example. Linking
2170 # a copy of libgcc.a into every shared library to guarantee resolving
2171 # such symbols causes other problems: According to Tim Van Holder
2172 # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
2173 # (to the application) exception stack for one thing.
2174 no_undefined_flag=' -z defs'
2175 if test "$GCC" = yes; then
2176 case `$CC --version 2>/dev/null` in
2180 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
2181 *** create self contained shared libraries on Solaris systems, without
2182 *** introducing a dependency on libgcc.a. Therefore, libtool is disabling
2183 *** -no-undefined support, which will at least allow you to build shared
2184 *** libraries. However, you may find that when you link such libraries
2185 *** into an application without using GCC, you have to manually add
2186 *** \`gcc --print-libgcc-file-name\` to the link command. We urge you to
2187 *** upgrade to a newer version of GCC. Another option is to rebuild your
2188 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
2195 # $CC -shared without GNU ld will not create a library from C++
2196 # object files and a static libstdc++, better avoid it by now
2197 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2198 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2199 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2200 hardcode_libdir_flag_spec='-R$libdir'
2201 hardcode_shlibpath_var=no
2203 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
2204 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
2205 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
2207 link_all_deplibs=yes
2211 if test "x$host_vendor" = xsequent; then
2212 # Use $CC to link under sequent, because it throws in some extra .o
2213 # files that make .init and .fini sections work.
2214 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
2216 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
2218 hardcode_libdir_flag_spec='-L$libdir'
2220 hardcode_minus_L=yes
2221 hardcode_shlibpath_var=no
2225 case $host_vendor in
2227 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2228 hardcode_direct=yes # is this really true???
2231 ## LD is ld it makes a PLAMLIB
2232 ## CC just makes a GrossModule.
2233 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2234 reload_cmds='$CC -r -o $output$reload_objs'
2238 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2239 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
2242 runpath_var='LD_RUN_PATH'
2243 hardcode_shlibpath_var=no
2247 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2248 hardcode_shlibpath_var=no
2249 export_dynamic_flag_spec='-Bexport'
2253 no_undefined_flag=' -z text'
2254 # $CC -shared without GNU ld will not create a library from C++
2255 # object files and a static libstdc++, better avoid it by now
2256 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
2257 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
2258 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
2259 hardcode_libdir_flag_spec=
2260 hardcode_shlibpath_var=no
2261 runpath_var='LD_RUN_PATH'
2265 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2266 hardcode_libdir_flag_spec='-L$libdir'
2267 hardcode_shlibpath_var=no
2271 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2272 hardcode_libdir_flag_spec='-L$libdir'
2273 hardcode_shlibpath_var=no
2277 if test -d /usr/nec; then
2278 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
2279 hardcode_shlibpath_var=no
2280 runpath_var=LD_RUN_PATH
2281 hardcode_runpath_var=yes
2287 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
2290 hardcode_shlibpath_var=no
2291 hardcode_runpath_var=yes
2292 runpath_var=LD_RUN_PATH
2295 sysv5uw7* | unixware7*)
2296 no_undefined_flag='${wl}-z ${wl}text'
2297 if test "$GCC" = yes; then
2298 archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2300 archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
2302 runpath_var='LD_RUN_PATH'
2303 hardcode_shlibpath_var=no
2311 AC_MSG_RESULT([$ld_shlibs])
2312 test "$ld_shlibs" = no && can_build_shared=no
2316 ## FIXME: this should be a separate macro
2318 # Check hardcoding attributes.
2319 AC_MSG_CHECKING([how to hardcode library paths into programs])
2321 if test -n "$hardcode_libdir_flag_spec" || \
2322 test -n "$runpath_var"; then
2324 # We can hardcode non-existant directories.
2325 if test "$hardcode_direct" != no &&
2326 # If the only mechanism to avoid hardcoding is shlibpath_var, we
2327 # have to relink, otherwise we might link with an installed library
2328 # when we should be linking with a yet-to-be-installed one
2329 ## test "$hardcode_shlibpath_var" != no &&
2330 test "$hardcode_minus_L" != no; then
2331 # Linking always hardcodes the temporary library directory.
2332 hardcode_action=relink
2334 # We can link without hardcoding, and we can hardcode nonexisting dirs.
2335 hardcode_action=immediate
2338 # We cannot hardcode anything, or else we can only hardcode existing
2340 hardcode_action=unsupported
2342 AC_MSG_RESULT([$hardcode_action])
2346 ## FIXME: this should be a separate macro
2350 AC_MSG_CHECKING([whether stripping libraries is possible])
2351 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
2352 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
2353 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
2354 AC_MSG_RESULT([yes])
2361 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2362 test -z "$deplibs_check_method" && deplibs_check_method=unknown
2364 ## FIXME: this should be a separate macro
2366 # PORTME Fill in your ld.so characteristics
2367 AC_MSG_CHECKING([dynamic linker characteristics])
2369 libname_spec='lib$name'
2376 shlibpath_overrides_runpath=unknown
2378 dynamic_linker="$host_os ld.so"
2379 sys_lib_dlsearch_path_spec="/lib /usr/lib"
2380 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
2385 library_names_spec='${libname}${release}.so$versuffix $libname.a'
2386 shlibpath_var=LIBPATH
2388 # AIX has no versioning support, so we append a major version to the name.
2389 soname_spec='${libname}${release}.so$major'
2394 if test "$host_cpu" = ia64; then
2395 # AIX 5 supports IA64
2396 library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
2397 shlibpath_var=LD_LIBRARY_PATH
2399 # With GCC up to 2.95.x, collect2 would create an import file
2400 # for dependence libraries. The import file would start with
2401 # the line `#! .'. This would cause the generated library to
2402 # depend on `.', always an invalid library. This was fixed in
2403 # development snapshots of GCC prior to 3.0.
2405 aix4 | aix4.[[01]] | aix4.[[01]].*)
2406 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
2408 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
2415 # AIX (on Power*) has no versioning support, so currently we can
2416 # not hardcode correct soname into executable. Probably we can
2417 # add versioning support to collect2, so additional links can
2418 # be useful in future.
2419 if test "$aix_use_runtimelinking" = yes; then
2420 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
2421 # instead of lib<name>.a to let people know that these are not
2422 # typical AIX shared libraries.
2423 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2425 # We preserve .a as extension for shared libraries through AIX4.2
2426 # and later when we are not doing run time linking.
2427 library_names_spec='${libname}${release}.a $libname.a'
2428 soname_spec='${libname}${release}.so$major'
2430 shlibpath_var=LIBPATH
2435 library_names_spec='$libname.ixlibrary $libname.a'
2436 # Create ${libname}_ixlibrary.a entries in /sys/libs.
2437 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'
2441 library_names_spec='${libname}.so'
2442 dynamic_linker="$host_os ld.so"
2443 shlibpath_var=LIBRARY_PATH
2449 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2450 soname_spec='${libname}${release}.so$major'
2451 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
2452 shlibpath_var=LD_LIBRARY_PATH
2453 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
2454 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
2455 export_dynamic_flag_spec=-rdynamic
2456 # the default ld.so.conf also contains /usr/contrib/lib and
2457 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
2458 # libtool to hard-code these into programs
2461 cygwin* | mingw* | pw32*)
2462 version_type=windows
2465 case $GCC,$host_os in
2467 library_names_spec='$libname.dll.a'
2468 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2469 postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
2470 dldir=$destdir/`dirname \$dlpath`~
2471 test -d \$dldir || mkdir -p \$dldir~
2472 $install_prog .libs/$dlname \$dldir/$dlname'
2473 postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
2474 dlpath=$dir/\$dldll~
2478 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll'
2479 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
2482 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
2485 library_names_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}.dll $libname.lib'
2488 dynamic_linker='Win32 ld.exe'
2489 # FIXME: first we should search . and the directory the executable is in
2493 darwin* | rhapsody*)
2494 dynamic_linker="$host_os dyld"
2498 # FIXME: Relying on posixy $() will cause problems for
2499 # cross-compilation, but unfortunately the echo tests do not
2500 # yet detect zsh echo's removal of \ escapes.
2501 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)'
2502 soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
2503 shlibpath_overrides_runpath=yes
2504 shlibpath_var=DYLD_LIBRARY_PATH
2512 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
2513 version_type=freebsd-$objformat
2514 case $version_type in
2516 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2521 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
2525 shlibpath_var=LD_LIBRARY_PATH
2528 shlibpath_overrides_runpath=yes
2531 shlibpath_overrides_runpath=no
2532 hardcode_into_libs=yes
2541 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
2542 soname_spec='${libname}${release}.so$major'
2543 shlibpath_var=LD_LIBRARY_PATH
2544 hardcode_into_libs=yes
2547 hpux9* | hpux10* | hpux11*)
2548 # Give a soname corresponding to the major version so that dld.sl refuses to
2549 # link against other versions.
2550 dynamic_linker="$host_os dld.sl"
2554 shlibpath_var=SHLIB_PATH
2555 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
2556 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
2557 soname_spec='${libname}${release}.sl$major'
2558 # HP-UX runs *really* slowly unless shared libraries are mode 555.
2559 postinstall_cmds='chmod 555 $lib'
2562 irix5* | irix6* | nonstopux*)
2564 nonstopux*) version_type=nonstopux ;;
2565 *) version_type=irix ;;
2569 soname_spec='${libname}${release}.so$major'
2570 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
2572 irix5* | nonstopux*)
2576 case $LD in # libtool.m4 will add one of these switches to LD
2577 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
2578 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
2579 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
2580 *) libsuff= shlibsuff= libmagic=never-match;;
2584 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
2585 shlibpath_overrides_runpath=no
2586 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
2587 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
2590 # No shared lib support for Linux oldld, aout, or coff.
2591 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
2595 # This must be Linux ELF.
2600 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2601 soname_spec='${libname}${release}.so$major'
2602 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
2603 shlibpath_var=LD_LIBRARY_PATH
2604 shlibpath_overrides_runpath=no
2605 # This implies no fast_install, which is unacceptable.
2606 # Some rework will be needed to allow for fast_install
2607 # before this can be enabled.
2608 hardcode_into_libs=yes
2610 # We used to test for /lib/ld.so.1 and disable shared libraries on
2611 # powerpc, because MkLinux only supported shared libraries with the
2612 # GNU dynamic linker. Since this was broken with cross compilers,
2613 # most powerpc-linux boxes support dynamic linking these days and
2614 # people can always --disable-shared, the test was removed, and we
2615 # assume the GNU/Linux dynamic linker is in use.
2616 dynamic_linker='GNU/Linux ld.so'
2623 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
2624 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2625 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2626 dynamic_linker='NetBSD (a.out) ld.so'
2628 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
2629 soname_spec='${libname}${release}.so$major'
2630 dynamic_linker='NetBSD ld.elf_so'
2632 shlibpath_var=LD_LIBRARY_PATH
2633 shlibpath_overrides_runpath=yes
2634 hardcode_into_libs=yes
2639 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2640 shlibpath_var=LD_LIBRARY_PATH
2641 shlibpath_overrides_runpath=yes
2648 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2650 openbsd2.[[89]] | openbsd2.[[89]].*)
2651 shlibpath_overrides_runpath=no
2654 shlibpath_overrides_runpath=yes
2658 shlibpath_overrides_runpath=yes
2660 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2661 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
2662 shlibpath_var=LD_LIBRARY_PATH
2666 libname_spec='$name'
2668 library_names_spec='$libname.dll $libname.a'
2669 dynamic_linker='OS/2 ld.exe'
2670 shlibpath_var=LIBPATH
2673 osf3* | osf4* | osf5*)
2676 soname_spec='${libname}${release}.so'
2677 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
2678 shlibpath_var=LD_LIBRARY_PATH
2679 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
2680 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
2685 soname_spec='${libname}${release}.so$major'
2686 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2687 shlibpath_var=LD_LIBRARY_PATH
2694 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2695 soname_spec='${libname}${release}.so$major'
2696 shlibpath_var=LD_LIBRARY_PATH
2697 shlibpath_overrides_runpath=yes
2698 hardcode_into_libs=yes
2699 # ldd complains unless libraries are executable
2700 postinstall_cmds='chmod +x $lib'
2705 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2706 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2707 shlibpath_var=LD_LIBRARY_PATH
2708 shlibpath_overrides_runpath=yes
2709 if test "$with_gnu_ld" = yes; then
2715 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2717 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2718 soname_spec='${libname}${release}.so$major'
2719 shlibpath_var=LD_LIBRARY_PATH
2720 case $host_vendor in
2722 shlibpath_overrides_runpath=no
2724 export_dynamic_flag_spec='${wl}-Blargedynsym'
2725 runpath_var=LD_RUN_PATH
2733 shlibpath_overrides_runpath=no
2734 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2741 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2742 soname_spec='${libname}${release}.so$major'
2743 shlibpath_var=LD_LIBRARY_PATH
2750 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2751 soname_spec='${libname}${release}.so$major'
2752 shlibpath_var=LD_LIBRARY_PATH
2756 if test -d /usr/nec ;then
2758 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2759 soname_spec='$libname.so.$major'
2760 shlibpath_var=LD_LIBRARY_PATH
2768 AC_MSG_RESULT([$dynamic_linker])
2769 test "$dynamic_linker" = no && can_build_shared=no
2773 ## FIXME: this should be a separate macro
2775 # Report the final consequences.
2776 AC_MSG_CHECKING([if libtool supports shared libraries])
2777 AC_MSG_RESULT([$can_build_shared])
2781 ## FIXME: this should be a separate macro
2783 AC_MSG_CHECKING([whether to build shared libraries])
2784 test "$can_build_shared" = "no" && enable_shared=no
2786 # On AIX, shared libraries and static libraries use the same namespace, and
2787 # are all built from PIC.
2790 test "$enable_shared" = yes && enable_static=no
2791 if test -n "$RANLIB"; then
2792 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2793 postinstall_cmds='$RANLIB $lib'
2798 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2799 test "$enable_shared" = yes && enable_static=no
2803 AC_MSG_RESULT([$enable_shared])
2807 ## FIXME: this should be a separate macro
2809 AC_MSG_CHECKING([whether to build static libraries])
2810 # Make sure either enable_shared or enable_static is yes.
2811 test "$enable_shared" = yes || enable_static=yes
2812 AC_MSG_RESULT([$enable_static])
2816 if test "$hardcode_action" = relink; then
2817 # Fast installation is not supported
2818 enable_fast_install=no
2819 elif test "$shlibpath_overrides_runpath" = yes ||
2820 test "$enable_shared" = no; then
2821 # Fast installation is not necessary
2822 enable_fast_install=needless
2825 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2826 if test "$GCC" = yes; then
2827 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2830 AC_LIBTOOL_DLOPEN_SELF
2832 ## FIXME: this should be a separate macro
2834 if test "$enable_shared" = yes && test "$GCC" = yes; then
2835 case $archive_cmds in
2837 # FIXME: we may have to deal with multi-command sequences.
2840 # Test whether the compiler implicitly links with -lc since on some
2841 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2842 # to ld, don't add -lc before -lgcc.
2843 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2844 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2846 echo 'static int dummy;' > conftest.$ac_ext
2848 if AC_TRY_EVAL(ac_compile); then
2851 libobjs=conftest.$ac_objext
2853 wl=$lt_cv_prog_cc_wl
2859 save_allow_undefined_flag=$allow_undefined_flag
2860 allow_undefined_flag=
2861 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2863 lt_cv_archive_cmds_need_lc=no
2865 lt_cv_archive_cmds_need_lc=yes
2867 allow_undefined_flag=$save_allow_undefined_flag
2869 cat conftest.err 1>&5
2871 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2875 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2879 ## FIXME: this should be a separate macro
2881 # The second clause should only fire when bootstrapping the
2882 # libtool distribution, otherwise you forgot to ship ltmain.sh
2883 # with your package, and you will get complaints that there are
2884 # no rules to generate ltmain.sh.
2885 if test -f "$ltmain"; then
2888 # If there is no Makefile yet, we rely on a make rule to execute
2889 # `config.status --recheck' to rerun these tests and create the
2890 # libtool script then.
2891 test -f Makefile && make "$ltmain"
2894 if test -f "$ltmain"; then
2895 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2898 echo creating $ofile
2900 # Now quote all the things that may contain metacharacters while being
2901 # careful not to overquote the AC_SUBSTed values. We take copies of the
2902 # variables and quote the copies for generation of the libtool script.
2903 for var in echo old_CC old_CFLAGS SED \
2904 AR AR_FLAGS CC LD LN_S NM SHELL \
2905 reload_flag reload_cmds wl \
2906 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2907 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2908 library_names_spec soname_spec \
2909 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2910 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2911 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2912 old_striplib striplib file_magic_cmd export_symbols_cmds \
2913 deplibs_check_method allow_undefined_flag no_undefined_flag \
2914 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2915 global_symbol_to_c_name_address \
2916 hardcode_libdir_flag_spec hardcode_libdir_separator \
2917 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2918 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2921 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2922 old_postinstall_cmds | old_postuninstall_cmds | \
2923 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2924 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2925 postinstall_cmds | postuninstall_cmds | \
2926 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2927 # Double-quote double-evaled strings.
2928 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2931 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2936 cat <<__EOF__ > "${ofile}T"
2939 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2940 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2941 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2943 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2944 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2946 # This program is free software; you can redistribute it and/or modify
2947 # it under the terms of the GNU General Public License as published by
2948 # the Free Software Foundation; either version 2 of the License, or
2949 # (at your option) any later version.
2951 # This program is distributed in the hope that it will be useful, but
2952 # WITHOUT ANY WARRANTY; without even the implied warranty of
2953 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2954 # General Public License for more details.
2956 # You should have received a copy of the GNU General Public License
2957 # along with this program; if not, write to the Free Software
2958 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2960 # As a special exception to the GNU General Public License, if you
2961 # distribute this file as part of a program that contains a
2962 # configuration script generated by Autoconf, you may include it under
2963 # the same distribution terms that you use for the rest of that program.
2965 # A sed that does not truncate output.
2968 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2969 Xsed="${SED} -e s/^X//"
2971 # The HP-UX ksh and POSIX shell print the target directory to stdout
2973 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2975 # ### BEGIN LIBTOOL CONFIG
2977 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2979 # Shell to use when invoking shell scripts.
2982 # Whether or not to build shared libraries.
2983 build_libtool_libs=$enable_shared
2985 # Whether or not to build static libraries.
2986 build_old_libs=$enable_static
2988 # Whether or not to add -lc for building shared libraries.
2989 build_libtool_need_lc=$need_lc
2991 # Whether or not to optimize for fast installation.
2992 fast_install=$enable_fast_install
2995 host_alias=$host_alias
2998 # An echo program that does not interpret backslashes.
3003 AR_FLAGS=$lt_AR_FLAGS
3005 # The default C compiler.
3008 # Is the compiler the GNU C compiler?
3011 # The linker used to build libraries.
3014 # Whether we need hard or soft links.
3017 # A BSD-compatible nm program.
3020 # A symbol stripping program
3023 # Used to examine libraries when file_magic_cmd begins "file"
3024 MAGIC_CMD=$MAGIC_CMD
3026 # Used on cygwin: DLL creation program.
3029 # Used on cygwin: object dumper.
3032 # Used on cygwin: assembler.
3035 # The name of the directory that contains temporary libtool files.
3038 # How to create reloadable object files.
3039 reload_flag=$lt_reload_flag
3040 reload_cmds=$lt_reload_cmds
3042 # How to pass a linker flag through the compiler.
3045 # Object file suffix (normally "o").
3048 # Old archive suffix (normally "a").
3051 # Executable file suffix (normally "").
3054 # Additional compiler flags for building library objects.
3055 pic_flag=$lt_pic_flag
3058 # Does compiler simultaneously support -c and -o options?
3059 compiler_c_o=$lt_compiler_c_o
3061 # Can we write directly to a .lo ?
3062 compiler_o_lo=$lt_compiler_o_lo
3064 # Must we lock files when doing compilation ?
3065 need_locks=$lt_need_locks
3067 # Do we need the lib prefix for modules?
3068 need_lib_prefix=$need_lib_prefix
3070 # Do we need a version for libraries?
3071 need_version=$need_version
3073 # Whether dlopen is supported.
3074 dlopen_support=$enable_dlopen
3076 # Whether dlopen of programs is supported.
3077 dlopen_self=$enable_dlopen_self
3079 # Whether dlopen of statically linked programs is supported.
3080 dlopen_self_static=$enable_dlopen_self_static
3082 # Compiler flag to prevent dynamic linking.
3083 link_static_flag=$lt_link_static_flag
3085 # Compiler flag to turn off builtin functions.
3086 no_builtin_flag=$lt_no_builtin_flag
3088 # Compiler flag to allow reflexive dlopens.
3089 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
3091 # Compiler flag to generate shared objects directly from archives.
3092 whole_archive_flag_spec=$lt_whole_archive_flag_spec
3094 # Compiler flag to generate thread-safe objects.
3095 thread_safe_flag_spec=$lt_thread_safe_flag_spec
3097 # Library versioning type.
3098 version_type=$version_type
3100 # Format of library name prefix.
3101 libname_spec=$lt_libname_spec
3103 # List of archive names. First name is the real one, the rest are links.
3104 # The last name is the one that the linker finds with -lNAME.
3105 library_names_spec=$lt_library_names_spec
3107 # The coded name of the library, if different from the real name.
3108 soname_spec=$lt_soname_spec
3110 # Commands used to build and install an old-style archive.
3112 old_archive_cmds=$lt_old_archive_cmds
3113 old_postinstall_cmds=$lt_old_postinstall_cmds
3114 old_postuninstall_cmds=$lt_old_postuninstall_cmds
3116 # Create an old-style archive from a shared archive.
3117 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
3119 # Create a temporary old-style archive to link instead of a shared archive.
3120 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
3122 # Commands used to build and install a shared archive.
3123 archive_cmds=$lt_archive_cmds
3124 archive_expsym_cmds=$lt_archive_expsym_cmds
3125 postinstall_cmds=$lt_postinstall_cmds
3126 postuninstall_cmds=$lt_postuninstall_cmds
3128 # Commands to strip libraries.
3129 old_striplib=$lt_old_striplib
3130 striplib=$lt_striplib
3132 # Method to check whether dependent libraries are shared objects.
3133 deplibs_check_method=$lt_deplibs_check_method
3135 # Command to use when deplibs_check_method == file_magic.
3136 file_magic_cmd=$lt_file_magic_cmd
3138 # Flag that allows shared libraries with undefined symbols to be built.
3139 allow_undefined_flag=$lt_allow_undefined_flag
3141 # Flag that forces no undefined symbols.
3142 no_undefined_flag=$lt_no_undefined_flag
3144 # Commands used to finish a libtool library installation in a directory.
3145 finish_cmds=$lt_finish_cmds
3147 # Same as above, but a single script fragment to be evaled but not shown.
3148 finish_eval=$lt_finish_eval
3150 # Take the output of nm and produce a listing of raw symbols and C names.
3151 global_symbol_pipe=$lt_global_symbol_pipe
3153 # Transform the output of nm in a proper C declaration
3154 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
3156 # Transform the output of nm in a C name address pair
3157 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
3159 # This is the shared library runtime path variable.
3160 runpath_var=$runpath_var
3162 # This is the shared library path variable.
3163 shlibpath_var=$shlibpath_var
3165 # Is shlibpath searched before the hard-coded library search path?
3166 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
3168 # How to hardcode a shared library path into an executable.
3169 hardcode_action=$hardcode_action
3171 # Whether we should hardcode library paths into libraries.
3172 hardcode_into_libs=$hardcode_into_libs
3174 # Flag to hardcode \$libdir into a binary during linking.
3175 # This must work even if \$libdir does not exist.
3176 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
3178 # Whether we need a single -rpath flag with a separated argument.
3179 hardcode_libdir_separator=$lt_hardcode_libdir_separator
3181 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
3183 hardcode_direct=$hardcode_direct
3185 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
3187 hardcode_minus_L=$hardcode_minus_L
3189 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
3190 # the resulting binary.
3191 hardcode_shlibpath_var=$hardcode_shlibpath_var
3193 # Variables whose values should be saved in libtool wrapper scripts and
3194 # restored at relink time.
3195 variables_saved_for_relink="$variables_saved_for_relink"
3197 # Whether libtool must link a program against all its dependency libraries.
3198 link_all_deplibs=$link_all_deplibs
3200 # Compile-time system search path for libraries
3201 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
3203 # Run-time system search path for libraries
3204 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
3206 # Fix the shell variable \$srcfile for the compiler.
3207 fix_srcfile_path="$fix_srcfile_path"
3209 # Set to yes if exported symbols are required.
3210 always_export_symbols=$always_export_symbols
3212 # The commands to list exported symbols.
3213 export_symbols_cmds=$lt_export_symbols_cmds
3215 # The commands to extract the exported symbol list from a shared archive.
3216 extract_expsyms_cmds=$lt_extract_expsyms_cmds
3218 # Symbols that should not be listed in the preloaded symbols.
3219 exclude_expsyms=$lt_exclude_expsyms
3221 # Symbols that must always be exported.
3222 include_expsyms=$lt_include_expsyms
3224 # ### END LIBTOOL CONFIG
3230 cat <<\EOF >> "${ofile}T"
3232 # AIX sometimes has problems with the GCC collect2 program. For some
3233 # reason, if we set the COLLECT_NAMES environment variable, the problems
3234 # vanish in a puff of smoke.
3235 if test "X${COLLECT_NAMES+set}" != Xset; then
3237 export COLLECT_NAMES
3244 cygwin* | mingw* | pw32* | os2*)
3245 cat <<'EOF' >> "${ofile}T"
3246 # This is a source program that is used to create dlls on Windows
3247 # Don't remove nor modify the starting and closing comments
3248 # /* ltdll.c starts here */
3249 # #define WIN32_LEAN_AND_MEAN
3250 # #include <windows.h>
3251 # #undef WIN32_LEAN_AND_MEAN
3252 # #include <stdio.h>
3254 # #ifndef __CYGWIN__
3255 # # ifdef __CYGWIN32__
3256 # # define __CYGWIN__ __CYGWIN32__
3260 # #ifdef __cplusplus
3263 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
3264 # #ifdef __cplusplus
3269 # #include <cygwin/cygwin_dll.h>
3270 # DECLARE_CYGWIN_DLL( DllMain );
3272 # HINSTANCE __hDllInstance_base;
3275 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
3277 # __hDllInstance_base = hInst;
3280 # /* ltdll.c ends here */
3281 # This is a source program that is used to create import libraries
3282 # on Windows for dlls which lack them. Don't remove nor modify the
3283 # starting and closing comments
3284 # /* impgen.c starts here */
3285 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
3287 # This file is part of GNU libtool.
3289 # This program is free software; you can redistribute it and/or modify
3290 # it under the terms of the GNU General Public License as published by
3291 # the Free Software Foundation; either version 2 of the License, or
3292 # (at your option) any later version.
3294 # This program is distributed in the hope that it will be useful,
3295 # but WITHOUT ANY WARRANTY; without even the implied warranty of
3296 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3297 # GNU General Public License for more details.
3299 # You should have received a copy of the GNU General Public License
3300 # along with this program; if not, write to the Free Software
3301 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3304 # #include <stdio.h> /* for printf() */
3305 # #include <unistd.h> /* for open(), lseek(), read() */
3306 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
3307 # #include <string.h> /* for strdup() */
3309 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
3311 # #define O_BINARY 0
3314 # static unsigned int
3315 # pe_get16 (fd, offset)
3319 # unsigned char b[2];
3320 # lseek (fd, offset, SEEK_SET);
3322 # return b[0] + (b[1]<<8);
3325 # static unsigned int
3326 # pe_get32 (fd, offset)
3330 # unsigned char b[4];
3331 # lseek (fd, offset, SEEK_SET);
3333 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3336 # static unsigned int
3340 # unsigned char *b = ptr;
3341 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
3350 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
3351 # unsigned long export_rva, export_size, nsections, secptr, expptr;
3352 # unsigned long name_rvas, nexp;
3353 # unsigned char *expdata, *erva;
3354 # char *filename, *dll_name;
3356 # filename = argv[1];
3358 # dll = open(filename, O_RDONLY|O_BINARY);
3362 # dll_name = filename;
3364 # for (i=0; filename[i]; i++)
3365 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
3366 # dll_name = filename + i +1;
3368 # pe_header_offset = pe_get32 (dll, 0x3c);
3369 # opthdr_ofs = pe_header_offset + 4 + 20;
3370 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
3372 # if (num_entries < 1) /* no exports */
3375 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
3376 # export_size = pe_get32 (dll, opthdr_ofs + 100);
3377 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
3378 # secptr = (pe_header_offset + 4 + 20 +
3379 # pe_get16 (dll, pe_header_offset + 4 + 16));
3382 # for (i = 0; i < nsections; i++)
3385 # unsigned long secptr1 = secptr + 40 * i;
3386 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
3387 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
3388 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
3389 # lseek(dll, secptr1, SEEK_SET);
3390 # read(dll, sname, 8);
3391 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
3393 # expptr = fptr + (export_rva - vaddr);
3394 # if (export_rva + export_size > vaddr + vsize)
3395 # export_size = vsize - (export_rva - vaddr);
3400 # expdata = (unsigned char*)malloc(export_size);
3401 # lseek (dll, expptr, SEEK_SET);
3402 # read (dll, expdata, export_size);
3403 # erva = expdata - export_rva;
3405 # nexp = pe_as32 (expdata+24);
3406 # name_rvas = pe_as32 (expdata+32);
3408 # printf ("EXPORTS\n");
3409 # for (i = 0; i<nexp; i++)
3411 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
3412 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
3417 # /* impgen.c ends here */
3423 # We use sed instead of cat because bash on DJGPP gets confused if
3424 # if finds mixed CR/LF and LF-only lines. Since sed operates in
3425 # text mode, it properly converts lines to CR/LF. This bash problem
3426 # is reportedly fixed, but why not run on old versions too?
3427 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
3429 mv -f "${ofile}T" "$ofile" || \
3430 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
3436 ])# _LT_AC_LTCONFIG_HACK
3438 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
3439 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
3441 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
3442 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
3444 # AC_ENABLE_SHARED - implement the --enable-shared flag
3445 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
3446 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3448 AC_DEFUN([AC_ENABLE_SHARED],
3449 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
3450 AC_ARG_ENABLE(shared,
3451 changequote(<<, >>)dnl
3452 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
3453 changequote([, ])dnl
3454 [p=${PACKAGE-default}
3456 yes) enable_shared=yes ;;
3457 no) enable_shared=no ;;
3460 # Look at the argument we got. We use all the common list separators.
3461 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3462 for pkg in $enableval; do
3463 if test "X$pkg" = "X$p"; then
3470 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
3473 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
3474 AC_DEFUN([AC_DISABLE_SHARED],
3475 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3476 AC_ENABLE_SHARED(no)])
3478 # AC_ENABLE_STATIC - implement the --enable-static flag
3479 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
3480 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3482 AC_DEFUN([AC_ENABLE_STATIC],
3483 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
3484 AC_ARG_ENABLE(static,
3485 changequote(<<, >>)dnl
3486 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
3487 changequote([, ])dnl
3488 [p=${PACKAGE-default}
3490 yes) enable_static=yes ;;
3491 no) enable_static=no ;;
3494 # Look at the argument we got. We use all the common list separators.
3495 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3496 for pkg in $enableval; do
3497 if test "X$pkg" = "X$p"; then
3504 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
3507 # AC_DISABLE_STATIC - set the default static flag to --disable-static
3508 AC_DEFUN([AC_DISABLE_STATIC],
3509 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3510 AC_ENABLE_STATIC(no)])
3513 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
3514 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
3515 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
3517 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
3518 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
3519 AC_ARG_ENABLE(fast-install,
3520 changequote(<<, >>)dnl
3521 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
3522 changequote([, ])dnl
3523 [p=${PACKAGE-default}
3525 yes) enable_fast_install=yes ;;
3526 no) enable_fast_install=no ;;
3528 enable_fast_install=no
3529 # Look at the argument we got. We use all the common list separators.
3530 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3531 for pkg in $enableval; do
3532 if test "X$pkg" = "X$p"; then
3533 enable_fast_install=yes
3539 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
3542 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
3543 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
3544 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3545 AC_ENABLE_FAST_INSTALL(no)])
3547 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
3548 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
3549 # Where MODE is either `yes' or `no'. If omitted, it defaults to
3551 AC_DEFUN([AC_LIBTOOL_PICMODE],
3552 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3553 pic_mode=ifelse($#,1,$1,default)])
3556 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
3557 AC_DEFUN([AC_PATH_TOOL_PREFIX],
3558 [AC_MSG_CHECKING([for $1])
3559 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
3562 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3565 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3568 ac_save_MAGIC_CMD="$MAGIC_CMD"
3569 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
3570 dnl $ac_dummy forces splitting on constant user-supplied paths.
3571 dnl POSIX.2 word splitting is done only on the output of word expansions,
3572 dnl not every word. This closes a longstanding sh security hole.
3573 ac_dummy="ifelse([$2], , $PATH, [$2])"
3574 for ac_dir in $ac_dummy; do
3575 test -z "$ac_dir" && ac_dir=.
3576 if test -f $ac_dir/$1; then
3577 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
3578 if test -n "$file_magic_test_file"; then
3579 case $deplibs_check_method in
3581 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3582 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3583 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3584 egrep "$file_magic_regex" > /dev/null; then
3589 *** Warning: the command libtool uses to detect shared libraries,
3590 *** $file_magic_cmd, produces output that libtool cannot recognize.
3591 *** The result is that libtool may fail to recognize shared libraries
3592 *** as such. This will affect the creation of libtool libraries that
3593 *** depend on shared libraries, but programs linked with such libtool
3594 *** libraries will work regardless of this problem. Nevertheless, you
3595 *** may want to report the problem to your system manager and/or to
3596 *** bug-libtool@gnu.org
3606 MAGIC_CMD="$ac_save_MAGIC_CMD"
3609 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3610 if test -n "$MAGIC_CMD"; then
3611 AC_MSG_RESULT($MAGIC_CMD)
3618 # AC_PATH_MAGIC - find a file program which can recognise a shared library
3619 AC_DEFUN([AC_PATH_MAGIC],
3620 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
3621 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
3622 if test -z "$lt_cv_path_MAGIC_CMD"; then
3623 if test -n "$ac_tool_prefix"; then
3624 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
3632 # AC_PROG_LD - find the path to the GNU or non-GNU linker
3633 AC_DEFUN([AC_PROG_LD],
3634 [AC_ARG_WITH(gnu-ld,
3635 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
3636 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
3637 AC_REQUIRE([AC_PROG_CC])dnl
3638 AC_REQUIRE([AC_CANONICAL_HOST])dnl
3639 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
3640 AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3642 if test "$GCC" = yes; then
3643 # Check if gcc -print-prog-name=ld gives a path.
3644 AC_MSG_CHECKING([for ld used by GCC])
3647 # gcc leaves a trailing carriage return which upsets mingw
3648 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3650 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3653 # Accept absolute paths.
3654 [[\\/]]* | [[A-Za-z]]:[[\\/]]*)
3655 re_direlt='/[[^/]][[^/]]*/\.\./'
3656 # Canonicalize the path of ld
3657 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3658 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3659 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3661 test -z "$LD" && LD="$ac_prog"
3664 # If it fails, then pretend we aren't using GCC.
3668 # If it is relative, then search for the first ld in PATH.
3672 elif test "$with_gnu_ld" = yes; then
3673 AC_MSG_CHECKING([for GNU ld])
3675 AC_MSG_CHECKING([for non-GNU ld])
3677 AC_CACHE_VAL(lt_cv_path_LD,
3678 [if test -z "$LD"; then
3679 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3680 for ac_dir in $PATH; do
3681 test -z "$ac_dir" && ac_dir=.
3682 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3683 lt_cv_path_LD="$ac_dir/$ac_prog"
3684 # Check to see if the program is GNU ld. I'd rather use --version,
3685 # but apparently some GNU ld's only accept -v.
3686 # Break only if it was the GNU/non-GNU ld that we prefer.
3687 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3688 test "$with_gnu_ld" != no && break
3690 test "$with_gnu_ld" != yes && break
3696 lt_cv_path_LD="$LD" # Let the user override the test with a path.
3699 if test -n "$LD"; then
3704 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
3709 AC_DEFUN([AC_PROG_LD_GNU],
3710 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
3711 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
3712 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3713 lt_cv_prog_gnu_ld=yes
3715 lt_cv_prog_gnu_ld=no
3717 with_gnu_ld=$lt_cv_prog_gnu_ld
3720 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
3721 # -- PORTME Some linkers may need a different reload flag.
3722 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
3723 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
3724 [lt_cv_ld_reload_flag='-r'])
3725 reload_flag=$lt_cv_ld_reload_flag
3726 test -n "$reload_flag" && reload_flag=" $reload_flag"
3729 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
3730 # -- PORTME fill in with the dynamic library characteristics
3731 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
3732 [AC_CACHE_CHECK([how to recognise dependant libraries],
3733 lt_cv_deplibs_check_method,
3734 [lt_cv_file_magic_cmd='$MAGIC_CMD'
3735 lt_cv_file_magic_test_file=
3736 lt_cv_deplibs_check_method='unknown'
3737 # Need to set the preceding variable on all platforms that support
3738 # interlibrary dependencies.
3739 # 'none' -- dependencies not supported.
3740 # `unknown' -- same as none, but documents that we really don't know.
3741 # 'pass_all' -- all dependencies passed with no checks.
3742 # 'test_compile' -- check by making test program.
3743 # 'file_magic [[regex]]' -- check by looking for files in library path
3744 # which responds to the $file_magic_cmd with a given egrep regex.
3745 # If you have `file' or equivalent on your system and you're not sure
3746 # whether `pass_all' will *always* work, you probably want this one.
3750 lt_cv_deplibs_check_method=pass_all
3754 lt_cv_deplibs_check_method=pass_all
3758 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
3759 lt_cv_file_magic_cmd='/usr/bin/file -L'
3760 lt_cv_file_magic_test_file=/shlib/libc.so
3763 cygwin* | mingw* | pw32*)
3764 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3765 lt_cv_file_magic_cmd='$OBJDUMP -f'
3768 darwin* | rhapsody*)
3769 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3770 lt_cv_file_magic_cmd='/usr/bin/file -L'
3772 rhapsody* | darwin1.[[012]])
3773 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3776 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3782 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3785 # Not sure whether the presence of OpenBSD here was a mistake.
3786 # Let's accept both of them until this is cleared up.
3787 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
3788 lt_cv_file_magic_cmd=/usr/bin/file
3789 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3793 lt_cv_deplibs_check_method=pass_all
3798 lt_cv_deplibs_check_method=pass_all
3802 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
3803 lt_cv_file_magic_cmd=/usr/bin/file
3804 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3807 irix5* | irix6* | nonstopux*)
3809 irix5* | nonstopux*)
3810 # this will be overridden with pass_all, but let us keep it just in case
3811 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3815 *-32|*"-32 ") libmagic=32-bit;;
3816 *-n32|*"-n32 ") libmagic=N32;;
3817 *-64|*"-64 ") libmagic=64-bit;;
3818 *) libmagic=never-match;;
3820 # this will be overridden with pass_all, but let us keep it just in case
3821 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
3824 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3825 lt_cv_deplibs_check_method=pass_all
3828 # This must be Linux ELF.
3831 alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3832 lt_cv_deplibs_check_method=pass_all ;;
3834 # glibc up to 2.1.1 does not perform some relocations on ARM
3835 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
3837 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3841 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3842 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so\.[[0-9]]+\.[[0-9]]+$'
3844 lt_cv_deplibs_check_method='match_pattern /lib[[^/\.]]+\.so$'
3849 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
3850 lt_cv_file_magic_cmd=/usr/bin/file
3851 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3855 lt_cv_file_magic_cmd=/usr/bin/file
3856 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3857 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3858 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
3860 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3864 osf3* | osf4* | osf5*)
3865 # this will be overridden with pass_all, but let us keep it just in case
3866 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3867 lt_cv_file_magic_test_file=/shlib/libc.so
3868 lt_cv_deplibs_check_method=pass_all
3872 lt_cv_deplibs_check_method=pass_all
3876 lt_cv_deplibs_check_method=pass_all
3877 lt_cv_file_magic_test_file=/lib/libc.so
3880 sysv5uw[[78]]* | sysv4*uw2*)
3881 lt_cv_deplibs_check_method=pass_all
3884 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3885 case $host_vendor in
3887 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]]'
3888 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3891 lt_cv_deplibs_check_method=pass_all
3894 lt_cv_file_magic_cmd='/bin/file'
3895 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
3898 lt_cv_file_magic_cmd='/bin/file'
3899 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
3900 lt_cv_file_magic_test_file=/lib/libc.so
3903 lt_cv_deplibs_check_method=pass_all
3909 file_magic_cmd=$lt_cv_file_magic_cmd
3910 deplibs_check_method=$lt_cv_deplibs_check_method
3914 # AC_PROG_NM - find the path to a BSD-compatible name lister
3915 AC_DEFUN([AC_PROG_NM],
3916 [AC_REQUIRE([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR])dnl
3917 AC_MSG_CHECKING([for BSD-compatible nm])
3918 AC_CACHE_VAL(lt_cv_path_NM,
3919 [if test -n "$NM"; then
3920 # Let the user override the test.
3923 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3924 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3925 test -z "$ac_dir" && ac_dir=.
3926 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3927 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3928 # Check to see if the nm accepts a BSD-compat flag.
3929 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3930 # nm: unknown option "B" ignored
3931 # Tru64's nm complains that /dev/null is an invalid object file
3932 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3933 lt_cv_path_NM="$tmp_nm -B"
3935 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3936 lt_cv_path_NM="$tmp_nm -p"
3939 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3940 continue # so that we can try to find one that supports BSD flags
3945 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3948 AC_MSG_RESULT([$NM])
3951 # AC_CHECK_LIBM - check for math library
3952 AC_DEFUN([AC_CHECK_LIBM],
3953 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3956 *-*-beos* | *-*-cygwin* | *-*-pw32*)
3957 # These system don't have libm
3960 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3961 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3964 AC_CHECK_LIB(m, main, LIBM="-lm")
3969 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3970 # the libltdl convenience library and LTDLINCL to the include flags for
3971 # the libltdl header and adds --enable-ltdl-convenience to the
3972 # configure arguments. Note that LIBLTDL and LTDLINCL are not
3973 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3974 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3975 # with '${top_builddir}/' and LTDLINCL will be prefixed with
3976 # '${top_srcdir}/' (note the single quotes!). If your package is not
3977 # flat and you're not using automake, define top_builddir and
3978 # top_srcdir appropriately in the Makefiles.
3979 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3980 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3981 case $enable_ltdl_convenience in
3982 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3983 "") enable_ltdl_convenience=yes
3984 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3986 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3987 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3988 # For backwards non-gettext consistent compatibility...
3992 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3993 # the libltdl installable library and LTDLINCL to the include flags for
3994 # the libltdl header and adds --enable-ltdl-install to the configure
3995 # arguments. Note that LIBLTDL and LTDLINCL are not AC_SUBSTed, nor is
3996 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3997 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3998 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed
3999 # with '${top_srcdir}/' (note the single quotes!). If your package is
4000 # not flat and you're not using automake, define top_builddir and
4001 # top_srcdir appropriately in the Makefiles.
4002 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
4003 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
4004 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
4005 AC_CHECK_LIB(ltdl, main,
4006 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
4007 [if test x"$enable_ltdl_install" = xno; then
4008 AC_MSG_WARN([libltdl not installed, but installation disabled])
4010 enable_ltdl_install=yes
4013 if test x"$enable_ltdl_install" = x"yes"; then
4014 ac_configure_args="$ac_configure_args --enable-ltdl-install"
4015 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
4016 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
4018 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
4022 # For backwards non-gettext consistent compatibility...
4027 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
4028 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
4029 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
4030 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
4031 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
4032 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
4033 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
4035 # This is just to silence aclocal about the macro not being used
4036 ifelse([AC_DISABLE_FAST_INSTALL])
4038 ############################################################
4039 # NOTE: This macro has been submitted for inclusion into #
4040 # GNU Autoconf as AC_PROG_SED. When it is available in #
4041 # a released version of Autoconf we should remove this #
4042 # macro and use it instead. #
4043 ############################################################
4046 # Check for a fully-functional sed program, that truncates
4047 # as few characters as possible. Prefer GNU sed if found.
4048 AC_DEFUN([LT_AC_PROG_SED],
4049 [AC_MSG_CHECKING([for a sed that does not truncate output])
4050 AC_CACHE_VAL(lt_cv_path_SED,
4051 [# Loop through the user's path and test for sed and gsed.
4052 # Then use that list of sed's as ones to test for truncation.
4053 as_executable_p="test -f"
4054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4058 test -z "$as_dir" && as_dir=.
4059 for ac_prog in sed gsed; do
4060 for ac_exec_ext in '' $ac_executable_extensions; do
4061 if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4062 _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
4068 # Create a temporary directory, and hook for its removal unless debugging.
4071 trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
4072 trap '{ (exit 1); exit 1; }' 1 2 13 15
4075 # Create a (secure) tmp directory for tmp files.
4078 tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
4079 test -n "$tmp" && test -d "$tmp"
4082 tmp=$TMPDIR/sed$$-$RANDOM
4083 (umask 077 && mkdir $tmp)
4086 echo "$me: cannot create a temporary directory in $TMPDIR" >&2
4087 { (exit 1); exit 1; }
4091 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
4092 # along with /bin/sed that truncates output.
4093 for _sed in $_sed_list /usr/xpg4/bin/sed; do
4094 test ! -f ${_sed} && break
4095 cat /dev/null > "$tmp/sed.in"
4097 echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
4098 # Check for GNU sed and select it if it is found.
4099 if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
4100 lt_cv_path_SED=${_sed}
4104 cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
4105 mv "$tmp/sed.tmp" "$tmp/sed.in"
4106 cp "$tmp/sed.in" "$tmp/sed.nl"
4107 echo >>"$tmp/sed.nl"
4108 ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
4109 cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
4110 # 40000 chars as input seems more than enough
4111 test $_count -gt 10 && break
4112 _count=`expr $_count + 1`
4113 if test $_count -gt $_max; then
4115 lt_cv_path_SED=$_sed
4121 if test "X$SED" != "X"; then
4126 AC_MSG_RESULT([$SED])
4129 dnl GNUPG_CHECK_VA_COPY()
4130 dnl Do some check on how to implement va_copy.
4131 dnl May define MUST_COPY_VA_BY_VAL.
4132 dnl Actual test code taken from glib-1.1.
4133 AC_DEFUN(GNUPG_CHECK_VA_COPY,
4134 [ AC_MSG_CHECKING(whether va_lists must be copied by value)
4135 AC_CACHE_VAL(gnupg_cv_must_copy_va_byval,[
4136 gnupg_cv_must_copy_va_byval=no
4141 va_list args1, args2;
4142 va_start (args1, i);
4144 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
4155 ],gnupg_cv_must_copy_va_byval=yes)
4157 if test "$gnupg_cv_must_copy_va_byval" = yes; then
4158 AC_DEFINE(MUST_COPY_VA_BYVAL,1,[used to implement the va_copy macro])
4160 AC_MSG_RESULT($gnupg_cv_must_copy_va_byval)