Debian Codegraph @

m4/emacs_vm.m4

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