[master] 12bbe31f7 build: Only link PCRE where it is used

Nils Goroll nils.goroll at uplex.de
Thu Jun 10 08:35:09 UTC 2021


commit 12bbe31f7989538f6711448a91667347d8d529bf
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Tue May 18 07:47:13 2021 +0200

    build: Only link PCRE where it is used
    
    Otherwise we get it from either libvarnish or libvarnishapi.
    
    Refs #3559

diff --git a/bin/varnishtest/Makefile.am b/bin/varnishtest/Makefile.am
index fae47f4a5..2574fb586 100644
--- a/bin/varnishtest/Makefile.am
+++ b/bin/varnishtest/Makefile.am
@@ -56,7 +56,6 @@ varnishtest_LDADD = \
 		$(top_builddir)/lib/libvarnish/libvarnish.la \
 		$(top_builddir)/lib/libvgz/libvgz.a \
 		@SAN_LDFLAGS@ \
-		@PCRE_LIBS@ \
 		${PTHREAD_LIBS} ${NET_LIBS} ${LIBM}
 
 varnishtest_CFLAGS = \
diff --git a/lib/libvarnish/Makefile.am b/lib/libvarnish/Makefile.am
index 9c0b8a643..ea2ba0a3a 100644
--- a/lib/libvarnish/Makefile.am
+++ b/lib/libvarnish/Makefile.am
@@ -6,7 +6,7 @@ AM_CPPFLAGS = \
 	@PCRE_CFLAGS@
 
 AM_CFLAGS   = $(AM_LT_CFLAGS)  @SAN_CFLAGS@
-AM_LDFLAGS  = $(AM_LT_LDFLAGS) @SAN_LDFLAGS@
+AM_LDFLAGS  = $(AM_LT_LDFLAGS) @SAN_LDFLAGS@ @PCRE_LIBS@
 
 noinst_LTLIBRARIES = libvarnish.la
 
diff --git a/lib/libvarnishapi/Makefile.am b/lib/libvarnishapi/Makefile.am
index 0cbff3c4d..26638491b 100644
--- a/lib/libvarnishapi/Makefile.am
+++ b/lib/libvarnishapi/Makefile.am
@@ -4,8 +4,7 @@ AM_LDFLAGS  = $(AM_LT_LDFLAGS)
 
 AM_CPPFLAGS = \
 	-I$(top_srcdir)/include \
-	-I$(top_builddir)/include \
-	@PCRE_CFLAGS@
+	-I$(top_builddir)/include
 
 lib_LTLIBRARIES = libvarnishapi.la
 
@@ -41,7 +40,7 @@ libvarnishapi_la_CFLAGS = \
 
 libvarnishapi_la_LIBADD = \
 	$(top_builddir)/lib/libvarnish/libvarnish.la \
-	@SAN_LDFLAGS@ @PCRE_LIBS@ ${NET_LIBS} ${RT_LIBS} ${LIBM}
+	@SAN_LDFLAGS@ ${NET_LIBS} ${RT_LIBS} ${LIBM}
 
 if HAVE_LD_VERSION_SCRIPT
 libvarnishapi_la_LDFLAGS += -Wl,--version-script=$(srcdir)/libvarnishapi.map
@@ -81,7 +80,8 @@ vxp_test_SOURCES = \
 vxp_test_CFLAGS = \
 	-DVARNISH_STATE_DIR='"${VARNISH_STATE_DIR}"' \
 	-DVXP_DEBUG
-vxp_test_LDADD = @PCRE_LIBS@ \
+vxp_test_LDADD = \
+	$(top_builddir)/lib/libvarnish/libvarnish.la \
 	${RT_LIBS} ${LIBM} ${PTHREAD_LIBS}
 
 TESTS = vsl_glob_test


More information about the varnish-commit mailing list