From: Pietro Cerutti Date: Mon, 9 Oct 2017 18:37:52 +0000 (+0100) Subject: If set, use -D_FILE_OFFSET_BITS=64 when checking for GPGMe (#829) X-Git-Tag: neomutt-20171013~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c1eb1e7947726f5de93cf8d9dd0db5ace96d928c;p=neomutt If set, use -D_FILE_OFFSET_BITS=64 when checking for GPGMe (#829) * If set, use -D_FILE_OFFSET_BITS=64 when checking for GPGMe Issue #826 * Let OFF_T_FMT be "%" PRId64 whenever LFS is there Issue #826 --- diff --git a/auto.def b/auto.def index 95bb5000a..47f80cdfc 100644 --- a/auto.def +++ b/auto.def @@ -225,14 +225,12 @@ if {1} { cc-with [list -cflags [get-define CFLAGS]] # Large file support - cc-with {-includes sys/types.h} { - if {[cc-check-sizeof off_t] eq {8}} { - define OFF_T_FMT {"%" PRId64} - } else { - define OFF_T_FMT {"%" PRId32} - } - define LOFF_T off_t + if {[cc-check-lfs]} { + define OFF_T_FMT {"%" PRId64} + } else { + define OFF_T_FMT {"%" PRId32} } + define LOFF_T off_t # Let's always use volatile for sig_atomic_t cc-check-includes signal.h @@ -319,11 +317,17 @@ if {[get-define want-full-doc]} {define MAKEDOC_FULL} ############################################################################### # GPGME if {[get-define want-gpgme]} { - if {![check-inc-and-lib gpgme [opt-val with-gpgme $prefix] \ - gpgme.h gpgme_new gpgme]} { - user-error "Unable to find GPGME" + set gpgme_cflags {} + if {[is-defined _FILE_OFFSET_BITS]} { + set gpgme_cflags -D_FILE_OFFSET_BITS=[get-define _FILE_OFFSET_BITS] + } + cc-with [list -cflags $gpgme_cflags] { + if {![check-inc-and-lib gpgme [opt-val with-gpgme $prefix] \ + gpgme.h gpgme_new gpgme]} { + user-error "Unable to find GPGME" + } + cc-check-functions gpgme_op_export_keys } - cc-check-functions gpgme_op_export_keys define CRYPT_BACKEND_GPGME }