build: Handle a lack of gutenprint headers a little more gracefully

This commit is contained in:
Solomon Peachy 2020-02-11 21:41:24 -05:00
parent 81b78aa17c
commit 6cb17fc183
1 changed files with 2 additions and 0 deletions

View File

@ -43,10 +43,12 @@ endif
# Figure out what the backend name needs to be
ifeq ($(NO_GUTENPRINT),)
GUTENPRINT_INCLUDE := $(shell pkg-config --variable=includedir gutenprint)/gutenprint
ifneq (,$(GUTENPRINT_INCLUDE))
GUTENPRINT_MAJOR := $(shell grep 'define STP_MAJOR' $(GUTENPRINT_INCLUDE)/gutenprint-version.h | tr -d '()\t' | cut -c33- )
GUTENPRINT_MINOR := $(shell grep 'define STP_MINOR' $(GUTENPRINT_INCLUDE)/gutenprint-version.h | tr -d '()\t' | cut -c33- )
BACKEND_NAME ?= gutenprint$(GUTENPRINT_MAJOR)$(GUTENPRINT_MINOR)+usb
endif
endif
# For Gutenprint 5.2, use old URI scheme
ifneq ($(GUTENPRINT_MINOR),3)