From: Amos Jeffries Date: Mon, 22 Jun 2009 13:06:09 +0000 (+1200) Subject: Make gcc 4.4 happy with 3.1 libraries X-Git-Tag: SQUID_3_2_0_1~937 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b61a58df52fc37f31394bc81be426a576e0b75d2;p=thirdparty%2Fsquid.git Make gcc 4.4 happy with 3.1 libraries - Fixes libecap build fubar - Fixes libbase circular dependencies for ufsdump --- diff --git a/configure.in b/configure.in index 17e1d3db04..12f93e122a 100644 --- a/configure.in +++ b/configure.in @@ -871,6 +871,7 @@ AC_ARG_ENABLE(ecap, ) dnl Perform configuration consistency checks for eCAP +ECAPLIB="" if test $use_ecap = yes; then dnl eCAP support requires loadable modules, which are enabled by default @@ -881,7 +882,7 @@ then dnl eCAP support requires libecap AC_CHECK_LIB([ecap], [main], - [ECAP_LIBS="-lecap"], + [ECAPLIB="-lecap"], [AC_MSG_FAILURE([eCAP support requires libecap library, but no usable library was found])] ) fi @@ -896,7 +897,10 @@ else AC_DEFINE(USE_ECAP,0,[Disable eCAP support]) ECAP_LIBS="" fi +dnl convenience library AC_SUBST(ECAP_LIBS) +dnl -lecap if needed +AC_SUBST(ECAPLIB) dnl enable adaptation if requested by specific adaptation mechanisms diff --git a/src/Makefile.am b/src/Makefile.am index bb6e7c9616..1660ba939e 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -149,6 +149,7 @@ noinst_LTLIBRARIES = libsquid.la # libraries used by many targets COMMON_LIBS = \ + base/libbase.la \ libsquid.la \ auth/libacls.la \ ident/libident.la \ @@ -156,7 +157,6 @@ COMMON_LIBS = \ acl/libstate.la \ auth/libauth.la \ acl/libapi.la \ - base/libbase.la \ ip/libip.la \ fs/libfs.la @@ -569,11 +569,18 @@ recv_announce_SOURCES = recv-announce.cc SquidNew.cc ## tools.cc wants ip/libip.la ## client_side.cc wants ip/libip.la ## mem.cc wants ClientInfo.h +## libbase.la wants cbdata.* +## libbase.la wants MemBuf.* ufsdump_SOURCES = \ ClientInfo.h \ + cbdata.h \ + cbdata.cc \ debug.cc \ int.cc \ mem.cc \ + MemBuf.cc \ + MemBuf.cci \ + MemBuf.h \ store_key_md5.cc \ StoreMeta.cc \ StoreMetaMD5.cc \ @@ -590,7 +597,8 @@ ufsdump_SOURCES = \ HttpRequestMethod.cc \ RemovalPolicy.cc \ squid.h \ - $(WIN32_SOURCE) + $(WIN32_SOURCE) \ + tests/stub_fd.cc ufsdump_LDADD = \ $(COMMON_LIBS) \ @XTRA_OBJS@ \ diff --git a/src/adaptation/Makefile.am b/src/adaptation/Makefile.am index 6d626def8f..7f7801a9cc 100644 --- a/src/adaptation/Makefile.am +++ b/src/adaptation/Makefile.am @@ -39,6 +39,6 @@ libadaptation_la_SOURCES = \ ServiceGroups.h # add libraries for specific adaptation schemes -libadaptation_la_LIBADD = @ECAP_LIBS@ @ICAP_LIBS@ +libadaptation_la_LIBADD = @ECAP_LIBS@ @ECAPLIB@ @ICAP_LIBS@ libadaptation_la_DEPENDENCIES = @ECAP_LIBS@ @ICAP_LIBS@ diff --git a/src/ufsdump.cc b/src/ufsdump.cc index 9daf167934..44f71c8dc3 100644 --- a/src/ufsdump.cc +++ b/src/ufsdump.cc @@ -87,9 +87,15 @@ void death(int sig) { std::cout << "Fatal: Signal " << sig; - exit (1); + exit(1); } +void +fatal(const char *message) +{ + fprintf(stderr, "FATAL: %s\n", message); + exit(1); +} /* end stub functions */