autoconf-patches
[Top][All Lists]
Advanced

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

Re: Logging --version


From: Akim Demaille
Subject: Re: Logging --version
Date: 04 Apr 2001 17:16:46 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley)

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

Alexandre> On Apr 3, 2001, Akim Demaille <address@hidden> wrote:
>> First here is the result.  Look for --version in there.  Please,
>> tell me if you think using --version can be risky, i.e., if running
>> a program we AC_CHECK_PROG for is bad.

Alexandre> Well...  Sometimes you just can't run a program you find
Alexandre> (think of cross-compiling).

I agree, but the code is meant to be robust to this.  Nothing bad can
happen, it has no influence on configure.

Alexandre> Sometimes the program doesn't understand --version, and may
Alexandre> just start reading from stdin (so that configure hangs
Alexandre> forever), 

hence my </dev/null :)

Alexandre> or doing something totally unexpected.

This is what I fear.  What could happen?

The a2ps suite has a program named `card' which prints a ref card for
programs (give a try to `card gcc -- -=display' for instance (it won't
print, just display)).  It tries --help, -h and a few others.  Up to
now there was no complaint about undesired side effects, and card was
created in 1997.

Alexandre> And then, many times, it just won't do anything useful, and
Alexandre> all you'll get is a message telling the usage of the
Alexandre> program, because it doesn't understand --version.

Which is a form of information on the program!  This is no kidding, I
mean it!

Alexandre> I'd rather special-case --version so that we only do it
Alexandre> when we know it's a reasonable safe thing to do.

Say, compilers?  Or can we use some inert means to get pertinent
information?  ISTR there is a rather common command to gather RCS
version strings in binaries, but I forgot which one.  And IIRC it is
mostly used in proprietary software, much less in the free world.

Grepping for version in `strings PROG' is very useless, as in most
cases the version is not hard coded.  For instance on GCC it gives a
lot of junk and

gcc version %s
gcc driver version %s executing gcc version %s

:) :) :)

Still, I am not in favor of applying this code in 2.50, and I'm
debating for the future.  Nevertheless, I'd like to apply the `found'
part which spells out the directory where the prog was found.  What do
you think about it?


PS/ Of course there is an obvious solution everybody did think about,
but we don't comment because it's a bit painful and unsatisfying:
AC_LOG_VERSION or something.  If we can't find a robust automated
means to reach this result, we'll end up with it I guess.  But the
goal is to let the maintainers have all the information they need
without having to think *beforehand* what information  they _will_
need.  config.log should be fat :)



reply via email to

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