On Jan 14 2014, at 10:35 , Mike Duigou <mike.dui...@oracle.com> wrote:
> > On Jan 14 2014, at 05:17 , Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com> > wrote: > >> On 2014-01-14 02:57, Mike Duigou wrote: >>> Hello all; >>> >>> This changeset allows overriding of the "simple required tools" which are >>> gathered in BASIC_SETUP_FUNDAMENTAL_TOOLS macro of basics.m4 I didn't >>> extend the override ability to every tool, instead primarily to the file >>> manipulation and archiving tools which I need to override for a project I >>> am working on. >>> >>> http://cr.openjdk.java.net/~mduigou/JDK-8031669/0/webrev/ >>> >>> Mike >> >> I think you are partly reimplementing functionality that already exists. >> >> If you call AC_PATH_PROG(CAT, cat) and $CAT is already definied, then it >> will not change it. So if you call configure like this >> configure CAT=/usr/local/bin/meow >> then AC_PATH_PROG will not look for "cat", but will accept that CAT is set >> to /usr/local/bin/meow. >> >> I think this is your needed use case..? > > setting CAT didn't seem to have any effect for me and was overridden by > BASIC_REQUIRE_PROG without adding the [$CAT cat] list. I will check again > though. I discovered the problem. CAT=foo sh configure will result in CAT=/usr/bin/cat (the default) whereas CAT=/usr/bin/foo sh configure will result in CAT=/usr/bin/foo (overridden) The value for CAT has to be an absolute path and not merely the name of something on the path. I'm now using CAT=`which foo` (overridden to /usr/bin/foo) and that seems to work fine. Mike > >> >> On the other hand, you do actually need AC_PATH_PROGS to check for both >> readlink and greadlink. And we should have used it to test for both gdiff >> and diff. So BASIC_REQUIRE_PROGS seems to fill a purpose anyway. But I think >> it is overkill to have bothBASIC_REQUIRE_PROG and BASIC_REQUIRE_PROGS; I >> think you can just convert the former into the latter and use it everywhere. > > I added BASIC_REQUIRE_PROGS which calls AC_PATH_PROGS to mirror > BASIC_REQUIRE_PROG and it's calling of AC_PATH_PROG. The existence of both > AC_PATH_PROGS and AC_PATH_PROG is presumably a historical wart but one I > chose to copy. > > Mike