From 481d4012e74d9b0e98911f0ae02700ecf4cfc5ac Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Tue, 20 Jun 2006 16:16:19 -0700 Subject: [PATCH] Don't add -ldl to XORG_LIBS if it's not needed for dlopen --- configure.ac | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index 84c2c7024..d025638a3 100644 --- a/configure.ac +++ b/configure.ac @@ -1030,7 +1030,10 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H" XORG_LIBS="$COMPOSITE_LIB $MI_LIB $FIXES_LIB $XEXTXORG_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XPSTUBS_LIB $OS_LIB" - AC_CHECK_LIB([dl], [dlopen], XORG_LIBS="$XORG_LIBS -ldl") +dnl Check to see if dlopen is in default libraries (like Solaris, which +dnl has it in libc), or if libdl is needed to get it. + AC_CHECK_FUNC([dlopen], [], + AC_CHECK_LIB([dl], [dlopen], XORG_LIBS="$XORG_LIBS -ldl")) case $host_os in linux*)