From d1c83742cb5aade7061cd60ac0de16c07c297ef4 Mon Sep 17 00:00:00 2001
From: "Christopher J. Morrone" <morrone2@llnl.gov>
Date: Thu, 16 Jun 2005 18:23:45 +0000
Subject: [PATCH] Better hack around the AIX libtool bug.  Should allow RPMs to
 build.

---
 auxdir/x_ac_slurm_ssl.m4 | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/auxdir/x_ac_slurm_ssl.m4 b/auxdir/x_ac_slurm_ssl.m4
index 6e566dfd0a9..1454d63464c 100644
--- a/auxdir/x_ac_slurm_ssl.m4
+++ b/auxdir/x_ac_slurm_ssl.m4
@@ -24,16 +24,21 @@ AC_DEFUN([X_AC_SLURM_WITH_SSL], [
   AC_SUBST(SSL_LIBS)
   AC_SUBST(SSL_CPPFLAGS)
   
-  if test "x$ac_have_aix" = "xyes"; then
-  	SSL_LIBS="-lcrypto-static"
-  else
-  	SSL_LIBS="-lcrypto"
-  fi
+  SSL_LIBS="-lcrypto"
   
   AC_ARG_WITH(ssl,
     AC_HELP_STRING([--with-ssl=PATH],[Specify path to OpenSSL installation]),
-    [ tryssldir=$withval ]
-  )
+    [
+  	tryssldir=$withval
+
+  	# Hack around a libtool bug on AIX.
+  	# libcrypto is in a non-standard library path on AIX (/opt/freeware
+  	# which is specified with --with-ssl), and libtool is not setting
+  	# the correct runtime library path in the binaries.
+  	if test "x$ac_have_aix" = "xyes"; then
+  		SSL_LIBS="-lcrypto-static"
+  	fi
+    ])
   
   saved_LIBS="$LIBS"
   saved_LDFLAGS="$LDFLAGS"
-- 
GitLab