Debian Codegraph @

m4/emacs_notmuch.m4

raw
1 ### emacs_vm.m4
2
3 ## Copyright (C) 2010-2022 Free Software Foundation, Inc.
4 ##
5 ## This file is part of the Insidious Big Brother Database (aka BBDB),
6 ##
7 ## BBDB is free software: you can redistribute it and/or modify
8 ## it under the terms of the GNU General Public License as published by
9 ## the Free Software Foundation, either version 3 of the License, or
10 ## (at your option) any later version.
11 ##
12 ## BBDB is distributed in the hope that it will be useful,
13 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 ## GNU General Public License for more details.
16 ##
17 ## You should have received a copy of the GNU General Public License
18 ## along with BBDB. If not, see <http://www.gnu.org/licenses/>.
19
20 AC_DEFUN([EMACS_NOTMUCH],
21 [
22 AC_ARG_WITH([notmuch-dir],
23 AS_HELP_STRING([--with-notmuch-dir=DIR], [where to find NOTMUCH lisp directory]),
24 # if NOTMUCH was requested, make sure we have access to the source
25 [if test "x$with_notmuch_dir" != xno -a "x$with_notmuch_dir" != "x"; then
26 AC_MSG_CHECKING([for NOTMUCH files])
27 # convert path to absolute and canonicalize it.
28 NOTMUCHDIR=$(${EMACS} -batch --quick -eval "(message \"%s\" (expand-file-name \"${with_notmuch_dir}\"))" 2>&1)
29 NOTMUCH_LOCATE=$(${EMACS} -batch --quick --directory="${NOTMUCHDIR}" -eval "(if (locate-library \"notmuch\") (message \"notmuch\"))" 2>&1)
30 if test "x$NOTMUCH_LOCATE" = "x"; then
31 AC_MSG_ERROR([*** NOTMUCH notmuch.el must exist in directory passed to --with-notmuch-dir.])
32 fi
33 AC_MSG_RESULT($NOTMUCHDIR)
34 # append NOTMUCHDIR to AM_ELCFLAGS
35 AM_ELCFLAGS="--directory=$NOTMUCHDIR $AM_ELCFLAGS"
36 fi])
37 # New conditional NOTMUCH
38 AM_CONDITIONAL([NOTMUCH], [test x$NOTMUCHDIR != x])
39 ])