Index: auto.def
==================================================================
--- auto.def
+++ auto.def
@@ -119,11 +119,11 @@
 
 # Helper for openssl checking
 proc check-for-openssl {msg {cflags {}}} {
     msg-checking "Checking for $msg..."
     set rc 0
-    msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto}] {
+    msg-quiet cc-with [list -cflags $cflags -libs {-lssl -lcrypto -ldl}] {
         if {[cc-check-includes openssl/ssl.h] && [cc-check-functions SSL_new]} {
             incr rc
         }
     }
     if {$rc} {
@@ -168,11 +168,11 @@
     }
     if {$found} {
         define FOSSIL_ENABLE_SSL
         define-append EXTRA_CFLAGS $cflags
         define-append EXTRA_LDFLAGS $ldflags
-        define-append LIBS -lssl -lcrypto
+        define-append LIBS -lssl -lcrypto -ldl
         msg-result "HTTP support enabled"
 
         # Silence OpenSSL deprecation warnings on Mac OS X 10.7.
         if {[string match *-darwin* [get-define host]]} {
             if {[cctest -cflags {-Wdeprecated-declarations}]} {

