bug-gettext
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gettext] [Patch] - Configure ignores --without-emacs setting if


From: Bruno Haible
Subject: Re: [bug-gettext] [Patch] - Configure ignores --without-emacs setting if EMACS set
Date: Sun, 27 Nov 2011 14:19:01 +0100
User-agent: KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; )

Hi,

DJ Lucas wrote:
> The configure script ignores the "--without-emacs" switch if the EMACS 
> variable is set in the calling environment. If the user overrides this, 
> then the variable is set to no, however, the LISPDIR is checked before 
> evaluating withval (causing errors). The correct fix is to not check the 
> LISPDIR if EMACS is set to no. See trivial diff attached.

The diff is OK, but your description of what it does was incorrect:
The configure script does *not* ignore the "--without-emacs" option
if the EMACS environment variable is set. Also, the determination of
lispdir does not provoke errors (at least if you set the EMACS environment
variable to point to a working emacs program).

I tested the results in config.status.

Original code:

                               EMACS            lispdir

nothing                       emacs          ${datadir}/emacs/site-lisp
EMACS set                     /gnu/bin/emacs ${datadir}/emacs/site-lisp
EMACS=no                      no             ${datadir}/emacs/site-lisp
--without-emacs               no             ${datadir}/emacs/site-lisp
EMACS set, --without-emacs    no             ${datadir}/emacs/site-lisp
EMACS=no, --without-emacs     no             ${datadir}/emacs/site-lisp

With your patch:

                               EMACS           lispdir

nothing                       emacs          ${datadir}/emacs/site-lisp
EMACS set                     /gnu/bin/emacs ${datadir}/emacs/site-lisp
EMACS=no                      no             ${datarootdir}/emacs/site-lisp
--without-emacs               no             ${datarootdir}/emacs/site-lisp
EMACS set, --without-emacs    no             ${datarootdir}/emacs/site-lisp
EMACS=no, --without-emacs     no             ${datarootdir}/emacs/site-lisp

The only reproducible effect of your patch is that 'configure' does not
spend time determining lispdir, which won't be used later anyway. Applied
like this. Thanks.


2011-11-27  Bruno Haible  <address@hidden>

        Speed up configure a bit.
        * configure.ac: Don't invoke AM_PATH_LISPDIR if the user specified
        --without-emacs.
        Based on a patch by DJ Lucas <address@hidden>.

--- gettext-tools/configure.ac.orig     Sun Nov 27 14:07:41 2011
+++ gettext-tools/configure.ac  Sun Nov 27 14:06:47 2011
@@ -288,7 +288,6 @@
 gt_GLOBAL_SYMBOL_PIPE
 
 dnl Check for Emacs and where to install .elc files.
-AM_PATH_LISPDIR
 dnl Sometimes Emacs is badly installed. Allow the user to work around it.
 AC_ARG_WITH([emacs],
   [  --without-emacs         do not use Emacs, don't install po-mode],
@@ -301,6 +300,11 @@
     EMACS=no
   fi
 fi
+dnl If $EMACS = no, we won't install any Emacs Lisp (*.el) files,
+dnl therefore it's useless to determine $(lispdir).
+if test "$EMACS" != no; then
+  AM_PATH_LISPDIR
+fi
 
 aclocaldir='${datadir}/aclocal'
 AC_SUBST([aclocaldir])

-- 
In memoriam George Moscone <http://en.wikipedia.org/wiki/George_Moscone>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]