$OpenBSD: patch-cfg_checks_python_mk,v 1.2 2020/07/03 21:11:13 sthen Exp $

Index: cfg/checks/python.mk
--- cfg/checks/python.mk.orig
+++ cfg/checks/python.mk
@@ -6,8 +6,8 @@ PYTHON_OBJ = api.o python_api.o
 # Check if we can build Python scripting support
 CHECK_PYTHON3_LIBS = $(shell $(PKG_CONFIG) --exists $(PYTHON3_LIBS) || echo -n "error")
 ifneq ($(CHECK_PYTHON3_LIBS), error)
-    LDFLAGS += $(shell python3-config --ldflags)
-    CFLAGS += $(PYTHON_CFLAGS) $(shell python3-config --includes)
+    LDFLAGS += $(shell ${MODPY_BIN}-config --embed --ldflags)
+    CFLAGS += $(PYTHON_CFLAGS) $(shell ${MODPY_BIN}-config --includes)
     OBJ += $(PYTHON_OBJ)
 else ifneq ($(MAKECMDGOALS), clean)
     $(warning WARNING -- Toxic will be compiled without Python scripting support)
