Depending on the system we might actually need to link with `libdl`
when our Rust library is used, and the mechanism to do that was not
properly set up when building with `autotools` (we were adding `LIBDL`
to the the libraries we need but the variable was not properly filled).
Unfortunately the systems we are exercising in our CI do not need to
explicitly link with `libdl` so we did not notice.
Signed-off-by: Remi Gacogne <remi.gacogne@powerdns.com>
m4_pattern_forbid([^_?PKG_[A-Z_]+$], [*** pkg.m4 missing, please install pkg-config])
LT_PREREQ([2.2.2])
-LT_INIT([disable-static])
+# Rust runtime uses dlopen from its static lib
+LT_INIT([disable-static dlopen])
+AC_SUBST([LIBDL], [$lt_cv_dlopen_libs])
CFLAGS="-g -O3 -Wall -Wextra -Wshadow -fvisibility=hidden $CFLAGS"
CXXFLAGS="-g -O3 -Wall -Wextra -Wshadow -Wmissing-declarations -Wredundant-decls -fvisibility=hidden $CXXFLAGS"