Created
October 20, 2022 18:12
-
-
Save andreypopp/361ad2eb854021ed1839447737f32b27 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/makefile b/makefile | |
index bf26179..6f02914 100644 | |
--- a/makefile | |
+++ b/makefile | |
@@ -87,8 +87,13 @@ else | |
endif | |
endif | |
ifeq ($(i_FFI),2) | |
+ifeq ($(shell command -v pkg-config 2>&1 > /dev/null && pkg-config --exists libffi && echo $$?),0) | |
+ i_LD_LIBS += $(shell pkg-config --libs libffi) | |
+ CCFLAGS += $(shell pkg-config --cflags libffi) | |
+else | |
i_LD_LIBS += -lffi | |
endif | |
+endif | |
ifeq ($(origin LD_LIBS),command line) | |
i_LD_LIBS := $(LD_LIBS) | |
custom = 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment