pcp
[Top] [All Lists]

Re: build issue with AC_PROG_AWK

To: nscott@xxxxxxxxxx
Subject: Re: build issue with AC_PROG_AWK
From: James Peach <jamespeach@xxxxxxx>
Date: Tue, 25 Mar 2008 19:48:21 -0700
Cc: markgw@xxxxxxx, Max Matveev <makc@xxxxxxx>, pcp@xxxxxxxxxxx
In-reply-to: <1206426896.29868.344.camel@xxxxxxxxxxxxxxxxx>
References: <FC71FBC1-38F6-4CA8-A82C-7FFE102A06BF@xxxxxxx> <1206423840.29868.340.camel@xxxxxxxxxxxxxxxxx> <18408.37725.85447.784561@xxxxxxxxxxxxxxxxxxxxxx> <47E894C7.2000903@xxxxxxx> <1206426896.29868.344.camel@xxxxxxxxxxxxxxxxx>
Sender: pcp-bounce@xxxxxxxxxxx
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 ....

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>