1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
#!/bin/bash
#
# autogen.sh glue for Grisbi
# $Id: autogen.sh,v 1.15 2009/08/23 07:27:46 pbiava Exp $
#
# Requires: automake, autoconf, dpkg-dev
#
# Check if autoconf and automake are installed
#
autoconf --version >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "Please install autoconf and rerun this script !"
exit 1
fi
automake --version >/dev/null 2>&1
if [ $? -ne 0 ] ; then
echo "Please install automake and rerun this script !"
exit 1
fi
echo "automake and autoconf are installed"
# test for some distribution...
PATH_AUTOMAKE=$(ls -1d /usr/share/automake* 2>/dev/null | sort -gbu | tail -1)
if ! test -x $PATH_AUTOMAKE
then
echo "Error: directory $PATH_AUTOMAKE does not exist"
fi
# fail on error
set -e
# Refresh GNU autotools toolchain.
for i in config.guess config.sub missing install-sh mkinstalldirs ; do
test -r $PATH_AUTOMAKE/${i} && {
rm -f ${i}
cp $PATH_AUTOMAKE/${i} .
}
if test -r ${i} ; then
chmod 755 ${i}
fi
done
#
# Apple's Developer Tools have a "libtool" that has nothing to do with
# the GNU libtool; they call the latter "glibtool". They also call
# libtoolize "glibtoolize".
#
# Check for "glibtool" first.
# Borrowed from ethereal
#
LTVER=$(glibtool --version 2>/dev/null | grep ' libtool)' | \
sed 's/.*libtool) \([0-9][0-9.]*\)[^ ]* .*/\1/')
if test -z "$LTVER"
then
LTVER=$(libtoolize --version | grep ' libtool)' | \
sed 's/.*) \([0-9][0-9.]*\)[^ ]* .*/\1/' )
LIBTOOLIZE=libtoolize
else
LIBTOOLIZE=glibtoolize
fi
case "$LTVER" in
'' | 0.* | 1.[0-3]* )
cat >&2 <<_EOF_
You must have libtool 1.4 or later installed to compile $PROJECT.
Download the appropriate package for your distribution/OS,
or get the source tarball at ftp://ftp.gnu.org/pub/gnu/libtool/
_EOF_
exit 1
;;
esac
$LIBTOOLIZE --force --copy
autoreconf --verbose --force --install
# removeing files generated by autopoint for gettext
rm po/Makevars.template
rm po/Rules-quot
rm po/boldquot.sed
rm po/en@boldquot.header
rm po/en@quot.header
rm po/insert-header.sin
rm po/quot.sed
#
# Check if the configure script is created
#
echo
if [ ! -f ./configure ] ; then
echo "The configure script was not created !"
echo "You can't compile Grisbi."
exit 1
fi
echo "The configure script was successfully created."
echo "To compile Grisbi, please run :"
echo " ./configure"
echo " make"
echo " make install"
echo
exit 0
|