Many recent distros provide GCC >= 12.0 which supports __builtin_dynamic_object_size():
https://gcc.gnu.org/onlinedocs/gcc/Object-Size-Checking.html
This is used instead of __builtin_object_size() by newer CRT includes if _FORTIFY_SOURCE=3 is set.
Compiler presets or packaging support tools now often default to _FORTIFY_SOURCE=3 which would be downgraded by these lines of configure.ac:
CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2 -Wall -g"
CXXFLAGS="$CXXFLAGS -D_FORTIFY_SOURCE=2 -Wall -g"
(A similar problem may be the -g which may override -ggdb)