comparison acinclude.m4 @ 729:dac996d69abb

Updated libtool support so Mingw32 builds work.
author Sam Lantinga <slouken@libsdl.org>
date Mon, 06 Oct 2003 07:13:16 +0000
parents 1e8865a3e127
children 0f4f974d0201
comparison
equal deleted inserted replaced
728:5446a009107a 729:dac996d69abb
185 AC_SUBST(ESD_CFLAGS) 185 AC_SUBST(ESD_CFLAGS)
186 AC_SUBST(ESD_LIBS) 186 AC_SUBST(ESD_LIBS)
187 rm -f conf.esdtest 187 rm -f conf.esdtest
188 ]) 188 ])
189 189
190 ## libtool.m4 - Configure libtool for the target system. -*-Shell-script-*- 190 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
191 ## Copyright (C) 1996-1999, 2000 Free Software Foundation, Inc. 191 ## Copyright 1996, 1997, 1998, 1999, 2000, 2001
192 ## Free Software Foundation, Inc.
192 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996 193 ## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
193 ## 194 ##
194 ## This program is free software; you can redistribute it and/or modify 195 ## This program is free software; you can redistribute it and/or modify
195 ## it under the terms of the GNU General Public License as published by 196 ## it under the terms of the GNU General Public License as published by
196 ## the Free Software Foundation; either version 2 of the License, or 197 ## the Free Software Foundation; either version 2 of the License, or
208 ## As a special exception to the GNU General Public License, if you 209 ## As a special exception to the GNU General Public License, if you
209 ## distribute this file as part of a program that contains a 210 ## distribute this file as part of a program that contains a
210 ## configuration script generated by Autoconf, you may include it under 211 ## configuration script generated by Autoconf, you may include it under
211 ## the same distribution terms that you use for the rest of that program. 212 ## the same distribution terms that you use for the rest of that program.
212 213
213 # serial 40 AC_PROG_LIBTOOL 214 # serial 47 AC_PROG_LIBTOOL
214 AC_DEFUN(AC_PROG_LIBTOOL, 215
216
217 # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
218 # -----------------------------------------------------------
219 # If this macro is not defined by Autoconf, define it here.
220 m4_ifdef([AC_PROVIDE_IFELSE],
221 [],
222 [m4_define([AC_PROVIDE_IFELSE],
223 [m4_ifdef([AC_PROVIDE_$1],
224 [$2], [$3])])])
225
226
227 # AC_PROG_LIBTOOL
228 # ---------------
229 AC_DEFUN([AC_PROG_LIBTOOL],
230 [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
231 dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
232 dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
233 AC_PROVIDE_IFELSE([AC_PROG_CXX],
234 [AC_LIBTOOL_CXX],
235 [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
236 ])])
237 dnl And a similar setup for Fortran 77 support
238 AC_PROVIDE_IFELSE([AC_PROG_F77],
239 [AC_LIBTOOL_F77],
240 [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
241 ])])
242
243 dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
244 dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
245 dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
246 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
247 [AC_LIBTOOL_GCJ],
248 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
249 [AC_LIBTOOL_GCJ],
250 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
251 [AC_LIBTOOL_GCJ],
252 [ifdef([AC_PROG_GCJ],
253 [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
254 ifdef([A][M_PROG_GCJ],
255 [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
256 ifdef([LT_AC_PROG_GCJ],
257 [define([LT_AC_PROG_GCJ],
258 defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
259 ])])# AC_PROG_LIBTOOL
260
261
262 # _AC_PROG_LIBTOOL
263 # ----------------
264 AC_DEFUN([_AC_PROG_LIBTOOL],
215 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl 265 [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
216 266 AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
217 # Save cache, so that ltconfig can load it 267 AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
218 AC_CACHE_SAVE 268 AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
219
220 # Actually configure libtool. ac_aux_dir is where install-sh is found.
221 CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
222 LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
223 LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" \
224 DLLTOOL="$DLLTOOL" AS="$AS" OBJDUMP="$OBJDUMP" \
225 ${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
226 $libtool_flags --no-verify $ac_aux_dir/ltmain.sh $lt_target \
227 || AC_MSG_ERROR([libtool configure failed])
228
229 # Reload cache, that may have been modified by ltconfig
230 AC_CACHE_LOAD
231 269
232 # This can be used to rebuild libtool when needed 270 # This can be used to rebuild libtool when needed
233 LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh" 271 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
234 272
235 # Always use our own libtool. 273 # Always use our own libtool.
236 LIBTOOL='$(SHELL) $(top_builddir)/libtool' 274 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
237 AC_SUBST(LIBTOOL)dnl 275 AC_SUBST(LIBTOOL)dnl
238 276
239 # Redirect the config.log output again, so that the ltconfig log is not 277 # Prevent multiple expansion
240 # clobbered by the next message. 278 define([AC_PROG_LIBTOOL], [])
241 exec 5>>./config.log 279 ])# _AC_PROG_LIBTOOL
242 ]) 280
243 281
244 AC_DEFUN(AC_LIBTOOL_SETUP, 282 # AC_LIBTOOL_SETUP
245 [AC_PREREQ(2.13)dnl 283 # ----------------
284 AC_DEFUN([AC_LIBTOOL_SETUP],
285 [AC_PREREQ(2.50)dnl
246 AC_REQUIRE([AC_ENABLE_SHARED])dnl 286 AC_REQUIRE([AC_ENABLE_SHARED])dnl
247 AC_REQUIRE([AC_ENABLE_STATIC])dnl 287 AC_REQUIRE([AC_ENABLE_STATIC])dnl
248 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl 288 AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
249 AC_REQUIRE([AC_CANONICAL_HOST])dnl 289 AC_REQUIRE([AC_CANONICAL_HOST])dnl
250 AC_REQUIRE([AC_CANONICAL_BUILD])dnl 290 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
251 AC_REQUIRE([AC_PROG_RANLIB])dnl
252 AC_REQUIRE([AC_PROG_CC])dnl 291 AC_REQUIRE([AC_PROG_CC])dnl
253 AC_REQUIRE([AC_PROG_LD])dnl 292 AC_REQUIRE([AC_PROG_LD])dnl
293 AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
254 AC_REQUIRE([AC_PROG_NM])dnl 294 AC_REQUIRE([AC_PROG_NM])dnl
295
255 AC_REQUIRE([AC_PROG_LN_S])dnl 296 AC_REQUIRE([AC_PROG_LN_S])dnl
297 AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
298 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
299 AC_REQUIRE([AC_OBJEXT])dnl
300 AC_REQUIRE([AC_EXEEXT])dnl
256 dnl 301 dnl
257 302
258 case "$target" in 303 AC_LIBTOOL_SYS_MAX_CMD_LEN
259 NONE) lt_target="$host" ;; 304 AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
260 *) lt_target="$target" ;; 305 AC_LIBTOOL_OBJDIR
306
307 AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
308 _LT_AC_PROG_ECHO_BACKSLASH
309
310 case $host_os in
311 aix3*)
312 # AIX sometimes has problems with the GCC collect2 program. For some
313 # reason, if we set the COLLECT_NAMES environment variable, the problems
314 # vanish in a puff of smoke.
315 if test "X${COLLECT_NAMES+set}" != Xset; then
316 COLLECT_NAMES=
317 export COLLECT_NAMES
318 fi
319 ;;
261 esac 320 esac
262 321
263 # Check for any special flags to pass to ltconfig. 322 # Sed substitution that helps us do robust quoting. It backslashifies
264 libtool_flags="--cache-file=$cache_file" 323 # metacharacters that are still active within double-quoted strings.
265 test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared" 324 Xsed='sed -e s/^X//'
266 test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static" 325 [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
267 test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install" 326
268 test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc" 327 # Same as above, but do not quote variable references.
269 test "$ac_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld" 328 [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
270 ifdef([AC_PROVIDE_AC_LIBTOOL_DLOPEN], 329
271 [libtool_flags="$libtool_flags --enable-dlopen"]) 330 # Sed substitution to delay expansion of an escaped shell variable in a
272 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], 331 # double_quote_subst'ed string.
273 [libtool_flags="$libtool_flags --enable-win32-dll"]) 332 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
274 AC_ARG_ENABLE(libtool-lock, 333
275 [ --disable-libtool-lock avoid locking (might break parallel builds)]) 334 # Sed substitution to avoid accidental globbing in evaled expressions
276 test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock" 335 no_glob_subst='s/\*/\\\*/g'
277 test x"$silent" = xyes && libtool_flags="$libtool_flags --silent" 336
337 # Constants:
338 rm="rm -f"
339
340 # Global variables:
341 default_ofile=libtool
342 can_build_shared=yes
343
344 # All known linkers require a `.a' archive for static linking (except M$VC,
345 # which needs '.lib').
346 libext=a
347 ltmain="$ac_aux_dir/ltmain.sh"
348 ofile="$default_ofile"
349 with_gnu_ld="$lt_cv_prog_gnu_ld"
350
351 AC_CHECK_TOOL(AR, ar, false)
352 AC_CHECK_TOOL(RANLIB, ranlib, :)
353 AC_CHECK_TOOL(STRIP, strip, :)
354
355 old_CC="$CC"
356 old_CFLAGS="$CFLAGS"
357
358 # Set sane defaults for various variables
359 test -z "$AR" && AR=ar
360 test -z "$AR_FLAGS" && AR_FLAGS=cru
361 test -z "$AS" && AS=as
362 test -z "$CC" && CC=cc
363 test -z "$LTCC" && LTCC=$CC
364 test -z "$DLLTOOL" && DLLTOOL=dlltool
365 test -z "$LD" && LD=ld
366 test -z "$LN_S" && LN_S="ln -s"
367 test -z "$MAGIC_CMD" && MAGIC_CMD=file
368 test -z "$NM" && NM=nm
369 test -z "$SED" && SED=sed
370 test -z "$OBJDUMP" && OBJDUMP=objdump
371 test -z "$RANLIB" && RANLIB=:
372 test -z "$STRIP" && STRIP=:
373 test -z "$ac_objext" && ac_objext=o
374
375 # Determine commands to create old-style static archives.
376 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
377 old_postinstall_cmds='chmod 644 $oldlib'
378 old_postuninstall_cmds=
379
380 if test -n "$RANLIB"; then
381 case $host_os in
382 openbsd*)
383 old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
384 ;;
385 *)
386 old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
387 ;;
388 esac
389 old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
390 fi
391
392 # Only perform the check for file, if the check method requires it
393 case $deplibs_check_method in
394 file_magic*)
395 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
396 AC_PATH_MAGIC
397 fi
398 ;;
399 esac
400
401 AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
402 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
403 enable_win32_dll=yes, enable_win32_dll=no)
404
405 AC_ARG_ENABLE([libtool-lock],
406 [AC_HELP_STRING([--disable-libtool-lock],
407 [avoid locking (might break parallel builds)])])
408 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
409
410 AC_ARG_WITH([pic],
411 [AC_HELP_STRING([--with-pic],
412 [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
413 [pic_mode="$withval"],
414 [pic_mode=default])
415 test -z "$pic_mode" && pic_mode=default
416
417 # Use C for the default configuration in the libtool script
418 tagname=
419 AC_LIBTOOL_LANG_C_CONFIG
420 _LT_AC_TAGCONFIG
421 ])# AC_LIBTOOL_SETUP
422
423
424 # _LT_AC_SYS_COMPILER
425 # -------------------
426 AC_DEFUN([_LT_AC_SYS_COMPILER],
427 [AC_REQUIRE([AC_PROG_CC])dnl
428
429 # If no C compiler was specified, use CC.
430 LTCC=${LTCC-"$CC"}
431
432 # Allow CC to be a program name with arguments.
433 compiler=$CC
434 ])# _LT_AC_SYS_COMPILER
435
436
437 # _LT_AC_SYS_LIBPATH_AIX
438 # ----------------------
439 # Links a minimal program and checks the executable
440 # for the system default hardcoded library path. In most cases,
441 # this is /usr/lib:/lib, but when the MPI compilers are used
442 # the location of the communication and MPI libs are included too.
443 # If we don't find anything, use the default library path according
444 # to the aix ld manual.
445 AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
446 [AC_LINK_IFELSE(AC_LANG_PROGRAM,[
447 aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
448 }'`
449 # Check for a 64-bit object if we didn't find anything.
450 if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
451 }'`; fi],[])
452 if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
453 ])# _LT_AC_SYS_LIBPATH_AIX
454
455
456 # _LT_AC_SHELL_INIT(ARG)
457 # ----------------------
458 AC_DEFUN([_LT_AC_SHELL_INIT],
459 [ifdef([AC_DIVERSION_NOTICE],
460 [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
461 [AC_DIVERT_PUSH(NOTICE)])
462 $1
463 AC_DIVERT_POP
464 ])# _LT_AC_SHELL_INIT
465
466
467 # _LT_AC_PROG_ECHO_BACKSLASH
468 # --------------------------
469 # Add some code to the start of the generated configure script which
470 # will find an echo command which doesn't interpret backslashes.
471 AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
472 [_LT_AC_SHELL_INIT([
473 # Check that we are running under the correct shell.
474 SHELL=${CONFIG_SHELL-/bin/sh}
475
476 case X$ECHO in
477 X*--fallback-echo)
478 # Remove one level of quotation (which was required for Make).
479 ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
480 ;;
481 esac
482
483 echo=${ECHO-echo}
484 if test "X[$]1" = X--no-reexec; then
485 # Discard the --no-reexec flag, and continue.
486 shift
487 elif test "X[$]1" = X--fallback-echo; then
488 # Avoid inline document here, it may be left over
489 :
490 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
491 # Yippee, $echo works!
492 :
493 else
494 # Restart under the correct shell.
495 exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
496 fi
497
498 if test "X[$]1" = X--fallback-echo; then
499 # used as fallback echo
500 shift
501 cat <<EOF
502 [$]*
503 EOF
504 exit 0
505 fi
506
507 # The HP-UX ksh and POSIX shell print the target directory to stdout
508 # if CDPATH is set.
509 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
510
511 if test -z "$ECHO"; then
512 if test "X${echo_test_string+set}" != Xset; then
513 # find a string as large as possible, as long as the shell can cope with it
514 for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
515 # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
516 if (echo_test_string="`eval $cmd`") 2>/dev/null &&
517 echo_test_string="`eval $cmd`" &&
518 (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
519 then
520 break
521 fi
522 done
523 fi
524
525 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
526 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
527 test "X$echo_testing_string" = "X$echo_test_string"; then
528 :
529 else
530 # The Solaris, AIX, and Digital Unix default echo programs unquote
531 # backslashes. This makes it impossible to quote backslashes using
532 # echo "$something" | sed 's/\\/\\\\/g'
533 #
534 # So, first we look for a working echo in the user's PATH.
535
536 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
537 for dir in $PATH /usr/ucb; do
538 IFS="$lt_save_ifs"
539 if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
540 test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
541 echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
542 test "X$echo_testing_string" = "X$echo_test_string"; then
543 echo="$dir/echo"
544 break
545 fi
546 done
547 IFS="$lt_save_ifs"
548
549 if test "X$echo" = Xecho; then
550 # We didn't find a better echo, so look for alternatives.
551 if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
552 echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
553 test "X$echo_testing_string" = "X$echo_test_string"; then
554 # This shell has a builtin print -r that does the trick.
555 echo='print -r'
556 elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
557 test "X$CONFIG_SHELL" != X/bin/ksh; then
558 # If we have ksh, try running configure again with it.
559 ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
560 export ORIGINAL_CONFIG_SHELL
561 CONFIG_SHELL=/bin/ksh
562 export CONFIG_SHELL
563 exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
564 else
565 # Try using printf.
566 echo='printf %s\n'
567 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
568 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
569 test "X$echo_testing_string" = "X$echo_test_string"; then
570 # Cool, printf works
571 :
572 elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
573 test "X$echo_testing_string" = 'X\t' &&
574 echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
575 test "X$echo_testing_string" = "X$echo_test_string"; then
576 CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
577 export CONFIG_SHELL
578 SHELL="$CONFIG_SHELL"
579 export SHELL
580 echo="$CONFIG_SHELL [$]0 --fallback-echo"
581 elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
582 test "X$echo_testing_string" = 'X\t' &&
583 echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
584 test "X$echo_testing_string" = "X$echo_test_string"; then
585 echo="$CONFIG_SHELL [$]0 --fallback-echo"
586 else
587 # maybe with a smaller string...
588 prev=:
589
590 for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
591 if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
592 then
593 break
594 fi
595 prev="$cmd"
596 done
597
598 if test "$prev" != 'sed 50q "[$]0"'; then
599 echo_test_string=`eval $prev`
600 export echo_test_string
601 exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
602 else
603 # Oops. We lost completely, so just stick with echo.
604 echo=echo
605 fi
606 fi
607 fi
608 fi
609 fi
610 fi
611
612 # Copy echo and quote the copy suitably for passing to libtool from
613 # the Makefile, instead of quoting the original, which is used later.
614 ECHO=$echo
615 if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
616 ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
617 fi
618
619 AC_SUBST(ECHO)
620 ])])# _LT_AC_PROG_ECHO_BACKSLASH
621
622
623 # _LT_AC_LOCK
624 # -----------
625 AC_DEFUN([_LT_AC_LOCK],
626 [AC_ARG_ENABLE([libtool-lock],
627 [AC_HELP_STRING([--disable-libtool-lock],
628 [avoid locking (might break parallel builds)])])
629 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
278 630
279 # Some flags need to be propagated to the compiler or linker for good 631 # Some flags need to be propagated to the compiler or linker for good
280 # libtool support. 632 # libtool support.
281 case "$lt_target" in 633 case $host in
634 ia64-*-hpux*)
635 # Find out which ABI we are using.
636 echo 'int i;' > conftest.$ac_ext
637 if AC_TRY_EVAL(ac_compile); then
638 case `/usr/bin/file conftest.$ac_objext` in
639 *ELF-32*)
640 HPUX_IA64_MODE="32"
641 ;;
642 *ELF-64*)
643 HPUX_IA64_MODE="64"
644 ;;
645 esac
646 fi
647 rm -rf conftest*
648 ;;
282 *-*-irix6*) 649 *-*-irix6*)
283 # Find out which ABI we are using. 650 # Find out which ABI we are using.
284 echo '[#]line __oline__ "configure"' > conftest.$ac_ext 651 echo '[#]line __oline__ "configure"' > conftest.$ac_ext
285 if AC_TRY_EVAL(ac_compile); then 652 if AC_TRY_EVAL(ac_compile); then
653 if test "$lt_cv_prog_gnu_ld" = yes; then
654 case `/usr/bin/file conftest.$ac_objext` in
655 *32-bit*)
656 LD="${LD-ld} -melf32bsmip"
657 ;;
658 *N32*)
659 LD="${LD-ld} -melf32bmipn32"
660 ;;
661 *64-bit*)
662 LD="${LD-ld} -melf64bmip"
663 ;;
664 esac
665 else
666 case `/usr/bin/file conftest.$ac_objext` in
667 *32-bit*)
668 LD="${LD-ld} -32"
669 ;;
670 *N32*)
671 LD="${LD-ld} -n32"
672 ;;
673 *64-bit*)
674 LD="${LD-ld} -64"
675 ;;
676 esac
677 fi
678 fi
679 rm -rf conftest*
680 ;;
681
682 x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
683 # Find out which ABI we are using.
684 echo 'int i;' > conftest.$ac_ext
685 if AC_TRY_EVAL(ac_compile); then
286 case "`/usr/bin/file conftest.o`" in 686 case "`/usr/bin/file conftest.o`" in
287 *32-bit*) 687 *32-bit*)
288 LD="${LD-ld} -32" 688 case $host in
289 ;; 689 x86_64-*linux*)
290 *N32*) 690 LD="${LD-ld} -m elf_i386"
291 LD="${LD-ld} -n32" 691 ;;
692 ppc64-*linux*)
693 LD="${LD-ld} -m elf32ppclinux"
694 ;;
695 s390x-*linux*)
696 LD="${LD-ld} -m elf_s390"
697 ;;
698 sparc64-*linux*)
699 LD="${LD-ld} -m elf32_sparc"
700 ;;
701 esac
292 ;; 702 ;;
293 *64-bit*) 703 *64-bit*)
294 LD="${LD-ld} -64" 704 case $host in
705 x86_64-*linux*)
706 LD="${LD-ld} -m elf_x86_64"
707 ;;
708 ppc*-*linux*|powerpc*-*linux*)
709 LD="${LD-ld} -m elf64ppc"
710 ;;
711 s390*-*linux*)
712 LD="${LD-ld} -m elf64_s390"
713 ;;
714 sparc*-*linux*)
715 LD="${LD-ld} -m elf64_sparc"
716 ;;
717 esac
295 ;; 718 ;;
296 esac 719 esac
297 fi 720 fi
298 rm -rf conftest* 721 rm -rf conftest*
299 ;; 722 ;;
301 *-*-sco3.2v5*) 724 *-*-sco3.2v5*)
302 # On SCO OpenServer 5, we need -belf to get full-featured binaries. 725 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
303 SAVE_CFLAGS="$CFLAGS" 726 SAVE_CFLAGS="$CFLAGS"
304 CFLAGS="$CFLAGS -belf" 727 CFLAGS="$CFLAGS -belf"
305 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 728 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
306 [AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])]) 729 [AC_LANG_PUSH(C)
730 AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
731 AC_LANG_POP])
307 if test x"$lt_cv_cc_needs_belf" != x"yes"; then 732 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
308 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 733 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
309 CFLAGS="$SAVE_CFLAGS" 734 CFLAGS="$SAVE_CFLAGS"
310 fi 735 fi
311 ;; 736 ;;
312 737 AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
313 ifdef([AC_PROVIDE_AC_LIBTOOL_WIN32_DLL], 738 [*-*-cygwin* | *-*-mingw* | *-*-pw32*)
314 [*-*-cygwin* | *-*-mingw*)
315 AC_CHECK_TOOL(DLLTOOL, dlltool, false) 739 AC_CHECK_TOOL(DLLTOOL, dlltool, false)
316 AC_CHECK_TOOL(AS, as, false) 740 AC_CHECK_TOOL(AS, as, false)
317 AC_CHECK_TOOL(OBJDUMP, objdump, false) 741 AC_CHECK_TOOL(OBJDUMP, objdump, false)
318 ;; 742 ;;
743 ])
744 esac
745
746 need_locks="$enable_libtool_lock"
747
748 ])# _LT_AC_LOCK
749
750
751 # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
752 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
753 # ----------------------------------------------------------------
754 # Check whether the given compiler option works
755 AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
756 [AC_CACHE_CHECK([$1], [$2],
757 [$2=no
758 ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
759 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
760 lt_compiler_flag="$3"
761 # Insert the option either (1) after the last *FLAGS variable, or
762 # (2) before a word containing "conftest.", or (3) at the end.
763 # Note that $ac_compile itself does not contain backslashes and begins
764 # with a dollar sign (not a hyphen), so the echo should work correctly.
765 # The option is referenced via a variable to avoid confusing sed.
766 lt_compile=`echo "$ac_compile" | $SED \
767 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
768 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
769 -e 's:$: $lt_compiler_flag:'`
770 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
771 (eval "$lt_compile" 2>conftest.err)
772 ac_status=$?
773 cat conftest.err >&AS_MESSAGE_LOG_FD
774 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
775 if (exit $ac_status) && test -s "$ac_outfile"; then
776 # The compiler can only warn and ignore the option if not recognized
777 # So say no if there are warnings
778 if test ! -s conftest.err; then
779 $2=yes
780 fi
781 fi
782 $rm conftest*
319 ]) 783 ])
784
785 if test x"[$]$2" = xyes; then
786 ifelse([$5], , :, [$5])
787 else
788 ifelse([$6], , :, [$6])
789 fi
790 ])# AC_LIBTOOL_COMPILER_OPTION
791
792
793 # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
794 # [ACTION-SUCCESS], [ACTION-FAILURE])
795 # ------------------------------------------------------------
796 # Check whether the given compiler option works
797 AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
798 [AC_CACHE_CHECK([$1], [$2],
799 [$2=no
800 save_LDFLAGS="$LDFLAGS"
801 LDFLAGS="$LDFLAGS $3"
802 printf "$lt_simple_link_test_code" > conftest.$ac_ext
803 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
804 # The compiler can only warn and ignore the option if not recognized
805 # So say no if there are warnings
806 if test -s conftest.err; then
807 # Append any errors to the config.log.
808 cat conftest.err 1>&AS_MESSAGE_LOG_FD
809 else
810 $2=yes
811 fi
812 fi
813 $rm conftest*
814 LDFLAGS="$save_LDFLAGS"
815 ])
816
817 if test x"[$]$2" = xyes; then
818 ifelse([$4], , :, [$4])
819 else
820 ifelse([$5], , :, [$5])
821 fi
822 ])# AC_LIBTOOL_LINKER_OPTION
823
824
825 # AC_LIBTOOL_SYS_MAX_CMD_LEN
826 # --------------------------
827 AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
828 [# find the maximum length of command line arguments
829 AC_MSG_CHECKING([the maximum length of command line arguments])
830 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
831 i=0
832 testring="ABCD"
833
834 case $build_os in
835 msdosdjgpp*)
836 # On DJGPP, this test can blow up pretty badly due to problems in libc
837 # (any single argument exceeding 2000 bytes causes a buffer overrun
838 # during glob expansion). Even if it were fixed, the result of this
839 # check would be larger than it should be.
840 lt_cv_sys_max_cmd_len=12288; # 12K is about right
841 ;;
842
843 gnu*)
844 # Under GNU Hurd, this test is not required because there is
845 # no limit to the length of command line arguments.
846 # Libtool will interpret -1 as no limit whatsoever
847 lt_cv_sys_max_cmd_len=-1;
848 ;;
849
850 cygwin* | mingw*)
851 # On Win9x/ME, this test blows up -- it succeeds, but takes
852 # about 5 minutes as the teststring grows exponentially.
853 # Worse, since 9x/ME are not pre-emptively multitasking,
854 # you end up with a "frozen" computer, even though with patience
855 # the test eventually succeeds (with a max line length of 256k).
856 # Instead, let's just punt: use the minimum linelength reported by
857 # all of the supported platforms: 8192 (on NT/2K/XP).
858 lt_cv_sys_max_cmd_len=8192;
859 ;;
860
861 *)
862 # If test is not a shell built-in, we'll probably end up computing a
863 # maximum length that is only half of the actual maximum length, but
864 # we can't tell.
865 while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \
866 = "XX$testring") >/dev/null 2>&1 &&
867 new_result=`expr "X$testring" : ".*" 2>&1` &&
868 lt_cv_sys_max_cmd_len=$new_result &&
869 test $i != 17 # 1/2 MB should be enough
870 do
871 i=`expr $i + 1`
872 testring=$testring$testring
873 done
874 testring=
875 # Add a significant safety factor because C++ compilers can tack on massive
876 # amounts of additional arguments before passing them to the linker.
877 # It appears as though 1/2 is a usable value.
878 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
879 ;;
880 esac
881 ])
882 if test -n $lt_cv_sys_max_cmd_len ; then
883 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
884 else
885 AC_MSG_RESULT(none)
886 fi
887 ])# AC_LIBTOOL_SYS_MAX_CMD_LEN
888
889
890 # _LT_AC_CHECK_DLFCN
891 # --------------------
892 AC_DEFUN([_LT_AC_CHECK_DLFCN],
893 [AC_CHECK_HEADERS(dlfcn.h)dnl
894 ])# _LT_AC_CHECK_DLFCN
895
896
897 # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
898 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
899 # ------------------------------------------------------------------
900 AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
901 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
902 if test "$cross_compiling" = yes; then :
903 [$4]
904 else
905 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
906 lt_status=$lt_dlunknown
907 cat > conftest.$ac_ext <<EOF
908 [#line __oline__ "configure"
909 #include "confdefs.h"
910
911 #if HAVE_DLFCN_H
912 #include <dlfcn.h>
913 #endif
914
915 #include <stdio.h>
916
917 #ifdef RTLD_GLOBAL
918 # define LT_DLGLOBAL RTLD_GLOBAL
919 #else
920 # ifdef DL_GLOBAL
921 # define LT_DLGLOBAL DL_GLOBAL
922 # else
923 # define LT_DLGLOBAL 0
924 # endif
925 #endif
926
927 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
928 find out it does not work in some platform. */
929 #ifndef LT_DLLAZY_OR_NOW
930 # ifdef RTLD_LAZY
931 # define LT_DLLAZY_OR_NOW RTLD_LAZY
932 # else
933 # ifdef DL_LAZY
934 # define LT_DLLAZY_OR_NOW DL_LAZY
935 # else
936 # ifdef RTLD_NOW
937 # define LT_DLLAZY_OR_NOW RTLD_NOW
938 # else
939 # ifdef DL_NOW
940 # define LT_DLLAZY_OR_NOW DL_NOW
941 # else
942 # define LT_DLLAZY_OR_NOW 0
943 # endif
944 # endif
945 # endif
946 # endif
947 #endif
948
949 #ifdef __cplusplus
950 extern "C" void exit (int);
951 #endif
952
953 void fnord() { int i=42;}
954 int main ()
955 {
956 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
957 int status = $lt_dlunknown;
958
959 if (self)
960 {
961 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
962 else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
963 /* dlclose (self); */
964 }
965
966 exit (status);
967 }]
968 EOF
969 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
970 (./conftest; exit; ) 2>/dev/null
971 lt_status=$?
972 case x$lt_status in
973 x$lt_dlno_uscore) $1 ;;
974 x$lt_dlneed_uscore) $2 ;;
975 x$lt_unknown|x*) $3 ;;
976 esac
977 else :
978 # compilation failed
979 $3
980 fi
981 fi
982 rm -fr conftest*
983 ])# _LT_AC_TRY_DLOPEN_SELF
984
985
986 # AC_LIBTOOL_DLOPEN_SELF
987 # -------------------
988 AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
989 [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
990 if test "x$enable_dlopen" != xyes; then
991 enable_dlopen=unknown
992 enable_dlopen_self=unknown
993 enable_dlopen_self_static=unknown
994 else
995 lt_cv_dlopen=no
996 lt_cv_dlopen_libs=
997
998 case $host_os in
999 beos*)
1000 lt_cv_dlopen="load_add_on"
1001 lt_cv_dlopen_libs=
1002 lt_cv_dlopen_self=yes
1003 ;;
1004
1005 mingw* | pw32*)
1006 lt_cv_dlopen="LoadLibrary"
1007 lt_cv_dlopen_libs=
1008 ;;
1009
1010 cygwin*)
1011 lt_cv_dlopen="dlopen"
1012 lt_cv_dlopen_libs=
1013 ;;
1014
1015 darwin*)
1016 # if libdl is installed we need to link against it
1017 AC_CHECK_LIB([dl], [dlopen],
1018 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1019 lt_cv_dlopen="dyld"
1020 lt_cv_dlopen_libs=
1021 lt_cv_dlopen_self=yes
1022 ])
1023 ;;
1024
1025 *)
1026 AC_CHECK_FUNC([shl_load],
1027 [lt_cv_dlopen="shl_load"],
1028 [AC_CHECK_LIB([dld], [shl_load],
1029 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
1030 [AC_CHECK_FUNC([dlopen],
1031 [lt_cv_dlopen="dlopen"],
1032 [AC_CHECK_LIB([dl], [dlopen],
1033 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1034 [AC_CHECK_LIB([svld], [dlopen],
1035 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1036 [AC_CHECK_LIB([dld], [dld_link],
1037 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
1038 ])
1039 ])
1040 ])
1041 ])
1042 ])
1043 ;;
1044 esac
1045
1046 if test "x$lt_cv_dlopen" != xno; then
1047 enable_dlopen=yes
1048 else
1049 enable_dlopen=no
1050 fi
1051
1052 case $lt_cv_dlopen in
1053 dlopen)
1054 save_CPPFLAGS="$CPPFLAGS"
1055 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1056
1057 save_LDFLAGS="$LDFLAGS"
1058 eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1059
1060 save_LIBS="$LIBS"
1061 LIBS="$lt_cv_dlopen_libs $LIBS"
1062
1063 AC_CACHE_CHECK([whether a program can dlopen itself],
1064 lt_cv_dlopen_self, [dnl
1065 _LT_AC_TRY_DLOPEN_SELF(
1066 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1067 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1068 ])
1069
1070 if test "x$lt_cv_dlopen_self" = xyes; then
1071 LDFLAGS="$LDFLAGS $link_static_flag"
1072 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1073 lt_cv_dlopen_self_static, [dnl
1074 _LT_AC_TRY_DLOPEN_SELF(
1075 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1076 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
1077 ])
1078 fi
1079
1080 CPPFLAGS="$save_CPPFLAGS"
1081 LDFLAGS="$save_LDFLAGS"
1082 LIBS="$save_LIBS"
1083 ;;
1084 esac
1085
1086 case $lt_cv_dlopen_self in
1087 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1088 *) enable_dlopen_self=unknown ;;
1089 esac
1090
1091 case $lt_cv_dlopen_self_static in
1092 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1093 *) enable_dlopen_self_static=unknown ;;
1094 esac
1095 fi
1096 ])# AC_LIBTOOL_DLOPEN_SELF
1097
1098
1099 # AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1100 # ---------------------------------
1101 # Check to see if options -c and -o are simultaneously supported by compiler
1102 AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1103 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1104 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1105 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1106 [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1107 $rm -r conftest 2>/dev/null
1108 mkdir conftest
1109 cd conftest
1110 mkdir out
1111 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1112
1113 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
1114 # that will create temporary files in the current directory regardless of
1115 # the output directory. Thus, making CWD read-only will cause this test
1116 # to fail, enabling locking or at least warning the user not to do parallel
1117 # builds.
1118 chmod -w .
1119
1120 lt_compiler_flag="-o out/conftest2.$ac_objext"
1121 # Insert the option either (1) after the last *FLAGS variable, or
1122 # (2) before a word containing "conftest.", or (3) at the end.
1123 # Note that $ac_compile itself does not contain backslashes and begins
1124 # with a dollar sign (not a hyphen), so the echo should work correctly.
1125 lt_compile=`echo "$ac_compile" | $SED \
1126 -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \
1127 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1128 -e 's:$: $lt_compiler_flag:'`
1129 (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1130 (eval "$lt_compile" 2>out/conftest.err)
1131 ac_status=$?
1132 cat out/conftest.err >&AS_MESSAGE_LOG_FD
1133 echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1134 if (exit $ac_status) && test -s out/conftest2.$ac_objext
1135 then
1136 # The compiler can only warn and ignore the option if not recognized
1137 # So say no if there are warnings
1138 if test ! -s out/conftest.err; then
1139 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1140 fi
1141 fi
1142 chmod u+w .
1143 $rm conftest* out/*
1144 rmdir out
1145 cd ..
1146 rmdir conftest
1147 $rm conftest*
1148 ])
1149 ])# AC_LIBTOOL_PROG_CC_C_O
1150
1151
1152 # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1153 # -----------------------------------------
1154 # Check to see if we can do hard links to lock some files if needed
1155 AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1156 [AC_REQUIRE([_LT_AC_LOCK])dnl
1157
1158 hard_links="nottested"
1159 if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1160 # do not overwrite the value of need_locks provided by the user
1161 AC_MSG_CHECKING([if we can lock with hard links])
1162 hard_links=yes
1163 $rm conftest*
1164 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1165 touch conftest.a
1166 ln conftest.a conftest.b 2>&5 || hard_links=no
1167 ln conftest.a conftest.b 2>/dev/null && hard_links=no
1168 AC_MSG_RESULT([$hard_links])
1169 if test "$hard_links" = no; then
1170 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1171 need_locks=warn
1172 fi
1173 else
1174 need_locks=no
1175 fi
1176 ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1177
1178
1179 # AC_LIBTOOL_OBJDIR
1180 # -----------------
1181 AC_DEFUN([AC_LIBTOOL_OBJDIR],
1182 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1183 [rm -f .libs 2>/dev/null
1184 mkdir .libs 2>/dev/null
1185 if test -d .libs; then
1186 lt_cv_objdir=.libs
1187 else
1188 # MS-DOS does not allow filenames that begin with a dot.
1189 lt_cv_objdir=_libs
1190 fi
1191 rmdir .libs 2>/dev/null])
1192 objdir=$lt_cv_objdir
1193 ])# AC_LIBTOOL_OBJDIR
1194
1195
1196 # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1197 # ----------------------------------------------
1198 # Check hardcoding attributes.
1199 AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1200 [AC_MSG_CHECKING([how to hardcode library paths into programs])
1201 _LT_AC_TAGVAR(hardcode_action, $1)=
1202 if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1203 test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \
1204 test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then
1205
1206 # We can hardcode non-existant directories.
1207 if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1208 # If the only mechanism to avoid hardcoding is shlibpath_var, we
1209 # have to relink, otherwise we might link with an installed library
1210 # when we should be linking with a yet-to-be-installed one
1211 ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1212 test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1213 # Linking always hardcodes the temporary library directory.
1214 _LT_AC_TAGVAR(hardcode_action, $1)=relink
1215 else
1216 # We can link without hardcoding, and we can hardcode nonexisting dirs.
1217 _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1218 fi
1219 else
1220 # We cannot hardcode anything, or else we can only hardcode existing
1221 # directories.
1222 _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1223 fi
1224 AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1225
1226 if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1227 # Fast installation is not supported
1228 enable_fast_install=no
1229 elif test "$shlibpath_overrides_runpath" = yes ||
1230 test "$enable_shared" = no; then
1231 # Fast installation is not necessary
1232 enable_fast_install=needless
1233 fi
1234 ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1235
1236
1237 # AC_LIBTOOL_SYS_LIB_STRIP
1238 # ------------------------
1239 AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1240 [striplib=
1241 old_striplib=
1242 AC_MSG_CHECKING([whether stripping libraries is possible])
1243 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1244 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1245 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1246 AC_MSG_RESULT([yes])
1247 else
1248 # FIXME - insert some real tests, host_os isn't really good enough
1249 case $host_os in
1250 darwin*)
1251 if test -n "$STRIP" ; then
1252 striplib="$STRIP -x"
1253 AC_MSG_RESULT([yes])
1254 else
1255 AC_MSG_RESULT([no])
1256 fi
1257 ;;
1258 *)
1259 AC_MSG_RESULT([no])
1260 ;;
1261 esac
1262 fi
1263 ])# AC_LIBTOOL_SYS_LIB_STRIP
1264
1265
1266 # AC_LIBTOOL_SYS_DYNAMIC_LINKER
1267 # -----------------------------
1268 # PORTME Fill in your ld.so characteristics
1269 AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1270 [AC_MSG_CHECKING([dynamic linker characteristics])
1271 library_names_spec=
1272 libname_spec='lib$name'
1273 soname_spec=
1274 shrext=".so"
1275 postinstall_cmds=
1276 postuninstall_cmds=
1277 finish_cmds=
1278 finish_eval=
1279 shlibpath_var=
1280 shlibpath_overrides_runpath=unknown
1281 version_type=none
1282 dynamic_linker="$host_os ld.so"
1283 sys_lib_dlsearch_path_spec="/lib /usr/lib"
1284 if test "$GCC" = yes; then
1285 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1286 if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1287 # if the path contains ";" then we assume it to be the separator
1288 # otherwise default to the standard path separator (i.e. ":") - it is
1289 # assumed that no part of a normal pathname contains ";" but that should
1290 # okay in the real world where ";" in dirpaths is itself problematic.
1291 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1292 else
1293 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1294 fi
1295 else
1296 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1297 fi
1298 need_lib_prefix=unknown
1299 hardcode_into_libs=no
1300
1301 # when you set need_version to no, make sure it does not cause -set_version
1302 # flags to be left without arguments
1303 need_version=unknown
1304
1305 case $host_os in
1306 aix3*)
1307 version_type=linux
1308 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1309 shlibpath_var=LIBPATH
1310
1311 # AIX 3 has no versioning support, so we append a major version to the name.
1312 soname_spec='${libname}${release}${shared_ext}$major'
1313 ;;
1314
1315 aix4* | aix5*)
1316 version_type=linux
1317 need_lib_prefix=no
1318 need_version=no
1319 hardcode_into_libs=yes
1320 if test "$host_cpu" = ia64; then
1321 # AIX 5 supports IA64
1322 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1323 shlibpath_var=LD_LIBRARY_PATH
1324 else
1325 # With GCC up to 2.95.x, collect2 would create an import file
1326 # for dependence libraries. The import file would start with
1327 # the line `#! .'. This would cause the generated library to
1328 # depend on `.', always an invalid library. This was fixed in
1329 # development snapshots of GCC prior to 3.0.
1330 case $host_os in
1331 aix4 | aix4.[[01]] | aix4.[[01]].*)
1332 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1333 echo ' yes '
1334 echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1335 :
1336 else
1337 can_build_shared=no
1338 fi
1339 ;;
1340 esac
1341 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1342 # soname into executable. Probably we can add versioning support to
1343 # collect2, so additional links can be useful in future.
1344 if test "$aix_use_runtimelinking" = yes; then
1345 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1346 # instead of lib<name>.a to let people know that these are not
1347 # typical AIX shared libraries.
1348 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1349 else
1350 # We preserve .a as extension for shared libraries through AIX4.2
1351 # and later when we are not doing run time linking.
1352 library_names_spec='${libname}${release}.a $libname.a'
1353 soname_spec='${libname}${release}${shared_ext}$major'
1354 fi
1355 shlibpath_var=LIBPATH
1356 fi
1357 ;;
1358
1359 amigaos*)
1360 library_names_spec='$libname.ixlibrary $libname.a'
1361 # Create ${libname}_ixlibrary.a entries in /sys/libs.
1362 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'
1363 ;;
1364
1365 beos*)
1366 library_names_spec='${libname}${shared_ext}'
1367 dynamic_linker="$host_os ld.so"
1368 shlibpath_var=LIBRARY_PATH
1369 ;;
1370
1371 bsdi4*)
1372 version_type=linux
1373 need_version=no
1374 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1375 soname_spec='${libname}${release}${shared_ext}$major'
1376 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1377 shlibpath_var=LD_LIBRARY_PATH
1378 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1379 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1380 # the default ld.so.conf also contains /usr/contrib/lib and
1381 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1382 # libtool to hard-code these into programs
1383 ;;
1384
1385 cygwin* | mingw* | pw32*)
1386 version_type=windows
1387 shrext=".dll"
1388 need_version=no
1389 need_lib_prefix=no
1390
1391 case $GCC,$host_os in
1392 yes,cygwin* | yes,mingw* | yes,pw32*)
1393 library_names_spec='$libname.dll.a'
1394 # DLL is installed to $(libdir)/../bin by postinstall_cmds
1395 postinstall_cmds='base_file=`basename \${file}`~
1396 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1397 dldir=$destdir/`dirname \$dlpath`~
1398 test -d \$dldir || mkdir -p \$dldir~
1399 $install_prog $dir/$dlname \$dldir/$dlname'
1400 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1401 dlpath=$dir/\$dldll~
1402 $rm \$dlpath'
1403 shlibpath_overrides_runpath=yes
1404
1405 case $host_os in
1406 cygwin*)
1407 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1408 #soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1409 soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
1410 sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1411 ;;
1412 mingw*)
1413 # MinGW DLLs use traditional 'lib' prefix
1414 #soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1415 soname_spec='`echo ${libname} | sed -e 's/^lib//'`${shared_ext}'
1416 sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1417 if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1418 # It is most probably a Windows format PATH printed by
1419 # mingw gcc, but we are running on Cygwin. Gcc prints its search
1420 # path with ; separators, and with drive letters. We can handle the
1421 # drive letters (cygwin fileutils understands them), so leave them,
1422 # especially as we might pass files found there to a mingw objdump,
1423 # which wouldn't understand a cygwinified path. Ahh.
1424 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1425 else
1426 sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
1427 fi
1428 ;;
1429 pw32*)
1430 # pw32 DLLs use 'pw' prefix rather than 'lib'
1431 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
1432 ;;
1433 esac
1434 ;;
1435
1436 *)
1437 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1438 ;;
1439 esac
1440 dynamic_linker='Win32 ld.exe'
1441 # FIXME: first we should search . and the directory the executable is in
1442 shlibpath_var=PATH
1443 ;;
1444
1445 darwin* | rhapsody*)
1446 dynamic_linker="$host_os dyld"
1447 version_type=darwin
1448 need_lib_prefix=no
1449 need_version=no
1450 # FIXME: Relying on posixy $() will cause problems for
1451 # cross-compilation, but unfortunately the echo tests do not
1452 # yet detect zsh echo's removal of \ escapes.
1453 library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1454 soname_spec='${libname}${release}${major}$shared_ext'
1455 shlibpath_overrides_runpath=yes
1456 shlibpath_var=DYLD_LIBRARY_PATH
1457 shrext='$(test .$module = .yes && echo .so || echo .dylib)'
1458 # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1459 if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
1460 sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1461 fi
1462 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1463 ;;
1464
1465 dgux*)
1466 version_type=linux
1467 need_lib_prefix=no
1468 need_version=no
1469 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1470 soname_spec='${libname}${release}${shared_ext}$major'
1471 shlibpath_var=LD_LIBRARY_PATH
1472 ;;
1473
1474 freebsd1*)
1475 dynamic_linker=no
1476 ;;
1477
1478 freebsd*)
1479 objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
1480 version_type=freebsd-$objformat
1481 case $version_type in
1482 freebsd-elf*)
1483 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1484 need_version=no
1485 need_lib_prefix=no
1486 ;;
1487 freebsd-*)
1488 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1489 need_version=yes
1490 ;;
1491 esac
1492 shlibpath_var=LD_LIBRARY_PATH
1493 case $host_os in
1494 freebsd2*)
1495 shlibpath_overrides_runpath=yes
1496 ;;
1497 freebsd3.[01]* | freebsdelf3.[01]*)
1498 shlibpath_overrides_runpath=yes
1499 hardcode_into_libs=yes
1500 ;;
1501 *) # from 3.2 on
1502 shlibpath_overrides_runpath=no
1503 hardcode_into_libs=yes
1504 ;;
1505 esac
1506 ;;
1507
1508 gnu*)
1509 version_type=linux
1510 need_lib_prefix=no
1511 need_version=no
1512 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1513 soname_spec='${libname}${release}${shared_ext}$major'
1514 shlibpath_var=LD_LIBRARY_PATH
1515 hardcode_into_libs=yes
1516 ;;
1517
1518 hpux9* | hpux10* | hpux11*)
1519 # Give a soname corresponding to the major version so that dld.sl refuses to
1520 # link against other versions.
1521 version_type=sunos
1522 need_lib_prefix=no
1523 need_version=no
1524 case "$host_cpu" in
1525 ia64*)
1526 shrext='.so'
1527 hardcode_into_libs=yes
1528 dynamic_linker="$host_os dld.so"
1529 shlibpath_var=LD_LIBRARY_PATH
1530 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1532 soname_spec='${libname}${release}${shared_ext}$major'
1533 if test "X$HPUX_IA64_MODE" = X32; then
1534 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1535 else
1536 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1537 fi
1538 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1539 ;;
1540 hppa*64*)
1541 shrext='.sl'
1542 hardcode_into_libs=yes
1543 dynamic_linker="$host_os dld.sl"
1544 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1545 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1546 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1547 soname_spec='${libname}${release}${shared_ext}$major'
1548 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1549 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1550 ;;
1551 *)
1552 shrext='.sl'
1553 dynamic_linker="$host_os dld.sl"
1554 shlibpath_var=SHLIB_PATH
1555 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1556 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1557 soname_spec='${libname}${release}${shared_ext}$major'
1558 ;;
1559 esac
1560 # HP-UX runs *really* slowly unless shared libraries are mode 555.
1561 postinstall_cmds='chmod 555 $lib'
1562 ;;
1563
1564 irix5* | irix6* | nonstopux*)
1565 case $host_os in
1566 nonstopux*) version_type=nonstopux ;;
1567 *)
1568 if test "$lt_cv_prog_gnu_ld" = yes; then
1569 version_type=linux
1570 else
1571 version_type=irix
1572 fi ;;
1573 esac
1574 need_lib_prefix=no
1575 need_version=no
1576 soname_spec='${libname}${release}${shared_ext}$major'
1577 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1578 case $host_os in
1579 irix5* | nonstopux*)
1580 libsuff= shlibsuff=
1581 ;;
1582 *)
1583 case $LD in # libtool.m4 will add one of these switches to LD
1584 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1585 libsuff= shlibsuff= libmagic=32-bit;;
1586 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1587 libsuff=32 shlibsuff=N32 libmagic=N32;;
1588 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1589 libsuff=64 shlibsuff=64 libmagic=64-bit;;
1590 *) libsuff= shlibsuff= libmagic=never-match;;
1591 esac
1592 ;;
1593 esac
1594 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1595 shlibpath_overrides_runpath=no
1596 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1597 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1598 hardcode_into_libs=yes
1599 ;;
1600
1601 # No shared lib support for Linux oldld, aout, or coff.
1602 linux*oldld* | linux*aout* | linux*coff*)
1603 dynamic_linker=no
1604 ;;
1605
1606 # This must be Linux ELF.
1607 linux*)
1608 version_type=linux
1609 need_lib_prefix=no
1610 need_version=no
1611 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1612 soname_spec='${libname}${release}${shared_ext}$major'
1613 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1614 shlibpath_var=LD_LIBRARY_PATH
1615 shlibpath_overrides_runpath=no
1616 # This implies no fast_install, which is unacceptable.
1617 # Some rework will be needed to allow for fast_install
1618 # before this can be enabled.
1619 hardcode_into_libs=yes
1620
1621 # We used to test for /lib/ld.so.1 and disable shared libraries on
1622 # powerpc, because MkLinux only supported shared libraries with the
1623 # GNU dynamic linker. Since this was broken with cross compilers,
1624 # most powerpc-linux boxes support dynamic linking these days and
1625 # people can always --disable-shared, the test was removed, and we
1626 # assume the GNU/Linux dynamic linker is in use.
1627 dynamic_linker='GNU/Linux ld.so'
1628 ;;
1629
1630 netbsd*)
1631 version_type=sunos
1632 need_lib_prefix=no
1633 need_version=no
1634 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1635 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1636 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1637 dynamic_linker='NetBSD (a.out) ld.so'
1638 else
1639 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}'
1640 soname_spec='${libname}${release}${shared_ext}$major'
1641 dynamic_linker='NetBSD ld.elf_so'
1642 fi
1643 shlibpath_var=LD_LIBRARY_PATH
1644 shlibpath_overrides_runpath=yes
1645 hardcode_into_libs=yes
1646 ;;
1647
1648 newsos6)
1649 version_type=linux
1650 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1651 shlibpath_var=LD_LIBRARY_PATH
1652 shlibpath_overrides_runpath=yes
1653 ;;
1654
1655 nto-qnx)
1656 version_type=linux
1657 need_lib_prefix=no
1658 need_version=no
1659 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1660 soname_spec='${libname}${release}${shared_ext}$major'
1661 shlibpath_var=LD_LIBRARY_PATH
1662 shlibpath_overrides_runpath=yes
1663 ;;
1664
1665 openbsd*)
1666 version_type=sunos
1667 need_lib_prefix=no
1668 need_version=no
1669 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1670 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1671 shlibpath_var=LD_LIBRARY_PATH
1672 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1673 case $host_os in
1674 openbsd2.[[89]] | openbsd2.[[89]].*)
1675 shlibpath_overrides_runpath=no
1676 ;;
1677 *)
1678 shlibpath_overrides_runpath=yes
1679 ;;
1680 esac
1681 else
1682 shlibpath_overrides_runpath=yes
1683 fi
1684 ;;
1685
1686 os2*)
1687 libname_spec='$name'
1688 shrext=".dll"
1689 need_lib_prefix=no
1690 library_names_spec='$libname${shared_ext} $libname.a'
1691 dynamic_linker='OS/2 ld.exe'
1692 shlibpath_var=LIBPATH
1693 ;;
1694
1695 osf3* | osf4* | osf5*)
1696 version_type=osf
1697 need_lib_prefix=no
1698 need_version=no
1699 soname_spec='${libname}${release}${shared_ext}$major'
1700 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1701 shlibpath_var=LD_LIBRARY_PATH
1702 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1703 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1704 ;;
1705
1706 sco3.2v5*)
1707 version_type=osf
1708 soname_spec='${libname}${release}${shared_ext}$major'
1709 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1710 shlibpath_var=LD_LIBRARY_PATH
1711 ;;
1712
1713 solaris*)
1714 version_type=linux
1715 need_lib_prefix=no
1716 need_version=no
1717 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1718 soname_spec='${libname}${release}${shared_ext}$major'
1719 shlibpath_var=LD_LIBRARY_PATH
1720 shlibpath_overrides_runpath=yes
1721 hardcode_into_libs=yes
1722 # ldd complains unless libraries are executable
1723 postinstall_cmds='chmod +x $lib'
1724 ;;
1725
1726 sunos4*)
1727 version_type=sunos
1728 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1729 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1730 shlibpath_var=LD_LIBRARY_PATH
1731 shlibpath_overrides_runpath=yes
1732 if test "$with_gnu_ld" = yes; then
1733 need_lib_prefix=no
1734 fi
1735 need_version=yes
1736 ;;
1737
1738 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1739 version_type=linux
1740 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1741 soname_spec='${libname}${release}${shared_ext}$major'
1742 shlibpath_var=LD_LIBRARY_PATH
1743 case $host_vendor in
1744 sni)
1745 shlibpath_overrides_runpath=no
1746 need_lib_prefix=no
1747 export_dynamic_flag_spec='${wl}-Blargedynsym'
1748 runpath_var=LD_RUN_PATH
1749 ;;
1750 siemens)
1751 need_lib_prefix=no
1752 ;;
1753 motorola)
1754 need_lib_prefix=no
1755 need_version=no
1756 shlibpath_overrides_runpath=no
1757 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1758 ;;
1759 esac
1760 ;;
1761
1762 sysv4*MP*)
1763 if test -d /usr/nec ;then
1764 version_type=linux
1765 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1766 soname_spec='$libname${shared_ext}.$major'
1767 shlibpath_var=LD_LIBRARY_PATH
1768 fi
1769 ;;
1770
1771 uts4*)
1772 version_type=linux
1773 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1774 soname_spec='${libname}${release}${shared_ext}$major'
1775 shlibpath_var=LD_LIBRARY_PATH
1776 ;;
1777
1778 *)
1779 dynamic_linker=no
1780 ;;
320 esac 1781 esac
321 ]) 1782 AC_MSG_RESULT([$dynamic_linker])
322 1783 test "$dynamic_linker" = no && can_build_shared=no
323 # AC_LIBTOOL_DLOPEN - enable checks for dlopen support 1784 ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
324 AC_DEFUN(AC_LIBTOOL_DLOPEN, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])]) 1785
325 1786
326 # AC_LIBTOOL_WIN32_DLL - declare package support for building win32 dll's 1787 # _LT_AC_TAGCONFIG
327 AC_DEFUN(AC_LIBTOOL_WIN32_DLL, [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])]) 1788 # ----------------
328 1789 AC_DEFUN([_LT_AC_TAGCONFIG],
329 # AC_ENABLE_SHARED - implement the --enable-shared flag 1790 [AC_ARG_WITH([tags],
330 # Usage: AC_ENABLE_SHARED[(DEFAULT)] 1791 [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
331 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 1792 [include additional configurations @<:@automatic@:>@])],
332 # `yes'. 1793 [tagnames="$withval"])
333 AC_DEFUN(AC_ENABLE_SHARED, [dnl 1794
334 define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl 1795 if test -f "$ltmain" && test -n "$tagnames"; then
335 AC_ARG_ENABLE(shared, 1796 if test ! -f "${ofile}"; then
336 changequote(<<, >>)dnl 1797 AC_MSG_WARN([output file `$ofile' does not exist])
337 << --enable-shared[=PKGS] build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT], 1798 fi
338 changequote([, ])dnl 1799
339 [p=${PACKAGE-default} 1800 if test -z "$LTCC"; then
340 case "$enableval" in 1801 eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
341 yes) enable_shared=yes ;; 1802 if test -z "$LTCC"; then
342 no) enable_shared=no ;; 1803 AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
343 *) 1804 else
344 enable_shared=no 1805 AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
345 # Look at the argument we got. We use all the common list separators. 1806 fi
346 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 1807 fi
347 for pkg in $enableval; do 1808
348 if test "X$pkg" = "X$p"; then 1809 # Extract list of available tagged configurations in $ofile.
349 enable_shared=yes 1810 # Note that this assumes the entire list is on one line.
1811 available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1812
1813 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1814 for tagname in $tagnames; do
1815 IFS="$lt_save_ifs"
1816 # Check whether tagname contains only valid characters
1817 case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1818 "") ;;
1819 *) AC_MSG_ERROR([invalid tag name: $tagname])
1820 ;;
1821 esac
1822
1823 if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1824 then
1825 AC_MSG_ERROR([tag name \"$tagname\" already exists])
1826 fi
1827
1828 # Update the list of available tags.
1829 if test -n "$tagname"; then
1830 echo appending configuration tag \"$tagname\" to $ofile
1831
1832 case $tagname in
1833 CXX)
1834 if test -n "$CXX" && test "X$CXX" != "Xno"; then
1835 AC_LIBTOOL_LANG_CXX_CONFIG
1836 else
1837 tagname=""
1838 fi
1839 ;;
1840
1841 F77)
1842 if test -n "$F77" && test "X$F77" != "Xno"; then
1843 AC_LIBTOOL_LANG_F77_CONFIG
1844 else
1845 tagname=""
1846 fi
1847 ;;
1848
1849 GCJ)
1850 if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1851 AC_LIBTOOL_LANG_GCJ_CONFIG
1852 else
1853 tagname=""
1854 fi
1855 ;;
1856
1857 RC)
1858 AC_LIBTOOL_LANG_RC_CONFIG
1859 ;;
1860
1861 *)
1862 AC_MSG_ERROR([Unsupported tag name: $tagname])
1863 ;;
1864 esac
1865
1866 # Append the new tag name to the list of available tags.
1867 if test -n "$tagname" ; then
1868 available_tags="$available_tags $tagname"
1869 fi
350 fi 1870 fi
351 done 1871 done
352 IFS="$ac_save_ifs" 1872 IFS="$lt_save_ifs"
353 ;; 1873
354 esac], 1874 # Now substitute the updated list of available tags.
355 enable_shared=AC_ENABLE_SHARED_DEFAULT)dnl 1875 if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
356 ]) 1876 mv "${ofile}T" "$ofile"
357 1877 chmod +x "$ofile"
358 # AC_DISABLE_SHARED - set the default shared flag to --disable-shared 1878 else
359 AC_DEFUN(AC_DISABLE_SHARED, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 1879 rm -f "${ofile}T"
360 AC_ENABLE_SHARED(no)]) 1880 AC_MSG_ERROR([unable to update list of available tagged configurations.])
361 1881 fi
362 # AC_ENABLE_STATIC - implement the --enable-static flag 1882 fi
363 # Usage: AC_ENABLE_STATIC[(DEFAULT)] 1883 ])# _LT_AC_TAGCONFIG
364 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 1884
365 # `yes'. 1885
366 AC_DEFUN(AC_ENABLE_STATIC, [dnl 1886 # AC_LIBTOOL_DLOPEN
367 define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl 1887 # -----------------
368 AC_ARG_ENABLE(static, 1888 # enable checks for dlopen support
369 changequote(<<, >>)dnl 1889 AC_DEFUN([AC_LIBTOOL_DLOPEN],
370 << --enable-static[=PKGS] build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT], 1890 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
371 changequote([, ])dnl 1891 ])# AC_LIBTOOL_DLOPEN
372 [p=${PACKAGE-default} 1892
373 case "$enableval" in 1893
374 yes) enable_static=yes ;; 1894 # AC_LIBTOOL_WIN32_DLL
375 no) enable_static=no ;; 1895 # --------------------
1896 # declare package support for building win32 dll's
1897 AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1898 [AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1899 ])# AC_LIBTOOL_WIN32_DLL
1900
1901
1902 # AC_ENABLE_SHARED([DEFAULT])
1903 # ---------------------------
1904 # implement the --enable-shared flag
1905 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1906 AC_DEFUN([AC_ENABLE_SHARED],
1907 [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1908 AC_ARG_ENABLE([shared],
1909 [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1910 [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1911 [p=${PACKAGE-default}
1912 case $enableval in
1913 yes) enable_shared=yes ;;
1914 no) enable_shared=no ;;
1915 *)
1916 enable_shared=no
1917 # Look at the argument we got. We use all the common list separators.
1918 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1919 for pkg in $enableval; do
1920 IFS="$lt_save_ifs"
1921 if test "X$pkg" = "X$p"; then
1922 enable_shared=yes
1923 fi
1924 done
1925 IFS="$lt_save_ifs"
1926 ;;
1927 esac],
1928 [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1929 ])# AC_ENABLE_SHARED
1930
1931
1932 # AC_DISABLE_SHARED
1933 # -----------------
1934 #- set the default shared flag to --disable-shared
1935 AC_DEFUN([AC_DISABLE_SHARED],
1936 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1937 AC_ENABLE_SHARED(no)
1938 ])# AC_DISABLE_SHARED
1939
1940
1941 # AC_ENABLE_STATIC([DEFAULT])
1942 # ---------------------------
1943 # implement the --enable-static flag
1944 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1945 AC_DEFUN([AC_ENABLE_STATIC],
1946 [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1947 AC_ARG_ENABLE([static],
1948 [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1949 [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1950 [p=${PACKAGE-default}
1951 case $enableval in
1952 yes) enable_static=yes ;;
1953 no) enable_static=no ;;
1954 *)
1955 enable_static=no
1956 # Look at the argument we got. We use all the common list separators.
1957 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1958 for pkg in $enableval; do
1959 IFS="$lt_save_ifs"
1960 if test "X$pkg" = "X$p"; then
1961 enable_static=yes
1962 fi
1963 done
1964 IFS="$lt_save_ifs"
1965 ;;
1966 esac],
1967 [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1968 ])# AC_ENABLE_STATIC
1969
1970
1971 # AC_DISABLE_STATIC
1972 # -----------------
1973 # set the default static flag to --disable-static
1974 AC_DEFUN([AC_DISABLE_STATIC],
1975 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1976 AC_ENABLE_STATIC(no)
1977 ])# AC_DISABLE_STATIC
1978
1979
1980 # AC_ENABLE_FAST_INSTALL([DEFAULT])
1981 # ---------------------------------
1982 # implement the --enable-fast-install flag
1983 # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
1984 AC_DEFUN([AC_ENABLE_FAST_INSTALL],
1985 [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1986 AC_ARG_ENABLE([fast-install],
1987 [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1988 [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1989 [p=${PACKAGE-default}
1990 case $enableval in
1991 yes) enable_fast_install=yes ;;
1992 no) enable_fast_install=no ;;
1993 *)
1994 enable_fast_install=no
1995 # Look at the argument we got. We use all the common list separators.
1996 lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1997 for pkg in $enableval; do
1998 IFS="$lt_save_ifs"
1999 if test "X$pkg" = "X$p"; then
2000 enable_fast_install=yes
2001 fi
2002 done
2003 IFS="$lt_save_ifs"
2004 ;;
2005 esac],
2006 [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2007 ])# AC_ENABLE_FAST_INSTALL
2008
2009
2010 # AC_DISABLE_FAST_INSTALL
2011 # -----------------------
2012 # set the default to --disable-fast-install
2013 AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2014 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2015 AC_ENABLE_FAST_INSTALL(no)
2016 ])# AC_DISABLE_FAST_INSTALL
2017
2018
2019 # AC_LIBTOOL_PICMODE([MODE])
2020 # --------------------------
2021 # implement the --with-pic flag
2022 # MODE is either `yes' or `no'. If omitted, it defaults to `both'.
2023 AC_DEFUN([AC_LIBTOOL_PICMODE],
2024 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2025 pic_mode=ifelse($#,1,$1,default)
2026 ])# AC_LIBTOOL_PICMODE
2027
2028
2029 # AC_PROG_EGREP
2030 # -------------
2031 # This is predefined starting with Autoconf 2.54, so this conditional
2032 # definition can be removed once we require Autoconf 2.54 or later.
2033 m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2034 [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2035 [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2036 then ac_cv_prog_egrep='grep -E'
2037 else ac_cv_prog_egrep='egrep'
2038 fi])
2039 EGREP=$ac_cv_prog_egrep
2040 AC_SUBST([EGREP])
2041 ])])
2042
2043
2044 # AC_PATH_TOOL_PREFIX
2045 # -------------------
2046 # find a file program which can recognise shared library
2047 AC_DEFUN([AC_PATH_TOOL_PREFIX],
2048 [AC_REQUIRE([AC_PROG_EGREP])dnl
2049 AC_MSG_CHECKING([for $1])
2050 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2051 [case $MAGIC_CMD in
2052 [[\\/*] | ?:[\\/]*])
2053 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2054 ;;
376 *) 2055 *)
377 enable_static=no 2056 lt_save_MAGIC_CMD="$MAGIC_CMD"
378 # Look at the argument we got. We use all the common list separators. 2057 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
379 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 2058 dnl $ac_dummy forces splitting on constant user-supplied paths.
380 for pkg in $enableval; do 2059 dnl POSIX.2 word splitting is done only on the output of word expansions,
381 if test "X$pkg" = "X$p"; then 2060 dnl not every word. This closes a longstanding sh security hole.
382 enable_static=yes 2061 ac_dummy="ifelse([$2], , $PATH, [$2])"
2062 for ac_dir in $ac_dummy; do
2063 IFS="$lt_save_ifs"
2064 test -z "$ac_dir" && ac_dir=.
2065 if test -f $ac_dir/$1; then
2066 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2067 if test -n "$file_magic_test_file"; then
2068 case $deplibs_check_method in
2069 "file_magic "*)
2070 file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
2071 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2072 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2073 $EGREP "$file_magic_regex" > /dev/null; then
2074 :
2075 else
2076 cat <<EOF 1>&2
2077
2078 *** Warning: the command libtool uses to detect shared libraries,
2079 *** $file_magic_cmd, produces output that libtool cannot recognize.
2080 *** The result is that libtool may fail to recognize shared libraries
2081 *** as such. This will affect the creation of libtool libraries that
2082 *** depend on shared libraries, but programs linked with such libtool
2083 *** libraries will work regardless of this problem. Nevertheless, you
2084 *** may want to report the problem to your system manager and/or to
2085 *** bug-libtool@gnu.org
2086
2087 EOF
2088 fi ;;
2089 esac
2090 fi
2091 break
383 fi 2092 fi
384 done 2093 done
385 IFS="$ac_save_ifs" 2094 IFS="$lt_save_ifs"
386 ;; 2095 MAGIC_CMD="$lt_save_MAGIC_CMD"
387 esac], 2096 ;;
388 enable_static=AC_ENABLE_STATIC_DEFAULT)dnl 2097 esac])
389 ]) 2098 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
390 2099 if test -n "$MAGIC_CMD"; then
391 # AC_DISABLE_STATIC - set the default static flag to --disable-static 2100 AC_MSG_RESULT($MAGIC_CMD)
392 AC_DEFUN(AC_DISABLE_STATIC, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2101 else
393 AC_ENABLE_STATIC(no)]) 2102 AC_MSG_RESULT(no)
394 2103 fi
395 2104 ])# AC_PATH_TOOL_PREFIX
396 # AC_ENABLE_FAST_INSTALL - implement the --enable-fast-install flag 2105
397 # Usage: AC_ENABLE_FAST_INSTALL[(DEFAULT)] 2106
398 # Where DEFAULT is either `yes' or `no'. If omitted, it defaults to 2107 # AC_PATH_MAGIC
399 # `yes'. 2108 # -------------
400 AC_DEFUN(AC_ENABLE_FAST_INSTALL, [dnl 2109 # find a file program which can recognise a shared library
401 define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl 2110 AC_DEFUN([AC_PATH_MAGIC],
402 AC_ARG_ENABLE(fast-install, 2111 [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
403 changequote(<<, >>)dnl 2112 if test -z "$lt_cv_path_MAGIC_CMD"; then
404 << --enable-fast-install[=PKGS] optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT], 2113 if test -n "$ac_tool_prefix"; then
405 changequote([, ])dnl 2114 AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
406 [p=${PACKAGE-default} 2115 else
407 case "$enableval" in 2116 MAGIC_CMD=:
408 yes) enable_fast_install=yes ;; 2117 fi
409 no) enable_fast_install=no ;; 2118 fi
410 *) 2119 ])# AC_PATH_MAGIC
411 enable_fast_install=no 2120
412 # Look at the argument we got. We use all the common list separators. 2121
413 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:," 2122 # AC_PROG_LD
414 for pkg in $enableval; do 2123 # ----------
415 if test "X$pkg" = "X$p"; then 2124 # find the path to the GNU or non-GNU linker
416 enable_fast_install=yes 2125 AC_DEFUN([AC_PROG_LD],
417 fi 2126 [AC_ARG_WITH([gnu-ld],
418 done 2127 [AC_HELP_STRING([--with-gnu-ld],
419 IFS="$ac_save_ifs" 2128 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
420 ;; 2129 [test "$withval" = no || with_gnu_ld=yes],
421 esac], 2130 [with_gnu_ld=no])
422 enable_fast_install=AC_ENABLE_FAST_INSTALL_DEFAULT)dnl 2131 AC_REQUIRE([LT_AC_PROG_SED])dnl
423 ])
424
425 # AC_ENABLE_FAST_INSTALL - set the default to --disable-fast-install
426 AC_DEFUN(AC_DISABLE_FAST_INSTALL, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
427 AC_ENABLE_FAST_INSTALL(no)])
428
429 # AC_PROG_LD - find the path to the GNU or non-GNU linker
430 AC_DEFUN(AC_PROG_LD,
431 [AC_ARG_WITH(gnu-ld,
432 [ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
433 test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
434 AC_REQUIRE([AC_PROG_CC])dnl 2132 AC_REQUIRE([AC_PROG_CC])dnl
435 AC_REQUIRE([AC_CANONICAL_HOST])dnl 2133 AC_REQUIRE([AC_CANONICAL_HOST])dnl
436 AC_REQUIRE([AC_CANONICAL_BUILD])dnl 2134 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
437 ac_prog=ld 2135 ac_prog=ld
438 if test "$ac_cv_prog_gcc" = yes; then 2136 if test "$GCC" = yes; then
439 # Check if gcc -print-prog-name=ld gives a path. 2137 # Check if gcc -print-prog-name=ld gives a path.
440 AC_MSG_CHECKING([for ld used by GCC]) 2138 AC_MSG_CHECKING([for ld used by $CC])
441 DELCR='tr -d \015' 2139 case $host in
442 ac_prog=`($CC -print-prog-name=ld | $DELCR) 2>&5` 2140 *-*-mingw*)
443 case "$ac_prog" in 2141 # gcc leaves a trailing carriage return which upsets mingw
2142 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2143 *)
2144 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2145 esac
2146 case $ac_prog in
444 # Accept absolute paths. 2147 # Accept absolute paths.
445 changequote(,)dnl 2148 [[\\/]]* | ?:[[\\/]]*)
446 [\\/]* | [A-Za-z]:[\\/]*) 2149 re_direlt='/[[^/]][[^/]]*/\.\./'
447 re_direlt='/[^/][^/]*/\.\./'
448 changequote([,])dnl
449 # Canonicalize the path of ld 2150 # Canonicalize the path of ld
450 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` 2151 ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
451 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do 2152 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
452 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 2153 ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
453 done 2154 done
454 test -z "$LD" && LD="$ac_prog" 2155 test -z "$LD" && LD="$ac_prog"
455 ;; 2156 ;;
456 "") 2157 "")
457 # If it fails, then pretend we aren't using GCC. 2158 # If it fails, then pretend we aren't using GCC.
465 elif test "$with_gnu_ld" = yes; then 2166 elif test "$with_gnu_ld" = yes; then
466 AC_MSG_CHECKING([for GNU ld]) 2167 AC_MSG_CHECKING([for GNU ld])
467 else 2168 else
468 AC_MSG_CHECKING([for non-GNU ld]) 2169 AC_MSG_CHECKING([for non-GNU ld])
469 fi 2170 fi
470 AC_CACHE_VAL(ac_cv_path_LD, 2171 AC_CACHE_VAL(lt_cv_path_LD,
471 [if test -z "$LD"; then 2172 [if test -z "$LD"; then
472 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 2173 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
473 for ac_dir in $PATH; do 2174 for ac_dir in $PATH; do
2175 IFS="$lt_save_ifs"
474 test -z "$ac_dir" && ac_dir=. 2176 test -z "$ac_dir" && ac_dir=.
475 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2177 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
476 ac_cv_path_LD="$ac_dir/$ac_prog" 2178 lt_cv_path_LD="$ac_dir/$ac_prog"
477 # Check to see if the program is GNU ld. I'd rather use --version, 2179 # Check to see if the program is GNU ld. I'd rather use --version,
478 # but apparently some GNU ld's only accept -v. 2180 # but apparently some GNU ld's only accept -v.
479 # Break only if it was the GNU/non-GNU ld that we prefer. 2181 # Break only if it was the GNU/non-GNU ld that we prefer.
480 if "$ac_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then 2182 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2183 *GNU* | *'with BFD'*)
481 test "$with_gnu_ld" != no && break 2184 test "$with_gnu_ld" != no && break
482 else 2185 ;;
2186 *)
483 test "$with_gnu_ld" != yes && break 2187 test "$with_gnu_ld" != yes && break
484 fi 2188 ;;
2189 esac
485 fi 2190 fi
486 done 2191 done
487 IFS="$ac_save_ifs" 2192 IFS="$lt_save_ifs"
488 else 2193 else
489 ac_cv_path_LD="$LD" # Let the user override the test with a path. 2194 lt_cv_path_LD="$LD" # Let the user override the test with a path.
490 fi]) 2195 fi])
491 LD="$ac_cv_path_LD" 2196 LD="$lt_cv_path_LD"
492 if test -n "$LD"; then 2197 if test -n "$LD"; then
493 AC_MSG_RESULT($LD) 2198 AC_MSG_RESULT($LD)
494 else 2199 else
495 AC_MSG_RESULT(no) 2200 AC_MSG_RESULT(no)
496 fi 2201 fi
497 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2202 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
498 AC_PROG_LD_GNU 2203 AC_PROG_LD_GNU
2204 ])# AC_PROG_LD
2205
2206
2207 # AC_PROG_LD_GNU
2208 # --------------
2209 AC_DEFUN([AC_PROG_LD_GNU],
2210 [AC_REQUIRE([AC_PROG_EGREP])dnl
2211 AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2212 [# I'd rather use --version here, but apparently some GNU ld's only accept -v.
2213 case `"$LD" -v 2>&1 </dev/null` in
2214 *GNU* | *'with BFD'*)
2215 lt_cv_prog_gnu_ld=yes
2216 ;;
2217 *)
2218 lt_cv_prog_gnu_ld=no
2219 ;;
2220 esac])
2221 with_gnu_ld=$lt_cv_prog_gnu_ld
2222 ])# AC_PROG_LD_GNU
2223
2224
2225 # AC_PROG_LD_RELOAD_FLAG
2226 # ----------------------
2227 # find reload flag for linker
2228 # -- PORTME Some linkers may need a different reload flag.
2229 AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2230 [AC_CACHE_CHECK([for $LD option to reload object files],
2231 lt_cv_ld_reload_flag,
2232 [lt_cv_ld_reload_flag='-r'])
2233 reload_flag=$lt_cv_ld_reload_flag
2234 case $reload_flag in
2235 "" | " "*) ;;
2236 *) reload_flag=" $reload_flag" ;;
2237 esac
2238 reload_cmds='$LD$reload_flag -o $output$reload_objs'
2239 ])# AC_PROG_LD_RELOAD_FLAG
2240
2241
2242 # AC_DEPLIBS_CHECK_METHOD
2243 # -----------------------
2244 # how to check for library dependencies
2245 # -- PORTME fill in with the dynamic library characteristics
2246 AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2247 [AC_CACHE_CHECK([how to recognise dependent libraries],
2248 lt_cv_deplibs_check_method,
2249 [lt_cv_file_magic_cmd='$MAGIC_CMD'
2250 lt_cv_file_magic_test_file=
2251 lt_cv_deplibs_check_method='unknown'
2252 # Need to set the preceding variable on all platforms that support
2253 # interlibrary dependencies.
2254 # 'none' -- dependencies not supported.
2255 # `unknown' -- same as none, but documents that we really don't know.
2256 # 'pass_all' -- all dependencies passed with no checks.
2257 # 'test_compile' -- check by making test program.
2258 # 'file_magic [[regex]]' -- check by looking for files in library path
2259 # which responds to the $file_magic_cmd with a given extended regex.
2260 # If you have `file' or equivalent on your system and you're not sure
2261 # whether `pass_all' will *always* work, you probably want this one.
2262
2263 case $host_os in
2264 aix4* | aix5*)
2265 lt_cv_deplibs_check_method=pass_all
2266 ;;
2267
2268 beos*)
2269 lt_cv_deplibs_check_method=pass_all
2270 ;;
2271
2272 bsdi4*)
2273 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2274 lt_cv_file_magic_cmd='/usr/bin/file -L'
2275 lt_cv_file_magic_test_file=/shlib/libc.so
2276 ;;
2277
2278 cygwin* | mingw* | pw32*)
2279 # win32_libid is a shell function defined in ltmain.sh
2280 #lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2281 lt_cv_deplibs_check_method=pass_all
2282 lt_cv_file_magic_cmd='win32_libid'
2283 ;;
2284
2285 darwin* | rhapsody*)
2286 # this will be overwritten by pass_all, but leave it in just in case
2287 lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
2288 lt_cv_file_magic_cmd='/usr/bin/file -L'
2289 case "$host_os" in
2290 rhapsody* | darwin1.[[012]])
2291 lt_cv_file_magic_test_file=`/System/Library/Frameworks/System.framework/System`
2292 ;;
2293 *) # Darwin 1.3 on
2294 lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
2295 ;;
2296 esac
2297 lt_cv_deplibs_check_method=pass_all
2298 ;;
2299
2300 freebsd*)
2301 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2302 case $host_cpu in
2303 i*86 )
2304 # Not sure whether the presence of OpenBSD here was a mistake.
2305 # Let's accept both of them until this is cleared up.
2306 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library'
2307 lt_cv_file_magic_cmd=/usr/bin/file
2308 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2309 ;;
2310 esac
2311 else
2312 lt_cv_deplibs_check_method=pass_all
2313 fi
2314 ;;
2315
2316 gnu*)
2317 lt_cv_deplibs_check_method=pass_all
2318 ;;
2319
2320 hpux10.20* | hpux11*)
2321 lt_cv_file_magic_cmd=/usr/bin/file
2322 case "$host_cpu" in
2323 ia64*)
2324 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2325 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2326 ;;
2327 hppa*64*)
2328 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
2329 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2330 ;;
2331 *)
2332 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2333 lt_cv_file_magic_test_file=/usr/lib/libc.sl
2334 ;;
2335 esac
2336 ;;
2337
2338 irix5* | irix6* | nonstopux*)
2339 case $host_os in
2340 irix5* | nonstopux*)
2341 # this will be overridden with pass_all, but let us keep it just in case
2342 lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
2343 ;;
2344 *)
2345 case $LD in
2346 *-32|*"-32 ") libmagic=32-bit;;
2347 *-n32|*"-n32 ") libmagic=N32;;
2348 *-64|*"-64 ") libmagic=64-bit;;
2349 *) libmagic=never-match;;
2350 esac
2351 # this will be overridden with pass_all, but let us keep it just in case
2352 lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1"
2353 ;;
2354 esac
2355 lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
2356 lt_cv_deplibs_check_method=pass_all
2357 ;;
2358
2359 # This must be Linux ELF.
2360 linux*)
2361 case $host_cpu in
2362 alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh*)
2363 lt_cv_deplibs_check_method=pass_all ;;
2364 *)
2365 # glibc up to 2.1.1 does not perform some relocations on ARM
2366 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;;
2367 esac
2368 lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
2369 ;;
2370
2371 netbsd*)
2372 if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2373 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2374 else
2375 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2376 fi
2377 ;;
2378
2379 newos6*)
2380 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2381 lt_cv_file_magic_cmd=/usr/bin/file
2382 lt_cv_file_magic_test_file=/usr/lib/libnls.so
2383 ;;
2384
2385 nto-qnx)
2386 lt_cv_deplibs_check_method=unknown
2387 ;;
2388
2389 openbsd*)
2390 lt_cv_file_magic_cmd=/usr/bin/file
2391 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2392 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2393 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object'
2394 else
2395 lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
2396 fi
2397 ;;
2398
2399 osf3* | osf4* | osf5*)
2400 # this will be overridden with pass_all, but let us keep it just in case
2401 lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
2402 lt_cv_file_magic_test_file=/shlib/libc.so
2403 lt_cv_deplibs_check_method=pass_all
2404 ;;
2405
2406 sco3.2v5*)
2407 lt_cv_deplibs_check_method=pass_all
2408 ;;
2409
2410 solaris*)
2411 lt_cv_deplibs_check_method=pass_all
2412 lt_cv_file_magic_test_file=/lib/libc.so
2413 ;;
2414
2415 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
2416 case $host_vendor in
2417 motorola)
2418 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]]'
2419 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2420 ;;
2421 ncr)
2422 lt_cv_deplibs_check_method=pass_all
2423 ;;
2424 sequent)
2425 lt_cv_file_magic_cmd='/bin/file'
2426 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2427 ;;
2428 sni)
2429 lt_cv_file_magic_cmd='/bin/file'
2430 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2431 lt_cv_file_magic_test_file=/lib/libc.so
2432 ;;
2433 siemens)
2434 lt_cv_deplibs_check_method=pass_all
2435 ;;
2436 esac
2437 ;;
2438
2439 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*)
2440 lt_cv_deplibs_check_method=pass_all
2441 ;;
2442 esac
499 ]) 2443 ])
500 2444 file_magic_cmd=$lt_cv_file_magic_cmd
501 AC_DEFUN(AC_PROG_LD_GNU, 2445 deplibs_check_method=$lt_cv_deplibs_check_method
502 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], ac_cv_prog_gnu_ld, 2446 test -z "$deplibs_check_method" && deplibs_check_method=unknown
503 [# I'd rather use --version here, but apparently some GNU ld's only accept -v. 2447 ])# AC_DEPLIBS_CHECK_METHOD
504 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then 2448
505 ac_cv_prog_gnu_ld=yes 2449
506 else 2450 # AC_PROG_NM
507 ac_cv_prog_gnu_ld=no 2451 # ----------
508 fi]) 2452 # find the path to a BSD-compatible name lister
509 ]) 2453 AC_DEFUN([AC_PROG_NM],
510 2454 [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
511 # AC_PROG_NM - find the path to a BSD-compatible name lister
512 AC_DEFUN(AC_PROG_NM,
513 [AC_MSG_CHECKING([for BSD-compatible nm])
514 AC_CACHE_VAL(ac_cv_path_NM,
515 [if test -n "$NM"; then 2455 [if test -n "$NM"; then
516 # Let the user override the test. 2456 # Let the user override the test.
517 ac_cv_path_NM="$NM" 2457 lt_cv_path_NM="$NM"
518 else 2458 else
519 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" 2459 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
520 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do 2460 for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
2461 IFS="$lt_save_ifs"
521 test -z "$ac_dir" && ac_dir=. 2462 test -z "$ac_dir" && ac_dir=.
522 if test -f $ac_dir/nm || test -f $ac_dir/nm$ac_exeext ; then 2463 tmp_nm="$ac_dir/${ac_tool_prefix}nm"
2464 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
523 # Check to see if the nm accepts a BSD-compat flag. 2465 # Check to see if the nm accepts a BSD-compat flag.
524 # Adding the `sed 1q' prevents false positives on HP-UX, which says: 2466 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
525 # nm: unknown option "B" ignored 2467 # nm: unknown option "B" ignored
526 if ($ac_dir/nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then 2468 # Tru64's nm complains that /dev/null is an invalid object file
527 ac_cv_path_NM="$ac_dir/nm -B" 2469 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2470 */dev/null* | *'Invalid file or object type'*)
2471 lt_cv_path_NM="$tmp_nm -B"
528 break 2472 break
529 elif ($ac_dir/nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then 2473 ;;
530 ac_cv_path_NM="$ac_dir/nm -p" 2474 *)
531 break 2475 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
532 else 2476 */dev/null*)
533 ac_cv_path_NM=${ac_cv_path_NM="$ac_dir/nm"} # keep the first match, but 2477 lt_cv_path_NM="$tmp_nm -p"
534 continue # so that we can try to find one that supports BSD flags 2478 break
535 fi 2479 ;;
2480 *)
2481 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2482 continue # so that we can try to find one that supports BSD flags
2483 ;;
2484 esac
2485 esac
536 fi 2486 fi
537 done 2487 done
538 IFS="$ac_save_ifs" 2488 IFS="$lt_save_ifs"
539 test -z "$ac_cv_path_NM" && ac_cv_path_NM=nm 2489 test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
540 fi]) 2490 fi])
541 NM="$ac_cv_path_NM" 2491 NM="$lt_cv_path_NM"
542 AC_MSG_RESULT([$NM]) 2492 ])# AC_PROG_NM
543 ]) 2493
544 2494
545 # AC_CHECK_LIBM - check for math library 2495 # AC_CHECK_LIBM
546 AC_DEFUN(AC_CHECK_LIBM, 2496 # -------------
2497 # check for math library
2498 AC_DEFUN([AC_CHECK_LIBM],
547 [AC_REQUIRE([AC_CANONICAL_HOST])dnl 2499 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
548 LIBM= 2500 LIBM=
549 case "$lt_target" in 2501 case $host in
550 *-*-beos* | *-*-cygwin*) 2502 *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
551 # These system don't have libm 2503 # These system don't have libm, or don't need it
552 ;; 2504 ;;
553 *-ncr-sysv4.3*) 2505 *-ncr-sysv4.3*)
554 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 2506 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
555 AC_CHECK_LIB(m, main, LIBM="$LIBM -lm") 2507 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
556 ;; 2508 ;;
557 *) 2509 *)
558 AC_CHECK_LIB(m, main, LIBM="-lm") 2510 AC_CHECK_LIB(m, cos, LIBM="-lm")
559 ;; 2511 ;;
560 esac 2512 esac
561 ]) 2513 ])# AC_CHECK_LIBM
562 2514
563 # AC_LIBLTDL_CONVENIENCE[(dir)] - sets LIBLTDL to the link flags for 2515
564 # the libltdl convenience library and INCLTDL to the include flags for 2516 # AC_LIBLTDL_CONVENIENCE([DIRECTORY])
565 # the libltdl header and adds --enable-ltdl-convenience to the 2517 # -----------------------------------
566 # configure arguments. Note that LIBLTDL and INCLTDL are not 2518 # sets LIBLTDL to the link flags for the libltdl convenience library and
567 # AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If DIR is not 2519 # LTDLINCL to the include flags for the libltdl header and adds
568 # provided, it is assumed to be `libltdl'. LIBLTDL will be prefixed 2520 # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL
569 # with '${top_builddir}/' and INCLTDL will be prefixed with 2521 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
2522 # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will
2523 # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with
570 # '${top_srcdir}/' (note the single quotes!). If your package is not 2524 # '${top_srcdir}/' (note the single quotes!). If your package is not
571 # flat and you're not using automake, define top_builddir and 2525 # flat and you're not using automake, define top_builddir and
572 # top_srcdir appropriately in the Makefiles. 2526 # top_srcdir appropriately in the Makefiles.
573 AC_DEFUN(AC_LIBLTDL_CONVENIENCE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2527 AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
574 case "$enable_ltdl_convenience" in 2528 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2529 case $enable_ltdl_convenience in
575 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; 2530 no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
576 "") enable_ltdl_convenience=yes 2531 "") enable_ltdl_convenience=yes
577 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; 2532 ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
578 esac 2533 esac
579 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la 2534 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
580 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2535 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
581 ]) 2536 # For backwards non-gettext consistent compatibility...
582 2537 INCLTDL="$LTDLINCL"
583 # AC_LIBLTDL_INSTALLABLE[(dir)] - sets LIBLTDL to the link flags for 2538 ])# AC_LIBLTDL_CONVENIENCE
584 # the libltdl installable library and INCLTDL to the include flags for 2539
585 # the libltdl header and adds --enable-ltdl-install to the configure 2540
586 # arguments. Note that LIBLTDL and INCLTDL are not AC_SUBSTed, nor is 2541 # AC_LIBLTDL_INSTALLABLE([DIRECTORY])
587 # AC_CONFIG_SUBDIRS called. If DIR is not provided and an installed 2542 # -----------------------------------
588 # libltdl is not found, it is assumed to be `libltdl'. LIBLTDL will 2543 # sets LIBLTDL to the link flags for the libltdl installable library and
589 # be prefixed with '${top_builddir}/' and INCLTDL will be prefixed 2544 # LTDLINCL to the include flags for the libltdl header and adds
590 # with '${top_srcdir}/' (note the single quotes!). If your package is 2545 # --enable-ltdl-install to the configure arguments. Note that LIBLTDL
591 # not flat and you're not using automake, define top_builddir and 2546 # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If
592 # top_srcdir appropriately in the Makefiles. 2547 # DIRECTORY is not provided and an installed libltdl is not found, it is
2548 # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/'
2549 # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
2550 # quotes!). If your package is not flat and you're not using automake,
2551 # define top_builddir and top_srcdir appropriately in the Makefiles.
593 # In the future, this macro may have to be called after AC_PROG_LIBTOOL. 2552 # In the future, this macro may have to be called after AC_PROG_LIBTOOL.
594 AC_DEFUN(AC_LIBLTDL_INSTALLABLE, [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl 2553 AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
595 AC_CHECK_LIB(ltdl, main, 2554 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2555 AC_CHECK_LIB(ltdl, lt_dlinit,
596 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], 2556 [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
597 [if test x"$enable_ltdl_install" = xno; then 2557 [if test x"$enable_ltdl_install" = xno; then
598 AC_MSG_WARN([libltdl not installed, but installation disabled]) 2558 AC_MSG_WARN([libltdl not installed, but installation disabled])
599 else 2559 else
600 enable_ltdl_install=yes 2560 enable_ltdl_install=yes
601 fi 2561 fi
602 ]) 2562 ])
603 if test x"$enable_ltdl_install" = x"yes"; then 2563 if test x"$enable_ltdl_install" = x"yes"; then
604 ac_configure_args="$ac_configure_args --enable-ltdl-install" 2564 ac_configure_args="$ac_configure_args --enable-ltdl-install"
605 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la 2565 LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
606 INCLTDL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) 2566 LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
607 else 2567 else
608 ac_configure_args="$ac_configure_args --enable-ltdl-install=no" 2568 ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
609 LIBLTDL="-lltdl" 2569 LIBLTDL="-lltdl"
610 INCLTDL= 2570 LTDLINCL=
2571 fi
2572 # For backwards non-gettext consistent compatibility...
2573 INCLTDL="$LTDLINCL"
2574 ])# AC_LIBLTDL_INSTALLABLE
2575
2576
2577 # AC_LIBTOOL_CXX
2578 # --------------
2579 # enable support for C++ libraries
2580 AC_DEFUN([AC_LIBTOOL_CXX],
2581 [AC_REQUIRE([_LT_AC_LANG_CXX])
2582 ])# AC_LIBTOOL_CXX
2583
2584
2585 # _LT_AC_LANG_CXX
2586 # ---------------
2587 AC_DEFUN([_LT_AC_LANG_CXX],
2588 [AC_REQUIRE([AC_PROG_CXX])
2589 AC_REQUIRE([AC_PROG_CXXCPP])
2590 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`])
2591 ])# _LT_AC_LANG_CXX
2592
2593
2594 # AC_LIBTOOL_F77
2595 # --------------
2596 # enable support for Fortran 77 libraries
2597 AC_DEFUN([AC_LIBTOOL_F77],
2598 [AC_REQUIRE([_LT_AC_LANG_F77])
2599 ])# AC_LIBTOOL_F77
2600
2601
2602 # _LT_AC_LANG_F77
2603 # ---------------
2604 AC_DEFUN([_LT_AC_LANG_F77],
2605 [AC_REQUIRE([AC_PROG_F77])
2606 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`])
2607 ])# _LT_AC_LANG_F77
2608
2609
2610 # AC_LIBTOOL_GCJ
2611 # --------------
2612 # enable support for GCJ libraries
2613 AC_DEFUN([AC_LIBTOOL_GCJ],
2614 [AC_REQUIRE([_LT_AC_LANG_GCJ])
2615 ])# AC_LIBTOOL_GCJ
2616
2617
2618 # _LT_AC_LANG_GCJ
2619 # ---------------
2620 AC_DEFUN([_LT_AC_LANG_GCJ],
2621 [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2622 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2623 [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2624 [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2625 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2626 [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2627 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`])
2628 ])# _LT_AC_LANG_GCJ
2629
2630
2631 # AC_LIBTOOL_RC
2632 # --------------
2633 # enable support for Windows resource files
2634 AC_DEFUN([AC_LIBTOOL_RC],
2635 [AC_REQUIRE([LT_AC_PROG_RC])
2636 _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`])
2637 ])# AC_LIBTOOL_RC
2638
2639
2640 # AC_LIBTOOL_LANG_C_CONFIG
2641 # ------------------------
2642 # Ensure that the configuration vars for the C compiler are
2643 # suitably defined. Those variables are subsequently used by
2644 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2645 AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2646 AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2647 [lt_save_CC="$CC"
2648 AC_LANG_PUSH(C)
2649
2650 # Source file extension for C test sources.
2651 ac_ext=c
2652
2653 # Object file extension for compiled C test sources.
2654 objext=o
2655 _LT_AC_TAGVAR(objext, $1)=$objext
2656
2657 # Code to be used in simple compile tests
2658 lt_simple_compile_test_code="int some_variable = 0;\n"
2659
2660 # Code to be used in simple link tests
2661 lt_simple_link_test_code='int main(){return(0);}\n'
2662
2663 _LT_AC_SYS_COMPILER
2664
2665 #
2666 # Check for any special shared library compilation flags.
2667 #
2668 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)=
2669 if test "$GCC" = no; then
2670 case $host_os in
2671 sco3.2v5*)
2672 _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf'
2673 ;;
2674 esac
2675 fi
2676 if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then
2677 AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries])
2678 if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then :
2679 else
2680 AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure])
2681 _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no
2682 fi
2683 fi
2684
2685
2686 #
2687 # Check to make sure the static flag actually works.
2688 #
2689 AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works],
2690 _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
2691 $_LT_AC_TAGVAR(lt_prog_compiler_static, $1),
2692 [],
2693 [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
2694
2695
2696 ## CAVEAT EMPTOR:
2697 ## There is no encapsulation within the following macros, do not change
2698 ## the running order or otherwise move them around unless you know exactly
2699 ## what you are doing...
2700 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2701 AC_LIBTOOL_PROG_COMPILER_PIC($1)
2702 AC_LIBTOOL_PROG_CC_C_O($1)
2703 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2704 AC_LIBTOOL_PROG_LD_SHLIBS($1)
2705 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2706 AC_LIBTOOL_SYS_LIB_STRIP
2707 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2708 AC_LIBTOOL_DLOPEN_SELF($1)
2709
2710 # Report which librarie types wil actually be built
2711 AC_MSG_CHECKING([if libtool supports shared libraries])
2712 AC_MSG_RESULT([$can_build_shared])
2713
2714 AC_MSG_CHECKING([whether to build shared libraries])
2715 test "$can_build_shared" = "no" && enable_shared=no
2716
2717 # On AIX, shared libraries and static libraries use the same namespace, and
2718 # are all built from PIC.
2719 case "$host_os" in
2720 aix3*)
2721 test "$enable_shared" = yes && enable_static=no
2722 if test -n "$RANLIB"; then
2723 archive_cmds="$archive_cmds~\$RANLIB \$lib"
2724 postinstall_cmds='$RANLIB $lib'
2725 fi
2726 ;;
2727
2728 aix4*)
2729 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2730 test "$enable_shared" = yes && enable_static=no
2731 fi
2732 ;;
2733 darwin* | rhapsody*)
2734 if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
2735 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2736 case "$host_os" in
2737 rhapsody* | darwin1.[[012]])
2738 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
2739 ;;
2740 *) # Darwin 1.3 on
2741 test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
2742 ;;
2743 esac
2744 # FIXME: Relying on posixy $() will cause problems for
2745 # cross-compilation, but unfortunately the echo tests do not
2746 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
2747 # `"' quotes if we put them in here... so don't!
2748 output_verbose_link_cmd='echo'
2749 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring'
2750 _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
2751 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
2752 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2753 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
2754 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2755 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
2756 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2757 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
2758 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2759 fi
2760 ;;
2761 esac
2762 AC_MSG_RESULT([$enable_shared])
2763
2764 AC_MSG_CHECKING([whether to build static libraries])
2765 # Make sure either enable_shared or enable_static is yes.
2766 test "$enable_shared" = yes || enable_static=yes
2767 AC_MSG_RESULT([$enable_static])
2768
2769 AC_LIBTOOL_CONFIG($1)
2770
2771 AC_LANG_POP
2772 CC="$lt_save_CC"
2773 ])# AC_LIBTOOL_LANG_C_CONFIG
2774
2775
2776 # AC_LIBTOOL_LANG_CXX_CONFIG
2777 # --------------------------
2778 # Ensure that the configuration vars for the C compiler are
2779 # suitably defined. Those variables are subsequently used by
2780 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2781 AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2782 AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2783 [AC_LANG_PUSH(C++)
2784 AC_REQUIRE([AC_PROG_CXX])
2785 AC_REQUIRE([AC_PROG_CXXCPP])
2786
2787 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2788 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
2789 _LT_AC_TAGVAR(always_export_symbols, $1)=no
2790 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2791 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2792 _LT_AC_TAGVAR(hardcode_direct, $1)=no
2793 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2794 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2795 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2796 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2797 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
2798 _LT_AC_TAGVAR(module_cmds, $1)=
2799 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
2800 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2801 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2802 _LT_AC_TAGVAR(no_undefined_flag, $1)=
2803 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2804 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2805
2806 # Dependencies to place before and after the object being linked:
2807 _LT_AC_TAGVAR(predep_objects, $1)=
2808 _LT_AC_TAGVAR(postdep_objects, $1)=
2809 _LT_AC_TAGVAR(predeps, $1)=
2810 _LT_AC_TAGVAR(postdeps, $1)=
2811 _LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2812
2813 # Source file extension for C++ test sources.
2814 ac_ext=cc
2815
2816 # Object file extension for compiled C++ test sources.
2817 objext=o
2818 _LT_AC_TAGVAR(objext, $1)=$objext
2819
2820 # Code to be used in simple compile tests
2821 lt_simple_compile_test_code="int some_variable = 0;\n"
2822
2823 # Code to be used in simple link tests
2824 lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n'
2825
2826 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
2827 _LT_AC_SYS_COMPILER
2828
2829 # Allow CC to be a program name with arguments.
2830 lt_save_CC=$CC
2831 lt_save_LD=$LD
2832 lt_save_GCC=$GCC
2833 GCC=$GXX
2834 lt_save_with_gnu_ld=$with_gnu_ld
2835 lt_save_path_LD=$lt_cv_path_LD
2836 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2837 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2838 else
2839 unset lt_cv_prog_gnu_ld
2840 fi
2841 if test -n "${lt_cv_path_LDCXX+set}"; then
2842 lt_cv_path_LD=$lt_cv_path_LDCXX
2843 else
2844 unset lt_cv_path_LD
2845 fi
2846 test -z "${LDCXX+set}" || LD=$LDCXX
2847 CC=${CXX-"c++"}
2848 compiler=$CC
2849 _LT_AC_TAGVAR(compiler, $1)=$CC
2850 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
2851
2852 # We don't want -fno-exception wen compiling C++ code, so set the
2853 # no_builtin_flag separately
2854 if test "$GXX" = yes; then
2855 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2856 else
2857 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2858 fi
2859
2860 if test "$GXX" = yes; then
2861 # Set up default GNU C++ configuration
2862
2863 AC_PROG_LD
2864
2865 # Check if GNU C++ uses GNU ld as the underlying linker, since the
2866 # archiving commands below assume that GNU ld is being used.
2867 if test "$with_gnu_ld" = yes; then
2868 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2869 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
2870
2871 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2872 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2873
2874 # If archive_cmds runs LD, not CC, wlarc should be empty
2875 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2876 # investigate it a little bit more. (MM)
2877 wlarc='${wl}'
2878
2879 # ancient GNU ld didn't support --whole-archive et. al.
2880 if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2881 grep 'no-whole-archive' > /dev/null; then
2882 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2883 else
2884 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2885 fi
2886 else
2887 with_gnu_ld=no
2888 wlarc=
2889
2890 # A generic and very simple default shared library creation
2891 # command for GNU C++ for the case where it uses the native
2892 # linker, instead of GNU ld. If possible, this setting should
2893 # overridden to take advantage of the native linker features on
2894 # the platform it is being used on.
2895 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2896 fi
2897
2898 # Commands to make compiler produce verbose output that lists
2899 # what "hidden" libraries, object files and flags are used when
2900 # linking a shared library.
2901 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2902
2903 else
2904 GXX=no
2905 with_gnu_ld=no
2906 wlarc=
2907 fi
2908
2909 # PORTME: fill in a description of your system's C++ link characteristics
2910 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2911 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
2912 case $host_os in
2913 aix3*)
2914 # FIXME: insert proper C++ library support
2915 _LT_AC_TAGVAR(ld_shlibs, $1)=no
2916 ;;
2917 aix4* | aix5*)
2918 if test "$host_cpu" = ia64; then
2919 # On IA64, the linker does run time linking by default, so we don't
2920 # have to do anything special.
2921 aix_use_runtimelinking=no
2922 exp_sym_flag='-Bexport'
2923 no_entry_flag=""
2924 else
2925 aix_use_runtimelinking=no
2926
2927 # Test if we are trying to use run time linking or normal
2928 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2929 # need to do runtime linking.
2930 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2931 for ld_flag in $LDFLAGS; do
2932 case $ld_flag in
2933 *-brtl*)
2934 aix_use_runtimelinking=yes
2935 break
2936 ;;
2937 esac
2938 done
2939 esac
2940
2941 exp_sym_flag='-bexport'
2942 no_entry_flag='-bnoentry'
2943 fi
2944
2945 # When large executables or shared objects are built, AIX ld can
2946 # have problems creating the table of contents. If linking a library
2947 # or program results in "error TOC overflow" add -mminimal-toc to
2948 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
2949 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2950
2951 _LT_AC_TAGVAR(archive_cmds, $1)=''
2952 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2953 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2954 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2955
2956 if test "$GXX" = yes; then
2957 case $host_os in aix4.[012]|aix4.[012].*)
2958 # We only want to do this on AIX 4.2 and lower, the check
2959 # below for broken collect2 doesn't work under 4.3+
2960 collect2name=`${CC} -print-prog-name=collect2`
2961 if test -f "$collect2name" && \
2962 strings "$collect2name" | grep resolve_lib_name >/dev/null
2963 then
2964 # We have reworked collect2
2965 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2966 else
2967 # We have old collect2
2968 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2969 # It fails to find uninstalled libraries when the uninstalled
2970 # path is not listed in the libpath. Setting hardcode_minus_L
2971 # to unsupported forces relinking
2972 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2973 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2974 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2975 fi
2976 esac
2977 shared_flag='-shared'
2978 else
2979 # not using gcc
2980 if test "$host_cpu" = ia64; then
2981 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2982 # chokes on -Wl,-G. The following line is correct:
2983 shared_flag='-G'
2984 else
2985 if test "$aix_use_runtimelinking" = yes; then
2986 shared_flag='${wl}-G'
2987 else
2988 shared_flag='${wl}-bM:SRE'
2989 fi
2990 fi
2991 fi
2992
2993 # It seems that -bexpall does not export symbols beginning with
2994 # underscore (_), so it is better to generate a list of symbols to export.
2995 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2996 if test "$aix_use_runtimelinking" = yes; then
2997 # Warning - without using the other runtime loading flags (-brtl),
2998 # -berok will link without error, but may produce a broken library.
2999 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3000 # Determine the default libpath from the value encoded in an empty executable.
3001 _LT_AC_SYS_LIBPATH_AIX
3002 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3003
3004 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
3005 else
3006 if test "$host_cpu" = ia64; then
3007 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3008 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3009 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
3010 else
3011 # Determine the default libpath from the value encoded in an empty executable.
3012 _LT_AC_SYS_LIBPATH_AIX
3013 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3014 # Warning - without using the other run time loading flags,
3015 # -berok will link without error, but may produce a broken library.
3016 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3017 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3018 # -bexpall does not export symbols beginning with underscore (_)
3019 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3020 # Exported symbols can be pulled into shared objects from archives
3021 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
3022 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3023 # This is similar to how AIX traditionally builds it's shared libraries.
3024 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
3025 fi
3026 fi
3027 ;;
3028 chorus*)
3029 case $cc_basename in
3030 *)
3031 # FIXME: insert proper C++ library support
3032 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3033 ;;
3034 esac
3035 ;;
3036
3037 cygwin* | mingw* | pw32*)
3038 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3039 # as there is no search path for DLLs.
3040 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3041 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3042 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3043 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3044
3045 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3046 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3047 # If the export-symbols file already is a .def file (1st line
3048 # is EXPORTS), use it as is; otherwise, prepend...
3049 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3050 cp $export_symbols $output_objdir/$soname.def;
3051 else
3052 echo EXPORTS > $output_objdir/$soname.def;
3053 cat $export_symbols >> $output_objdir/$soname.def;
3054 fi~
3055 $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
3056 else
3057 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3058 fi
3059 ;;
3060
3061 darwin* | rhapsody*)
3062 if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
3063 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3064 case "$host_os" in
3065 rhapsody* | darwin1.[[012]])
3066 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
3067 ;;
3068 *) # Darwin 1.3 on
3069 test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
3070 ;;
3071 esac
3072 lt_int_apple_cc_single_mod=no
3073 output_verbose_link_cmd='echo'
3074 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
3075 lt_int_apple_cc_single_mod=yes
3076 fi
3077 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3078 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3079 else
3080 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3081 fi
3082 _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
3083
3084 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
3085 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3086 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3087 else
3088 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3089 fi
3090 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3091 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3092 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3093 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3094 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
3095 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3096 fi
3097 ;;
3098
3099 dgux*)
3100 case $cc_basename in
3101 ec++)
3102 # FIXME: insert proper C++ library support
3103 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3104 ;;
3105 ghcx)
3106 # Green Hills C++ Compiler
3107 # FIXME: insert proper C++ library support
3108 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3109 ;;
3110 *)
3111 # FIXME: insert proper C++ library support
3112 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3113 ;;
3114 esac
3115 ;;
3116 freebsd[12]*)
3117 # C++ shared libraries reported to be fairly broken before switch to ELF
3118 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3119 ;;
3120 freebsd-elf*)
3121 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3122 ;;
3123 freebsd*)
3124 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3125 # conventions
3126 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3127 ;;
3128 gnu*)
3129 ;;
3130 hpux9*)
3131 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3132 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3133 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3134 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3135 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3136 # but as the default
3137 # location of the library.
3138
3139 case $cc_basename in
3140 CC)
3141 # FIXME: insert proper C++ library support
3142 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3143 ;;
3144 aCC)
3145 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3146 # Commands to make compiler produce verbose output that lists
3147 # what "hidden" libraries, object files and flags are used when
3148 # linking a shared library.
3149 #
3150 # There doesn't appear to be a way to prevent this compiler from
3151 # explicitly linking system object files so we need to strip them
3152 # from the output so that they don't get included in the library
3153 # dependencies.
3154 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3155 ;;
3156 *)
3157 if test "$GXX" = yes; then
3158 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
3159 else
3160 # FIXME: insert proper C++ library support
3161 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3162 fi
3163 ;;
3164 esac
3165 ;;
3166 hpux10*|hpux11*)
3167 if test $with_gnu_ld = no; then
3168 case "$host_cpu" in
3169 hppa*64*)
3170 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3171 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3172 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3173 ;;
3174 ia64*)
3175 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3176 ;;
3177 *)
3178 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3179 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3180 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3181 ;;
3182 esac
3183 fi
3184 case "$host_cpu" in
3185 hppa*64*)
3186 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3187 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3188 ;;
3189 ia64*)
3190 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3191 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3192 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3193 # but as the default
3194 # location of the library.
3195 ;;
3196 *)
3197 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3198 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3199 # but as the default
3200 # location of the library.
3201 ;;
3202 esac
3203
3204 case $cc_basename in
3205 CC)
3206 # FIXME: insert proper C++ library support
3207 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3208 ;;
3209 aCC)
3210 case "$host_cpu" in
3211 hppa*64*|ia64*)
3212 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3213 ;;
3214 *)
3215 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3216 ;;
3217 esac
3218 # Commands to make compiler produce verbose output that lists
3219 # what "hidden" libraries, object files and flags are used when
3220 # linking a shared library.
3221 #
3222 # There doesn't appear to be a way to prevent this compiler from
3223 # explicitly linking system object files so we need to strip them
3224 # from the output so that they don't get included in the library
3225 # dependencies.
3226 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3227 ;;
3228 *)
3229 if test "$GXX" = yes; then
3230 if test $with_gnu_ld = no; then
3231 case "$host_cpu" in
3232 ia64*|hppa*64*)
3233 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs'
3234 ;;
3235 *)
3236 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3237 ;;
3238 esac
3239 fi
3240 else
3241 # FIXME: insert proper C++ library support
3242 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3243 fi
3244 ;;
3245 esac
3246 ;;
3247 irix5* | irix6*)
3248 case $cc_basename in
3249 CC)
3250 # SGI C++
3251 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3252
3253 # Archives containing C++ object files must be created using
3254 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
3255 # necessary to make sure instantiated templates are included
3256 # in the archive.
3257 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3258 ;;
3259 *)
3260 if test "$GXX" = yes; then
3261 if test "$with_gnu_ld" = no; then
3262 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3263 else
3264 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
3265 fi
3266 fi
3267 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3268 ;;
3269 esac
3270 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3271 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3272 ;;
3273 linux*)
3274 case $cc_basename in
3275 KCC)
3276 # Kuck and Associates, Inc. (KAI) C++ Compiler
3277
3278 # KCC will only create a shared library if the output file
3279 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3280 # to its proper name (with version) after linking.
3281 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3282 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
3283 # Commands to make compiler produce verbose output that lists
3284 # what "hidden" libraries, object files and flags are used when
3285 # linking a shared library.
3286 #
3287 # There doesn't appear to be a way to prevent this compiler from
3288 # explicitly linking system object files so we need to strip them
3289 # from the output so that they don't get included in the library
3290 # dependencies.
3291 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3292
3293 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3294 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3295
3296 # Archives containing C++ object files must be created using
3297 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3298 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3299 ;;
3300 icpc)
3301 # Intel C++
3302 with_gnu_ld=yes
3303 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3304 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3305 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
3306 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3307 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3308 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3309 ;;
3310 cxx)
3311 # Compaq C++
3312 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3313 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
3314
3315 runpath_var=LD_RUN_PATH
3316 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3317 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3318
3319 # Commands to make compiler produce verbose output that lists
3320 # what "hidden" libraries, object files and flags are used when
3321 # linking a shared library.
3322 #
3323 # There doesn't appear to be a way to prevent this compiler from
3324 # explicitly linking system object files so we need to strip them
3325 # from the output so that they don't get included in the library
3326 # dependencies.
3327 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3328 ;;
3329 esac
3330 ;;
3331 lynxos*)
3332 # FIXME: insert proper C++ library support
3333 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3334 ;;
3335 m88k*)
3336 # FIXME: insert proper C++ library support
3337 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3338 ;;
3339 mvs*)
3340 case $cc_basename in
3341 cxx)
3342 # FIXME: insert proper C++ library support
3343 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3344 ;;
3345 *)
3346 # FIXME: insert proper C++ library support
3347 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3348 ;;
3349 esac
3350 ;;
3351 netbsd*)
3352 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3353 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3354 wlarc=
3355 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3356 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3357 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3358 fi
3359 # Workaround some broken pre-1.5 toolchains
3360 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3361 ;;
3362 osf3*)
3363 case $cc_basename in
3364 KCC)
3365 # Kuck and Associates, Inc. (KAI) C++ Compiler
3366
3367 # KCC will only create a shared library if the output file
3368 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3369 # to its proper name (with version) after linking.
3370 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3371
3372 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3373 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3374
3375 # Archives containing C++ object files must be created using
3376 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
3377 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3378
3379 ;;
3380 RCC)
3381 # Rational C++ 2.4.1
3382 # FIXME: insert proper C++ library support
3383 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3384 ;;
3385 cxx)
3386 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3387 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3388
3389 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3390 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3391
3392 # Commands to make compiler produce verbose output that lists
3393 # what "hidden" libraries, object files and flags are used when
3394 # linking a shared library.
3395 #
3396 # There doesn't appear to be a way to prevent this compiler from
3397 # explicitly linking system object files so we need to strip them
3398 # from the output so that they don't get included in the library
3399 # dependencies.
3400 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3401 ;;
3402 *)
3403 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3404 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3405 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3406
3407 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3408 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3409
3410 # Commands to make compiler produce verbose output that lists
3411 # what "hidden" libraries, object files and flags are used when
3412 # linking a shared library.
3413 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3414
3415 else
3416 # FIXME: insert proper C++ library support
3417 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3418 fi
3419 ;;
3420 esac
3421 ;;
3422 osf4* | osf5*)
3423 case $cc_basename in
3424 KCC)
3425 # Kuck and Associates, Inc. (KAI) C++ Compiler
3426
3427 # KCC will only create a shared library if the output file
3428 # ends with ".so" (or ".sl" for HP-UX), so rename the library
3429 # to its proper name (with version) after linking.
3430 _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
3431
3432 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3433 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3434
3435 # Archives containing C++ object files must be created using
3436 # the KAI C++ compiler.
3437 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3438 ;;
3439 RCC)
3440 # Rational C++ 2.4.1
3441 # FIXME: insert proper C++ library support
3442 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3443 ;;
3444 cxx)
3445 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3446 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib'
3447 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3448 echo "-hidden">> $lib.exp~
3449 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~
3450 $rm $lib.exp'
3451
3452 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3453 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3454
3455 # Commands to make compiler produce verbose output that lists
3456 # what "hidden" libraries, object files and flags are used when
3457 # linking a shared library.
3458 #
3459 # There doesn't appear to be a way to prevent this compiler from
3460 # explicitly linking system object files so we need to strip them
3461 # from the output so that they don't get included in the library
3462 # dependencies.
3463 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3464 ;;
3465 *)
3466 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3467 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3468 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib'
3469
3470 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3471 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3472
3473 # Commands to make compiler produce verbose output that lists
3474 # what "hidden" libraries, object files and flags are used when
3475 # linking a shared library.
3476 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3477
3478 else
3479 # FIXME: insert proper C++ library support
3480 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3481 fi
3482 ;;
3483 esac
3484 ;;
3485 psos*)
3486 # FIXME: insert proper C++ library support
3487 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3488 ;;
3489 sco*)
3490 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3491 case $cc_basename in
3492 CC)
3493 # FIXME: insert proper C++ library support
3494 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3495 ;;
3496 *)
3497 # FIXME: insert proper C++ library support
3498 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3499 ;;
3500 esac
3501 ;;
3502 sunos4*)
3503 case $cc_basename in
3504 CC)
3505 # Sun C++ 4.x
3506 # FIXME: insert proper C++ library support
3507 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3508 ;;
3509 lcc)
3510 # Lucid
3511 # FIXME: insert proper C++ library support
3512 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3513 ;;
3514 *)
3515 # FIXME: insert proper C++ library support
3516 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3517 ;;
3518 esac
3519 ;;
3520 solaris*)
3521 case $cc_basename in
3522 CC)
3523 # Sun C++ 4.2, 5.x and Centerline C++
3524 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3525 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3526 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3527 $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3528
3529 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3530 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3531 case $host_os in
3532 solaris2.[0-5] | solaris2.[0-5].*) ;;
3533 *)
3534 # The C++ compiler is used as linker so we must use $wl
3535 # flag to pass the commands to the underlying system
3536 # linker.
3537 # Supported since Solaris 2.6 (maybe 2.5.1?)
3538 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3539 ;;
3540 esac
3541 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3542
3543 # Commands to make compiler produce verbose output that lists
3544 # what "hidden" libraries, object files and flags are used when
3545 # linking a shared library.
3546 #
3547 # There doesn't appear to be a way to prevent this compiler from
3548 # explicitly linking system object files so we need to strip them
3549 # from the output so that they don't get included in the library
3550 # dependencies.
3551 output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list'
3552
3553 # Archives containing C++ object files must be created using
3554 # "CC -xar", where "CC" is the Sun C++ compiler. This is
3555 # necessary to make sure instantiated templates are included
3556 # in the archive.
3557 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3558 ;;
3559 gcx)
3560 # Green Hills C++ Compiler
3561 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3562
3563 # The C++ compiler must be used to create the archive.
3564 _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3565 ;;
3566 *)
3567 # GNU C++ compiler with Solaris linker
3568 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3569 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3570 if $CC --version | grep -v '^2\.7' > /dev/null; then
3571 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3572 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3573 $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3574
3575 # Commands to make compiler produce verbose output that lists
3576 # what "hidden" libraries, object files and flags are used when
3577 # linking a shared library.
3578 output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3579 else
3580 # g++ 2.7 appears to require `-G' NOT `-shared' on this
3581 # platform.
3582 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3583 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3584 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3585
3586 # Commands to make compiler produce verbose output that lists
3587 # what "hidden" libraries, object files and flags are used when
3588 # linking a shared library.
3589 output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3590 fi
3591
3592 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3593 fi
3594 ;;
3595 esac
3596 ;;
3597 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
3598 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3599 ;;
3600 tandem*)
3601 case $cc_basename in
3602 NCC)
3603 # NonStop-UX NCC 3.20
3604 # FIXME: insert proper C++ library support
3605 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3606 ;;
3607 *)
3608 # FIXME: insert proper C++ library support
3609 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3610 ;;
3611 esac
3612 ;;
3613 vxworks*)
3614 # FIXME: insert proper C++ library support
3615 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3616 ;;
3617 *)
3618 # FIXME: insert proper C++ library support
3619 _LT_AC_TAGVAR(ld_shlibs, $1)=no
3620 ;;
3621 esac
3622 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3623 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3624
3625 _LT_AC_TAGVAR(GCC, $1)="$GXX"
3626 _LT_AC_TAGVAR(LD, $1)="$LD"
3627
3628 ## CAVEAT EMPTOR:
3629 ## There is no encapsulation within the following macros, do not change
3630 ## the running order or otherwise move them around unless you know exactly
3631 ## what you are doing...
3632 AC_LIBTOOL_POSTDEP_PREDEP($1)
3633 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3634 AC_LIBTOOL_PROG_CC_C_O($1)
3635 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3636 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3637 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3638 AC_LIBTOOL_SYS_LIB_STRIP
3639 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3640 AC_LIBTOOL_DLOPEN_SELF($1)
3641
3642 AC_LIBTOOL_CONFIG($1)
3643
3644 AC_LANG_POP
3645 CC=$lt_save_CC
3646 LDCXX=$LD
3647 LD=$lt_save_LD
3648 GCC=$lt_save_GCC
3649 with_gnu_ldcxx=$with_gnu_ld
3650 with_gnu_ld=$lt_save_with_gnu_ld
3651 lt_cv_path_LDCXX=$lt_cv_path_LD
3652 lt_cv_path_LD=$lt_save_path_LD
3653 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3654 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3655 ])# AC_LIBTOOL_LANG_CXX_CONFIG
3656
3657 # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3658 # ------------------------
3659 # Figure out "hidden" library dependencies from verbose
3660 # compiler output when linking a shared library.
3661 # Parse the compiler output and extract the necessary
3662 # objects, libraries and library flags.
3663 AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3664 dnl we can't use the lt_simple_compile_test_code here,
3665 dnl because it contains code intended for an executable,
3666 dnl not a library. It's possible we should let each
3667 dnl tag define a new lt_????_link_test_code variable,
3668 dnl but it's only used here...
3669 ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3670 int a;
3671 void foo (void) { a = 0; }
3672 EOF
3673 ],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3674 class Foo
3675 {
3676 public:
3677 Foo (void) { a = 0; }
3678 private:
3679 int a;
3680 };
3681 EOF
3682 ],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3683 subroutine foo
3684 implicit none
3685 integer*4 a
3686 a=0
3687 return
3688 end
3689 EOF
3690 ],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3691 public class foo {
3692 private int a;
3693 public void bar (void) {
3694 a = 0;
3695 }
3696 };
3697 EOF
3698 ])
3699 dnl Parse the compiler output and extract the necessary
3700 dnl objects, libraries and library flags.
3701 if AC_TRY_EVAL(ac_compile); then
3702 # Parse the compiler output and extract the necessary
3703 # objects, libraries and library flags.
3704
3705 # Sentinel used to keep track of whether or not we are before
3706 # the conftest object file.
3707 pre_test_object_deps_done=no
3708
3709 # The `*' in the case matches for architectures that use `case' in
3710 # $output_verbose_cmd can trigger glob expansion during the loop
3711 # eval without this substitution.
3712 output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`"
3713
3714 for p in `eval $output_verbose_link_cmd`; do
3715 case $p in
3716
3717 -L* | -R* | -l*)
3718 # Some compilers place space between "-{L,R}" and the path.
3719 # Remove the space.
3720 if test $p = "-L" \
3721 || test $p = "-R"; then
3722 prev=$p
3723 continue
3724 else
3725 prev=
3726 fi
3727
3728 if test "$pre_test_object_deps_done" = no; then
3729 case $p in
3730 -L* | -R*)
3731 # Internal compiler library paths should come after those
3732 # provided the user. The postdeps already come after the
3733 # user supplied libs so there is no need to process them.
3734 if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3735 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3736 else
3737 _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3738 fi
3739 ;;
3740 # The "-l" case would never come before the object being
3741 # linked, so don't bother handling this case.
3742 esac
3743 else
3744 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3745 _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3746 else
3747 _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3748 fi
3749 fi
3750 ;;
3751
3752 *.$objext)
3753 # This assumes that the test object file only shows up
3754 # once in the compiler output.
3755 if test "$p" = "conftest.$objext"; then
3756 pre_test_object_deps_done=yes
3757 continue
3758 fi
3759
3760 if test "$pre_test_object_deps_done" = no; then
3761 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3762 _LT_AC_TAGVAR(predep_objects, $1)="$p"
3763 else
3764 _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3765 fi
3766 else
3767 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3768 _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3769 else
3770 _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3771 fi
3772 fi
3773 ;;
3774
3775 *) ;; # Ignore the rest.
3776
3777 esac
3778 done
3779
3780 # Clean up.
3781 rm -f a.out a.exe
3782 else
3783 echo "libtool.m4: error: problem compiling $1 test program"
3784 fi
3785
3786 $rm -f confest.$objext
3787
3788 case " $_LT_AC_TAGVAR(postdeps, $1) " in
3789 *" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3790 esac
3791 ])# AC_LIBTOOL_POSTDEP_PREDEP
3792
3793 # AC_LIBTOOL_LANG_F77_CONFIG
3794 # ------------------------
3795 # Ensure that the configuration vars for the C compiler are
3796 # suitably defined. Those variables are subsequently used by
3797 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3798 AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3799 AC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3800 [AC_REQUIRE([AC_PROG_F77])
3801 AC_LANG_PUSH(Fortran 77)
3802
3803 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3804 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
3805 _LT_AC_TAGVAR(always_export_symbols, $1)=no
3806 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3807 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3808 _LT_AC_TAGVAR(hardcode_direct, $1)=no
3809 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3810 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3811 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3812 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3813 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
3814 _LT_AC_TAGVAR(module_cmds, $1)=
3815 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
3816 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3817 _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3818 _LT_AC_TAGVAR(no_undefined_flag, $1)=
3819 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3820 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3821
3822 # Source file extension for f77 test sources.
3823 ac_ext=f
3824
3825 # Object file extension for compiled f77 test sources.
3826 objext=o
3827 _LT_AC_TAGVAR(objext, $1)=$objext
3828
3829 # Code to be used in simple compile tests
3830 lt_simple_compile_test_code=" subroutine t\n return\n end\n"
3831
3832 # Code to be used in simple link tests
3833 lt_simple_link_test_code=" program t\n end\n"
3834
3835 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3836 _LT_AC_SYS_COMPILER
3837
3838 # Allow CC to be a program name with arguments.
3839 lt_save_CC="$CC"
3840 CC=${F77-"f77"}
3841 compiler=$CC
3842 _LT_AC_TAGVAR(compiler, $1)=$CC
3843 cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'`
3844
3845 AC_MSG_CHECKING([if libtool supports shared libraries])
3846 AC_MSG_RESULT([$can_build_shared])
3847
3848 AC_MSG_CHECKING([whether to build shared libraries])
3849 test "$can_build_shared" = "no" && enable_shared=no
3850
3851 # On AIX, shared libraries and static libraries use the same namespace, and
3852 # are all built from PIC.
3853 case "$host_os" in
3854 aix3*)
3855 test "$enable_shared" = yes && enable_static=no
3856 if test -n "$RANLIB"; then
3857 archive_cmds="$archive_cmds~\$RANLIB \$lib"
3858 postinstall_cmds='$RANLIB $lib'
3859 fi
3860 ;;
3861 aix4*)
3862 test "$enable_shared" = yes && enable_static=no
3863 ;;
3864 esac
3865 AC_MSG_RESULT([$enable_shared])
3866
3867 AC_MSG_CHECKING([whether to build static libraries])
3868 # Make sure either enable_shared or enable_static is yes.
3869 test "$enable_shared" = yes || enable_static=yes
3870 AC_MSG_RESULT([$enable_static])
3871
3872 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3873
3874 _LT_AC_TAGVAR(GCC, $1)="$G77"
3875 _LT_AC_TAGVAR(LD, $1)="$LD"
3876
3877 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3878 AC_LIBTOOL_PROG_CC_C_O($1)
3879 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3880 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3881 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3882 AC_LIBTOOL_SYS_LIB_STRIP
3883 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3884
3885 AC_LIBTOOL_CONFIG($1)
3886
3887 AC_LANG_POP
3888 CC="$lt_save_CC"
3889 ])# AC_LIBTOOL_LANG_F77_CONFIG
3890
3891
3892 # AC_LIBTOOL_LANG_GCJ_CONFIG
3893 # --------------------------
3894 # Ensure that the configuration vars for the C compiler are
3895 # suitably defined. Those variables are subsequently used by
3896 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3897 AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3898 AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3899 [AC_LANG_SAVE
3900
3901 # Source file extension for Java test sources.
3902 ac_ext=java
3903
3904 # Object file extension for compiled Java test sources.
3905 objext=o
3906 _LT_AC_TAGVAR(objext, $1)=$objext
3907
3908 # Code to be used in simple compile tests
3909 lt_simple_compile_test_code="class foo {}\n"
3910
3911 # Code to be used in simple link tests
3912 lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n'
3913
3914 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3915 _LT_AC_SYS_COMPILER
3916
3917 # Allow CC to be a program name with arguments.
3918 lt_save_CC="$CC"
3919 CC=${GCJ-"gcj"}
3920 compiler=$CC
3921 _LT_AC_TAGVAR(compiler, $1)=$CC
3922
3923 # GCJ did not exist at the time GCC didn't implicitly link libc in.
3924 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3925
3926 ## CAVEAT EMPTOR:
3927 ## There is no encapsulation within the following macros, do not change
3928 ## the running order or otherwise move them around unless you know exactly
3929 ## what you are doing...
3930 AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
3931 AC_LIBTOOL_PROG_COMPILER_PIC($1)
3932 AC_LIBTOOL_PROG_CC_C_O($1)
3933 AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3934 AC_LIBTOOL_PROG_LD_SHLIBS($1)
3935 AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3936 AC_LIBTOOL_SYS_LIB_STRIP
3937 AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3938 AC_LIBTOOL_DLOPEN_SELF($1)
3939
3940 AC_LIBTOOL_CONFIG($1)
3941
3942 AC_LANG_RESTORE
3943 CC="$lt_save_CC"
3944 ])# AC_LIBTOOL_LANG_GCJ_CONFIG
3945
3946
3947 # AC_LIBTOOL_LANG_RC_CONFIG
3948 # --------------------------
3949 # Ensure that the configuration vars for the Windows resource compiler are
3950 # suitably defined. Those variables are subsequently used by
3951 # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3952 AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
3953 AC_DEFUN([_LT_AC_LANG_RC_CONFIG],
3954 [AC_LANG_SAVE
3955
3956 # Source file extension for RC test sources.
3957 ac_ext=rc
3958
3959 # Object file extension for compiled RC test sources.
3960 objext=o
3961 _LT_AC_TAGVAR(objext, $1)=$objext
3962
3963 # Code to be used in simple compile tests
3964 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
3965
3966 # Code to be used in simple link tests
3967 lt_simple_link_test_code="$lt_simple_compile_test_code"
3968
3969 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
3970 _LT_AC_SYS_COMPILER
3971
3972 # Allow CC to be a program name with arguments.
3973 lt_save_CC="$CC"
3974 CC=${RC-"windres"}
3975 compiler=$CC
3976 _LT_AC_TAGVAR(compiler, $1)=$CC
3977 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
3978
3979 AC_LIBTOOL_CONFIG($1)
3980
3981 AC_LANG_RESTORE
3982 CC="$lt_save_CC"
3983 ])# AC_LIBTOOL_LANG_RC_CONFIG
3984
3985
3986 # AC_LIBTOOL_CONFIG([TAGNAME])
3987 # ----------------------------
3988 # If TAGNAME is not passed, then create an initial libtool script
3989 # with a default configuration from the untagged config vars. Otherwise
3990 # add code to config.status for appending the configuration named by
3991 # TAGNAME from the matching tagged config vars.
3992 AC_DEFUN([AC_LIBTOOL_CONFIG],
3993 [# The else clause should only fire when bootstrapping the
3994 # libtool distribution, otherwise you forgot to ship ltmain.sh
3995 # with your package, and you will get complaints that there are
3996 # no rules to generate ltmain.sh.
3997 if test -f "$ltmain"; then
3998 # See if we are running on zsh, and set the options which allow our commands through
3999 # without removal of \ escapes.
4000 if test -n "${ZSH_VERSION+set}" ; then
4001 setopt NO_GLOB_SUBST
4002 fi
4003 # Now quote all the things that may contain metacharacters while being
4004 # careful not to overquote the AC_SUBSTed values. We take copies of the
4005 # variables and quote the copies for generation of the libtool script.
4006 for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM SED SHELL \
4007 libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4008 old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4009 deplibs_check_method reload_flag reload_cmds need_locks \
4010 lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4011 lt_cv_sys_global_symbol_to_c_name_address \
4012 sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4013 old_postinstall_cmds old_postuninstall_cmds \
4014 _LT_AC_TAGVAR(compiler, $1) \
4015 _LT_AC_TAGVAR(CC, $1) \
4016 _LT_AC_TAGVAR(LD, $1) \
4017 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4018 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4019 _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4020 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4021 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4022 _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4023 _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4024 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4025 _LT_AC_TAGVAR(old_archive_cmds, $1) \
4026 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4027 _LT_AC_TAGVAR(predep_objects, $1) \
4028 _LT_AC_TAGVAR(postdep_objects, $1) \
4029 _LT_AC_TAGVAR(predeps, $1) \
4030 _LT_AC_TAGVAR(postdeps, $1) \
4031 _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4032 _LT_AC_TAGVAR(archive_cmds, $1) \
4033 _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4034 _LT_AC_TAGVAR(postinstall_cmds, $1) \
4035 _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4036 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4037 _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4038 _LT_AC_TAGVAR(no_undefined_flag, $1) \
4039 _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4040 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4041 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4042 _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4043 _LT_AC_TAGVAR(hardcode_automatic, $1) \
4044 _LT_AC_TAGVAR(module_cmds, $1) \
4045 _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4046 _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4047 _LT_AC_TAGVAR(exclude_expsyms, $1) \
4048 _LT_AC_TAGVAR(include_expsyms, $1); do
4049
4050 case $var in
4051 _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4052 _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4053 _LT_AC_TAGVAR(archive_cmds, $1) | \
4054 _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4055 _LT_AC_TAGVAR(module_cmds, $1) | \
4056 _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4057 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4058 _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4059 extract_expsyms_cmds | reload_cmds | finish_cmds | \
4060 postinstall_cmds | postuninstall_cmds | \
4061 old_postinstall_cmds | old_postuninstall_cmds | \
4062 sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4063 # Double-quote double-evaled strings.
4064 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4065 ;;
4066 *)
4067 eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4068 ;;
4069 esac
4070 done
4071
4072 case $lt_echo in
4073 *'\[$]0 --fallback-echo"')
4074 lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4075 ;;
4076 esac
4077
4078 ifelse([$1], [],
4079 [cfgfile="${ofile}T"
4080 trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4081 $rm -f "$cfgfile"
4082 AC_MSG_NOTICE([creating $ofile])],
4083 [cfgfile="$ofile"])
4084
4085 cat <<__EOF__ >> "$cfgfile"
4086 ifelse([$1], [],
4087 [#! $SHELL
4088
4089 # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4090 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4091 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
4092 #
4093 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4094 # Free Software Foundation, Inc.
4095 #
4096 # This file is part of GNU Libtool:
4097 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4098 #
4099 # This program is free software; you can redistribute it and/or modify
4100 # it under the terms of the GNU General Public License as published by
4101 # the Free Software Foundation; either version 2 of the License, or
4102 # (at your option) any later version.
4103 #
4104 # This program is distributed in the hope that it will be useful, but
4105 # WITHOUT ANY WARRANTY; without even the implied warranty of
4106 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4107 # General Public License for more details.
4108 #
4109 # You should have received a copy of the GNU General Public License
4110 # along with this program; if not, write to the Free Software
4111 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4112 #
4113 # As a special exception to the GNU General Public License, if you
4114 # distribute this file as part of a program that contains a
4115 # configuration script generated by Autoconf, you may include it under
4116 # the same distribution terms that you use for the rest of that program.
4117
4118 # A sed program that does not truncate output.
4119 SED=$lt_SED
4120
4121 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
4122 Xsed="$SED -e s/^X//"
4123
4124 # The HP-UX ksh and POSIX shell print the target directory to stdout
4125 # if CDPATH is set.
4126 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
4127
4128 # The names of the tagged configurations supported by this script.
4129 available_tags=
4130
4131 # ### BEGIN LIBTOOL CONFIG],
4132 [# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4133
4134 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4135
4136 # Shell to use when invoking shell scripts.
4137 SHELL=$lt_SHELL
4138
4139 # Whether or not to build shared libraries.
4140 build_libtool_libs=$enable_shared
4141
4142 # Whether or not to build static libraries.
4143 build_old_libs=$enable_static
4144
4145 # Whether or not to add -lc for building shared libraries.
4146 build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4147
4148 # Whether or not to disallow shared libs when runtime libs are static
4149 allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4150
4151 # Whether or not to optimize for fast installation.
4152 fast_install=$enable_fast_install
4153
4154 # The host system.
4155 host_alias=$host_alias
4156 host=$host
4157
4158 # An echo program that does not interpret backslashes.
4159 echo=$lt_echo
4160
4161 # The archiver.
4162 AR=$lt_AR
4163 AR_FLAGS=$lt_AR_FLAGS
4164
4165 # A C compiler.
4166 LTCC=$lt_LTCC
4167
4168 # A language-specific compiler.
4169 CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4170
4171 # Is the compiler the GNU C compiler?
4172 with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4173
4174 # An ERE matcher.
4175 EGREP=$lt_EGREP
4176
4177 # The linker used to build libraries.
4178 LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4179
4180 # Whether we need hard or soft links.
4181 LN_S=$lt_LN_S
4182
4183 # A BSD-compatible nm program.
4184 NM=$lt_NM
4185
4186 # A symbol stripping program
4187 STRIP=$STRIP
4188
4189 # Used to examine libraries when file_magic_cmd begins "file"
4190 MAGIC_CMD=$MAGIC_CMD
4191
4192 # Used on cygwin: DLL creation program.
4193 DLLTOOL="$DLLTOOL"
4194
4195 # Used on cygwin: object dumper.
4196 OBJDUMP="$OBJDUMP"
4197
4198 # Used on cygwin: assembler.
4199 AS="$AS"
4200
4201 # The name of the directory that contains temporary libtool files.
4202 objdir=$objdir
4203
4204 # How to create reloadable object files.
4205 reload_flag=$lt_reload_flag
4206 reload_cmds=$lt_reload_cmds
4207
4208 # How to pass a linker flag through the compiler.
4209 wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4210
4211 # Object file suffix (normally "o").
4212 objext="$ac_objext"
4213
4214 # Old archive suffix (normally "a").
4215 libext="$libext"
4216
4217 # Shared library suffix (normally ".so").
4218 shrext='$shrext'
4219
4220 # Executable file suffix (normally "").
4221 exeext="$exeext"
4222
4223 # Additional compiler flags for building library objects.
4224 pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4225 pic_mode=$pic_mode
4226
4227 # What is the maximum length of a command?
4228 max_cmd_len=$lt_cv_sys_max_cmd_len
4229
4230 # Does compiler simultaneously support -c and -o options?
4231 compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4232
4233 # Must we lock files when doing compilation ?
4234 need_locks=$lt_need_locks
4235
4236 # Do we need the lib prefix for modules?
4237 need_lib_prefix=$need_lib_prefix
4238
4239 # Do we need a version for libraries?
4240 need_version=$need_version
4241
4242 # Whether dlopen is supported.
4243 dlopen_support=$enable_dlopen
4244
4245 # Whether dlopen of programs is supported.
4246 dlopen_self=$enable_dlopen_self
4247
4248 # Whether dlopen of statically linked programs is supported.
4249 dlopen_self_static=$enable_dlopen_self_static
4250
4251 # Compiler flag to prevent dynamic linking.
4252 link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4253
4254 # Compiler flag to turn off builtin functions.
4255 no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4256
4257 # Compiler flag to allow reflexive dlopens.
4258 export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4259
4260 # Compiler flag to generate shared objects directly from archives.
4261 whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4262
4263 # Compiler flag to generate thread-safe objects.
4264 thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4265
4266 # Library versioning type.
4267 version_type=$version_type
4268
4269 # Format of library name prefix.
4270 libname_spec=$lt_libname_spec
4271
4272 # List of archive names. First name is the real one, the rest are links.
4273 # The last name is the one that the linker finds with -lNAME.
4274 library_names_spec=$lt_library_names_spec
4275
4276 # The coded name of the library, if different from the real name.
4277 soname_spec=$lt_soname_spec
4278
4279 # Commands used to build and install an old-style archive.
4280 RANLIB=$lt_RANLIB
4281 old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4282 old_postinstall_cmds=$lt_old_postinstall_cmds
4283 old_postuninstall_cmds=$lt_old_postuninstall_cmds
4284
4285 # Create an old-style archive from a shared archive.
4286 old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4287
4288 # Create a temporary old-style archive to link instead of a shared archive.
4289 old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4290
4291 # Commands used to build and install a shared archive.
4292 archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4293 archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4294 postinstall_cmds=$lt_postinstall_cmds
4295 postuninstall_cmds=$lt_postuninstall_cmds
4296
4297 # Commands used to build a loadable module (assumed same as above if empty)
4298 module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4299 module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4300
4301 # Commands to strip libraries.
4302 old_striplib=$lt_old_striplib
4303 striplib=$lt_striplib
4304
4305 # Dependencies to place before the objects being linked to create a
4306 # shared library.
4307 predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4308
4309 # Dependencies to place after the objects being linked to create a
4310 # shared library.
4311 postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4312
4313 # Dependencies to place before the objects being linked to create a
4314 # shared library.
4315 predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4316
4317 # Dependencies to place after the objects being linked to create a
4318 # shared library.
4319 postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4320
4321 # The library search path used internally by the compiler when linking
4322 # a shared library.
4323 compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4324
4325 # Method to check whether dependent libraries are shared objects.
4326 deplibs_check_method=$lt_deplibs_check_method
4327
4328 # Command to use when deplibs_check_method == file_magic.
4329 file_magic_cmd=$lt_file_magic_cmd
4330
4331 # Flag that allows shared libraries with undefined symbols to be built.
4332 allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4333
4334 # Flag that forces no undefined symbols.
4335 no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4336
4337 # Commands used to finish a libtool library installation in a directory.
4338 finish_cmds=$lt_finish_cmds
4339
4340 # Same as above, but a single script fragment to be evaled but not shown.
4341 finish_eval=$lt_finish_eval
4342
4343 # Take the output of nm and produce a listing of raw symbols and C names.
4344 global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4345
4346 # Transform the output of nm in a proper C declaration
4347 global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4348
4349 # Transform the output of nm in a C name address pair
4350 global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4351
4352 # This is the shared library runtime path variable.
4353 runpath_var=$runpath_var
4354
4355 # This is the shared library path variable.
4356 shlibpath_var=$shlibpath_var
4357
4358 # Is shlibpath searched before the hard-coded library search path?
4359 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4360
4361 # How to hardcode a shared library path into an executable.
4362 hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4363
4364 # Whether we should hardcode library paths into libraries.
4365 hardcode_into_libs=$hardcode_into_libs
4366
4367 # Flag to hardcode \$libdir into a binary during linking.
4368 # This must work even if \$libdir does not exist.
4369 hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4370
4371 # If ld is used when linking, flag to hardcode \$libdir into
4372 # a binary during linking. This must work even if \$libdir does
4373 # not exist.
4374 hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4375
4376 # Whether we need a single -rpath flag with a separated argument.
4377 hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4378
4379 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4380 # resulting binary.
4381 hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4382
4383 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4384 # resulting binary.
4385 hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4386
4387 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4388 # the resulting binary.
4389 hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4390
4391 # Set to yes if building a shared library automatically hardcodes DIR into the library
4392 # and all subsequent libraries and executables linked against it.
4393 hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4394
4395 # Variables whose values should be saved in libtool wrapper scripts and
4396 # restored at relink time.
4397 variables_saved_for_relink="$variables_saved_for_relink"
4398
4399 # Whether libtool must link a program against all its dependency libraries.
4400 link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4401
4402 # Compile-time system search path for libraries
4403 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4404
4405 # Run-time system search path for libraries
4406 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4407
4408 # Fix the shell variable \$srcfile for the compiler.
4409 fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4410
4411 # Set to yes if exported symbols are required.
4412 always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4413
4414 # The commands to list exported symbols.
4415 export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4416
4417 # The commands to extract the exported symbol list from a shared archive.
4418 extract_expsyms_cmds=$lt_extract_expsyms_cmds
4419
4420 # Symbols that should not be listed in the preloaded symbols.
4421 exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4422
4423 # Symbols that must always be exported.
4424 include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4425
4426 ifelse([$1],[],
4427 [# ### END LIBTOOL CONFIG],
4428 [# ### END LIBTOOL TAG CONFIG: $tagname])
4429
4430 __EOF__
4431
4432 ifelse([$1],[], [
4433 case $host_os in
4434 aix3*)
4435 cat <<\EOF >> "$cfgfile"
4436
4437 # AIX sometimes has problems with the GCC collect2 program. For some
4438 # reason, if we set the COLLECT_NAMES environment variable, the problems
4439 # vanish in a puff of smoke.
4440 if test "X${COLLECT_NAMES+set}" != Xset; then
4441 COLLECT_NAMES=
4442 export COLLECT_NAMES
4443 fi
4444 EOF
4445 ;;
4446 esac
4447
4448 # We use sed instead of cat because bash on DJGPP gets confused if
4449 # if finds mixed CR/LF and LF-only lines. Since sed operates in
4450 # text mode, it properly converts lines to CR/LF. This bash problem
4451 # is reportedly fixed, but why not run on old versions too?
4452 sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4453
4454 mv -f "$cfgfile" "$ofile" || \
4455 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4456 chmod +x "$ofile"
4457 ])
4458 else
4459 # If there is no Makefile yet, we rely on a make rule to execute
4460 # `config.status --recheck' to rerun these tests and create the
4461 # libtool script then.
4462 test -f Makefile && make "$ltmain"
4463 fi
4464 ])# AC_LIBTOOL_CONFIG
4465
4466
4467 # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4468 # -------------------------------------------
4469 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4470 [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4471
4472 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4473
4474 if test "$GCC" = yes; then
4475 _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4476
4477 AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4478 lt_cv_prog_compiler_rtti_exceptions,
4479 [-fno-rtti -fno-exceptions], [],
4480 [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4481 fi
4482 ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4483
4484
4485 # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4486 # ---------------------------------
4487 AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4488 [AC_REQUIRE([AC_CANONICAL_HOST])
4489 AC_REQUIRE([AC_PROG_NM])
4490 AC_REQUIRE([AC_OBJEXT])
4491 # Check for command to grab the raw symbol name followed by C symbol from nm.
4492 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4493 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4494 [
4495 # These are sane defaults that work on at least a few old systems.
4496 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
4497
4498 # Character class describing NM global symbol codes.
4499 symcode='[[BCDEGRST]]'
4500
4501 # Regexp to match symbols that can be accessed directly from C.
4502 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4503
4504 # Transform the above into a raw symbol and a C symbol.
4505 symxfrm='\1 \2\3 \3'
4506
4507 # Transform an extracted symbol line into a proper C declaration
4508 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4509
4510 # Transform an extracted symbol line into symbol name and symbol address
4511 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4512
4513 # Define system-specific variables.
4514 case $host_os in
4515 aix*)
4516 symcode='[[BCDT]]'
4517 ;;
4518 cygwin* | mingw* | pw32*)
4519 symcode='[[ABCDGISTW]]'
4520 ;;
4521 hpux*) # Its linker distinguishes data from code symbols
4522 if test "$host_cpu" = ia64; then
4523 symcode='[[ABCDEGRST]]'
4524 fi
4525 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4526 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'"
4527 ;;
4528 irix* | nonstopux*)
4529 symcode='[[BCDEGRST]]'
4530 ;;
4531 osf*)
4532 symcode='[[BCDEGQRST]]'
4533 ;;
4534 solaris* | sysv5*)
4535 symcode='[[BDT]]'
4536 ;;
4537 sysv4)
4538 symcode='[[DFNSTU]]'
4539 ;;
4540 esac
4541
4542 # Handle CRLF in mingw tool chain
4543 opt_cr=
4544 case $build_os in
4545 mingw*)
4546 opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4547 ;;
4548 esac
4549
4550 # If we're using GNU nm, then use its standard symbol codes.
4551 case `$NM -V 2>&1` in
4552 *GNU* | *'with BFD'*)
4553 symcode='[[ABCDGISTW]]' ;;
4554 esac
4555
4556 # Try without a prefix undercore, then with it.
4557 for ac_symprfx in "" "_"; do
4558
4559 # Write the raw and C identifiers.
4560 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4561
4562 # Check to see that the pipe works correctly.
4563 pipe_works=no
4564
4565 rm -f conftest*
4566 cat > conftest.$ac_ext <<EOF
4567 #ifdef __cplusplus
4568 extern "C" {
4569 #endif
4570 char nm_test_var;
4571 void nm_test_func(){}
4572 #ifdef __cplusplus
4573 }
4574 #endif
4575 int main(){nm_test_var='a';nm_test_func();return(0);}
4576 EOF
4577
4578 if AC_TRY_EVAL(ac_compile); then
4579 # Now try to grab the symbols.
4580 nlist=conftest.nm
4581 if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4582 # Try sorting and uniquifying the output.
4583 if sort "$nlist" | uniq > "$nlist"T; then
4584 mv -f "$nlist"T "$nlist"
4585 else
4586 rm -f "$nlist"T
4587 fi
4588
4589 # Make sure that we snagged all the symbols we need.
4590 if grep ' nm_test_var$' "$nlist" >/dev/null; then
4591 if grep ' nm_test_func$' "$nlist" >/dev/null; then
4592 cat <<EOF > conftest.$ac_ext
4593 #ifdef __cplusplus
4594 extern "C" {
4595 #endif
4596
4597 EOF
4598 # Now generate the symbol file.
4599 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4600
4601 cat <<EOF >> conftest.$ac_ext
4602 #if defined (__STDC__) && __STDC__
4603 # define lt_ptr_t void *
4604 #else
4605 # define lt_ptr_t char *
4606 # define const
4607 #endif
4608
4609 /* The mapping between symbol names and symbols. */
4610 const struct {
4611 const char *name;
4612 lt_ptr_t address;
4613 }
4614 lt_preloaded_symbols[[]] =
4615 {
4616 EOF
4617 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4618 cat <<\EOF >> conftest.$ac_ext
4619 {0, (lt_ptr_t) 0}
4620 };
4621
4622 #ifdef __cplusplus
4623 }
4624 #endif
4625 EOF
4626 # Now try linking the two files.
4627 mv conftest.$ac_objext conftstm.$ac_objext
4628 lt_save_LIBS="$LIBS"
4629 lt_save_CFLAGS="$CFLAGS"
4630 LIBS="conftstm.$ac_objext"
4631 CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4632 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4633 pipe_works=yes
4634 fi
4635 LIBS="$lt_save_LIBS"
4636 CFLAGS="$lt_save_CFLAGS"
4637 else
4638 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4639 fi
4640 else
4641 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4642 fi
4643 else
4644 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4645 fi
4646 else
4647 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4648 cat conftest.$ac_ext >&5
4649 fi
4650 rm -f conftest* conftst*
4651
4652 # Do not use the global_symbol_pipe unless it works.
4653 if test "$pipe_works" = yes; then
4654 break
4655 else
4656 lt_cv_sys_global_symbol_pipe=
4657 fi
4658 done
4659 ])
4660 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4661 lt_cv_sys_global_symbol_to_cdecl=
4662 fi
4663 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4664 AC_MSG_RESULT(failed)
4665 else
4666 AC_MSG_RESULT(ok)
4667 fi
4668 ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4669
4670
4671 # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4672 # ---------------------------------------
4673 AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4674 [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4675 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4676 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4677
4678 AC_MSG_CHECKING([for $compiler option to produce PIC])
4679 ifelse([$1],[CXX],[
4680 # C++ specific cases for pic, static, wl, etc.
4681 if test "$GXX" = yes; then
4682 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4683 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4684
4685 case $host_os in
4686 aix*)
4687 # All AIX code is PIC.
4688 if test "$host_cpu" = ia64; then
4689 # AIX 5 now supports IA64 processor
4690 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4691 fi
4692 ;;
4693 amigaos*)
4694 # FIXME: we need at least 68020 code to build shared libraries, but
4695 # adding the `-m68020' flag to GCC prevents building anything better,
4696 # like `-m68040'.
4697 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4698 ;;
4699 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4700 # PIC is the default for these OSes.
4701 ;;
4702 mingw* | os2* | pw32*)
4703 # This hack is so that the source file can tell whether it is being
4704 # built for inclusion in a dll (and should export symbols for example).
4705 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4706 ;;
4707 darwin* | rhapsody*)
4708 # PIC is the default on this platform
4709 # Common symbols not allowed in MH_DYLIB files
4710 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4711 ;;
4712 *djgpp*)
4713 # DJGPP does not support shared libraries at all
4714 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4715 ;;
4716 sysv4*MP*)
4717 if test -d /usr/nec; then
4718 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4719 fi
4720 ;;
4721 hpux*)
4722 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4723 # not for PA HP-UX.
4724 case "$host_cpu" in
4725 hppa*64*|ia64*)
4726 ;;
4727 *)
4728 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4729 ;;
4730 esac
4731 ;;
4732 *)
4733 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4734 ;;
4735 esac
4736 else
4737 case $host_os in
4738 aix4* | aix5*)
4739 # All AIX code is PIC.
4740 if test "$host_cpu" = ia64; then
4741 # AIX 5 now supports IA64 processor
4742 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4743 else
4744 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4745 fi
4746 ;;
4747 chorus*)
4748 case $cc_basename in
4749 cxch68)
4750 # Green Hills C++ Compiler
4751 # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
4752 ;;
4753 esac
4754 ;;
4755 dgux*)
4756 case $cc_basename in
4757 ec++)
4758 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4759 ;;
4760 ghcx)
4761 # Green Hills C++ Compiler
4762 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4763 ;;
4764 *)
4765 ;;
4766 esac
4767 ;;
4768 freebsd*)
4769 # FreeBSD uses GNU C++
4770 ;;
4771 hpux9* | hpux10* | hpux11*)
4772 case $cc_basename in
4773 CC)
4774 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4775 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4776 if test "$host_cpu" != ia64; then
4777 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4778 fi
4779 ;;
4780 aCC)
4781 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4782 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive"
4783 case "$host_cpu" in
4784 hppa*64*|ia64*)
4785 # +Z the default
4786 ;;
4787 *)
4788 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4789 ;;
4790 esac
4791 ;;
4792 *)
4793 ;;
4794 esac
4795 ;;
4796 irix5* | irix6* | nonstopux*)
4797 case $cc_basename in
4798 CC)
4799 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4800 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4801 # CC pic flag -KPIC is the default.
4802 ;;
4803 *)
4804 ;;
4805 esac
4806 ;;
4807 linux*)
4808 case $cc_basename in
4809 KCC)
4810 # KAI C++ Compiler
4811 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4812 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4813 ;;
4814 icpc)
4815 # Intel C++
4816 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4817 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4818 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4819 ;;
4820 cxx)
4821 # Compaq C++
4822 # Make sure the PIC flag is empty. It appears that all Alpha
4823 # Linux and Compaq Tru64 Unix objects are PIC.
4824 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4825 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4826 ;;
4827 *)
4828 ;;
4829 esac
4830 ;;
4831 lynxos*)
4832 ;;
4833 m88k*)
4834 ;;
4835 mvs*)
4836 case $cc_basename in
4837 cxx)
4838 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4839 ;;
4840 *)
4841 ;;
4842 esac
4843 ;;
4844 netbsd*)
4845 ;;
4846 osf3* | osf4* | osf5*)
4847 case $cc_basename in
4848 KCC)
4849 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4850 ;;
4851 RCC)
4852 # Rational C++ 2.4.1
4853 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4854 ;;
4855 cxx)
4856 # Digital/Compaq C++
4857 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4858 # Make sure the PIC flag is empty. It appears that all Alpha
4859 # Linux and Compaq Tru64 Unix objects are PIC.
4860 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4861 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4862 ;;
4863 *)
4864 ;;
4865 esac
4866 ;;
4867 psos*)
4868 ;;
4869 sco*)
4870 case $cc_basename in
4871 CC)
4872 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4873 ;;
4874 *)
4875 ;;
4876 esac
4877 ;;
4878 solaris*)
4879 case $cc_basename in
4880 CC)
4881 # Sun C++ 4.2, 5.x and Centerline C++
4882 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4883 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4884 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4885 ;;
4886 gcx)
4887 # Green Hills C++ Compiler
4888 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4889 ;;
4890 *)
4891 ;;
4892 esac
4893 ;;
4894 sunos4*)
4895 case $cc_basename in
4896 CC)
4897 # Sun C++ 4.x
4898 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4899 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4900 ;;
4901 lcc)
4902 # Lucid
4903 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4904 ;;
4905 *)
4906 ;;
4907 esac
4908 ;;
4909 tandem*)
4910 case $cc_basename in
4911 NCC)
4912 # NonStop-UX NCC 3.20
4913 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4914 ;;
4915 *)
4916 ;;
4917 esac
4918 ;;
4919 unixware*)
4920 ;;
4921 vxworks*)
4922 ;;
4923 *)
4924 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4925 ;;
4926 esac
4927 fi
4928 ],
4929 [
4930 if test "$GCC" = yes; then
4931 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4932 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4933
4934 case $host_os in
4935 aix*)
4936 # All AIX code is PIC.
4937 if test "$host_cpu" = ia64; then
4938 # AIX 5 now supports IA64 processor
4939 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4940 fi
4941 ;;
4942
4943 amigaos*)
4944 # FIXME: we need at least 68020 code to build shared libraries, but
4945 # adding the `-m68020' flag to GCC prevents building anything better,
4946 # like `-m68040'.
4947 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4948 ;;
4949
4950 beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4951 # PIC is the default for these OSes.
4952 ;;
4953
4954 mingw* | pw32* | os2*)
4955 # This hack is so that the source file can tell whether it is being
4956 # built for inclusion in a dll (and should export symbols for example).
4957 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4958 ;;
4959
4960 darwin* | rhapsody*)
4961 # PIC is the default on this platform
4962 # Common symbols not allowed in MH_DYLIB files
4963 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4964 ;;
4965
4966 msdosdjgpp*)
4967 # Just because we use GCC doesn't mean we suddenly get shared libraries
4968 # on systems that don't support them.
4969 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
4970 enable_shared=no
4971 ;;
4972
4973 sysv4*MP*)
4974 if test -d /usr/nec; then
4975 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4976 fi
4977 ;;
4978
4979 hpux*)
4980 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4981 # not for PA HP-UX.
4982 case "$host_cpu" in
4983 hppa*64*|ia64*)
4984 # +Z the default
4985 ;;
4986 *)
4987 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4988 ;;
4989 esac
4990 ;;
4991
4992 *)
4993 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4994 ;;
4995 esac
4996 else
4997 # PORTME Check for flag to pass linker flags through the system compiler.
4998 case $host_os in
4999 aix*)
5000 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5001 if test "$host_cpu" = ia64; then
5002 # AIX 5 now supports IA64 processor
5003 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5004 else
5005 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5006 fi
5007 ;;
5008
5009 mingw* | pw32* | os2*)
5010 # This hack is so that the source file can tell whether it is being
5011 # built for inclusion in a dll (and should export symbols for example).
5012 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5013 ;;
5014
5015 hpux9* | hpux10* | hpux11*)
5016 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5017 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5018 # not for PA HP-UX.
5019 case "$host_cpu" in
5020 hppa*64*|ia64*)
5021 # +Z the default
5022 ;;
5023 *)
5024 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5025 ;;
5026 esac
5027 # Is there a better lt_prog_compiler_static that works with the bundled CC?
5028 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5029 ;;
5030
5031 irix5* | irix6* | nonstopux*)
5032 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5033 # PIC (with -KPIC) is the default.
5034 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5035 ;;
5036
5037 newsos6)
5038 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5039 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5040 ;;
5041
5042 linux*)
5043 case $CC in
5044 icc|ecc)
5045 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5046 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5047 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5048 ;;
5049 ccc)
5050 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5051 # All Alpha code is PIC.
5052 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5053 ;;
5054 esac
5055 ;;
5056
5057 osf3* | osf4* | osf5*)
5058 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5059 # All OSF/1 code is PIC.
5060 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5061 ;;
5062
5063 sco3.2v5*)
5064 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic'
5065 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn'
5066 ;;
5067
5068 solaris*)
5069 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5070 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5071 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5072 ;;
5073
5074 sunos4*)
5075 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5076 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5077 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5078 ;;
5079
5080 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5081 _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5082 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5083 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5084 ;;
5085
5086 sysv4*MP*)
5087 if test -d /usr/nec ;then
5088 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5089 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5090 fi
5091 ;;
5092
5093 uts4*)
5094 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5095 _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5096 ;;
5097
5098 *)
5099 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5100 ;;
5101 esac
611 fi 5102 fi
612 ]) 5103 ])
613 5104 AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
614 dnl old names 5105
615 AC_DEFUN(AM_PROG_LIBTOOL, [indir([AC_PROG_LIBTOOL])])dnl 5106 #
616 AC_DEFUN(AM_ENABLE_SHARED, [indir([AC_ENABLE_SHARED], $@)])dnl 5107 # Check to make sure the PIC flag actually works.
617 AC_DEFUN(AM_ENABLE_STATIC, [indir([AC_ENABLE_STATIC], $@)])dnl 5108 #
618 AC_DEFUN(AM_DISABLE_SHARED, [indir([AC_DISABLE_SHARED], $@)])dnl 5109 if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
619 AC_DEFUN(AM_DISABLE_STATIC, [indir([AC_DISABLE_STATIC], $@)])dnl 5110 AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
620 AC_DEFUN(AM_PROG_LD, [indir([AC_PROG_LD])])dnl 5111 _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
621 AC_DEFUN(AM_PROG_NM, [indir([AC_PROG_NM])])dnl 5112 [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
622 5113 [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
623 dnl This is just to silence aclocal about the macro not being used 5114 "" | " "*) ;;
624 ifelse([AC_DISABLE_FAST_INSTALL])dnl 5115 *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5116 esac],
5117 [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5118 _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5119 fi
5120 case "$host_os" in
5121 # For platforms which do not support PIC, -DPIC is meaningless:
5122 *djgpp*)
5123 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5124 ;;
5125 *)
5126 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5127 ;;
5128 esac
5129 ])
5130
5131
5132 # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5133 # ------------------------------------
5134 # See if the linker supports building shared libraries.
5135 AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5136 [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5137 ifelse([$1],[CXX],[
5138 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5139 case $host_os in
5140 aix4* | aix5*)
5141 # If we're using GNU nm, then we don't want the "-C" option.
5142 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5143 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5144 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5145 else
5146 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5147 fi
5148 ;;
5149 pw32*)
5150 _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5151 ;;
5152 cygwin* | mingw*)
5153 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5154 ;;
5155 *)
5156 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5157 ;;
5158 esac
5159 ],[
5160 runpath_var=
5161 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5162 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5163 _LT_AC_TAGVAR(archive_cmds, $1)=
5164 _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5165 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5166 _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5167 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5168 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5169 _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5170 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5171 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5172 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5173 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5174 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5175 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5176 _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5177 _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5178 _LT_AC_TAGVAR(module_cmds, $1)=
5179 _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5180 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5181 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5182 # include_expsyms should be a list of space-separated symbols to be *always*
5183 # included in the symbol list
5184 _LT_AC_TAGVAR(include_expsyms, $1)=
5185 # exclude_expsyms can be an extended regexp of symbols to exclude
5186 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5187 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5188 # as well as any symbol that contains `d'.
5189 _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5190 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5191 # platforms (ab)use it in PIC code, but their linkers get confused if
5192 # the symbol is explicitly referenced. Since portable code cannot
5193 # rely on this symbol name, it's probably fine to never include it in
5194 # preloaded symbol tables.
5195 extract_expsyms_cmds=
5196
5197 case $host_os in
5198 cygwin* | mingw* | pw32*)
5199 # FIXME: the MSVC++ port hasn't been tested in a loooong time
5200 # When not using gcc, we currently assume that we are using
5201 # Microsoft Visual C++.
5202 if test "$GCC" != yes; then
5203 with_gnu_ld=no
5204 fi
5205 ;;
5206 openbsd*)
5207 with_gnu_ld=no
5208 ;;
5209 esac
5210
5211 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5212 if test "$with_gnu_ld" = yes; then
5213 # If archive_cmds runs LD, not CC, wlarc should be empty
5214 wlarc='${wl}'
5215
5216 # See if GNU ld supports shared libraries.
5217 case $host_os in
5218 aix3* | aix4* | aix5*)
5219 # On AIX/PPC, the GNU linker is very broken
5220 if test "$host_cpu" != ia64; then
5221 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5222 cat <<EOF 1>&2
5223
5224 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5225 *** to be unable to reliably create shared libraries on AIX.
5226 *** Therefore, libtool is disabling shared libraries support. If you
5227 *** really care for shared libraries, you may want to modify your PATH
5228 *** so that a non-GNU linker is found, and then restart.
5229
5230 EOF
5231 fi
5232 ;;
5233
5234 amigaos*)
5235 _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
5236 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5237 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5238
5239 # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5240 # that the semantics of dynamic libraries on AmigaOS, at least up
5241 # to version 4, is to share data among multiple programs linked
5242 # with the same dynamic library. Since this doesn't match the
5243 # behavior of shared libraries on other platforms, we can't use
5244 # them.
5245 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5246 ;;
5247
5248 beos*)
5249 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5250 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5251 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5252 # support --undefined. This deserves some investigation. FIXME
5253 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5254 else
5255 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5256 fi
5257 ;;
5258
5259 cygwin* | mingw* | pw32*)
5260 # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5261 # as there is no search path for DLLs.
5262 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5263 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5264 _LT_AC_TAGVAR(always_export_symbols, $1)=no
5265 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5266 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5267
5268 if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5269 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5270 # If the export-symbols file already is a .def file (1st line
5271 # is EXPORTS), use it as is; otherwise, prepend...
5272 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5273 cp $export_symbols $output_objdir/$soname.def;
5274 else
5275 echo EXPORTS > $output_objdir/$soname.def;
5276 cat $export_symbols >> $output_objdir/$soname.def;
5277 fi~
5278 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib'
5279 else
5280 ld_shlibs=no
5281 fi
5282 ;;
5283
5284 netbsd*)
5285 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5286 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5287 wlarc=
5288 else
5289 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5290 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5291 fi
5292 ;;
5293
5294 solaris* | sysv5*)
5295 if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5296 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5297 cat <<EOF 1>&2
5298
5299 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5300 *** create shared libraries on Solaris systems. Therefore, libtool
5301 *** is disabling shared libraries support. We urge you to upgrade GNU
5302 *** binutils to release 2.9.1 or newer. Another option is to modify
5303 *** your PATH or compiler configuration so that the native linker is
5304 *** used, and then restart.
5305
5306 EOF
5307 elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5308 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5309 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5310 else
5311 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5312 fi
5313 ;;
5314
5315 sunos4*)
5316 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5317 wlarc=
5318 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5319 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5320 ;;
5321
5322 *)
5323 if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5324 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5325 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5326 else
5327 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5328 fi
5329 ;;
5330 esac
5331
5332 if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then
5333 runpath_var=LD_RUN_PATH
5334 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5335 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5336 # ancient GNU ld didn't support --whole-archive et. al.
5337 if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5338 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5339 else
5340 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5341 fi
5342 fi
5343 else
5344 # PORTME fill in a description of your system's linker (not GNU ld)
5345 case $host_os in
5346 aix3*)
5347 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5348 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5349 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
5350 # Note: this linker hardcodes the directories in LIBPATH if there
5351 # are no directories specified by -L.
5352 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5353 if test "$GCC" = yes && test -z "$link_static_flag"; then
5354 # Neither direct hardcoding nor static linking is supported with a
5355 # broken collect2.
5356 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5357 fi
5358 ;;
5359
5360 aix4* | aix5*)
5361 if test "$host_cpu" = ia64; then
5362 # On IA64, the linker does run time linking by default, so we don't
5363 # have to do anything special.
5364 aix_use_runtimelinking=no
5365 exp_sym_flag='-Bexport'
5366 no_entry_flag=""
5367 else
5368 # If we're using GNU nm, then we don't want the "-C" option.
5369 # -C means demangle to AIX nm, but means don't demangle with GNU nm
5370 if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5371 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5372 else
5373 _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
5374 fi
5375 aix_use_runtimelinking=no
5376
5377 # Test if we are trying to use run time linking or normal
5378 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5379 # need to do runtime linking.
5380 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5381 for ld_flag in $LDFLAGS; do
5382 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5383 aix_use_runtimelinking=yes
5384 break
5385 fi
5386 done
5387 esac
5388
5389 exp_sym_flag='-bexport'
5390 no_entry_flag='-bnoentry'
5391 fi
5392
5393 # When large executables or shared objects are built, AIX ld can
5394 # have problems creating the table of contents. If linking a library
5395 # or program results in "error TOC overflow" add -mminimal-toc to
5396 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
5397 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5398
5399 _LT_AC_TAGVAR(archive_cmds, $1)=''
5400 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5401 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5402 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5403
5404 if test "$GCC" = yes; then
5405 case $host_os in aix4.[012]|aix4.[012].*)
5406 # We only want to do this on AIX 4.2 and lower, the check
5407 # below for broken collect2 doesn't work under 4.3+
5408 collect2name=`${CC} -print-prog-name=collect2`
5409 if test -f "$collect2name" && \
5410 strings "$collect2name" | grep resolve_lib_name >/dev/null
5411 then
5412 # We have reworked collect2
5413 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5414 else
5415 # We have old collect2
5416 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5417 # It fails to find uninstalled libraries when the uninstalled
5418 # path is not listed in the libpath. Setting hardcode_minus_L
5419 # to unsupported forces relinking
5420 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5421 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5422 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5423 fi
5424 esac
5425 shared_flag='-shared'
5426 else
5427 # not using gcc
5428 if test "$host_cpu" = ia64; then
5429 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5430 # chokes on -Wl,-G. The following line is correct:
5431 shared_flag='-G'
5432 else
5433 if test "$aix_use_runtimelinking" = yes; then
5434 shared_flag='${wl}-G'
5435 else
5436 shared_flag='${wl}-bM:SRE'
5437 fi
5438 fi
5439 fi
5440
5441 # It seems that -bexpall does not export symbols beginning with
5442 # underscore (_), so it is better to generate a list of symbols to export.
5443 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5444 if test "$aix_use_runtimelinking" = yes; then
5445 # Warning - without using the other runtime loading flags (-brtl),
5446 # -berok will link without error, but may produce a broken library.
5447 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5448 # Determine the default libpath from the value encoded in an empty executable.
5449 _LT_AC_SYS_LIBPATH_AIX
5450 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5451 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag"
5452 else
5453 if test "$host_cpu" = ia64; then
5454 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5455 _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5456 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols"
5457 else
5458 # Determine the default libpath from the value encoded in an empty executable.
5459 _LT_AC_SYS_LIBPATH_AIX
5460 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5461 # Warning - without using the other run time loading flags,
5462 # -berok will link without error, but may produce a broken library.
5463 _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5464 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5465 # -bexpall does not export symbols beginning with underscore (_)
5466 _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5467 # Exported symbols can be pulled into shared objects from archives
5468 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' '
5469 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5470 # This is similar to how AIX traditionally builds it's shared libraries.
5471 _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
5472 fi
5473 fi
5474 ;;
5475
5476 amigaos*)
5477 _LT_AC_TAGVAR(archive_cmds, $1)='$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)'
5478 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5479 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5480 # see comment about different semantics on the GNU ld section
5481 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5482 ;;
5483
5484 bsdi4*)
5485 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5486 ;;
5487
5488 cygwin* | mingw* | pw32*)
5489 # When not using gcc, we currently assume that we are using
5490 # Microsoft Visual C++.
5491 # hardcode_libdir_flag_spec is actually meaningless, as there is
5492 # no search path for DLLs.
5493 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5494 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5495 # Tell ltmain to make .lib files, not .a files.
5496 libext=lib
5497 # Tell ltmain to make .dll files, not .so files.
5498 shrext=".dll"
5499 # FIXME: Setting linknames here is a bad hack.
5500 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5501 # The linker will automatically build a .lib file if we build a DLL.
5502 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5503 # FIXME: Should let the user specify the lib program.
5504 _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5505 fix_srcfile_path='`cygpath -w "$srcfile"`'
5506 _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5507 ;;
5508
5509 darwin* | rhapsody*)
5510 if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
5511 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5512 case "$host_os" in
5513 rhapsody* | darwin1.[[012]])
5514 _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress'
5515 ;;
5516 *) # Darwin 1.3 on
5517 test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress'
5518 ;;
5519 esac
5520 # FIXME: Relying on posixy $() will cause problems for
5521 # cross-compilation, but unfortunately the echo tests do not
5522 # yet detect zsh echo's removal of \ escapes. Also zsh mangles
5523 # `"' quotes if we put them in here... so don't!
5524 lt_int_apple_cc_single_mod=no
5525 output_verbose_link_cmd='echo'
5526 if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then
5527 lt_int_apple_cc_single_mod=yes
5528 fi
5529 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5530 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5531 else
5532 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5533 fi
5534 _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags'
5535 # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's
5536 if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
5537 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5538 else
5539 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5540 fi
5541 _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5542 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5543 _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5544 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5545 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience'
5546 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5547 fi
5548 ;;
5549
5550 dgux*)
5551 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5552 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5553 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5554 ;;
5555
5556 freebsd1*)
5557 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5558 ;;
5559
5560 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5561 # support. Future versions do this automatically, but an explicit c++rt0.o
5562 # does not break anything, and helps significantly (at the cost of a little
5563 # extra space).
5564 freebsd2.2*)
5565 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5566 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5567 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5568 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5569 ;;
5570
5571 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5572 freebsd2*)
5573 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5574 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5575 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5576 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5577 ;;
5578
5579 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5580 freebsd*)
5581 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5582 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5583 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5584 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5585 ;;
5586
5587 hpux9*)
5588 if test "$GCC" = yes; then
5589 _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
5590 else
5591 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5592 fi
5593 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5594 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5595 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5596
5597 # hardcode_minus_L: Not really in the search PATH,
5598 # but as the default location of the library.
5599 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5600 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5601 ;;
5602
5603 hpux10* | hpux11*)
5604 if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5605 case "$host_cpu" in
5606 hppa*64*|ia64*)
5607 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5608 ;;
5609 *)
5610 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5611 ;;
5612 esac
5613 else
5614 case "$host_cpu" in
5615 hppa*64*|ia64*)
5616 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags'
5617 ;;
5618 *)
5619 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5620 ;;
5621 esac
5622 fi
5623 if test "$with_gnu_ld" = no; then
5624 case "$host_cpu" in
5625 hppa*64*)
5626 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5627 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5628 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5629 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5630 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5631 ;;
5632 ia64*)
5633 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5634 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5635 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5636
5637 # hardcode_minus_L: Not really in the search PATH,
5638 # but as the default location of the library.
5639 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5640 ;;
5641 *)
5642 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5643 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5644 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5645 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5646
5647 # hardcode_minus_L: Not really in the search PATH,
5648 # but as the default location of the library.
5649 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5650 ;;
5651 esac
5652 fi
5653 ;;
5654
5655 irix5* | irix6* | nonstopux*)
5656 if test "$GCC" = yes; then
5657 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5658 else
5659 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
5660 _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5661 fi
5662 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5663 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5664 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5665 ;;
5666
5667 netbsd*)
5668 if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5669 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
5670 else
5671 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
5672 fi
5673 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5674 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5675 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5676 ;;
5677
5678 newsos6)
5679 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5680 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5681 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5682 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5683 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5684 ;;
5685
5686 openbsd*)
5687 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5688 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5689 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5690 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5691 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5692 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5693 else
5694 case $host_os in
5695 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5696 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5697 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5698 ;;
5699 *)
5700 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5701 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5702 ;;
5703 esac
5704 fi
5705 ;;
5706
5707 os2*)
5708 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5709 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5710 _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5711 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5712 _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5713 ;;
5714
5715 osf3*)
5716 if test "$GCC" = yes; then
5717 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5718 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5719 else
5720 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5721 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5722 fi
5723 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5724 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5725 ;;
5726
5727 osf4* | osf5*) # as osf3* with the addition of -msym flag
5728 if test "$GCC" = yes; then
5729 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
5730 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5731 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5732 else
5733 _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
5734 _LT_AC_TAGVAR(archive_cmds, $1)='$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'
5735 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5736 $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'
5737
5738 # Both c and cxx compiler support -rpath directly
5739 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
5740 fi
5741 _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5742 ;;
5743
5744 sco3.2v5*)
5745 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5746 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5747 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
5748 runpath_var=LD_RUN_PATH
5749 hardcode_runpath_var=yes
5750 ;;
5751
5752 solaris*)
5753 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5754 if test "$GCC" = yes; then
5755 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5756 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5757 $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
5758 else
5759 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5760 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5761 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5762 fi
5763 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5764 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5765 case $host_os in
5766 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
5767 *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5768 _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
5769 esac
5770 _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5771 ;;
5772
5773 sunos4*)
5774 if test "x$host_vendor" = xsequent; then
5775 # Use $CC to link under sequent, because it throws in some extra .o
5776 # files that make .init and .fini sections work.
5777 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5778 else
5779 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5780 fi
5781 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5782 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5783 _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5784 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5785 ;;
5786
5787 sysv4)
5788 case $host_vendor in
5789 sni)
5790 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5791 _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
5792 ;;
5793 siemens)
5794 ## LD is ld it makes a PLAMLIB
5795 ## CC just makes a GrossModule.
5796 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5797 _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
5798 _LT_AC_TAGVAR(hardcode_direct, $1)=no
5799 ;;
5800 motorola)
5801 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5802 _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
5803 ;;
5804 esac
5805 runpath_var='LD_RUN_PATH'
5806 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5807 ;;
5808
5809 sysv4.3*)
5810 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5811 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5812 _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
5813 ;;
5814
5815 sysv4*MP*)
5816 if test -d /usr/nec; then
5817 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5818 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5819 runpath_var=LD_RUN_PATH
5820 hardcode_runpath_var=yes
5821 _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5822 fi
5823 ;;
5824
5825 sysv4.2uw2*)
5826 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5827 _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5828 _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5829 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5830 hardcode_runpath_var=yes
5831 runpath_var=LD_RUN_PATH
5832 ;;
5833
5834 sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*)
5835 _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text'
5836 if test "$GCC" = yes; then
5837 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5838 else
5839 _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5840 fi
5841 runpath_var='LD_RUN_PATH'
5842 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5843 ;;
5844
5845 sysv5*)
5846 _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
5847 # $CC -shared without GNU ld will not create a library from C++
5848 # object files and a static libstdc++, better avoid it by now
5849 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5850 _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5851 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5852 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5853 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5854 runpath_var='LD_RUN_PATH'
5855 ;;
5856
5857 uts4*)
5858 _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5859 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5860 _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5861 ;;
5862
5863 *)
5864 _LT_AC_TAGVAR(ld_shlibs, $1)=no
5865 ;;
5866 esac
5867 fi
5868 ])
5869 AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
5870 test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
5871
5872 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
5873 if test "$GCC" = yes; then
5874 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
5875 fi
5876
5877 #
5878 # Do we need to explicitly link libc?
5879 #
5880 case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
5881 x|xyes)
5882 # Assume -lc should be added
5883 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5884
5885 if test "$enable_shared" = yes && test "$GCC" = yes; then
5886 case $_LT_AC_TAGVAR(archive_cmds, $1) in
5887 *'~'*)
5888 # FIXME: we may have to deal with multi-command sequences.
5889 ;;
5890 '$CC '*)
5891 # Test whether the compiler implicitly links with -lc since on some
5892 # systems, -lgcc has to come before -lc. If gcc already passes -lc
5893 # to ld, don't add -lc before -lgcc.
5894 AC_MSG_CHECKING([whether -lc should be explicitly linked in])
5895 $rm conftest*
5896 printf "$lt_simple_compile_test_code" > conftest.$ac_ext
5897
5898 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
5899 soname=conftest
5900 lib=conftest
5901 libobjs=conftest.$ac_objext
5902 deplibs=
5903 wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
5904 compiler_flags=-v
5905 linker_flags=-v
5906 verstring=
5907 output_objdir=.
5908 libname=conftest
5909 lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
5910 _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5911 if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
5912 then
5913 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5914 else
5915 _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5916 fi
5917 _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
5918 else
5919 cat conftest.err 1>&5
5920 fi
5921 $rm conftest*
5922 AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
5923 ;;
5924 esac
5925 fi
5926 ;;
5927 esac
5928 ])# AC_LIBTOOL_PROG_LD_SHLIBS
5929
5930
5931 # _LT_AC_FILE_LTDLL_C
5932 # -------------------
5933 # Be careful that the start marker always follows a newline.
5934 AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
5935 # /* ltdll.c starts here */
5936 # #define WIN32_LEAN_AND_MEAN
5937 # #include <windows.h>
5938 # #undef WIN32_LEAN_AND_MEAN
5939 # #include <stdio.h>
5940 #
5941 # #ifndef __CYGWIN__
5942 # # ifdef __CYGWIN32__
5943 # # define __CYGWIN__ __CYGWIN32__
5944 # # endif
5945 # #endif
5946 #
5947 # #ifdef __cplusplus
5948 # extern "C" {
5949 # #endif
5950 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
5951 # #ifdef __cplusplus
5952 # }
5953 # #endif
5954 #
5955 # #ifdef __CYGWIN__
5956 # #include <cygwin/cygwin_dll.h>
5957 # DECLARE_CYGWIN_DLL( DllMain );
5958 # #endif
5959 # HINSTANCE __hDllInstance_base;
5960 #
5961 # BOOL APIENTRY
5962 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
5963 # {
5964 # __hDllInstance_base = hInst;
5965 # return TRUE;
5966 # }
5967 # /* ltdll.c ends here */
5968 ])# _LT_AC_FILE_LTDLL_C
5969
5970
5971 # _LT_AC_TAGVAR(VARNAME, [TAGNAME])
5972 # ---------------------------------
5973 AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
5974
5975
5976 # old names
5977 AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL])
5978 AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
5979 AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
5980 AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
5981 AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
5982 AC_DEFUN([AM_PROG_LD], [AC_PROG_LD])
5983 AC_DEFUN([AM_PROG_NM], [AC_PROG_NM])
5984
5985 # This is just to silence aclocal about the macro not being used
5986 ifelse([AC_DISABLE_FAST_INSTALL])
5987
5988 AC_DEFUN([LT_AC_PROG_GCJ],
5989 [AC_CHECK_TOOL(GCJ, gcj, no)
5990 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
5991 AC_SUBST(GCJFLAGS)
5992 ])
5993
5994 AC_DEFUN([LT_AC_PROG_RC],
5995 [AC_CHECK_TOOL(RC, windres, no)
5996 ])
5997
5998 ############################################################
5999 # NOTE: This macro has been submitted for inclusion into #
6000 # GNU Autoconf as AC_PROG_SED. When it is available in #
6001 # a released version of Autoconf we should remove this #
6002 # macro and use it instead. #
6003 ############################################################
6004 # LT_AC_PROG_SED
6005 # --------------
6006 # Check for a fully-functional sed program, that truncates
6007 # as few characters as possible. Prefer GNU sed if found.
6008 AC_DEFUN([LT_AC_PROG_SED],
6009 [AC_MSG_CHECKING([for a sed that does not truncate output])
6010 AC_CACHE_VAL(lt_cv_path_SED,
6011 [# Loop through the user's path and test for sed and gsed.
6012 # Then use that list of sed's as ones to test for truncation.
6013 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6014 for as_dir in $PATH
6015 do
6016 IFS=$as_save_IFS
6017 test -z "$as_dir" && as_dir=.
6018 for lt_ac_prog in sed gsed; do
6019 for ac_exec_ext in '' $ac_executable_extensions; do
6020 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6021 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6022 fi
6023 done
6024 done
6025 done
6026 lt_ac_max=0
6027 lt_ac_count=0
6028 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
6029 # along with /bin/sed that truncates output.
6030 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6031 test ! -f $lt_ac_sed && break
6032 cat /dev/null > conftest.in
6033 lt_ac_count=0
6034 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6035 # Check for GNU sed and select it if it is found.
6036 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6037 lt_cv_path_SED=$lt_ac_sed
6038 break
6039 fi
6040 while true; do
6041 cat conftest.in conftest.in >conftest.tmp
6042 mv conftest.tmp conftest.in
6043 cp conftest.in conftest.nl
6044 echo >>conftest.nl
6045 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6046 cmp -s conftest.out conftest.nl || break
6047 # 10000 chars as input seems more than enough
6048 test $lt_ac_count -gt 10 && break
6049 lt_ac_count=`expr $lt_ac_count + 1`
6050 if test $lt_ac_count -gt $lt_ac_max; then
6051 lt_ac_max=$lt_ac_count
6052 lt_cv_path_SED=$lt_ac_sed
6053 fi
6054 done
6055 done
6056 SED=$lt_cv_path_SED
6057 ])
6058 AC_MSG_RESULT([$SED])
6059 ])