Index: acinclude.m4
==================================================================
--- acinclude.m4
+++ acinclude.m4
@@ -97,49 +97,55 @@
openssldir="$withval"
], [
openssldir=''
]
)
+ AC_MSG_CHECKING([for OpenSSL directory])
+ AC_MSG_RESULT($openssldir)
dnl Set SSL include files path
AC_ARG_WITH([openssl-includedir],
AS_HELP_STRING([--with-openssl-includedir=
],
[path to include directory of OpenSSL or LibreSSL installation]
), [
opensslincludedir="$withval"
], [
- if test -n "$openssldir"; then
- opensslincludedir="$openssldir/include/openssl"
+ if test ! -z "$openssldir"; then
+ if test -d "${openssldir}/include/openssl"; then
+ opensslincludedir="${openssldir}/include/openssl"
+ else
+ opensslincludedir="${openssldir}/include"
+ fi
else
opensslincludedir=''
fi
]
)
AC_MSG_CHECKING([for OpenSSL include directory])
AC_MSG_RESULT($opensslincludedir)
dnl Set SSL include vars
- if test -n "$opensslincludedir"; then
+ if test ! -z "$opensslincludedir"; then
if test -f "$opensslincludedir/ssl.h"; then
TCLTLS_SSL_CFLAGS="-I$opensslincludedir"
TCLTLS_SSL_INCLUDES="-I$opensslincludedir"
else
AC_MSG_ERROR([Unable to locate ssl.h])
fi
else
- TCLTLS_SSL_CFLAGS="-I$(includedir)/openssl"
- TCLTLS_SSL_INCLUDES="-I$(includedir)/openssl"
+ TCLTLS_SSL_CFLAGS="-I${includedir}/openssl"
+ TCLTLS_SSL_INCLUDES="-I${includedir}/openssl"
fi
dnl Set SSL lib files path
AC_ARG_WITH([openssl-libdir],
AS_HELP_STRING([--with-openssl-libdir=],
[path to lib directory of OpenSSL or LibreSSL installation]
), [
openssllibdir="$withval"
], [
- if test -n "$openssldir"; then
+ if test ! -z "$openssldir"; then
if test "$do64bit" == 'yes'; then
openssllibdir="$openssldir/lib64"
else
openssllibdir="$openssldir/lib"
fi
@@ -150,11 +156,11 @@
)
AC_MSG_CHECKING([for OpenSSL lib directory])
AC_MSG_RESULT($openssllibdir)
dnl Set SSL lib vars
- if test -n "$openssllibdir"; then
+ if test ! -z "$openssllibdir"; then
if test -f "$openssllibdir/libssl${SHLIB_SUFFIX}"; then
if test "${TCLEXT_TLS_STATIC_SSL}" == 'no'; then
TCLTLS_SSL_LIBS="-L$openssllibdir -lcrypto -lssl"
else
# Linux and Solaris
Index: configure
==================================================================
--- configure
+++ configure
@@ -9181,10 +9181,14 @@
openssldir=''
fi
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL directory" >&5
+printf %s "checking for OpenSSL directory... " >&6; }
+ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssldir" >&5
+printf "%s\n" "$openssldir" >&6; }
# Check whether --with-openssl-includedir was given.
if test ${with_openssl_includedir+y}
then :
@@ -9191,12 +9195,16 @@
withval=$with_openssl_includedir;
opensslincludedir="$withval"
else $as_nop
- if test -n "$openssldir"; then
- opensslincludedir="$openssldir/include/openssl"
+ if test ! -z "$openssldir"; then
+ if test -d "${openssldir}/include/openssl"; then
+ opensslincludedir="${openssldir}/include/openssl"
+ else
+ opensslincludedir="${openssldir}/include"
+ fi
else
opensslincludedir=''
fi
@@ -9205,20 +9213,20 @@
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL include directory" >&5
printf %s "checking for OpenSSL include directory... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $opensslincludedir" >&5
printf "%s\n" "$opensslincludedir" >&6; }
- if test -n "$opensslincludedir"; then
+ if test ! -z "$opensslincludedir"; then
if test -f "$opensslincludedir/ssl.h"; then
TCLTLS_SSL_CFLAGS="-I$opensslincludedir"
TCLTLS_SSL_INCLUDES="-I$opensslincludedir"
else
as_fn_error $? "Unable to locate ssl.h" "$LINENO" 5
fi
else
- TCLTLS_SSL_CFLAGS="-I$(includedir)/openssl"
- TCLTLS_SSL_INCLUDES="-I$(includedir)/openssl"
+ TCLTLS_SSL_CFLAGS="-I${includedir}/openssl"
+ TCLTLS_SSL_INCLUDES="-I${includedir}/openssl"
fi
# Check whether --with-openssl-libdir was given.
if test ${with_openssl_libdir+y}
@@ -9226,11 +9234,11 @@
withval=$with_openssl_libdir;
openssllibdir="$withval"
else $as_nop
- if test -n "$openssldir"; then
+ if test ! -z "$openssldir"; then
if test "$do64bit" == 'yes'; then
openssllibdir="$openssldir/lib64"
else
openssllibdir="$openssldir/lib"
fi
@@ -9244,11 +9252,11 @@
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for OpenSSL lib directory" >&5
printf %s "checking for OpenSSL lib directory... " >&6; }
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $openssllibdir" >&5
printf "%s\n" "$openssllibdir" >&6; }
- if test -n "$openssllibdir"; then
+ if test ! -z "$openssllibdir"; then
if test -f "$openssllibdir/libssl${SHLIB_SUFFIX}"; then
if test "${TCLEXT_TLS_STATIC_SSL}" == 'no'; then
TCLTLS_SSL_LIBS="-L$openssllibdir -lcrypto -lssl"
else
# Linux and Solaris