[Top][All Lists]

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

Re: How to exit if program is not found

From: Timothy Madden
Subject: Re: How to exit if program is not found
Date: Thu, 14 Jun 2012 19:37:33 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.5) Gecko/20120607 Thunderbird/10.0.5

On 06/14/2012 07:07 PM, Roger Pau Monné wrote:
On Thu, Jun 14, 2012 at 5:01 PM, Timothy Madden<address@hidden>  wrote:

I see in the info pages that autoconf macros check for various programs and
set a variable if found, but how do I get the behaviour I see in most
configure programs to exit with an error if a program is not found ?

I usually use the following macro:

[AC_PATH_PROG([$1], [$2], [no])
if test x"${$1}" == x"no"
     AC_MSG_ERROR([Unable to find $2, please install $2])

So on my I make the following calls:


Where "PERL" is the name of the variable where to store the path, and
"perl" is the name of the program to search for.

How about the predefined programs ?

AC_PROG_YACC might set YACC to 'bison -y', how would I check that 'bison -y' is found or is on path ?

And really, is there no support in autoconf itself for this ?

Thank you,
Timothy Madden

reply via email to

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