| 1 |
#!/bin/sh |
|---|
| 2 |
|
|---|
| 3 |
ACLOCAL="aclocal -I m4 -I config" |
|---|
| 4 |
AUTOHEADER="autoheader" |
|---|
| 5 |
AUTOMAKE="automake --add-missing --copy --foreign" |
|---|
| 6 |
AUTOCONF="autoconf" |
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
automake_version=`$AUTOMAKE --version 2>/dev/null | head -n 1` |
|---|
| 10 |
|
|---|
| 11 |
test "$automake_version" != "" && { |
|---|
| 12 |
echo "Using $automake_version" |
|---|
| 13 |
} || { |
|---|
| 14 |
echo "LyX requires automake >= 1.5" |
|---|
| 15 |
exit 1 |
|---|
| 16 |
} |
|---|
| 17 |
|
|---|
| 18 |
case $automake_version in |
|---|
| 19 |
*' '1.[5-9]*|*' '1.10*) |
|---|
| 20 |
;; |
|---|
| 21 |
*) |
|---|
| 22 |
|
|---|
| 23 |
echo "This automake version is not supported by LyX." |
|---|
| 24 |
echo "LyX only supports automake 1.5 to 1.10." |
|---|
| 25 |
exit 1 |
|---|
| 26 |
;; |
|---|
| 27 |
esac |
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 |
autoversion=`$AUTOCONF --version 2>/dev/null | head -n 1` |
|---|
| 31 |
|
|---|
| 32 |
test "$autoversion" != "" && { |
|---|
| 33 |
echo "Using $autoversion" |
|---|
| 34 |
} || { |
|---|
| 35 |
echo "LyX requires autoconf >= 2.59c" |
|---|
| 36 |
exit 1 |
|---|
| 37 |
} |
|---|
| 38 |
|
|---|
| 39 |
|
|---|
| 40 |
case $autoversion in |
|---|
| 41 |
*' '2.59[cd]|*' '2.60[ab]|*' '2.6[0-3]) |
|---|
| 42 |
;; |
|---|
| 43 |
*) |
|---|
| 44 |
echo "This autoconf version is not supported by LyX." |
|---|
| 45 |
echo "LyX only supports autoconf 2.59c-2.63." |
|---|
| 46 |
exit 1 |
|---|
| 47 |
;; |
|---|
| 48 |
esac |
|---|
| 49 |
|
|---|
| 50 |
|
|---|
| 51 |
|
|---|
| 52 |
rm -rf autom4te.cache |
|---|
| 53 |
|
|---|
| 54 |
|
|---|
| 55 |
echo "Building macros..." |
|---|
| 56 |
if ( $ACLOCAL --version ) < /dev/null > /dev/null 2>&1; then |
|---|
| 57 |
$ACLOCAL |
|---|
| 58 |
else |
|---|
| 59 |
echo "aclocal not found -- aborting" |
|---|
| 60 |
exit 1 |
|---|
| 61 |
fi |
|---|
| 62 |
|
|---|
| 63 |
echo "Building config header template..." |
|---|
| 64 |
if ( $AUTOHEADER --version ) < /dev/null > /dev/null 2>&1; then |
|---|
| 65 |
$AUTOHEADER |
|---|
| 66 |
else |
|---|
| 67 |
echo "autoheader not found -- aborting" |
|---|
| 68 |
exit 1 |
|---|
| 69 |
fi |
|---|
| 70 |
|
|---|
| 71 |
echo "Building Makefile templates..." |
|---|
| 72 |
if ( $AUTOMAKE --version ) < /dev/null > /dev/null 2>&1; then |
|---|
| 73 |
$AUTOMAKE |
|---|
| 74 |
else |
|---|
| 75 |
echo "automake not found -- aborting" |
|---|
| 76 |
exit 1 |
|---|
| 77 |
fi |
|---|
| 78 |
|
|---|
| 79 |
echo "Building configure..." |
|---|
| 80 |
if ( $AUTOCONF --version ) < /dev/null > /dev/null 2>&1; then |
|---|
| 81 |
$AUTOCONF |
|---|
| 82 |
else |
|---|
| 83 |
echo "autoconf not found -- aborting" |
|---|
| 84 |
exit 1 |
|---|
| 85 |
fi |
|---|
| 86 |
|
|---|
| 87 |
echo "Building po/POTFILES.in..." |
|---|
| 88 |
make -s -f po/Rules-lyx srcdir=po top_srcdir=. po/POTFILES.in |
|---|
| 89 |
|
|---|
| 90 |
echo |
|---|
| 91 |
echo 'run "./configure ; make"' |
|---|
| 92 |
echo |
|---|