diff --git a/configure.in b/configure.in index ed9e631dd..459455997 100644 --- a/configure.in +++ b/configure.in @@ -1048,6 +1048,7 @@ LVM_LIBAPI=`echo "$VER" | $AWK -F '[[()]]' '{print $2}'` ################################################################################ AC_SUBST(APPLIB) +AC_SUBST(AWK) AC_SUBST(BUILD_CMIRRORD) AC_SUBST(BUILD_DMEVENTD) AC_SUBST(CCS_CFLAGS) diff --git a/make.tmpl.in b/make.tmpl.in index 5e7f44fd0..a2fe0035e 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -28,6 +28,7 @@ GENHTML = @GENHTML@ LN_S = @LN_S@ SED = @SED@ CFLOW_CMD = @CFLOW_CMD@ +AWK = @AWK@ LIBS = @LIBS@ # Extra libraries always linked with static binaries @@ -63,7 +64,7 @@ localedir = $(DESTDIR)@LOCALEDIR@ staticdir = $(DESTDIR)@STATICDIR@ udevdir = $(DESTDIR)@udevdir@ USRLIB_RELPATH = $(shell echo $(abspath $(usrlibdir) $(libdir)) | \ - awk -f $(top_srcdir)/scripts/relpath.awk) + $(AWK) -f $(top_srcdir)/scripts/relpath.awk) # Setup vpath search paths for some suffixes vpath %.c $(srcdir) @@ -142,13 +143,13 @@ STRIP= LVM_VERSION := $(shell cat $(top_srcdir)/VERSION) LIB_VERSION_LVM := $(shell cat $(top_srcdir)/VERSION | \ - awk -F '.' '{printf "%s.%s",$$1,$$2}') + $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}') LIB_VERSION_DM := $(shell cat $(top_srcdir)/VERSION_DM | \ - awk -F '.' '{printf "%s.%s",$$1,$$2}') + $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}') LIB_VERSION_APP := $(shell cat $(top_srcdir)/VERSION | \ - awk -F '[(). ]' '{printf "%s.%s",$$1,$$4}') + $(AWK) -F '[(). ]' '{printf "%s.%s",$$1,$$4}') INCLUDES += -I. -I$(top_builddir)/include diff --git a/scripts/relpath.awk b/scripts/relpath.awk index 26fe1eeaa..0d3c1ef17 100755 --- a/scripts/relpath.awk +++ b/scripts/relpath.awk @@ -1,4 +1,4 @@ -#!/usr/bin/awk -f +#!/bin/awk -f # # Copyright (C) 2010 Red Hat, Inc. All rights reserved. #