-# set SYSCONFDIR to /etc if PREFIX=/usr or PREFIX=/usr/local
-SYSCONFDIR = $(shell if [ $(PREFIX) = /usr -o $(PREFIX) = /usr/local ]; then echo /etc; else echo $(PREFIX)/etc; fi)
+# $(shell) and $(error) are no-ops in BSD Make and the != variable assignment operator is not supported by GNU Make <4.0
+VERSION_CHECK != echo supported
+VERSION_CHECK ?= $(error GNU Make 4+ or BSD Make is required)
+CHECK_VERSION := $(VERSION_CHECK)