]> Savannah Git Hosting - gnulib.git/commitdiff
jit/cache: Fix configure test.
authorBruno Haible <bruno@clisp.org>
Mon, 13 Nov 2023 13:32:37 +0000 (14:32 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 13 Nov 2023 13:32:37 +0000 (14:32 +0100)
* m4/valgrind-helper.m4 (gl_VALGRIND_HELPER): Check already at configure
time whether <valgrind/valgrind.h> exists. Fix AC_DEFINE_UNQUOTED
invocation.

ChangeLog
m4/valgrind-helper.m4

index 09f0577925d7ed9f9dff2d20f3acf730be72fbe0..f9b39d517ec1db966e7d89acf37732ee8f040ffc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2023-11-13  Bruno Haible  <bruno@clisp.org>
+
+       jit/cache: Fix configure test.
+       * m4/valgrind-helper.m4 (gl_VALGRIND_HELPER): Check already at configure
+       time whether <valgrind/valgrind.h> exists. Fix AC_DEFINE_UNQUOTED
+       invocation.
+
 2023-11-12  Paul Eggert  <eggert@cs.ucla.edu>
 
        rawmemchr: speed up, particularly on CHERI
index b3d70a7ad95b9d39f707ecb326a211e7d5853db1..99c31030b9cada4d11622e206d707e4f63a850cb 100644 (file)
@@ -1,4 +1,4 @@
-# valgrind-helper.m4 serial 1
+# valgrind-helper.m4 serial 2
 dnl Copyright (C) 2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -18,5 +18,13 @@ AC_DEFUN_ONCE([gl_VALGRIND_HELPER],
        support_valgrind=0
      fi
     ])
-  AC_DEFINE_UNQUOTED([ENABLE_VALGRIND_SUPPORT], [$support_valgrind])
+  if test $support_valgrind = 1; then
+    AC_CHECK_HEADERS([valgrind/valgrind.h])
+    if test $ac_cv_header_valgrind_valgrind_h != yes; then
+      AC_MSG_ERROR([cannot enable valgrind support: <valgrind/valgrind.h> not found])
+    fi
+  fi
+  AC_DEFINE_UNQUOTED([ENABLE_VALGRIND_SUPPORT], [$support_valgrind],
+    [Define to 1 to include support for running the binaries under valgrind,
+     or to 0 otherwise.])
 ])