+2023-04-13 Bruno Haible <bruno@clisp.org>
+
+ selinux-h: Avoid using HAVE_* macros in *.in.h files.
+ * m4/selinux-selinux-h.m4 (gl_HEADERS_SELINUX_SELINUX_H): Initialize
+ HAVE_SELINUX_SELINUX_H.
+ * modules/selinux-h (Makefile.am): Substitute HAVE_SELINUX_SELINUX_H.
+ * lib/se-selinux.in.h: Test HAVE_SELINUX_SELINUX_H as an Autoconf
+ variable.
+
2023-04-13 Bruno Haible <bruno@clisp.org>
ialloc, gethrxtime: Restore GCC diagnostics options.
#endif
@PRAGMA_COLUMNS@
-#if HAVE_SELINUX_SELINUX_H
+#if @HAVE_SELINUX_SELINUX_H@
#@INCLUDE_NEXT@ @NEXT_SELINUX_SELINUX_H@
-# serial 5 -*- Autoconf -*-
+# serial 6 -*- Autoconf -*-
# Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
if test "$with_selinux" != no; then
AC_CHECK_HEADERS([selinux/selinux.h])
+ if test $ac_cv_header_selinux_selinux_h = yes; then
+ HAVE_SELINUX_SELINUX_H=1
+ else
+ HAVE_SELINUX_SELINUX_H=0
+ fi
+ AC_SUBST([HAVE_SELINUX_SELINUX_H])
+
if test "$ac_cv_header_selinux_selinux_h" = yes; then
# We do have <selinux/selinux.h>, so do compile getfilecon.c
# and arrange to use its wrappers.
$(AM_V_GEN)$(MKDIR_P) '%reldir%/selinux'
$(AM_V_at)$(SED_HEADER_STDOUT) \
-e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \
+ -e 's/@''HAVE_SELINUX_SELINUX_H''@/$(HAVE_SELINUX_SELINUX_H)/g' \
-e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \