www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/04/19/07:15:16

Date: Sun, 19 Apr 1998 14:13:33 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: telford AT xenon DOT triode DOT net DOT au
cc: djgpp AT delorie DOT com
Subject: Re: GNU autoconf problems...
In-Reply-To: <6h4vtb$oae$2@hyperion.triode.net.au>
Message-ID: <Pine.SUN.3.91.980419135750.23362K-100000@is>
MIME-Version: 1.0

On 16 Apr 1998 telford AT xenon DOT triode DOT net DOT au wrote:

> For a start, configure has 9 character so it comes out
> strange in win95.

Huh?  Last time I checked Windows 95 supported long file names, so a name 
like `configure' should be okay.

> More seriously, it depends on it's first line
> which is #!/bin/sh requiring some sh command in the %djgpp%\bin
> directory. I found that copying bash to sh worked OK to get configure
> started 

You don't need to copy, just to create a ``symlink'', like this:

	cd %djdir%\bin
	ln -s bash sh

(assuming you have ln.exe from the DJGPP port of GNU Fileutils).

> but things get worse... The autoconf program generates
> configure scripts that search for available utilities by scanning
> through the PATH environment variable using a shell script for
> loop. The DJGPP PATH is DOS-like and uses `;' as a separator --
> the for loop can't cope with this so it doesn't scan the PATH.
> Can it get worse? yes.
> The shell script looks for utilities that have a name matching the
> names that it is looking for (seems an obvious method).
> This works in unix but oh dear, DOS names have a .EXE on the
> end for all utility programs (gcc.exe in particular).

It is a pity that you tried to reinvent the wheel without looking at how 
others have accomplished that feat.  Even posting a question to this 
forum about running `configure' scripts would probably save you a lot of 
the grief.

For example, assuming you have the DJGPP port of Bash installed, the 
above two problems are miraculously solved by the following these
simple steps:

  - edit the script and replace all cases of "test -f" with "test -x";
  - run the script by typing these lines from the DOS prompt:

	set PATH_SEPARATOR=:
	set PATH_EXAPND=y
	set CONFIG_SHELL=bash
	bash ./configure

Some scripts need a bit more tweaking, but the above setup goes a long 
way towards running every single configure script I've seen.

You might consider downloading some of the newer source distributions 
from the v2gnu directory on DJGPP ftp sites to see examples of how 
configure scripts are run using DJGPP tools.  Mots of the latest DJGPP 
ports were done by using the original configure scripts with minimal 
changes as described above.

> Somewhere around this point I figured it was time to give up
> with configure scripts in DJGPP.

I suggest you try using the scripts again, using the above guidelines. 
I'm positive that whatever problems will be left after the above-mentioned
tricks, you could either figure them out or ask here and get ideas for
solving them.  Several people have succeeded in solving them, so there's 
no reason why you shouldn't be one of them.

> Seems to me that just about all of DJGPP is made from special
> cases... Are there many variations in DJGPP environments that
> should be handled? Does anyone attempt to handle this sort of
> thing automatically?

At least in the packages I ported to DJGPP, the configure scripts run 
without any problems on every machine.  (Sure, there were some bugs, but 
they were reported to me and corrected.)  It's a bit tricky in the 
beginning, but given some practice, it tirns out to be quite routine.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019