]
)
+dnl Necessary if the first PKG_CHECK_MODULES call is conditional
+PKG_PROG_PKG_CONFIG
+
dnl Perform configuration consistency checks for eCAP
ECAPLIB=""
if test "x$squid_opt_use_ecap" = "xyes";
fi
dnl eCAP support requires libecap
- AC_CHECK_LIB([ecap], [main],
- [ECAPLIB="-lecap"],
- [AC_MSG_FAILURE([eCAP support requires libecap library, but no usable library was found])]
- )
+ dnl This Squid supports libecap v0.2.x
+ dnl Use EXT prefix or libtool will get confused with two libecaps:
+ dnl one "external" (that we check for here) and one our own convenience lib
+ PKG_CHECK_MODULES(EXTLIBECAP, [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/libecap.la $ECAP_LIBS"
+ ECAP_LIBS="ecap/libecap.la"
squid_opt_use_adaptation=yes
else
AC_DEFINE(USE_ECAP,0,[Disable eCAP support])
fi
dnl convenience library
AC_SUBST(ECAP_LIBS)
-dnl -lecap if needed
-AC_SUBST(ECAPLIB)
dnl enable adaptation if requested by specific adaptation mechanisms
History.h
# add libraries for specific adaptation schemes
-libadaptation_la_LIBADD = $(ECAP_LIBS) $(ECAPLIB) $(ICAP_LIBS)
+libadaptation_la_LIBADD = $(ECAP_LIBS) $(ICAP_LIBS)
libadaptation_la_DEPENDENCIES = $(ECAP_LIBS) $(ICAP_LIBS)