From 8f527ca5623f5fc17bfb3c04486fd65e5bcd1135 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Mon, 1 Oct 2018 17:24:51 +0200 Subject: [PATCH] configure.ac: Quote all macro args, put "if" and "then" on same line. --- configure.ac | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/configure.ac b/configure.ac index 641a71a9..8d65a900 100644 --- a/configure.ac +++ b/configure.ac @@ -5239,10 +5239,9 @@ PKG_CHECK_MODULES([LIBSIGROK], [libsigrok < 0.4], # --with-libssl {{{ with_libssl_cflags="" with_libssl_ldflags="" -AC_ARG_WITH(libssl, [AS_HELP_STRING([--with-libssl@<:@=PREFIX@:>@], [Path to libssl.])], +AC_ARG_WITH([libssl], [AS_HELP_STRING([--with-libssl@<:@=PREFIX@:>@], [Path to libssl.])], [ - if test "x$withval" != "xno" && test "x$withval" != "xyes" - then + if test "x$withval" != "xno" && test "x$withval" != "xyes"; then with_libssl_cppflags="-I$withval/include" with_libssl_ldflags="-L$withval/lib" with_libssl="yes" @@ -5253,38 +5252,35 @@ AC_ARG_WITH(libssl, [AS_HELP_STRING([--with-libssl@<:@=PREFIX@:>@], [Path to lib [ with_libssl="yes" ]) -if test "x$with_libssl" = "xyes" -then +if test "x$with_libssl" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $with_libssl_cppflags" - AC_CHECK_HEADERS(openssl/sha.h openssl/blowfish.h openssl/rand.h, + AC_CHECK_HEADERS([openssl/sha.h openssl/blowfish.h openssl/rand.h], [with_libssl="yes"], [with_libssl="no (ssl header not found)"]) CPPFLAGS="$SAVE_CPPFLAGS" fi -if test "x$with_libssl" = "xyes" -then +if test "x$with_libssl" = "xyes"; then SAVE_CPPFLAGS="$CPPFLAGS" SAVE_LDFLAGS="$LDFLAGS" CPPFLAGS="$CPPFLAGS $with_libssl_cppflags" LDFLAGS="$LDFLAGS $with_libssl_ldflags" - AC_CHECK_LIB(ssl, OPENSSL_init_ssl, [with_libssl="yes"], [with_libssl="no (Symbol 'SSL_library_init' not found)"]) + AC_CHECK_LIB([ssl], [OPENSSL_init_ssl], [with_libssl="yes"], [with_libssl="no (Symbol 'SSL_library_init' not found)"]) CPPFLAGS="$SAVE_CPPFLAGS" LDFLAGS="$SAVE_LDFLAGS" fi -if test "x$with_libssl" = "xyes" -then +if test "x$with_libssl" = "xyes"; then BUILD_WITH_LIBSSL_CFLAGS="$with_libssl_cflags" BUILD_WITH_LIBSSL_LDFLAGS="$with_libssl_ldflags" BUILD_WITH_LIBSSL_LIBS="-lssl -lcrypto" - AC_SUBST(BUILD_WITH_LIBSSL_CFLAGS) - AC_SUBST(BUILD_WITH_LIBSSL_LDFLAGS) - AC_SUBST(BUILD_WITH_LIBSSL_LIBS) - AC_DEFINE(HAVE_LIBSSL, 1, [Define if libssl is present and usable.]) + AC_SUBST([BUILD_WITH_LIBSSL_CFLAGS]) + AC_SUBST([BUILD_WITH_LIBSSL_LDFLAGS]) + AC_SUBST([BUILD_WITH_LIBSSL_LIBS]) + AC_DEFINE([HAVE_LIBSSL], [1], [Define if libssl is present and usable.]) fi AM_CONDITIONAL(BUILD_WITH_LIBSSL, test "x$with_libssl" = "xyes") # }}} -- 2.11.0