summaryrefslogtreecommitdiff
path: root/Makerules
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2013-05-29 10:01:59 +0200
committerTor Andersson <tor.andersson@artifex.com>2013-05-29 10:01:59 +0200
commitec55f364751749dfbda1192d3368be771ed5b5a5 (patch)
treeae68506c79ccf76905fe3844bc26da67ac2dbed1 /Makerules
parenta29d92e6cd33325a21974b15a788bbe94736f59b (diff)
downloadmupdf-ec55f364751749dfbda1192d3368be771ed5b5a5.tar.xz
Add rules to configure and build openssl if it is present in thirdparty.
Also sets the -DHAVE_OPENSSL flag.
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 4f849f95..9dd6717a 100644
--- a/Makerules
+++ b/Makerules
@@ -25,6 +25,8 @@ endif
# Mac OS X doesn't have pkg-config so we hard code paths.
ifeq "$(OS)" "Darwin"
+SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL
+SYS_OPENSSL_LIBS = -lcrypto
SYS_X11_CFLAGS = -I/usr/X11R6/include
SYS_X11_LIBS = -L/usr/X11R6/lib -lX11 -lXext
@@ -39,6 +41,12 @@ RANLIB_CMD = ranlib $@
# Other Unixes use pkg-config for system libraries.
else
+
+ifeq "$(shell pkg-config --exists libcrypto && echo yes)" "yes"
+SYS_OPENSSL_CFLAGS = -DHAVE_OPENSSL $(shell pkg-config --cflags libcrypto)
+SYS_OPENSSL_LIBS = $(shell pkg-config --libs libcrypto)
+endif
+
SYS_X11_CFLAGS = $(shell pkg-config --cflags x11 xext)
SYS_X11_LIBS = $(shell pkg-config --libs x11 xext)