pcp
[Top] [All Lists]

Re: build issue with AC_PROG_AWK

To: James Peach <jamespeach@xxxxxxx>
Subject: Re: build issue with AC_PROG_AWK
From: James Peach <jamespeach@xxxxxxx>
Date: Tue, 25 Mar 2008 19:50:58 -0700
Cc: nscott@xxxxxxxxxx, markgw@xxxxxxx, Max Matveev <makc@xxxxxxx>, pcp@xxxxxxxxxxx
In-reply-to: <7138BC3A-DEC1-432A-B77C-59BC65E53BE7@mac.com>
References: <FC71FBC1-38F6-4CA8-A82C-7FFE102A06BF@mac.com> <1206423840.29868.340.camel@edge.scott.net.au> <18408.37725.85447.784561@kuku.melbourne.sgi.com> <47E894C7.2000903@sgi.com> <1206426896.29868.344.camel@edge.scott.net.au> <7138BC3A-DEC1-432A-B77C-59BC65E53BE7@mac.com>
Sender: pcp-bounce@xxxxxxxxxxx
On 25/03/2008, at 7:48 PM, James Peach wrote:
On 24/03/2008, at 11:34 PM, Nathan Scott wrote:

On Tue, 2008-03-25 at 16:59 +1100, Mark Goodwin wrote:

Yes that's pretty much the explanation, thanks Max. Nowdays I think
we could probably nuke the search for awk in configure and just
statically define it as PCP_AWK_PROG=awk in pcp.conf.in. That assumes
awk will be found in the default path on all required distros .. is
that true?

Pretty much. That would break the ability to set the location/binary via the AWK environment variable though (at configure/build time). It might be better to do it the same way as sed...

test -z "$SED" && AC_PATH_PROG(SED, sed, /bin/sed)
sed=$SED
AC_SUBST(sed)

This fix works for me ....

although configure.in also needs the fix described here: http://oss.sgi.com/archives/xfs/2003-04/msg00115.html



diff --git a/configure.in b/configure.in
index 3cd5336..0f2f7d6 100644
--- a/configure.in
+++ b/configure.in
@@ -410,7 +410,7 @@ lex=$LEX
AC_SUBST(lex)

dnl check if user wants their own awk, sed and echo
-test -z "$AWK" && AC_PROG_AWK
+test -z "$AWK" && AC_PATH_PROG(AWK, awk, /usr/bin/awk)
if test $target_os = irix -a "$AWK" = "gawk"
then
dnl always use nawk on IRIX
diff --git a/src/include/pcp.env b/src/include/pcp.env
index dc6c96d..ca657fc 100644
--- a/src/include/pcp.env
+++ b/src/include/pcp.env
@@ -63,7 +63,7 @@ PATH=$PATH/usr/sbin:/sbin:/bin:/usr/bin:/etc:$ {PCP_BIN_DIR}:${PCP_BINADM_DIR}:${
#
for dir in /usr/bsd /usr/etc /usr/bin/X11 /usr/local/bin \
/opt/sfw/bin /usr/ccs/bin /cygdrive/c/WINDOWS/system32 \
- /usr/contrib/bin /opt/local/bin
+ /usr/contrib/bin
do
[ -d $dir ] || continue
echo "$PATH" | egrep ":$dir(:|\$)" >/dev/null && continue




<Prev in Thread] Current Thread [Next in Thread>