]> granicus.if.org Git - apache/commitdiff
mod_ssl/ab: only use "--static" for pkg-config when explicity requested
authorKaspar Brand <kbrand@apache.org>
Sat, 5 Jan 2013 07:54:15 +0000 (07:54 +0000)
committerKaspar Brand <kbrand@apache.org>
Sat, 5 Jan 2013 07:54:15 +0000 (07:54 +0000)
(by adding an "--enable-ssl-staticlib-deps" option to configure)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1429228 13f79535-47bb-0310-9956-ffa450edef68

acinclude.m4

index de2aa3d1578cc1e9d135c247c13f3ca4f3adc077..ee273ef09967d719a849bfe5ca4665fb60b79dd1 100644 (file)
@@ -535,17 +535,22 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[
         PKG_CONFIG_PATH="${ap_openssl_base}/lib/pkgconfig${PKG_CONFIG_PATH+:}${PKG_CONFIG_PATH}"
         export PKG_CONFIG_PATH
       fi
-      ap_openssl_libs="`$PKGCONFIG --libs-only-l --static --silence-errors openssl`"
+      AC_ARG_ENABLE(ssl-staticlib-deps,APACHE_HELP_STRING(--enable-ssl-staticlib-deps,[link mod_ssl with dependencies of OpenSSL's static libraries (as indicated by "pkg-config --static"). Must be specified in addition to --enable-ssl.]), [
+        if test "$enableval" = "yes"; then
+          PKGCONFIG_LIBOPTS="--static"
+        fi
+      ])
+      ap_openssl_libs="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-l --silence-errors openssl`"
       if test $? -eq 0; then
         ap_openssl_found="yes"
         pkglookup="`$PKGCONFIG --cflags-only-I openssl`"
         APR_ADDTO(CPPFLAGS, [$pkglookup])
         APR_ADDTO(MOD_CFLAGS, [$pkglookup])
         APR_ADDTO(ab_CFLAGS, [$pkglookup])
-        pkglookup="`$PKGCONFIG --libs-only-L --static openssl`"
+        pkglookup="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-L openssl`"
         APR_ADDTO(LDFLAGS, [$pkglookup])
         APR_ADDTO(MOD_LDFLAGS, [$pkglookup])
-        pkglookup="`$PKGCONFIG --libs-only-other --static openssl`"
+        pkglookup="`$PKGCONFIG $PKGCONFIG_LIBOPTS --libs-only-other openssl`"
         APR_ADDTO(LDFLAGS, [$pkglookup])
         APR_ADDTO(MOD_LDFLAGS, [$pkglookup])
       fi