summaryrefslogtreecommitdiffstats
path: root/ConfigureChecks.cmake
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-28 16:44:42 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-04-28 16:44:42 -0500
commit7bd54f5a796f6f1276bbd310deaf1f2ac673954d (patch)
tree734f820f207e48208ae734b36ca12a8b90b9790b /ConfigureChecks.cmake
parent8e5a6176843c174bd8dc1bc740518692bd0ab61d (diff)
downloadtdepim-7bd54f5a796f6f1276bbd310deaf1f2ac673954d.tar.gz
tdepim-7bd54f5a796f6f1276bbd310deaf1f2ac673954d.zip
Fix retriggering of GPGMe socket notifiers in nested event loops
This resolves Bug 825 Add missing GPGMe feature checks to CMake
Diffstat (limited to 'ConfigureChecks.cmake')
-rw-r--r--ConfigureChecks.cmake67
1 files changed, 67 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index aaa2eb93c..dd7034c7e 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -151,6 +151,73 @@ if( BUILD_LIBTDENETWORK OR BUILD_CERTMANAGER OR BUILD_KMAIL OR BUILD_KADDRESSBOO
if( NOT HAVE_GPGME_0_4_BRANCH )
message( STATUS " found 'gpgme', version ${GPGME_VERSION}" )
endif( )
+
+ # check for various GPGME features
+ tde_save( CMAKE_CXX_FLAGS )
+ tde_save( CMAKE_REQUIRED_LIBRARIES )
+ string( REGEX REPLACE "-include tqt.h" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" )
+ # See FIXME above regarding -D_FILE_OFFSET_BITS=64
+ set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GPGME_INCLUDE_DIRS} -D_FILE_OFFSET_BITS=64")
+ set( CMAKE_REQUIRED_LIBRARIES "${GPGME_LIBRARIES}")
+
+ # check for GPGME_KEYLIST_MODE_VALIDATE
+ check_cxx_source_compiles("
+ #include <gpgme.h>
+ int main() {
+ gpgme_keylist_mode_t mode = GPGME_KEYLIST_MODE_VALIDATE;
+ };"
+ HAVE_GPGME_KEYLIST_MODE_VALIDATE )
+
+ # check for gpgme_cancel
+ check_cxx_source_compiles("
+ #include <gpgme.h>
+ int main() {
+ gpgme_ctx_t ctx = 0;
+ gpgme_error_t e = gpgme_cancel( ctx );
+ };"
+ HAVE_GPGME_CANCEL )
+
+ # check for gpgme_key_t->keylist_mode
+ check_cxx_source_compiles("
+ #include <gpgme.h>
+ int main() {
+ gpgme_key_t key = 0;
+ key->keylist_mode = 0;
+ };"
+ HAVE_GPGME_KEY_T_KEYLIST_MODE )
+
+ # check for gpgme_decrypt_result_t->wrong_key_usage
+ check_cxx_source_compiles("
+ #include <gpgme.h>
+ int main() {
+ gpgme_decrypt_result_t res;
+ unsigned int wku = res->wrong_key_usage;
+ };"
+ HAVE_GPGME_WRONG_KEY_USAGE )
+
+ # check for GPGME_INCLUDE_CERTS_DEFAULT
+ check_cxx_source_compiles("
+ #include <gpgme.h>
+ int main() {
+ int i = GPGME_INCLUDE_CERTS_DEFAULT;
+ };"
+ HAVE_GPGME_INCLUDE_CERTS_DEFAULT )
+
+ # check for gpgme_op_getauditlog
+ check_cxx_source_compiles("
+ #include <gpgme.h>
+ int main() {
+ gpgme_ctx_t ctx = 0;
+ gpgme_data_t data = 0;
+ unsigned int flags = 0;
+ gpgme_error_t e = gpgme_op_getauditlog( ctx, data, flags );
+ };"
+ HAVE_GPGME_OP_GETAUDITLOG )
+
+ # done checking for GPGME features
+ tde_restore( CMAKE_CXX_FLAGS )
+ tde_restore( CMAKE_REQUIRED_LIBRARIES )
+
endif( )