From 78096fee3461a613890e9ee10aacf5955b246f61 Mon Sep 17 00:00:00 2001 From: Kaspar Brand Date: Thu, 3 Jan 2013 07:23:27 +0000 Subject: 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 --- acinclude.m4 | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'acinclude.m4') 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]) -- cgit v1.2.3