summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/legacystore.cmake
diff options
context:
space:
mode:
authorCharles E. Rolke <chug@apache.org>2013-01-14 20:58:43 +0000
committerCharles E. Rolke <chug@apache.org>2013-01-14 20:58:43 +0000
commite59b874902810f7f64ac2f22ad087673b9ea0483 (patch)
treea1c0ab0e427b3ef4b2821565bd2d1ab2b8783402 /qpid/cpp/src/legacystore.cmake
parente642dd293cc007778f6bca8ef6a96d5390a5cba4 (diff)
downloadqpid-python-e59b874902810f7f64ac2f22ad087673b9ea0483.tar.gz
QPID-4535 Cmake build broken by legacy store
Check for libaio and uuid. Fix logic error that allowed build to proceed when DB_FOUND was false. Remove unnecessary 'rt' from link. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1433127 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/legacystore.cmake')
-rw-r--r--qpid/cpp/src/legacystore.cmake34
1 files changed, 31 insertions, 3 deletions
diff --git a/qpid/cpp/src/legacystore.cmake b/qpid/cpp/src/legacystore.cmake
index 7a636dc64e..10a166f50c 100644
--- a/qpid/cpp/src/legacystore.cmake
+++ b/qpid/cpp/src/legacystore.cmake
@@ -30,7 +30,24 @@ else (DEFINED legacystore_force)
#
include (finddb.cmake)
if (DB_FOUND)
- set (legacystore_default ON)
+ #
+ # find libaio
+ #
+ CHECK_LIBRARY_EXISTS (aio io_queue_init "" HAVE_AIO)
+ CHECK_INCLUDE_FILES (libaio.h HAVE_AIO_H)
+ if (HAVE_AIO AND HAVE_AIO_H)
+ #
+ # find libuuid
+ #
+ CHECK_LIBRARY_EXISTS (uuid uuid_compare "" HAVE_UUID)
+ CHECK_INCLUDE_FILES(uuid/uuid.h HAVE_UUID_H)
+ IF (HAVE_UUID AND HAVE_UUID_H)
+ #
+ # allow legacystore to be built
+ #
+ set (legacystore_default ON)
+ ENDIF (HAVE_UUID AND HAVE_UUID_H)
+ endif (HAVE_AIO AND HAVE_AIO_H)
endif (DB_FOUND)
endif (UNIX)
endif (DEFINED legacystore_force)
@@ -42,8 +59,20 @@ if (BUILD_LEGACYSTORE)
message(FATAL_ERROR "Legacystore produced only on Unix platforms")
endif (NOT UNIX)
if (NOT DB_FOUND)
- message(STATUS "Legacystore requires BerkeleyDB which is absent.")
+ message(FATAL_ERROR "Legacystore requires BerkeleyDB which is absent.")
endif (NOT DB_FOUND)
+ if (NOT HAVE_AIO)
+ message(FATAL_ERROR "Legacystore requires libaio which is absent.")
+ endif (NOT HAVE_AIO)
+ if (NOT HAVE_AIO_H)
+ message(FATAL_ERROR "Legacystore requires libaio.h which is absent.")
+ endif (NOT HAVE_AIO_H)
+ if (NOT HAVE_UUID)
+ message(FATAL_ERROR "Legacystore requires uuid which is absent.")
+ endif (NOT HAVE_UUID)
+ if (NOT HAVE_UUID_H)
+ message(FATAL_ERROR "Legacystore requires uuid.h which is absent.")
+ endif (NOT HAVE_UUID_H)
# Journal source files
set (legacy_jrnl_SOURCES
@@ -119,7 +148,6 @@ if (BUILD_LEGACYSTORE)
target_link_libraries (legacystore
aio
- rt
uuid
qpidcommon qpidtypes qpidbroker
${DB_LIBRARY}