]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: fix indentation more
authorViktor Szakats <commit@vsz.me>
Mon, 26 Aug 2024 00:11:05 +0000 (02:11 +0200)
committerViktor Szakats <commit@vsz.me>
Mon, 26 Aug 2024 09:14:01 +0000 (11:14 +0200)
Follow-up to 0052b4b52dfbd6455a24dd95837e5236dc8e1f5d #14628

Closes #14682

m4/curl-bearssl.m4
m4/curl-compilers.m4
m4/curl-functions.m4
m4/curl-gnutls.m4
m4/curl-mbedtls.m4
m4/curl-openssl.m4
m4/curl-rustls.m4
m4/curl-sysconfig.m4
m4/curl-wolfssl.m4
m4/xc-val-flgs.m4

index f2d661de10182c566045f9997e06c98aaab183a6..02a80e8c13f5fb2fbde07c919a232ff1f398716c 100644 (file)
@@ -43,14 +43,14 @@ if test "x$OPT_BEARSSL" != xno; then
 
       AC_CHECK_LIB(bearssl, br_ssl_client_init_full,
       dnl libbearssl found, set the variable
-       [
-         AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
-         AC_SUBST(USE_BEARSSL, [1])
-         BEARSSL_ENABLED=1
-         USE_BEARSSL="yes"
-         ssl_msg="BearSSL"
-         test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-        ], [], -lbearssl)
+      [
+        AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
+        AC_SUBST(USE_BEARSSL, [1])
+        BEARSSL_ENABLED=1
+        USE_BEARSSL="yes"
+        ssl_msg="BearSSL"
+        test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+      ], [], -lbearssl)
     fi
 
     addld=""
@@ -66,22 +66,22 @@ if test "x$OPT_BEARSSL" != xno; then
 
       LDFLAGS="$LDFLAGS $addld"
       if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
+        CPPFLAGS="$CPPFLAGS $addcflags"
       fi
 
       AC_CHECK_LIB(bearssl, br_ssl_client_init_full,
-       [
-       AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
-       AC_SUBST(USE_BEARSSL, [1])
-       BEARSSL_ENABLED=1
-       USE_BEARSSL="yes"
-       ssl_msg="BearSSL"
-       test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-       ],
-       [
-         CPPFLAGS=$_cppflags
-         LDFLAGS=$_ldflags
-       ], -lbearssl)
+        [
+        AC_DEFINE(USE_BEARSSL, 1, [if BearSSL is enabled])
+        AC_SUBST(USE_BEARSSL, [1])
+        BEARSSL_ENABLED=1
+        USE_BEARSSL="yes"
+        ssl_msg="BearSSL"
+        test bearssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+        ],
+        [
+          CPPFLAGS=$_cppflags
+          LDFLAGS=$_ldflags
+        ], -lbearssl)
     fi
 
     if test "x$USE_BEARSSL" = "xyes"; then
