From f86daf97c15d7f6a5432a192f5260685e7e39221 Mon Sep 17 00:00:00 2001 From: Hayodea Hakol Date: Tue, 7 Jan 2025 14:04:03 -0400 Subject: [PATCH] Build: Check for Flex and Yacc --- configure.ac | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/configure.ac b/configure.ac index d062525..a11f072 100644 --- a/configure.ac +++ b/configure.ac @@ -5,6 +5,7 @@ AC_INIT([Harriman-Peikoff Project], [0.00.000], AC_CONFIG_SRCDIR([hcore/mind.cpp]) AC_CONFIG_AUX_DIR([autotools-aux]) +AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign -Wall -Werror]) @@ -30,14 +31,23 @@ AC_DEFINE_UNQUOTED([CONFIG_MIND_VOSCILLATOR_FREQ_MS], [${MIND_VOSCILLATOR_FREQ_MS}], [Frequency of the mind virtual oscillator in milliseconds]) +m4_include([m4/ac_prog_flex.m4]) +m4_include([m4/ac_prog_bison.m4]) AC_PROG_CC AC_PROG_CXX AC_PROG_RANLIB AM_PROG_AR +AC_PROG_LEX(noyywrap) +AC_PROG_YACC +AS_IF([test -z "${LEX}" || test -z "${YACC}"], [ + AC_MSG_ERROR([LEX and YACC must both be available in PATH.]) +]) AM_CPPFLAGS=m4_normalize(["-I\"\$(top_srcdir)/include\""]) AC_SUBST([AM_CPPFLAGS]) +AC_SUBST([YACC]) +AC_SUBST([LEX]) AC_CONFIG_HEADERS([include/config.h]) AC_CONFIG_FILES([