summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorItamar Reis Peixoto <itamar@ispbrasil.com.br>2016-11-30 07:43:06 -0200
committerGitHub <noreply@github.com>2016-11-30 07:43:05 -0200
commit24541396a5b96c54aec302b0be8d69802ce2e61d (patch)
treec4d780bba3008875f9d503f5b4a82a380f66e4d1
parent5fbcaf1655edc3cc9734c4e785902c4ff6c5bf40 (diff)
parentc6307aa2b037359c75659758f4c4e3af666de6ae (diff)
downloadxrdp-proprietary-24541396a5b96c54aec302b0be8d69802ce2e61d.tar.gz
xrdp-proprietary-24541396a5b96c54aec302b0be8d69802ce2e61d.zip
Merge pull request #514 from proski/dlopen
Find openssl by pkg-config, add -ldl if needed
-rw-r--r--common/Makefile.am8
-rw-r--r--configure.ac11
2 files changed, 13 insertions, 6 deletions
diff --git a/common/Makefile.am b/common/Makefile.am
index 8305ede4..1bc5851f 100644
--- a/common/Makefile.am
+++ b/common/Makefile.am
@@ -18,6 +18,8 @@ AM_CPPFLAGS = \
-DXRDP_PID_PATH=\"${localstatedir}/run\" \
-DXRDP_LOG_PATH=\"${localstatedir}/log\"
+AM_CFLAGS = $(OPENSSL_CFLAGS)
+
module_LTLIBRARIES = \
libcommon.la
@@ -50,6 +52,6 @@ libcommon_la_SOURCES = \
$(PIXMAN_SOURCES)
libcommon_la_LIBADD = \
- -lcrypto \
- -lssl \
- -lpthread
+ -lpthread \
+ $(OPENSSL_LIBS) \
+ $(DLOPEN_LIBS)
diff --git a/configure.ac b/configure.ac
index 94ba2e16..3b58f2de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -118,10 +118,15 @@ AC_ARG_ENABLE(pixman, AS_HELP_STRING([--enable-pixman],
[], [enable_pixman=no])
AM_CONDITIONAL(XRDP_PIXMAN, [test x$enable_pixman = xyes])
+# Check if -ldl is needed to use dlopen()
+DLOPEN_LIBS=
+AC_CHECK_FUNC(dlopen, [],
+ [AC_CHECK_LIB(dl, dlopen, [DLOPEN_LIBS=-ldl])])
+AC_SUBST(DLOPEN_LIBS)
+
# checking for openssl
-AC_CHECK_HEADER([openssl/rc4.h], [],
- [AC_MSG_ERROR([please install libssl-dev or openssl-devel])],
- [#include <stdlib.h>])
+PKG_CHECK_MODULES([OPENSSL], [openssl >= 0], [],
+ [AC_MSG_ERROR([please install libssl-dev or openssl-devel])])
# checking for pam variation
# Linux-PAM is used in Linux systems