diff options
author | Brad King <brad.king@kitware.com> | 2011-02-14 21:34:11 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-02-14 21:34:11 (GMT) |
commit | 42a5e8d978a316620027b32eeb976a5b8758d8ba (patch) | |
tree | bbb95386d592a75df6a7c726c814e61d4515b90d /Utilities | |
parent | 2a2fca24aa0058bb12f20d3d860c23123f902b74 (diff) | |
parent | ee55a4f70906a41db18df07de89383f0aa948c71 (diff) | |
download | CMake-42a5e8d978a316620027b32eeb976a5b8758d8ba.zip CMake-42a5e8d978a316620027b32eeb976a5b8758d8ba.tar.gz CMake-42a5e8d978a316620027b32eeb976a5b8758d8ba.tar.bz2 |
Merge topic 'linux-standard-base'
ee55a4f libarchive: Use OpenSSL only if CMAKE_USE_OPENSSL (#11815)
41b7b3e libarchive: Define major/minor/makedev only where needed (#11648)
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmlibarchive/CMakeLists.txt | 12 | ||||
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_entry.c | 15 | ||||
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_entry_xattr.c | 7 | ||||
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_windows.h | 5 |
4 files changed, 21 insertions, 18 deletions
diff --git a/Utilities/cmlibarchive/CMakeLists.txt b/Utilities/cmlibarchive/CMakeLists.txt index 6472ec5..08cda1e 100644 --- a/Utilities/cmlibarchive/CMakeLists.txt +++ b/Utilities/cmlibarchive/CMakeLists.txt @@ -274,7 +274,11 @@ LA_CHECK_INCLUDE_FILE("windows.h" HAVE_WINDOWS_H) # # Find OpenSSL # -FIND_PACKAGE(OpenSSL) +IF(CMAKE_USE_OPENSSL) + FIND_PACKAGE(OpenSSL) +ELSE() + SET(OPENSSL_FOUND 0) +ENDIF() IF(OPENSSL_FOUND) INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIR}) LIST(APPEND ADDITIONAL_LIBS ${OPENSSL_LIBRARIES}) @@ -296,7 +300,11 @@ LA_CHECK_INCLUDE_FILE("sha256.h" HAVE_SHA256_H) # # Find MD5/RMD160/SHA library # -FIND_LIBRARY(CRYPTO_LIBRARY NAMES crypto) +IF(CMAKE_USE_OPENSSL) + FIND_LIBRARY(CRYPTO_LIBRARY NAMES crypto) +ELSE() + SET(CRYPTO_LIBRARY "") +ENDIF() IF(CRYPTO_LIBRARY) LIST(APPEND ADDITIONAL_LIBS ${CRYPTO_LIBRARY}) ELSE(CRYPTO_LIBRARY) diff --git a/Utilities/cmlibarchive/libarchive/archive_entry.c b/Utilities/cmlibarchive/libarchive/archive_entry.c index d75dde5..c304231 100644 --- a/Utilities/cmlibarchive/libarchive/archive_entry.c +++ b/Utilities/cmlibarchive/libarchive/archive_entry.c @@ -32,12 +32,12 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.55 2008/12/23 05:01:4 #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif -#ifdef MAJOR_IN_MKDEV +#if MAJOR_IN_MKDEV #include <sys/mkdev.h> -#else -#ifdef MAJOR_IN_SYSMACROS +#define HAVE_MAJOR +#elif MAJOR_IN_SYSMACROS #include <sys/sysmacros.h> -#endif +#define HAVE_MAJOR #endif #ifdef HAVE_LIMITS_H #include <limits.h> @@ -75,6 +75,13 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.55 2008/12/23 05:01:4 #undef max #define max(a, b) ((a)>(b)?(a):(b)) +#if !defined(HAVE_MAJOR) && !defined(major) +/* Replacement for major/minor/makedev. */ +#define major(x) ((int)(0x00ff & ((x) >> 8))) +#define minor(x) ((int)(0xffff00ff & (x))) +#define makedev(maj,min) ((0xff00 & ((maj)<<8)) | (0xffff00ff & (min))) +#endif + /* Play games to come up with a suitable makedev() definition. */ #ifdef __QNXNTO__ /* QNX. <sigh> */ diff --git a/Utilities/cmlibarchive/libarchive/archive_entry_xattr.c b/Utilities/cmlibarchive/libarchive/archive_entry_xattr.c index c35c7b3..28b8ff5 100644 --- a/Utilities/cmlibarchive/libarchive/archive_entry_xattr.c +++ b/Utilities/cmlibarchive/libarchive/archive_entry_xattr.c @@ -32,13 +32,6 @@ __FBSDID("$FreeBSD: src/lib/libarchive/archive_entry.c,v 1.55 2008/12/23 05:01:4 #ifdef HAVE_SYS_TYPES_H #include <sys/types.h> #endif -#ifdef MAJOR_IN_MKDEV -#include <sys/mkdev.h> -#else -#ifdef MAJOR_IN_SYSMACROS -#include <sys/sysmacros.h> -#endif -#endif #ifdef HAVE_LIMITS_H #include <limits.h> #endif diff --git a/Utilities/cmlibarchive/libarchive/archive_windows.h b/Utilities/cmlibarchive/libarchive/archive_windows.h index 17f5698..f85f3f0 100644 --- a/Utilities/cmlibarchive/libarchive/archive_windows.h +++ b/Utilities/cmlibarchive/libarchive/archive_windows.h @@ -94,11 +94,6 @@ #endif #endif -/* Replacement for major/minor/makedev. */ -#define major(x) ((int)(0x00ff & ((x) >> 8))) -#define minor(x) ((int)(0xffff00ff & (x))) -#define makedev(maj,min) ((0xff00 & ((maj)<<8))|(0xffff00ff & (min))) - /* Alias the Windows _function to the POSIX equivalent. */ #define access _access #define chdir __la_chdir |