summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaspar Brand <kbrand@apache.org>2013-01-03 08:23:27 +0100
committerKaspar Brand <kbrand@apache.org>2013-01-03 08:23:27 +0100
commit78096fee3461a613890e9ee10aacf5955b246f61 (patch)
tree0d6596cab5e4deefaa293697908fcbbafa000f6e
parentStupid CodeWarrior compiler cant take vars with struct inits. (diff)
downloadapache2-78096fee3461a613890e9ee10aacf5955b246f61.tar.xz
apache2-78096fee3461a613890e9ee10aacf5955b246f61.zip
Improve pkg-config usage for mod_ssl/ab:
also use pkg-config for determining the -l flags (and fall back to a hardcoded default of "-lssl -lcrypto") add --static to pkg-config invocations, so that libraries for static linking are also taken into account (PR 54252 - note that the additional flags will only appear in modules/ssl/modules.mk and ab_LDFLAGS, so potential side effects are limited) separate --libs-only-L and --libs-only-other into two invocations (can't be used concurrently, only the first takes effect) use --silence-errors where applicable git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1428184 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--acinclude.m49
1 files changed, 6 insertions, 3 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 91f54f16ff..de2aa3d157 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -535,14 +535,17 @@ 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 openssl 2>&1`"
+ ap_openssl_libs="`$PKGCONFIG --libs-only-l --static --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 --libs-only-other openssl`"
+ pkglookup="`$PKGCONFIG --libs-only-L --static openssl`"
+ APR_ADDTO(LDFLAGS, [$pkglookup])
+ APR_ADDTO(MOD_LDFLAGS, [$pkglookup])
+ pkglookup="`$PKGCONFIG --libs-only-other --static openssl`"
APR_ADDTO(LDFLAGS, [$pkglookup])
APR_ADDTO(MOD_LDFLAGS, [$pkglookup])
fi
@@ -575,7 +578,7 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[
[AC_MSG_RESULT(FAILED)])
if test "x$ac_cv_openssl" = "xyes"; then
- ap_openssl_libs="-lssl -lcrypto `$apr_config --libs`"
+ ap_openssl_libs="${ap_openssl_libs:--lssl -lcrypto} `$apr_config --libs`"
APR_ADDTO(MOD_LDFLAGS, [$ap_openssl_libs])
APR_ADDTO(LIBS, [$ap_openssl_libs])
APR_SETVAR(ab_LDFLAGS, [$MOD_LDFLAGS])