3 dnl Apparently, if you run a shell window in Emacs, it sets the EMACS
4 dnl environment variable to 't'. Lets undo the damage.
6 if test "${EMACS}" = "t"; then
10 AC_ARG_WITH(xemacs, --with-xemacs Use XEmacs to build, [ if test "${withval}" = "yes"; then EMACS=xemacs; else EMACS=${withval}; fi ])
11 AC_ARG_WITH(emacs, --with-emacs Use Emacs to build, [ if test "${withval}" = "yes"; then EMACS=emacs; else EMACS=${withval}; fi ])
12 AC_CHECK_PROG(EMACS, xemacs, xemacs, emacs)
16 AC_DEFUN(XE_CONFIG_VALUE, [
19 ${EMACS} -batch -eval "
20 (let ((hash (config-value-hash-table))
21 (desired (split-string \"$1\")))
24 (message \"Checking for %S\" (intern key))
25 (if (config-value (intern key))
27 (write-region (format \"%s=\\\"%s\\\"\n\" key (config-value (intern key)))
28 nil \"${OUTPUT}\" t))))
30 " 2> /dev/null > /dev/null
31 test -f ${OUTPUT} && . ${OUTPUT}