commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject svn commit: r834874 - /commons/sandbox/runtime/trunk/src/main/native/configure
Date Wed, 11 Nov 2009 13:23:50 GMT
Author: mturk
Date: Wed Nov 11 13:23:49 2009
New Revision: 834874

URL: http://svn.apache.org/viewvc?rev=834874&view=rev
Log:
Allow using OPENSSL_HOME env var

Modified:
    commons/sandbox/runtime/trunk/src/main/native/configure

Modified: commons/sandbox/runtime/trunk/src/main/native/configure
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure?rev=834874&r1=834873&r2=834874&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/configure (original)
+++ commons/sandbox/runtime/trunk/src/main/native/configure Wed Nov 11 13:23:49 2009
@@ -75,7 +75,7 @@
 shflags="$SHFLAGS"
 rcflags="$RCFLAGS"
 exflags=""
-include="-I$topdir/include -I$topdir/port -I$topdir/srclib"
+includes="-I$topdir/include -I$topdir/port -I$topdir/srclib"
 ssldflags=""
 modules=""
 bige=0
@@ -85,6 +85,7 @@
 obj=o
 bits=""
 java_home="`echo $JAVA_HOME | tr '\\' '/' 2>/dev/null`"
+openssl_home="`echo $OPENSSL_HOME | tr '\\' '/' 2>/dev/null`"
 java_pinc=""
 java_home_set=no
 has_dso_test=no
@@ -187,12 +188,12 @@
         ;;
         --with-openssl=* )
             openssl_inc="$a"
-            has_openssl=true
+            has_openssl=yes
             shift
         ;;
         --with-openssl-lib=* )
             openssl_lib="$a"
-            has_openssl=true
+            has_openssl=yes
             shift
         ;;
         CC=*)       cc="$a" ;       shift ;;
@@ -642,8 +643,8 @@
 else
     test ".$host" != .hpux && varadds cppopts -D_FILE_OFFSET_BITS=64
 fi
-test -d "$topdir/include/arch/$host" && varadds include "-I$topdir/include/arch/$host"
-test ".$host" != .windows && varadds include "-I$topdir/include/arch/unix"
+test -d "$topdir/include/arch/$host" && varadds includes "-I$topdir/include/arch/$host"
+test ".$host" != .windows && varadds includes "-I$topdir/include/arch/unix"
 test ".$has_unicode" = .yes && varadds cppopts -DUNICODE -D_UNICODE
 if [ ".$has_maintainer_mode" = .yes ]; then
     varadds cppopts -DDEBUG -D_DEBUG
@@ -667,19 +668,19 @@
 fi
 
 if [ ".$java_home_set" = .yes ]; then
-    varadds include "-I$java_home/include"
+    varadds includes "-I$java_home/include"
     if [ ".$java_pinc" != . ]; then
         if [ -d "$java_home/include/$java_pinc" ]; then
-            varadds include "-I$java_home/include/$java_pinc"
+            varadds includes "-I$java_home/include/$java_pinc"
         else
             echo ""
             echo "Warning: \`$java_home/include/$java_pinc' in not a directory"
         fi
     fi
 else
-    varadds include "-I??(JAVA_HOME)/include"
+    varadds includes "-I??(JAVA_HOME)/include"
     if [ ".$java_pinc" != . ]; then
-        varadds include "-I??(JAVA_HOME)/include/$java_pinc"
+        varadds includes "-I??(JAVA_HOME)/include/$java_pinc"
     fi
 fi
 
@@ -974,7 +975,7 @@
 fi
 
 if [ ".$has_openssl" = .yes ]; then
-    test ".$openssl_inc" != . && varadds include "-I$openssl_inc"
+    test ".$openssl_inc" != . && varadds includes "-I$openssl_inc"
     if [ ".$host" = .windows ]; then
         test ".$openssl_lib" != . && varadds sslflags "/libpath:\"$openssl_lib\""
         varadds sslflags libeay32.lib ssleay32.lib
@@ -983,11 +984,39 @@
         varadds sslflags -lssl -lcrypto
     fi
     have_openssl=1
-    varadds modules '??(SSLMODLIB)'
     have_ocsp=`have_include 1 openssl/ocsp`
+    varadds modules '??(SSLMODLIB)'
 else
-    have_ocsp=0
-    have_openssl=0
+    echo "Checking for OPENSSL_HOME : $openssl_home"
+    if [ ".$openssl_home" != . ]; then
+        varadds includes "-I??(OPENSSL_HOME)"
+        if [ ".$host" = .windows ]; then
+            if [ -d "$openssl_home/out32" ]; then
+                varadds sslflags "/libpath:\"??(OPENSSL_HOME)\\out32\""
+            fi
+            varadds sslflags libeay32.lib ssleay32.lib
+        else
+            if [ .bits = .64 ]; then
+                if [ -d "$openssl_home/lib64" ]; then
+                    varadds sslflags "-L??(OPENSSL_HOME)/lib64"
+                elif [ -d "$openssl_home/lib" ]; then
+                    varadds sslflags "-L??(OPENSSL_HOME)/lib"
+                fi
+            else
+                if [ -d "$openssl_home/lib" ]; then
+                    varadds sslflags "-L??(OPENSSL_HOME)/lib"
+                fi
+            fi
+            varadds sslflags -lssl -lcrypto
+        fi
+        has_openssl=yes
+        have_openssl=1
+        have_ocsp=`have_include 1 $openssl_home/openssl/ocsp`
+        varadds modules '??(SSLMODLIB)'
+    else
+        have_ocsp=0
+        have_openssl=0
+    fi
 fi
 
 if [ ".$cc" = .gcc ]; then
@@ -1116,7 +1145,8 @@
 shflags=`echo $shflags | sed 's/??/\\$/g'`
 exflags=`echo $exflags | sed 's/??/\\$/g'`
 modules=`echo $modules | sed 's/??/\\$/g'`
-include=`echo $include | sed 's/??/\\$/g'`
+includes=`echo $includes | sed 's/??/\\$/g'`
+sslflags=`echo $sslflags | sed 's/??/\\$/g'`
 
 for m in $makefiles
 do
@@ -1153,7 +1183,7 @@
     -e 's|@arflags@|'"$arflags"'|g' \
     -e 's|@sslflags@|'"$sslflags"'|g' \
     -e 's|@rcflags@|'"$rcflags"'|g' \
-    -e 's|@includes@|'"$include"'|g' \
+    -e 's|@includes@|'"$includes"'|g' \
     -e 's|@name@|'"$name"'|g' \
     -e 's|@vmajor@|'"$vmajor"'|g' \
     -e 's|@vminor@|'"$vminor"'|g' \



Mime
View raw message