diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2006-01-23 13:16:22 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2006-01-23 13:16:22 +0000 |
commit | f7a772c2f872ed1b5b4a69c9c55f1281cbee625a (patch) | |
tree | a579e0522c2eb5e7b6542480d426862da8720b43 /configure.ac | |
parent | ef8f0df0f7785c44a227fc95ebbb2ac24ecf283d (diff) | |
download | quilt-f7a772c2f872ed1b5b4a69c9c55f1281cbee625a.tar.gz |
- configure.ac: Require GNU patch 2.4+.
- quilt/import.in: Don't use diff -U-1.
- Test suite: Recognize output of old versions of patch (from
jayvdb@gmail.com).
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 45 |
1 files changed, 22 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac index a3056c7..91addbf 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([quilt],[0.42],[quilt-dev@nongnu.org]) AC_CONFIG_AUX_DIR(config) AC_PREREQ(2.53) -AC_REVISION ($Revision: 1.65 $) +AC_REVISION ($Revision: 1.66 $) PACKAGE_RELEASE=1 AC_SUBST(PACKAGE_RELEASE) @@ -205,29 +205,28 @@ fi QUILT_COMPAT_PROG_PATH(DIFF, diff) QUILT_COMPAT_PROG_PATH(PATCH, patch) -# Sun's patch is a mess, issue a warning. But we are going to continue with -# the build because you might just be lucky. -AC_MSG_CHECKING([whether $PATCH will work]) -if $PATCH -v 2>&1 | grep "Sun" >/dev/null; then - AC_MSG_RESULT(no) - AC_MSG_WARN([ -Sorry, you have a Sun version of patch which is notoriously buggy. $PACKAGE_NAME -may function correctly, or minor errors may occur due to Sun's patch tool. -Please consider upgrading to GNU patch, if you already have GNU patch then you -can supply its path with the '--with-patch=' option. -]) -elif $PATCH --version 2>&1 | grep "patch 2.0" >/dev/null; then - AC_MSG_RESULT(no) - AC_MSG_WARN([ -Sorry, the version of patch you are using can cause severe problems when a patch -creates a directory. $PACKAGE_NAME may well function correctly with this version -of patch or small problems could creep in. -Please consider upgrading your patch to a more recent version, if you already -have a more recent version of patch then you can supply its path with the -'--with-patch=' option. -]) +# Sun's patch, and others, do not work because GNU patch options are used. +AC_MSG_CHECKING([the version of $PATCH]) +if $PATCH --version 2> /dev/null | grep -q GNU ; then + set -- `$PATCH --version 2> /dev/null` + patch_version=$2 + AC_MSG_RESULT($patch_version) + saved_IFS=$IFS; IFS='.' + set -- $patch_version + IFS=$saved_IFS + set -- `echo $1 | tr -cd 0-9` `echo $2 | tr -cd 0-9` + if test 0$1 -lt 2 || test 0$1 -eq 2 -a 0$2 -lt 4 ; then + patch_version= + fi else - AC_MSG_RESULT(yes) + AC_MSG_RESULT(no GNU patch) +fi +if test -z "$patch_version" ; then + AC_MSG_ERROR([ +$PACKAGE_NAME requires at least version 2.4 of GNU patch. You can download a +current version of patch from ftp.gnu.org, or if you already have GNU patch +then you can supply its path with the '--with-patch=' option. +]) fi QUILT_COMPAT_PROG_PATH(FIND, find) |