configure.ac: Quote all macro args, put "if" and "then" on same line.
authorFlorian Forster <octo@collectd.org>
Mon, 1 Oct 2018 15:24:51 +0000 (17:24 +0200)
committerFlorian Forster <octo@collectd.org>
Thu, 4 Oct 2018 19:14:37 +0000 (21:14 +0200)
configure.ac

index 641a71a..8d65a90 100644 (file)
@@ -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")
 # }}}