+2003-03-31 Keith Packard <keithp@keithp.com>
+
+ * ltmain.in: New flag -version-number to be used for maintaining
+ compatability with a previously non-Libtool versioning scheme.
+ * doc/libtool.texi: Document it.
+
2003-03-31 Naofumi Yasufuku <naofumi@yasufuku.net>
* ltmain.in (win32_libid): Fixed sed expression error in
(@pxref{Versioning}). Do @strong{not} use this flag to specify package
release information, rather see the @samp{-release} flag.
+@item -version-number @var{major}[:@var{minor}[:@var{revision}]]
+If @var{output-file} is a libtool library, compute interface version
+information so that the resulting library uses the specified major, minor and
+revision numbers. This is designed to permit libtool to be used with
+existing projects where identical version numbers are already used across
+operating systems. New projects should use the @samp{-version-info} flag
+instead.
+
@item -Wl,@var{flag}
@itemx -Xlinker @var{flag}
Pass a linker specific flag directly to the linker.
temp_rpath=
thread_safe=no
vinfo=
+ vinfo_number=no
# We need to know -static, to get the right output filenames.
for arg
prev=vinfo
continue
;;
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
-Wc,*)
args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
fi
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2
fi
if test -n "$release"; then
fi
if test -n "$vinfo"; then
- $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+ $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2
fi
if test -n "$release"; then
exit 1
fi
- current="$2"
- revision="$3"
- age="$4"
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$2"
+ number_minor="$3"
+ number_revision="$4"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows)
+ current=`expr $number_major + $number_minor`
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ current=`expr $number_major + $number_minor - 1`
+ age="$number_minor"
+ revision="$number_minor"
+ ;;
+ esac
+ ;;
+ no)
+ current="$2"
+ revision="$3"
+ age="$4"
+ ;;
+ esac
# Check that each of the things are valid numbers.
case $current in