Add -ldl to libcommon link flags if it's needed for dlopen()

master
Pavel Roskin 8 years ago
parent 5fbcaf1655
commit 06f4f72e28

@ -52,4 +52,5 @@ libcommon_la_SOURCES = \
libcommon_la_LIBADD = \ libcommon_la_LIBADD = \
-lcrypto \ -lcrypto \
-lssl \ -lssl \
-lpthread -lpthread \
$(DLOPEN_LIBS)

@ -118,6 +118,12 @@ AC_ARG_ENABLE(pixman, AS_HELP_STRING([--enable-pixman],
[], [enable_pixman=no]) [], [enable_pixman=no])
AM_CONDITIONAL(XRDP_PIXMAN, [test x$enable_pixman = xyes]) 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 # checking for openssl
AC_CHECK_HEADER([openssl/rc4.h], [], AC_CHECK_HEADER([openssl/rc4.h], [],
[AC_MSG_ERROR([please install libssl-dev or openssl-devel])], [AC_MSG_ERROR([please install libssl-dev or openssl-devel])],

Loading…
Cancel
Save