summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Merry <dev@randomguy3.me.uk>2013-08-03 11:52:00 +0100
committerAlex Merry <dev@randomguy3.me.uk>2013-08-03 11:52:00 +0100
commit75b2d46afcfb5534465556bfa9d46999c7a69d84 (patch)
treef13051512965154420edd1c1084145a07a2096ae
parent0b419a4d47e7e67837eba4c6b9d52ef664938f9d (diff)
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.
-rw-r--r--tikzit/configure.ac19
1 files 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"`