mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Work correctly with a development version of OpenSSL. I suspect
something similar is needed when there are two OpenSSL installations, one in a default location. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1358167 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
75
acinclude.m4
75
acinclude.m4
@@ -499,38 +499,51 @@ AC_DEFUN(APACHE_CHECK_OPENSSL,[
|
|||||||
saved_LDFLAGS="$LDFLAGS"
|
saved_LDFLAGS="$LDFLAGS"
|
||||||
SSL_LIBS=""
|
SSL_LIBS=""
|
||||||
|
|
||||||
dnl Before doing anything else, load in pkg-config variables
|
dnl See if we've been given a development OpenSSL (lib does not exist)
|
||||||
if test -n "$PKGCONFIG"; then
|
if test ! -d "$ap_openssl_base/lib"; then
|
||||||
saved_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
|
AC_MSG_WARN([Using development version of OpenSSL])
|
||||||
if test "x$ap_openssl_base" != "x" -a \
|
dnl we need to prepend the directories to override the system version
|
||||||
-f "${ap_openssl_base}/lib/pkgconfig/openssl.pc"; then
|
CPPFLAGS="-I$ap_openssl_base/include $CPPFLAGS"
|
||||||
dnl Ensure that the given path is used by pkg-config too, otherwise
|
INCLUDES="-I$ap_openssl_base/include $INCLUDES"
|
||||||
dnl the system openssl.pc might be picked up instead.
|
LDFLAGS="-L$ap_openssl_base $LDFLAGS"
|
||||||
PKG_CONFIG_PATH="${ap_openssl_base}/lib/pkgconfig${PKG_CONFIG_PATH+:}${PKG_CONFIG_PATH}"
|
dnl naughty, but easier than the alternatives
|
||||||
export PKG_CONFIG_PATH
|
saved_LDFLAGS="$LDFLAGS"
|
||||||
fi
|
SSL_LIBS="-L$ap_openssl_base"
|
||||||
ap_openssl_libs="`$PKGCONFIG --libs-only-l openssl 2>&1`"
|
else
|
||||||
if test $? -eq 0; then
|
|
||||||
ap_openssl_found="yes"
|
|
||||||
pkglookup="`$PKGCONFIG --cflags-only-I openssl`"
|
|
||||||
APR_ADDTO(CPPFLAGS, [$pkglookup])
|
|
||||||
APR_ADDTO(INCLUDES, [$pkglookup])
|
|
||||||
pkglookup="`$PKGCONFIG --libs-only-L --libs-only-other openssl`"
|
|
||||||
APR_ADDTO(LDFLAGS, [$pkglookup])
|
|
||||||
APR_ADDTO(SSL_LIBS, [$pkglookup])
|
|
||||||
fi
|
|
||||||
PKG_CONFIG_PATH="$saved_PKG_CONFIG_PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
dnl fall back to the user-supplied directory if not found via pkg-config
|
dnl Before doing anything else, load in pkg-config variables
|
||||||
if test "x$ap_openssl_base" != "x" -a "x$ap_openssl_found" = "x"; then
|
if test -n "$PKGCONFIG"; then
|
||||||
APR_ADDTO(CPPFLAGS, [-I$ap_openssl_base/include])
|
saved_PKG_CONFIG_PATH="$PKG_CONFIG_PATH"
|
||||||
APR_ADDTO(INCLUDES, [-I$ap_openssl_base/include])
|
if test "x$ap_openssl_base" != "x" -a \
|
||||||
APR_ADDTO(LDFLAGS, [-L$ap_openssl_base/lib])
|
-f "${ap_openssl_base}/lib/pkgconfig/openssl.pc"; then
|
||||||
APR_ADDTO(SSL_LIBS, [-L$ap_openssl_base/lib])
|
dnl Ensure that the given path is used by pkg-config too, otherwise
|
||||||
if test "x$ap_platform_runtime_link_flag" != "x"; then
|
dnl the system openssl.pc might be picked up instead.
|
||||||
APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag$ap_openssl_base/lib])
|
PKG_CONFIG_PATH="${ap_openssl_base}/lib/pkgconfig${PKG_CONFIG_PATH+:}${PKG_CONFIG_PATH}"
|
||||||
APR_ADDTO(SSL_LIBS, [$ap_platform_runtime_link_flag$ap_openssl_base/lib])
|
export PKG_CONFIG_PATH
|
||||||
|
fi
|
||||||
|
ap_openssl_libs="`$PKGCONFIG --libs-only-l openssl 2>&1`"
|
||||||
|
if test $? -eq 0; then
|
||||||
|
ap_openssl_found="yes"
|
||||||
|
pkglookup="`$PKGCONFIG --cflags-only-I openssl`"
|
||||||
|
APR_ADDTO(CPPFLAGS, [$pkglookup])
|
||||||
|
APR_ADDTO(INCLUDES, [$pkglookup])
|
||||||
|
pkglookup="`$PKGCONFIG --libs-only-L --libs-only-other openssl`"
|
||||||
|
APR_ADDTO(LDFLAGS, [$pkglookup])
|
||||||
|
APR_ADDTO(SSL_LIBS, [$pkglookup])
|
||||||
|
fi
|
||||||
|
PKG_CONFIG_PATH="$saved_PKG_CONFIG_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
dnl fall back to the user-supplied directory if not found via pkg-config
|
||||||
|
if test "x$ap_openssl_base" != "x" -a "x$ap_openssl_found" = "x"; then
|
||||||
|
APR_ADDTO(CPPFLAGS, [-I$ap_openssl_base/include])
|
||||||
|
APR_ADDTO(INCLUDES, [-I$ap_openssl_base/include])
|
||||||
|
APR_ADDTO(LDFLAGS, [-L$ap_openssl_base/lib])
|
||||||
|
APR_ADDTO(SSL_LIBS, [-L$ap_openssl_base/lib])
|
||||||
|
if test "x$ap_platform_runtime_link_flag" != "x"; then
|
||||||
|
APR_ADDTO(LDFLAGS, [$ap_platform_runtime_link_flag$ap_openssl_base/lib])
|
||||||
|
APR_ADDTO(SSL_LIBS, [$ap_platform_runtime_link_flag$ap_openssl_base/lib])
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -1057,6 +1057,7 @@ static int ssl_server_import_cert(server_rec *s,
|
|||||||
"Unable to initialize TLS authz extension: "
|
"Unable to initialize TLS authz extension: "
|
||||||
"OpenSSL version too low");
|
"OpenSSL version too low");
|
||||||
ssl_die(s);
|
ssl_die(s);
|
||||||
|
#error xx
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user