added check for old patch versions
authorewt <devnull@localhost>
Wed, 22 Oct 1997 00:20:06 +0000 (00:20 +0000)
committerewt <devnull@localhost>
Wed, 22 Oct 1997 00:20:06 +0000 (00:20 +0000)
CVS patchset: 1868
CVS date: 1997/10/22 00:20:06

config.h.in
configure.in

index 45e9207..82ba5ce 100644 (file)
@@ -99,4 +99,7 @@
 /* Define as 1 if you have <sys/sysconfig.h> (only aix?) */
 #define HAVE_SYS_SYSTEMCFG_H 0
 
+/* Define if the patch call you'll be using is 2.1 or older */
+#define CONFIG_OLDPATCH_21 0
+
 #endif
index 0509b41..077c2ff 100644 (file)
@@ -67,6 +67,18 @@ if test "$cross_compiling" != "yes"; then
     else
            AC_MSG_RESULT(yes)
     fi
+
+    AC_MSG_CHECKING(old version of patch)
+    PATCHVERSION=`patch --version 2>&1 | awk '{print $3}'`
+    PATCHMAJOR=`echo $PATCHVERSION | cut -d. -f1`
+    PATCHMINOR=`echo $PATCHVERSION | cut -d. -f2`
+
+    if test $PATCHMAJOR -le 2 -a $PATCHMINOR -le 1; then
+       AC_DEFINE(CONFIG_OLDPATCH_21)
+       AC_MSG_RESULT(patch older then 2.2 found)
+    else
+       AC_MSG_RESULT(patch later then 2.2 found)
+    fi
 fi
 
 topdir=`pwd`