summaryrefslogtreecommitdiff
path: root/src/config.sml.in
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-01-10 17:38:00 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2012-01-10 17:38:00 -0500
commit8405ff3d49c2bed227b68d1d7c557b8d447cfad9 (patch)
tree59d262f14fd23a9e8353ad938ca6d208e9edd621 /src/config.sml.in
parent8c3377398239860b510401a600b475eebca615d6 (diff)
Make Ubuntu linking patch more general
Diffstat (limited to 'src/config.sml.in')
-rw-r--r--src/config.sml.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/config.sml.in b/src/config.sml.in
index 03f3cc71..51d572eb 100644
--- a/src/config.sml.in
+++ b/src/config.sml.in
@@ -18,9 +18,15 @@ 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 openssl =
+ let
+ val tokens = String.tokens Char.isSpace openssl
+ in
+ if List.exists (fn s => s = "-lssl") tokens then
+ String.concatWith " " (List.filter (fn s => s <> "-lssl") tokens @ ["-lssl"])
+ else
+ openssl
+ end
val pgheader = "@PGHEADER@"
val msheader = "@MSHEADER@"