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"
|
2012-01-20 09:31:06 +00:00
|
|
|
AUTOMAKE="automake --add-missing --force-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"
|
|
|
|
} || {
|
2017-04-06 11:48:32 +00:00
|
|
|
echo "LyX requires automake >= 1.14"
|
2005-03-05 15:26:00 +00:00
|
|
|
exit 1
|
2005-02-23 14:54:20 +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"
|
|
|
|
} || {
|
2017-04-06 11:48:32 +00:00
|
|
|
echo "LyX requires autoconf >= 2.65"
|
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
|
|
|
|
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..."
|
2015-05-20 10:24:16 +00:00
|
|
|
if ( make -s -f po/Rules-lyx srcdir=po top_srcdir=. po/POTFILES.in ); then
|
|
|
|
:
|
|
|
|
else
|
2012-09-11 08:12:05 +00:00
|
|
|
echo "Building po/POTFILES.in failed -- aborting"
|
|
|
|
exit 1
|
|
|
|
fi
|
2008-06-17 15:14:20 +00:00
|
|
|
|
2000-01-12 11:16:01 +00:00
|
|
|
echo
|
2012-05-31 10:31:55 +00:00
|
|
|
echo 'run "./configure && make"'
|
2000-01-12 11:16:01 +00:00
|
|
|
echo
|