[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gnulib] incorrect caching messages
From: |
Bruno Haible |
Subject: |
Re: [bug-gnulib] incorrect caching messages |
Date: |
Wed, 15 Nov 2006 21:51:56 +0100 |
User-agent: |
KMail/1.9.1 |
Eric Blake wrote:
> --- m4/alloca.m4 20 Oct 2006 13:50:26 -0000 1.8
> +++ m4/alloca.m4 15 Nov 2006 17:00:14 -0000
> @@ -1,4 +1,4 @@
> -# alloca.m4 serial 6
> +# alloca.m4 serial 7
> dnl Copyright (C) 2002-2004, 2006 Free Software Foundation, Inc.
> dnl This file is free software; the Free Software Foundation
> dnl gives unlimited permission to copy and/or distribute it,
> @@ -17,7 +17,7 @@
>
> # Define an additional variable used in the Makefile substitution.
> if test $ac_cv_working_alloca_h = yes; then
> - AC_CACHE_VAL([gl_cv_rpl_alloca], [
> + AC_CACHE_CHECK([whether alloca must be replaced], [gl_cv_rpl_alloca], [
> AC_EGREP_CPP([Need own alloca], [
> #if defined __GNUC__ || defined _AIX || defined _MSC_VER
> Need own alloca
The message "whether alloca must be replaced" is not right. It's more or
less the opposite: "whether alloca can be implemented through a compiler
built-in" or similar.
I applied this.
2006-11-15 Bruno Haible <address@hidden>
* m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
*** m4/alloca.m4 15 Nov 2006 18:13:04 -0000 1.9
--- m4/alloca.m4 15 Nov 2006 20:47:24 -0000
***************
*** 17,23 ****
# Define an additional variable used in the Makefile substitution.
if test $ac_cv_working_alloca_h = yes; then
! AC_CACHE_CHECK([whether alloca must be replaced], [gl_cv_rpl_alloca], [
AC_EGREP_CPP([Need own alloca], [
#if defined __GNUC__ || defined _AIX || defined _MSC_VER
Need own alloca
--- 17,23 ----
# Define an additional variable used in the Makefile substitution.
if test $ac_cv_working_alloca_h = yes; then
! AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [
AC_EGREP_CPP([Need own alloca], [
#if defined __GNUC__ || defined _AIX || defined _MSC_VER
Need own alloca
***************
*** 25,35 ****
], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
])
if test $gl_cv_rpl_alloca = yes; then
AC_DEFINE([HAVE_ALLOCA], 1,
! [Define to 1 if you have `alloca' after including <alloca.h>,
a header that may be supplied by this distribution.])
ALLOCA_H=alloca.h
else
ALLOCA_H=
fi
else
--- 25,38 ----
], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
])
if test $gl_cv_rpl_alloca = yes; then
+ dnl OK, alloca can be implemented through a compiler built-in.
AC_DEFINE([HAVE_ALLOCA], 1,
! [Define to 1 if you have 'alloca' after including <alloca.h>,
a header that may be supplied by this distribution.])
ALLOCA_H=alloca.h
else
+ dnl alloca exists as a library function, i.e. it is slow and probably
+ dnl a memory leak. Don't define HAVE_ALLOCA in this case.
ALLOCA_H=
fi
else