3 # Run this script to regenerate autoconf files
10 config
=$
(sh config.status
--config 2>/dev
/null
)
13 unset AUTOCONF AUTOMAKE ACLOCAL AUTOHEADER ACLOCAL_PATH
16 echo "$0: unknown option: $arg" 1>&2
21 # This allows for overriding the default autoconf programs
22 AUTOCONF
="${AUTOCONF:-${AUTOTOOLS_PREFIX}autoconf}"
23 AUTOMAKE
="${AUTOMAKE:-${AUTOTOOLS_PREFIX}automake}"
24 ACLOCAL
="${ACLOCAL:-${AUTOTOOLS_PREFIX}aclocal}"
25 AUTOHEADER
="${AUTOHEADER:-${AUTOTOOLS_PREFIX}autoheader}"
27 mkdir
-p autoconf autoconf
/helpers config
28 autolib
="`"$AUTOMAKE" --print-libdir`"
29 if test ! x
"$autolib" = x
; then
30 for prg
in install-sh compile config.guess config.sub
; do
31 # Update autoconf helpers if and only if newer ones are available
32 if test -f "$autolib"/"$prg" && \
34 test -f autoconf
/helpers
/"$prg" && sed -n \
35 -e 's/^scriptver=/scriptversion=/' \
36 -e 's/^timestamp=/scriptversion=/' \
37 -e 's/^scriptversion=['\''"]?\([^'\''"]*\).*$/\1/p' \
38 "$autolib"/"$prg" autoconf
/helpers
/"$prg" | \
39 sort -c 2>/dev
/null
; \
42 cp -f "$autolib"/"$prg" autoconf
/helpers
46 mv -f autoconf
/aclocal.
m4 autoconf
/aclocal.
m4.old
47 mkdir
-p autoconf
/m4.old autoconf
/m4
48 mv -f autoconf
/m
4/*.
m4 autoconf
/m4.old
/ 2>/dev
/null || true
49 ACLOCAL_PATH
="${ACLOCAL_PATH}${ACLOCAL_PATH:+:}`pwd`/autoconf/m4.old"
51 "$ACLOCAL" --install --output=autoconf
/aclocal.
m4 -I autoconf
/m4
52 if test ! -f autoconf
/aclocal.
m4; then
53 # aclocal failed, revert to previous files
54 mv -f autoconf
/m4.old
/*.
m4 autoconf
/m
4/
55 mv -f autoconf
/aclocal.
m4.old autoconf
/aclocal.
m4
58 rm -rf autoconf
/*m4.old
59 "$AUTOHEADER" -B autoconf
60 "$AUTOCONF" -B autoconf
63 "$AUTOCONF" -B autoconf \
64 -t AC_CONFIG_HEADERS
:'rm -f $*' \
65 -t AC_CONFIG_FILES
:'rm -f $*'
66 echo 'rm -f config.log config.status'
67 echo 'rm -rf autom4te.cache'
69 chmod +x autoconf
/clean.sh
72 rm -f configure~ || true
74 # Try to regenerate unconfig.h if Perl is available and unconfig.pl
75 # is present in the autoconf directory.
76 if [ -n "$(which perl)" -a -f autoconf
/unconfig.pl
]; then
77 perl autoconf
/unconfig.pl . config
/config.h.
in config
/unconfig.h
81 # This bizarre statement has to do with how config.status quotes its output
82 echo exec sh configure
$config | sh
-