]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - libcpp/configure
PR preprocessor/84517 allow double-underscore macros after string literals
[thirdparty/gcc.git] / libcpp / configure
index 8cf2f77cacebb8193989cc32914029655b6d5460..12c1907ed40dfe77783ff90df7a1ac2fce4382c5 100755 (executable)
@@ -703,6 +703,7 @@ enable_maintainer_mode
 enable_checking
 enable_canonical_system_headers
 enable_host_shared
+enable_valgrind_annotations
 '
       ac_precious_vars='build_alias
 host_alias
@@ -1343,6 +1344,8 @@ Optional Features:
   --enable-canonical-system-headers
                           enable or disable system headers canonicalization
   --enable-host-shared    build host code as shared libraries
+  --enable-valgrind-annotations
+                          enable valgrind runtime interaction
 
 Optional Packages:
   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -7285,9 +7288,11 @@ for check in release $ac_checking_flags
 do
        case $check in
        # these set all the flags to specific states
-       yes|all) ac_checking=1 ; ac_valgrind_checking= ;;
-       no|none|release) ac_checking= ; ac_valgrind_checking= ;;
+       yes|all) ac_checking=1 ; ac_assert_checking=1 ; ac_valgrind_checking= ;;
+       no|none) ac_checking= ; ac_assert_checking= ; ac_valgrind_checking= ;;
+       release) ac_checking= ; ac_assert_checking=1 ; ac_valgrind_checking= ;;
        # these enable particular checks
+       assert) ac_assert_checking=1 ;;
        misc) ac_checking=1 ;;
        valgrind) ac_valgrind_checking=1 ;;
        # accept
@@ -7298,7 +7303,16 @@ IFS="$ac_save_IFS"
 
 if test x$ac_checking != x ; then
 
-$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
+$as_echo "#define CHECKING_P 1" >>confdefs.h
+
+else
+  $as_echo "#define CHECKING_P 0" >>confdefs.h
+
+fi
+
+if test x$ac_assert_checking != x ; then
+
+$as_echo "#define ENABLE_ASSERT_CHECKING 1" >>confdefs.h
 
 fi
 
@@ -7352,6 +7366,25 @@ fi
 
 
 
+# Check whether --enable-valgrind-annotations was given.
+if test "${enable_valgrind_annotations+set}" = set; then :
+  enableval=$enable_valgrind_annotations;
+else
+  enable_valgrind_annotations=no
+fi
+
+if test x$enable_valgrind_annotations != xno \
+    || test x$ac_valgrind_checking != x; then
+  if (test $have_valgrind_h = no \
+      && test $gcc_cv_header_memcheck_h = no \
+      && test $gcc_cv_header_valgrind_memcheck_h = no); then
+    as_fn_error "*** Can't find valgrind/memcheck.h, memcheck.h or valgrind.h" "$LINENO" 5
+  fi
+
+$as_echo "#define ENABLE_VALGRIND_ANNOTATIONS 1" >>confdefs.h
+
+fi
+
 # Output.
 
 ac_config_headers="$ac_config_headers config.h:config.in"