11 |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
12 |
# PARTICULAR PURPOSE. |
# PARTICULAR PURPOSE. |
13 |
|
|
14 |
# Copyright 2002 Free Software Foundation, Inc. |
# -*- Autoconf -*- |
15 |
|
# Copyright (C) 2002, 2003 Free Software Foundation, Inc. |
16 |
|
|
17 |
# This program is free software; you can redistribute it and/or modify |
# This program is free software; you can redistribute it and/or modify |
18 |
# it under the terms of the GNU General Public License as published by |
# it under the terms of the GNU General Public License as published by |
311 |
# AM_PATH_LISPDIR |
# AM_PATH_LISPDIR |
312 |
# --------------- |
# --------------- |
313 |
AC_DEFUN([AM_PATH_LISPDIR], |
AC_DEFUN([AM_PATH_LISPDIR], |
314 |
[AC_ARG_WITH([lispdir], |
[AC_CHECK_PROGS([EMACS], [emacs xemacs], [no]) |
315 |
|
AC_ARG_VAR([EMACS], [the Emacs editor command]) |
316 |
|
AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path]) |
317 |
|
AC_ARG_WITH([lispdir], |
318 |
[ --with-lispdir Override the default lisp directory ], |
[ --with-lispdir Override the default lisp directory ], |
319 |
[ lispdir="$withval" |
[ lispdir="$withval" |
320 |
AC_MSG_CHECKING([where .elc files should go]) |
AC_MSG_CHECKING([where .elc files should go]) |
323 |
# If set to t, that means we are running in a shell under Emacs. |
# If set to t, that means we are running in a shell under Emacs. |
324 |
# If you have an Emacs named "t", then use the full path. |
# If you have an Emacs named "t", then use the full path. |
325 |
test x"$EMACS" = xt && EMACS= |
test x"$EMACS" = xt && EMACS= |
326 |
AC_CHECK_PROGS([EMACS], [emacs xemacs], [no]) |
AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [ |
327 |
AC_ARG_VAR([EMACS], [the Emacs editor command]) |
if test $EMACS != "no"; then |
328 |
AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path]) |
if test x${lispdir+set} != xset; then |
329 |
if test $EMACS != "no"; then |
# If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly |
|
if test x${lispdir+set} != xset; then |
|
|
AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], |
|
|
[# If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly |
|
330 |
# Some emacsen will start up in interactive mode, requiring C-x C-c to exit, |
# Some emacsen will start up in interactive mode, requiring C-x C-c to exit, |
331 |
# which is non-obvious for non-emacs users. |
# which is non-obvious for non-emacs users. |
332 |
# Redirecting /dev/null should help a bit; pity we can't detect "broken" |
# Redirecting /dev/null should help a bit; pity we can't detect "broken" |
338 |
-e '/.*\/share\/x\?emacs\/site-lisp$/{s,.*/share/\(x\?emacs/site-lisp\),${datadir}/\1,;p;q;}' \ |
-e '/.*\/share\/x\?emacs\/site-lisp$/{s,.*/share/\(x\?emacs/site-lisp\),${datadir}/\1,;p;q;}' \ |
339 |
conftest.out` |
conftest.out` |
340 |
rm conftest.out |
rm conftest.out |
341 |
if test -z "$am_cv_lispdir"; then |
fi |
|
am_cv_lispdir='${datadir}/emacs/site-lisp' |
|
|
fi |
|
|
]) |
|
|
lispdir="$am_cv_lispdir" |
|
342 |
fi |
fi |
343 |
fi |
test -z "$am_cv_lispdir" && am_cv_lispdir='${datadir}/emacs/site-lisp' |
344 |
|
]) |
345 |
|
lispdir="$am_cv_lispdir" |
346 |
]) |
]) |
347 |
AC_SUBST([lispdir]) |
AC_SUBST([lispdir]) |
348 |
])# AM_PATH_LISPDIR |
])# AM_PATH_LISPDIR |