]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Make gcc 4.4 happy with 3.1 libraries
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 22 Jun 2009 13:06:09 +0000 (01:06 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 22 Jun 2009 13:06:09 +0000 (01:06 +1200)
 - Fixes libecap build fubar
 - Fixes libbase circular dependencies for ufsdump

configure.in
src/Makefile.am
src/adaptation/Makefile.am
src/ufsdump.cc

index 17e1d3db04f5e9858ac42d9bf8b3381c60086656..12f93e122aa1023deccb6be92d0285f4e9aa1f2f 100644 (file)
@@ -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
index bb6e7c9616a6417bf2169480696eb812813257be..1660ba939e55d77be8274babf4a48da6063f86f2 100644 (file)
@@ -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@ \
index 6d626def8ff70a95856fb9222fe357deb0ca1b98..7f7801a9cc3a765399ce0b3dbedb91e204ca1673 100644 (file)
@@ -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@
index 9daf167934d821ed884cc379fe6fd9d876058eef..44f71c8dc382b26eb5687722dd59c10b71a9eeea 100644 (file)
@@ -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 */