br3392586: add test case for smacro descent
[nasm.git] / autogen.sh
blob6fb1693ebea3c21db480bebc5f58349f4d0eb7d6
1 #!/bin/sh -xe
3 # Run this script to regenerate autoconf files
5 recheck=false
6 if [ x"$1" = x--recheck ]; then
7 recheck=true
8 config=$(sh config.status --config 2>/dev/null)
9 fi
11 mkdir -p autoconf autoconf/helpers config
12 autolib="`automake --print-libdir`"
13 for prg in install-sh compile config.guess config.sub; do
14 cp -f "$autolib"/"$prg" autoconf/helpers
15 done
16 rm -f autoconf/aclocal.m4
17 mkdir -p autoconf/m4.old autoconf/m4
18 mv -f autoconf/m4/*.m4 autoconf/m4.old/ 2>/dev/null || true
19 ACLOCAL_PATH="${ACLOCAL_PATH}${ACLOCAL_PATH:+:}`pwd`/autoconf/m4.old"
20 export ACLOCAL_PATH
21 aclocal --install --output=autoconf/aclocal.m4 -I autoconf/m4
22 test -f autoconf/aclocal.m4
23 rm -rf autoconf/m4.old
24 autoheader -B autoconf
25 autoconf -B autoconf
26 rm -rf autom4te.cache config.log config.status config/config.h Makefile
28 if $recheck; then
29 # This bizarre statement has to do with how config.status quotes its output
30 echo exec sh configure $config | sh -