1999-09-27 18:44:28 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2007-04-26 10:06:36 +00:00
|
|
|
ACLOCAL="aclocal -I m4 -I config"
|
2002-10-15 08:10:57 +00:00
|
|
|
AUTOHEADER="autoheader"
|
2006-01-26 00:01:00 +00:00
|
|
|
AUTOMAKE="automake --add-missing --copy --foreign"
|
2002-10-15 08:10:57 +00:00
|
|
|
AUTOCONF="autoconf"
|
|
|
|
|
2005-02-23 14:54:20 +00:00
|
|
|
# Discover what version of automake we are using.
|
|
|
|
automake_version=`$AUTOMAKE --version 2>/dev/null | head -n 1`
|
|
|
|
|
|
|
|
test "$automake_version" != "" && {
|
|
|
|
echo "Using $automake_version"
|
|
|
|
} || {
|
2009-08-28 14:57:52 +00:00
|
|
|
echo "LyX requires automake >= 1.8"
|
2005-03-05 15:26:00 +00:00
|
|
|
exit 1
|
2005-02-23 14:54:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
case $automake_version in
|
2009-08-28 14:57:52 +00:00
|
|
|
*' '1.[8-9]*|*' '1.1[01]*)
|
2005-02-23 14:54:20 +00:00
|
|
|
;;
|
|
|
|
*)
|
2006-08-06 20:45:31 +00:00
|
|
|
|
2005-02-23 14:54:20 +00:00
|
|
|
echo "This automake version is not supported by LyX."
|
2009-08-28 14:57:52 +00:00
|
|
|
echo "LyX only supports automake 1.8 to 1.11."
|
2006-08-06 20:45:31 +00:00
|
|
|
exit 1
|
|
|
|
;;
|
2005-02-23 14:54:20 +00:00
|
|
|
esac
|
2006-07-22 16:47:31 +00:00
|
|
|
|
2002-08-07 22:45:38 +00:00
|
|
|
# Discover what version of autoconf we are using.
|
2005-02-23 14:54:20 +00:00
|
|
|
autoversion=`$AUTOCONF --version 2>/dev/null | head -n 1`
|
2002-08-07 22:45:38 +00:00
|
|
|
|
2005-02-23 14:54:20 +00:00
|
|
|
test "$autoversion" != "" && {
|
|
|
|
echo "Using $autoversion"
|
|
|
|
} || {
|
2008-08-11 21:46:38 +00:00
|
|
|
echo "LyX requires autoconf >= 2.59c"
|
2005-03-05 15:26:00 +00:00
|
|
|
exit 1
|
2005-02-23 14:54:20 +00:00
|
|
|
}
|
2006-07-22 14:32:57 +00:00
|
|
|
|
2008-08-11 21:46:38 +00:00
|
|
|
|
2002-08-07 22:45:38 +00:00
|
|
|
case $autoversion in
|
2009-08-04 11:49:24 +00:00
|
|
|
*' '2.59[cd]|*' '2.60[ab]|*' '2.6[0-4])
|
2002-08-07 22:45:38 +00:00
|
|
|
;;
|
|
|
|
*)
|
2002-10-15 08:10:57 +00:00
|
|
|
echo "This autoconf version is not supported by LyX."
|
2009-08-04 11:49:24 +00:00
|
|
|
echo "LyX only supports autoconf 2.59c-2.64."
|
2005-03-05 15:26:00 +00:00
|
|
|
exit 1
|
2002-08-07 22:45:38 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2005-03-07 12:28:33 +00:00
|
|
|
# Delete old cache directories.
|
|
|
|
# automake will stop if their contents was created by an earlier version.
|
2005-07-16 15:18:14 +00:00
|
|
|
rm -rf autom4te.cache
|
2005-03-07 12:28:33 +00:00
|
|
|
|
1999-09-27 18:44:28 +00:00
|
|
|
# Generate the Makefiles and configure files
|
2008-06-06 15:25:55 +00:00
|
|
|
echo "Building macros..."
|
2002-10-15 08:10:57 +00:00
|
|
|
if ( $ACLOCAL --version ) < /dev/null > /dev/null 2>&1; then
|
2008-06-06 15:25:55 +00:00
|
|
|
$ACLOCAL
|
1999-09-27 18:44:28 +00:00
|
|
|
else
|
|
|
|
echo "aclocal not found -- aborting"
|
2005-03-05 15:26:00 +00:00
|
|
|
exit 1
|
1999-09-27 18:44:28 +00:00
|
|
|
fi
|
|
|
|
|
2008-06-06 15:25:55 +00:00
|
|
|
echo "Building config header template..."
|
2002-10-15 08:10:57 +00:00
|
|
|
if ( $AUTOHEADER --version ) < /dev/null > /dev/null 2>&1; then
|
2008-06-06 15:25:55 +00:00
|
|
|
$AUTOHEADER
|
1999-09-27 18:44:28 +00:00
|
|
|
else
|
|
|
|
echo "autoheader not found -- aborting"
|
2005-03-05 15:26:00 +00:00
|
|
|
exit 1
|
1999-09-27 18:44:28 +00:00
|
|
|
fi
|
|
|
|
|
2008-06-06 15:25:55 +00:00
|
|
|
echo "Building Makefile templates..."
|
2002-10-15 08:10:57 +00:00
|
|
|
if ( $AUTOMAKE --version ) < /dev/null > /dev/null 2>&1; then
|
2008-06-06 15:25:55 +00:00
|
|
|
$AUTOMAKE
|
1999-09-27 18:44:28 +00:00
|
|
|
else
|
|
|
|
echo "automake not found -- aborting"
|
2005-03-05 15:26:00 +00:00
|
|
|
exit 1
|
1999-09-27 18:44:28 +00:00
|
|
|
fi
|
|
|
|
|
2008-06-06 15:25:55 +00:00
|
|
|
echo "Building configure..."
|
2002-10-15 08:10:57 +00:00
|
|
|
if ( $AUTOCONF --version ) < /dev/null > /dev/null 2>&1; then
|
2008-06-06 15:25:55 +00:00
|
|
|
$AUTOCONF
|
1999-09-27 18:44:28 +00:00
|
|
|
else
|
|
|
|
echo "autoconf not found -- aborting"
|
2005-03-05 15:26:00 +00:00
|
|
|
exit 1
|
1999-09-27 18:44:28 +00:00
|
|
|
fi
|
|
|
|
|
2008-06-17 15:14:20 +00:00
|
|
|
echo "Building po/POTFILES.in..."
|
2008-06-24 10:16:36 +00:00
|
|
|
make -s -f po/Rules-lyx srcdir=po top_srcdir=. po/POTFILES.in
|
2008-06-17 15:14:20 +00:00
|
|
|
|
2000-01-12 11:16:01 +00:00
|
|
|
echo
|
|
|
|
echo 'run "./configure ; make"'
|
|
|
|
echo
|