summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorChris Packham <judge.packham@gmail.com>2021-12-29 02:20:57 (GMT)
committerChris Packham <judge.packham@gmail.com>2022-01-10 00:33:53 (GMT)
commitade8c04d144a2955e52c777e961a26ffbbf42c25 (patch)
treefbfa945ac0c690c2a5ed3ee8e489b70f37fbbc57 /configure.ac
parent584e57e888fd652ff6228c1dbdff18556149c7cb (diff)
configure.ac: Check that patch supports --no-backup-if-mismatch
BSD patch does not support --no-backup-if-mismatch. When we detect patch check that it supports the option we use. Fixes: #1577 Signed-off-by: Chris Packham <judge.packham@gmail.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac6
1 files changed, 6 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8736fe1..312f5e5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -169,6 +169,12 @@ CTNG_CPU_COUNT
CTNG_PATH_TOOL_REQ([PATCH], [gpatch patch], [patch])
+# Ensure the detected patch supports --no-backup-if-mismatch (BSD patch does not)
+AC_MSG_CHECKING([whether patch supports --no-backup-if-mismatch])
+AS_IF([$PATCH --no-backup-if-mismatch </dev/null >/dev/null 2>&1],
+ AC_MSG_RESULT([yes]),
+ AC_MSG_ERROR([$PATCH does not support --no-backup-if-mismatch]))
+
# We need a bash that is >= 3.1
CTNG_PROG_VERSION_REQ_STRICT([BASH_SHELL],
[GNU bash >= 3.1],