[Top][All Lists]

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

Re: Fw: bug in texi2dvi, and hack patch

From: Eric Blake
Subject: Re: Fw: bug in texi2dvi, and hack patch
Date: Wed, 19 Jan 2005 05:36:26 -0700
User-agent: Mozilla Thunderbird 1.0 (Windows/20041206)

Hash: SHA1

[cross-posted to autoconf, thread starts at]

According to Eli Zaretskii on 1/18/2005 1:18 PM:
>>Date: Tue, 18 Jan 2005 06:29:08 -0700
>>From: Eric Blake <address@hidden>
>>Cc: address@hidden, address@hidden
>>Instead of using $COMSPEC for determining the path
>>separator, you should use autoconf's approach (look at any recent
>>configure script generated by autoconf 2.59 for this snippet):
>>if test "${PATH_SEPARATOR+set}" != set; then
>>  echo "#! /bin/sh" >conf$$.sh
>>  echo  "exit 0"   >>conf$$.sh
>>  chmod +x conf$$.sh
>>  if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
>>  else
>>  fi
>>  rm -f conf$$.sh
> If this is what Autoconf 2.59 really does (i.e., no typos etc. in this
> snippet), then Autoconf 2.59 is broken, at least for DJGPP, because it
> will always produce PATH_SEPARATOR=:.  This is because it invalidates
> PATH, and therefore defeats the DJGPP magic that looks for sh.exe
> along PATH if /bin/sh.exe does not exist.  (And /bin/sh.exe does not
> exists on almost every DJGPP installation.)

If this is true about DJGPP, then autoconf needs to revisit how
PATH_SEPARATOR is calculated.

> Instead of such complicated jumps through the hoops, I'd suggest to
> keep the original test, but augment it with something specific to
> Cygwin.  Is there some environment variable, like OSTYPE or something,
> whose value shows that a Cygwin Bash is being run?  If there is such a
> variable, we could look at it in addition to COMSPEC.

There is always the uname utility, although I'm not sure it is the best
case `uname` in
  CYGWIN*) path_sep=: ;;

>>Additionally, according to autoconf, `test -x' is not portable.
> But needed for DJGPP/MinGW, where "test -f tex" does not find tex.exe,
> but "test -x tex" does.
> So if this is changed to not use "test -x", the non-Posix systems will
> still need "test -x" (which is okay for those systems, since the
> ported Bash supports "test -x").

CVS Autoconf also tackled this issue, see

>>Your best bet may be to make texi2dvi a generated file from
>>, and let autoconf determine @PATH_SEPARATOR@ and even
>>the location of tex up front at configure time
> Again, doing the latter (i.e. determining the location of TeX at
> configure time) might be okay on Posix systems, but not on
> DJGPP/MinGW, since it is _very_ customary on those systems to download
> pre-compiled binaries, and thus configure-time settings are usually
> invalid.  (Actually, I think Cygwin users will not like your
> suggestion either, since AFAIK they, too, tend to download binaries.)

But on cygwin downloads, they tend to be to a normalized path (ie the
cygwin installation point is normalized to /, all pre-compiled cygwin
binaries are put in /bin, and /usr/bin is mounted to /bin), so even if the
tex executable is downloaded to something as outrageous as 'q:\my
hairy\windows\path\cygwin\bin', the precompiled binary still sees it at
/usr/bin because of the PATH normalization going on.

- --
Life is short - so eat dessert first!

Eric Blake             address@hidden
Version: GnuPG v1.4.0 (Cygwin)
Comment: Using GnuPG with Thunderbird -


reply via email to

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