Mail Archives: djgpp-workers/2000/01/17/07:04:40
On Sun, 16 Jan 2000, Laurynas Biveinis wrote:
> Eli Zaretskii wrote:
> > Btw, I understand that the configure script was produced by the DJGPP
> > port of Autoconf. If so, that port needs more work, because the
> > produced configure script still has some of the Unix-centric
> > constructs that break on DOS/Windows. For example, the test for
> > absolute name near ac_given_INSTALL doesn't support drive letters. (I
> > can post a full list of problems, if someone is interested.)
>
> I would be interested, because my first step in porting any autoconf'ed
> program to DJGPP is regenerating configure script.
With the current Bash port and its TEST_FINDS_EXE feature, why is it
even necessary to generate a configure script? The ported Autoconf
doesn't seem to do much more than handle the test -f problem.
Anyway, here's the list of additional gotcha's in configure scripts
and Makefile's they produce:
1) The configure script includes fragments
case "$ac_given_srcdir" in
.) srcdir=.
if test -z "$ac_dots"; then top_srcdir=.
else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
/*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
*) # Relative path.
srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
top_srcdir="$ac_dots$ac_given_srcdir" ;;
esac
case "$ac_given_INSTALL" in
[/$]*) INSTALL="$ac_given_INSTALL" ;;
*) INSTALL="$ac_dots$ac_given_INSTALL" ;;
esac
The "/*)" and "[/$]*)" wildcards don't support DOS-style file
names with drive letters. This breaks the script if you try to
configure the package from a directory on a different drive.
2) The following line also breaks when a drive letter is present in
file names:
ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
To make it work, the order of the two -e commands passed to Sed
should be reversed: first remove the (artificially added) colon,
*then* put back the leading directories.
3) The file-name changes such as config.h.in -> config.h-in,
Makefile.in.in -> Makefile.in-in, etc. must be done in the
Makefile's as well (to prevent problems like the one we just
discussed). One way of doing this is to add some Sed commands to
the part of the configure script that edits Makefile.in into
Makefile.
4) Some Makefile's, notably those in the test suite supplied with the
package, set PATH before invoking programs, like this:
foo: bar
PATH=$(here):"$PATH" make_foo_from_bar
You need to edit : into ";" (note the quotes!). There's a similar
problem with TEXINPUTS (in the doc subdirectory).
These two are actually Automake problems, but my attempts to get
Automake changed, backed by some very helpful people like Alain
Magloire and Francois Pinard, didn't have any visible success yet,
so for now this needs to be done either by Autoconf or manually.
Again, the way I do it is to add suitable Sed commands to the
modified configure script, so these changes are done when
Makefile's are generated from Makefile.in's.
- Raw text -