1 ## libtool.m4 - Configure libtool for the host system. -*-Shell-script-*-
2 ## Copyright 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
3 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5 ## This program is free software; you can redistribute it and/or modify
6 ## it under the terms of the GNU General Public License as published by
7 ## the Free Software Foundation; either version 2 of the License, or
8 ## (at your option) any later version.
10 ## This program is distributed in the hope that it will be useful, but
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 ## General Public License for more details.
15 ## You should have received a copy of the GNU General Public License
16 ## along with this program; if not, write to the Free Software
17 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.
19 ## As a special exception to the GNU General Public License, if you
20 ## distribute this file as part of a program that contains a
21 ## configuration script generated by Autoconf, you may include it under
22 ## the same distribution terms that you use for the rest of that program.
24 # serial 46 AC_PROG_LIBTOOL
25 AC_DEFUN([AC_PROG_LIBTOOL],
26 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
28 # This can be used to rebuild libtool when needed
29 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
31 # Always use our own libtool.
32 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
35 # Prevent multiple expansion
36 define([AC_PROG_LIBTOOL], [])
39 AC_DEFUN([AC_LIBTOOL_SETUP],
41 AC_REQUIRE([AC_ENABLE_SHARED])dnl
42 AC_REQUIRE([AC_ENABLE_STATIC])dnl
43 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
44 AC_REQUIRE([AC_CANONICAL_HOST])dnl
45 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
46 AC_REQUIRE([AC_PROG_CC])dnl
47 AC_REQUIRE([AC_PROG_LD])dnl
48 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
49 AC_REQUIRE([AC_PROG_NM])dnl
50 AC_REQUIRE([AC_PROG_LN_S])dnl
51 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
52 AC_REQUIRE([AC_OBJEXT])dnl
53 AC_REQUIRE([AC_EXEEXT])dnl
56 _LT_AC_PROG_ECHO_BACKSLASH
57 # Only perform the check for file, if the check method requires it
58 case "$deplibs_check_method" in
60 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
66 AC_CHECK_TOOL(RANLIB, ranlib, :)
67 AC_CHECK_TOOL(STRIP, strip, :)
69 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
70 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
71 enable_win32_dll=yes, enable_win32_dll=no)
73 AC_ARG_ENABLE(libtool-lock,
74 [ --disable-libtool-lock avoid locking (might break parallel builds)])
75 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
77 # Some flags need to be propagated to the compiler or linker for good
81 # Find out which ABI we are using.
82 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
83 if AC_TRY_EVAL(ac_compile); then
84 case "`/usr/bin/file conftest.$ac_objext`" in
100 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
101 SAVE_CFLAGS="$CFLAGS"
102 CFLAGS="$CFLAGS -belf"
103 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
106 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
108 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
109 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
110 CFLAGS="$SAVE_CFLAGS"
114 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL],
115 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
116 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
117 AC_CHECK_TOOL(AS, as, false)
118 AC_CHECK_TOOL(OBJDUMP, objdump, false)
120 # recent cygwin and mingw systems supply a stub DllMain which the user
121 # can override, but on older systems we have to supply one
122 AC_CACHE_CHECK([if libtool should supply DllMain function], lt_cv_need_dllmain,
124 [extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
126 [lt_cv_need_dllmain=no],[lt_cv_need_dllmain=yes])])
129 *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
130 # old mingw systems require "-dll" to link a DLL, while more recent ones
132 SAVE_CFLAGS="$CFLAGS"
133 CFLAGS="$CFLAGS -mdll"
134 AC_CACHE_CHECK([how to link DLLs], lt_cv_cc_dll_switch,
135 [AC_TRY_LINK([], [], [lt_cv_cc_dll_switch=-mdll],[lt_cv_cc_dll_switch=-dll])])
136 CFLAGS="$SAVE_CFLAGS" ;;
137 *-*-cygwin* | *-*-pw32*)
138 # cygwin systems need to pass --dll to the linker, and not link
139 # crt.o which will require a WinMain@16 definition.
140 lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
151 # --------------------
152 AC_DEFUN(_LT_AC_CHECK_DLFCN,
153 [AC_CHECK_HEADERS(dlfcn.h)
154 ])# _LT_AC_CHECK_DLFCN
156 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
157 # ---------------------------------
158 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
159 [AC_REQUIRE([AC_CANONICAL_HOST])
160 AC_REQUIRE([AC_PROG_NM])
161 AC_REQUIRE([AC_OBJEXT])
162 # Check for command to grab the raw symbol name followed by C symbol from nm.
163 AC_MSG_CHECKING([command to parse $NM output])
164 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [dnl
166 # These are sane defaults that work on at least a few old systems.
167 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
169 # Character class describing NM global symbol codes.
170 [symcode='[BCDEGRST]']
172 # Regexp to match symbols that can be accessed directly from C.
173 [sympat='\([_A-Za-z][_A-Za-z0-9]*\)']
175 # Transform the above into a raw symbol and a C symbol.
178 # Transform an extracted symbol line into a proper C declaration
179 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
181 # Define system-specific variables.
186 cygwin* | mingw* | pw32*)
187 [symcode='[ABCDGISTW]']
189 hpux*) # Its linker distinguishes data from code symbols
190 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^. .* \(.*\)$/extern char \1;/p'"
193 [symcode='[BCDEGRST]']
203 # Handle CRLF in mingw tool chain
207 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
211 # If we're using GNU nm, then use its standard symbol codes.
212 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
213 [symcode='[ABCDGISTW]']
216 # Try without a prefix undercore, then with it.
217 for ac_symprfx in "" "_"; do
219 # Write the raw and C identifiers.
220 [lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"]
222 # Check to see that the pipe works correctly.
225 cat > conftest.$ac_ext <<EOF
230 void nm_test_func(){}
234 main(){nm_test_var='a';nm_test_func();return(0);}
237 if AC_TRY_EVAL(ac_compile); then
238 # Now try to grab the symbols.
240 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
241 # Try sorting and uniquifying the output.
242 if sort "$nlist" | uniq > "$nlist"T; then
243 mv -f "$nlist"T "$nlist"
248 # Make sure that we snagged all the symbols we need.
249 if egrep ' nm_test_var$' "$nlist" >/dev/null; then
250 if egrep ' nm_test_func$' "$nlist" >/dev/null; then
251 cat <<EOF > conftest.$ac_ext
257 # Now generate the symbol file.
258 eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
260 cat <<EOF >> conftest.$ac_ext
261 #if defined (__STDC__) && __STDC__
262 # define lt_ptr_t void *
264 # define lt_ptr_t char *
268 /* The mapping between symbol names and symbols. */
273 [lt_preloaded_symbols[] =]
276 sed 's/^. \(.*\) \(.*\)$/ {"\2", (lt_ptr_t) \&\2},/' < "$nlist" >> conftest.$ac_ext
277 cat <<\EOF >> conftest.$ac_ext
285 # Now try linking the two files.
286 mv conftest.$ac_objext conftstm.$ac_objext
288 save_CFLAGS="$CFLAGS"
289 LIBS="conftstm.$ac_objext"
290 CFLAGS="$CFLAGS$no_builtin_flag"
291 if AC_TRY_EVAL(ac_link) && test -s conftest; then
295 CFLAGS="$save_CFLAGS"
297 echo "cannot find nm_test_func in $nlist" >&AC_FD_CC
300 echo "cannot find nm_test_var in $nlist" >&AC_FD_CC
303 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
306 echo "$progname: failed program was:" >&AC_FD_CC
307 cat conftest.$ac_ext >&5
309 rm -f conftest* conftst*
311 # Do not use the global_symbol_pipe unless it works.
312 if test "$pipe_works" = yes; then
315 lt_cv_sys_global_symbol_pipe=
319 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
320 if test -z "$lt_cv_sys_global_symbol_pipe"; then
321 global_symbol_to_cdecl=
323 global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
325 if test -z "$global_symbol_pipe$global_symbol_to_cdecl"; then
326 AC_MSG_RESULT(failed)
330 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
332 # _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
333 # ---------------------------------
334 AC_DEFUN([_LT_AC_LIBTOOL_SYS_PATH_SEPARATOR],
335 [# Find the correct PATH separator. Usually this is `:', but
336 # DJGPP uses `;' like DOS.
337 if test "X${PATH_SEPARATOR+set}" != Xset; then
338 UNAME=${UNAME-`uname 2>/dev/null`}
340 *-DOS) lt_cv_sys_path_separator=';' ;;
341 *) lt_cv_sys_path_separator=':' ;;
344 ])# _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
346 # _LT_AC_PROG_ECHO_BACKSLASH
347 # --------------------------
348 # Add some code to the start of the generated configure script which
349 # will find an echo command which doesn;t interpret backslashes.
350 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
351 [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
352 [AC_DIVERT_PUSH(NOTICE)])
353 _LT_AC_LIBTOOL_SYS_PATH_SEPARATOR
355 # Check that we are running under the correct shell.
356 SHELL=${CONFIG_SHELL-/bin/sh}
360 # Remove one level of quotation (which was required for Make).
361 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
366 if test "X[$]1" = X--no-reexec; then
367 # Discard the --no-reexec flag, and continue.
369 elif test "X[$]1" = X--fallback-echo; then
370 # Avoid inline document here, it may be left over
372 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
373 # Yippee, $echo works!
376 # Restart under the correct shell.
377 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
380 if test "X[$]1" = X--fallback-echo; then
381 # used as fallback echo
389 # The HP-UX ksh and POSIX shell print the target directory to stdout
391 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
393 if test -z "$ECHO"; then
394 if test "X${echo_test_string+set}" != Xset; then
395 # find a string as large as possible, as long as the shell can cope with it
396 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
397 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
398 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
399 echo_test_string="`eval $cmd`" &&
400 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
407 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
408 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
409 test "X$echo_testing_string" = "X$echo_test_string"; then
412 # The Solaris, AIX, and Digital Unix default echo programs unquote
413 # backslashes. This makes it impossible to quote backslashes using
414 # echo "$something" | sed 's/\\/\\\\/g'
416 # So, first we look for a working echo in the user's PATH.
418 IFS="${IFS= }"; save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
419 for dir in $PATH /usr/ucb; do
420 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
421 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
422 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
423 test "X$echo_testing_string" = "X$echo_test_string"; then
430 if test "X$echo" = Xecho; then
431 # We didn't find a better echo, so look for alternatives.
432 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
433 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
434 test "X$echo_testing_string" = "X$echo_test_string"; then
435 # This shell has a builtin print -r that does the trick.
437 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
438 test "X$CONFIG_SHELL" != X/bin/ksh; then
439 # If we have ksh, try running ltconfig again with it.
440 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
441 export ORIGINAL_CONFIG_SHELL
442 CONFIG_SHELL=/bin/ksh
444 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
448 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
449 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
450 test "X$echo_testing_string" = "X$echo_test_string"; then
453 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
454 test "X$echo_testing_string" = 'X\t' &&
455 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
456 test "X$echo_testing_string" = "X$echo_test_string"; then
457 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
459 SHELL="$CONFIG_SHELL"
461 echo="$CONFIG_SHELL [$]0 --fallback-echo"
462 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
463 test "X$echo_testing_string" = 'X\t' &&
464 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
465 test "X$echo_testing_string" = "X$echo_test_string"; then
466 echo="$CONFIG_SHELL [$]0 --fallback-echo"
468 # maybe with a smaller string...
471 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
472 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
479 if test "$prev" != 'sed 50q "[$]0"'; then
480 echo_test_string=`eval $prev`
481 export echo_test_string
482 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
484 # Oops. We lost completely, so just stick with echo.
493 # Copy echo and quote the copy suitably for passing to libtool from
494 # the Makefile, instead of quoting the original, which is used later.
496 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
497 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
502 ])# _LT_AC_PROG_ECHO_BACKSLASH
504 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
505 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
506 # ------------------------------------------------------------------
507 AC_DEFUN(_LT_AC_TRY_DLOPEN_SELF,
508 [if test "$cross_compiling" = yes; then :
511 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
512 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
513 lt_status=$lt_dlunknown
514 cat > conftest.$ac_ext <<EOF
515 [#line __oline__ "configure"
516 #include "confdefs.h"
525 # define LT_DLGLOBAL RTLD_GLOBAL
528 # define LT_DLGLOBAL DL_GLOBAL
530 # define LT_DLGLOBAL 0
534 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
535 find out it does not work in some platform. */
536 #ifndef LT_DLLAZY_OR_NOW
538 # define LT_DLLAZY_OR_NOW RTLD_LAZY
541 # define LT_DLLAZY_OR_NOW DL_LAZY
544 # define LT_DLLAZY_OR_NOW RTLD_NOW
547 # define LT_DLLAZY_OR_NOW DL_NOW
549 # define LT_DLLAZY_OR_NOW 0
557 extern "C" void exit (int);
563 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
564 int status = $lt_dlunknown;
568 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
569 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
570 /* dlclose (self); */
576 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
577 (./conftest; exit; ) 2>/dev/null
580 x$lt_dlno_uscore) $1 ;;
581 x$lt_dlneed_uscore) $2 ;;
582 x$lt_unknown|x*) $3 ;;
590 ])# _LT_AC_TRY_DLOPEN_SELF
592 # AC_LIBTOOL_DLOPEN_SELF
593 # -------------------
594 AC_DEFUN(AC_LIBTOOL_DLOPEN_SELF,
595 [if test "x$enable_dlopen" != xyes; then
596 enable_dlopen=unknown
597 enable_dlopen_self=unknown
598 enable_dlopen_self_static=unknown
605 lt_cv_dlopen="load_add_on"
607 lt_cv_dlopen_self=yes
610 cygwin* | mingw* | pw32*)
611 lt_cv_dlopen="LoadLibrary"
616 AC_CHECK_LIB(dl, dlopen, [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
617 [AC_CHECK_FUNC(dlopen, lt_cv_dlopen="dlopen",
618 [AC_CHECK_FUNC(shl_load, lt_cv_dlopen="shl_load",
619 [AC_CHECK_LIB(svld, dlopen,
620 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
621 [AC_CHECK_LIB(dld, shl_load,
622 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
630 if test "x$lt_cv_dlopen" != xno; then
636 case "$lt_cv_dlopen" in
638 save_CPPFLAGS="$CPP_FLAGS"
639 AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
640 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
642 save_LDFLAGS="$LDFLAGS"
643 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
646 LIBS="$lt_cv_dlopen_libs $LIBS"
648 AC_CACHE_CHECK([whether a program can dlopen itself],
649 lt_cv_dlopen_self, [dnl
650 _LT_AC_TRY_DLOPEN_SELF(
651 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
652 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
655 if test "x$lt_cv_dlopen_self" = xyes; then
656 LDFLAGS="$LDFLAGS $link_static_flag"
657 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
658 lt_cv_dlopen_self_static, [dnl
659 _LT_AC_TRY_DLOPEN_SELF(
660 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
661 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
665 CPPFLAGS="$save_CPPFLAGS"
666 LDFLAGS="$save_LDFLAGS"
671 case "$lt_cv_dlopen_self" in
672 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
673 *) enable_dlopen_self=unknown ;;
676 case "$lt_cv_dlopen_self_static" in
677 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
678 *) enable_dlopen_self_static=unknown ;;
681 ])# AC_LIBTOOL_DLOPEN_SELF
683 AC_DEFUN([_LT_AC_LTCONFIG_HACK],
684 [AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])dnl
685 # Sed substitution that helps us do robust quoting. It backslashifies
686 # metacharacters that are still active within double-quoted strings.
688 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
690 # Same as above, but do not quote variable references.
691 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
693 # Sed substitution to delay expansion of an escaped shell variable in a
694 # double_quote_subst'ed string.
695 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
701 default_ofile=libtool
704 # All known linkers require a `.a' archive for static linking (except M$VC,
705 # which needs '.lib').
707 ltmain="$ac_aux_dir/ltmain.sh"
708 ofile="$default_ofile"
709 with_gnu_ld="$lt_cv_prog_gnu_ld"
710 need_locks="$enable_libtool_lock"
715 # Set sane defaults for various variables
716 test -z "$AR" && AR=ar
717 test -z "$AR_FLAGS" && AR_FLAGS=cru
718 test -z "$AS" && AS=as
719 test -z "$CC" && CC=cc
720 test -z "$DLLTOOL" && DLLTOOL=dlltool
721 test -z "$LD" && LD=ld
722 test -z "$LN_S" && LN_S="ln -s"
723 test -z "$MAGIC_CMD" && MAGIC_CMD=file
724 test -z "$NM" && NM=nm
725 test -z "$OBJDUMP" && OBJDUMP=objdump
726 test -z "$RANLIB" && RANLIB=:
727 test -z "$STRIP" && STRIP=:
728 test -z "$ac_objext" && ac_objext=o
730 if test x"$host" != x"$build"; then
731 ac_tool_prefix=${host_alias}-
736 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
739 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
744 # AIX sometimes has problems with the GCC collect2 program. For some
745 # reason, if we set the COLLECT_NAMES environment variable, the problems
746 # vanish in a puff of smoke.
747 if test "X${COLLECT_NAMES+set}" != Xset; then
754 # Determine commands to create old-style static archives.
755 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
756 old_postinstall_cmds='chmod 644 $oldlib'
757 old_postuninstall_cmds=
759 if test -n "$RANLIB"; then
760 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
761 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
764 # Allow CC to be a program name with arguments.
768 ## FIXME: this should be a separate macro
770 AC_MSG_CHECKING([for objdir])
771 rm -f .libs 2>/dev/null
772 mkdir .libs 2>/dev/null
773 if test -d .libs; then
776 # MS-DOS does not allow filenames that begin with a dot.
779 rmdir .libs 2>/dev/null
780 AC_MSG_RESULT($objdir)
785 ## FIXME: this should be a separate macro
787 AC_ARG_WITH(pic, [dnl
788 --with-pic try to use only PIC/non-PIC objects [default=use both]],
789 pic_mode="$withval", pic_mode=default)
790 test -z "$pic_mode" && pic_mode=default
792 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
793 # in isolation, and that seeing it set (from the cache) indicates that
794 # the associated values are set (in the cache) correctly too.
795 AC_MSG_CHECKING([for $compiler option to produce PIC])
796 AC_CACHE_VAL(lt_cv_prog_cc_pic,
800 lt_cv_prog_cc_static=
801 lt_cv_prog_cc_no_builtin=
802 lt_cv_prog_cc_can_build_shared=$can_build_shared
804 if test "$GCC" = yes; then
805 lt_cv_prog_cc_wl='-Wl,'
806 lt_cv_prog_cc_static='-static'
809 beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
810 # PIC is the default for these OSes.
813 # Below there is a dirty hack to force normal static linking with -ldl
814 # The problem is because libdl dynamically linked with both libc and
815 # libC (AIX C++ library), which obviously doesn't included in libraries
816 # list by gcc. This cause undefined symbols with -static flags.
817 # This hack allows C programs to be linked with "-static -ldl", but
818 # we not sure about C++ programs.
819 lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
821 cygwin* | mingw* | pw32* | os2*)
822 # This hack is so that the source file can tell whether it is being
823 # built for inclusion in a dll (and should export symbols for example).
824 lt_cv_prog_cc_pic='-DDLL_EXPORT'
827 # FIXME: we need at least 68020 code to build shared libraries, but
828 # adding the `-m68020' flag to GCC prevents building anything better,
830 lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
833 if test -d /usr/nec; then
834 lt_cv_prog_cc_pic=-Kconform_pic
838 lt_cv_prog_cc_pic='-fPIC'
842 # PORTME Check for PIC flags for the system compiler.
845 # All AIX code is PIC.
846 lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
849 hpux9* | hpux10* | hpux11*)
850 # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
851 lt_cv_prog_cc_wl='-Wl,'
852 lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
853 lt_cv_prog_cc_pic='+Z'
857 lt_cv_prog_cc_wl='-Wl,'
858 lt_cv_prog_cc_static='-non_shared'
859 # PIC (with -KPIC) is the default.
862 cygwin* | mingw* | pw32* | os2*)
863 # This hack is so that the source file can tell whether it is being
864 # built for inclusion in a dll (and should export symbols for example).
865 lt_cv_prog_cc_pic='-DDLL_EXPORT'
869 lt_cv_prog_cc_pic='-KPIC'
870 lt_cv_prog_cc_static='-Bstatic'
873 osf3* | osf4* | osf5*)
874 # All OSF/1 code is PIC.
875 lt_cv_prog_cc_wl='-Wl,'
876 lt_cv_prog_cc_static='-non_shared'
880 lt_cv_prog_cc_pic='-Kpic'
881 lt_cv_prog_cc_static='-dn'
882 lt_cv_prog_cc_shlib='-belf'
886 lt_cv_prog_cc_pic='-KPIC'
887 lt_cv_prog_cc_static='-Bstatic'
888 lt_cv_prog_cc_wl='-Wl,'
892 lt_cv_prog_cc_pic='-PIC'
893 lt_cv_prog_cc_static='-Bstatic'
894 lt_cv_prog_cc_wl='-Qoption ld '
897 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
898 lt_cv_prog_cc_pic='-KPIC'
899 lt_cv_prog_cc_static='-Bstatic'
900 if test "x$host_vendor" = xsni; then
901 lt_cv_prog_cc_wl='-LD'
903 lt_cv_prog_cc_wl='-Wl,'
908 lt_cv_prog_cc_pic='-pic'
909 lt_cv_prog_cc_static='-Bstatic'
913 if test -d /usr/nec ;then
914 lt_cv_prog_cc_pic='-Kconform_pic'
915 lt_cv_prog_cc_static='-Bstatic'
920 lt_cv_prog_cc_can_build_shared=no
925 if test -z "$lt_cv_prog_cc_pic"; then
926 AC_MSG_RESULT([none])
928 AC_MSG_RESULT([$lt_cv_prog_cc_pic])
930 # Check to make sure the pic_flag actually works.
931 AC_MSG_CHECKING([if $compiler PIC flag $lt_cv_prog_cc_pic works])
932 AC_CACHE_VAL(lt_cv_prog_cc_pic_works, [dnl
933 save_CFLAGS="$CFLAGS"
934 CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
935 AC_TRY_COMPILE([], [], [dnl
937 hpux9* | hpux10* | hpux11*)
938 # On HP-UX, both CC and GCC only warn that PIC is supported... then
939 # they create non-PIC objects. So, if there were any warnings, we
940 # assume that PIC is not supported.
941 if test -s conftest.err; then
942 lt_cv_prog_cc_pic_works=no
944 lt_cv_prog_cc_pic_works=yes
948 lt_cv_prog_cc_pic_works=yes
952 lt_cv_prog_cc_pic_works=no
954 CFLAGS="$save_CFLAGS"
957 if test "X$lt_cv_prog_cc_pic_works" = Xno; then
959 lt_cv_prog_cc_can_build_shared=no
961 lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
964 AC_MSG_RESULT([$lt_cv_prog_cc_pic_works])
969 # Check for any special shared library compilation flags.
970 if test -n "$lt_cv_prog_cc_shlib"; then
971 AC_MSG_WARN([\`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries])
972 if echo "$old_CC $old_CFLAGS " | [egrep -e "[ ]$lt_cv_prog_cc_shlib[ ]"] >/dev/null; then :
974 AC_MSG_WARN([add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure])
975 lt_cv_prog_cc_can_build_shared=no
979 ## FIXME: this should be a separate macro
981 AC_MSG_CHECKING([if $compiler static flag $lt_cv_prog_cc_static works])
982 AC_CACHE_VAL([lt_cv_prog_cc_static_works], [dnl
983 lt_cv_prog_cc_static_works=no
984 save_LDFLAGS="$LDFLAGS"
985 LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
986 AC_TRY_LINK([], [], [lt_cv_prog_cc_static_works=yes])
987 LDFLAGS="$save_LDFLAGS"
990 # Belt *and* braces to stop my trousers falling down:
991 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
992 AC_MSG_RESULT([$lt_cv_prog_cc_static_works])
994 pic_flag="$lt_cv_prog_cc_pic"
995 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
996 wl="$lt_cv_prog_cc_wl"
997 link_static_flag="$lt_cv_prog_cc_static"
998 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
999 can_build_shared="$lt_cv_prog_cc_can_build_shared"
1004 ## FIXME: this should be a separate macro
1006 # Check to see if options -o and -c are simultaneously supported by compiler
1007 AC_MSG_CHECKING([if $compiler supports -c -o file.$ac_objext])
1008 $rm -r conftest 2>/dev/null
1011 echo "int some_variable = 0;" > conftest.$ac_ext
1013 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1014 # that will create temporary files in the current directory regardless of
1015 # the output directory. Thus, making CWD read-only will cause this test
1016 # to fail, enabling locking or at least warning the user not to do parallel
1019 save_CFLAGS="$CFLAGS"
1020 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
1022 if { (eval echo configure:__oline__: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
1023 # The compiler can only warn and ignore the option if not recognized
1024 # So say no if there are warnings
1025 if test -s out/conftest.err; then
1031 # Append any errors to the config.log.
1032 cat out/conftest.err 1>&AC_FD_CC
1035 AC_MSG_RESULT([$compiler_c_o])
1036 CFLAGS="$save_CFLAGS"
1042 $rm -r conftest 2>/dev/null
1044 if test x"$compiler_c_o" = x"yes"; then
1045 # Check to see if we can write to a .lo
1046 AC_MSG_CHECKING([if $compiler supports -c -o file.lo])
1048 save_CFLAGS="$CFLAGS"
1049 CFLAGS="$CFLAGS -c -o conftest.lo"
1050 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1051 # The compiler can only warn and ignore the option if not recognized
1052 # So say no if there are warnings
1053 if test -s conftest.err; then
1059 AC_MSG_RESULT([$compiler_c_o])
1060 CFLAGS="$save_CFLAGS"
1067 ## FIXME: this should be a separate macro
1069 # Check to see if we can do hard links to lock some files if needed
1070 hard_links="nottested"
1071 if test "$compiler_c_o" = no && test "$need_locks" != no; then
1072 # do not overwrite the value of need_locks provided by the user
1073 AC_MSG_CHECKING([if we can lock with hard links])
1076 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1078 ln conftest.a conftest.b 2>&5 || hard_links=no
1079 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1080 AC_MSG_RESULT([$hard_links])
1081 if test "$hard_links" = no; then
1082 AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1091 ## FIXME: this should be a separate macro
1093 if test "$GCC" = yes; then
1094 # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
1095 AC_MSG_CHECKING([if $compiler supports -fno-rtti -fno-exceptions])
1096 echo "int some_variable = 0;" > conftest.$ac_ext
1097 save_CFLAGS="$CFLAGS"
1098 CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
1099 compiler_rtti_exceptions=no
1100 AC_TRY_COMPILE([], [int some_variable = 0;], [dnl
1101 # The compiler can only warn and ignore the option if not recognized
1102 # So say no if there are warnings
1103 if test -s conftest.err; then
1104 compiler_rtti_exceptions=no
1106 compiler_rtti_exceptions=yes
1109 CFLAGS="$save_CFLAGS"
1110 AC_MSG_RESULT([$compiler_rtti_exceptions])
1112 if test "$compiler_rtti_exceptions" = "yes"; then
1113 no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
1115 no_builtin_flag=' -fno-builtin'
1121 ## FIXME: this should be a separate macro
1123 # See if the linker supports building shared libraries.
1124 AC_MSG_CHECKING([whether the linker ($LD) supports shared libraries])
1126 allow_undefined_flag=
1128 need_lib_prefix=unknown
1129 need_version=unknown
1130 # when you set need_version to no, make sure it does not cause -set_version
1131 # flags to be left without arguments
1133 archive_expsym_cmds=
1134 old_archive_from_new_cmds=
1135 old_archive_from_expsyms_cmds=
1136 export_dynamic_flag_spec=
1137 whole_archive_flag_spec=
1138 thread_safe_flag_spec=
1139 hardcode_into_libs=no
1140 hardcode_libdir_flag_spec=
1141 hardcode_libdir_separator=
1144 hardcode_shlibpath_var=unsupported
1146 link_all_deplibs=unknown
1147 always_export_symbols=no
1148 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
1149 # include_expsyms should be a list of space-separated symbols to be *always*
1150 # included in the symbol list
1152 # exclude_expsyms can be an egrep regular expression of symbols to exclude
1153 # it will be wrapped by ` (' and `)$', so one must not match beginning or
1154 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
1155 # as well as any symbol that contains `d'.
1156 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
1157 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
1158 # platforms (ab)use it in PIC code, but their linkers get confused if
1159 # the symbol is explicitly referenced. Since portable code cannot
1160 # rely on this symbol name, it's probably fine to never include it in
1161 # preloaded symbol tables.
1162 extract_expsyms_cmds=
1165 cygwin* | mingw* | pw32* )
1166 # FIXME: the MSVC++ port hasn't been tested in a loooong time
1167 # When not using gcc, we currently assume that we are using
1168 # Microsoft Visual C++.
1169 if test "$GCC" != yes; then
1177 if test "$with_gnu_ld" = yes; then
1178 # If archive_cmds runs LD, not CC, wlarc should be empty
1181 # See if GNU ld supports shared libraries.
1184 # On AIX, the GNU linker is very broken
1188 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
1189 *** to be unable to reliably create shared libraries on AIX.
1190 *** Therefore, libtool is disabling shared libraries support. If you
1191 *** really care for shared libraries, you may want to modify your PATH
1192 *** so that a non-GNU linker is found, and then restart.
1198 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)'
1199 hardcode_libdir_flag_spec='-L$libdir'
1200 hardcode_minus_L=yes
1202 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1203 # that the semantics of dynamic libraries on AmigaOS, at least up
1204 # to version 4, is to share data among multiple programs linked
1205 # with the same dynamic library. Since this doesn't match the
1206 # behavior of shared libraries on other platforms, we can use
1212 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1213 allow_undefined_flag=unsupported
1214 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
1215 # support --undefined. This deserves some investigation. FIXME
1216 archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1222 cygwin* | mingw* | pw32*)
1223 # hardcode_libdir_flag_spec is actually meaningless, as there is
1224 # no search path for DLLs.
1225 hardcode_libdir_flag_spec='-L$libdir'
1226 allow_undefined_flag=unsupported
1227 always_export_symbols=yes
1229 extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
1230 sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
1231 test -f $output_objdir/impgen.exe || (cd $output_objdir && \
1232 if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
1233 else $CC -o impgen impgen.c ; fi)~
1234 $output_objdir/impgen $dir/$soname > $output_objdir/$soname-def'
1236 old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
1238 # cygwin and mingw dlls have different entry points and sets of symbols
1240 # FIXME: what about values for MSVC?
1241 dll_entry=__cygwin_dll_entry@12
1242 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
1246 dll_entry=_DllMainCRTStartup@12
1247 dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
1251 # mingw and cygwin differ, and it's simplest to just exclude the union
1252 # of the two symbol sets.
1253 dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
1255 # recent cygwin and mingw systems supply a stub DllMain which the user
1256 # can override, but on older systems we have to supply one (in ltdll.c)
1257 if test "x$lt_cv_need_dllmain" = "xyes"; then
1258 ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
1259 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~
1260 test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
1266 # Extract the symbol export list from an `--export-all' def file,
1267 # then regenerate the def file from the symbol export list, so that
1268 # the compiled dll only exports the symbol export list.
1269 # Be careful not to strip the DATA tag left be newer dlltools.
1270 export_symbols_cmds="$ltdll_cmds"'
1271 $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
1272 [sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//"] < $output_objdir/$soname-def > $export_symbols'
1274 # If DATA tags from a recent dlltool are present, honour them!
1275 archive_expsym_cmds='echo EXPORTS > $output_objdir/$soname-def~
1277 cat $export_symbols | while read symbol; do
1280 2) echo " \[$]2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
1281 *) echo " \[$]2 @ \$_lt_hint \[$]3 ; " >> $output_objdir/$soname-def;;
1283 _lt_hint=`expr 1 + \$_lt_hint`;
1286 $CC -Wl,--base-file,$output_objdir/$soname-base '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1287 $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~
1288 $CC -Wl,--base-file,$output_objdir/$soname-base $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags~
1289 $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~
1290 $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $lib '$ltdll_obj'$libobjs $deplibs $compiler_flags'
1294 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1295 archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
1298 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1299 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1304 if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
1308 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
1309 *** create shared libraries on Solaris systems. Therefore, libtool
1310 *** is disabling shared libraries support. We urge you to upgrade GNU
1311 *** binutils to release 2.9.1 or newer. Another option is to modify
1312 *** your PATH or compiler configuration so that the native linker is
1313 *** used, and then restart.
1316 elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1317 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1318 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1325 archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1328 hardcode_shlibpath_var=no
1332 if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
1333 archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
1334 archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
1341 if test "$ld_shlibs" = yes; then
1342 runpath_var=LD_RUN_PATH
1343 hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
1344 export_dynamic_flag_spec='${wl}--export-dynamic'
1346 cygwin* | mingw* | pw32*)
1347 # dlltool doesn't understand --whole-archive et. al.
1348 whole_archive_flag_spec=
1351 # ancient GNU ld didn't support --whole-archive et. al.
1352 if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
1353 whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
1355 whole_archive_flag_spec=
1361 # PORTME fill in a description of your system's linker (not GNU ld)
1364 allow_undefined_flag=unsupported
1365 always_export_symbols=yes
1366 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'
1367 # Note: this linker hardcodes the directories in LIBPATH if there
1368 # are no directories specified by -L.
1369 hardcode_minus_L=yes
1370 if test "$GCC" = yes && test -z "$link_static_flag"; then
1371 # Neither direct hardcoding nor static linking is supported with a
1373 hardcode_direct=unsupported
1378 hardcode_libdir_flag_spec='${wl}-b ${wl}nolibpath ${wl}-b ${wl}libpath:$libdir:/usr/lib:/lib'
1379 hardcode_libdir_separator=':'
1380 if test "$GCC" = yes; then
1381 collect2name=`${CC} -print-prog-name=collect2`
1382 if test -f "$collect2name" && \
1383 strings "$collect2name" | grep resolve_lib_name >/dev/null
1385 # We have reworked collect2
1388 # We have old collect2
1389 hardcode_direct=unsupported
1390 # It fails to find uninstalled libraries when the uninstalled
1391 # path is not listed in the libpath. Setting hardcode_minus_L
1392 # to unsupported forces relinking
1393 hardcode_minus_L=yes
1394 hardcode_libdir_flag_spec='-L$libdir'
1395 hardcode_libdir_separator=
1397 shared_flag='-shared'
1399 shared_flag='${wl}-bM:SRE'
1402 allow_undefined_flag=' ${wl}-berok'
1403 archive_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bexpall ${wl}-bnoentry${allow_undefined_flag}'
1404 archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}'
1405 case "$host_os" in [aix4.[01]|aix4.[01].*])
1406 # According to Greg Wooledge, -bexpall is only supported from AIX 4.2 on
1407 always_export_symbols=yes ;;
1410 # We don't want to build shared libraries on unknown CPU types.
1412 powerpc | rs6000) ;;
1418 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)'
1419 hardcode_libdir_flag_spec='-L$libdir'
1420 hardcode_minus_L=yes
1421 # see comment about different semantics on the GNU ld section
1425 cygwin* | mingw* | pw32*)
1426 # When not using gcc, we currently assume that we are using
1427 # Microsoft Visual C++.
1428 # hardcode_libdir_flag_spec is actually meaningless, as there is
1429 # no search path for DLLs.
1430 hardcode_libdir_flag_spec=' '
1431 allow_undefined_flag=unsupported
1432 # Tell ltmain to make .lib files, not .a files.
1434 # FIXME: Setting linknames here is a bad hack.
1435 archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
1436 # The linker will automatically build a .lib file if we build a DLL.
1437 old_archive_from_new_cmds='true'
1438 # FIXME: Should let the user specify the lib program.
1439 old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
1440 fix_srcfile_path='`cygpath -w "$srcfile"`'
1443 darwin* | rhapsody*)
1444 allow_undefined_flag='-undefined warning'
1445 archive_cmds='$CC `if test "$module" = "yes"; then echo -bundle; else
1446 echo -dynamiclib; fi` -o $lib $libobjs $deplibs $linkopts'
1447 archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
1448 ## What we need is to hardcode the path to the library, not the search path
1449 #hardcode_direct=yes
1450 #hardcode_libdir_flag_spec='-install_name $libdir/$lib'
1451 hardcode_shlibpath_var=no
1452 whole_archive_flag_spec='-all_load'
1459 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
1460 # support. Future versions do this automatically, but an explicit c++rt0.o
1461 # does not break anything, and helps significantly (at the cost of a little
1464 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
1465 hardcode_libdir_flag_spec='-R$libdir'
1467 hardcode_shlibpath_var=no
1470 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
1472 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1474 hardcode_minus_L=yes
1475 hardcode_shlibpath_var=no
1478 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
1480 archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
1481 hardcode_libdir_flag_spec='-R$libdir'
1483 hardcode_shlibpath_var=no
1486 hpux9* | hpux10* | hpux11*)
1488 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' ;;
1489 *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
1491 hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1492 hardcode_libdir_separator=:
1494 hardcode_minus_L=yes # Not in the search PATH, but as the default
1495 # location of the library.
1496 export_dynamic_flag_spec='${wl}-E'
1500 if test "$GCC" = yes; then
1501 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'
1503 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'
1505 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1506 hardcode_libdir_separator=:
1507 link_all_deplibs=yes
1511 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1512 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
1514 archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
1516 hardcode_libdir_flag_spec='-R$libdir'
1518 hardcode_shlibpath_var=no
1522 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linkopts'
1524 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1525 hardcode_libdir_separator=:
1526 hardcode_shlibpath_var=no
1530 archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
1531 hardcode_libdir_flag_spec='-R$libdir'
1533 hardcode_shlibpath_var=no
1537 hardcode_libdir_flag_spec='-L$libdir'
1538 hardcode_minus_L=yes
1539 allow_undefined_flag=unsupported
1540 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'
1541 old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
1545 if test "$GCC" = yes; then
1546 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1547 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'
1549 allow_undefined_flag=' -expect_unresolved \*'
1550 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'
1552 hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1553 hardcode_libdir_separator=:
1556 osf4* | osf5*) # as osf3* with the addition of -msym flag
1557 if test "$GCC" = yes; then
1558 allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
1559 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'
1561 allow_undefined_flag=' -expect_unresolved \*'
1562 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'
1563 archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
1564 $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'
1566 #Both c and cxx compiler support -rpath directly
1567 hardcode_libdir_flag_spec='-rpath $libdir'
1568 hardcode_libdir_separator=:
1572 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1573 hardcode_shlibpath_var=no
1574 runpath_var=LD_RUN_PATH
1575 hardcode_runpath_var=yes
1579 no_undefined_flag=' -z text'
1580 # $CC -shared without GNU ld will not create a library from C++
1581 # object files and a static libstdc++, better avoid it by now
1582 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1583 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1584 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1585 hardcode_libdir_flag_spec='-R$libdir'
1586 hardcode_shlibpath_var=no
1588 [solaris2.[0-5] | solaris2.[0-5].*]) ;;
1589 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
1590 whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
1592 link_all_deplibs=yes
1596 if test "x$host_vendor" = xsequent; then
1597 # Use $CC to link under sequent, because it throws in some extra .o
1598 # files that make .init and .fini sections work.
1599 archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
1601 archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
1603 hardcode_libdir_flag_spec='-L$libdir'
1605 hardcode_minus_L=yes
1606 hardcode_shlibpath_var=no
1610 if test "x$host_vendor" = xsno; then
1611 archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linkopts'
1612 hardcode_direct=yes # is this really true???
1614 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1615 hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1617 runpath_var='LD_RUN_PATH'
1618 hardcode_shlibpath_var=no
1622 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1623 hardcode_shlibpath_var=no
1624 export_dynamic_flag_spec='-Bexport'
1628 no_undefined_flag=' -z text'
1629 # $CC -shared without GNU ld will not create a library from C++
1630 # object files and a static libstdc++, better avoid it by now
1631 archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
1632 archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
1633 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
1634 hardcode_libdir_flag_spec=
1635 hardcode_shlibpath_var=no
1636 runpath_var='LD_RUN_PATH'
1640 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1641 hardcode_libdir_flag_spec='-L$libdir'
1642 hardcode_shlibpath_var=no
1646 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1647 hardcode_libdir_flag_spec='-L$libdir'
1648 hardcode_shlibpath_var=no
1652 if test -d /usr/nec; then
1653 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1654 hardcode_shlibpath_var=no
1655 runpath_var=LD_RUN_PATH
1656 hardcode_runpath_var=yes
1662 archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
1665 hardcode_shlibpath_var=no
1666 hardcode_runpath_var=yes
1667 runpath_var=LD_RUN_PATH
1671 archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
1672 runpath_var='LD_RUN_PATH'
1673 hardcode_shlibpath_var=no
1681 AC_MSG_RESULT([$ld_shlibs])
1682 test "$ld_shlibs" = no && can_build_shared=no
1686 ## FIXME: this should be a separate macro
1688 # Check hardcoding attributes.
1689 AC_MSG_CHECKING([how to hardcode library paths into programs])
1691 if test -n "$hardcode_libdir_flag_spec" || \
1692 test -n "$runpath_var"; then
1694 # We can hardcode non-existant directories.
1695 if test "$hardcode_direct" != no &&
1696 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1697 # have to relink, otherwise we might link with an installed library
1698 # when we should be linking with a yet-to-be-installed one
1699 ## test "$hardcode_shlibpath_var" != no &&
1700 test "$hardcode_minus_L" != no; then
1701 # Linking always hardcodes the temporary library directory.
1702 hardcode_action=relink
1704 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1705 hardcode_action=immediate
1708 # We cannot hardcode anything, or else we can only hardcode existing
1710 hardcode_action=unsupported
1712 AC_MSG_RESULT([$hardcode_action])
1716 ## FIXME: this should be a separate macro
1720 AC_MSG_CHECKING([whether stripping libraries is possible])
1721 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1722 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1723 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1724 AC_MSG_RESULT([yes])
1731 reload_cmds='$LD$reload_flag -o $output$reload_objs'
1732 test -z "$deplibs_check_method" && deplibs_check_method=unknown
1734 ## FIXME: this should be a separate macro
1736 # PORTME Fill in your ld.so characteristics
1737 AC_MSG_CHECKING([dynamic linker characteristics])
1739 libname_spec='lib$name'
1746 shlibpath_overrides_runpath=unknown
1748 dynamic_linker="$host_os ld.so"
1749 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1750 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1755 library_names_spec='${libname}${release}.so$versuffix $libname.a'
1756 shlibpath_var=LIBPATH
1758 # AIX has no versioning support, so we append a major version to the name.
1759 soname_spec='${libname}${release}.so$major'
1764 # AIX has no versioning support, so currently we can not hardcode correct
1765 # soname into executable. Probably we can add versioning support to
1766 # collect2, so additional links can be useful in future.
1767 # We preserve .a as extension for shared libraries though AIX4.2
1768 # and later linker supports .so
1769 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.a'
1770 shlibpath_var=LIBPATH
1774 library_names_spec='$libname.ixlibrary $libname.a'
1775 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1776 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'
1780 library_names_spec='${libname}.so'
1781 dynamic_linker="$host_os ld.so"
1782 shlibpath_var=LIBRARY_PATH
1788 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1789 soname_spec='${libname}${release}.so$major'
1790 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1791 shlibpath_var=LD_LIBRARY_PATH
1792 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1793 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1794 export_dynamic_flag_spec=-rdynamic
1795 # the default ld.so.conf also contains /usr/contrib/lib and
1796 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1797 # libtool to hard-code these into programs
1800 cygwin* | mingw* | pw32*)
1801 version_type=windows
1804 if test "$GCC" = yes; then
1805 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll'
1807 library_names_spec='${libname}`echo ${release} | [sed -e 's/[.]/-/g']`${versuffix}.dll $libname.lib'
1809 dynamic_linker='Win32 ld.exe'
1810 # FIXME: first we should search . and the directory the executable is in
1814 darwin* | rhapsody*)
1817 library_names_spec='${libname}.`if test "$module" = "yes"; then echo so; else echo dylib; fi`'
1818 shlibpath_overrides_runpath=yes
1819 shlibpath_var=DYLD_LIBRARY_PATH
1820 postinstall_cmds='chmod +x $lib'
1828 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1829 version_type=freebsd-$objformat
1830 case "$version_type" in
1832 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1837 library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
1841 shlibpath_var=LD_LIBRARY_PATH
1844 shlibpath_overrides_runpath=yes
1847 shlibpath_overrides_runpath=no
1848 hardcode_into_libs=yes
1857 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
1858 soname_spec='${libname}${release}.so$major'
1859 shlibpath_var=LD_LIBRARY_PATH
1860 hardcode_into_libs=yes
1863 hpux9* | hpux10* | hpux11*)
1864 # Give a soname corresponding to the major version so that dld.sl refuses to
1865 # link against other versions.
1866 dynamic_linker="$host_os dld.sl"
1870 shlibpath_var=SHLIB_PATH
1871 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1872 library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
1873 soname_spec='${libname}${release}.sl$major'
1874 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1875 postinstall_cmds='chmod 555 $lib'
1882 soname_spec='${libname}${release}.so$major'
1883 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
1889 case "$LD" in # libtool.m4 will add one of these switches to LD
1890 *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
1891 *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
1892 *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
1893 *) libsuff= shlibsuff= libmagic=never-match;;
1897 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1898 shlibpath_overrides_runpath=no
1899 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1900 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1903 # No shared lib support for Linux oldld, aout, or coff.
1904 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
1908 # This must be Linux ELF.
1913 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1914 soname_spec='${libname}${release}.so$major'
1915 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1916 shlibpath_var=LD_LIBRARY_PATH
1917 shlibpath_overrides_runpath=no
1918 # This implies no fast_install, which is unacceptable.
1919 # Some rework will be needed to allow for fast_install
1920 # before this can be enabled.
1921 hardcode_into_libs=yes
1923 # We used to test for /lib/ld.so.1 and disable shared libraries on
1924 # powerpc, because MkLinux only supported shared libraries with the
1925 # GNU dynamic linker. Since this was broken with cross compilers,
1926 # most powerpc-linux boxes support dynamic linking these days and
1927 # people can always --disable-shared, the test was removed, and we
1928 # assume the GNU/Linux dynamic linker is in use.
1929 dynamic_linker='GNU/Linux ld.so'
1934 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1935 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1936 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1937 dynamic_linker='NetBSD (a.out) ld.so'
1939 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
1940 soname_spec='${libname}${release}.so$major'
1941 dynamic_linker='NetBSD ld.elf_so'
1943 shlibpath_var=LD_LIBRARY_PATH
1944 shlibpath_overrides_runpath=yes
1945 hardcode_into_libs=yes
1950 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1951 shlibpath_var=LD_LIBRARY_PATH
1952 shlibpath_overrides_runpath=yes
1957 if test "$with_gnu_ld" = yes; then
1961 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
1962 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1963 shlibpath_var=LD_LIBRARY_PATH
1967 libname_spec='$name'
1969 library_names_spec='$libname.dll $libname.a'
1970 dynamic_linker='OS/2 ld.exe'
1971 shlibpath_var=LIBPATH
1974 osf3* | osf4* | osf5*)
1977 soname_spec='${libname}${release}.so'
1978 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
1979 shlibpath_var=LD_LIBRARY_PATH
1980 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1981 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1986 soname_spec='${libname}${release}.so$major'
1987 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1988 shlibpath_var=LD_LIBRARY_PATH
1995 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
1996 soname_spec='${libname}${release}.so$major'
1997 shlibpath_var=LD_LIBRARY_PATH
1998 shlibpath_overrides_runpath=yes
1999 hardcode_into_libs=yes
2000 # ldd complains unless libraries are executable
2001 postinstall_cmds='chmod +x $lib'
2006 library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
2007 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
2008 shlibpath_var=LD_LIBRARY_PATH
2009 shlibpath_overrides_runpath=yes
2010 if test "$with_gnu_ld" = yes; then
2016 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2018 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2019 soname_spec='${libname}${release}.so$major'
2020 shlibpath_var=LD_LIBRARY_PATH
2021 case "$host_vendor" in
2023 shlibpath_overrides_runpath=no
2028 shlibpath_overrides_runpath=no
2029 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
2036 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2037 soname_spec='${libname}${release}.so$major'
2038 shlibpath_var=LD_LIBRARY_PATH
2045 library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
2046 soname_spec='${libname}${release}.so$major'
2047 shlibpath_var=LD_LIBRARY_PATH
2051 if test -d /usr/nec ;then
2053 library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
2054 soname_spec='$libname.so.$major'
2055 shlibpath_var=LD_LIBRARY_PATH
2063 AC_MSG_RESULT([$dynamic_linker])
2064 test "$dynamic_linker" = no && can_build_shared=no
2068 ## FIXME: this should be a separate macro
2070 # Report the final consequences.
2071 AC_MSG_CHECKING([if libtool supports shared libraries])
2072 AC_MSG_RESULT([$can_build_shared])
2076 if test "$hardcode_action" = relink; then
2077 # Fast installation is not supported
2078 enable_fast_install=no
2079 elif test "$shlibpath_overrides_runpath" = yes ||
2080 test "$enable_shared" = no; then
2081 # Fast installation is not necessary
2082 enable_fast_install=needless
2085 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
2086 if test "$GCC" = yes; then
2087 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
2090 AC_LIBTOOL_DLOPEN_SELF
2092 ## FIXME: this should be a separate macro
2094 if test "$enable_shared" = yes && test "$GCC" = yes; then
2095 case "$archive_cmds" in
2097 # FIXME: we may have to deal with multi-command sequences.
2100 # Test whether the compiler implicitly links with -lc since on some
2101 # systems, -lgcc has to come before -lc. If gcc already passes -lc
2102 # to ld, don't add -lc before -lgcc.
2103 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
2104 AC_CACHE_VAL([lt_cv_archive_cmds_need_lc],
2106 echo 'static int dummy;' > conftest.$ac_ext
2108 if AC_TRY_EVAL(ac_compile); then
2111 libobjs=conftest.$ac_objext
2113 wl=$lt_cv_prog_cc_wl
2119 save_allow_undefined_flag=$allow_undefined_flag
2120 allow_undefined_flag=
2121 if AC_TRY_EVAL(archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
2123 lt_cv_archive_cmds_need_lc=no
2125 lt_cv_archive_cmds_need_lc=yes
2127 allow_undefined_flag=$save_allow_undefined_flag
2129 cat conftest.err 1>&5
2131 AC_MSG_RESULT([$lt_cv_archive_cmds_need_lc])
2135 need_lc=${lt_cv_archive_cmds_need_lc-yes}
2139 ## FIXME: this should be a separate macro
2141 # The second clause should only fire when bootstrapping the
2142 # libtool distribution, otherwise you forgot to ship ltmain.sh
2143 # with your package, and you will get complaints that there are
2144 # no rules to generate ltmain.sh.
2145 if test -f "$ltmain"; then
2148 # If there is no Makefile yet, we rely on a make rule to execute
2149 # `config.status --recheck' to rerun these tests and create the
2150 # libtool script then.
2151 test -f Makefile && make "$ltmain"
2154 if test -f "$ltmain"; then
2155 trap "$rm \"${ofile}T\"; exit 1" 1 2 15
2158 echo creating $ofile
2160 # Now quote all the things that may contain metacharacters while being
2161 # careful not to overquote the AC_SUBSTed values. We take copies of the
2162 # variables and quote the copies for generation of the libtool script.
2163 for var in echo old_CC old_CFLAGS \
2164 AR AR_FLAGS CC LD LN_S NM SHELL \
2165 reload_flag reload_cmds wl \
2166 pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
2167 thread_safe_flag_spec whole_archive_flag_spec libname_spec \
2168 library_names_spec soname_spec \
2169 RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
2170 old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
2171 postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
2172 old_striplib striplib file_magic_cmd export_symbols_cmds \
2173 deplibs_check_method allow_undefined_flag no_undefined_flag \
2174 finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
2175 hardcode_libdir_flag_spec hardcode_libdir_separator \
2176 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
2177 compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
2180 reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
2181 old_postinstall_cmds | old_postuninstall_cmds | \
2182 export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
2183 extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
2184 postinstall_cmds | postuninstall_cmds | \
2185 finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
2186 # Double-quote double-evaled strings.
2187 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
2190 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
2195 cat <<__EOF__ > "${ofile}T"
2198 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
2199 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
2200 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
2202 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
2203 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
2205 # This program is free software; you can redistribute it and/or modify
2206 # it under the terms of the GNU General Public License as published by
2207 # the Free Software Foundation; either version 2 of the License, or
2208 # (at your option) any later version.
2210 # This program is distributed in the hope that it will be useful, but
2211 # WITHOUT ANY WARRANTY; without even the implied warranty of
2212 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
2213 # General Public License for more details.
2215 # You should have received a copy of the GNU General Public License
2216 # along with this program; if not, write to the Free Software
2217 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.
2219 # As a special exception to the GNU General Public License, if you
2220 # distribute this file as part of a program that contains a
2221 # configuration script generated by Autoconf, you may include it under
2222 # the same distribution terms that you use for the rest of that program.
2224 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
2225 Xsed="sed -e s/^X//"
2227 # The HP-UX ksh and POSIX shell print the target directory to stdout
2229 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
2231 # ### BEGIN LIBTOOL CONFIG
2233 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
2235 # Shell to use when invoking shell scripts.
2238 # Whether or not to build shared libraries.
2239 build_libtool_libs=$enable_shared
2241 # Whether or not to add -lc for building shared libraries.
2242 build_libtool_need_lc=$need_lc
2244 # Whether or not to build static libraries.
2245 build_old_libs=$enable_static
2247 # Whether or not to optimize for fast installation.
2248 fast_install=$enable_fast_install
2251 host_alias=$host_alias
2254 # An echo program that does not interpret backslashes.
2259 AR_FLAGS=$lt_AR_FLAGS
2261 # The default C compiler.
2264 # Is the compiler the GNU C compiler?
2267 # The linker used to build libraries.
2270 # Whether we need hard or soft links.
2273 # A BSD-compatible nm program.
2276 # A symbol stripping program
2279 # Used to examine libraries when file_magic_cmd begins "file"
2280 MAGIC_CMD=$MAGIC_CMD
2282 # Used on cygwin: DLL creation program.
2285 # Used on cygwin: object dumper.
2288 # Used on cygwin: assembler.
2291 # The name of the directory that contains temporary libtool files.
2294 # How to create reloadable object files.
2295 reload_flag=$lt_reload_flag
2296 reload_cmds=$lt_reload_cmds
2298 # How to pass a linker flag through the compiler.
2301 # Object file suffix (normally "o").
2304 # Old archive suffix (normally "a").
2307 # Executable file suffix (normally "").
2310 # Additional compiler flags for building library objects.
2311 pic_flag=$lt_pic_flag
2314 # Does compiler simultaneously support -c and -o options?
2315 compiler_c_o=$lt_compiler_c_o
2317 # Can we write directly to a .lo ?
2318 compiler_o_lo=$lt_compiler_o_lo
2320 # Must we lock files when doing compilation ?
2321 need_locks=$lt_need_locks
2323 # Do we need the lib prefix for modules?
2324 need_lib_prefix=$need_lib_prefix
2326 # Do we need a version for libraries?
2327 need_version=$need_version
2329 # Whether dlopen is supported.
2330 dlopen_support=$enable_dlopen
2332 # Whether dlopen of programs is supported.
2333 dlopen_self=$enable_dlopen_self
2335 # Whether dlopen of statically linked programs is supported.
2336 dlopen_self_static=$enable_dlopen_self_static
2338 # Compiler flag to prevent dynamic linking.
2339 link_static_flag=$lt_link_static_flag
2341 # Compiler flag to turn off builtin functions.
2342 no_builtin_flag=$lt_no_builtin_flag
2344 # Compiler flag to allow reflexive dlopens.
2345 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
2347 # Compiler flag to generate shared objects directly from archives.
2348 whole_archive_flag_spec=$lt_whole_archive_flag_spec
2350 # Compiler flag to generate thread-safe objects.
2351 thread_safe_flag_spec=$lt_thread_safe_flag_spec
2353 # Library versioning type.
2354 version_type=$version_type
2356 # Format of library name prefix.
2357 libname_spec=$lt_libname_spec
2359 # List of archive names. First name is the real one, the rest are links.
2360 # The last name is the one that the linker finds with -lNAME.
2361 library_names_spec=$lt_library_names_spec
2363 # The coded name of the library, if different from the real name.
2364 soname_spec=$lt_soname_spec
2366 # Commands used to build and install an old-style archive.
2368 old_archive_cmds=$lt_old_archive_cmds
2369 old_postinstall_cmds=$lt_old_postinstall_cmds
2370 old_postuninstall_cmds=$lt_old_postuninstall_cmds
2372 # Create an old-style archive from a shared archive.
2373 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
2375 # Create a temporary old-style archive to link instead of a shared archive.
2376 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
2378 # Commands used to build and install a shared archive.
2379 archive_cmds=$lt_archive_cmds
2380 archive_expsym_cmds=$lt_archive_expsym_cmds
2381 postinstall_cmds=$lt_postinstall_cmds
2382 postuninstall_cmds=$lt_postuninstall_cmds
2384 # Commands to strip libraries.
2385 old_striplib=$lt_old_striplib
2386 striplib=$lt_striplib
2388 # Method to check whether dependent libraries are shared objects.
2389 deplibs_check_method=$lt_deplibs_check_method
2391 # Command to use when deplibs_check_method == file_magic.
2392 file_magic_cmd=$lt_file_magic_cmd
2394 # Flag that allows shared libraries with undefined symbols to be built.
2395 allow_undefined_flag=$lt_allow_undefined_flag
2397 # Flag that forces no undefined symbols.
2398 no_undefined_flag=$lt_no_undefined_flag
2400 # Commands used to finish a libtool library installation in a directory.
2401 finish_cmds=$lt_finish_cmds
2403 # Same as above, but a single script fragment to be evaled but not shown.
2404 finish_eval=$lt_finish_eval
2406 # Take the output of nm and produce a listing of raw symbols and C names.
2407 global_symbol_pipe=$lt_global_symbol_pipe
2409 # Transform the output of nm in a proper C declaration
2410 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
2412 # This is the shared library runtime path variable.
2413 runpath_var=$runpath_var
2415 # This is the shared library path variable.
2416 shlibpath_var=$shlibpath_var
2418 # Is shlibpath searched before the hard-coded library search path?
2419 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
2421 # How to hardcode a shared library path into an executable.
2422 hardcode_action=$hardcode_action
2424 # Whether we should hardcode library paths into libraries.
2425 hardcode_into_libs=$hardcode_into_libs
2427 # Flag to hardcode \$libdir into a binary during linking.
2428 # This must work even if \$libdir does not exist.
2429 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
2431 # Whether we need a single -rpath flag with a separated argument.
2432 hardcode_libdir_separator=$lt_hardcode_libdir_separator
2434 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
2436 hardcode_direct=$hardcode_direct
2438 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
2440 hardcode_minus_L=$hardcode_minus_L
2442 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
2443 # the resulting binary.
2444 hardcode_shlibpath_var=$hardcode_shlibpath_var
2446 # Variables whose values should be saved in libtool wrapper scripts and
2447 # restored at relink time.
2448 variables_saved_for_relink="$variables_saved_for_relink"
2450 # Whether libtool must link a program against all its dependency libraries.
2451 link_all_deplibs=$link_all_deplibs
2453 # Compile-time system search path for libraries
2454 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
2456 # Run-time system search path for libraries
2457 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
2459 # Fix the shell variable \$srcfile for the compiler.
2460 fix_srcfile_path="$fix_srcfile_path"
2462 # Set to yes if exported symbols are required.
2463 always_export_symbols=$always_export_symbols
2465 # The commands to list exported symbols.
2466 export_symbols_cmds=$lt_export_symbols_cmds
2468 # The commands to extract the exported symbol list from a shared archive.
2469 extract_expsyms_cmds=$lt_extract_expsyms_cmds
2471 # Symbols that should not be listed in the preloaded symbols.
2472 exclude_expsyms=$lt_exclude_expsyms
2474 # Symbols that must always be exported.
2475 include_expsyms=$lt_include_expsyms
2477 # ### END LIBTOOL CONFIG
2483 cat <<\EOF >> "${ofile}T"
2485 # AIX sometimes has problems with the GCC collect2 program. For some
2486 # reason, if we set the COLLECT_NAMES environment variable, the problems
2487 # vanish in a puff of smoke.
2488 if test "X${COLLECT_NAMES+set}" != Xset; then
2490 export COLLECT_NAMES
2497 cygwin* | mingw* | pw32* | os2*)
2498 cat <<'EOF' >> "${ofile}T"
2499 # This is a source program that is used to create dlls on Windows
2500 # Don't remove nor modify the starting and closing comments
2501 # /* ltdll.c starts here */
2502 # #define WIN32_LEAN_AND_MEAN
2503 # #include <windows.h>
2504 # #undef WIN32_LEAN_AND_MEAN
2505 # #include <stdio.h>
2507 # #ifndef __CYGWIN__
2508 # # ifdef __CYGWIN32__
2509 # # define __CYGWIN__ __CYGWIN32__
2513 # #ifdef __cplusplus
2516 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
2517 # #ifdef __cplusplus
2522 # #include <cygwin/cygwin_dll.h>
2523 # DECLARE_CYGWIN_DLL( DllMain );
2525 # HINSTANCE __hDllInstance_base;
2528 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
2530 # __hDllInstance_base = hInst;
2533 # /* ltdll.c ends here */
2534 # This is a source program that is used to create import libraries
2535 # on Windows for dlls which lack them. Don't remove nor modify the
2536 # starting and closing comments
2537 # /* impgen.c starts here */
2538 # /* Copyright (C) 1999-2000 Free Software Foundation, Inc.
2540 # This file is part of GNU libtool.
2542 # This program is free software; you can redistribute it and/or modify
2543 # it under the terms of the GNU General Public License as published by
2544 # the Free Software Foundation; either version 2 of the License, or
2545 # (at your option) any later version.
2547 # This program is distributed in the hope that it will be useful,
2548 # but WITHOUT ANY WARRANTY; without even the implied warranty of
2549 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2550 # GNU General Public License for more details.
2552 # You should have received a copy of the GNU General Public License
2553 # along with this program; if not, write to the Free Software
2554 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02110-1301, USA.
2557 # #include <stdio.h> /* for printf() */
2558 # #include <unistd.h> /* for open(), lseek(), read() */
2559 # #include <fcntl.h> /* for O_RDONLY, O_BINARY */
2560 # #include <string.h> /* for strdup() */
2562 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
2564 # #define O_BINARY 0
2567 # static unsigned int
2568 # pe_get16 (fd, offset)
2572 # unsigned char b[2];
2573 # lseek (fd, offset, SEEK_SET);
2575 # return b[0] + (b[1]<<8);
2578 # static unsigned int
2579 # pe_get32 (fd, offset)
2583 # unsigned char b[4];
2584 # lseek (fd, offset, SEEK_SET);
2586 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2589 # static unsigned int
2593 # unsigned char *b = ptr;
2594 # return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
2603 # unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
2604 # unsigned long export_rva, export_size, nsections, secptr, expptr;
2605 # unsigned long name_rvas, nexp;
2606 # unsigned char *expdata, *erva;
2607 # char *filename, *dll_name;
2609 # filename = argv[1];
2611 # dll = open(filename, O_RDONLY|O_BINARY);
2615 # dll_name = filename;
2617 # for (i=0; filename[i]; i++)
2618 # if (filename[i] == '/' || filename[i] == '\\' || filename[i] == ':')
2619 # dll_name = filename + i +1;
2621 # pe_header_offset = pe_get32 (dll, 0x3c);
2622 # opthdr_ofs = pe_header_offset + 4 + 20;
2623 # num_entries = pe_get32 (dll, opthdr_ofs + 92);
2625 # if (num_entries < 1) /* no exports */
2628 # export_rva = pe_get32 (dll, opthdr_ofs + 96);
2629 # export_size = pe_get32 (dll, opthdr_ofs + 100);
2630 # nsections = pe_get16 (dll, pe_header_offset + 4 +2);
2631 # secptr = (pe_header_offset + 4 + 20 +
2632 # pe_get16 (dll, pe_header_offset + 4 + 16));
2635 # for (i = 0; i < nsections; i++)
2638 # unsigned long secptr1 = secptr + 40 * i;
2639 # unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
2640 # unsigned long vsize = pe_get32 (dll, secptr1 + 16);
2641 # unsigned long fptr = pe_get32 (dll, secptr1 + 20);
2642 # lseek(dll, secptr1, SEEK_SET);
2643 # read(dll, sname, 8);
2644 # if (vaddr <= export_rva && vaddr+vsize > export_rva)
2646 # expptr = fptr + (export_rva - vaddr);
2647 # if (export_rva + export_size > vaddr + vsize)
2648 # export_size = vsize - (export_rva - vaddr);
2653 # expdata = (unsigned char*)malloc(export_size);
2654 # lseek (dll, expptr, SEEK_SET);
2655 # read (dll, expdata, export_size);
2656 # erva = expdata - export_rva;
2658 # nexp = pe_as32 (expdata+24);
2659 # name_rvas = pe_as32 (expdata+32);
2661 # printf ("EXPORTS\n");
2662 # for (i = 0; i<nexp; i++)
2664 # unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
2665 # printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
2670 # /* impgen.c ends here */
2676 # We use sed instead of cat because bash on DJGPP gets confused if
2677 # if finds mixed CR/LF and LF-only lines. Since sed operates in
2678 # text mode, it properly converts lines to CR/LF. This bash problem
2679 # is reportedly fixed, but why not run on old versions too?
2680 sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
2682 mv -f "${ofile}T" "$ofile" || \
2683 (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
2689 ])# _LT_AC_LTCONFIG_HACK
2691 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support
2692 AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])])
2694 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's
2695 AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])])
2697 # AC_ENABLE_SHARED - implement the --enable-shared flag
2698 # Usage: AC_ENABLE_SHARED[(DEFAULT)]
2699 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
2701 AC_DEFUN([AC_ENABLE_SHARED],
2702 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2703 AC_ARG_ENABLE(shared,
2704 changequote(<<, >>)dnl
2705 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
2706 changequote([, ])dnl
2707 [p=${PACKAGE-default}
2708 case "$enableval" in
2709 yes) enable_shared=yes ;;
2710 no) enable_shared=no ;;
2713 # Look at the argument we got. We use all the common list separators.
2714 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2715 for pkg in $enableval; do
2716 if test "X$pkg" = "X$p"; then
2723 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl
2726 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared
2727 AC_DEFUN([AC_DISABLE_SHARED],
2728 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2729 AC_ENABLE_SHARED(no)])
2731 # AC_ENABLE_STATIC - implement the --enable-static flag
2732 # Usage: AC_ENABLE_STATIC[(DEFAULT)]
2733 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
2735 AC_DEFUN([AC_ENABLE_STATIC],
2736 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2737 AC_ARG_ENABLE(static,
2738 changequote(<<, >>)dnl
2739 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
2740 changequote([, ])dnl
2741 [p=${PACKAGE-default}
2742 case "$enableval" in
2743 yes) enable_static=yes ;;
2744 no) enable_static=no ;;
2747 # Look at the argument we got. We use all the common list separators.
2748 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2749 for pkg in $enableval; do
2750 if test "X$pkg" = "X$p"; then
2757 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl
2760 # AC_DISABLE_STATIC - set the default static flag to --disable-static
2761 AC_DEFUN([AC_DISABLE_STATIC],
2762 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2763 AC_ENABLE_STATIC(no)])
2766 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag
2767 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)]
2768 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to
2770 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2771 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2772 AC_ARG_ENABLE(fast-install,
2773 changequote(<<, >>)dnl
2774 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
2775 changequote([, ])dnl
2776 [p=${PACKAGE-default}
2777 case "$enableval" in
2778 yes) enable_fast_install=yes ;;
2779 no) enable_fast_install=no ;;
2781 enable_fast_install=no
2782 # Look at the argument we got. We use all the common list separators.
2783 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2784 for pkg in $enableval; do
2785 if test "X$pkg" = "X$p"; then
2786 enable_fast_install=yes
2792 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl
2795 # AC_DISABLE_FAST_INSTALL - set the default to --disable-fast-install
2796 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2797 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2798 AC_ENABLE_FAST_INSTALL(no)])
2800 # AC_LIBTOOL_PICMODE - implement the --with-pic flag
2801 # Usage: AC_LIBTOOL_PICMODE[(MODE)]
2802 # Where MODE is either `yes' or `no'. If omitted, it defaults to
2804 AC_DEFUN([AC_LIBTOOL_PICMODE],
2805 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2806 pic_mode=ifelse($#,1,$1,default)])
2809 # AC_PATH_TOOL_PREFIX - find a file program which can recognise shared library
2810 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2811 [AC_MSG_CHECKING([for $1])
2812 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2813 [case "$MAGIC_CMD" in
2815 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2818 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
2821 ac_save_MAGIC_CMD="$MAGIC_CMD"
2822 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
2823 dnl $ac_dummy forces splitting on constant user-supplied paths.
2824 dnl POSIX.2 word splitting is done only on the output of word expansions,
2825 dnl not every word. This closes a longstanding sh security hole.
2826 ac_dummy="ifelse([$2], , $PATH, [$2])"
2827 for ac_dir in $ac_dummy; do
2828 test -z "$ac_dir" && ac_dir=.
2829 if test -f $ac_dir/$1; then
2830 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2831 if test -n "$file_magic_test_file"; then
2832 case "$deplibs_check_method" in
2834 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2835 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2836 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2837 egrep "$file_magic_regex" > /dev/null; then
2842 *** Warning: the command libtool uses to detect shared libraries,
2843 *** $file_magic_cmd, produces output that libtool cannot recognize.
2844 *** The result is that libtool may fail to recognize shared libraries
2845 *** as such. This will affect the creation of libtool libraries that
2846 *** depend on shared libraries, but programs linked with such libtool
2847 *** libraries will work regardless of this problem. Nevertheless, you
2848 *** may want to report the problem to your system manager and/or to
2849 *** bug-libtool@gnu.org
2859 MAGIC_CMD="$ac_save_MAGIC_CMD"
2862 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2863 if test -n "$MAGIC_CMD"; then
2864 AC_MSG_RESULT($MAGIC_CMD)
2871 # AC_PATH_MAGIC - find a file program which can recognise a shared library
2872 AC_DEFUN([AC_PATH_MAGIC],
2873 [AC_REQUIRE([AC_CHECK_TOOL_PREFIX])dnl
2874 AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin:$PATH)
2875 if test -z "$lt_cv_path_MAGIC_CMD"; then
2876 if test -n "$ac_tool_prefix"; then
2877 AC_PATH_TOOL_PREFIX(file, /usr/bin:$PATH)
2885 # AC_PROG_LD - find the path to the GNU or non-GNU linker
2886 AC_DEFUN([AC_PROG_LD],
2887 [AC_ARG_WITH(gnu-ld,
2888 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
2889 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
2890 AC_REQUIRE([AC_PROG_CC])dnl
2891 AC_REQUIRE([AC_CANONICAL_HOST])dnl
2892 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2894 if test "$GCC" = yes; then
2895 # Check if gcc -print-prog-name=ld gives a path.
2896 AC_MSG_CHECKING([for ld used by GCC])
2899 # gcc leaves a trailing carriage return which upsets mingw
2900 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2902 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2905 # Accept absolute paths.
2906 [[\\/]* | [A-Za-z]:[\\/]*)]
2907 [re_direlt='/[^/][^/]*/\.\./']
2908 # Canonicalize the path of ld
2909 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
2910 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2911 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
2913 test -z "$LD" && LD="$ac_prog"
2916 # If it fails, then pretend we aren't using GCC.
2920 # If it is relative, then search for the first ld in PATH.
2924 elif test "$with_gnu_ld" = yes; then
2925 AC_MSG_CHECKING([for GNU ld])
2927 AC_MSG_CHECKING([for non-GNU ld])
2929 AC_CACHE_VAL(lt_cv_path_LD,
2930 [if test -z "$LD"; then
2931 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
2932 for ac_dir in $PATH; do
2933 test -z "$ac_dir" && ac_dir=.
2934 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2935 lt_cv_path_LD="$ac_dir/$ac_prog"
2936 # Check to see if the program is GNU ld. I'd rather use --version,
2937 # but apparently some GNU ld's only accept -v.
2938 # Break only if it was the GNU/non-GNU ld that we prefer.
2939 if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
2940 test "$with_gnu_ld" != no && break
2942 test "$with_gnu_ld" != yes && break
2948 lt_cv_path_LD="$LD" # Let the user override the test with a path.
2951 if test -n "$LD"; then
2956 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2961 AC_DEFUN([AC_PROG_LD_GNU],
2962 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2963 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2964 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
2965 lt_cv_prog_gnu_ld=yes
2967 lt_cv_prog_gnu_ld=no
2969 with_gnu_ld=$lt_cv_prog_gnu_ld
2972 # AC_PROG_LD_RELOAD_FLAG - find reload flag for linker
2973 # -- PORTME Some linkers may need a different reload flag.
2974 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2975 [AC_CACHE_CHECK([for $LD option to reload object files], lt_cv_ld_reload_flag,
2976 [lt_cv_ld_reload_flag='-r'])
2977 reload_flag=$lt_cv_ld_reload_flag
2978 test -n "$reload_flag" && reload_flag=" $reload_flag"
2981 # AC_DEPLIBS_CHECK_METHOD - how to check for library dependencies
2982 # -- PORTME fill in with the dynamic library characteristics
2983 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2984 [AC_CACHE_CHECK([how to recognise dependant libraries],
2985 lt_cv_deplibs_check_method,
2986 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2987 lt_cv_file_magic_test_file=
2988 lt_cv_deplibs_check_method='unknown'
2989 # Need to set the preceding variable on all platforms that support
2990 # interlibrary dependencies.
2991 # 'none' -- dependencies not supported.
2992 # `unknown' -- same as none, but documents that we really don't know.
2993 # 'pass_all' -- all dependencies passed with no checks.
2994 # 'test_compile' -- check by making test program.
2995 # ['file_magic [regex]'] -- check by looking for files in library path
2996 # which responds to the $file_magic_cmd with a given egrep regex.
2997 # If you have `file' or equivalent on your system and you're not sure
2998 # whether `pass_all' will *always* work, you probably want this one.
3002 lt_cv_deplibs_check_method=pass_all
3006 lt_cv_deplibs_check_method=pass_all
3010 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)']
3011 lt_cv_file_magic_cmd='/usr/bin/file -L'
3012 lt_cv_file_magic_test_file=/shlib/libc.so
3015 cygwin* | mingw* | pw32*)
3016 lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3017 lt_cv_file_magic_cmd='$OBJDUMP -f'
3021 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3022 lt_cv_file_magiic_cmd=/usr/bin/file
3023 lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3027 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3030 # Not sure whether the presence of OpenBSD here was a mistake.
3031 # Let's accept both of them until this is cleared up.
3032 [lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library']
3033 lt_cv_file_magic_cmd=/usr/bin/file
3034 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3038 lt_cv_deplibs_check_method=pass_all
3043 lt_cv_deplibs_check_method=pass_all
3047 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library']
3048 lt_cv_file_magic_cmd=/usr/bin/file
3049 lt_cv_file_magic_test_file=/usr/lib/libc.sl
3055 # this will be overridden with pass_all, but let us keep it just in case
3056 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3060 *-32|*"-32 ") libmagic=32-bit;;
3061 *-n32|*"-n32 ") libmagic=N32;;
3062 *-64|*"-64 ") libmagic=64-bit;;
3063 *) libmagic=never-match;;
3065 # this will be overridden with pass_all, but let us keep it just in case
3066 [lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"]
3069 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3070 lt_cv_deplibs_check_method=pass_all
3073 # This must be Linux ELF.
3076 alpha* | i*86 | powerpc* | sparc* | ia64* )
3077 lt_cv_deplibs_check_method=pass_all ;;
3079 # glibc up to 2.1.1 does not perform some relocations on ARM
3080 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;]
3082 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3086 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3087 [lt_cv_deplibs_check_method='file_magic NetBSD/[a-z0-9]* demand paged shared library']
3089 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object']
3091 lt_cv_file_magic_cmd='/usr/bin/file -L'
3092 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3096 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)']
3097 lt_cv_file_magic_cmd=/usr/bin/file
3098 lt_cv_file_magic_test_file=/usr/lib/libnls.so
3101 osf3* | osf4* | osf5*)
3102 # this will be overridden with pass_all, but let us keep it just in case
3103 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3104 lt_cv_file_magic_test_file=/shlib/libc.so
3105 lt_cv_deplibs_check_method=pass_all
3109 lt_cv_deplibs_check_method=pass_all
3113 lt_cv_deplibs_check_method=pass_all
3114 lt_cv_file_magic_test_file=/lib/libc.so
3117 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3118 case "$host_vendor" in
3120 [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]']
3121 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3124 lt_cv_deplibs_check_method=pass_all
3127 lt_cv_file_magic_cmd='/bin/file'
3128 [lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )']
3131 lt_cv_file_magic_cmd='/bin/file'
3132 [lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"]
3133 lt_cv_file_magic_test_file=/lib/libc.so
3139 file_magic_cmd=$lt_cv_file_magic_cmd
3140 deplibs_check_method=$lt_cv_deplibs_check_method
3144 # AC_PROG_NM - find the path to a BSD-compatible name lister
3145 AC_DEFUN([AC_PROG_NM],
3146 [AC_MSG_CHECKING([for BSD-compatible nm])
3147 AC_CACHE_VAL(lt_cv_path_NM,
3148 [if test -n "$NM"; then
3149 # Let the user override the test.
3152 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
3153 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3154 test -z "$ac_dir" && ac_dir=.
3155 tmp_nm=$ac_dir/${ac_tool_prefix}nm
3156 if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3157 # Check to see if the nm accepts a BSD-compat flag.
3158 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3159 # nm: unknown option "B" ignored
3160 # Tru64's nm complains that /dev/null is an invalid object file
3161 if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3162 lt_cv_path_NM="$tmp_nm -B"
3164 elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3165 lt_cv_path_NM="$tmp_nm -p"
3168 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3169 continue # so that we can try to find one that supports BSD flags
3174 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3177 AC_MSG_RESULT([$NM])
3180 # AC_CHECK_LIBM - check for math library
3181 AC_DEFUN([AC_CHECK_LIBM],
3182 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
3185 *-*-beos* | *-*-cygwin* | *-*-pw32*)
3186 # These system don't have libm
3189 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
3190 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm")
3193 AC_CHECK_LIB(m, main, LIBM="-lm")
3198 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for
3199 # the libltdl convenience library and INCLTDL to the include flags for
3200 # the libltdl header and adds --enable-ltdl-convenience to the
3201 # configure arguments. Note that LIBLTDL and INCLTDL are not
3202 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not
3203 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed
3204 # with '${top_builddir}/' and INCLTDL will be prefixed with
3205 # '${top_srcdir}/' (note the single quotes!). If your package is not
3206 # flat and you're not using automake, define top_builddir and
3207 # top_srcdir appropriately in the Makefiles.
3208 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
3209 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3210 case "$enable_ltdl_convenience" in
3211 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
3212 "") enable_ltdl_convenience=yes
3213 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
3215 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
3216 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3219 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for
3220 # the libltdl installable library and INCLTDL to the include flags for
3221 # the libltdl header and adds --enable-ltdl-install to the configure
3222 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is
3223 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed
3224 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will
3225 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed
3226 # with '${top_srcdir}/' (note the single quotes!). If your package is
3227 # not flat and you're not using automake, define top_builddir and
3228 # top_srcdir appropriately in the Makefiles.
3229 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
3230 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
3231 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
3232 AC_CHECK_LIB(ltdl, main,
3233 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
3234 [if test x"$enable_ltdl_install" = xno; then
3235 AC_MSG_WARN([libltdl not installed, but installation disabled])
3237 enable_ltdl_install=yes
3240 if test x"$enable_ltdl_install" = x"yes"; then
3241 ac_configure_args="$ac_configure_args --enable-ltdl-install"
3242 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
3243 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
3245 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
3252 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
3253 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
3254 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
3255 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
3256 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
3257 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
3258 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
3260 # This is just to silence aclocal about the macro not being used
3261 ifelse([AC_DISABLE_FAST_INSTALL])