[Top][All Lists]

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

AC_PREFIX_PATH, AS_BASENAME fixes and a new test!

From: Paul Wagland
Subject: AC_PREFIX_PATH, AS_BASENAME fixes and a new test!
Date: Mon, 17 Sep 2001 11:30:45 +0200

Sorry, this is just a resend without all of the patches being compressed....
my mistake...
Hi all,

Hope you find these useful, there are actually five patches here, but I put
two of them into the same file. I will describe the patch attachments and
the bugs fixed or features added.

  -- This adds in a whole new test group for AS_BASENAME, and also adds a
few new tests for AS_DIRNAME to ensure that /, // and /// are handled
correctly. Without the next patch, the AS_BASENAME test will fail.

  -- Fixes AS_BASENAME :-). Currently AS_BASENAME just cuts everything
before the last '/', whereas it is meant to return the last "segment"
(according to the program anyway). This means that AS_BASENAME(a/b/c/) would
return the wrong thing i.e. '' instead of 'c'.

  -- When running 'make check' These two tests fail, but only because the
error lines are one off from what is expected.

  -- In autoconf 2.13, and in the info pages, it states that AC_PREFIX_PATH
will return the prefix of a binary. the examples given are using gcc located
in '/usr/local/bin/gcc' should return '/usr/local'. autoconf 2.13 does do
this! the current CVS does not! it returns '/usr/local/bin'. This patch
corrects that behaviour.

Finally, maybe this should be discussed elsewhere, but there should be a fix
to the info documentation. In the section on unreliable commands it

     Not all hosts have `dirname', but it is reasonably easy to emulate,

          dir=`expr "x$file" : 'x\(.*\)/[^/]*' \|
                    '.'      : '.'

Perhaps this should refer to the AS_DIRNAME macro, as it is actually
guaranteed to work, since it has the sed fallback...

Maybe there should also be a section added on the basename command? If
people agree, then I will make up a patch for the english documentation.
Please let me know.

Hope you find this useful,
-- Paul

Attachment: autoconf.add_basenametest
Description: Binary data

Attachment: autoconf.fix_basename
Description: Binary data

Attachment: autoconf.fix_basetest
Description: Binary data

Attachment: autoconf.fix_prefix.path
Description: Binary data

reply via email to

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