1 |
#!/bin/sh |
#!/bin/sh |
|
rm -f config.cache |
|
2 |
|
|
3 |
### GETTEXT ### |
# gettextize updates Makefile.am, configure.in |
4 |
|
gettextize --copy --force --intl --no-changelog && |
5 |
echo searching for GNU gettext intl directory... |
aclocal && |
6 |
|
# autoheader creates config.h.in needed by autoconf |
7 |
dirs="/usr/share /usr/local/share /opt/share /usr /usr/local /opt /usr/gnu/share" |
autoheader && |
8 |
found=0 |
# autoconf creates configure |
9 |
for try in $dirs; do |
autoconf && |
10 |
echo -n " -> $try/gettext/intl... " |
# automake creates Makefile.in |
11 |
if test -d $try/gettext/intl; then |
automake --add-missing --copy --gnu |
|
echo found it |
|
|
found=1 |
|
|
break |
|
|
fi |
|
|
echo no |
|
|
done |
|
|
if test "$found" != 1; then |
|
|
echo ERROR: Cannot find gettext/intl directory. |
|
|
echo ERROR: Install GNU gettext in /usr or /usr/local prefix. |
|
|
exit 7 |
|
|
fi; |
|
|
|
|
|
echo copying gettext intl files... |
|
|
intldir="$try/gettext/intl" |
|
|
if test ! -d intl; then |
|
|
mkdir intl |
|
|
fi |
|
|
olddir=`pwd` |
|
|
cd $intldir |
|
|
for file in *; do |
|
|
if test $file != COPYING.LIB-2.0 && test $file != COPYING.LIB-2.1; then |
|
|
rm -f $olddir/intl/$file |
|
|
cp $intldir/$file $olddir/intl/ |
|
|
fi |
|
|
done |
|
|
cp -f $try/gettext/po/Makefile.in.in $olddir/po/ |
|
|
cd $olddir |
|
|
if test -f intl/plural.c; then |
|
|
sleep 2 |
|
|
touch intl/plural.c |
|
|
fi |
|
|
|
|
|
### END GETTEXT ### |
|
|
|
|
|
echo "running aclocal..." |
|
|
aclocal -I /usr/share/aclocal |
|
|
if [ $? -ne 0 ]; then |
|
|
echo "ERROR: 'aclocal -I /usr/share/aclocal' failed!" |
|
|
exit 1 |
|
|
fi |
|
|
echo "running autoconf..." |
|
|
autoconf |
|
|
if [ $? -ne 0 ]; then |
|
|
echo "ERROR: 'autoconf' failed!" |
|
|
exit 1 |
|
|
fi |
|
|
echo "running autoheader..." |
|
|
autoheader |
|
|
if [ $? -ne 0 ]; then |
|
|
echo "ERROR: 'autoheader' failed!" |
|
|
exit 1 |
|
|
fi |
|
|
echo "running automake..." |
|
|
automake -a |
|
|
if [ $? -ne 0 ]; then |
|
|
echo "ERROR: 'automake -a' failed!" |
|
|
exit 1 |
|
|
fi |
|
|
echo "autogen.sh ok, now run ./configure script" |
|