Mail Archives: djgpp-workers/2000/12/31/19:07:42
> Now I'm confused. I think I don't understand what do you need this
> test for. The "# Hooray! DJGPP!" comment seemed to imply you want to
> know this is a DJGPP build, but now it looks like you are using it for
> something different?
As I explained before, the test here is to make configure run without
problems on a DJGPP system (ie using our bash and tools). It does NOT
have anything to do with the package we're configuring (that's what the
AC_DJGPP macro is for (or AC_CANONICAL_TARGET, or whatever).
> If you want to test whether you are running on DOS/Windows,
> /dev/env/DJDIR is not safe enough, I think. In general, it's always
> better to test exactly what you want to know, as opposed to testing
> something that is only a circumstantial evidence. If you want to know
> whether you are running on DOS/Windows, try some feature that will
> tell you unequivocally that you are on DOS.
Usually, I need specific DJGPP behaviour or tools (eg dtou), so I test
for DJGPP. Otherwise, I could just use test -n "$COMSPEC$ComSpec" to
detect DOS/Win/WinNT.
> > Currently, I use this test at each point I added DJGPP-specific code.
> What DJGPP-specific code is that, and why did you need to add it?
'Code' is a bit misleading here I guess, since it's usually shell
commands; for a list of the places where I use the test (and why), see
my mail of 2000/12/29 18:55.
- Raw text -