index 6f884d2141d57de101a2d7db8547ae815923c1c8..240aa2b0b1096a023397aff979ff92e4212e38a3 100644 (file)
@@ -148,7 +148,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_DEC_C], [
   CURL_CHECK_DEF([__DECC], [], [silent])
   CURL_CHECK_DEF([__DECC_VER], [], [silent])
   if test "$curl_cv_have_def___DECC" = "yes" &&
-    test "$curl_cv_have_def___DECC_VER" = "yes"; then
+     test "$curl_cv_have_def___DECC_VER" = "yes"; then
     AC_MSG_RESULT([yes])
     compiler_id="DEC_C"
     flags_dbg_yes="-g2"
@@ -1424,10 +1424,10 @@ AC_DEFUN([CURL_CHECK_COMPILER_SYMBOL_HIDING], [
         $tmp_EXTERN char *dummy(char *buff);
         char *dummy(char *buff)
         {
-         if(buff)
-           return ++buff;
-         else
-           return buff;
+          if(buff)
+            return ++buff;
+          else
+            return buff;
         }
       ]],[[
         char b[16];
index 38d7dfee6f83008df59139866f462f72019eb6c8..7a35b98ffe3a565b128c2b623d457fd4aaea8478 100644 (file)
@@ -4870,11 +4870,11 @@ dnl CURL_LIBRARY_PATH variable. It keeps the LD_LIBRARY_PATH
 dnl changes contained within this macro.
 
 AC_DEFUN([CURL_RUN_IFELSE], [
-   case $host_os in
-     darwin*)
+  case $host_os in
+    darwin*)
       AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
-     ;;
-     *)
+      ;;
+    *)
       oldcc=$CC
       old=$LD_LIBRARY_PATH
       CC="sh ./run-compiler"
@@ -4883,8 +4883,8 @@ AC_DEFUN([CURL_RUN_IFELSE], [
       AC_RUN_IFELSE([AC_LANG_SOURCE([$1])], $2, $3, $4)
       LD_LIBRARY_PATH=$old # restore
       CC=$oldcc
-     ;;
-   esac
+      ;;
+  esac
 ])
 
 dnl CURL_COVERAGE
@@ -4901,8 +4901,8 @@ AC_DEFUN([CURL_COVERAGE],[
 
   dnl check if enabled by argument
   AC_ARG_ENABLE(code-coverage,
-     AS_HELP_STRING([--enable-code-coverage], [Provide code coverage]),
-     coverage="$enableval")
+    AS_HELP_STRING([--enable-code-coverage], [Provide code coverage]),
+    coverage="$enableval")
 
   dnl if not gcc switch off again
   AS_IF([ test "$GCC" != "yes" ], coverage="no" )
@@ -4981,19 +4981,19 @@ AC_DEFUN([CURL_SIZEOF], [
   r=0
   dnl Check the sizes in a reasonable order
   for typesize in 8 4 2 16 1; do
-     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 $2
 ]],
-     [switch(0) {
-       case 0:
-       case (sizeof($1) == $typesize):;
-     }
+    [switch(0) {
+      case 0:
+      case (sizeof($1) == $typesize):;
+    }
     ]) ],
       [
-       r=$typesize],
+        r=$typesize],
       [
-       r=0])
+        r=0])
     dnl get out of the loop once matched
     if test $r -gt 0; then
       break;
index 199e10cd45169a5b18c283cb7908eebf2719c3bf..93c3946a93746c795561a9d10f3a8658dd330aee 100644 (file)
@@ -93,24 +93,24 @@ if test "x$OPT_GNUTLS" != xno; then
       LIBS="$addlib $LIBS"
       LDFLAGS="$LDFLAGS $addld"
       if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
+        CPPFLAGS="$CPPFLAGS $addcflags"
       fi
 
       dnl this function is selected since it was introduced in 3.1.10
       AC_CHECK_LIB(gnutls, gnutls_x509_crt_get_dn2,
-       [
-       AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
-       AC_SUBST(USE_GNUTLS, [1])
-       GNUTLS_ENABLED=1
-       USE_GNUTLS="yes"
-       ssl_msg="GnuTLS"
-       QUIC_ENABLED=yes
-       test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-       ],
-       [
-         LIBS="$CLEANLIBS"
-         CPPFLAGS="$CLEANCPPFLAGS"
-       ])
+        [
+        AC_DEFINE(USE_GNUTLS, 1, [if GnuTLS is enabled])
+        AC_SUBST(USE_GNUTLS, [1])
+        GNUTLS_ENABLED=1
+        USE_GNUTLS="yes"
+        ssl_msg="GnuTLS"
+        QUIC_ENABLED=yes
+        test gnutls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+        ],
+        [
+          LIBS="$CLEANLIBS"
+          CPPFLAGS="$CLEANCPPFLAGS"
+        ])
 
       if test "x$USE_GNUTLS" = "xyes"; then
         AC_MSG_NOTICE([detected GnuTLS version $version])
index 6d3e568572956299122770f3313e0e488ee0d781..bf14c6c893bfd0ddcffbecefce9bc800db8dceb3 100644 (file)
@@ -70,18 +70,18 @@ if test "x$OPT_MBEDTLS" != xno; then
       fi
 
       AC_CHECK_LIB(mbedtls, mbedtls_ssl_init,
-       [
-       AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
-       AC_SUBST(USE_MBEDTLS, [1])
-       MBEDTLS_ENABLED=1
-       USE_MBEDTLS="yes"
-       ssl_msg="mbedTLS"
-       test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-       ],
-       [
-         CPPFLAGS=$_cppflags
-         LDFLAGS=$_ldflags
-       ], -lmbedx509 -lmbedcrypto)
+        [
+        AC_DEFINE(USE_MBEDTLS, 1, [if mbedTLS is enabled])
+        AC_SUBST(USE_MBEDTLS, [1])
+        MBEDTLS_ENABLED=1
+        USE_MBEDTLS="yes"
+        ssl_msg="mbedTLS"
+        test mbedtls != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+        ],
+        [
+          CPPFLAGS=$_cppflags
+          LDFLAGS=$_ldflags
+        ], -lmbedx509 -lmbedcrypto)
     fi
 
     if test "x$USE_MBEDTLS" = "xyes"; then
