From: Viktor Szakats Date: Sun, 7 Jul 2024 17:32:09 +0000 (+0200) Subject: configure: sort feature list, lowercase protocols, use backticks X-Git-Tag: curl-8_9_0~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=59bc9a1d4440a30b1652f22e8b13bbee163b0a9c;p=thirdparty%2Fcurl.git configure: sort feature list, lowercase protocols, use backticks - 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 --- diff --git a/configure.ac b/configure.ac index 45263f18e1..91565c972d 100644 --- a/configure.ac +++ b/configure.ac @@ -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 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} ]) diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index f0860ddbbd..d1ef5e70dd 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -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])