Rob Lahaye wrote:
>
>
> Patch attached, does following:
>
> 1) Improve the GNUM4 locating part, including above if-statement.
>
> 2) Move ACLOCAL, AUTOHEADER, AUTOMAKE, AUTOCONF to top of file.
>
> 3) Always print out the autoconf version, even for 2.13 and 2.53.
How about having the following lines at the top of autogen.sh:
-----------------------------------------------------------------
#!/bin/sh
[ -z ${ACLOCAL} ] && ACLOCAL=aclocal
[ -z ${AUTOHEADER} ] && AUTOHEADER="autoheader"
[ -z ${AUTOMAKE} ] && AUTOMAKE="automake -a -c --foreign"
[ -z ${AUTOCONF} ] && AUTOCONF="autoconf"
# Discover what version of autoconf we are using.
autoversion=`${AUTOCONF} --version | head -n 1`
[...]
-----------------------------------------------------------------
Users can then first do a "setenv AUTOCONF autoconf213", or even
"setenv AUTOCONF /my/own/dir/autoconf" to enforce the correct autoconf
version before running the autogen.sh script.
Since some people already complained about the support for only few
autotool versions, it may be good to add a bit more flexibility in
setting the autotool's commands before running the script.
===
I'm not too much of an autotool expert, but I'm actually wondering why this
autogen.sh script is still used. Why can't the regular Makefile do the same,
by simply adding the required dependencies?
For example, why not having in the Makefile something like:
ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 codeset.m4 gettext.m4 glibc21.m4 \
iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 xforms.m4 qt2.m4 \
gtk--.m4 gnome--.m4 gnome.m4 pspell.m4 pkg.m4"
acinclude.m4: ${ACINCLUDE_FILES}
for dir in . lib/reLyX ; do
echo " $dir"
( cd $dir ; $ACLOCAL )
done
Or something like this. Same for the other autotools.
Rob.