index ed50b1c0836bb2f5b4aea2a45087ec32f0a8b7c8..e33b56378125e567264c0a3f688d83cf99c8a242 100644 (file)
@@ -141,63 +141,60 @@ if test "x$OPT_OPENSSL" != xno; then
   LDFLAGS="$LDFLAGS $SSL_LDFLAGS"
 
   AC_CHECK_LIB(crypto, HMAC_Update,[
-     HAVECRYPTO="yes"
-     LIBS="-lcrypto $LIBS"
-     ],[
-     if test -n "$LIB_OPENSSL" ; then
-       LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
-     fi
-     if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
-       # only set this if pkg-config wasn't used
-       CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include"
-     fi
-     # Linking previously failed, try extra paths from --with-openssl or
-     # pkg-config.  Use a different function name to avoid reusing the earlier
-     # cached result.
-     AC_CHECK_LIB(crypto, HMAC_Init_ex,[
-       HAVECRYPTO="yes"
-       LIBS="-lcrypto $LIBS"], [
-
-       dnl still no, but what about with -ldl?
-       AC_MSG_CHECKING([OpenSSL linking with -ldl])
-       LIBS="-lcrypto $CLEANLIBS -ldl"
-       AC_LINK_IFELSE([ AC_LANG_PROGRAM([[
-         #include <openssl/err.h>
-       ]], [[
-         ERR_clear_error();
-       ]]) ],
-       [
-         AC_MSG_RESULT(yes)
-         HAVECRYPTO="yes"
-       ],
-       [
-         AC_MSG_RESULT(no)
-         dnl ok, so what about both -ldl and -lpthread?
-         dnl This may be necessary for static libraries.
-
-         AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
-         LIBS="-lcrypto $CLEANLIBS -ldl -lpthread"
-         AC_LINK_IFELSE([
-           AC_LANG_PROGRAM([[
-           #include <openssl/err.h>
-         ]], [[
-           ERR_clear_error();
-         ]])],
-         [
-           AC_MSG_RESULT(yes)
-           HAVECRYPTO="yes"
-         ],
-         [
-           AC_MSG_RESULT(no)
-           LDFLAGS="$CLEANLDFLAGS"
-           CPPFLAGS="$CLEANCPPFLAGS"
-           LIBS="$CLEANLIBS"
-
-         ])
-
-       ])
-
-     ])
+    HAVECRYPTO="yes"
+    LIBS="-lcrypto $LIBS"
+    ],[
+    if test -n "$LIB_OPENSSL" ; then
+      LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
+    fi
+    if test "$PKGCONFIG" = "no" -a -n "$PREFIX_OPENSSL" ; then
+      # only set this if pkg-config wasn't used
+      CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include"
+    fi
+    # Linking previously failed, try extra paths from --with-openssl or
+    # pkg-config.  Use a different function name to avoid reusing the earlier
+    # cached result.
+    AC_CHECK_LIB(crypto, HMAC_Init_ex,[
+      HAVECRYPTO="yes"
+      LIBS="-lcrypto $LIBS"], [
+
+      dnl still no, but what about with -ldl?
+      AC_MSG_CHECKING([OpenSSL linking with -ldl])
+      LIBS="-lcrypto $CLEANLIBS -ldl"
+      AC_LINK_IFELSE([ AC_LANG_PROGRAM([[
+        #include <openssl/err.h>
+      ]], [[
+        ERR_clear_error();
+      ]]) ],
+      [
+        AC_MSG_RESULT(yes)
+        HAVECRYPTO="yes"
+      ],
+      [
+        AC_MSG_RESULT(no)
+        dnl ok, so what about both -ldl and -lpthread?
+        dnl This may be necessary for static libraries.
+
+        AC_MSG_CHECKING([OpenSSL linking with -ldl and -lpthread])
+        LIBS="-lcrypto $CLEANLIBS -ldl -lpthread"
+        AC_LINK_IFELSE([
+          AC_LANG_PROGRAM([[
+          #include <openssl/err.h>
+        ]], [[
+          ERR_clear_error();
+        ]])],
+        [
+          AC_MSG_RESULT(yes)
+          HAVECRYPTO="yes"
+        ],
+        [
+          AC_MSG_RESULT(no)
+          LDFLAGS="$CLEANLDFLAGS"
+          CPPFLAGS="$CLEANCPPFLAGS"
+          LIBS="$CLEANLIBS"
+        ])
+      ])
+    ])
   ])
 
   if test X"$HAVECRYPTO" = X"yes"; then
