1#! /bin/sh 2 3# Global variables... 4AUTOCONF="autoconf" 5AUTOHEADER="autoheader" 6AUTOM4TE="autom4te" 7AUTOMAKE="automake" 8ACLOCAL="aclocal" 9 10 11# We don't use variable here for remembering the type ... strings. 12# local variables are not that portable, but we fear namespace issues with 13# our includer. The repeated type calls are not that expensive. 14checkAutoconf() 15{ 16 if test -x "`$WHICH autoconf-2.5x`" ; then 17 AUTOCONF="`$WHICH autoconf-2.5x`" 18 elif test -x "`$WHICH autoconf-2.54`" ; then 19 AUTOCONF="`$WHICH autoconf-2.54`" 20 elif test -x "`$WHICH autoconf-2.53`" ; then 21 AUTOCONF="`$WHICH autoconf-2.53`" 22 elif test -x "`$WHICH autoconf-2.53a`" ; then 23 AUTOCONF="`$WHICH autoconf-2.53a`" 24 elif test -x "`$WHICH autoconf-2.52`" ; then 25 AUTOCONF="`$WHICH autoconf-2.52`" 26 elif test -x "`$WHICH autoconf2.50`" ; then 27 AUTOCONF="`$WHICH autoconf2.50`" 28 fi 29} 30 31checkAutoheader() 32{ 33 if test -x "`$WHICH autoheader-2.5x`" ; then 34 AUTOHEADER="`$WHICH autoheader-2.5x`" 35 AUTOM4TE="`$WHICH autom4te-2.5x`" 36 elif test -x "`$WHICH autoheader-2.54`" ; then 37 AUTOHEADER="`$WHICH autoheader-2.54`" 38 AUTOM4TE="`$WHICH autom4te-2.54`" 39 elif test -x "`$WHICH autoheader-2.53`" ; then 40 AUTOHEADER="`$WHICH autoheader-2.53`" 41 AUTOM4TE="`$WHICH autom4te-2.53`" 42 elif test -x "`$WHICH autoheader-2.53a`" ; then 43 AUTOHEADER="`$WHICH autoheader-2.53a`" 44 AUTOM4TE="`$WHICH autom4te-2.53a`" 45 elif test -x "`$WHICH autoheader-2.52`" ; then 46 AUTOHEADER="`$WHICH autoheader-2.52`" 47 elif test -x "`$WHICH autoheader2.50`" ; then 48 AUTOHEADER="`$WHICH autoheader2.50`" 49 fi 50} 51 52checkAutomakeAclocal () 53{ 54 if test -z "$UNSERMAKE"; then 55 if test -x "`$WHICH automake-1.6`" ; then 56 AUTOMAKE="`$WHICH automake-1.6`" 57 ACLOCAL="`$WHICH aclocal-1.6`" 58 elif test -x "`$WHICH automake-1.7`" ; then 59 AUTOMAKE="`$WHICH automake-1.7`" 60 ACLOCAL="`$WHICH aclocal-1.7`" 61 fi 62 else 63 AUTOMAKE="$UNSERMAKE" 64 fi 65} 66 67checkWhich () 68{ 69 WHICH="" 70 for i in "type -p" "which" "type" ; do 71 T=`$i sh 2> /dev/null` 72 test -x "$T" && WHICH="$i" && break 73 done 74} 75 76checkWhich 77checkAutoconf 78checkAutoheader 79checkAutomakeAclocal 80 81export WHICH AUTOHEADER AUTOCONF AUTOM4TE AUTOMAKE ACLOCAL 82