/* Whether the C compiler accepts the "format" attribute */
#undef HAVE_ATTR_FORMAT
+/* Whether the C compiler accepts the "nonstring" attribute */
+#undef HAVE_ATTR_NONSTRING
+
/* Whether the C compiler accepts the "noreturn" attribute */
#undef HAVE_ATTR_NORETURN
/* Whether the C compiler accepts the "unused" attribute */
#undef HAVE_ATTR_UNUSED
-/* Whether the C compiler accepts the "nonstring" attribute */
-#undef HAVE_ATTR_NONSTRING
-
/* Whether the C compiler accepts the "weak" attribute */
#undef HAVE_ATTR_WEAK
fi
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"nonstring\" attribute" >&5
+printf %s "checking whether the C compiler (${CC-cc}) accepts the \"nonstring\" attribute... " >&6; }
+if test ${ac_cv_c_nonstring_attribute+y}
+then :
+ printf %s "(cached) " >&6
+else $as_nop
+ ac_cv_c_nonstring_attribute=no
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+struct test {
+ char __attribute__((nonstring)) s[1];
+};
+
+int
+main (void)
+{
+
+ struct test t = { "1" };
+ (void) t;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"
+then :
+ ac_cv_c_nonstring_attribute="yes"
+else $as_nop
+ ac_cv_c_nonstring_attribute="no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext
+
+fi
+
+
+
+
+{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_nonstring_attribute" >&5
+printf "%s\n" "$ac_cv_c_nonstring_attribute" >&6; }
+if test $ac_cv_c_nonstring_attribute = yes; then
+
+printf "%s\n" "#define HAVE_ATTR_NONSTRING 1" >>confdefs.h
+
+fi
+
+
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler (${CC-cc}) accepts the \"weak\" attribute" >&5
+29 September 2025: Wouter
+ - Rebuild configure script from its sources.
+
26 September 2025: Yorgos
- Test for nonstring attribute in configure and add
nonstring attribute annotations.