autoconf
[Top][All Lists]
Advanced

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

Re: error out with no yacc?


From: Micah J. Cowan
Subject: Re: error out with no yacc?
Date: Wed, 23 Aug 2006 09:12:02 -0700
User-agent: Mutt/1.2.5.1i

On Wed, Aug 23, 2006 at 09:15:57AM -0400, Dan McMahill wrote:
> 
> Right now AC_PROG_YACC seems to happily set YACC=yacc if it can't 
> actually find a yacc program (bison -y or byacc).  Is there a way to 
> error out if there really is no yacc available?

I have a similar scenario with AC_PROG_AWK in my software package.

AC_PROG_YACC is used to determine what you should /call/ yacc; you still
need AC_PATH_PROG to find out if it actually exists.

I have the following code in my configure.ac:

    AC_ARG_VAR(AWK_PATH)
    AC_PROG_AWK
    AC_PATH_PROG(AWK_PATH, $AWK, [*NO AWK*])

    if test "$AWK_PATH" = '*NO AWK*'
    then
        AC_MSG_ERROR([Couldn't find a usable awk!])
    fi

(There may be a better way to do this.)

In my case, I need the absolute path because I use it to generate a
shebang line in an awk script.

-- 
Micah J. Cowan
Programmer, musician, typesetting enthusiast, gamer...
http://micah.cowan.name/




reply via email to

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