1--- a/ports/unix/Makefile
2+++ b/ports/unix/Makefile
3@@ -31,7 +31,7 @@
4 QSTR_GLOBAL_DEPENDENCIES += $(VARIANT_DIR)/mpconfigvariant.h
5
6 # OS name, for simple autoconfig
7-UNAME_S := $(shell uname -s)
8+UNAME_S := @UNAME_S@
9
10 # include py core make definitions
11 include $(TOP)/py/py.mk
12@@ -151,7 +151,7 @@
13 # If the variant enables it, enable modbluetooth.
14 ifeq ($(MICROPY_PY_BLUETOOTH),1)
15 ifeq ($(MICROPY_BLUETOOTH_BTSTACK),1)
16-HAVE_LIBUSB := $(shell (which pkg-config > /dev/null && pkg-config --exists libusb-1.0) 2>/dev/null && echo '1')
17+HAVE_LIBUSB := $(shell (which @PKG_CONFIG@ > /dev/null && @PKG_CONFIG@ --exists libusb-1.0) 2>/dev/null && echo '1')
18
19 # Figure out which BTstack transport to use.
20 ifeq ($(HAVE_LIBUSB),1)
21@@ -180,8 +180,8 @@
22 endif
23 else
24 # Use system version of libffi.
25-LIBFFI_CFLAGS := $(shell pkg-config --cflags libffi)
26-LIBFFI_LDFLAGS := $(shell pkg-config --libs libffi)
27+LIBFFI_CFLAGS := $(shell @PKG_CONFIG@ --cflags libffi)
28+LIBFFI_LDFLAGS := $(shell @PKG_CONFIG@ --libs libffi)
29 endif
30
31 ifeq ($(UNAME_S),Linux)