From cacaa4a1616d7c0ea370ff197d816f706909bde5 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 4 May 2018 19:21:58 +0200 Subject: configure: Check separately for lib implementing dlopen and dlsym Sometimes the library probiding dlopen is not the same one providing dlsym. This is the case when compiling with AddressSanitizer enabled. In this case, AC_SEARCH_LIBS([dlopen]...) reports no lib is required, but tests using dlsym still require to link against -ldl. Change-Id: Ic619b0885688066b60c97caf1e2c7e5402c1d9f7 --- configure.ac | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 7f2aabd1..6f561767 100644 --- a/configure.ac +++ b/configure.ac @@ -58,8 +58,10 @@ AC_HEADER_STDC AC_CHECK_HEADERS(execinfo.h sys/select.h sys/socket.h syslog.h ctype.h netinet/tcp.h) # for src/conv.c AC_FUNC_ALLOCA -AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DL="$LIBS";LIBS=""]) -AC_SUBST(LIBRARY_DL) +AC_SEARCH_LIBS([dlopen], [dl dld], [LIBRARY_DLOPEN="$LIBS";LIBS=""]) +AC_SUBST(LIBRARY_DLOPEN) +AC_SEARCH_LIBS([dlsym], [dl dld], [LIBRARY_DLSYM="$LIBS";LIBS=""]) +AC_SUBST(LIBRARY_DLSYM) # for src/backtrace.c AC_CHECK_LIB(execinfo, backtrace, BACKTRACE_LIB=-lexecinfo, BACKTRACE_LIB=) AC_SUBST(BACKTRACE_LIB) -- cgit v1.2.3