aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-06-17 20:49:00 -0700
committerMike Frysinger <vapier@gentoo.org>2012-06-23 17:12:36 -0400
commit10d063518923c1452b6ab75a52f71ed2ece4e859 (patch)
tree7f876161f9c40c2bf2c1fe284fadf6dfd79412d4 /autogen.sh
parentsandbox: drop beep support (diff)
downloadsandbox-10d063518923c1452b6ab75a52f71ed2ece4e859.tar.gz
sandbox-10d063518923c1452b6ab75a52f71ed2ece4e859.tar.bz2
sandbox-10d063518923c1452b6ab75a52f71ed2ece4e859.zip
update ax_*.m4 files from upstream
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'autogen.sh')
-rwxr-xr-xautogen.sh23
1 files changed, 18 insertions, 5 deletions
diff --git a/autogen.sh b/autogen.sh
index e9fd6b3..8ff14d5 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -5,14 +5,27 @@ touch ChangeLog
# avoid ugly warnings due to mismatch between local libtool and
# whatever updated version is on the host
-find m4/*.m4 '!' -name 'ax_*.m4' -delete 2>/dev/null
+find m4/*.m4 '!' -name 'ax_*.m4' -delete 2>/dev/null || :
# not everyone has sys-devel/autoconf-archive installed
-for macro in $(grep -o '\<AX[A-Z_]*\>' configure.ac | sort -u) ; do
- if m4=$(grep -rl "\[${macro}\]" /usr/share/aclocal/) ; then
- cp -v $m4 m4/
+has() { [[ " ${*:2} " == *" $1 "* ]] ; }
+import_ax() {
+ local macro content m4 lm4s
+ content=$(sed -e '/^[[:space:]]*#/d' -e 's:\<dnl\>.*::' "$@")
+ for macro in $(echo "${content}" | grep -o '\<AX[A-Z_]*\>' | sort -u) ; do
+ if m4=$(grep -rl "\[${macro}\]" /usr/share/aclocal/) ; then
+ has ${m4} "${m4s[@]}" || lm4s+=( ${m4} )
+ fi
+ done
+ if [[ ${#lm4s[@]} -gt 0 ]] ; then
+ cp -v `printf '%s\n' ${lm4s[@]} | sort -u` m4/
+ m4s+=( "${lm4s[@]}" )
fi
-done
+}
+m4s=()
+import_ax configure.ac
+import_ax m4/ax_*.m4
+import_ax m4/ax_*.m4
autoreconf -i -f