autoconf-patches
[Top][All Lists]
Advanced

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

Re: AIX grep limitation: coreutils build failure


From: Paul Eggert
Subject: Re: AIX grep limitation: coreutils build failure
Date: Mon, 29 May 2006 02:19:31 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Ralf Wildenhues <address@hidden> writes:

> I don't mind the plug, but unfortunately, things are not so simple:
> The `grep -c' apparently keeps going, and just omits counting the line
> that was too long (as it happens, the LTLIBOBJS and the LIBOBJS
> substitutions are in different conf$$subs.sed files).  This means we
> both get a whole slew of errors

OK, thanks, how about this fix instead?

(My reluctance to use tr is due to the fact that we don't rely on it
now, so why add it....)

        * lib/autoconf/status.m4 (_AC_OUTPUT_FILES_PREPARE):
        Don't assume 'grep' works on long lines, since AIX grep doesn't.

--- status.m4.~1.110.~  2006-05-27 14:52:20.000000000 -0700
+++ status.m4   2006-05-29 02:18:10.000000000 -0700
@@ -401,7 +401,8 @@ m4_if(_AC_SED_CMD_LIMIT,
       m4_if(_AC_Var, address@hidden@], m4_if(_AC_SED_CMD_NUM, 2, 2, 
_AC_SED_CMD_LIMIT), _AC_SED_CMD_NUM),
 [_ACEOF
 
-  if test `grep -c "$ac_delim\$" conf$$subs.sed` = _AC_SED_DELIM_NUM; then
+dnl Do not use grep on conf$$subs.sed, since AIX grep has a line length limit.
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 
_AC_SED_DELIM_NUM; then
     break
   elif $ac_last_try; then
     AC_MSG_ERROR([could not make $CONFIG_STATUS])
@@ -410,10 +411,11 @@ m4_if(_AC_SED_CMD_LIMIT,
   fi
 done
 
-ac_eof=
-if grep '^CEOF$' conf$$subs.sed >/dev/null; then
-  ac_eof=`sed -n '/^CEOF[[0-9]]*$/s/CEOF//p' conf$$subs.sed | sort -nru | sed 
1q`
-  ac_eof=`expr 0$ac_eof + 1`
+dnl Similarly, avoid grep here too.
+ac_eof=`sed -n '/^CEOF[[0-9]]*$/s/CEOF/0/p' conf$$subs.sed`
+if test -n "$ac_eof"; then
+  ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
+  ac_eof=`expr $ac_eof + 1`
 fi
 
 dnl Increment fragment number.




reply via email to

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