Commit c9499dcf authored by Tim Rühsen's avatar Tim Rühsen 🛠
Browse files

* configure.ac: Fix configure.ac bashisms

Reported-by: Brian Inglis
parent f95d05bb
Pipeline #210032790 canceled with stages
in 15 minutes and 49 seconds
...@@ -392,13 +392,13 @@ if test "$enable_doc" = yes; then ...@@ -392,13 +392,13 @@ if test "$enable_doc" = yes; then
if test -n "$DOXYGEN" || test -n "$PANDOC"; then if test -n "$DOXYGEN" || test -n "$PANDOC"; then
LIBWGET_DOCS_INFO="yes (found:" LIBWGET_DOCS_INFO="yes (found:"
if test -n "$DOXYGEN"; then if test -n "$DOXYGEN"; then
LIBWGET_DOCS_INFO+=" Doxygen)" LIBWGET_DOCS_INFO="$LIBWGET_DOCS_INFO Doxygen)"
else else
LIBWGET_DOCS_INFO="no" LIBWGET_DOCS_INFO="no"
fi fi
WGET2_DOCS_INFO="yes (found:" WGET2_DOCS_INFO="yes (found:"
if test -n "$PANDOC"; then if test -n "$PANDOC"; then
WGET2_DOCS_INFO+=" Pandoc)" WGET2_DOCS_INFO="$WGET2_DOCS_INFO Pandoc)"
else else
WGET2_DOCS_INFO="no" WGET2_DOCS_INFO="no"
fi fi
...@@ -482,7 +482,7 @@ PKG_PROG_PKG_CONFIG ...@@ -482,7 +482,7 @@ PKG_PROG_PKG_CONFIG
AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl], [Use SSL/TLS with specified library. Options: 'gnutls' (default), 'openssl', 'wolfssl' or 'none']), with_ssl=$withval, with_ssl=gnutls) AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl], [Use SSL/TLS with specified library. Options: 'gnutls' (default), 'openssl', 'wolfssl' or 'none']), with_ssl=$withval, with_ssl=gnutls)
AS_IF([test "x$with_ssl" == xyes], [with_ssl=gnutls]) AS_IF([test "x$with_ssl" = xyes], [with_ssl=gnutls])
PKG_CHECK_MODULES([GNUTLS], [gnutls], [ PKG_CHECK_MODULES([GNUTLS], [gnutls], [
with_gnutls=yes with_gnutls=yes
...@@ -492,20 +492,20 @@ PKG_CHECK_MODULES([GNUTLS], [gnutls], [ ...@@ -492,20 +492,20 @@ PKG_CHECK_MODULES([GNUTLS], [gnutls], [
[with_gnutls=no; AC_MSG_WARN(*** GNUTLS was not found. You will not be able to use HTTPS, nor run the OCSP tests. Fallback to libnettle for hashing and checksumming.)]) [with_gnutls=no; AC_MSG_WARN(*** GNUTLS was not found. You will not be able to use HTTPS, nor run the OCSP tests. Fallback to libnettle for hashing and checksumming.)])
]) ])
AS_IF([test "x$with_ssl" == "xgnutls"], [ AS_IF([test "x$with_ssl" = "xgnutls"], [
AS_IF([test "x$with_gnutls" == xyes], [ AS_IF([test "x$with_gnutls" = xyes], [
LIBS="$GNUTLS_LIBS $LIBS" LIBS="$GNUTLS_LIBS $LIBS"
CFLAGS="$GNUTLS_CFLAGS $CFLAGS" CFLAGS="$GNUTLS_CFLAGS $CFLAGS"
AC_DEFINE([WITH_GNUTLS], [1], [Use GnuTLS]) AC_DEFINE([WITH_GNUTLS], [1], [Use GnuTLS])
AC_SEARCH_LIBS(gnutls_hash, gnutls, [with_gnutls_hash=yes]) AC_SEARCH_LIBS(gnutls_hash, gnutls, [with_gnutls_hash=yes])
AS_IF([test "x$with_gnutls_hash" == xyes], AS_IF([test "x$with_gnutls_hash" = xyes],
[AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [#include <gnutls/gnutls.h>])]) [AC_CHECK_HEADERS([gnutls/crypto.h], [], [], [#include <gnutls/gnutls.h>])])
AC_CHECK_HEADERS([gnutls/ocsp.h], AC_CHECK_HEADERS([gnutls/ocsp.h],
[AC_DEFINE([WITH_OCSP], [1], [OCSP is supported])], [AC_DEFINE([WITH_OCSP], [1], [OCSP is supported])],
[AC_MSG_WARN(*** Header file gnutls/ocsp.h was not found. OCSP will be disabled.)]) [AC_MSG_WARN(*** Header file gnutls/ocsp.h was not found. OCSP will be disabled.)])
AC_CHECK_FUNCS(gnutls_srp_server_get_username gnutls_transport_get_int) AC_CHECK_FUNCS(gnutls_srp_server_get_username gnutls_transport_get_int)
]) ])
], [test "x$with_ssl" == "xopenssl"], [ ], [test "x$with_ssl" = "xopenssl"], [
PKG_CHECK_MODULES([OPENSSL], [openssl], [ PKG_CHECK_MODULES([OPENSSL], [openssl], [
with_openssl=yes with_openssl=yes
LIBS="$OPENSSL_LIBS $LIBS" LIBS="$OPENSSL_LIBS $LIBS"
...@@ -518,7 +518,7 @@ AS_IF([test "x$with_ssl" == "xgnutls"], [ ...@@ -518,7 +518,7 @@ AS_IF([test "x$with_ssl" == "xgnutls"], [
]) ])
]) ])
AS_IF([test "x$with_openssl" == xyes], [ AS_IF([test "x$with_openssl" = xyes], [
AC_CHECK_HEADERS([openssl/ssl.h]) AC_CHECK_HEADERS([openssl/ssl.h])
AC_CHECK_HEADERS([openssl/x509_vfy.h]) AC_CHECK_HEADERS([openssl/x509_vfy.h])
AC_CHECK_HEADERS([openssl/ocsp.h], AC_CHECK_HEADERS([openssl/ocsp.h],
...@@ -552,9 +552,9 @@ AS_IF([test "x$with_ssl" == "xgnutls"], [ ...@@ -552,9 +552,9 @@ AS_IF([test "x$with_ssl" == "xgnutls"], [
AC_MSG_ERROR([*** Unsupported value for --with-ssl. Use 'gnutls' (default), 'openssl', 'wolfssl' or 'none']) AC_MSG_ERROR([*** Unsupported value for --with-ssl. Use 'gnutls' (default), 'openssl', 'wolfssl' or 'none'])
]) ])
AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_ssl" = xgnutls && test "x$with_gnutls" == xyes]) AM_CONDITIONAL([WITH_GNUTLS], [test "x$with_ssl" = xgnutls && test "x$with_gnutls" = xyes])
AM_CONDITIONAL([WITH_OPENSSL], [test "x$with_ssl" = xopenssl && test "x$with_openssl" == xyes]) AM_CONDITIONAL([WITH_OPENSSL], [test "x$with_ssl" = xopenssl && test "x$with_openssl" = xyes])
AM_CONDITIONAL([WITH_WOLFSSL], [test "x$with_ssl" = xwolfssl && test "x$with_wolfssl" == xyes]) AM_CONDITIONAL([WITH_WOLFSSL], [test "x$with_ssl" = xwolfssl && test "x$with_wolfssl" = xyes])
AM_CONDITIONAL([WITH_TLS], [test "x$with_gnutls" = xyes || test "x$with_wolfssl" = xyes || test "x$with_openssl" = xyes]) AM_CONDITIONAL([WITH_TLS], [test "x$with_gnutls" = xyes || test "x$with_wolfssl" = xyes || test "x$with_openssl" = xyes])
AS_IF([test "x$with_gnutls" = xyes || test "x$with_wolfssl" = xyes || test "x$with_openssl" = xyes], [ AS_IF([test "x$with_gnutls" = xyes || test "x$with_wolfssl" = xyes || test "x$with_openssl" = xyes], [
...@@ -843,7 +843,7 @@ AS_IF([test "x$with_libmicrohttpd" != xno], [ ...@@ -843,7 +843,7 @@ AS_IF([test "x$with_libmicrohttpd" != xno], [
CFLAGS=$old_CFLAGS CFLAGS=$old_CFLAGS
]) ])
AS_IF([test "x$with_gnutls" == xyes], [ AS_IF([test "x$with_gnutls" = xyes], [
TEST_LIBS="$TEST_LIBS $GNUTLS_LIBS" TEST_LIBS="$TEST_LIBS $GNUTLS_LIBS"
TEST_CFLAGS="$TEST_CFLAGS $GNUTLS_CFLAGS" TEST_CFLAGS="$TEST_CFLAGS $GNUTLS_CFLAGS"
AC_DEFINE([WITH_GNUTLS_IN_TESTSUITE], [1], [GnuTLS is available for test suite])], AC_DEFINE([WITH_GNUTLS_IN_TESTSUITE], [1], [GnuTLS is available for test suite])],
...@@ -925,9 +925,9 @@ AC_CONFIG_FILES([Makefile ...@@ -925,9 +925,9 @@ AC_CONFIG_FILES([Makefile
AC_OUTPUT AC_OUTPUT
# Check if expected TLS library was found and print it # Check if expected TLS library was found and print it
AS_IF([test "x$with_ssl" == xwolfssl && test "x$with_wolfssl" == xno], [ssl_enabled="(not found)"], AS_IF([test "x$with_ssl" = xwolfssl && test "x$with_wolfssl" = xno], [ssl_enabled="(not found)"],
[test "x$with_ssl" == xopenssl && test "x$with_openssl" == xno], [ssl_enabled="(not found)"], [test "x$with_ssl" = xopenssl && test "x$with_openssl" = xno], [ssl_enabled="(not found)"],
[test "x$with_ssl" == xgnutls && test "x$with_gnutls" == xno], [ssl_enabled="(not found)"], [test "x$with_ssl" = xgnutls && test "x$with_gnutls" = xno], [ssl_enabled="(not found)"],
[]) [])
# patching libtool, generated when coming here # patching libtool, generated when coming here
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment