autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to exclude a directory from PATH when searching an executable ?


From: Nick Bowler
Subject: Re: How to exclude a directory from PATH when searching an executable ?
Date: Thu, 14 Jun 2012 09:15:32 -0400
User-agent: Mutt/1.5.21 (2010-09-15)

Hello Timothy,

On 2012-06-14 15:33 +0300, Timothy Madden wrote:
> On my particular system at work we have to install a dubious program 
> called CUBRID, and the package they provide for it also installs its own 
> version of bison and puts that directory on the system PATH.
> 
> So now my configure scripts (and all other scripts and consoles for that 
> matter) use bison from CUBRID instead of the version installed on the 
> system.
> 
> Is there a (portable) way to express in my configure.ac that I want to 
> check for and use the bison executable, but I am willing to accept the 
> executable found in /usr/share/cubrid/bin/bison only if there is no 
> other bison found on PATH or on the system ?

This should not go in your configure.ac at all.  Instead, provide a
mechanism for your users to override the auto-detected version of
bison: you will probably get this automatically if you use one of
Autoconf's built-in macros to find Bison.

Then, if desired, users or administrators of those systems can create a
config.site file to prefer the system bison over the "CUBRID Bison".

If the "CUBRID Bison" version has some fatal flaw such that it cannot
be used with your package, then you should test for *that* (e.g., by
trying to run the detected bison on a test case) and fail the configure
if the test fails.

Hope that helps,
-- 
Nick Bowler, Elliptic Technologies (http://www.elliptictech.com/)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]