nasm/autogen.sh
H. Peter Anvin 0bddd0f1b1 autoconf: move aux directory, define AC_CONFIG_AUX_DIR()
The name "aux" is reserved on Windows platforms, a legacy from CP/M
via MS-DOS. Rename it to "helpers".

Turns out that that directory wasn't actually used properly, because
AC_CONFIG_AUX_DIR was never defined, and there was a redundant copy of
install-sh checked into the base of the source tree.

Reported-by: Ehsan Alem Mohammad Ghasemlou <e.ghasemloo@gmail.com>
NASM-Bugzilla: https://bugzilla.nasm.us/show_bug.cgi?id=3392560
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2019-02-22 01:18:04 -08:00

32 lines
956 B
Bash
Executable File

#!/bin/sh -xe
#
# Run this script to regenerate autoconf files
#
recheck=false
if [ x"$1" = x--recheck ]; then
recheck=true
config=$(sh config.status --config 2>/dev/null)
fi
mkdir -p autoconf autoconf/helpers config
autolib="`automake --print-libdir`"
for prg in install-sh compile config.guess config.sub; do
cp -f "$autolib"/"$prg" autoconf/helpers
done
rm -f autoconf/aclocal.m4
mkdir -p autoconf/m4.old autoconf/m4
mv -f autoconf/m4/*.m4 autoconf/m4.old/ 2>/dev/null || true
ACLOCAL_PATH="${ACLOCAL_PATH}${ACLOCAL_PATH:+:}`pwd`/autoconf/m4.old"
export ACLOCAL_PATH
aclocal --install --output=autoconf/aclocal.m4 -I autoconf/m4
test -f autoconf/aclocal.m4
rm -rf autoconf/m4.old
autoheader -B autoconf
autoconf -B autoconf
rm -rf autom4te.cache config.log config.status config/config.h Makefile
if $recheck; then
# This bizarre statement has to do with how config.status quotes its output
echo exec sh configure $config | sh -
fi