AC_DEFUN(AC_CHECK_EMACS,
[dnl Check for Emacsen.
+
+ dnl Apparently, if you run a shell window in Emacs, it sets the EMACS
+ dnl environment variable to 't'. Lets undo the damage.
+ test x$EMACS = xt && EMACS=
+
AC_ARG_WITH(emacs,
[ --with-emacs=EMACS compile with EMACS [EMACS=emacs, mule...]],
- [if test x$withval = xyes -o x$withval = xt -o x$withval = x; then
+ [if test x$withval = xyes -o x$withval = x; then
AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)
else
AC_CHECK_PROG(EMACS, $withval, $withval, emacs)
fi
EMACS=$XEMACS],
[XEMACS=xemacs
- test x$EMACS = xt -o x$EMACS = x &&\
+ test x$EMACS = x &&\
AC_CHECK_PROGS(EMACS, emacs xemacs mule, emacs)])
AC_SUBST(EMACS)
AC_SUBST(XEMACS)])
echo "$ac_t""no" 1>&6
fi
+
+ test x$EMACS = xt && EMACS=
+
# Check whether --with-emacs or --without-emacs was given.
if test "${with_emacs+set}" = set; then
withval="$with_emacs"
- if test x$withval = xyes -o x$withval = xt -o x$withval = x; then
+ if test x$withval = xyes -o x$withval = x; then
for ac_prog in emacs xemacs mule
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:691: checking for $ac_word" >&5
+echo "configure:694: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_EMACS+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$withval", so it can be a program name with args.
set dummy $withval; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:725: checking for $ac_word" >&5
+echo "configure:728: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_EMACS+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "xemacs", so it can be a program name with args.
set dummy xemacs; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:762: checking for $ac_word" >&5
+echo "configure:765: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_XEMACS+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$withval", so it can be a program name with args.
set dummy $withval; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:793: checking for $ac_word" >&5
+echo "configure:796: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_XEMACS+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
EMACS=$XEMACS
else
XEMACS=xemacs
- test x$EMACS = xt -o x$EMACS = x &&\
+ test x$EMACS = x &&\
for ac_prog in emacs xemacs mule
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:830: checking for $ac_word" >&5
+echo "configure:833: checking for $ac_word" >&5
if eval "test \"\${ac_cv_prog_EMACS+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking where lisp files should go""... $ac_c" 1>&6
-echo "configure:865: checking where lisp files should go" >&5
+echo "configure:868: checking where lisp files should go" >&5
# Check whether --with-lispdir or --without-lispdir was given.
if test "${with_lispdir+set}" = set; then
withval="$with_lispdir"
withval="$with_packagedir"
if test x$withval != xyes -a x$withval != x; then
echo $ac_n "checking where the package should go""... $ac_c" 1>&6
-echo "configure:908: checking where the package should go" >&5
+echo "configure:911: checking where the package should go" >&5
PACKAGEDIR=$withval
echo "$ac_t""$PACKAGEDIR" 1>&6
fi
withval="$with_addpath"
if test x$withval != xyes -a x$withval != x; then
echo $ac_n "checking where to find the additional elisp libraries""... $ac_c" 1>&6
-echo "configure:922: checking where to find the additional elisp libraries" >&5
+echo "configure:925: checking where to find the additional elisp libraries" >&5
ADDITIONAL_LOAD_PATH=$withval
echo "$ac_t""$ADDITIONAL_LOAD_PATH" 1>&6
fi