[Mesa-dev] [Bug 36651] mesa requires bison and flex to build but configure does not check for them

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon May 9 05:56:58 PDT 2011


--- Comment #3 from Dan Nicholson <dbn.lists at gmail.com> 2011-05-09 05:56:58 PDT ---
Review of attachment 46450:
 --> (https://bugs.freedesktop.org/review?bug=36651&attachment=46450)

In order to make the substitution work, you need to add a place for configure
to put the definition of found programs. In configs/autoconf, add these two
lines somewhere:


The rest looks good to me. There are ways to make this more portable with
autoconf, but we can save that for another patch.

::: configure.ac
@@ +34,3 @@
 AC_CHECK_PROGS([PYTHON2], [python2 python])

There are some autoconf macros specifically for lex/yacc, but this should do
for now. However, what's missing here is that we're not checking if the tools
are not available and stopping if they're not available. configure will set the
program to "no" if it finds nothing. Also, I'm not sure it's a big deal, but I
prefer AC_PATH_PROG if we're not checking for multiple program names. Something
like this might work:

AC_PATH_PROG([FLEX], [flex])
test "x$FLEX" = "xno" && AC_MSG_ERROR([flex is needed to build mesa])
AC_PATH_PROG([BISON], [bison])
test "x$BISON" = "xno" && AC_MSG_ERROR([bison is needed to build mesa])

Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the mesa-dev mailing list