[mew-dist 26626] Re: configure on shell-mode

Shun-ichi TAHARA ( 田原 俊一 ) jado at example.com
2005年 10月 8日 (土) 16:41:59 JST


From: Takashi Masuda (増田貴士) <masutaka at example.com>
Message-Id: <20051008.041903.98558515.masutaka at example.com>

> 以前から、shell-mode での configure に失敗してしまうのですが、これはバ
> グなんでしょうか? それともこういうもの?
> 
> % ./configure
> configure: error: t is not found.
> 
> shell-mode では $EMACS が export されているのが原因のようです。

configure.in の AC_SUBST が環境変数に影響されてるせいですね。盲点。
こんな感じでどうでしょう?

----
Index: Makefile.in
===================================================================
RCS file: /cvsmew/mew/Makefile.in,v
retrieving revision 1.10
diff -u -r1.10 Makefile.in
--- Makefile.in	2 Sep 2005 06:56:48 -0000	1.10
+++ Makefile.in	8 Oct 2005 07:39:37 -0000
@@ -29,7 +29,7 @@
 ## Compile engines
 ##
 
-EMACS = @EMACS@
+EMACS = @emacsbin@
 #EMACS = emacs
 #EMACS = xemacs
 #EMACS = mule
Index: configure.in
===================================================================
RCS file: /cvsmew/mew/configure.in,v
retrieving revision 1.3
diff -u -r1.3 configure.in
--- configure.in	2 Sep 2005 06:56:49 -0000	1.3
+++ configure.in	8 Oct 2005 07:39:37 -0000
@@ -2,8 +2,8 @@
 AC_CONFIG_SUBDIRS(bin)
 AC_ARG_WITH(emacs,
     [  --with-emacs=EMACS      use EMACS],
-    EMACS="${withval}")
-AC_SUBST(EMACS)
+    emacsbin="${withval}")
+AC_SUBST(emacsbin)
 AC_ARG_WITH(elispdir,
     [  --with-elispdir=DIR     where elisp files should go],
     elispdir="${withval}")
@@ -13,14 +13,14 @@
     etcdir="${withval}")
 AC_SUBST(etcdir)
 
-if test -z "${EMACS}"; then
-    AC_PATH_PROGS(EMACS, emacs xemacs mule, emacs)
+if test -z "${emacsbin}"; then
+    AC_PATH_PROGS(emacsbin, emacs xemacs mule, emacs)
 fi
-if test ! -x "${EMACS}"; then
-    AC_MSG_ERROR([${EMACS} is not found.])
+if test ! -x "${emacsbin}"; then
+    AC_MSG_ERROR([${emacsbin} is not found.])
 fi
 chk_prefix=
-case "${EMACS}" in
+case "${emacsbin}" in
 *xemacs*)
     if test "${libdir}" = "\${exec_prefix}/lib" && \
        test -z "${elispdir}" -o -z "${etcdir}"; then
@@ -35,21 +35,21 @@
     ;;
 esac
 if test "${chk_prefix}"; then
-    AC_MSG_CHECKING(for prefix of ${EMACS})
-    AC_CACHE_VAL(EMACS_cv_emacs_prefix,[
+    AC_MSG_CHECKING(for prefix of ${emacsbin})
+    AC_CACHE_VAL(emacsbin_cv_emacs_prefix,[
 	OUTPUT=./conftest-$$
-	echo ${EMACS}' -q -no-site-file -batch -eval '\''(write-region (princ (expand-file-name ".." invocation-directory)) nil "'${OUTPUT}'" nil 5)'\' >& AC_FD_CC 2>&1
-	eval ${EMACS}' -q -no-site-file -batch -eval '\''(write-region (princ (expand-file-name ".." invocation-directory)) nil "'${OUTPUT}'" nil 5)'\' >& AC_FD_CC 2>&1
+	echo ${emacsbin}' -q -no-site-file -batch -eval '\''(write-region (princ (expand-file-name ".." invocation-directory)) nil "'${OUTPUT}'" nil 5)'\' >& AC_FD_CC 2>&1
+	eval ${emacsbin}' -q -no-site-file -batch -eval '\''(write-region (princ (expand-file-name ".." invocation-directory)) nil "'${OUTPUT}'" nil 5)'\' >& AC_FD_CC 2>&1
 	retval="`cat ${OUTPUT}`"
 	rm -f ${OUTPUT}
-	EMACS_cv_emacs_prefix="${retval}"])
-    emacs_prefix=${EMACS_cv_emacs_prefix}
+	emacsbin_cv_emacs_prefix="${retval}"])
+    emacs_prefix=${emacsbin_cv_emacs_prefix}
     AC_MSG_RESULT(${emacs_prefix})
 fi
 
 if test "${chk_prefix}" -a -z "${elispdir}"; then
     AC_MSG_CHECKING([where lisp files should go])
-    case "${EMACS}" in
+    case "${emacsbin}" in
     *xemacs*)
 	if test -d "${emacs_prefix}/lib/xemacs/site-lisp"; then
 	    elispdir="${emacs_prefix}/lib/xemacs/site-lisp/mew"
@@ -68,7 +68,7 @@
     fi
 fi
 if test -z "${elispdir}"; then
-    case "${EMACS}" in
+    case "${emacsbin}" in
     *xemacs*)
 	elispdir="\${libdir}/xemacs/site-lisp/mew"
 	;;
@@ -80,7 +80,7 @@
 
 if test "${chk_prefix}" -a -z "${etcdir}"; then
     AC_MSG_CHECKING([where etc files should go])
-    case "${EMACS}" in
+    case "${emacsbin}" in
     *xemacs*)
 	if test -d "${emacs_prefix}/lib/xemacs/etc"; then
 	    etcdir="${emacs_prefix}/lib/xemacs/etc/Mew"
@@ -99,7 +99,7 @@
     fi
 fi
 if test -z "${etcdir}"; then
-    case ${EMACS} in
+    case ${emacsbin} in
     *xemacs*)
 	etcdir="\${libdir}/xemacs/etc/Mew"
 	;;
@@ -127,7 +127,7 @@
 echo " Mew configuration results"
 echo "***************************"
 echo
-echo -n "use emacs             : "; echo_value "${EMACS}"
+echo -n "use emacs             : "; echo_value "${emacsbin}"
 echo -n "elisp files should go : "; echo_value "${elispdir}"
 echo -n "etc files should go   : "; echo_value "${etcdir}"
 echo -n "exec files should go  : "; echo_value "${bindir}"



Mew-dist メーリングリストの案内