diff --git a/src/makefrag b/src/makefrag index 1a6a24db8d9..b3e1d04e8c8 100644 --- a/src/makefrag +++ b/src/makefrag @@ -80,11 +80,15 @@ endif WITH_Z3 := $(shell (cd .. && $(FEATURETOOL) -q isenabled Z3GateSchedulingConfigurator && echo enabled) ) ifeq ($(WITH_Z3), enabled) ifeq ($(HAVE_PKGCFG), yes) - HAVE_Z3 := $(shell $(PKGCFG) --exists z3 && echo yes || echo no) + HAVE_Z3 := $(shell $(PKGCFG) --exists z3 && echo yes) ifeq ($(HAVE_Z3), yes) - LIBS += $(shell $(PKGCFG) --libs z3) - CFLAGS += $(shell $(PKGCFG) --cflags z3) -DHAVE_Z3 + Z3_LIBS := $(shell $(PKGCFG) --libs z3) + Z3_CFLAGS := $(shell $(PKGCFG) --cflags z3) + else + Z3_LIBS := -lz3 # default in case pkg-config doesn't have z3 in its database (such as in NIX) endif + LIBS += $(Z3_LIBS) + CFLAGS += $(Z3_CFLAGS) -DHAVE_Z3 endif endif