bug-make
[Top][All Lists]
Advanced

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

small configure correctness patch


From: Ralf Wildenhues
Subject: small configure correctness patch
Date: Wed, 29 Jul 2009 20:02:00 +0200
User-agent: Mutt/1.5.20 (2009-06-15)

Hello,

BTW, I noticed in my make tree this patch that has not made it into
upstream yet:
<http://lists.gnu.org/archive/html/bug-make/2009-02/msg00026.html>
Maybe you could take a peek at it?

Other than that, here is a small patch to fix a configure glitch:
with AC_CACHE_VAL, the third argument should contain code that sets the
cache variable, but not have any other side-effects.  The reason for
this is that, with a './config.status --recheck' (that may be triggered
by make), the cached values from config.cache (if enabled) may cause
these commands to be by-passed.  The fix is to move side-effects after
the check, and key them off the cache variable, as below.
(Newer autoconfs warn about this issue.)

The move to put the AC_SUBSTs outside of any conditional code is not
needed for correctness, merely done for clarity: the substitution is
done in any case anyway.

Cheers,
Ralf

2009-07-29  Ralf Wildenhues  <address@hidden>

        * configure.in: Move side-effects outside AC_CACHE_VAL arguments
        that set make_cv_sys_gnu_glob, so they are also correctly set
        when the cache has been populated before.

Index: configure.in
===================================================================
RCS file: /cvsroot/make/make/configure.in,v
retrieving revision 1.150
diff -u -r1.150 configure.in
--- configure.in        4 Jun 2009 06:30:27 -0000       1.150
+++ configure.in        29 Jul 2009 18:01:13 -0000
@@ -364,9 +365,13 @@
 #endif
  ], [AC_MSG_RESULT(yes)
 make_cv_sys_gnu_glob=yes], [AC_MSG_RESULT([no; using local copy])
-AC_SUBST(GLOBINC) GLOBINC='-I$(srcdir)/glob'
-AC_SUBST(GLOBLIB) GLOBLIB=glob/libglob.a
 make_cv_sys_gnu_glob=no])])
+if test "$make_cv_sys_gnu_glob" = no; then
+  GLOBINC='-I$(srcdir)/glob'
+  GLOBLIB=glob/libglob.a
+fi
+AC_SUBST(GLOBINC)
+AC_SUBST(GLOBLIB)
 # Tell automake about this, so it can build the right .c files.
 AM_CONDITIONAL(USE_LOCAL_GLOB, test "$make_cv_sys_gnu_glob" = no)
 




reply via email to

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