Peter Gerwinski wrote:
The African Chief wrote:
Like I said before, I can't do anything with "configure" under Win32. The system simply fails to recognise the script as something that it can execute. This is so even when trying to run the script under Bash. Since this script seems really to be a unix thing, perhaps an alternative could be made for non-unix systems? - basically, either to translate the "configure" script into batch commands that the Dos or Windows command interpreters can process (which is probably impossible, because the script seems too complex to translate into a Dos batch file) or to write a Pascal (or C) program that does everything that the "configure" script does. I would do this myself (i.e., translate into a Pascal program) if I understood the script - but I don't (at least, not most of it).
If bash already works under mingw, it should be far easier (and a one-time effort) to get the script run by bash than translating it after each release.
You might want to try to run the script as 'bash configure' (telling the command interpreter explicitly to run it with bash). This might work, but still run into problems later if it (or something else) tries to execute another script, but it might be worth a try...
Maybe the script expects a program "\bin\sh.exe" because the first line reads "#!/bin/sh". This problem once occured under DJGPP ...
But by now they've patched bash to avoid this problem, or why doesn't it occur anymore? So, perhaps a similar (or even the same) patch might do for mingw...
You might want to ask the one who ported bash to mingw or cygwin how to make it run a script -- he's probably the one who ought to know best --, or ask the DJGPP people how they solved the problem...
PS: Perhaps I can get bash to run the script. If I try to run "configure.in", bash seems to start trying to run it, and then finally chokes. However, with "configure", it just says that the file does not exist - which is not true. Doing "ls -all config*" shows that the attributes of "configure.in" are "-rw-r--r--", while those of "configure" are "-rwxr-xr-x". Is the difference significant?
Yes - `x' means "eXecutable".
If so, what parameters do I pass to "chmod" so as to change the attributes of "configure" to the same one as "configure.in"?
chmod +x configure.in
Isn't this the wrong way around? According to the permissions as given above, configure should be executable, and configure.in should not.
Anyway, I suppose, since configure.in does not contain a `#!' in the first line, it is executed by bash, which also happens under Linux (though that's not the right thing to do with this file, because it's not a script, just a template for a script, but that's another issue). But the explicit /bin/sh in configure causes problems (see above).
BTW, does it work if you actually create a \bin directory and put bash in it (as a temporary solution)?
Frank