3 # libtool and autoheader checks are not always necessary, so check to see if
5 references_libtool
=`perl -ne 'print if (! m/^dnl/ && ! m/^#/ && m/PROG_LIBTOOL/)' configure.ac`
6 references_autoheader
=`perl -ne 'print if (! m/^dnl/ && ! m/^#/ && m/CONFIG_HEADER/)' configure.ac`
8 check_alternatives
() \
12 if test "x$_check_save" = x
14 echo "ERROR: bad call to check_alternatives" 1>&2
23 while test "x$_check_var" != x
25 _check_rv
=`which "$_check_var" 2> /dev/null`
26 if test "x$_check_rv" != x
34 if test "x$_check_rv" = x
36 echo "ERROR: can't find alternative for $_check_save" 1>&2
40 eval $_check_save='"$_check_rv"'
43 if test "x$references_libtool" != "x" ; then
44 check_alternatives mylibtoolize glibtoolize libtoolize libtoolize15
46 check_alternatives myaclocal aclocal19 aclocal
47 if test "x$references_autoheader" != "x" ; then
48 check_alternatives myautoheader autoheader259 autoheader257 autoheader
50 check_alternatives myautomake automake19 automake
51 check_alternatives myautom4te autom4te259 autom4te257 autom4te
52 check_alternatives myautoconf autoconf259 autoconf257 autoconf
54 if test "x$references_libtool" != "x" ; then
55 echo -n "Running $mylibtoolize ... "
56 "$mylibtoolize" --automake > .libtool.out
2>&1
57 if test "x$?" != "x0" ; then
64 if test -d /usr
/local
/share
/aclocal
; then
65 aclocal_extra_dirs
="$aclocal_extra_dirs -I /usr/local/share/aclocal"
68 echo -n "Running $myaclocal ... "
69 AUTOM4TE
="$myautom4te" "$myaclocal" $aclocal_extra_dirs > .aclocal.out
2>&1
70 if test "x$?" != "x0" ; then
76 if test "x$references_autoheader" != "x" ; then
77 echo -n "Running $myautoheader ... "
78 "$myautoheader" > .autoheader.out
2>&1
79 if test "x$?" != "x0" ; then
86 echo -n "Running $myautomake ... "
87 AUTOCONF
="$myautoconf" "$myautomake" -a > .automake.out
2>&1
88 if test "x$?" != "x0" ; then
94 echo -n "Running $myautoconf ... "
95 "$myautoconf" > .autoconf.out
2>&1
96 if test "x$?" != "x0" ; then