bug-autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: config.status gets too many copies of precious variables [2.52, patc


From: Paul Eggert
Subject: Re: config.status gets too many copies of precious variables [2.52, patch]
Date: Mon, 26 Nov 2001 21:37:08 -0800 (PST)

> From: Aaron Ucko <address@hidden>
> Date: 26 Nov 2001 12:21:25 -0500

> +   # Filter out dups.
> +   for ac_existing_arg in $ac_configure_args; do
> +     test "x$ac_arg" = "x$ac_existing_arg" && continue 2
> +   done

Suggestion: don't use "continue 2", as it's not portable to ancient
shells.  Also, it seems to me that the above loop isn't always correct
with args that need escaping.


> +     ac_arg_seen=false
> +     for ac_existing_arg in $ac_configure_args; do
> +       if test "x$ac_existing_arg" = "x$ac_arg"; then
> +         ac_arg_seen=true
> +         break
> +       fi
> +     done
> +     test $ac_arg_seen = false && ac_configure_args="$ac_configure_args 
> '$ac_arg'"

Can't this be done more readably (and efficiently) with something like
the following?

case "$ac_configure_args " in
*" '$ac_existing_arg' "*) ;;
*) ac_configure_args="$ac_configure_args '$ac_arg'";;
esac

Presumably the "Filter out dups" code can also be rewritten in that way?

Perhaps you can propose a revised patch with these suggestions in mind.
(I like the basic idea, in case that isn't clear from my comments.)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]