glcore: prepare for dynamic loading

glcore gets linked with -ldl, -lpthread for s3tc and glapi
xserver needs
        DLOPEN_LIBS - to dlopen the glcore dso
        LD_EXPORT_SYMBOLS_FLAG - to export symbols for glcore to use

the ld flag is added to kdrive only when GLX is enabled, the net overhead for
Xephyr is ~155KB, could be reduced with --dynamic-list.
This commit is contained in:
George Sapountzis 2008-04-18 17:45:53 +03:00
parent fbad87f2ae
commit efb723e166
19 changed files with 74 additions and 1 deletions

View File

@ -848,6 +848,7 @@ if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then
if test $? -ne 0; then
AC_MSG_ERROR([Failed to link Mesa source tree. Please specify a proper path to Mesa sources, or disable GLX.])
fi
GLX_SYS_LIBS="$GLX_SYS_LIBS $DLOPEN_LIBS"
else
GLX=no
fi
@ -1969,7 +1970,7 @@ if test "$KDRIVE" = yes; then
KDRIVE_LOCAL_LIBS="$DIX_LIB $KDRIVE_LIB $KDRIVE_STUB_LIB $CONFIG_LIB"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $FB_LIB $MI_LIB $KDRIVE_PURE_LIBS"
KDRIVE_LOCAL_LIBS="$KDRIVE_LOCAL_LIBS $KDRIVE_OS_LIB $OS_LIB"
KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS"
KDRIVE_LIBS="$TSLIB_LIBS $KDRIVE_LOCAL_LIBS $XSERVER_SYS_LIBS $GLX_SYS_LIBS"
# check if we can build Xephyr
PKG_CHECK_MODULES(XEPHYR, $XEPHYR_REQUIRED_LIBS, [xephyr="yes"], [xephyr="no"])

View File

@ -58,6 +58,10 @@ ATI_LIBS = \
$(DRI_LIBS) \
@KDRIVE_LIBS@
if GLX
Xati_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xati_LDADD = \
$(ATI_LIBS) \
@KDRIVE_LIBS@

View File

@ -20,6 +20,10 @@ CHIPS_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
if GLX
Xchips_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xchips_LDADD = \
$(CHIPS_LIBS) \
@KDRIVE_LIBS@

View File

@ -67,6 +67,10 @@ libxephyr_a_CFLAGS = \
Xephyr_SOURCES = \
ephyrinit.c
if GLX
Xephyr_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xephyr_LDADD = \
libxephyr.a \
libxephyr-hostx.a \

View File

@ -20,6 +20,10 @@ EPSON_LIBS = \
libepson.a \
@KDRIVE_LIBS@
if GLX
Xepson_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xepson_LDADD = \
$(EPSON_LIBS) \
@KDRIVE_LIBS@

View File

@ -16,6 +16,10 @@ libfake_a_SOURCES = \
Xfake_SOURCES = \
fakeinit.c
if GLX
Xfake_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xfake_LDADD = \
libfake.a \
@KDRIVE_LIBS@ \

View File

@ -14,6 +14,10 @@ bin_PROGRAMS = Xfbdev
Xfbdev_SOURCES = \
fbinit.c
if GLX
Xfbdev_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xfbdev_LDADD = \
libfbdev.a \
@KDRIVE_LIBS@

View File

@ -23,6 +23,10 @@ I810_LIBS = \
libi810.a \
@KDRIVE_LIBS@
if GLX
Xi810_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xi810_LDADD = \
$(I810_LIBS) \
@KDRIVE_LIBS@

View File

@ -27,6 +27,10 @@ MACH64_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a
if GLX
Xmach64_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xmach64_LDADD = \
$(MACH64_LIBS) \
@KDRIVE_LIBS@

View File

@ -22,6 +22,10 @@ MGA_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
if GLX
Xmga_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xmga_LDADD = \
$(MGA_LIBS) \
@KDRIVE_LIBS@

View File

@ -32,6 +32,10 @@ NEOMAGIC_LIBS = \
${VESA_LIBS} \
@KDRIVE_LIBS@
if GLX
Xneomagic_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xneomagic_LDADD = \
$(NEOMAGIC_LIBS) \
@KDRIVE_LIBS@ \

View File

@ -23,6 +23,10 @@ NVIDIA_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
if GLX
Xnvidia_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xnvidia_LDADD = \
$(NVIDIA_LIBS) \
@KDRIVE_LIBS@

View File

@ -21,6 +21,10 @@ PM2_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
if GLX
Xpm2_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xpm2_LDADD = \
$(PM2_LIBS) \
@KDRIVE_LIBS@

View File

@ -20,6 +20,10 @@ R128_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
if GLX
Xr128_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xr128_LDADD = \
$(R128_LIBS) \
@KDRIVE_LIBS@

View File

@ -7,6 +7,10 @@ bin_PROGRAMS = Xsdl
Xsdl_SOURCES = sdl.c
if GLX
Xsdl_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xsdl_LDADD = \
@KDRIVE_LIBS@ \
@XSDL_LIBS@

View File

@ -34,6 +34,10 @@ SIS_LIBS = \
$(VESA_LIBS) \
@KDRIVE_LIBS@
if GLX
Xsis_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xsis_LDADD = \
$(SIS_LIBS) \
@KDRIVE_LIBS@ \

View File

@ -25,6 +25,10 @@ SMI_LIBS = \
$(top_builddir)/hw/kdrive/vesa/libvesa.a \
@KDRIVE_LIBS@
if GLX
Xsmi_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xsmi_LDADD = \
$(SMI_LIBS) \
@KDRIVE_LIBS@

View File

@ -19,6 +19,10 @@ libvesa_a_SOURCES = \
Xvesa_SOURCES = \
vesainit.c
if GLX
Xvesa_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xvesa_LDADD = \
libvesa.a \
@KDRIVE_LIBS@

View File

@ -21,6 +21,10 @@ VIA_LIBS = \
libvia.a \
$(top_builddir)/hw/kdrive/vesa/libvesa.a
if GLX
Xvia_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
endif
Xvia_LDADD = \
$(VIA_LIBS) \
@KDRIVE_LIBS@