diff options
| author | Pavel Roskin <plroskin@gmail.com> | 2016-11-29 16:25:37 -0800 |
|---|---|---|
| committer | Pavel Roskin <plroskin@gmail.com> | 2016-11-29 16:25:37 -0800 |
| commit | 06f4f72e28088fe4cc915c0c2b258f1bbfef2c05 (patch) | |
| tree | 60fd46fbb1087e5fc37411c89c38ae2585eae5cc | |
| parent | 5fbcaf1655edc3cc9734c4e785902c4ff6c5bf40 (diff) | |
| download | xrdp-proprietary-06f4f72e28088fe4cc915c0c2b258f1bbfef2c05.tar.gz xrdp-proprietary-06f4f72e28088fe4cc915c0c2b258f1bbfef2c05.zip | |
Add -ldl to libcommon link flags if it's needed for dlopen()
| -rw-r--r-- | common/Makefile.am | 3 | ||||
| -rw-r--r-- | configure.ac | 6 |
2 files changed, 8 insertions, 1 deletions
diff --git a/common/Makefile.am b/common/Makefile.am index 8305ede4..049e8af9 100644 --- a/common/Makefile.am +++ b/common/Makefile.am @@ -52,4 +52,5 @@ libcommon_la_SOURCES = \ libcommon_la_LIBADD = \ -lcrypto \ -lssl \ - -lpthread + -lpthread \ + $(DLOPEN_LIBS) diff --git a/configure.ac b/configure.ac index 94ba2e16..10f73617 100644 --- a/configure.ac +++ b/configure.ac @@ -118,6 +118,12 @@ 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])], |
