Libpcre was linked at the beginning of the link command. It was fine with
some compilers but not with others.
Libraries are supposed to be linked after every *.o file that use them or
some linker (gold?) reports errors about undefined references to functions.
Thanks to Micha Voss for reporting this problem and testing the solution.
if ( test "x$with_pcre" != "xno" ) ; then
AC_CHECK_HEADERS(pcre.h)
if ( test "x$ac_cv_header_pcre_h" = "xyes" ) ; then
- LDFLAGS="$LDFLAGS $(pcre-config --libs)"
+ LIBS="$LIBS $(pcre-config --libs)"
CFLAGS="$CFLAGS $(pcre-config --cflags)"
else
pcre_status="not found"