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: Timothy Madden
Subject: Re: How to exclude a directory from PATH when searching an executable ?
Date: Thu, 14 Jun 2012 17:18:38 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120607 Thunderbird/10.0.5

On 06/14/2012 04:15 PM, Nick Bowler wrote:
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.

Oh, I thought there might be something like that.

I get no fatal errors from CUBRID bison, it works fine, I just do not trust CUBRID packagers, since they did such a thing as putting their own bison on my PATH, which is not even needed by CUBRID.

I did not know about config.site, I am struggling with the autoconf info pages so hard... I only have 3 simple build commands for my application (bison, flex, g++), and yet I have to read dozens and dozens of pages in autoconf documentation just to get started ... and automake is just waiting next...

Thank you,
Timothy Madden




reply via email to

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