-New in 0.6a:
+New in 0.6b:
* Total rewrite of libtool, along with a new model for library building.
-* Updated documentation for the new paradigm.
-* Proper handling of broken system linkers, such as the ones on AIX
+* Completely rewritten documentation for the new paradigm.
+* Sane handling of broken system linkers, such as the ones on AIX
and HP-UX.
* configure mode is now a separate program, `ltconfig'
-* Libtool only supports `compile', `link', and `install' modes, via
- the `--mode' command line option.
+* The libinfo helper script has been incorporated into the main
+ libtool program.
* Automatic mode guessing, based on the command line.
+* Support for new `-static' linking flag.
+* Quote metacharacters in arguments to compile mode.
\f
-New in 0.6: (never released)
-* Optimization to cut `libtool archive' execution time by a factor of 5.
-* New AM_REPLACE_FUNCS macro to generate LTLIBOBJS as well as LIBOBJS.
- From Karl Berry.
-* Renamed ABOUT-LIBS to ABOUT-LIBTOOL. From Karl Berry.
-* Include the generated libtool script in the distribution.
-* Quote metacharacters in arguments to `libtool compile'.
-* Bug fixes.
-* Removed `link' and `install-progs' modes because they cannot be
- correctly implemented. See (libtool)Linking Against Pseudo-Libraries.
+Version 0.6 was never released.
\f
New in 0.5:
* Disabled install-progs until next version, when it will be correctly
--no-verify) verify_host=no ;;
- --version) echo "$PROGRAM - GNU $PACKAGE $VERSION"; exit 0 ;;
+ --version) echo "$PROGRAM (GNU $PACKAGE) $VERSION"; exit 0 ;;
--with-gcc) with_gcc=yes ;;
old_postinstall_cmds='chmod 644 $oldlib'
# If RANLIB is not set, then run the test.
-if test -z "$RANLIB"; then
+if test "${RANLIB+set}" != "set"; then
result=no
echo $ac_n "checking for ranlib... $ac_c" 1>&6
echo $ac_t "$with_gcc" 1>&6
fi
-echo $ac_n "checking PIC compiler flags... $ac_c" 1>&6
+# Allow CC to be a program name with arguments.
+set dummy $CC
+compiler="$2"
+
+echo $ac_n "checking for $compiler option to produce PIC... $ac_c" 1>&6
compile_flags=
profile_flag_pattern=
wl=
wl='-Qoption ld '
;;
+ *-*-ultrix4*)
+ wl='-Wl'
+ can_build_shared=no
+ ;;
+
*)
can_build_shared=no
;;
echo $ac_t none 1>&6
fi
-echo $ac_n "checking static linking compiler flag... $ac_c" 1>&6
+echo $ac_n "checking for $compiler option to statically link programs... $ac_c" 1>&6
if test -n "$link_static_flag"; then
echo $ac_t "$link_static_flag" 1>&6
else
# See if we're really using GNU ld.
test -z "$LD" && LD="ld"
with_gnu_ld=no
-linker="$LD"
+# Allow LD to be a program name with arguments.
+set dummy $LD
+linker="$2"
echo $ac_n "checking if $LD is GNU ld... $ac_c" 1>&6
if $LD --version 2>&1 | egrep 'with BFD' > /dev/null; then
with_gnu_ld=yes
;;
--version)
- echo "$PROGRAM - GNU $PACKAGE $VERSION"
+ echo "$PROGRAM (GNU $PACKAGE) $VERSION"
exit 0
;;
esac
fi
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$mode' for more information."
+
# These modes are in order of execution frequency so that they run quickly.
case "$mode" in
# libtool compile mode
compile_command="$cc"
finalize_command="$cc"
deplibs=
- libdir=
+ install_libdir=
libobjs=
link_against_libtool_libs=
link_static=
prev=
prevarg=
temp_rpath=
- vfile=
+ vinfo=
# Maybe set the library names to libNAME_p.a if we are doing profiling.
-o) prev=output ;;
- -rpath) prev=libdir ;;
+ -rpath) prev=install_libdir carg= farg= ;;
-static)
build_libtool_libs=no
carg="$farg"
;;
- -version-file) prev=vfile ;;
+ -version-file)
+ echo "$progname: \`-version-file' has been replaced by \`-version-info'" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ ;;
+
+ -version-info) prev=vinfo carg= farg= ;;
-*) cc="$cc $arg" ;; # Some other compiler flag.
- *.o)
+ # Automake's ansi2knr support code uses the "._o" and ".l_o" object
+ # suffixes.
+ *.o | *._o)
# A standard object.
objs="$objs $arg"
;;
- *.lo)
+ *.lo | *.l_o)
# A library object.
libobjs="$libobjs $arg"
;;
;;
esac
;;
+
+ *)
+ echo "$progname: unknown file suffix for \`$arg'" 1>&2
+ echo "$help"
+ exit 1
+ ;;
esac
args="$args $arg"
*.a)
# Old archive.
build_old_libs=yes
+
+ if test -n "$install_libdir"; then
+ echo "$progname: warning: \`-rpath' is ignored while linking old-style libraries" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ echo "$progname: warning: \`-version-info' is ignored while linking old-style libraries" 1>&2
+ fi
;;
lib?*.la)
exit 1
fi
- # How the heck do we write a wrapper for a shared library?
+ # How the heck are we supposed to write a wrapper for a shared library?
if test -n "$link_against_libtool_libs"; then
echo "$progname: libtool libraries may not depend on uninstalled libraries" 1>&2
exit 1
fi
- # FIXME - screen out invalid options (such as link_static)
-
- if test -z "$libdir"; then
+ if test -z "$install_libdir"; then
echo "$progname: you must specify an installation directory with \`-rpath'" 1>&2
exit 1
fi
- if test -z "$vfile"; then
- # Default version line: 0 0 0
- current=0
- age=0
- revision=0
+ current=0
+ revision=0
+ age=0
- elif test -r "$vfile"; then
- # Get version information
- line=`egrep "^$libname[ ]" "$vfile"`
- set dummy $line
+ # Parse the version information argument.
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo
+ IFS="$save_ifs"
- if test -z "$2"; then
- echo "$progname: no version information for \`$libname' in \`$vfile'" 1>&2
- exit 1
- fi
+ if test -n "$5"; then
+ echo "$progname: too many parameters to \`-version-info'" 1>&2
+ echo "$help" 1>&2
+ exit 1
+ fi
- current="$3"
- age="$4"
- revision="$5"
+ test -n "$2" && current="$2"
+ test -n "$3" && revision="$3"
+ test -n "$4" && age="$4"
- if test -z "$revision"; then
- echo "$progname: \`$vfile' must specify a CURRENT, AGE, and REVISION for \`$libname'" 1>&2
- exit 1
- fi
+ # Check that each of the things are valid numbers.
+ case "$current" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ echo "$progname: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ echo "$progname: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
- if test "$age" -gt "$current"; then
- echo "$progname: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
- echo "\`$vfile' contains invalid version information for \`$libname'" 1>&2
- exit 1
- fi
- else
- echo "$progname: version file \`$vfile' is not readable" 1>&2
- exit 1
+ case "$revision" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ echo "$progname: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ echo "$progname: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case "$age" in
+ 0 | [1-9] | [1-9][0-9]*) ;;
+ *)
+ echo "$progname: AGE \`$age' is not a nonnegative integer" 1>&2
+ echo "$progname: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test $age -gt $current; then
+ echo "$progname: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+ echo "$progname: \`$vinfo' is not valid version information" 1>&2
+ exit 1
fi
# Calculate the version variables.
;;
*)
+ if test -n "$install_libdir"; then
+ echo "$progname: warning: \`-rpath' is ignored while linking programs" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ echo "$progname: warning: \`-version-info' is ignored while linking 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 %"`
revision=$revision
# Directory that this library needs to be installed in:
-libdir='$libdir'
+libdir='$install_libdir'
EOF
fi
;;
fi
libfile="$libdir/`echo "$lib" | sed 's%^.*/%%g'`"
if test -z "$libdir"; then
- echo "$progname: warning: \`$lib' contains no libdir information"
+ echo "$progname: warning: \`$lib' contains no -rpath information"
elif test -f "$libfile"; then :
else
echo "$progname: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
esac
echo "$progname: invalid operation mode \`$mode'" 1>&2
- echo "$help" 1>&2
+ echo "$generic_help" 1>&2
exit 1
fi # test -z "$show_help"
-o OUTPUT-FILE create OUTPUT-FILE from the specified objects
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-static do not do any dynamic linking or shared library creation
- -version-file VERFILE
- find library version information in VERFILE
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
All other options (arguments beginning with \`-') are ignored.
object files.
If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only
-library objects (\`.lo' files) may be specified, and the \`-rpath' option is
-required.
+library objects (\`.lo' or \`.l_o' files) may be specified, and the \`-rpath'
+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.