]> jfr.im git - irc/DALnet/bahamut.git/commitdiff
Let's check for local openssl installation first & rpath it too
authorKobi Shmueli <redacted>
Wed, 28 Nov 2018 23:59:50 +0000 (01:59 +0200)
committerKobi Shmueli <redacted>
Wed, 28 Nov 2018 23:59:50 +0000 (01:59 +0200)
1. If $HOME/openssl exists - we'll use it.
2. We'll add -Wl,-rpath,/path/to/openssl/lib to SSL_LDFLAGS so our binaries will be statically linked to the local openssl libs.

-Kobi.

configure.in

index 79b90945a80211e70f359be52988f8b3d8897d8c..68611dfb3158ab531f8129e923f11ad0283704a0 100644 (file)
@@ -427,7 +427,7 @@ if test "X$cf_enable_openssl" != "Xno" ; then
      cf_openssl_basedir="${cf_enable_openssl}"
   else
     dnl Do the auto-probe here.  Check some common directory paths.
-    for dirs in /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
+    for dirs in $HOME/openssl /usr/local/ssl /usr/pkg /usr/local /usr/lib /usr/lib/ssl\
                 /opt /opt/openssl /usr/local/openssl ; do
       if test -f "${dirs}/include/openssl/opensslv.h" ; then
         cf_openssl_basedir="${dirs}"
@@ -441,6 +441,9 @@ if test "X$cf_enable_openssl" != "Xno" ; then
     if test -f "${cf_openssl_basedir}/include/openssl/opensslv.h" ; then
       SSL_INCLUDES="-I${cf_openssl_basedir}/include"
       SSL_LDFLAGS="-L${cf_openssl_basedir}/lib"
+      if test "$cf_openssl_basedir" = "$HOME/openssl"; then
+        SSL_LDFLAGS="-L${cf_openssl_basedir}/lib -Wl,-rpath,${cf_openssl_basedir}/lib"
+      fi
     else
       dnl OpenSSL wasn't found in the directory specified.  Naughty
       dnl administrator...