aboutsummaryrefslogtreecommitdiffstats
path: root/autogen.sh
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-12-22 18:17:16 -0800
committerH. Peter Anvin <hpa@zytor.com>2018-12-22 18:17:16 -0800
commitb0121dc312a83ab4912769e36c9f2cbe9493545d (patch)
tree0c892ba8247764e7ce5e50903fb15890df9aa23b /autogen.sh
parent3c0b924c9d031cee8f3f9da7bb2405bf65ef30bb (diff)
downloadnasm-b0121dc312a83ab4912769e36c9f2cbe9493545d.tar.gz
nasm-b0121dc312a83ab4912769e36c9f2cbe9493545d.tar.xz
nasm-b0121dc312a83ab4912769e36c9f2cbe9493545d.zip
autoconf: use librarized autoconf setup
I have been setting up a cross-project librarized autoconf setup; use it for NASM as well. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh22
1 files changed, 17 insertions, 5 deletions
diff --git a/autogen.sh b/autogen.sh
index 5dbcbb5e..b7633c66 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,8 +1,20 @@
#!/bin/sh -xe
#
-# Simple script to run the appropriate autotools from a repository.
+# Run this script to regenerate autoconf files
#
-autoreconf
-rm -rf autom4te.cache config.log config.status
-rm -f Makefile rdoff/Makefile doc/Makefile
-rm -f config.h.in config.h config/config.h
+mkdir -p autoconf autoconf/aux config
+autolib="`automake --print-libdir`"
+for prg in install-sh compile config.guess config.sub; do
+ cp -f "$autolib"/"$prg" autoconf/aux
+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