From 3e115aaf1473100767d64862c852019fb0ebda3f Mon Sep 17 00:00:00 2001 From: Alex Rousskov Date: Wed, 9 Mar 2011 10:39:02 -0700 Subject: [PATCH] Import external libecap in adaptation/ecap/, where it belongs. Either we finally found the working combination of libtool variables or the previous attempts were failing due to libtool confusion over leftovers in the build directory (or we will discover more build failures later!). Polished libecap-related Makefile variable names based on squid-dev review. --- configure.ac | 8 ++++---- src/adaptation/Makefile.am | 2 +- src/adaptation/ecap/Makefile.am | 12 ++++-------- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/configure.ac b/configure.ac index 0289c3f6f4..ad8c89bf99 100644 --- a/configure.ac +++ b/configure.ac @@ -915,16 +915,16 @@ then dnl eCAP support requires libecap. dnl This Squid supports libecap v0.2.x. - dnl Use EXT prefix so that make and libtool messages distinguish between - dnl external libecap (that we check for here) and our own convenience lib. - PKG_CHECK_MODULES(EXTLIBECAP, [libecap > 0.2 libecap < 0.3]) + dnl Use EXT_ prefix to distinguish external libecap (that we check for + dnl here) from our own convenience ecap library in Makefiles. + PKG_CHECK_MODULES(EXT_LIBECAP, [libecap > 0.2 libecap < 0.3]) fi AM_CONDITIONAL(USE_ECAP, test "x$squid_opt_use_ecap" = "xyes") if test "x$squid_opt_use_ecap" = "xyes"; then AC_DEFINE(USE_ECAP,1,[Enable eCAP support]) - ECAP_LIBS="ecap/libxecap.la" + ECAP_LIBS="ecap/libsquid-ecap.la" squid_opt_use_adaptation=yes else AC_DEFINE(USE_ECAP,0,[Disable eCAP support]) diff --git a/src/adaptation/Makefile.am b/src/adaptation/Makefile.am index 0a1d39909c..b9466de778 100644 --- a/src/adaptation/Makefile.am +++ b/src/adaptation/Makefile.am @@ -45,6 +45,6 @@ libadaptation_la_SOURCES = \ History.h # add libraries for specific adaptation schemes -libadaptation_la_LIBADD = $(EXTLIBECAP_LIBS) $(ECAP_LIBS) $(ICAP_LIBS) +libadaptation_la_LIBADD = $(ECAP_LIBS) $(ICAP_LIBS) libadaptation_la_DEPENDENCIES = $(ECAP_LIBS) $(ICAP_LIBS) diff --git a/src/adaptation/ecap/Makefile.am b/src/adaptation/ecap/Makefile.am index 4e414e6852..6df5938a8d 100644 --- a/src/adaptation/ecap/Makefile.am +++ b/src/adaptation/ecap/Makefile.am @@ -1,9 +1,9 @@ include $(top_srcdir)/src/Common.am include $(top_srcdir)/src/TestHeaders.am -noinst_LTLIBRARIES = libxecap.la +noinst_LTLIBRARIES = libsquid-ecap.la -libxecap_la_SOURCES = \ +libsquid_ecap_la_SOURCES = \ Config.h \ Config.cc \ Host.h \ @@ -18,9 +18,5 @@ libxecap_la_SOURCES = \ Registry.h # add libecap using its pkg-config-produced configuration variables -libxecap_la_CXXFLAGS = $(EXTLIBECAP_CFLAGS) - -## It is tempting to put libxecap_la_LDFLAGS/LIBADD here, but it leads to weird -## linking errors. For example, "make clean all" works, but rebuilding after -## modifying a single source file leads to libtool's "file not found" errors. -## libxecap_la_LIBADD = $(EXTLIBECAP_LIBS) +libsquid_ecap_la_CXXFLAGS = $(EXT_LIBECAP_CFLAGS) +libsquid_ecap_la_LIBADD = $(EXT_LIBECAP_LIBS) -- 2.47.3