[Pkg-libvirt-commits] [libguestfs] 47/165: build: Use AC_PROG_AWK to define the right awk to call.
Hilko Bengen
bengen at moszumanska.debian.org
Sat Aug 30 08:24:25 UTC 2014
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit c5106511e004c90a0e538a6d39e3c32fbfea108e
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Sat May 17 11:35:31 2014 +0100
build: Use AC_PROG_AWK to define the right awk to call.
We actually call plain 'awk' in many different scripts, but this
commit does not change all of those.
---
Makefile.am | 2 +-
configure.ac | 31 +++++++++++++++++--------------
run.in | 2 +-
tests/guests/Makefile.am | 4 ++--
4 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index d490f6f..3da8021 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -301,7 +301,7 @@ dist-hook:
$(top_srcdir)/update-bugs.sh > BUGS-t
mv BUGS-t BUGS
cp BUGS $(distdir)/BUGS
- git shortlog -s | awk -F'\t' '{print $$2}' | sort -f > AUTHORS-t
+ git shortlog -s | $(AWK) -F'\t' '{print $$2}' | sort -f > AUTHORS-t
mv AUTHORS-t AUTHORS
cp AUTHORS $(distdir)/AUTHORS
diff --git a/configure.ac b/configure.ac
index 8b11088..263e914 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,6 +91,17 @@ AC_DEFINE([PACKAGE_VERSION_MINOR],[libguestfs_minor],[Minor version number.])
AC_DEFINE([PACKAGE_VERSION_RELEASE],[libguestfs_release],[Release number.])
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_EXTRA],["$libguestfs_extra"],[Extra version string.])
+# Define $(SED).
+m4_ifdef([AC_PROG_SED],[
+ AC_PROG_SED
+],[
+ dnl ... else hope for the best
+ AC_SUBST([SED], "sed")
+])
+
+# Define $(AWK).
+AC_PROG_AWK
+
dnl Default backend.
AC_MSG_CHECKING([if the user specified a default backend])
AC_ARG_WITH([default-backend],
@@ -121,14 +132,6 @@ AC_PROG_LN_S
dnl Define the host CPU architecture (defines 'host_cpu')
AC_CANONICAL_HOST
-# Define $(SED).
-m4_ifdef([AC_PROG_SED],[
- AC_PROG_SED
-],[
- dnl ... else hope for the best
- AC_SUBST([SED], "sed")
-])
-
dnl Check for basic C environment.
AC_PROG_CC_STDC
AC_PROG_INSTALL
@@ -495,8 +498,8 @@ if test "x$ENABLE_APPLIANCE" = "xyes"; then
AC_MSG_CHECKING([supermin is new enough])
$SUPERMIN --version >&AS_MESSAGE_LOG_FD 2>&1 ||
AC_MSG_ERROR([supermin >= $supermin_min must be installed, your version is too old])
- supermin_major="`$SUPERMIN --version | awk '{print $2}' | awk -F. '{print $1}'`"
- supermin_minor="`$SUPERMIN --version | awk '{print $2}' | awk -F. '{print $2}'`"
+ supermin_major="`$SUPERMIN --version | $AWK '{print $2}' | $AWK -F. '{print $1}'`"
+ supermin_minor="`$SUPERMIN --version | $AWK '{print $2}' | $AWK -F. '{print $2}'`"
AC_MSG_RESULT([$supermin_major.$supermin_minor])
if test "$supermin_major" -lt "$supermin_major_min" || \
@@ -1346,9 +1349,9 @@ if test "x$with_java" != "xno"; then
fi
dnl JNI version.
- jni_major_version=`echo "$VERSION" | awk -F. '{print $1}'`
- jni_minor_version=`echo "$VERSION" | awk -F. '{print $2}'`
- jni_micro_version=`echo "$VERSION" | awk -F. '{print $3}'`
+ jni_major_version=`echo "$VERSION" | $AWK -F. '{print $1}'`
+ jni_minor_version=`echo "$VERSION" | $AWK -F. '{print $2}'`
+ jni_micro_version=`echo "$VERSION" | $AWK -F. '{print $3}'`
JNI_VERSION_INFO=`expr "$jni_major_version" + "$jni_minor_version"`":$jni_micro_version:$jni_minor_version"
fi
@@ -1420,7 +1423,7 @@ AS_IF([test "x$enable_lua" != "xno"],[
AC_CHECK_PROG([LUA],[lua],[lua],[no])
AS_IF([test "x$LUA" != "xno"],[
AC_MSG_CHECKING([for Lua version])
- LUA_VERSION=`$LUA -e 'print(_VERSION)' | awk '{print $2}'`
+ LUA_VERSION=`$LUA -e 'print(_VERSION)' | $AWK '{print $2}'`
AC_MSG_RESULT([$LUA_VERSION])
dnl On Debian it's 'lua5.1', 'lua5.2' etc. On Fedora, just 'lua'.
PKG_CHECK_MODULES([LUA], [lua$LUA_VERSION],[
diff --git a/run.in b/run.in
index f49ab6e..db29451 100755
--- a/run.in
+++ b/run.in
@@ -196,7 +196,7 @@ export G_DEBUG=gc-friendly
# This is a cheap way to find some use-after-free and uninitialized
# read problems when using glibc.
-random_val="$(awk 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)"
+random_val="$(@AWK@ 'BEGIN{srand(); print 1+int(255*rand())}' < /dev/null)"
export MALLOC_PERTURB_=$random_val
# Do we have libtool? If we have it then we can use it to make
diff --git a/tests/guests/Makefile.am b/tests/guests/Makefile.am
index 6a02c98..d363ea5 100644
--- a/tests/guests/Makefile.am
+++ b/tests/guests/Makefile.am
@@ -65,9 +65,9 @@ display = \
- at echo -n '$(1): file size bytes: '; \
stat -c %s $(1); \
echo -n '$(1): allocated bytes: '; \
- du -B 1 $(1) | awk '{print $$1}'; \
+ du -B 1 $(1) | $(AWK) '{print $$1}'; \
echo -n '$(1): MD5 hash: '; \
- md5sum $(1) | awk '{print $$1}'
+ md5sum $(1) | $(AWK) '{print $$1}'
# Make several different blank images. These are not guests, but we
# include them in the libvirt fake XML to make sure that virt-df and
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list