diff -c2d libtool-20030731/doc/libtool.texi.orig libtool-20030731/doc/libtool.texi *** libtool-20030731/doc/libtool.texi.orig Tue Apr 22 18:01:21 2003 --- libtool-20030731/doc/libtool.texi Sun Aug 3 05:57:10 2003 *************** *** 1154,1159 **** and @samp{-Xcompiler @var{flag}}. ! If the @samp{-static} option is given, then a @samp{.o} file is built, ! even if libtool was configured with @samp{--disable-static}. Note that the @samp{-o} option is now fully supported. It is emulated --- 1154,1164 ---- and @samp{-Xcompiler @var{flag}}. ! 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 *************** *** 1297,1300 **** --- 1302,1313 ---- 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 diff -c2d libtool-20030731/ltmain.in.orig libtool-20030731/ltmain.in *** libtool-20030731/ltmain.in.orig Tue Jul 15 18:01:59 2003 --- libtool-20030731/ltmain.in Sun Aug 3 07:15:33 2003 *************** *** 401,405 **** --- 401,416 ---- ;; + -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 continue *************** *** 885,888 **** --- 896,908 ---- 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 *************** *** 892,895 **** --- 912,918 ---- if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static + # See comment for -static flag below, for more details. + compile_command="$compile_command $link_static_flag" + finalize_command="$finalize_command $link_static_flag" fi else *************** *** 1161,1168 **** case $arg in -all-static) ! if test -n "$link_static_flag"; then ! compile_command="$compile_command $link_static_flag" ! finalize_command="$finalize_command $link_static_flag" ! fi continue ;; --- 1184,1188 ---- case $arg in -all-static) ! # The effects of -all-static are defined in a previous loop. continue ;; *************** *** 1384,1387 **** --- 1404,1412 ---- ;; + -shared) + # The effects of -shared are defined in a previous loop. + continue + ;; + -static) # The effects of -static are defined in a previous loop. *************** *** 6143,6147 **** -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 COMPILE-COMMAND is a command to be used in creating a \`standard' object file --- 6168,6173 ---- -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only ! -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 *************** *** 6230,6233 **** --- 6256,6260 ---- -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]]