]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Don't try to write autoconf snippets when having a fewer..
authorHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 27 Oct 2009 19:50:18 +0000 (20:50 +0100)
committerHenrik Nordstrom <henrik@henriknordstrom.net>
Tue, 27 Oct 2009 19:50:18 +0000 (20:50 +0100)
configure.in

index 5d939417efd9ae6a68b2bb5f57c455bca1414107..05e1f416610501643ca30a163b8ddff74c175c2e 100644 (file)
@@ -2766,9 +2766,9 @@ AC_ARG_WITH(caps, AS_HELP_STRING([--without-libcap],[disable usage of Linux capa
 if test "x$use_caps" != "xno"; then
   # cap_clear_flag is the most recent libcap function we require
   AC_CHECK_LIB(cap, cap_clear_flag)
-  if test "x$ac_cv_lib_cap_cap_clear_flag" != xyes
+  if test "x$ac_cv_lib_cap_cap_clear_flag" != xyes; then
     if test "x$use_caps" = "xyes"; then
-      AC_MSG_ERROR("libcap forced enabled but not available or not usable, requires libcap-2.09 or later")
+      AC_MSG_ERROR([libcap forced enabled but not available or not usable, requires libcap-2.09 or later])
     fi
     use_caps=no
   fi
@@ -2777,13 +2777,19 @@ if test "x$use_caps" != "xno"; then
   AC_DEFINE(USE_LIBCAP, 1, [use libcap to set capabilities required for TPROXY])
   dnl Check for libcap headader breakage.
   AC_CHECK_HEADERS(sys/capability.h)
-  AC_CACHE_CHECK([for operational libcap2 headers], squid_cv_libcap_broken,
-    AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/capability.h>]], [[
-                    capget(NULL, NULL);
-                    capset(NULL, NULL);
-                   ]])],[squid_cv_libcap_broken=0],[squid_cv_libcap_broken=1])
+  AC_CACHE_CHECK([for operational libcap2 headers], squid_cv_sys_capability_works,
+    AC_LINK_IFELSE([AC_LANG_PROGRAM([[
+#include <stdlib.h>
+#include <stddef.h>
+#include <sys/capability.h>
+]], [[
+capget(NULL, NULL);
+capset(NULL, NULL);
+                   ]])],[squid_cv_sys_capability_works=yes],[squid_cv_sys_capability_works=no])
   )
-  AC_DEFINE_UNQUOTED([LIBCAP_BROKEN],$squid_cv_libcap_broken,[if libcap2 headers are broken and clashing with glibc])
+  if test x$squid_cv_sys_capability_works != xyes; then
+    AC_DEFINE([LIBCAP_BROKEN],1,[if libcap2 headers are broken and clashing with glibc])
+  fi
 fi