|
@@ -10,6 +10,10 @@ CURL_BUILDER=$(shell \
|
|
else \
|
|
else \
|
|
which curl-config; \
|
|
which curl-config; \
|
|
fi)
|
|
fi)
|
|
|
|
+SSL_BUILDER=$(shell \
|
|
|
|
+ if pkg-config --exists libssl; then \
|
|
|
|
+ echo 'pkg-config libssl'; \
|
|
|
|
+ fi)
|
|
endif
|
|
endif
|
|
|
|
|
|
ifneq ($(CURL_BUILDER),)
|
|
ifneq ($(CURL_BUILDER),)
|
|
@@ -20,10 +24,19 @@ else
|
|
LIBS+=-L$(LOCALBASE)/lib -lcurl
|
|
LIBS+=-L$(LOCALBASE)/lib -lcurl
|
|
endif
|
|
endif
|
|
|
|
|
|
-DEFS+= -Wall -I$(LOCALBASE)/ssl/include
|
|
|
|
-# Dynamic linking
|
|
|
|
-#
|
|
|
|
-LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto
|
|
|
|
|
|
+ifneq ($(SSL_BUILDER),)
|
|
|
|
+ DEFS += $(shell $(SSL_BUILDER) --cflags)
|
|
|
|
+ LIBS += $(shell $(SSL_BUILDER) --libs)
|
|
|
|
+else
|
|
|
|
+ DEFS += -I$(LOCALBASE)/ssl/include
|
|
|
|
+ LIBS += -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib \
|
|
|
|
+ -L$(LOCALBASE)/lib64 -L$(LOCALBASE)/ssl/lib64 \
|
|
|
|
+ -lssl -lcrypto
|
|
|
|
+ # NOTE: depending on the way in which libssl was compiled you might
|
|
|
|
+ # have to add -lz -lkrb5 (zlib and kerberos5).
|
|
|
|
+ # E.g.: make TLS_HOOKS=1 TLS_EXTRA_LIBS="-lz -lkrb5"
|
|
|
|
+endif
|
|
|
|
+LIBS+= $(TLS_EXTRA_LIBS)
|
|
|
|
|
|
# Static linking, if you'd like to use TLS and AUTH_IDENTITY at the same time
|
|
# Static linking, if you'd like to use TLS and AUTH_IDENTITY at the same time
|
|
#
|
|
#
|
|
@@ -32,3 +45,4 @@ LIBS+= -L$(LOCALBASE)/lib -L$(LOCALBASE)/ssl/lib -lssl -lcrypto
|
|
DEFS+=-DSER_MOD_INTERFACE
|
|
DEFS+=-DSER_MOD_INTERFACE
|
|
|
|
|
|
include ../../Makefile.modules
|
|
include ../../Makefile.modules
|
|
|
|
+
|