summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xconfigure2
-rw-r--r--m4/ax_check_openssl.m42
-rw-r--r--src/config.sml.in6
3 files changed, 8 insertions, 2 deletions
diff --git a/configure b/configure
index aab4b47e..2ea8e51c 100755
--- a/configure
+++ b/configure
@@ -12348,7 +12348,7 @@ $as_echo_n "checking for openssl/ssl.h in $ssldir... " >&6; }
if test -f "$ssldir/include/openssl/ssl.h"; then
OPENSSL_INCLUDES="-I$ssldir/include"
OPENSSL_LDFLAGS="-L$ssldir/lib"
- OPENSSL_LIBS=" -lcrypto -lssl"
+ OPENSSL_LIBS="-lssl -lcrypto"
found=true
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
diff --git a/m4/ax_check_openssl.m4 b/m4/ax_check_openssl.m4
index e653e8b9..065fff85 100644
--- a/m4/ax_check_openssl.m4
+++ b/m4/ax_check_openssl.m4
@@ -79,7 +79,7 @@ AC_DEFUN([AX_CHECK_OPENSSL], [
if test -f "$ssldir/include/openssl/ssl.h"; then
OPENSSL_INCLUDES="-I$ssldir/include"
OPENSSL_LDFLAGS="-L$ssldir/lib"
- OPENSSL_LIBS=" -lcrypto -lssl"
+ OPENSSL_LIBS="-lssl -lcrypto"
found=true
AC_MSG_RESULT([yes])
break
diff --git a/src/config.sml.in b/src/config.sml.in
index 1d7e450f..03f3cc71 100644
--- a/src/config.sml.in
+++ b/src/config.sml.in
@@ -14,8 +14,14 @@ val libJs = OS.Path.joinDirFile {dir = lib,
val ccompiler = "@CC@"
val ccArgs = "@CCARGS@"
+
val openssl = "@OPENSSL_LDFLAGS@ @OPENSSL_LIBS@"
+(* Something is rotten in the state of Ubuntu 11.10, so here's a manual fix that I hope doesn't break other platforms. *)
+val openssl = case String.tokens Char.isSpace openssl of
+ ["-lssl", "-lcrypto"] => "-lcrypto -lssl"
+ | _ => openssl
+
val pgheader = "@PGHEADER@"
val msheader = "@MSHEADER@"
val sqheader = "@SQHEADER@"