|
|
|
@ -3,7 +3,7 @@ AC_DEFUN([AX_CHECK_GSKSSL], [
|
|
|
|
|
found=false
|
|
|
|
|
AC_ARG_WITH(gskssl,
|
|
|
|
|
AS_HELP_STRING([--with-gskssl=DIR],
|
|
|
|
|
[root of the OpenSSL directory]),
|
|
|
|
|
[root of the GSK SSL directory]),
|
|
|
|
|
[
|
|
|
|
|
case "$withval" in
|
|
|
|
|
"" | y | ye | yes | n | no)
|
|
|
|
@ -27,25 +27,27 @@ AC_DEFUN([AX_CHECK_GSKSSL], [
|
|
|
|
|
|
|
|
|
|
# no such luck; use some default ssldirs
|
|
|
|
|
if ! $found; then
|
|
|
|
|
ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
|
|
|
|
|
ssldirs="/usr/lpp/gskssl /usr"
|
|
|
|
|
fi
|
|
|
|
|
]
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# note that we #include <gskssl/foo.h>, so the OpenSSL headers have to be in
|
|
|
|
|
# note that we #include <gskssl/foo.h>, so the GSK SSL headers have to be in
|
|
|
|
|
# an 'gskssl' subdirectory
|
|
|
|
|
|
|
|
|
|
if ! $found; then
|
|
|
|
|
GSKSSL_INCLUDES=
|
|
|
|
|
for ssldir in $ssldirs; do
|
|
|
|
|
AC_MSG_CHECKING([for gskssl/ssl.h in $ssldir])
|
|
|
|
|
if test -f "$ssldir/include/gskssl/ssl.h"; then
|
|
|
|
|
GSKSSL_INCLUDES="-I$ssldir/include"
|
|
|
|
|
GSKSSL_LDFLAGS="-L$ssldir/lib"
|
|
|
|
|
GSKSSL_LIBS="-lssl -lcrypto"
|
|
|
|
|
found=true
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
AC_MSG_CHECKING([for include/gskssl.h in $ssldir])
|
|
|
|
|
if test -f "$ssldir/include/gskssl.h"; then
|
|
|
|
|
if test -f "$ssldir/lib/GSKSSL.x"; then
|
|
|
|
|
GSKSSL_INCLUDES="-I$ssldir/include"
|
|
|
|
|
GSKSSL_LDFLAGS="-L$ssldir/lib"
|
|
|
|
|
GSKSSL_LIBS="$ssldir/lib/GSKSSL.x"
|
|
|
|
|
found=true
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
fi
|
|
|
|
|
break
|
|
|
|
|
else
|
|
|
|
|
AC_MSG_RESULT([no])
|
|
|
|
@ -59,7 +61,7 @@ AC_DEFUN([AX_CHECK_GSKSSL], [
|
|
|
|
|
# try the preprocessor and linker with our new flags,
|
|
|
|
|
# being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
|
|
|
|
|
|
|
|
|
|
AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
|
|
|
|
|
AC_MSG_CHECKING([whether compiling and linking against GSK SSL works])
|
|
|
|
|
echo "Trying link with GSKSSL_LDFLAGS=$GSKSSL_LDFLAGS;" \
|
|
|
|
|
"GSKSSL_LIBS=$GSKSSL_LIBS; GSKSSL_INCLUDES=$GSKSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
|
|
|
|
|
|
|
|
|
@ -70,7 +72,7 @@ AC_DEFUN([AX_CHECK_GSKSSL], [
|
|
|
|
|
LIBS="$GSKSSL_LIBS $LIBS"
|
|
|
|
|
CPPFLAGS="$GSKSSL_INCLUDES $CPPFLAGS"
|
|
|
|
|
AC_LINK_IFELSE(
|
|
|
|
|
AC_LANG_PROGRAM([#include <gskssl/ssl.h>], [SSL_new(NULL)]),
|
|
|
|
|
AC_LANG_PROGRAM([#include <gskssl.h>], [gsk_handle env_handle;]),
|
|
|
|
|
[
|
|
|
|
|
AC_MSG_RESULT([yes])
|
|
|
|
|
$1
|
|
|
|
|