diff options
author | Radek Podgorny <radek@podgorny.cz> | 2014-02-22 17:42:57 +0100 |
---|---|---|
committer | Radek Podgorny <radek@podgorny.cz> | 2014-02-22 17:42:57 +0100 |
commit | cae1ebbf6a5260d29d500f8dd083402e960b546b (patch) | |
tree | 6586e685161191c7615ea494b03333f2687dc6c0 /CMakeLists.txt | |
parent | d5deafd1b4cce6d7fd71b43244c8c0aadce8a7c8 (diff) | |
download | unionfs-fuse-cae1ebbf6a5260d29d500f8dd083402e960b546b.tar.gz |
Fix cmake HAVE_XATTR redefinition
(from bernd's tree)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4950aa0..b3d2f87 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,11 +20,21 @@ add_definitions(-D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26) option(WITH_XATTR "Enable support for extended attributes" OFF) # .h include files -if (WITH_XATTR) - CHECK_INCLUDE_FILES("sys/xattr.h" HAVE_XATTR) - IF (HAVE_XATTR) - add_definitions(-DHAVE_XATTR) - ENDIF(HAVE_XATTR) +IF (WITH_XATTR) + CHECK_INCLUDE_FILES("sys/xattr.h" HAVE_LIBC_XATTR) + CHECK_INCLUDE_FILES("attr/xattr.h" HAVE_LIBATTR_XATTR) + + IF (HAVE_LIBC_XATTR) + add_definitions(-DLIBC_XATTR) + ELSEIF(HAVE_LIBATTR_XATTR) + add_definitions(-DLIBATTR_XATTR) + ENDIF() + + IF (NOT HAVE_LIBC_XATTR AND NOT HAVE_LIBATTR_XATTR) + add_definitions(-DDISABLE_XATTR) + ENDIF() +ELSE (WITH_XATTR) + add_definitions(-DDISABLE_XATTR) ENDIF (WITH_XATTR) |