]> The Tcpdump Group git mirrors - tcpdump/blobdiff - configure
Mend "make check" on Solaris 9 (Autoconf only).
[tcpdump] / configure
index dfe570ae17635f37bce8272ae20c14b0c370caf3..d2a610d4e6d3f2abf9c9df74e3a607e5f5bfb497 100755 (executable)
--- a/configure
+++ b/configure
@@ -4999,6 +4999,54 @@ else
 fi
 
 
+#
+# Define HAVE_NO_PRINTF_Z to make it possible to disable test cases that
+# depend on %zu.
+#
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf(3) supports the z length modifier" >&5
+$as_echo_n "checking whether printf(3) supports the z length modifier... " >&6; }
+if test "$cross_compiling" = yes; then :
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+
+#include <stdio.h>
+#include <string.h>
+
+int main()
+{
+  char buf[100];
+  snprintf(buf, sizeof(buf), "%zu", sizeof(buf));
+  return strncmp(buf, "100", sizeof(buf)) ? 1 : 0;
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+else
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define HAVE_NO_PRINTF_Z 1" >>confdefs.h
+
+
+
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lrpc" >&5
 $as_echo_n "checking for main in -lrpc... " >&6; }
 if ${ac_cv_lib_rpc_main+:} false; then :