Install gettext-0.18.1.1.tar.gz
[msysgit.git] / mingw / share / doc / gettext / examples / hello-c++-kde / admin / detect-autoconf.sh
blob56950cabf4299714b59948f5c75279de8a57d8f9
1 #! /bin/sh
3 # Global variables...
4 AUTOCONF="autoconf"
5 AUTOHEADER="autoheader"
6 AUTOM4TE="autom4te"
7 AUTOMAKE="automake"
8 ACLOCAL="aclocal"
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.
14 checkAutoconf()
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`"
31 checkAutoheader()
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`"
52 checkAutomakeAclocal ()
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`"
62 else
63 AUTOMAKE="$UNSERMAKE"
67 checkWhich ()
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
76 checkWhich
77 checkAutoconf
78 checkAutoheader
79 checkAutomakeAclocal
81 export WHICH AUTOHEADER AUTOCONF AUTOM4TE AUTOMAKE ACLOCAL