1999-09-27 18:44:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2002-08-07 22:45:38 +00:00
|
|
|
# Discover what version of autoconf we are using.
|
|
|
|
autoversion=`autoconf --version | head -n 1`
|
|
|
|
|
|
|
|
case $autoversion in
|
|
|
|
*2.13)
|
|
|
|
cp config/acconfig.h .
|
|
|
|
cp config/configure.in .
|
2002-09-10 15:00:40 +00:00
|
|
|
rm -f configure.ac
|
2002-08-07 22:45:38 +00:00
|
|
|
cp config/relyx_configure.in lib/reLyX/configure.in
|
2002-09-10 15:00:40 +00:00
|
|
|
rm -f lib/reLyX/configure.ac
|
2002-08-07 22:45:38 +00:00
|
|
|
;;
|
2002-09-10 15:00:40 +00:00
|
|
|
*2.5[23])
|
|
|
|
rm -f acconfig.h
|
|
|
|
rm -f configure.in
|
2002-08-07 22:45:38 +00:00
|
|
|
cp config/configure.ac .
|
2002-09-10 15:00:40 +00:00
|
|
|
rm -f lib/reLyX/configure.in
|
2002-08-07 22:45:38 +00:00
|
|
|
cp config/relyx_configure.ac lib/reLyX/configure.ac
|
|
|
|
;;
|
|
|
|
*)
|
2002-08-10 12:56:27 +00:00
|
|
|
echo "You are running autoconf $autoversion, that"
|
|
|
|
echo "version is not supported by LyX."
|
2002-08-07 22:45:38 +00:00
|
|
|
echo "LyX only supports autoconf 2.13 and 2.53."
|
|
|
|
exit
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
ACLOCAL=aclocal
|
2002-08-08 09:07:11 +00:00
|
|
|
AUTOHEADER="autoheader"
|
1999-09-27 18:44:28 +00:00
|
|
|
AUTOMAKE="automake -a -c --foreign"
|
2002-08-08 09:07:11 +00:00
|
|
|
AUTOCONF="autoconf"
|
2000-01-08 21:02:58 +00:00
|
|
|
GNUM4=
|
|
|
|
|
2002-09-12 15:21:40 +00:00
|
|
|
ACINCLUDE_FILES="lyxinclude.m4 libtool.m4 codeset.m4 gettext.m4 glibc21.m4 iconv.m4 isc-posix.m4 lcmessage.m4 progtest.m4 xforms.m4 qt.m4 gtk--.m4 gnome--.m4 gnome.m4 pspell.m4 pkg.m4"
|
2001-07-04 10:29:40 +00:00
|
|
|
SIGCPP_ACINCLUDE_FILES="libtool.m4"
|
|
|
|
|
2000-01-12 11:16:01 +00:00
|
|
|
echo -n "Locating GNU m4... "
|
2000-01-08 21:02:58 +00:00
|
|
|
for prog in $M4 gm4 gnum4 m4 ; do
|
|
|
|
case `$prog --version 2>&1` in
|
|
|
|
*GNU*) ok=yes
|
2002-04-18 13:11:28 +00:00
|
|
|
GNUM4=$prog
|
2000-01-08 21:02:58 +00:00
|
|
|
echo "found: $GNUM4"
|
|
|
|
break ;;
|
|
|
|
*) ;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
if test x$ok = xno ; then
|
|
|
|
echo "not found."
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Generate acinclude.m4
|
2000-01-12 11:16:01 +00:00
|
|
|
echo -n "Generate acinclude.m4... "
|
2002-05-29 16:21:03 +00:00
|
|
|
rm -f acinclude.m4
|
2001-07-04 10:29:40 +00:00
|
|
|
(cd config ; cat ${ACINCLUDE_FILES} >../acinclude.m4)
|
2000-01-08 21:02:58 +00:00
|
|
|
echo "done."
|
1999-09-27 18:44:28 +00:00
|
|
|
|
|
|
|
# Generate the Makefiles and configure files
|
2002-07-08 15:00:54 +00:00
|
|
|
if ( $ACLOCAL --version ) </dev/null > /dev/null 2>&1; then
|
2001-02-12 14:09:09 +00:00
|
|
|
echo "Building macros..."
|
2002-05-29 16:21:03 +00:00
|
|
|
for dir in . lib/reLyX ; do
|
2001-02-13 15:33:30 +00:00
|
|
|
echo " $dir"
|
2001-02-12 14:09:09 +00:00
|
|
|
( cd $dir ; $ACLOCAL )
|
|
|
|
done
|
2000-01-08 21:02:58 +00:00
|
|
|
echo "done."
|
1999-09-27 18:44:28 +00:00
|
|
|
else
|
|
|
|
echo "aclocal not found -- aborting"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2002-07-08 15:00:54 +00:00
|
|
|
if ( $AUTOHEADER --version ) </dev/null > /dev/null 2>&1; then
|
2001-02-12 14:09:09 +00:00
|
|
|
echo "Building config header template..."
|
2002-05-29 16:21:03 +00:00
|
|
|
for dir in . ; do
|
2001-02-13 15:33:30 +00:00
|
|
|
echo " $dir"
|
2001-02-12 14:09:09 +00:00
|
|
|
( cd $dir ; $AUTOHEADER )
|
|
|
|
done
|
2000-01-08 21:02:58 +00:00
|
|
|
echo "done."
|
1999-09-27 18:44:28 +00:00
|
|
|
else
|
|
|
|
echo "autoheader not found -- aborting"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ( $AUTOMAKE --version ) </dev/null > /dev/null 2>&1; then
|
2001-02-12 14:09:09 +00:00
|
|
|
echo "Building Makefile templates..."
|
2002-05-29 16:21:03 +00:00
|
|
|
for dir in . lib/reLyX ; do
|
2001-02-13 15:33:30 +00:00
|
|
|
echo " $dir"
|
2001-02-12 14:09:09 +00:00
|
|
|
( cd $dir ; $AUTOMAKE )
|
|
|
|
done
|
2000-01-08 21:02:58 +00:00
|
|
|
echo "done."
|
1999-09-27 18:44:28 +00:00
|
|
|
else
|
|
|
|
echo "automake not found -- aborting"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ( $AUTOCONF --version ) </dev/null > /dev/null 2>&1; then
|
2001-02-12 14:09:09 +00:00
|
|
|
echo "Building configure..."
|
2002-05-29 16:21:03 +00:00
|
|
|
for dir in . lib/reLyX ; do
|
2001-02-13 15:33:30 +00:00
|
|
|
echo " $dir"
|
2001-02-12 14:09:09 +00:00
|
|
|
( cd $dir ; $AUTOCONF )
|
|
|
|
done
|
2000-01-08 21:02:58 +00:00
|
|
|
echo "done."
|
1999-09-27 18:44:28 +00:00
|
|
|
else
|
|
|
|
echo "autoconf not found -- aborting"
|
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2000-01-08 21:02:58 +00:00
|
|
|
# Autogenerate lib/configure.m4.
|
|
|
|
if test x$GNUM4 != x ; then
|
2000-01-12 11:16:01 +00:00
|
|
|
echo -n "Building lib/configure ... "
|
2000-01-08 21:02:58 +00:00
|
|
|
rm -f lib/configure
|
|
|
|
$GNUM4 lib/configure.m4 > lib/configure
|
|
|
|
chmod a+x lib/configure
|
|
|
|
echo "done."
|
|
|
|
else
|
|
|
|
echo "No GNU m4. Impossible to build lib/configure -- aborting"
|
1999-11-26 14:31:33 +00:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
2000-01-12 11:16:01 +00:00
|
|
|
echo
|
|
|
|
echo 'run "./configure ; make"'
|
|
|
|
echo
|