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 e244d50064 #15550
Closes #15584
This commit is contained in:
Viktor Szakats 2024-11-14 23:28:42 +01:00
parent 9eb5c7cff9
commit cb7558af39
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -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