aboutsummaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-01-17 08:35:52 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-01-17 09:30:42 +0100
commit0869ea43e9c2257819e5c8719e28fe3b5c527911 (patch)
tree267b1f13959c6350cf2169b040581b67222c6104 /config
parentb0eff1098860f88dd385e6882ff7b1063d267213 (diff)
downloadpostgresql-0869ea43e9c2257819e5c8719e28fe3b5c527911.tar.gz
postgresql-0869ea43e9c2257819e5c8719e28fe3b5c527911.zip
Remove flex version checks
Remove the flex version checks from configure and meson. The cutoff versions are all so ancient that this is no longer relevant, and what the actual cutoff should be is a bit fuzzy. This also removes the ancient behavior that configure would also accept a "lex" program if it is actuall flex. This aligns the check with meson in this respect. For future reference, as of this commit, these are relevant flex versions: - The hard required minimum is flex 2.5.34 as of commit b1ef48980dd, but this has not actually been tested. - Prior to this, the minimum enforced by configure/meson was flex 2.5.35, which is the oldest present in the buildfarm right now. - As of commit 6fdd5d95634, the oldest version that will compile without warnings due to flex-generated code is flex 2.5.36. - The oldest version that probably still has some practical relevance is flex 2.5.37, which ships with CentOS/RHEL 7. Discussion: https://www.postgresql.org/message-id/1a204ccd-7ae6-478c-a431-407b5c48ccc6@eisentraut.org
Diffstat (limited to 'config')
-rw-r--r--config/programs.m451
1 files changed, 5 insertions, 46 deletions
diff --git a/config/programs.m4 b/config/programs.m4
index 490ec9fe9f5..7b55c2664a6 100644
--- a/config/programs.m4
+++ b/config/programs.m4
@@ -59,57 +59,16 @@ AC_SUBST(BISONFLAGS)
# PGAC_PATH_FLEX
# --------------
# Look for Flex, set the output variable FLEX to its path if found.
-# Reject versions before 2.5.35 (the earliest version in the buildfarm
-# as of 2022). Also find Flex if its installed under `lex', but do not
-# accept other Lex programs.
AC_DEFUN([PGAC_PATH_FLEX],
-[AC_CACHE_CHECK([for flex], pgac_cv_path_flex,
-[# Let the user override the test
-if test -n "$FLEX"; then
- pgac_cv_path_flex=$FLEX
-else
- pgac_save_IFS=$IFS
- IFS=$PATH_SEPARATOR
- for pgac_dir in $PATH; do
- IFS=$pgac_save_IFS
- if test -z "$pgac_dir" || test x"$pgac_dir" = x"."; then
- pgac_dir=`pwd`
- fi
- for pgac_prog in flex lex; do
- pgac_candidate="$pgac_dir/$pgac_prog"
- if test -f "$pgac_candidate" \
- && $pgac_candidate --version </dev/null >/dev/null 2>&1
- then
- echo '%%' > conftest.l
- if $pgac_candidate -t conftest.l 2>/dev/null | grep FLEX_SCANNER >/dev/null 2>&1; then
- pgac_flex_version=`$pgac_candidate --version 2>/dev/null`
- if echo "$pgac_flex_version" | sed ['s/[.a-z]/ /g'] | $AWK '{ if ([$]1 == 2 && ([$]2 > 5 || ([$]2 == 5 && [$]3 >= 35))) exit 0; else exit 1;}'
- then
- pgac_cv_path_flex=$pgac_candidate
- break 2
- else
- AC_MSG_ERROR([
-*** The installed version of Flex, $pgac_candidate, is too old to use with PostgreSQL.
-*** Flex version 2.5.35 or later is required, but this is $pgac_flex_version.])
- fi
- fi
- fi
- done
- done
- rm -f conftest.l lex.yy.c
- : ${pgac_cv_path_flex=no}
-fi
-])[]dnl AC_CACHE_CHECK
-
-if test x"$pgac_cv_path_flex" = x"no"; then
+[PGAC_PATH_PROGS(FLEX, flex)
+if test -z "$FLEX"; then
AC_MSG_ERROR([flex not found])
-else
- FLEX=$pgac_cv_path_flex
- pgac_flex_version=`$FLEX --version 2>/dev/null`
- AC_MSG_NOTICE([using $pgac_flex_version])
fi
+pgac_flex_version=`$FLEX --version 2>/dev/null`
+AC_MSG_NOTICE([using $pgac_flex_version])
+
AC_SUBST(FLEX)
AC_SUBST(FLEXFLAGS)
])# PGAC_PATH_FLEX