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