]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
SSL libs are needed in linking only for ab and mod_ssl.
authorRainer Jung <rjung@apache.org>
Sat, 3 Jan 2009 01:14:33 +0000 (01:14 +0000)
committerRainer Jung <rjung@apache.org>
Sat, 3 Jan 2009 01:14:33 +0000 (01:14 +0000)
In both cases we already include SSL_LIBS, so lets add
the necessary link flags only to SSL_LIBS and not to
EXTRA_LDFLAGS.

The last of a series of changes of type
"restrict link dependencies where possible".

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

acinclude.m4

index 19d584885708f8ba10ae9f257d1770b201b7fb06..59c791eeb599f79c8bcb4d77a524fe3c4428977d 100644 (file)
@@ -369,12 +369,16 @@ if test "x$ap_ssltk_configured" = "x"; then
   dnl Run header and version checks
   saved_CPPFLAGS="$CPPFLAGS"
   saved_LIBS="$LIBS"
+  saved_LDFLAGS="$LDFLAGS"
+  SSL_LIBS=""
   if test "x$ap_ssltk_base" != "x"; then
     APR_ADDTO(CPPFLAGS, [-I$ap_ssltk_base/include])
     APR_ADDTO(INCLUDES, [-I$ap_ssltk_base/include])
     APR_ADDTO(LDFLAGS, [-L$ap_ssltk_base/lib])
+    APR_ADDTO(SSL_LIBS, [-L$ap_ssltk_base/lib])
     if test "x$ap_platform_runtime_link_flag" != "x"; then
       APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag$ap_ssltk_base/lib])
+      APR_ADDTO(SSL_LIBS, [$ap_platform_runtime_link_flag$ap_ssltk_base/lib])
     fi
   fi
   if test "x$ap_ssltk_type" = "x"; then
@@ -446,6 +450,7 @@ if test "x$ap_ssltk_configured" = "x"; then
         APR_ADDTO(INCLUDES, [$pkglookup])
         pkglookup="`$PKGCONFIG --libs-only-L --libs-only-other openssl`"
         APR_ADDTO(LDFLAGS, [$pkglookup])
+        APR_ADDTO(SSL_LIBS, [$pkglookup])
       else
         ap_ssltk_libs="-lssl -lcrypto `$apr_config --libs`"
       fi
@@ -453,7 +458,7 @@ if test "x$ap_ssltk_configured" = "x"; then
       ap_ssltk_libs="-lssl -lcrypto `$apr_config --libs`"
     fi
   fi
-  APR_SETVAR(SSL_LIBS, [$ap_ssltk_libs])
+  APR_ADDTO(SSL_LIBS, [$ap_ssltk_libs])
   APR_ADDTO(LIBS, [$ap_ssltk_libs])
   APACHE_SUBST(SSL_LIBS)
 
@@ -471,6 +476,7 @@ if test "x$ap_ssltk_configured" = "x"; then
   dnl restore
   CPPFLAGS="$saved_CPPFLAGS"
   LIBS="$saved_LIBS"
+  LDFLAGS="$saved_LDFLAGS"
   if test "x$liberrors" != "x"; then
     AC_MSG_ERROR([... Error, SSL/TLS libraries were missing or unusable])
   fi