Hi all,

Quoting myself:
> Attached is a patch adding a test for tail -n in configure. While I
> was there, I did a second patch adding tests for grep -v, -q, -e
> and -E, which are the four grep options quilt needs.

Attached are updated patches after the recent compatibility changes to
quilt.

Is it OK to apply them in this form, or is another approach prefered?
I'm not familiar with the autoconf stuff.

-- 
Jean Delvare
 configure.ac |   15 +++++++++++++++
 1 file changed, 15 insertions(+)

--- quilt.orig/configure.ac     2005-09-18 13:19:00.000000000 +0200
+++ quilt/configure.ac  2005-09-18 13:19:43.000000000 +0200
@@ -56,6 +56,21 @@
 QUILT_COMPAT_PROG_PATH(PERL, perl, [perl perl5])
 QUILT_COMPAT_PROG_PATH(GREP, grep)
 QUILT_COMPAT_PROG_PATH(TAIL, tail)
+
+# Solaris' /usr/bin/tail doesn't understand -n.
+AC_MSG_CHECKING([whether $TAIL -n works])
+if test "`(echo first; echo second) | $TAIL -n 1 2>/dev/null`" == "second"; 
then
+       AC_MSG_RESULT(yes)
+else
+       AC_MSG_RESULT(no)
+       AC_MSG_ERROR([
+Sorry, you have a version of tail which doesn't understand -n.
+$PACKAGE_NAME needs it.  If you have access to a version of tail which does
+understand -n, you can supply its path with the '--with-tail=' option.
+Solaris users can use /usr/xpg4/bin/tail.
+])
+fi
+
 QUILT_COMPAT_PROG_PATH(SED, sed)
 QUILT_COMPAT_PROG_PATH(AWK, awk, [gawk awk])
 QUILT_COMPAT_PROG_PATH(POD2MAN, pod2man)
 configure.ac |   51 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)

--- quilt.orig/configure.ac     2005-09-18 13:19:43.000000000 +0200
+++ quilt/configure.ac  2005-09-18 13:19:47.000000000 +0200
@@ -55,6 +55,57 @@
 
 QUILT_COMPAT_PROG_PATH(PERL, perl, [perl perl5])
 QUILT_COMPAT_PROG_PATH(GREP, grep)
+
+AC_MSG_CHECKING([whether $GREP -q works])
+if test -z "`echo first | $GREP -q first 2>/dev/null`"; then
+       AC_MSG_RESULT(yes)
+else
+       AC_MSG_RESULT(no)
+       AC_MSG_ERROR([
+Sorry, you have a version of grep which doesn't understand -q.
+$PACKAGE_NAME needs it.  If you have access to a version of grep which does
+understand -q, you can supply its path with the '--with-grep=' option.
+])
+fi
+
+AC_MSG_CHECKING([whether $GREP -v works])
+if test "`(echo first; echo second) | $GREP -v first 2>/dev/null`" == 
"second"; then
+       AC_MSG_RESULT(yes)
+else
+       AC_MSG_RESULT(no)
+       AC_MSG_ERROR([
+Sorry, you have a version of grep which doesn't understand -v.
+$PACKAGE_NAME needs it.  If you have access to a version of grep which does
+understand -v, you can supply its path with the '--with-grep=' option.
+])
+fi
+
+AC_MSG_CHECKING([whether $GREP -e works])
+if test "x`echo -aabz | $GREP -e '-a*b' 2>/dev/null`" == "x-aabz"; then
+       AC_MSG_RESULT(yes)
+else
+       AC_MSG_RESULT(no)
+       AC_MSG_ERROR([
+Sorry, you have a version of grep which doesn't understand -e.
+$PACKAGE_NAME needs it.  If you have access to a version of grep which does
+understand -e, you can supply its path with the '--with-grep=' option.
+Solaris users can use /usr/xpg4/bin/grep.
+])
+fi
+
+AC_MSG_CHECKING([whether $GREP -E works])
+if test "`echo aabz | $GREP -E '^a+b' 2>/dev/null`" == "aabz"; then
+       AC_MSG_RESULT(yes)
+else
+       AC_MSG_RESULT(no)
+       AC_MSG_ERROR([
+Sorry, you have a version of grep which doesn't understand -E.
+$PACKAGE_NAME needs it.  If you have access to a version of grep which does
+understand -E, you can supply its path with the '--with-grep=' option.
+Solaris users can use /usr/xpg4/bin/grep.
+])
+fi
+
 QUILT_COMPAT_PROG_PATH(TAIL, tail)
 
 # Solaris' /usr/bin/tail doesn't understand -n.
_______________________________________________
Quilt-dev mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/quilt-dev

Reply via email to