From: "Tim Van Holder" To: Subject: RE: Ribust shell-based test for DJGPP? Date: Mon, 1 Jan 2001 01:11:25 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: <7443-Sun31Dec2000203340+0200-eliz@is.elta.co.il> Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id TAA07901 Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > 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.