As Michael Gruber pointed out, the build is otherwise broken on systems without libsfsexp. --- lib/prefix.cc | 4 ++++ lib/sexp-fp.cc | 3 +++ lib/sexp-fp.h | 2 ++ 3 files changed, 9 insertions(+)
diff --git a/lib/prefix.cc b/lib/prefix.cc index 06e2333a..538a2dd1 100644 --- a/lib/prefix.cc +++ b/lib/prefix.cc @@ -61,8 +61,10 @@ prefix_t prefix_table[] = { NOTMUCH_FIELD_PROCESSOR }, { "query", NULL, NOTMUCH_FIELD_EXTERNAL | NOTMUCH_FIELD_PROCESSOR }, +#if HAVE_SFSEXP { "sexp", NULL, NOTMUCH_FIELD_EXTERNAL | NOTMUCH_FIELD_PROCESSOR }, +#endif { "from", "XFROM", NOTMUCH_FIELD_EXTERNAL | NOTMUCH_FIELD_PROBABILISTIC | NOTMUCH_FIELD_PROCESSOR }, @@ -141,8 +143,10 @@ _setup_query_field (const prefix_t *prefix, notmuch_database_t *notmuch) fp = (new QueryFieldProcessor (*notmuch->query_parser, notmuch))->release (); else if (STRNCMP_LITERAL (prefix->name, "thread") == 0) fp = (new ThreadFieldProcessor (*notmuch->query_parser, notmuch))->release (); +#if HAVE_SFSEXP else if (STRNCMP_LITERAL (prefix->name, "sexp") == 0) fp = (new SexpFieldProcessor (notmuch))->release (); +#endif else fp = (new RegexpFieldProcessor (prefix->name, prefix->flags, *notmuch->query_parser, notmuch))->release (); diff --git a/lib/sexp-fp.cc b/lib/sexp-fp.cc index ed26f6ec..eeb8be98 100644 --- a/lib/sexp-fp.cc +++ b/lib/sexp-fp.cc @@ -21,6 +21,8 @@ */ #include "database-private.h" + +#if HAVE_SFSEXP #include "sexp-fp.h" #include <iostream> @@ -38,3 +40,4 @@ SexpFieldProcessor::operator() (const std::string & query_string) return output; } +#endif /* HAVE_SFSEXP */ diff --git a/lib/sexp-fp.h b/lib/sexp-fp.h index 341dfa7e..0e55b961 100644 --- a/lib/sexp-fp.h +++ b/lib/sexp-fp.h @@ -23,6 +23,7 @@ #ifndef NOTMUCH_SEXP_FP_H #define NOTMUCH_SEXP_FP_H +#if HAVE_SFSEXP #include <xapian.h> #include "notmuch.h" @@ -38,4 +39,5 @@ public: Xapian::Query operator() (const std::string & query_string); }; +#endif /* HAVE_SFSEXP */ #endif /* NOTMUCH_SEXP_FP_H */ -- 2.35.1 _______________________________________________ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org