瀏覽代碼

outbound: use pkg-config for libcrypto in makefile

Daniel-Constantin Mierla 9 年之前
父節點
當前提交
cfb806e41e
共有 1 個文件被更改,包括 18 次插入1 次删除
  1. 18 1
      modules/outbound/Makefile

+ 18 - 1
modules/outbound/Makefile

@@ -1,4 +1,4 @@
-# 
+#
 # WARNING: do not run this directly, it should be run by the master Makefile
 
 include ../../Makefile.defs
@@ -6,15 +6,32 @@ auto_gen=
 NAME=outbound.so
 
 ifeq ($(CROSS_COMPILE),)
+	BUILDER = $(shell which pkg-config)
+endif
+
+ifneq ($(BUILDER),)
 SSL_BUILDER=$(shell \
 	if pkg-config --exists libssl; then \
 		echo 'pkg-config libssl'; \
 	fi)
+
+CRYPTO_BUILDER=$(shell \
+	if pkg-config --exists libcrypto; then \
+		echo 'pkg-config libcrypto'; \
+	fi)
 endif
 
+ifneq ($(BUILDER),)
+
 ifneq ($(SSL_BUILDER),)
 	DEFS += $(shell $(SSL_BUILDER) --cflags)
 	LIBS += $(shell $(SSL_BUILDER) --libs)
+endif
+ifneq ($(CRYPTO_BUILDER),)
+	DEFS += $(shell $(CRYPTO_BUILDER) --cflags)
+	LIBS += $(shell $(CRYPTO_BUILDER) --libs)
+endif
+
 else
 	DEFS += -I$(LOCALBASE)/ssl/include
 	LIBS += -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib \