1#!/bin/sh 2TESTLIBTOOLIZE="glibtoolize libtoolize" 3 4LIBTOOLIZEFOUND="0" 5 6srcdir=`dirname $0` 7test -z "$srcdir" && srcdir=. 8 9olddir=`pwd` 10cd $srcdir 11 12aclocal --version > /dev/null 2> /dev/null || { 13 echo "error: aclocal not found" 14 exit 1 15} 16 17automake --version > /dev/null 2> /dev/null || { 18 echo "error: automake not found" 19 exit 1 20} 21 22autopoint --version > /dev/null 2> /dev/null || { 23 echo "error: autopoint not found" 24 exit 1 25} 26 27gettext --version > /dev/null 2> /dev/null || { 28 echo "error: gettext not found" 29 exit 1 30} 31 32for i in $TESTLIBTOOLIZE; do 33 if which $i > /dev/null 2>&1; then 34 LIBTOOLIZE=$i 35 LIBTOOLIZEFOUND="1" 36 break 37 fi 38done 39 40if [ "$LIBTOOLIZEFOUND" = "0" ]; then 41 echo "$0: need libtoolize tool to build cups-filters" >&2 42 exit 1 43fi 44 45amcheck=`automake --version | grep 'automake (GNU automake) 1.5'` 46if test "x$amcheck" = "xautomake (GNU automake) 1.5"; then 47 echo "warning: you appear to be using automake 1.5" 48 echo " this version has a bug - GNUmakefile.am dependencies are not generated" 49fi 50 51rm -rf autom4te*.cache 52 53autopoint --force || { 54 echo "error: autopoint failed" 55 exit 1 56} 57# autopoint is for libiconv discovery; we don't want the po directory 58rm -rf po 59$LIBTOOLIZE --force --copy || { 60 echo "error: libtoolize failed" 61 exit 1 62} 63aclocal $ACLOCAL_FLAGS || { 64 echo "error: aclocal $ACLOCAL_FLAGS failed" 65 exit 1 66} 67autoheader || { 68 echo "error: autoheader failed" 69 exit 1 70} 71automake -a -c --gnu --add-missing || { 72 echo "warning: automake failed" 73} 74autoconf || { 75 echo "error: autoconf failed" 76 exit 1 77} 78