# HG changeset patch # User Adam Chlipala # Date 1326235080 18000 # Node ID dae2c6fbf16cc12c37d7012faf43f07853697e51 # Parent ea131de361d97ae7ac986ccb2a416dacf93afb70 Make Ubuntu linking patch more general diff -r ea131de361d9 -r dae2c6fbf16c src/config.sml.in --- 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@"