From 75b2d46afcfb5534465556bfa9d46999c7a69d84 Mon Sep 17 00:00:00 2001 From: Alex Merry Date: Sat, 3 Aug 2013 11:52:00 +0100 Subject: Cook our own bison/flex checks instead of AC_PROG_LEX/YACC Given we specifically want bison and flex, and not other yacc/lex implementations with their various deficiencies, we don't need autoconf's detection magic. --- tikzit/configure.ac | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tikzit/configure.ac b/tikzit/configure.ac index 99697c5..42f09ee 100644 --- a/tikzit/configure.ac +++ b/tikzit/configure.ac @@ -20,20 +20,23 @@ m4_include([m4/objc.m4]) AC_PROG_OBJC([gcc clang objc objcc]) AC_LANG([Objective C]) -AC_PROG_LEX -AS_IF([$LEX --version 2>/dev/null | grep "^flex" >/dev/null 2>/dev/null],[], +AC_CHECK_PROGS([FLEX], [flex lex], [flex]) +AS_IF([$FLEX --version 2>/dev/null | grep "^flex" >/dev/null 2>/dev/null],[], [ AC_MSG_WARN([flex not found; this may cause problems for developers]) - LEX="\${SHELL} \$(top_srcdir)/missing flex" - AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy]) - AC_SUBST([LEXLIB], ['']) + # in case a lex that wasn't flex was found + FLEX=flex ]) -AC_PROG_YACC -AS_IF([$YACC --version 2>/dev/null | grep "^bison" >/dev/null 2>/dev/null],[], +AM_MISSING_PROG([LEX], [$FLEX]) + +AC_CHECK_PROGS([BISON], [bison yacc], [bison]) +AS_IF([$BISON --version 2>/dev/null | grep "^bison" >/dev/null 2>/dev/null],[], [ AC_MSG_WARN([bison not found; this may cause problems for developers]) - YACC="\${SHELL} \$(top_srcdir)/missing bison" + # in case a yacc that wasn't bison was found + BISON=bison ]) +AM_MISSING_PROG([YACC], [$BISON]) # Checks for libraries. FOUNDATION_OBJCFLAGS=`eval "gnustep-config --objc-flags"` -- cgit v1.2.3