aboutsummaryrefslogtreecommitdiff
path: root/gold/configure.ac
diff options
context:
space:
mode:
authorCary Coutant <ccoutant@google.com>2013-11-22 15:46:51 -0800
committerCary Coutant <ccoutant@google.com>2013-11-22 15:47:18 -0800
commit6632e8ccecd8fe5de18ad78ced1c14755a24b169 (patch)
tree7ee6b668139ad83d7bbc8e2b588a4aa5620b91a4 /gold/configure.ac
parent0c075858c711eaf6fcd23a07e86d7fadcfea4330 (diff)
downloadgdb-6632e8ccecd8fe5de18ad78ced1c14755a24b169.zip
gdb-6632e8ccecd8fe5de18ad78ced1c14755a24b169.tar.gz
gdb-6632e8ccecd8fe5de18ad78ced1c14755a24b169.tar.bz2
Add check for which library is needed for dlopen.
gold/ PR gold/16203 * configure.ac: Add check for which library is needed for dlopen. * configure: Regenerate.
Diffstat (limited to 'gold/configure.ac')
-rw-r--r--gold/configure.ac9
1 files changed, 7 insertions, 2 deletions
diff --git a/gold/configure.ac b/gold/configure.ac
index 82ad11e..9bc216b 100644
--- a/gold/configure.ac
+++ b/gold/configure.ac
@@ -528,9 +528,14 @@ AC_CHECK_HEADERS(ext/hash_map ext/hash_set)
AC_CHECK_HEADERS(byteswap.h)
dnl When plugins enabled dynamic loader interface is required. Check headers
-dnl which may provide this interface. In case of dlfcn.h add libdl to link.
+dnl which may provide this interface. Add the necessary library to link.
AC_CHECK_HEADERS(windows.h)
-AC_CHECK_HEADERS(dlfcn.h, [DLOPEN_LIBS="-ldl"], [DLOPEN_LIBS=""])
+AC_CHECK_HEADERS(dlfcn.h)
+AC_SEARCH_LIBS(dlopen, [dl dld])
+case "$ac_cv_search_dlopen" in
+ no*) DLOPEN_LIBS="";;
+ *) DLOPEN_LIBS="$ac_cv_search_dlopen";;
+esac
AC_SUBST(DLOPEN_LIBS)
AC_CHECK_FUNCS(mallinfo posix_fallocate fallocate readv sysconf times)