@@ -284,7 +281,7 @@ if test "x$OPT_OPENSSL" != xno; then
         #ifndef OPENSSL_IS_AWSLC
         #error not AWS-LC
         #endif
-     ]])
+      ]])
     ],[
       AC_MSG_RESULT([yes])
       ssl_msg="AWS-LC"
@@ -296,7 +293,7 @@ if test "x$OPT_OPENSSL" != xno; then
     AC_MSG_CHECKING([for LibreSSL])
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM([[
-#include <openssl/opensslv.h>
+        #include <openssl/opensslv.h>
       ]],[[
         int dummy = LIBRESSL_VERSION_NUMBER;
       ]])
@@ -312,7 +309,7 @@ if test "x$OPT_OPENSSL" != xno; then
     AC_MSG_CHECKING([for OpenSSL >= v3])
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM([[
-#include <openssl/opensslv.h>
+        #include <openssl/opensslv.h>
       ]],[[
         #if (OPENSSL_VERSION_NUMBER >= 0x30000000L)
         return 0;
@@ -339,14 +336,14 @@ if test "x$OPT_OPENSSL" != xno; then
 
   if test "$OPENSSL_ENABLED" = "1"; then
     if test -n "$LIB_OPENSSL"; then
-       dnl when the ssl shared libs were found in a path that the run-time
-       dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
-       dnl to prevent further configure tests to fail due to this
-       if test "x$cross_compiling" != "xyes"; then
-         CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
-         export CURL_LIBRARY_PATH
-         AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH])
-       fi
+      dnl when the ssl shared libs were found in a path that the run-time
+      dnl linker doesn't search through, we need to add it to CURL_LIBRARY_PATH
+      dnl to prevent further configure tests to fail due to this
+      if test "x$cross_compiling" != "xyes"; then
+        CURL_LIBRARY_PATH="$CURL_LIBRARY_PATH:$LIB_OPENSSL"
+        export CURL_LIBRARY_PATH
+        AC_MSG_NOTICE([Added $LIB_OPENSSL to CURL_LIBRARY_PATH])
+      fi
     fi
     check_for_ca_bundle=1
     LIBCURL_PC_REQUIRES_PRIVATE="$LIBCURL_PC_REQUIRES_PRIVATE openssl"
@@ -356,7 +353,7 @@ if test "x$OPT_OPENSSL" != xno; then
 fi
 
 if test X"$OPT_OPENSSL" != Xno &&
-  test "$OPENSSL_ENABLED" != "1"; then
+   test "$OPENSSL_ENABLED" != "1"; then
   AC_MSG_NOTICE([OPT_OPENSSL: $OPT_OPENSSL])
   AC_MSG_NOTICE([OPENSSL_ENABLED: $OPENSSL_ENABLED])
   AC_MSG_ERROR([--with-openssl was given but OpenSSL could not be detected])
@@ -395,7 +392,7 @@ if test "$OPENSSL_ENABLED" = "1"; then
   AC_MSG_CHECKING([for SRP support in OpenSSL])
   AC_LINK_IFELSE([
     AC_LANG_PROGRAM([[
-#include <openssl/ssl.h>
+      #include <openssl/ssl.h>
     ]],[[
       SSL_CTX_set_srp_username(NULL, "");
       SSL_CTX_set_srp_password(NULL, "");
@@ -430,7 +427,7 @@ if test "$OPENSSL_ENABLED" = "1"; then
   AC_MSG_CHECKING([for QUIC support and OpenSSL >= 3.3])
   AC_LINK_IFELSE([
     AC_LANG_PROGRAM([[
-#include <openssl/ssl.h>
+      #include <openssl/ssl.h>
     ]],[[
       #if (OPENSSL_VERSION_NUMBER < 0x30300000L)
       #error need at least version 3.3.0
index dc47d4d9f404a0b1f8592841d94144ccbd8919d0..4d2aabfbc0331964e4dced8a5f9b80b568c2b8a2 100644 (file)
@@ -186,5 +186,4 @@ if test "x$OPT_RUSTLS" != xno; then
 fi
 ])
 
-
 RUSTLS_ENABLED
index f92fc18997eccdeca2e38eb604120a146113ce03..7da71346c7252a1510d9615988bd892d44250e5b 100644 (file)
@@ -28,14 +28,14 @@ case $host_os in
   darwin*)
     AC_COMPILE_IFELSE([
       AC_LANG_PROGRAM([[
-#include <sys/types.h>
-#include <TargetConditionals.h>
+        #include <sys/types.h>
+        #include <TargetConditionals.h>
       ]],[[
-#if TARGET_OS_MAC && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
-      return 0;
-#else
-#error Not macOS
-#endif
+        #if TARGET_OS_MAC && !(defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
+          return 0;
+        #else
+        #error Not macOS
+        #endif
       ]])
     ],[
       build_for_macos="yes"
index e8f4eae0d3e0f50dcb5d8114ae2b290a2d917824..b3f65ceef86b33f7801fb8a642e18d666f43fe7f 100644 (file)
@@ -80,8 +80,8 @@ if test "x$OPT_WOLFSSL" != xno; then
       LDFLAGS="$LDFLAGS $addld"
       AC_MSG_NOTICE([Add $addld to LDFLAGS])
       if test "$addcflags" != "-I/usr/include"; then
-         CPPFLAGS="$CPPFLAGS $addcflags"
-         AC_MSG_NOTICE([Add $addcflags to CPPFLAGS])
+        CPPFLAGS="$CPPFLAGS $addcflags"
+        AC_MSG_NOTICE([Add $addcflags to CPPFLAGS])
       fi
 
       my_ac_save_LIBS="$LIBS"
@@ -101,21 +101,21 @@ if test "x$OPT_WOLFSSL" != xno; then
           return wolfSSL_Init();
         ]])
       ],[
-         AC_MSG_RESULT(yes)
-         AC_DEFINE(USE_WOLFSSL, 1, [if wolfSSL is enabled])
-         AC_SUBST(USE_WOLFSSL, [1])
-         WOLFSSL_ENABLED=1
-         USE_WOLFSSL="yes"
-         ssl_msg="wolfSSL"
-         QUIC_ENABLED=yes
-         test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
-       ],
-       [
-         AC_MSG_RESULT(no)
-         CPPFLAGS=$_cppflags
-         LDFLAGS=$_ldflags
-         wolfssllibpath=""
-       ])
+        AC_MSG_RESULT(yes)
+        AC_DEFINE(USE_WOLFSSL, 1, [if wolfSSL is enabled])
+        AC_SUBST(USE_WOLFSSL, [1])
+        WOLFSSL_ENABLED=1
+        USE_WOLFSSL="yes"
+        ssl_msg="wolfSSL"
+        QUIC_ENABLED=yes
+        test wolfssl != "$DEFAULT_SSL_BACKEND" || VALID_DEFAULT_SSL_BACKEND=yes
+      ],
+      [
+        AC_MSG_RESULT(no)
+        CPPFLAGS=$_cppflags
+        LDFLAGS=$_ldflags
+        wolfssllibpath=""
+      ])
       LIBS="$my_ac_save_LIBS"
     fi
 
index af7a3d2d8b1b470884d42dcd482bb13745fccf44..e2225c2e5742bdbca8d5b913ba537a8634148439 100644 (file)
@@ -211,7 +211,7 @@ AC_DEFUN([XC_CHECK_USER_FLAGS], [
      test $xc_bad_var_cflags = yes ||
      test $xc_bad_var_ldflags = yes ||
      test $xc_bad_var_cppflags = yes; then
-     AC_MSG_ERROR([Can not continue. Fix errors mentioned immediately above this line.])
+    AC_MSG_ERROR([Can not continue. Fix errors mentioned immediately above this line.])
   fi
 ])
 
@@ -239,6 +239,6 @@ AC_DEFUN([XC_CHECK_BUILD_FLAGS], [
      test $xc_bad_var_cflags = yes ||
      test $xc_bad_var_ldflags = yes ||
      test $xc_bad_var_cppflags = yes; then
-     AC_MSG_WARN([Continuing even with errors mentioned immediately above this line.])
+    AC_MSG_WARN([Continuing even with errors mentioned immediately above this line.])
   fi
 ])