]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: sort feature list, lowercase protocols, use backticks
authorViktor Szakats <commit@vsz.me>
Sun, 7 Jul 2024 17:32:09 +0000 (19:32 +0200)
committerViktor Szakats <commit@vsz.me>
Tue, 9 Jul 2024 02:13:04 +0000 (04:13 +0200)
- sort features case-insensitively to match `curl -V` and cmake.
  `sort -f` is POSIX, but check if it's available anyway.

- make protocols lowercase to match `curl -V` and cmake.

- replace two outlier `$()` with backticks.

Closes #14117

configure.ac
m4/curl-functions.m4

index 45263f18e17be0ff0ce40d9b5c8bdaec81bd477b..91565c972db43f210cfa43db91ce966b569d38cf 100644 (file)
@@ -3544,7 +3544,7 @@ case "$OPT_FISH_FPATH" in
     dnl --with-fish-functions-dir option used without path
     CURL_CHECK_PKGCONFIG(fish)
     if test "$PKGCONFIG" != "no" ; then
-      FISH_FUNCTIONS_DIR="$($PKGCONFIG --variable completionsdir fish)"
+      FISH_FUNCTIONS_DIR=`$PKGCONFIG --variable completionsdir fish`
     else
       FISH_FUNCTIONS_DIR="$datarootdir/fish/vendor_completions.d"
     fi
@@ -4858,7 +4858,11 @@ fi
 dnl replace spaces with newlines
 dnl sort the lines
 dnl replace the newlines back to spaces
-SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '`
+if sort -f </dev/null >/dev/null 2>&1; then
+  SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort -f | tr '\012' ' '`
+else
+  SUPPORT_FEATURES=`echo $SUPPORT_FEATURES | tr ' ' '\012' | sort | tr '\012' ' '`
+fi
 AC_SUBST(SUPPORT_FEATURES)
 
 dnl For supported protocols in pkg-config file
@@ -5011,6 +5015,8 @@ AC_OUTPUT
 
 CURL_GENERATE_CONFIGUREHELP_PM
 
+SUPPORT_PROTOCOLS_LOWER=`echo "$SUPPORT_PROTOCOLS" | tr A-Z a-z`
+
 AC_MSG_NOTICE([Configured to build curl/libcurl:
 
   Host setup:       ${host}
@@ -5057,7 +5063,7 @@ AC_MSG_NOTICE([Configured to build curl/libcurl:
   HTTP3:            ${curl_h3_msg}
   ECH:              ${curl_ech_msg}
   WebSockets:       ${curl_ws_msg}
-  Protocols:        ${SUPPORT_PROTOCOLS}
+  Protocols:        ${SUPPORT_PROTOCOLS_LOWER}
   Features:         ${SUPPORT_FEATURES}
 ])
 
index f0860ddbbd46d00aa902fd9ba0b481c92921d2f8..d1ef5e70dd0895e3af1d3dc032532b16d46b030e 100644 (file)
@@ -5004,7 +5004,7 @@ $2
   fi
   AC_MSG_RESULT($r)
   dnl lowercase and underscore instead of space
-  tname=$(echo "ac_cv_sizeof_$1" | tr A-Z a-z | tr " " "_")
+  tname=`echo "ac_cv_sizeof_$1" | tr A-Z a-z | tr " " "_"`
   eval "$tname=$r"
 
   AC_DEFINE_UNQUOTED(TYPE, [$r], [Size of $1 in number of bytes])