+# Check if pkg-config is installed, because without pkg-config, the following
+# check for the version of libxcb cannot be done.
+ifeq ($(shell which pkg-config 2>/dev/null 1>/dev/null || echo 1),1)
+$(error "pkg-config was not found")
+endif
+
+ifeq ($(shell pkg-config --exists xcb-keysyms || echo 1),1)
+$(error "pkg-config could not find xcb-keysyms.pc")
+endif
+