Index: /trunk/configure
===================================================================
--- /trunk/configure	(revision 23546)
+++ /trunk/configure	(revision 23547)
@@ -107,4 +107,5 @@
 GENISOIMAGE="genisoimage"
 MKISOFS="mkisofs"
+INCCRYPTO=""
 LIBCRYPTO="-lcrypto"
 LIBPTHREAD="-lpthread"
@@ -818,16 +819,16 @@
 {
   printf("found version %s", OPENSSL_VERSION_TEXT);
-#if OPENSSL_VERSION_NUMBER >= 0x0090700
+#if OPENSSL_VERSION_NUMBER >= 0x0090800
   printf(", OK.\n");
   return 0;
 #else
-  printf(", expected version 0.9.7 or higher\n");
+  printf(", expected version 0.9.8 or higher\n");
   return 1;
 #endif
 }
 EOF
-    if test_compile $LIBCRYPTO libcrypto openssl; then
+    if test_compile "$INCCRYPTO $LIBCRYPTO" libcrypto openssl; then
       if test_execute nofatal; then
-        cnf_append "SDK_VBOX_OPENSSL_INCS" ""
+        cnf_append "SDK_VBOX_OPENSSL_INCS" "`strip_I "$INCCRYPTO"`"
         cnf_append "SDK_VBOX_OPENSSL_LIBS" "`strip_l "$LIBCRYPTO"`"
       fi
@@ -2068,4 +2069,9 @@
       QT4DIR_PKGCONFIG=0
       ;;
+    --with-openssl-dir=*)
+      OPENSSLDIR=`echo $option | cut -d'=' -f2`
+      INCCRYPTO="-I${OPENSSLDIR}/include"
+      LIBCRYPTO="${OPENSSLDIR}/lib/libcrypto.a"
+      ;;
     --with-gsoap-dir=*)
       GSOAP=`echo $option | cut -d'=' -f2`
