From 3fbf36004eec55b9a88916559029332d7f356bae Mon Sep 17 00:00:00 2001
From: Gabe <redhatrises@gmail.com>
Date: Wed, 15 Jan 2020 15:02:32 -0700
Subject: [PATCH] Fix case where CMake couldn't find libacl or xattr.h
---
CMakeLists.txt | 2 +-
cmake/FindACL.cmake | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 720d8d8eb..fe20992a5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -238,7 +238,7 @@ cmake_dependent_option(OPENSCAP_PROBE_INDEPENDENT_XMLFILECONTENT "Independent xm
# UNIX PROBES
cmake_dependent_option(OPENSCAP_PROBE_UNIX_DNSCACHE "Unix dnscache probe" ON "ENABLE_PROBES_UNIX" OFF)
cmake_dependent_option(OPENSCAP_PROBE_UNIX_FILE "Unix file probe" ON "ENABLE_PROBES_UNIX" OFF)
-cmake_dependent_option(OPENSCAP_PROBE_UNIX_FILEEXTENDEDATTRIBUTE "Unix fileextendedattribute probe" ON "ENABLE_PROBES_UNIX; (HAVE_SYS_XATTR_H OR HAVE_ATTR_XATTR_H)" OFF)
+cmake_dependent_option(OPENSCAP_PROBE_UNIX_FILEEXTENDEDATTRIBUTE "Unix fileextendedattribute probe" ON "ENABLE_PROBES_UNIX; HAVE_SYS_XATTR_H OR HAVE_ATTR_XATTR_H" OFF)
cmake_dependent_option(OPENSCAP_PROBE_UNIX_GCONF "Unix gconf probe" ON "ENABLE_PROBES_UNIX; GCONF_FOUND" OFF)
cmake_dependent_option(OPENSCAP_PROBE_UNIX_INTERFACE "Unix interface probe" ON "ENABLE_PROBES_UNIX" OFF)
cmake_dependent_option(OPENSCAP_PROBE_UNIX_PASSWORD "Unix password probe" ON "ENABLE_PROBES_UNIX" OFF)
diff --git a/cmake/FindACL.cmake b/cmake/FindACL.cmake
index 1753b0dd3..2d4a3027c 100644
--- a/cmake/FindACL.cmake
+++ b/cmake/FindACL.cmake
@@ -8,17 +8,17 @@
include(LibFindMacros)
# Use pkg-config to get hints about paths
-libfind_pkg_check_modules(ACL_PKGCONF acl)
+libfind_pkg_check_modules(ACL_PKGCONF libacl)
# Include dir
find_path(ACL_INCLUDE_DIR
- NAMES acl/libacl.h
+ NAMES "acl/libacl.h sys/libacl.h"
PATHS ${ACL_PKGCONF_INCLUDE_DIRS}
)
# Finally the library itself
find_library(ACL_LIBRARY
- NAMES acl
+ NAMES libacl
PATHS ${ACL_PKGCONF_LIBRARY_DIRS}
)