Using pkg-config to find libffi
authorClifford Wolf <clifford@clifford.at>
Sat, 13 Sep 2014 15:28:15 +0000 (17:28 +0200)
committerClifford Wolf <clifford@clifford.at>
Sat, 13 Sep 2014 15:28:15 +0000 (17:28 +0200)
Makefile

index a499157ac829986c39a417d24c5e6318cf68e41f..3ec89916abc695dcf01c741442406e2120efbddd 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -94,8 +94,8 @@ LDLIBS += -lreadline
 endif
 
 ifeq ($(ENABLE_PLUGINS),1)
-CXXFLAGS += -DYOSYS_ENABLE_PLUGINS
-LDLIBS += -lffi -ldl
+CXXFLAGS += -DYOSYS_ENABLE_PLUGINS $(shell pkg-config --silence-errors --cflags libffi)
+LDLIBS += $(shell pkg-config --silence-errors --libs libffi || echo -lffi) -ldl
 endif
 
 ifeq ($(ENABLE_TCL),1)