diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2015-06-11 02:43:21 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2015-12-23 02:23:00 +0100 |
commit | a1d982adfc89dd92a92df49bcfa13a0ef7579ba7 (patch) | |
tree | e63e35d5ac12f4d5224a29443dc1ad096bb7c799 /CMakeLists.txt | |
parent | fb74d787f16652987a6376ecb77a67d01b7325ff (diff) | |
download | tdelibs-a1d982adfc89dd92a92df49bcfa13a0ef7579ba7.tar.gz tdelibs-a1d982adfc89dd92a92df49bcfa13a0ef7579ba7.zip |
Improve ACL detection for CMake build
Fix hidden visibility in posixacladdons
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
(cherry picked from commit 6ebff397515bf153ea95d7e80d21ca9a0f97708d)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index bc23c12b4..46726d09d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -230,11 +230,23 @@ if( HAVE_SYS_TIME_H AND HAVE_TIME_H ) endif( HAVE_SYS_TIME_H AND HAVE_TIME_H ) if( HAVE_SYS_ACL_H ) - set( USE_POSIX_ACL 1 ) + check_include_file( "acl/libacl.h" HAVE_ACL_LIBACL_H ) + if( HAVE_ACL_LIBACL_H ) + check_library_exists( acl acl_init "" HAVE_ACL_INIT ) + if( HAVE_ACL_INIT AND HAVE_SYS_XATTR_H ) + set( USE_POSIX_ACL 1 ) + set( HAVE_NON_POSIX_ACL_EXTENSIONS 1 ) + set( ACL_LIBRARIES acl attr ) + endif( HAVE_ACL_INIT AND HAVE_SYS_XATTR_H ) + else( HAVE_ACL_LIBACL_H ) + check_library_exists( c acl_init "" HAVE_ACL_INIT ) + if( HAVE_ACL_INIT ) + set( USE_POSIX_ACL 1 ) + set( ACL_LIBRARIES c ) + endif( HAVE_ACL_INIT ) + endif( HAVE_ACL_LIBACL_H ) endif( HAVE_SYS_ACL_H ) -check_include_file( "acl/libacl.h" HAVE_NON_POSIX_ACL_EXTENSIONS ) - check_include_file( "valgrind/memcheck.h" HAVE_VALGRIND_MEMCHECK_H ) check_include_file( "values.h" HAVE_VALUES_H ) check_include_file( "X11/extensions/shape.h" HAVE_X11_EXTENSIONS_SHAPE_H ) |