From 399793095b89e36faee7ae46f8c56084965ada46 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sun, 18 Dec 2005 12:26:53 +0000 Subject: [PATCH] * ltmain.in: Change semantics of `--tag=disable-static' and `--tag=disable-shared': The last one given wins now, both override the default setting inherited by other `--tag' arguments, even if passed later on the command line. Still make sure we do not disable both kinds by falling back to static libraries. --- ChangeLog | 7 +++++++ ltmain.in | 19 ++++++++++++++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1cfabdb44..ef9aafe1d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2005-12-18 Marc Espie + * ltmain.in: Change semantics of `--tag=disable-static' and + `--tag=disable-shared': The last one given wins now, both + override the default setting inherited by other `--tag' + arguments, even if passed later on the command line. + Still make sure we do not disable both kinds by falling back + to static libraries. + * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER) [ openbsd ] : Set to `/usr/lib' only. diff --git a/ltmain.in b/ltmain.in index 1cac54161..10a434a9c 100644 --- a/ltmain.in +++ b/ltmain.in @@ -351,6 +351,8 @@ func_extract_archives () # Darwin sucks eval std_shrext=\"$shrext_cmds\" +disable_libs=no + # Parse our command line options once, thoroughly. while test "$#" -gt 0 do @@ -503,6 +505,18 @@ if test -n "$prevopt"; then exit $EXIT_FAILURE fi +case $disable_libs in +no) + ;; +shared) + build_libtool_libs=no + build_old_libs=yes + ;; +static) + build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` + ;; +esac + # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. @@ -6748,12 +6762,11 @@ exit $? # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared -build_libtool_libs=no -build_old_libs=yes +disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static -build_old_libs=`case $build_libtool_libs in yes) $echo no;; *) $echo yes;; esac` +disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: -- 2.47.3