autoconf-patches
[Top][All Lists]
Advanced

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

Detecting GNU sed


From: Pavel Roskin
Subject: Detecting GNU sed
Date: Tue, 31 Oct 2000 02:37:04 -0500 (EST)

Hello!

The native sed on FreeBSD 4.0 doesn't return an error given "--version" -
it silenty waits for input. Currently Autoupdate thinks that it is GNU sed
and fails later.

I believe it's the Autoconf's way to judge programs by features, not by
vendors. We want "\b" - let's test for it - it's not hard at all.

ChangeLog:
        * autoupdate.sh: Check that $sed understands the meaning of "\b"
        instead of checking "--version".

_____________________________
Index: autoupdate.sh
--- autoupdate.sh       Fri Oct 27 21:04:48 2000
+++ autoupdate.sh       Tue Oct 31 01:44:18 2000
@@ -88,7 +88,7 @@
 # If we don't have GNU Sed, exit 77 so that the test suite just skip
 # this test.
 sed=${SED-sed}
-$sed --version </dev/null >/dev/null 2>&1 ||
+(echo 'xyz-xY' | $sed 's/\bx.\b/XY/' | grep 'xyz-XY') >/dev/null 2>&1 ||
   { echo autoupdate requires GNU sed >&2; exit 77; }
 
 # Variables.
_____________________________

Now on FreeBSD with GNU make and GNU m4 but without GNU sed the testsuite
passed with 37 tests ignored and 0 failed of 159.

Regards,
Pavel Roskin




reply via email to

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