branch: master
commit 64ecee50f576ddbd70e914546587216871109253
Author: Ileana Dumitrescu <ileanadumitresc...@gmail.com>
AuthorDate: Sat Jan 18 15:46:34 2025 +0200

    ltoptions.m4: Make aix-soname assignment more clear
    
    The option --with-aix-soname=svr4 does not work the same as using
    LT_INIT([aix-soname=svr4]), since the configure script is reordered
    depending on which is used. The reordering causes 'enable_shared'
    to not be set before processing for 'aix-soname' when using LT_INIT.
    
    For LT_INIT([aix-soname=svr4]) to be set as intended, 'shared' must
    be set before 'aix-soname=svr4', like LT_INIT([shared aix-soname=svr4]).
    
    * m4/ltoptions.m4: Warn user if 'enable_shared' has not been set when
      setting 'aix-soname' and add configuration messages to show which
      variant of shared library versioning has been set for 'aix-soname'.
    * doc/libtool.texi: Update to specify need for 'shared' to be used
      before 'aix-soname' for LT_INIT.
---
 doc/libtool.texi | 3 +++
 m4/ltoptions.m4  | 8 ++++++++
 2 files changed, 11 insertions(+)

diff --git a/doc/libtool.texi b/doc/libtool.texi
index ce0212ed..21bb8908 100644
--- a/doc/libtool.texi
+++ b/doc/libtool.texi
@@ -2332,6 +2332,9 @@ kinds of shared archives are built. The @code{.la} 
pseudo-archive specifies
 one or the other depending on whether @option{-brtl} is specified in
 @code{LDFLAGS} when the library is built.
 
+When using @code{LT_INIT}, the @code{shared} option must be set before the
+@code{aix-soname=(svr4|both)} option to ensure shared libraries are built.
+
 @item disable-fast-install
 Change the default behaviour for @code{LT_INIT} to disable
 optimization for fast installation.  The user may still override this
diff --git a/m4/ltoptions.m4 b/m4/ltoptions.m4
index 7e4d3604..925415ad 100644
--- a/m4/ltoptions.m4
+++ b/m4/ltoptions.m4
@@ -370,8 +370,16 @@ power*-*-aix[[5-9]]*,yes)
     fi
   fi
   ;;
+power*-*-aix[[5-9]]*,'')
+  AC_MSG_WARN([for $host, specify if building shared libraries for versioning 
(svr4|both)])
+  AC_MSG_CHECKING([which variant of shared library versioning to provide])
+  with_aix_soname=aix
+  AC_MSG_RESULT([(default) $with_aix_soname])
+  ;;
 *)
+  AC_MSG_CHECKING([which variant of shared library versioning to provide])
   with_aix_soname=aix
+  AC_MSG_RESULT([(default) $with_aix_soname])
   ;;
 esac
 

Reply via email to