+Thu Jun 5 10:40:15 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * ltconfig.in (allow_undefined_flag): New variable that implements
+ `-allow-undefined'.
+
+ * ltmain.sh.in (link): Accept new `-allow-undefined' flag when
+ building libtool libraries. This tells libtool to allow
+ unresolved symbols to exist in shared libraries. Basically, this
+ turns off shared libraries on AIX. Suggested by Ian Lance Taylor.
+
+Mon May 26 08:24:55 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * libtool.m4 (LD): On at least IRIX, many different flags need to
+ be propagated to the linker if they are part of the compiler
+ command line. Reported by Anthony Green.
+
Sat May 10 12:21:58 1997 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
* ltconfig.in: Trivial port to FreeBSD 3. From David Nugent.
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
-# serial 5 AM_PROG_LIBTOOL
+# serial 6 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_CC])
test "$silent" = yes && libtool_flags="$libtool_flags --silent"
test "$ac_cv_prog_gcc" = yes && libtool_flags="$libtool_flags --with-gcc"
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
[case "$host" in
*-*-irix6*)
- # For IRIX 6, ld needs -n32 if cc uses it.
- if echo " $CC $CFLAGS " | egrep -e '[ ]-n32[ ]' > /dev/null; then
- LD="${LD-ld} -n32"
- fi
+ for f in '-32' '-64' '-cckr' '-n32' '-mips1' '-mips2' '-mips3' '-mips4'; do
+ if echo " $CC $CFLAGS " | egrep -e "[ ]$f[ ]" > /dev/null; then
+ LD="${LD-ld} $f"
+ fi
+ done
;;
*-*-sco3.2v5*)
# See if the linker supports building shared libraries.
echo $ac_n "checking if $linker supports shared libraries... $ac_c" 1>&6
+allow_undefined_flag=
archive_cmds=
export_dynamic_flag=
hardcode_libdir_flag_spec=
# PORTME fill in a description of your system's linker (not GNU ld)
case "$host_os" in
aix3*)
+ allow_undefined_flag=unsupported
archive_cmds='/usr/ucb/nm$libobjs | egrep \" [BD] \" | sed \"s/^.* //\" > $lib.exp;$LD -o $objdir/$soname$libobjs -bE:$lib.exp -T512 -H512 -bM:SRE -lc$deplibs;$AR cru $lib $objdir/$soname'
# Note: this linker hardcodes the directories in LIBPATH if there
# are no directories specified by -L.
;;
aix4*)
+ allow_undefined_flag=unsupported
archive_cmds='/bin/nm -B$libobjs | egrep \" [BD] \" | sed \"s/^.* //\" > $lib.exp;$cc -o $objdir/$soname$libobjs ${wl}-bE:$lib.exp ${wl}-bM:SRE ${wl}-bnoentry$deplibs;$AR cru $lib $objdir/$soname'
hardcode_direct=yes
hardcode_minus_L=yes
;;
osf3* | osf4*)
- archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
+ allow_undefined_flag=' -expect_unresolved'
+ archive_cmds='$LD -shared${allow_undefined_flag} -o $lib -soname $soname -set_version $verstring$libobjs -lc$deplibs'
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
hardcode_libdir_separator=:
;;
archive_cmds='$archive_cmds'
postinstall_cmds='$postinstall_cmds'
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag='$allow_undefined_flag'
+
# Commands used to finish a libtool library installation in a directory.
finish_cmds='$finish_cmds'
# Go through the arguments, transforming them on the way.
cc="$nonopt"
args="$cc"
+ allow_undefined=no
compile_command="$cc"
finalize_command="$cc"
compile_shlibpath=
prevarg="$arg"
case "$arg" in
+ -allow-undefined) allow_undefined=yes ;;
+
-export-dynamic)
export_dynamic=yes
compile_command="$compile_command $export_dynamic_flag"
$run $mkdir $objdir || exit $?
fi
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if "$allow_undefined_flag" = unsupported; then
+ echo "$progname: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ build_libtool_libs=no
+ fi
+ else
+ # Clear the flag.
+ allow_undefined_flag=
+ fi
+
if test "$build_libtool_libs" = yes; then
# Get the real and link names of the library.
library_names=`eval echo \"$library_names_spec\"`
The following components of LINK-COMMAND are treated specially:
+ -allow-undefined allow a libtool library to reference undefined symbols
-export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
-LLIBDIR search LIBDIR for required installed libraries
-lNAME OUTPUT-FILE requires the installed library libNAME