Debian Codegraph @

m4/emacs_mu4e.m4

raw
1 ### emacs_mu4e.m4
2
3 ## Copyright (C) 2015-2017 Roland Winkler <[email protected]>
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_MU4E],
21 [
22 AC_ARG_WITH([mu4e-dir],
23 AS_HELP_STRING([--with-mu4e-dir=DIR], [where to find Mu4e lisp directory]),
24 # if Mu4e was requested, make sure we have access to the source
25 [if test "x$with_mu4e_dir" != xno -a "x$with_mu4e_dir" != "x"; then
26 AC_MSG_CHECKING([for Mu4e files])
27 # convert path to absolute and canonicalize it.
28 MU4EDIR=$(${EMACS} -batch --quick -eval "(message \"%s\" (expand-file-name \"${with_mu4e_dir}\"))" 2>&1)
29 MU4E_LOCATE=$(${EMACS} -batch --quick --directory="${MU4EDIR}" -eval "(if (locate-library \"mu4e-vars\") (message \"mu4e\"))" 2>&1)
30 if test "x$MU4E_LOCATE" = "x"; then
31 AC_MSG_ERROR([*** MU4E mu4e-vars.el must exist in directory passed to --with-mu4e-dir.])
32 fi
33 AC_MSG_RESULT($MU4EDIR)
34 # append MU4EDIR to AM_ELCFLAGS
35 AM_ELCFLAGS="--directory=$MU4EDIR $AM_ELCFLAGS"
36 fi])
37 # New conditional MU4E
38 AM_CONDITIONAL([MU4E], [test x$MU4EDIR != x])
39 ])