From cb7558af39301649f6c166eb524fc7a5b40e8153 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 14 Nov 2024 23:28:42 +0100 Subject: [PATCH] configure: replace `$#` shell syntax With a more portable alternative. Fixes (seen on macOS): ``` ../configure: line 47131: 1: command not found ``` Ref: https://github.com/curl/curl/actions/runs/11846071276/job/33012894013#step:7:635 Follow-up to e244d50064a56723c2ba4f0df8c847d6b70de0cb #15550 Closes #15584 --- configure.ac | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index 806f11da90..8026ae83c5 100644 --- a/configure.ac +++ b/configure.ac @@ -5084,13 +5084,13 @@ dnl LIBCURL_PC_LDFLAGS_PRIVATE='' dnl Do not quote $INITIAL_LDFLAGS set -- $INITIAL_LDFLAGS -while [ "$#" -gt 0 ]; do +while test -n "$1"; do case "$1" in -L* | --library-path=* | -F*) LIBCURL_PC_LDFLAGS_PRIVATE="$LIBCURL_PC_LDFLAGS_PRIVATE $1" ;; -framework) - if [ "$#" -gt 1 ]; then + if test -n "$2"; then LIBCURL_PC_LDFLAGS_PRIVATE="$LIBCURL_PC_LDFLAGS_PRIVATE $1 $2" shift fi -- 2.47.3