That all looks fine, except the comment for your new function,
gl_LIBSELINUX belongs in the .m4 file, and not just in the log.
Ok.
For the log, this would then be fine:
(gl_LIBSELINUX): New function. Extracted from...
Ok? Should I test /selinux instead of /selinux/enforce?
That would be better, since a system for which $(getenforce) reports
"Permissive", that /selinux/enforce won't exist.
It might be better still simply to see if getenforce can be run.
getenforce is not installed on a Debian non-SELinux-enabled system,
still such a system has /selinux and can use libselinux.
Paolo