diff options
| author | Slávek Banko <slavek.banko@axis.cz> | 2025-11-16 18:42:46 +0100 |
|---|---|---|
| committer | Slávek Banko <slavek.banko@axis.cz> | 2025-11-17 02:58:12 +0100 |
| commit | 53acf5bbb176c506665403864d83aeb04bb67144 (patch) | |
| tree | 6cb39905d86ae143abb58f87c7182882fc6db453 | |
| parent | 5867a352d2de7af4ba94a78aadbf2fddb8453a0c (diff) | |
| download | krusader-r14.1.x.tar.gz krusader-r14.1.x.zip | |
Allow ACL detection without pkgconfig file.r14.1.x
Allow building with POSIX ACL without a separate ACL library.
This solves firstly building on older distributions where there is no
pkgconfig file, but there is an acl library supporting extended ACL,
and secondly it solves building on systems where POSIX ACLs are part
of the standard library and a separate acl library is not present.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit cfa12e2abdfc5d447dbf507cd7a6005acf607807)
| -rw-r--r-- | ConfigureChecks.cmake | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index d50e00b..de74220 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -51,6 +51,21 @@ endif( ) if( WITH_ACL ) pkg_search_module( ACL libacl ) if( NOT ACL_FOUND ) + find_file( HAVE_ACL_H "sys/acl.h" ) + if( HAVE_ACL_H ) + find_library( HAVE_ACL_LIB NAMES acl ) + if( HAVE_ACL_LIB ) + set( ACL_LIBRARIES "${HAVE_ACL_LIB}" CACHE INTERNAL "Extended ACL library" FORCE ) + endif( ) + tde_save_and_set( CMAKE_REQUIRED_LIBRARIES "${ACL_LIBRARIES}" ) + check_symbol_exists( acl_free "${HAVE_ACL_H}" HAVE_ACL ) + tde_restore( CMAKE_REQUIRED_LIBRARIES ) + if( HAVE_ACL ) + set( ACL_FOUND 1 CACHE INTERNAL "Posix ACL found" FORCE ) + endif() + endif() + endif( ) + if( NOT ACL_FOUND ) tde_message_fatal( "ACL support was requested, but not found on your system" ) endif( ) set( HAVE_POSIX_ACL 1 ) |
