1 AC_DEFUN(AC_DEFINE_GNUS_PRODUCT_NAME,
2 [echo $ac_n "defining gnus product name... $ac_c"
3 AC_CACHE_VAL(EMACS_cv_GNUS_PRODUCT_NAME,[EMACS_cv_GNUS_PRODUCT_NAME=$1])
4 GNUS_PRODUCT_NAME=${EMACS_cv_GNUS_PRODUCT_NAME}
5 AC_MSG_RESULT(${GNUS_PRODUCT_NAME})
6 AC_SUBST(GNUS_PRODUCT_NAME)])
8 AC_DEFUN(AC_CHECK_EMACS,
9 [dnl Check for Emacsen.
11 dnl Apparently, if you run a shell window in Emacs, it sets the EMACS
12 dnl environment variable to 't'. Lets undo the damage.
13 test "$EMACS" = t && EMACS=
16 unset ac_cv_prog_EMACS; unset ac_cv_prog_XEMACS;
19 [ --with-emacs=EMACS compile with EMACS [EMACS=emacs, mule...]],
20 [if test "$withval" = yes -o -z "$withval"; then
21 AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)
23 AC_CHECK_PROG(EMACS, $withval, $withval, emacs)
26 [ --with-xemacs=XEMACS compile with XEMACS [XEMACS=xemacs]],
27 [if test "$withval" = yes -o -z "$withval"; then
28 AC_CHECK_PROG(XEMACS, xemacs, xemacs, xemacs)
30 AC_CHECK_PROG(XEMACS, $withval, $withval, xemacs)
34 test -z "$EMACS" && AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)])
38 AC_DEFUN(AC_EMACS_LISP, [
41 AC_MSG_CHECKING(for $1)
43 AC_CACHE_VAL(EMACS_cv_SYS_$1,[
45 echo ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1
46 eval ${EMACS}' -batch -eval '\''(let ((x '${elisp}')) (write-region (if (stringp x) (princ x) (prin1-to-string x)) nil "'${OUTPUT}'" nil 5))'\' >& AC_FD_CC 2>&1
47 retval=`cat ${OUTPUT}`
48 echo "=> ${retval}" >& AC_FD_CC 2>&1
50 EMACS_cv_SYS_$1=$retval
58 AC_DEFUN(AC_CHECK_EMACS_FLAVOR,
59 [AC_MSG_CHECKING([what a flavor does $EMACS have])
62 unset EMACS_cv_SYS_flavor;
65 (cond ((featurep (quote xemacs)) \"XEmacs\")\
66 ((boundp (quote MULE)) \"MULE\")\
69 case $EMACS_cv_SYS_flavor in
77 AC_MSG_RESULT($EMACS_cv_SYS_flavor)])
79 AC_DEFUN(AC_PATH_LISPDIR, [
81 if test "$prefix" = NONE; then
82 AC_MSG_CHECKING([prefix for your Emacs])
83 AC_EMACS_LISP(prefix,(expand-file-name \"..\" invocation-directory),"noecho")
84 prefix=${EMACS_cv_SYS_prefix}
85 AC_MSG_RESULT($prefix)
88 [ --with-lispdir=DIR Where to install lisp files
89 (for XEmacs package, use --with-packagedir instead)],
91 AC_MSG_CHECKING([where lisp files should go])
92 if test -z "$lispdir"; then