configure.in: Improve check for memcheck.h.
authorAndreas Jaeger <aj@gcc.gnu.org>
Sun, 16 Mar 2003 09:34:41 +0000 (10:34 +0100)
committerAndreas Jaeger <aj@gcc.gnu.org>
Sun, 16 Mar 2003 09:34:41 +0000 (10:34 +0100)
* configure.in: Improve check for memcheck.h.
* configure: Regenerated.

From-SVN: r64430

gcc/configure
gcc/configure.in

index 64ca2e0cec5796062d9ab831cc5ddc7421937496..77e4405be06dae520a1ddbb2b919324281e62a1b 100755 (executable)
@@ -2179,8 +2179,8 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
-  if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then
-       { echo "configure: error: *** Can't find both valgrind and valgrind.h" 1>&2; exit 1; }
+  if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
+       { echo "configure: error: *** Can't find both valgrind and valgrind.h/memcheck.h" 1>&2; exit 1; }
   fi
   valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
   valgrind_command="$valgrind_path -q"
index d8df284547e932c9e5e80fde3c29d6c289cb2ebb..763cd2a8275e8c6dac72e7137f6a6e2275691632 100644 (file)
@@ -417,8 +417,8 @@ if test x$ac_checking_valgrind != x ; then
   AC_CHECK_HEADER(valgrind.h, have_valgrind_h=yes, have_valgrind_h=no)
   AM_PATH_PROG_WITH_TEST(valgrind_path, valgrind,
        [$ac_dir/$ac_word --version | grep valgrind- >/dev/null 2>&1])
-  if test "x$valgrind_path" = "x" || test $have_valgrind_h = no; then
-       AC_MSG_ERROR([*** Can't find both valgrind and valgrind.h])
+  if test "x$valgrind_path" = "x" || (test $have_valgrind_h = no && test $gcc_cv_header_memcheck_h = no); then
+       AC_MSG_ERROR([*** Can't find both valgrind and valgrind.h/memcheck.h])
   fi
   valgrind_path_defines=-DVALGRIND_PATH='\"'$valgrind_path'\"'
   valgrind_command="$valgrind_path -q"