]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Shuffled malloc detection mechnaisms into os-deps.m4
authorFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 29 Jul 2010 15:41:43 +0000 (17:41 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Thu, 29 Jul 2010 15:41:43 +0000 (17:41 +0200)
acinclude/os-deps.m4
configure.in

index 33c7c4c4abf735979d7669e9b525923e3f7df647..7e88aba71ac6f88893c3488443d7a18883cf06d0 100644 (file)
@@ -136,8 +136,10 @@ int main(int argc, char **argv)
 
 ]) dnl SQUID_CHECK_EPOLL
 
+
 dnl check that we have functional libcap2 headers
 dnl sets squid_cv_sys_capability_works to "yes" or "no"
+
 AC_DEFUN([SQUID_CHECK_FUNCTIONAL_LIBCAP2],[
   AC_CACHE_CHECK([for operational libcap2 headers], 
                  squid_cv_sys_capability_works,
@@ -157,6 +159,7 @@ AC_DEFUN([SQUID_CHECK_FUNCTIONAL_LIBCAP2],[
 
 dnl Ripped from Samba. Thanks!
 dnl check that we have Unix sockets. Sets squid_cv_unixsocket to either yes or no depending on the check
+
 AC_DEFUN([SQUID_CHECK_UNIX_SOCKET],[
   AC_CACHE_CHECK([for unix domain sockets],squid_cv_unixsocket, [
       AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
@@ -169,3 +172,25 @@ AC_DEFUN([SQUID_CHECK_UNIX_SOCKET],[
   sunaddr.sun_family = AF_UNIX;
   ]])],[squid_cv_unixsocket=yes],[squid_cv_unixsocket=no])])
 ])
+
+
+dnl checks that the system provides struct mallinfo and mallinfo.mxfast.
+dnl AC_DEFINEs HAVE_STRUCT_MALLINFO  and HAVE_STRUCT_MALLINFO_MXFAST if so
+
+AC_DEFUN([SQUID_HAVE_STRUCT_MALLINFO],[
+AC_CHECK_TYPE(struct mallinfo,AC_DEFINE(HAVE_STRUCT_MALLINFO,1,[The system provides struct mallinfo]),,[
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_MALLOC_H
+#include <malloc.h>
+#endif])
+AC_CHECK_MEMBERS([struct mallinfo.mxfast],,,[
+#if HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#if HAVE_MALLOC_H
+#include <malloc.h>
+#endif])
+])
+
index 7234f95a3cc2ecc4f8927db70f14ce83a9b16d65..3075bb352836cda6f19f3f28d0353c1ec40a7a85 100644 (file)
@@ -2273,21 +2273,7 @@ AC_CHECK_MEMBERS([struct tm.tm_gmtoff],,,[
 #endif
 ])
 
-AC_CHECK_TYPE(struct mallinfo,AC_DEFINE(HAVE_STRUCT_MALLINFO,1,[The system provides struct mallinfo]),,[
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif])
-
-AC_CHECK_MEMBERS([struct mallinfo.mxfast],,,[
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif])
+SQUID_HAVE_STRUCT_MALLINFO
 
 dnl Override rusage() detect on MinGW because is emulated in source code
 case "$host_os" in
@@ -2456,7 +2442,7 @@ SQUID_DEFINE_BOOL(HAVE_UNIXSOCKET,$squid_cv_unixsocket,[System supports unix soc
 
 AC_CHECK_LIB(gnumalloc, malloc)
 if test "x$ac_cv_lib_gnumalloc_malloc" = "xyes"; then
-  AC_MSG_NOTICE([Disabling extended malloc functions when using gnumalloc])
+  AC_MSG_NOTICE([Disabling extended malloc functions when using bundled gnumalloc])
   ac_cv_func_mallinfo=no
   ac_cv_func_mallocblksize=no
   ac_cv_func_mallopt=no