diff options
author | Bruno Haible <bruno@clisp.org> | 2023-04-13 21:12:45 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-04-13 21:12:45 +0200 |
commit | c5a9b3eaf8d48c19bf39fbcc7bf0d930d988efed (patch) | |
tree | ea1212a12e2d4e24950d8f2ea90ae4c2705a16df /m4 | |
parent | 78e5c144edb7a5edab8638f663bb83ac329924f9 (diff) | |
download | gnulib-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.m4 | 9 |
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. |