1 | #! /bin/sh
|
---|
2 |
|
---|
3 | # Global variables...
|
---|
4 | AUTOCONF="autoconf"
|
---|
5 | AUTOHEADER="autoheader"
|
---|
6 | AUTOM4TE="autom4te"
|
---|
7 | AUTOMAKE="automake"
|
---|
8 | ACLOCAL="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.
|
---|
14 | checkAutoconf()
|
---|
15 | {
|
---|
16 | if test -x "`$WHICH autoconf-2.5x 2>/dev/null`" ; then
|
---|
17 | AUTOCONF="`$WHICH autoconf-2.5x`"
|
---|
18 | elif test -x "`$WHICH autoconf-2.57 2>/dev/null`" ; then
|
---|
19 | AUTOCONF="`$WHICH autoconf-2.57`"
|
---|
20 | elif test -x "`$WHICH autoconf-2.56 2>/dev/null`" ; then
|
---|
21 | AUTOCONF="`$WHICH autoconf-2.56`"
|
---|
22 | elif test -x "`$WHICH autoconf-2.55 2>/dev/null`" ; then
|
---|
23 | AUTOCONF="`$WHICH autoconf-2.55`"
|
---|
24 | elif test -x "`$WHICH autoconf-2.54 2>/dev/null`" ; then
|
---|
25 | AUTOCONF="`$WHICH autoconf-2.54`"
|
---|
26 | elif test -x "`$WHICH autoconf-2.53 2>/dev/null`" ; then
|
---|
27 | AUTOCONF="`$WHICH autoconf-2.53`"
|
---|
28 | elif test -x "`$WHICH autoconf-2.53a 2>/dev/null`" ; then
|
---|
29 | AUTOCONF="`$WHICH autoconf-2.53a`"
|
---|
30 | elif test -x "`$WHICH autoconf-2.52 2>/dev/null`" ; then
|
---|
31 | AUTOCONF="`$WHICH autoconf-2.52`"
|
---|
32 | elif test -x "`$WHICH autoconf2.50 2>/dev/null`" ; then
|
---|
33 | AUTOCONF="`$WHICH autoconf2.50`"
|
---|
34 | fi
|
---|
35 | }
|
---|
36 |
|
---|
37 | checkAutoheader()
|
---|
38 | {
|
---|
39 | if test -x "`$WHICH autoheader-2.5x 2>/dev/null`" ; then
|
---|
40 | AUTOHEADER="`$WHICH autoheader-2.5x`"
|
---|
41 | AUTOM4TE="`$WHICH autom4te-2.5x`"
|
---|
42 | elif test -x "`$WHICH autoheader-2.57 2>/dev/null`" ; then
|
---|
43 | AUTOHEADER="`$WHICH autoheader-2.57`"
|
---|
44 | AUTOM4TE="`$WHICH autom4te-2.57`"
|
---|
45 | elif test -x "`$WHICH autoheader-2.56 2>/dev/null`" ; then
|
---|
46 | AUTOHEADER="`$WHICH autoheader-2.56`"
|
---|
47 | AUTOM4TE="`$WHICH autom4te-2.56`"
|
---|
48 | elif test -x "`$WHICH autoheader-2.55 2>/dev/null`" ; then
|
---|
49 | AUTOHEADER="`$WHICH autoheader-2.55`"
|
---|
50 | AUTOM4TE="`$WHICH autom4te-2.55`"
|
---|
51 | elif test -x "`$WHICH autoheader-2.54 2>/dev/null`" ; then
|
---|
52 | AUTOHEADER="`$WHICH autoheader-2.54`"
|
---|
53 | AUTOM4TE="`$WHICH autom4te-2.54`"
|
---|
54 | elif test -x "`$WHICH autoheader-2.53 2>/dev/null`" ; then
|
---|
55 | AUTOHEADER="`$WHICH autoheader-2.53`"
|
---|
56 | AUTOM4TE="`$WHICH autom4te-2.53`"
|
---|
57 | elif test -x "`$WHICH autoheader-2.53a 2>/dev/null`" ; then
|
---|
58 | AUTOHEADER="`$WHICH autoheader-2.53a`"
|
---|
59 | AUTOM4TE="`$WHICH autom4te-2.53a`"
|
---|
60 | elif test -x "`$WHICH autoheader-2.52 2>/dev/null`" ; then
|
---|
61 | AUTOHEADER="`$WHICH autoheader-2.52`"
|
---|
62 | elif test -x "`$WHICH autoheader2.50 2>/dev/null`" ; then
|
---|
63 | AUTOHEADER="`$WHICH autoheader2.50`"
|
---|
64 | fi
|
---|
65 | }
|
---|
66 |
|
---|
67 | checkAutomakeAclocal ()
|
---|
68 | {
|
---|
69 | if test -x "`$WHICH automake-1.6 2>/dev/null`" ; then
|
---|
70 | AUTOMAKE="`$WHICH automake-1.6`"
|
---|
71 | ACLOCAL="`$WHICH aclocal-1.6`"
|
---|
72 | elif test -x "`$WHICH automake-1.7 2>/dev/null`" ; then
|
---|
73 | AUTOMAKE="`$WHICH automake-1.7`"
|
---|
74 | ACLOCAL="`$WHICH aclocal-1.7`"
|
---|
75 | fi
|
---|
76 | if test -n "$UNSERMAKE"; then
|
---|
77 | AUTOMAKE="$UNSERMAKE"
|
---|
78 | fi
|
---|
79 | }
|
---|
80 |
|
---|
81 | checkWhich ()
|
---|
82 | {
|
---|
83 | WHICH=""
|
---|
84 | for i in "type -p" "which" "type" ; do
|
---|
85 | T=`$i sh 2> /dev/null`
|
---|
86 | test -x "$T" && WHICH="$i" && break
|
---|
87 | done
|
---|
88 | }
|
---|
89 |
|
---|
90 | checkWhich
|
---|
91 | checkAutoconf
|
---|
92 | checkAutoheader
|
---|
93 | checkAutomakeAclocal
|
---|
94 |
|
---|
95 | export WHICH AUTOHEADER AUTOCONF AUTOM4TE AUTOMAKE ACLOCAL
|
---|