]> git.ipfire.org Git - thirdparty/sarg.git/commitdiff
Fix a link error with libpcre
authorFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 28 Nov 2013 18:47:35 +0000 (19:47 +0100)
committerFrederic Marchal <fmarchal@users.sourceforge.net>
Thu, 28 Nov 2013 18:47:35 +0000 (19:47 +0100)
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.

configure.in

index 7c09b8e885f2a43de3df839aecc6b887d70e24f5..ea192489dff48207953a4f2f7015796be6d27042 100644 (file)
@@ -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"