summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-13 21:12:45 +0200
committerBruno Haible <bruno@clisp.org>2023-04-13 21:12:45 +0200
commitc5a9b3eaf8d48c19bf39fbcc7bf0d930d988efed (patch)
treeea1212a12e2d4e24950d8f2ea90ae4c2705a16df /m4
parent78e5c144edb7a5edab8638f663bb83ac329924f9 (diff)
downloadgnulib-c5a9b3eaf8d48c19bf39fbcc7bf0d930d988efed.tar.gz
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.
Diffstat (limited to 'm4')
-rw-r--r--m4/selinux-selinux-h.m49
1 files changed, 8 insertions, 1 deletions
diff --git a/m4/selinux-selinux-h.m4 b/m4/selinux-selinux-h.m4
index f69eb3c375..7028248c71 100644
--- a/m4/selinux-selinux-h.m4
+++ b/m4/selinux-selinux-h.m4
@@ -1,4 +1,4 @@
-# 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,
@@ -15,6 +15,13 @@ AC_DEFUN([gl_HEADERS_SELINUX_SELINUX_H],
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.