+Thu Nov 6 08:11:25 1997 Gordon Matzigkeit <gord@gnu.org>
+
+ * ltmain.in (link): Use libname_spec.
+
+ * ltconfig.in (pic_flag): Somehow, the HP-UX pic_flag (`+Z') was
+ dropped between libtool-1.0 and now. Add it back in. Reported by
+ Akim Demaille.
+ Integrated more patches for OS/2. From Jeff Freedman.
+ (libname_spec): New variable for OSes that don't require their
+ libraries to look like `libNAME.a'.
+
+ * ltmain.in (link): Only use global_symbol_pipe if it has been
+ defined. From Stephan Kulow.
+
+ * ltconfig.in (global_symbol_pipe): Protect C fragment under C++
+ compilers. From Stephan Kulow.
+
+ * Makefile.am ($(srcdir)/acinclude.m4,
+ $(srcdir)/demo/acinclude.m4): Change rules to use LN_S so that
+ they can be run on any system.
+
+ * ltconfig.in (archive_cmds): For NetBSD, don't include deplibs.
+ From Dieter Baron.
+
+ * ltmain.in (mkdir): Check that the directory doesn't exist before
+ we exit with error, so that we don't get races during parallel
+ builds. From H. J. Lu.
+ (fbsd_hideous_sh_bug): Apparently, some FreeBSD /bin/sh's have a
+ bug that will empty base_compile unless we do this dummy
+ assignment. From Marc van Kempen.
+
+Wed Oct 22 10:27:45 1997 Gordon Matzigkeit <gord@gnu.org>
+
+ * libtool.m4 (libtool_shared, libtool_static): Fixed logic error
+ to reenable override of libtool's defaults by setting
+ enable_shared or enable_static in configure.in. Reported by Tom
+ Tromey and Stephan Kulow.
+
+ * ltmain.in (link): Add explicit support for compiler options that
+ begin with `+'. Reported by Aubert Pierre.
+
Mon Oct 20 13:21:14 1997 Gordon Matzigkeit <gord@gnu.org>
* ltmain.in: Silly me. Change a bunch of occurances of "* $dir *"
* ltconfig.in (LD): Same as below.
* libtool.m4 (LD): Set LD if we discover an absolute path to GNU
- ld. This avoids unnecessary tests. Reported by Ulrich Drepper.
+ ld. This prevents breakage when `$CC -print-prog-name=ld' returns
+ an absolute directory name. Reported by Ulrich Drepper.
* ltconfig.in: Port to OS/2 using EMX. From Jeff Freedman.
- (double_quote_subst): sed substitution to protect metacharacters
- in variables that are evaled twice.
* ltmain.in (link): Use old_archive_from_new_cmds.
all: demo/Makefile.in demo/configure
# We use our own libtool.m4.
-$(srcdir)/aclocal.m4: acinclude.m4
-$(srcdir)/acinclude.m4:
+$(srcdir)/acinclude.m4: libtool.m4
rm -f $(srcdir)/acinclude.m4
- ln -s libtool.m4 $(srcdir)/acinclude.m4
+ cd $(srcdir) && $(LN_S) libtool.m4 acinclude.m4
+$(srcdir)/demo/acinclude.m4: libtool.m4
+ rm -f $(srcdir)/demo/acinclude.m4
+ cd $(srcdir)/demo && $(LN_S) ../libtool.m4 acinclude.m4
# Rules for rebuilding some of the demo source files.
$(srcdir)/demo/Makefile.in: demo/Makefile.am demo/configure.in demo/aclocal.m4
$(srcdir)/demo/aclocal.m4: demo/configure.in demo/acinclude.m4
cd $(srcdir)/demo && $(ACLOCAL)
-
-$(srcdir)/demo/acinclude.m4:
- rm -f $(srcdir)/demo/acinclude.m4
- ln -s ../libtool.m4 $(srcdir)/demo/acinclude.m4
NEWS - list of user-visible changes between releases of GNU libtool.
-New in 1.0e:
+New in 1.0f:
* Bug fixes.
* Portability fixes for Windows NT.
* Maybe use `_libs' as a temporary libtool directory instead of `.libs'
- in order to cope with MS-DOS filenames. See README-alpha.
+ in order to cope with MS-DOS filenames.
* New `-all-static' flag to prevent any dynamic linking. The regular
`-static' flag just prevents dynamic linking of libtool libraries.
* The `-rpath' flag can be used to hardcode absolute directories when
* Allow configure.in to change the defaults for AM_PROG_LIBTOOL's
`--enable-shared' and `--enable-static' flags by setting
the `enable_shared' or `enable_static' shell variables to `no'.
+* Refuse to create libtool libraries that don't begin with `lib'.
+ This allows us to correctly handle OSes that don't have the `lib'
+ prefix by default.
* Support for *-*-uts4* and *-*-os2*.
\f
New in 1.0:
dnl Process this file with autoconf to create configure.
AC_INIT(ltmain.in)
-AM_INIT_AUTOMAKE(libtool,1.0e)
+AM_INIT_AUTOMAKE(libtool,1.0f)
pkgdatadir='${datadir}/libtool'
AC_SUBST(pkgdatadir)
# Regenerate our acinclude.m4 only if it doesn't exist.
$(srcdir)/acinclude.m4:
rm -f $(srcdir)/acinclude.m4
- ln -s ../libtool.m4 $(srcdir)/acinclude.m4
+ cd $(srcdir) && $(LN_S) ../libtool.m4 acinclude.m4
# Don't build helldl on unsupported platforms.
helldl: $(helldl_OBJECTS) $(helldl_DEPENDENCIES)
## configuration script generated by Autoconf, you may include it under
## the same distribution terms that you use for the rest of that program.
-# serial 15 AM_PROG_LIBTOOL
+# serial 16 AM_PROG_LIBTOOL
AC_DEFUN(AM_PROG_LIBTOOL,
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_RANLIB])
AC_ARG_ENABLE(shared,
[ --enable-shared build shared libraries [default=yes]],
[if test "$enableval" = no; then
- enable_shared=no
+ libtool_enable_shared=no
else
- enable_shared=yes
+ libtool_enable_shared=yes
fi])
+test -n "$libtool_enable_shared" && enable_shared="$libtool_enable_shared"
libtool_shared=
test "$enable_shared" = no && libtool_shared=" --disable-shared"
AC_ARG_ENABLE(static,
[ --enable-static build static libraries [default=yes]],
[if test "$enableval" = no; then
- enable_static=no
+ libtool_enable_static=no
else
- enable_static=yes
+ libtool_enable_static=yes
fi])
+test -n "$libtool_enable_static" && enable_static="$libtool_enable_static"
libtool_static=
test "$enable_static" = no && libtool_static=" --disable-static"
case "$host_os" in
aix3* | aix4* | irix5* | irix6* | osf3* | osf4*)
# PIC is the default for these OSes.
- pic_flag=
+ ;;
+ os2*)
+ # We can build DLLs from non-PIC.
;;
*)
pic_flag='-fPIC'
;;
hpux9* | hpux10*)
- # FIXME is there a better link_static_flag that works with the bundled CC?
+ # Is there a better link_static_flag that works with the bundled CC?
wl='-Wl,'
link_static_flag='${wl}-a ${wl}archive'
+ pic_flag='+Z'
;;
irix5* | irix6*)
wl='-Wl,'
link_static_flag='-non_shared'
# PIC (with -KPIC) is the default.
- pic_flag=
;;
os2*)
hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
;;
- netbsd* | openbsd*)
+ netbsd*)
# Tested with NetBSD 1.2 ld
+ archive_cmds='$LD -Bshareable -o $lib$libobjs'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ openbsd*)
archive_cmds='$LD -Bshareable -o $lib$libobjs$deplibs'
hardcode_libdir_flag_spec='-R$libdir'
hardcode_direct=yes
;;
os2*)
- # FIXME: unsure of OS/2 hardcoding properties
- hardcode_direct=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
allow_undefined_flag=unsupported
- archive_cmds='echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;echo DATA >> $objdir/$libname.def;echo " SINGLE NONSHARED" >> $objdir/$libname.def;echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def$deplibs'
- old_archive_from_new_cmds='emximp -o $libname.a $objdir/$libname.def'
+ archive_cmds='echo "LIBRARY $libname INITINSTANCE" > $objdir/$libname.def;echo "DESCRIPTION \"$libname\"" >> $objdir/$libname.def;echo DATA >> $objdir/$libname.def;echo " SINGLE NONSHARED" >> $objdir/$libname.def;echo EXPORTS >> $objdir/$libname.def;emxexp$libobjs >> $objdir/$libname.def;$CC -Zdll -Zcrtdll -o $lib$libobjs $objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $objdir/$libname.a $objdir/$libname.def'
;;
osf3*)
pipe_works=no
$rm conftest*
cat > conftest.c <<EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
char nm_test_var;
void nm_test_func(){}
+#ifdef __cplusplus
+}
+#endif
main(){nm_test_var='a';nm_test_func();return(0);}
EOF
# PORTME Fill in your ld.so characteristics
library_names_spec=
+libname_spec='lib$name'
soname_spec=
postinstall_cmds=
finish_cmds=
os2*)
version_type=none
- library_names_spec='$libname.dll'
+ libname_spec='$name'
+ library_names_spec='$libname.dll $libname.a'
dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
;;
osf3* | osf4*)
echo "$ac_t$dynamic_linker"
test "$dynamic_linker" = no && can_build_shared=no
-# FIXME need to add library stripping features
+# FIXME add checks for striplib and old_striplib here.
# strip -x works for most platforms, though not for static libraries on NetBSD
# HP-UX requires "-r" for library stripping
striplib=
old_striplib=
-#echo $ac_n "checking for static library strip program... $ac_c" 1>&6
-#if test -n "$old_striplib"; then
-# echo "$ac_t$old_striplib" 1>&6
-#else
-# echo "$ac_t"none 1>&6
-#fi
-
-#if test "$can_build_shared" = yes; then
-# echo $ac_n "checking for shared library strip program... $ac_c" 1>&6
-#
-# if test -n "$striplib"; then
-# echo "$ac_t$striplib" 1>&6
-# else
-# echo "$ac_t"none 1>&6
-# fi
-#fi
-
-# Report the consequences.
+# Report the final consequences.
echo "checking if libtool supports shared libraries... $can_build_shared" 1>&6
echo $ac_n "checking whether to build shared libraries... $ac_c" 1>&6
for var in old_CC old_CFLAGS old_CPPFLAGS old_LD old_NM old_RANLIB \
old_LN_S AR CC LD LN_S NM reload_flag reload_cmds wl pic_flag \
link_static_flag no_builtin_flag export_dynamic_flag_spec \
- profile_flag_pattern library_names_spec soname_spec RANLIB \
+ profile_flag_pattern libname_spec library_names_spec soname_spec RANLIB \
old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
archive_cmds postinstall_cmds \
allow_undefined_flag finish_cmds global_symbol_pipe \
# Library versioning type.
version_type=$version_type
+# Format of library name prefix.
+libname_spec="$libname_spec"
+
# List of archive names. First name is the real one, the rest are links.
# The last name is the one that the linker finds with -lNAME.
library_names_spec="$library_names_spec"
# Only build a PIC object if we are building libtool libraries.
if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
# All platforms use -DPIC, to notify preprocessed assembler code.
$show "$base_compile$pic_flag -DPIC $srcfile"
if $run eval "$base_compile\$pic_flag -DPIC \$srcfile"; then :
esac
done
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
# Go through the arguments, transforming them on the way.
for arg
do
;;
# Some other compiler flag.
- -*)
+ -* | +*)
# Unknown arguments in both finalize_command and compile_command need
# to be aesthetically quoted because they are evaled later.
arg=`$echo "$arg" | sed "$sed_quote_subst"`
exit 1
fi
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
if test "$hardcode_direct" != unsupported; then
test -n "$old_library" && linklib="$old_library"
compile_command="$compile_command $dir/$linklib"
finalize_command="$finalize_command $dir/$linklib"
else
- # Here we assume that "$hardcode_minus_L" != unsupported.
- # This is valid on all known static and shared platforms.
compile_command="$compile_command -L$dir -l$name"
finalize_command="$finalize_command -L$dir -l$name"
fi
;;
*.la)
- libname=`$echo "$output" | sed 's/\.la$//'`
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case "$output" in
+ lib*) ;;
+ *)
+ $echo "$progname: libtool library \`$arg' must begin with \`lib'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ name=`$echo "$output" | sed -e 's/\.la$//' -e 's/^lib//'`
+ libname=`eval \\$echo \"$libname_spec\"`
# All the library-specific variables (install_libdir is set above).
library_names=
# Create the output directory, or remove our outputs if we need to.
if test -d $objdir; then
- $show "$rm $objdir/$libname.*"
- $run $rm $objdir/$libname.*
+ $show "$rm $objdir/$output $objdir/$libname.*"
+ $run $rm $objdir/$output $objdir/$libname.*
else
$show "$mkdir $objdir"
- $run $mkdir $objdir || exit $?
+ $run $mkdir $objdir
+ status=$?
+ if test $status -eq 0 || test -d $objdir; then :
+ else
+ exit $status
+ fi
fi
# Check to see if the archive will have undefined symbols.
fi
lib="$objdir/$realname"
- linknames=
- for link
- do
- linknames="$linknames $link"
- done
+ for link
+ do
+ linknames="$linknames $link"
+ done
# Use standard objects if they are PIC.
test -z "$pic_flag" && libobjs=`$echo "$libobjs " | sed -e 's/\.lo /.o /g' -e 's/ $//g'`
finalize_command=`$echo "$finalize_command " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
fi
- if test "$export_dynamic" = yes; then
+ if test "$export_dynamic" = yes && test -n "$global_symbol_pipe"; then
# Add our own program objects to the preloaded list.
dlprefiles=`$echo "$objs$dlprefiles " | sed -e 's/\.lo /.o /g' -e 's/ $//'`
nlist="$objdir/${output}.nm"
if test -d $objdir; then
- $show "rm -f $nlist ${nlist}T"
- $run rm -f "$nlist" "${nlist}T"
+ $show "$rm $nlist ${nlist}T"
+ $run $rm "$nlist" "${nlist}T"
else
$show "$mkdir $objdir"
- $run $mkdir $objdir || exit $?
+ $run $mkdir $objdir
+ status=$?
+ if test $status -eq 0 || test -d $objdir; then :
+ else
+ exit $status
+ fi
fi
for arg in $dlprefiles; do
count=`$echo "$wcout" | sed 's/^[ ]*\([0-9][0-9]*\).*$/\1/'`
(test "$count" -ge 0) 2>/dev/null || count=-1
else
- rm -f "$nlist"T
+ $rm "$nlist"T
count=-1
fi