From: David Sterba Date: Mon, 2 Apr 2012 21:28:18 +0000 (+0200) Subject: build-sys: fix compilation without --enable-notmuch X-Git-Tag: neomutt-20160404~13^2~77 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cef42db87bf4f5f7a64ac336d196720df61ea978;p=neomutt build-sys: fix compilation without --enable-notmuch We can still leave mutt-kz compilable entirely without notmuch, just for the case there are users out there not interested in notmuch enhancements, but I seriously doubt that :) Here's the patch which compiles fine without --enable-notmuch [kzak@redhat.com: - fix s/Incomming/Incoming/ typo] Signed-off-by: Karel Zak --- diff --git a/buffy.c b/buffy.c index f2d33eb61..08a7b0879 100644 --- a/buffy.c +++ b/buffy.c @@ -700,8 +700,12 @@ int mutt_buffy_check (int force) #endif /* fastest return if there are no mailboxes */ +#ifdef USE_NOTMUCH if (!Incoming && !VirtIncoming) return 0; +#endif + if (!Incoming) + return 0; t = time (NULL); if (!force && (t - BuffyTime < BuffyTimeout)) return BuffyCount; @@ -733,8 +737,10 @@ int mutt_buffy_check (int force) buffy_check(tmp, &contex_sb); #endif +#ifdef USE_NOTMUCH for (tmp = VirtIncoming; tmp; tmp = tmp->next) buffy_check(tmp, &contex_sb); +#endif BuffyDoneTime = BuffyTime; return (BuffyCount); diff --git a/curs_main.c b/curs_main.c index 851adb740..433ce3088 100644 --- a/curs_main.c +++ b/curs_main.c @@ -969,10 +969,10 @@ int mutt_index_menu (void) mutt_curs_set (1); /* fallback from the pager */ } +#ifdef USE_NOTMUCH if (Context) - { nm_debug_check(Context); - } +#endif switch (op) { @@ -2619,11 +2619,10 @@ int mutt_index_menu (void) km_error_key (MENU_MAIN); } +#ifdef USE_NOTMUCH if (Context) - { nm_debug_check(Context); - } - +#endif if (menu->menu == MENU_PAGER) { diff --git a/sidebar.c b/sidebar.c index ce4debe14..35aeb6f89 100644 --- a/sidebar.c +++ b/sidebar.c @@ -66,6 +66,7 @@ get_incoming (void) case SB_SRC_NONE: sidebar_source = SB_SRC_INCOMING; +#ifdef USE_NOTMUCH if (option (OPTVIRTSPOOLFILE) && VirtIncoming) { sidebar_source = SB_SRC_VIRT; return VirtIncoming; @@ -76,6 +77,7 @@ get_incoming (void) return VirtIncoming; } break; +#endif case SB_SRC_INCOMING: break; }