[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR
From: |
Stepan Kasal |
Subject: |
Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR |
Date: |
Wed, 20 Apr 2005 10:30:19 +0200 |
User-agent: |
Mutt/1.4.1i |
Hi again,
On Tue, Apr 19, 2005 at 09:49:25AM -0700, Paul Eggert wrote:
> > And why is it necessary to try to handle AC_CONFIG_LIBOBJ_DIR(/)?
>
> Paranoia, that's all.
The documentation says that AC_CONFIG_LIBOBJ_DIR specifies
"a name relative to the top level of the source tree"
Thus I believe the paranoia should be directed elsewhere.
Please see the patch attached to this mail. Can I commit it?
> Come to think of it, perhaps I wasn't paranoid enough. Is it possible
> for ac_config_libobj_dir to be empty?
I think your previous code handles this case correctly--expr fails and
empty string is returned.
My previous proposal was wrong, but I think we can use this variation of
your code:
ac_libobj_dir=
test "X$ac_config_libobj_dir" = X. ||
ac_libobj_dir=`expr "X$ac_config_libobj_dir/" : 'X\(.*[^/]\)'`
The most common case is that ac_config_libobj_dir is set to ".", as it
is the default set by Autoconf; it's good that this case is optimized
and doesn't call expr.
_If_ our checks fail, and ac_config_libobj_dir happens to be / (or more
slashes), then expr returns empty string. I see no problem here.
Have a nice day,
Stepan
autoconf-20050420-libobj_dir.patch
Description: Text document
Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR, Alexandre Duret-Lutz, 2005/04/18
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR, Gary V. Vaughan, 2005/04/20
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Gary V. Vaughan, 2005/04/20
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Paul Eggert, 2005/04/20
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Alexandre Duret-Lutz, 2005/04/21
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Gary V. Vaughan, 2005/04/25
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Alexandre Duret-Lutz, 2005/04/25
- Re: [PATCH] Support AC_CONFIG_LIBOBJ_DIR (fixes PR/401), Gary V. Vaughan, 2005/04/29