Mercurial > urweb
changeset 1673:dae2c6fbf16c
Make Ubuntu linking patch more general
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 10 Jan 2012 17:38:00 -0500 |
parents | ea131de361d9 |
children | 4cacced4a6da |
files | src/config.sml.in |
diffstat | 1 files changed, 9 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/config.sml.in Tue Jan 10 17:32:48 2012 -0500 +++ b/src/config.sml.in Tue Jan 10 17:38:00 2012 -0500 @@ -18,9 +18,15 @@ 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@"