--- configure.in.old	2010-02-09 23:17:51.000000000 +0100
+++ configure.in	2010-02-25 12:42:56.484682369 +0100
@@ -101,7 +101,7 @@
 AC_CHECK_LIB(crypto, CRYPTO_lock, [], [AC_MSG_WARN([ *** LibCrypto may be required for *BSD ***])])
 AC_CHECK_HEADER([openssl/ssl.h], 
   [AC_CHECK_LIB(ssl, main,
-    [AC_DEFINE(HAVE_LIBSSL, 1, [Found OpenSSL Library]) LDFLAGS="$LDFLAGS -lssl -lcrypto" check_libssl="true"],
+    [AC_DEFINE(HAVE_LIBSSL, 1, [Found OpenSSL Library]) LIBS="$LIBS -lssl -lcrypto" check_libssl="true"],
     [AC_MSG_WARN([ *** OpenSSL library required for SSL support. ***
 
       Many of the Medusa modules depend on the OpenSSL library and header files. If
--- configure.in.old	2010-02-25 12:46:43.156690552 +0100
+++ configure.in	2010-02-25 12:47:31.979711517 +0100
@@ -868,7 +868,8 @@
 esac
 
 AC_SUBST([MODULE_LDFLAGS])
-LDFLAGS="$LDFLAGS $RDYNAMIC $LIBDL $EXTRA_LIBS"
+LDFLAGS="$LDFLAGS $RDYNAMIC $EXTRA_LIBS"
+LIBS="$LIBS $LIBDL"
 
 test "$prefix" = NONE && prefix=${ac_default_prefix}
 _default_mod_path="${prefix}/lib/medusa/modules"
