specified in compile mode.
Do not make a static library when `-shared' is specified in link
mode.
* doc/libtool.texi (Compile mode): Document it.
* NEWS: Updated.
2003-10-07 Ralph Schleicher <rs@nunatak.allgaeu.org>
+ * ltmain.in: Do not create `.o' objects when `-shared' is
+ specified in compile mode.
+ Do not make a static library when `-shared' is specified in link
+ mode.
+ * doc/libtool.texi (Compile mode): Document it.
+ * NEWS: Updated.
+
* doc/libtool.texi (Compile mode): Be more specific about the
effect of `-static'.
* ltmain.in: Do not create `.lo' objects when `-static' is
New in 1.5b: 2003-??-??; CVS version 1.5a, Libtool team:
* Shared objects (.lo) are no longer created when `-static' is passed in
compile mode.
+* New compile mode option `-shared' prevents creation of static objects (.o).
+* New link mode option `-shared' creates only shared libraries at link time.
+* If you configure libtool with --disable-shared (or if libtool does not
+ support shared libraries on your platform) trying to build a library using
+ `-shared' is a fatal error.
* libtoolize installs libtool.m4 (and ltdl.m4 if used) to AC_CONFIG_M4_DIR.
* Mode inferrence removed, shorthand for choosing modes added.
* Specifying -allow-undefined is now an error.
If the @samp{-static} option is given, then only a @samp{.o} file is
built, even if libtool was configured with @samp{--disable-static}.
+If the @samp{-shared} option is given, then no @samp{.o} file is built,
+even if libtool was configured with @samp{--enable-static}. Libtool
+will signal an error if it was configured with @samp{--disable-shared},
+or if the host does not support shared libraries.
+
Note that the @samp{-o} option is now fully supported. It is emulated
on the platforms that don't support it (by locking and moving the
objects), so it is really easy to use libtool, just with minor
@var{dependency_libs}, so that, whenever the library is linked into a
program, @var{libdir} will be added to its run-time path.
+@item -shared
+If @var{output-file} is a program, then link it against any
+uninstalled shared libtool libraries (this is the default behavior).
+If @var{output-file} is a library, then only create a shared library.
+In the later case, libtool will signal an error if it was configured
+with @samp{--disable-shared}, or if the host does not support shared
+libraries.
+
@item -static
If @var{output-file} is a program, then do not link it against any
uninstalled shared libtool libraries. If @var{output-file} is a
continue
;;
+ -shared)
+ if test "$build_libtool_libs" != yes; then
+ $echo "$modename: can not build a shared library" 1>&2
+ $echo "Fatal configuration error." 1>&2
+ exit 1
+ fi
+ build_old_libs=no
+ continue
+ ;;
+
-static)
build_libtool_libs=no
build_old_libs=yes
for arg
do
case $arg in
+ -shared)
+ if test "$build_libtool_libs" != yes; then
+ $echo "$modename: can not build a shared library" 1>&2
+ $echo "Fatal configuration error." 1>&2
+ exit 1
+ fi
+ build_old_libs=no
+ break
+ ;;
-all-static | -static)
if test "X$arg" = "X-all-static"; then
if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
continue
;;
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
-static)
# The effects of -static are defined in a previous loop.
# We used to do the same as -all-static on platforms that
-o OUTPUT-FILE set the output file name to OUTPUT-FILE
-prefer-pic try to building PIC objects only
-prefer-non-pic try to building non-PIC objects only
- -static always build a \`.o' file suitable for static linking
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
COMPILE-COMMAND is a command to be used in creating a \`standard' object file
from the given SOURCEFILE.
-release RELEASE specify package release information
-rpath LIBDIR the created library will eventually be installed in LIBDIR
-R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
-static do not do any dynamic linking of libtool libraries
-version-info CURRENT[:REVISION[:AGE]]
specify library version info [each variable defaults to 0]