dlopen() calls in civetweb are guarded by the NO_SSL_DL compiler flag.
Setting this during build, and linking the necessary libraries directly,
simplifies cases of differing library names/versions/locations/etc.
Fixes bsc#942874
(cherry picked from commit
cf9e0229f3e54bff24a8f423bea2c430c1e0dfe0)
librgw_la_CXXFLAGS = -Woverloaded-virtual ${AM_CXXFLAGS}
noinst_LTLIBRARIES += librgw.la
+# Bypass civetweb dlopen() calls for ssl/crypto support and link the libraries
+# directly (below).
+CIVETWEB_COPT = -DNO_SSL_DL
+
LIBRGW_DEPS += \
$(LIBRADOS) \
libcls_rgw_client.la \
-lexpat \
-lm \
-lfcgi \
+ -lssl \
+ -lcrypto \
-ldl
CIVETWEB_INCLUDE = --include civetweb/include/civetweb_conf.h
rgw/rgw_civetweb_log.cc \
civetweb/src/civetweb.c
-libcivetweb_la_CXXFLAGS = ${CIVETWEB_INCLUDE} -Woverloaded-virtual ${AM_CXXFLAGS}
-libcivetweb_la_CFLAGS = -Icivetweb/include ${CIVETWEB_INCLUDE}
+libcivetweb_la_CXXFLAGS = ${CIVETWEB_INCLUDE} -Woverloaded-virtual ${AM_CXXFLAGS} ${CIVETWEB_COPT}
+libcivetweb_la_CFLAGS = -Icivetweb/include ${CIVETWEB_INCLUDE} ${CIVETWEB_COPT}
noinst_LTLIBRARIES += libcivetweb.la