[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug #31646] grep fails to build on Solaris 10, because it lacks gre
From: |
Jim Meyering |
Subject: |
Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep |
Date: |
Sun, 14 Nov 2010 16:34:38 +0100 |
Bruno Haible wrote:
> Jim Meyering wrote:
>> While the dependency of AC_EGREP_CPP on AC_PROG_EGREP
>> is unavoidable, there are others that are indeed unnecessary,
>> since they serve only to work around a bug in autoconf-2.57,
>> which is no longer relevant, since we (gnulib-tool) now
>> requires 2.59 or newer.
>> ...
>> Now we require at least 2.59, and the work-around induced an
>> unwarranted circular dependency in grep's build process.
>> The following .m4 files pulled in the AC_PROG_EGREP requirement,
>> yet $EGREP was never used, and configuring grep on a system without
>> an existing grep program would thus fail unnecessarily.
>> * m4/alloca.m4 (gl_FUNC_ALLOCA): Remove work-around.
>> * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
>> * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
>> * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
>> * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
>> Prompted by the report, http://savannah.gnu.org/bugs/?31646
>> by Florin Iucha.
>
> There are three separate issues here:
>
> - The AC_REQUIRE([AC_PROG_EGREP]) in gnulib macros.
> These should not be needed any more since autoconf 2.54, because the
> definition of AC_EGREP_CPP includes this requirement already. It is
> possible that the bug that was observed back then (in 2002 or earlier)
> was due to wrong handling of AC_REQUIRE, but that was also fixed in
> autoconf by Eric about two years ago.
>
> - The AC_REQUIRE([AC_PROG_CPP]) in gnulib macros.
> This _probably_ can removed as well, because AC_EGREP_CPP does
> AC_LANG_PREPROC_REQUIRE() which should require AC_LANG_PREPROC(C),
> and the latter is defined as
> AC_DEFUN([AC_LANG_PREPROC(C)],
> [AC_REQUIRE([AC_PROG_CPP])])
>
> - The issue of the bug reporter is unrelated. It is simply a consequence
> of how AC_PROG_EGREP is implemented. But any use of AC_EGREP_CPP needs
> AC_PROG_EGREP anyway.
>
> So, your patch is OK, but the ChangeLog entry and commit message should
> IMO be rewritten to not mention Florin Iucha's bug report.
Thanks for reviewing it.
I adjusted the log and ChangeLog and pushed this.
>From 1e6979e8bb29cbb42d09f09c79fbcaa9f57a44a3 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 13 Nov 2010 22:25:32 +0100
Subject: [PATCH] remove autoconf-2.57 work-around requiring AC_PROG_EGREP and
AC_PROG_CPP
Now we require at least autoconf-2.59, which means that
the work-around is no longer needed.
* m4/alloca.m4 (gl_FUNC_ALLOCA): Remove work-around.
* m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
* m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
* m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
* m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
---
ChangeLog | 11 +++++++++++
m4/alloca.m4 | 6 +-----
m4/dirfd.m4 | 6 +-----
m4/mmap-anon.m4 | 6 +-----
m4/strtoimax.m4 | 6 +-----
m4/strtoumax.m4 | 6 +-----
6 files changed, 16 insertions(+), 25 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3bc7074..5548bef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-11-13 Jim Meyering <address@hidden>
+
+ remove autoconf-2.57 work-around requiring AC_PROG_EGREP and AC_PROG_CPP
+ Now we require at least autoconf-2.59, which means the work-around
+ is no longer needed.
+ * m4/alloca.m4 (gl_FUNC_ALLOCA): Remove work-around.
+ * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
+ * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Likewise.
+ * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
+ * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
+
2010-11-13 Bruno Haible <address@hidden>
rename, renameat: Avoid test failures at NFS mounted locations.
diff --git a/m4/alloca.m4 b/m4/alloca.m4
index f3ee343..80d67aa 100644
--- a/m4/alloca.m4
+++ b/m4/alloca.m4
@@ -1,4 +1,4 @@
-# alloca.m4 serial 9
+# alloca.m4 serial 10
dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -7,10 +7,6 @@ dnl with or without modifications, as long as this notice is
preserved.
AC_DEFUN([gl_FUNC_ALLOCA],
[
- dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
- AC_REQUIRE([AC_PROG_CPP])
- AC_REQUIRE([AC_PROG_EGREP])
-
AC_REQUIRE([AC_FUNC_ALLOCA])
if test $ac_cv_func_alloca_works = no; then
gl_PREREQ_ALLOCA
diff --git a/m4/dirfd.m4 b/m4/dirfd.m4
index 48b7bae..bfddeb9 100644
--- a/m4/dirfd.m4
+++ b/m4/dirfd.m4
@@ -1,4 +1,4 @@
-# serial 18 -*- Autoconf -*-
+# serial 19 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
@@ -17,10 +17,6 @@ AC_DEFUN([gl_FUNC_DIRFD],
dnl Persuade glibc <dirent.h> to declare dirfd().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
- AC_REQUIRE([AC_PROG_CPP])
- AC_REQUIRE([AC_PROG_EGREP])
-
AC_CHECK_FUNCS([dirfd])
AC_CHECK_DECLS([dirfd], , ,
[#include <sys/types.h>
diff --git a/m4/mmap-anon.m4 b/m4/mmap-anon.m4
index a6b7b9a..e20fc3c 100644
--- a/m4/mmap-anon.m4
+++ b/m4/mmap-anon.m4
@@ -1,4 +1,4 @@
-# mmap-anon.m4 serial 8
+# mmap-anon.m4 serial 9
dnl Copyright (C) 2005, 2007, 2009-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -15,10 +15,6 @@ dnl with or without modifications, as long as this notice is
preserved.
AC_DEFUN([gl_FUNC_MMAP_ANON],
[
- dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
- AC_REQUIRE([AC_PROG_CPP])
- AC_REQUIRE([AC_PROG_EGREP])
-
dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
diff --git a/m4/strtoimax.m4 b/m4/strtoimax.m4
index 8d8298b..5027e26 100644
--- a/m4/strtoimax.m4
+++ b/m4/strtoimax.m4
@@ -1,4 +1,4 @@
-# strtoimax.m4 serial 7
+# strtoimax.m4 serial 8
dnl Copyright (C) 2002, 2003, 2004, 2006, 2009, 2010 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -7,10 +7,6 @@ dnl with or without modifications, as long as this notice is
preserved.
AC_DEFUN([gl_FUNC_STRTOIMAX],
[
- dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
- AC_REQUIRE([AC_PROG_CPP])
- AC_REQUIRE([AC_PROG_EGREP])
-
AC_CACHE_CHECK([whether <inttypes.h> defines strtoimax as a macro],
gl_cv_func_strtoimax_macro,
[AC_EGREP_CPP([inttypes_h_defines_strtoimax], [#include <inttypes.h>
diff --git a/m4/strtoumax.m4 b/m4/strtoumax.m4
index 684634f..5450037 100644
--- a/m4/strtoumax.m4
+++ b/m4/strtoumax.m4
@@ -1,4 +1,4 @@
-# strtoumax.m4 serial 7
+# strtoumax.m4 serial 8
dnl Copyright (C) 2002, 2003, 2004, 2006, 2009, 2010 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
@@ -7,10 +7,6 @@ dnl with or without modifications, as long as this notice is
preserved.
AC_DEFUN([gl_FUNC_STRTOUMAX],
[
- dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
- AC_REQUIRE([AC_PROG_CPP])
- AC_REQUIRE([AC_PROG_EGREP])
-
AC_CACHE_CHECK([whether <inttypes.h> defines strtoumax as a macro],
gl_cv_func_strtoumax_macro,
[AC_EGREP_CPP([inttypes_h_defines_strtoumax], [#include <inttypes.h>
--
1.7.3.2.4.g60aa9
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, (continued)
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Jim Meyering, 2010/11/14
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Bruno Haible, 2010/11/14
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Paolo Bonzini, 2010/11/14
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Jim Meyering, 2010/11/14
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Bruno Haible, 2010/11/14
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Paolo Bonzini, 2010/11/14
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Florin Iucha, 2010/11/14
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Paolo Bonzini, 2010/11/14
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Ralf Wildenhues, 2010/11/14
Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep, Bruno Haible, 2010/11/14
- Re: [bug #31646] grep fails to build on Solaris 10, because it lacks grep,
Jim Meyering <=