autoconf-patches
[Top][All Lists]
Advanced

[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:09:59 +0200

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.

autoconf.add_basenametest.gz
  -- 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.

autoconf.fix_basename.gz
  -- 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'.

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

autoconf.fix_prefix.path.gz
  -- 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
describes:

`dirname'
     Not all hosts have `dirname', but it is reasonably easy to emulate,
e.g.:

          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.gz
Description: GNU Zip compressed data

Attachment: autoconf.fix_basename.gz
Description: GNU Zip compressed data

Attachment: autoconf.fix_basetest.gz
Description: GNU Zip compressed data

Attachment: autoconf.fix_prefix.path.gz
Description: GNU Zip compressed data


reply via email to

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