Patch to fix attached.
@werner, have you looked into the patch?
AC_CHECK_FUNCS([mmap]) on Fedora fails to find mmap() due to missing -fPIC.
/usr/bin/ld: /tmp/ccvNyAcN.o: relocation R_X86_64_PC32 against undefined symbol
`mmap@@GLIBC_2.2.5' can not be used when making a shared object; recompile with
We have -fPIC somewhere in default CFLAGS, so just resotre user CFLAGS
before making checks for functions.
That seems to be a regression due to commit 02eb9fc9d5863abcfed6af704e618f8cac7cc2e8
If the user's CFLAGS include -Werror, then some configure tests fail. To avoid this, we only add the user's CFLAGS after all of the configure tests have run.
That patch was obviously wrong because configure now has a different picture on
the build system than make. A better solution to the -Werrror problem would be
to pass -Werror only to the make invocation - or more robust to add an
--enable-werror configure flag.