[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fw: bug in texi2dvi, and hack patch
From: |
Stepan Kasal |
Subject: |
Re: Fw: bug in texi2dvi, and hack patch |
Date: |
Tue, 25 Jan 2005 11:55:24 +0100 |
User-agent: |
Mutt/1.4.1i |
Hi,
On Mon, Jan 24, 2005 at 09:58:16PM +0200, Eli Zaretskii wrote:
> > AC_SUBST(TESTF, "test -f")
> > testfile=conf$$.exe
> > touch $testfile
> > if test -x $testfile; then
> > test -f $testfile || TESTF=:
> > fi
> > rm -f $testfile
this code was full of silly bugs, sorry. I apologize for the confusion.
I meant:
AC_SUBST(TESTF, "test -f")
cat >conf$$.exe <<_ASEOF
#! /bin/sh
exit 0
_ASEOF
chmod +x conf$$.exe
if test -x conf$$; then
test -f conf$$ || TESTF=:
fi
rm -f conf$$.exe
The idea is to set TESTF=: on platforms where test -x looks for .exe,
while test -f doesn't (eg. on DJGPP). TESTF is "test -f" on all other
platforms.
We use AC_SUBST to replace occurences of @TESTF@ in texi2dvi.in.
> > and use
> > for dir in $PATH; do
> > if test -x "$dir/$1" && @TESTF@ "$dir/$1"; then
> > or
> > testf="@TESTF@"
> > ...
> > for dir in $PATH; do
> > if test -x "$dir/$1" && $testf "$dir/$1"; then
> >
> > in texi2dvi.in .
> > Another way to fix the problem is to adopt the solution used by autoconf:
> > make sure that the variable $ac_executable_extensions, which is set in
> > config.site on some platforms, gets substituted:
> >
> > AC_SUBST(ac_executable_extensions)
> >
> > and put the following to texi2dvi.in:
> >
> > for dir in $PATH; do
> > for exec_ext in '' @ac_executable_extensions@; do
> > if test -f "$dir/$1" && test -x "$dir/$1"; then
> > ...
>
> I'm okay with this method, provided that ac_executable_extensions can
> be computed reliably (you didn't say how).
AFAIK, ac_executable_extensions is not computed. It is set in config.site
which is included by configure at the beginning of its run.
It is responsibility of the installer of Cygwin or DJGPP to create this
file in a place where configure can find it.
The variable CONFIG_SITE can be set, or the file can be placed to
$prefix/share/config.site or $prefix/etc/config.site
See "(autoconf.info)Site Defaults" for details.
HTH,
Stepan
- Re: AS_EXECUTABLE_P again -- summary (was: bug in texi2dvi, and hack patch), (continued)
- Re: AS_EXECUTABLE_P again -- summary (was: bug in texi2dvi, and hack patch), Eli Zaretskii, 2005/01/22
- Re: AS_EXECUTABLE_P again -- summary (was: bug in texi2dvi, and hack patch), Stepan Kasal, 2005/01/22
- Re: AS_EXECUTABLE_P again -- summary (was: bug in texi2dvi, and hack patch), Eli Zaretskii, 2005/01/22
- Re: AS_EXECUTABLE_P again -- summary (was: bug in texi2dvi, and hack patch), Stepan Kasal, 2005/01/24
- Re: AS_EXECUTABLE_P again -- summary, Eric Blake, 2005/01/22
- Re: AS_EXECUTABLE_P again -- summary, Eli Zaretskii, 2005/01/23
- Re: AS_EXECUTABLE_P again -- summary, Eric Blake, 2005/01/23
- Re: Fw: bug in texi2dvi, and hack patch, Karl Berry, 2005/01/23
- Re: Fw: bug in texi2dvi, and hack patch, Stepan Kasal, 2005/01/24
- Re: Fw: bug in texi2dvi, and hack patch, Eli Zaretskii, 2005/01/24
- Re: Fw: bug in texi2dvi, and hack patch,
Stepan Kasal <=
- Re: Fw: bug in texi2dvi, and hack patch, Eli Zaretskii, 2005/01/25