autoconf-patches
[Top][All Lists]
Advanced

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

Re: Portability of AC_ARG_PROGRAM


From: Akim Demaille
Subject: Re: Portability of AC_ARG_PROGRAM
Date: 21 Jun 2001 10:41:14 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor)

>>>>> "Alexandre" == Alexandre Oliva <address@hidden> writes:

>> I'm in favor of removing AC_ARG_PROGRAM and considering it as part
>> of the standard ./configure interface.

Alexandre> Is this meant to force programs to use it?

To have a standard interface for users, and simpler for maintainers,
yes.

>> The worse part being that without AC_ARG_PROGRAM, --program-prefix
>> etc. are accepted, but ignored.

Alexandre> Having AC_ARG_PROGRAM by default won't change this fact:
Alexandre> many programs don't use program_transform_name at all.

That's right.


>> -if test "$program_transform_name" = s,x,x,; then +test
>> $program_transform_name = s,x,x, &&

Alexandre> I don't like the fact that program_transform_name is no
Alexandre> longer quoted.  

Oops, thanks.

Alexandre> In fact, I don't see a reason to drop the if/then/fi around
Alexandre> this setting; I generally regard && as a replacement for if
Alexandre> as obfuscated shell programming.

The layout had completely changed, precisely because setting
program_transform_name to nothing was complicating things.

But finally I changed the layout again and moved to this:

test "$program_prefix" != NONE &&
  program_transform_name="s,^,$program_prefix,;$program_transform_name"
# Use a double $ so make ignores it.
test "$program_suffix" != NONE &&
  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
# Double any \ or $.  echo might interpret backslashes.
# By default was `s,x,x', remove it if useless.
cat <<\_ACEOF >conftest.sed
s/[\\$]/&&/g;s/;s,x,x,$//'
_ACEOF
program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
rm conftest.sed


Do you think we need the heredoc here?



reply via email to

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