Supply all code using dl*() with DLOPEN_LIBS

Previously DLOPEN_LIBS was managed in top-level configure.ac.
Instead bundle it with the code using dl*() functions to
avoid breakages in uncommon configurations.

Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Dan Nicholson <dbn.lists@gmail.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
Mikhail Gusarov 2009-10-29 11:46:22 -07:00 committed by Keith Packard
parent ec98d7fc78
commit d306373399
4 changed files with 9 additions and 3 deletions

View File

@ -195,6 +195,7 @@ 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], DLOPEN_LIBS="-ldl"))
AC_SUBST(DLOPEN_LIBS)
dnl Checks for library functions.
AC_FUNC_VPRINTF
@ -922,7 +923,7 @@ if test "x$GLX" = xyes; then
AC_SUBST(XLIB_CFLAGS)
AC_DEFINE(GLXEXT, 1, [Build GLX extension])
GLX_LIBS='$(top_builddir)/glx/libglx.la'
GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS"
GLX_SYS_LIBS="$GLX_SYS_LIBS"
else
GLX=no
fi
@ -1513,7 +1514,7 @@ if test "x$XORG" = xyes; then
AC_CHECK_FUNCS([pci_device_vgaarb_init])
LIBS=$SAVE_LIBS
CFLAGS=$SAVE_CFLAGS
XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS $SELINUX_LIB"
XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS $SELINUX_LIB"
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
case $host_os in

View File

@ -58,6 +58,8 @@ if DRI2_AIGLX
libglxdri_la_SOURCES += glxdri2.c
endif
libglxdri_la_LIBADD = $(DLOPEN_LIBS)
libglx_la_SOURCES = \
$(indirect_sources) \
$(glapi_sources) \
@ -95,3 +97,5 @@ libglx_la_SOURCES = \
swap_interval.c \
unpack.h \
xfont.c
libglx_la_LIBADD = $(DLOPEN_LIBS)

View File

@ -21,6 +21,7 @@ libloader_la_SOURCES = \
dlloader.c \
os.c \
sdksyms.c
libloader_la_LIBADD = $(DLOPEN_LIBS)
CLEANFILES = sdksyms.c sdksyms.dep

View File

@ -26,7 +26,7 @@ libos_la_SOURCES = \
xstrans.c \
xprintf.c \
$(XORG_SRCS)
libos_la_LIBADD = @SHA1_LIBS@
libos_la_LIBADD = @SHA1_LIBS@ $(DLOPEN_LIBS)
if SECURE_RPC
libos_la_SOURCES += $(SECURERPC_SRCS)