From: Frederic Marchal Date: Thu, 28 Nov 2013 18:47:35 +0000 (+0100) Subject: Fix a link error with libpcre X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f6185ca7b0b32cccec8ef90606ff5ca58da4e222;p=thirdparty%2Fsarg.git Fix a link error with libpcre 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. --- diff --git a/configure.in b/configure.in index 7c09b8e..ea19248 100644 --- a/configure.in +++ b/configure.in @@ -141,7 +141,7 @@ AS_HELP_STRING([--with-pcre],[Compile with support for the Perl Compatible Regul 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"