From 00bac387b3fc93da6c785a46b4e2dc7843131fa6 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sun, 13 Jul 2014 20:14:02 -0600 Subject: [PATCH] Force libtool to use runtime linking on AIX so that it installs the plugins as .so files and not .a files. --- configure | 7 +++++++ configure.ac | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 3f888b83f..32e6797df 100755 --- a/configure +++ b/configure @@ -6357,6 +6357,13 @@ case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac +case "$host_os" in +aix4.[23]|aix4.[23].*|aix[5-9]*) + LDFLAGS="${LDFLAGS}${LDFLAGS+ }-Wl,-brtl" + ;; +esac + + case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 diff --git a/configure.ac b/configure.ac index 6c793c65b..22d449c63 100644 --- a/configure.ac +++ b/configure.ac @@ -1502,10 +1502,26 @@ if test "$enable_static" = "no"; then fi dnl -dnl Libtool setup, we require libtool 2.2.6b or higher +dnl Set host variables and m4 macro dir dnl AC_CANONICAL_HOST AC_CONFIG_MACRO_DIR([m4]) + +dnl +dnl On AIX we need to force libtool to install .so files for the plugins +dnl instead of a .a file that contains the .so. We do this by enabling +dnl runtime linking (where the .so file is installed). This must happen +dnl before the call to LT_INIT +dnl +case "$host_os" in +aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) + LDFLAGS="${LDFLAGS}${LDFLAGS+ }-Wl,-brtl" + ;; +esac + +dnl +dnl Libtool init, we require libtool 2.2.6b or higher +dnl LT_PREREQ([2.2.6b]) LT_INIT([dlopen]) -- 2.40.0