+Sun Dec 8 14:39:04 1996 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * Release 0.7.
+
+ * Makefile.am (EXTRA_DIST): Add README-automake to the
+ distribution.
+
+ * ltmain.sh.in (link): When linking libtool libraries, use
+ standard objects if they are PIC. This prevents spurious warnings
+ about invalid suffixes on AIX.
+
+ * demo/Makefile.am: Rename libhell to libhello, so that we're not
+ quite as offensive.
+
+ * ltconfig.in: Remove unnecessary host validity checking.
+
+ * ltmain.sh.in: Don't force people to use libNAME.la: SOMETHING.la
+ is good enough (for consistency with *.a handling).
+
+Sat Dec 7 12:31:15 1996 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * ltmain.sh.in (link): Accept files ending in .a as standard
+ object files. Reported by Ulrich Drepper.
+ Remove support for creating profiled libraries (for now).
+ Transform all library objects into standard objects when linking a
+ program.
+
+ * ltconfig.in (thisdir): How embarrassing! An error in the regexp
+ for finding the directory component of the script path.
+
Thu Dec 5 14:19:21 1996 Gordon Matzigkeit <gord@gnu.ai.mit.edu>
+ * ltmain.sh.in (compile): Support `.S' (preprocessed assembler)
+ files. Reported by Anthony Green.
+
+ * libtoolize.in: Give clearer instrutions for how to update
+ aclocal.m4.
+
* ltconfig.in, ltmain.sh.in (link): Add support for creating
reloadable objects.
* New ChangeLog file for libtool-0.7, since I've totally rewritten
libtool.
+Fri Mar 15 14:21:15 1996 Gord Matzigkeit <gord@gnu.ai.mit.edu>
+
+ * For historical reasons: this is when I started writing libtool.
# Distribute ltconfig and ltmain.sh so that the demo directory works.
EXTRA_DIST = libtool.m4 libtoolize.in ltconfig ltconfig.in \
- ltmain.sh ltmain.sh.in
+ ltmain.sh ltmain.sh.in README-automake
CLEANFILES = libtool libtoolize
# Files in the demo subdirectory that go in the distribution.
-New in 0.6c:
+New in 0.6d:
* Total rewrite of libtool, along with a new model for library building.
* Completely rewritten documentation for the new paradigm.
* Sane handling of broken system linkers, such as the ones on AIX
libtool program.
* Automatic mode guessing, based on the command line.
* Support for new `-static' linking flag.
+* Support for stripping libraries during installation.
* Library version information is now passed on the command line, not
through a version file.
* Quote metacharacters in arguments to compile mode.
-* Find link_static_flag for every C compiler, currently at least
-native cc's for AIX, HP-UX, OSF/1.
-
-* Configure test for a library-stripping program (strip -x on NetBSD)
+* Find link_static_flag for every C compiler, (don't forget native
+cc's for HP-UX and OSF/1).
* Implement fuller support for profiled libraries (libNAME_p), and
resolve naming difficulties for debuggable libraries (libNAME_g on
Linux at least), old system 5 shared libraries (libNAME_s), etc.
-* We should use the C compiler rather than the linker to create shared
-libraries, if at all possible. This just involves looking up the $wl
-values for system compilers.
-
* What should be done about the difference between -fpic and -fPIC?
-* GCC docs imply that all rs6000 code is PIC. If that is true, then
-implement it.
+* GCC docs imply that all rs6000 code is PIC. See if it is true of
+any other processors (like maybe powerpc).
AC_INIT(ltmain.sh.in)
-AM_INIT_AUTOMAKE(libtool, 0.6d)
+AM_INIT_AUTOMAKE(libtool, 0.6e)
pkgdatadir='${datadir}/libtool'
AC_SUBST(pkgdatadir)
# A brief demonstration of using Automake with Libtool.
-AUTOMAKE_OPTIONS = foreign
+AUTOMAKE_OPTIONS = foreign no-dependencies
EXTRA_DIST = libinfo
compiler="$2"
echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
-compile_flags=
+pic_flag=
profile_flag_pattern=
wl=
link_static_flag=
if test "$with_gcc" = yes; then
- compile_flags='-fPIC -DPIC'
+ pic_flag='-fPIC'
profile_flag_pattern='-pg?'
wl='-Wl,'
link_static_flag='-static'
# PORTME Check for PIC flags for the system compiler.
case "$host" in
*-*-aix3* | *-*-aix4*)
- # FIXME compile_flags, or are all AIX platforms PIC?
- link_static_flags='-bnso -bI:/lib/syscalls.exp'
+ # FIXME All rs/6000 code is PIC, but is there any non-rs/6000 AIX platform?
+ link_static_flag='-bnso -bI:/lib/syscalls.exp'
;;
*-*-hpux10*)
- compile_flags='+Z -DPIC'
+ # FIXME link_static_flag?
+ pic_flag='+Z'
;;
*-*-osf3*)
- # FIXME - compile_flags, link_static_flag?
- compile_flags='-DPIC'
+ # FIXME - pic_flag, link_static_flag?
;;
*-*-solaris2*)
- compile_flags='-KPIC -DPIC'
+ pic_flag='-KPIC'
link_static_flag='-Bstatic'
;;
*-*-sunos4*)
- compile_flags='-PIC -DPIC'
+ pic_flag='-PIC'
link_static_flag='-Bstatic'
wl='-Qoption ld '
;;
- *-*-ultrix4*)
- wl='-Wl'
- can_build_shared=no
- ;;
-
*)
can_build_shared=no
;;
case "$host" in
rs6000-*-*)
# Yippee! All rs/6000 code is position-independent.
- compile_flags='-DPIC'
+ pic_flag=
;;
esac
-if test -n "$compile_flags"; then
- echo $ac_t "$compile_flags" 1>&6
- compile_flags=" $compile_flags"
+if test -n "$pic_flag"; then
+ echo $ac_t "$pic_flag" 1>&6
+ pic_flag=" $pic_flag"
else
echo $ac_t none 1>&6
fi
echo "$PACKAGE will compensate by relinking binaries at install time." 1>&2
fi
+reload_flag=
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+echo $ac_n "checking for $linker option to reload object files... $ac_c" 1>&6
+# PORTME Some linker may need a different reload flag.
+reload_flag='-r'
+echo $ac_t "$reload_flag"
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
# PORTME Fill in your ld.so characteristics
can_build_shared=yes
lib_names=
# The version of $progname that generated this script.
LTCONFIG_VERSION="$VERSION"
+# Whether or not to build libtool libraries.
+build_libtool_libs=$enable_shared
+
+# Whether or not to build old-style libraries.
+build_old_libs=$enable_static
+
# The host system.
host_alias="$host_alias"
host="$host"
# The linker used to build libraries.
LD='$LD'
+# How to create reloadable object files.
+reload_flag='$reload_flag'
+reload_cmds='$reload_cmds'
+
# How to pass a linker flag through the compiler.
wl='$wl'
-# Whether or not to build libtool libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build old-style libraries.
-build_old_libs=$enable_static
-
# Additional compiler flags for building library objects.
-compile_flags='$compile_flags'
+pic_flag='$pic_flag'
# Compiler flag to prevent dynamic linking.
link_static_flag='$link_static_flag'
default_mode=NONE
help="Try \`$progname --help' for more information."
ln_s="ln -s"
+cp_p="cp -p"
magic="%%%MAGIC variable%%%"
mkdir="mkdir"
+mv="mv -f"
objdir=.libs
rm="rm -f"
# Get the name of the library object.
libobj=`echo "$srcfile" | sed -e 's%^.*/%%' -e 's/\.c$/.lo/'`
case $libobj in
- *.lo) ;;
+ *.lo) obj=`echo "$libobj" | sed -e 's/\.lo$/.o/'` ;;
*)
echo "$progname: cannot determine name of library object from \`$srcfile'"
exit 1
exit 1
fi
- # Delete any old library object.
- $run $rm $libobj
+ # Delete any old library objects.
+ $run $rm $obj $libobj
+ trap "$run $rm $obj $libobj; exit 1" 1 2 15
- # Only use the compile flags if we are building libtool libraries.
+ # Only build a PIC object if we are building libtool libraries.
if test "$build_libtool_libs" = yes; then
- base_compile="$base_compile$compile_flags"
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ $show "$base_compile$pic_flag -DPIC $srcfile"
+ if eval "$run $base_compile$pic_flag -DPIC $srcfile"; then :
+ else
+ $run $rm $obj
+ exit 1
+ fi
+
+ # If we have no pic_flag, then copy the object into place and finish.
+ if test -z "$pic_flag"; then
+ $show "$ln_s $obj $libobj"
+ $run $ln_s $obj $libobj || $run $cp_p $obj $libobj
+ exit $?
+ fi
+
+ # Just move the object, then go on to compile the next one
+ $show "$mv $obj $libobj"
+ $run $mv $obj $libobj || exit 1
fi
- $show "$base_compile $srcfile -o $libobj"
- eval "$run $base_compile $srcfile -o $libobj"
+ # Compile the position-dependent object.
+ $show "$base_compile $srcfile"
+ if eval "$run $base_compile $srcfile"; then :
+ else
+ $run $rm $obj $libobj
+ exit 1
+ fi
+
+ # Symlink or copy the object file into library object, if no PIC.
+ if test "$build_libtool_libs" != yes; then
+ $show "$ln_s $obj $libobj"
+ $run $ln_s $obj $libobj || $run $cp_p $obj $libobj
+ exit $?
+ fi
- # Exit with the status of the compile command.
- exit $?
+ exit 0
;;
# libtool link mode
fi
libdir=
- . $file
+ . $dir/$file
if test -z "$libdir"; then
echo "$progname: \`$arg' contains no -rpath information" 1>&2
exit 1
fi
- oldobjs=
oldlib=
+ oldobjs=
case "$output" in
"")
echo "$progname: you must specify an output file" 1>&2
exit 1
;;
+ *.lo | *.o)
+ if test -n "$link_against_libtool_libs"; then
+ echo "$progname: error: cannot link libtool libraries into reloadable objects" 1>&2
+ exit 1
+ fi
+
+ if test -n "$deplibs"; then
+ echo "$progname: warning: \`-l' and \`-L' are ignored while creating objects" 1>&2
+ fi
+
+ if test -n "$install_libdir"; then
+ echo "$progname: warning: \`-rpath' is ignored while creating objects" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ echo "$progname: warning: \`-version-info' is ignored while creating objects" 1>&2
+ fi
+
+ case "$output" in
+ *.lo)
+ if test -n "$objs"; then
+ echo "$progname: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit 1
+ fi
+ libobj="$output"
+ obj=`echo "$output" | sed 's/\.lo$/.o/'`
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $run $rm $obj $libobj
+
+ # Create the old-style object.
+ reload_objs="$objs"`echo "$libobjs " | sed 's/\.lo /.o /g; s/\.l_o /._o /g; s/ $//g'`
+
+ output="$obj"
+ cmds=`eval echo \"$reload_cmds\"`
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ eval "$run $cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Exit if we aren't doing a library object file.
+ test -z "$libobj" && exit 0
+
+ if test "$build_libtool_libs" = yes && test -n "$pic_flag"; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs"
+ output="$libobj"
+ cmds=`eval echo \"$reload_cmds\"`
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ eval "$run $cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ else
+ # Just create a symlink.
+ $show "$ln_s $obj $libobj"
+ $run $ln_s $obj $libobj || $run $cp_p $obj $libobj || exit 1
+ fi
+
+ exit 0
+ ;;
+
*)
if test -n "$install_libdir"; then
echo "$progname: warning: \`-rpath' is ignored while linking programs" 1>&2
echo "$progname: warning: \`-version-info' is ignored while linking programs" 1>&2
fi
+ if test -n "$libobjs"; then
+ # FIXME - transform all the library objects into standard objects.
+ echo "$progname: warning: library object files should not be used to build programs" 1>&2
+ fi
+
if test -z "$link_against_libtool_libs" || test "$build_libtool_libs" != yes; then
# We have no uninstalled library dependencies, so finalize right now.
compile_command=`echo "$compile_command" | sed "s%-o $objdir/%-o %"`
# See if we need to build an old-fashioned archive.
if test "$build_old_libs" = "yes"; then
+ # Transform .lo files to .o (and don't forget ansi2knr .l_o to ._o).
+ oldobjs="$objs"`echo "$libobjs " | sed 's/\.lo /.o /g; s/\.l_o /._o /g; s/ $//g'`
case "$output" in
*.la)
# Now set the variables for building old libraries.
oldlib="$objdir/$libname.a"
- oldobjs="$libobjs"
;;
*)
oldlib="$output"
- oldobjs="$objs$libobjs"
$show "$rm $oldlib"
$run $rm $oldlib
;;
esac
- cmds=`eval echo \"$old_archive_cmds\"`
# Do each command in the archive commands.
+ cmds=`eval echo \"$old_archive_cmds\"`
IFS="${IFS= }"; save_ifs="$IFS"; IFS=';'
for cmd in $cmds; do
IFS="$save_ifs"
library_names=
old_library=
- . $file
+ # If there is no directory component, then add one.
+ case "$file" in
+ */*) . $file ;;
+ *) . ./$file ;;
+ esac
# Add the libdir to current_libdirs if it is the destination.
if test "$destdir" = "$libdir"; then
link_against_libtool_libs=
finalize_command=
- # If there is no pathname component, then add one.
+ # If there is no directory component, then add one.
case "$file" in
*/*) . $file ;;
*) . ./$file ;;
# Check to see that each library is installed.
libdir=
if test -f "$lib"; then
- . $lib
+ # If there is no directory component, then add one.
+ case "$lib" in
+ */*) . $lib ;;
+ *) . ./$lib ;;
+ esac
fi
libfile="$libdir/`echo "$lib" | sed 's%^.*/%%g'`"
if test -z "$libdir"; then
$show "$old_striplib $oldlib"
$run $old_striplib $oldlib || exit $?
else
- echo "$progname: warning: no library stripping program" 1>&2
+ echo "$progname: warning: no static library stripping program" 1>&2
fi
fi
if test -n "$current_libdirs"; then
# Maybe just do a dry run.
- test -n "$run" && current_libdirs="-n $current_libdirs"
+ test -n "$run" && current_libdirs=" -n$current_libdirs"
exec $0 --finish$current_libdirs
exit 1
fi
option is required.
If OUTPUT-FILE ends in \`.a', then a standard library is created using \`ar'
-and \`ranlib'. Otherwise, an executable program is created.
+and \`ranlib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.o', then a reloadable object file is
+created, otherwise an executable program is created.
EOF
;;