# HG changeset patch # User John W. Eaton # Date 1371738205 14400 # Node ID 0fabe0f49f38f19e1407068f33869309cfb61cf3 # Parent 0bf1d559b3214eb77f55bf383c836583e2714517 use better method to determine whether we are using flex and bison * m4/acinclude.m4 (OCTAVE_PROG_BISON, OCTAVE_PROG_FLEX): Use --version output to checkf for bison and flex instead of relying on program names. diff -r 0bf1d559b321 -r 0fabe0f49f38 m4/acinclude.m4 --- a/m4/acinclude.m4 Wed Jun 19 22:11:46 2013 -0400 +++ b/m4/acinclude.m4 Thu Jun 20 10:23:25 2013 -0400 @@ -1399,8 +1399,13 @@ dnl AC_DEFUN([OCTAVE_PROG_BISON], [ AC_PROG_YACC - case "$YACC" in - bison*) + + case "`$YACC --version`" in + *bison*) tmp_have_bison="yes" ;; + *) tmp_have_bison=no ;; + esac + + if test "$tmp_have_bison" = yes; then AC_CACHE_CHECK([syntax of bison push/pull declaration], [octave_cv_bison_push_pull_decl_style], [ style="dash underscore" @@ -1440,8 +1445,7 @@ done rm -f conftest.yy y.tab.h y.tab.c ]) - ;; - esac + fi AC_SUBST(BISON_PUSH_PULL_DECL_STYLE, $octave_cv_bison_push_pull_decl_style) @@ -1455,20 +1459,16 @@ OCTAVE_CONFIGURE_WARNING([warn_bison_push_pull_decl_style]) fi - case "$YACC" in - bison*) - ;; - *) - YACC='$(top_srcdir)/build-aux/missing bison' - warn_bison=" + if test "$tmp_have_bison" = no; then + YACC='$(top_srcdir)/build-aux/missing bison' + warn_bison=" I didn't find bison, but it's only a problem if you need to reconstruct parse.cc, which is the case if you're building from VCS sources. " - OCTAVE_CONFIGURE_WARNING([warn_bison]) - ;; - esac + OCTAVE_CONFIGURE_WARNING([warn_bison]) + fi ]) dnl dnl Find desktop-file-install program. @@ -1497,8 +1497,8 @@ ## Also make sure that we generate an interactive scanner if we are ## using flex. AC_PROG_LEX - case "$LEX" in - flex*) + case "`$LEX --version`" in + *flex*) LFLAGS="-I" AC_MSG_RESULT([defining LFLAGS to be $LFLAGS]) LEXLIB=