From a3b919d59961f380950263518d895213e6bfc8cd Mon Sep 17 00:00:00 2001 From: Mario Gonzalez Date: Fri, 20 Jan 2023 18:48:51 -0300 Subject: [PATCH] Checking if flex is installed before compiling. We are checking for sed amd other external tools inside configure script, now is turn of flex. In systems without flex you will have this error: gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement [...] postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o configfile.o configfile.c flex -o'configfile-scan.c' configfile-scan.l make: flex: No such file or directory make: *** [Makefile.global:40: configfile-scan.c] Error 127 --- configure.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/configure.in b/configure.in index 737c41e4..bf92e683 100644 --- a/configure.in +++ b/configure.in @@ -60,6 +60,7 @@ AC_SUBST(vpath_build) AC_CHECK_PROG(HAVE_GNUSED,gnused,yes,no) AC_CHECK_PROG(HAVE_GSED,gsed,yes,no) AC_CHECK_PROG(HAVE_SED,sed,yes,no) +AC_CHECK_PROG(HAVE_FLEX,flex,yes,no) if test "$HAVE_GNUSED" = yes; then SED=gnused @@ -72,6 +73,7 @@ else fi AC_SUBST(SED) +AS_IF([test x"$HAVE_FLEX" != x"yes"], AC_MSG_ERROR([flex should be installed first])) AC_CONFIG_FILES([Makefile]) AC_CONFIG_FILES([Makefile.global])