[PATCH 5/6] Add XSERVER_SYS_LIBS to the each server's _SYS_LIBS

Tomas Carnecky tom at dbservice.com
Tue Aug 3 13:34:14 PDT 2010


Simplify makefiles by generating only two variables for each server:
the set of in-tree libraries and out-of-tree libraries needed by each
server. The makefile for each server can now simply add FOO_LIBS,
FOO_SYS_LIBS plus any of the DDX-specific in-tree libraries and
combine them to form the server.

Signed-off-by: Tomas Carnecky <tom at dbservice.com>
---
 configure.ac                        |   13 +++++++------
 hw/dmx/Makefile.am                  |    2 +-
 hw/vfb/Makefile.am                  |    2 +-
 hw/xfree86/Makefile.am              |    2 +-
 hw/xnest/Makefile.am                |    2 +-
 hw/xquartz/mach-startup/Makefile.am |    2 +-
 hw/xwin/Makefile.am                 |    2 +-
 test/Makefile.am                    |    2 +-
 test/xi2/Makefile.am                |    2 +-
 9 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/configure.ac b/configure.ac
index e8873f9..786ff39 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1470,7 +1470,6 @@ PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
 XSERVER_CFLAGS="${XSERVER_CFLAGS} ${XSERVERCFLAGS_CFLAGS}"
 XSERVER_LIBS="$XKB_LIB $XI_LIB $RENDER_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $DIX_LIB $MI_LIB $OS_LIB $FIXES_LIB"
 XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
-AC_SUBST([XSERVER_SYS_LIBS])
 
 UTILS_SYS_LIBS="${SYS_LIBS}"
 AC_SUBST([UTILS_SYS_LIBS])
@@ -1506,7 +1505,7 @@ AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
 
 if test "x$XVFB" = xyes; then
 	XVFB_LIBS="$MAIN_LIB $FB_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $MIEXT_SHADOW_LIB $COMPOSITE_LIB $XSERVER_LIBS $XKB_STUB_LIB"
-	XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS"
+	XVFB_SYS_LIBS="$XVFBMODULES_LIBS $GLX_SYS_LIBS $XSERVER_SYS_LIBS"
 	AC_SUBST([XVFB_LIBS])
 	AC_SUBST([XVFB_SYS_LIBS])
 fi
@@ -1527,7 +1526,7 @@ if test "x$XNEST" = xyes; then
 		AC_MSG_ERROR([Xnest build explicitly requested, but required modules not found.])
 	fi
 	XNEST_LIBS="$MAIN_LIB $FB_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $RANDR_LIB $MIEXT_SHADOW_LIB $COMPOSITE_LIB $XSERVER_LIBS $XKB_STUB_LIB"
-	XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS"
+	XNEST_SYS_LIBS="$XNESTMODULES_LIBS $GLX_SYS_LIBS $XSERVER_SYS_LIBS"
 	AC_SUBST([XNEST_LIBS])
 	AC_SUBST([XNEST_SYS_LIBS])
 fi
@@ -1608,7 +1607,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 $GLX_SYS_LIBS"
+	XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $GLX_SYS_LIBS $XSERVER_SYS_LIBS"
 	XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
 
 	case $host_os in
@@ -1890,7 +1889,7 @@ if test "x$XWIN" = xyes; then
 			;;
 	esac
 	XWIN_LIBS="$MAIN_LIB $FB_LIB $XEXT_LIB $RANDR_LIB $DBE_LIB $RECORD_LIB $GLX_LIBS $COMPOSITE_LIB $MIEXT_SHADOW_LIB $XSERVER_LIBS $XKB_STUB_LIB"
-	XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS"
+	XWIN_SYS_LIBS="$XWIN_SYS_LIBS $XWINMODULES_LIBS $XSERVER_SYS_LIBS"
 	AC_SUBST(XWIN_LIBS)
 	AC_SUBST(XWIN_SERVER_NAME)
 	AC_SUBST(XWIN_SYS_LIBS)
@@ -1920,7 +1919,9 @@ if test "x$XQUARTZ" = xyes; then
 	AC_DEFINE(ROOTLESS,1,[Build Rootless code])
 
 	DARWIN_LIBS="$MAIN_LIB $FB_LIB $XEXT_LIB $DBE_LIB $RECORD_LIB $RANDR_LIB $MIEXT_SHADOW_LIB $XPSTUBS_LIB $XSERVER_LIBS $XKB_STUB_LIB"
+	DARWIN_SYS_LIBS="$XSERVER_SYS_LIBS -lXplugin"
 	AC_SUBST([DARWIN_LIBS])
+	AC_SUBST([DARWIN_SYS_LIBS])
 
 	AC_CHECK_LIB([Xplugin],[xp_init],[:])
 
@@ -1981,7 +1982,7 @@ if test "x$DMX" = xyes; then
 	DMX_INCLUDES="$XEXT_INC $RENDER_INC $RECORD_INC"
 	XDMX_CFLAGS="$DMXMODULES_CFLAGS"
 	XDMX_LIBS="$MAIN_LIB $FB_LIB $RECORD_LIB $MIEXT_SHADOW_LIB $XSERVER_LIBS $XEXT_LIB $XKB_STUB_LIB"
-	XDMX_SYS_LIBS="$DMXMODULES_LIBS"
+	XDMX_SYS_LIBS="$DMXMODULES_LIBS $XSERVER_SYS_LIBS"
 	AC_SUBST([XDMX_CFLAGS])
 	AC_SUBST([XDMX_LIBS])
 	AC_SUBST([XDMX_SYS_LIBS])
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
index 0d06346..6655cbf 100644
--- a/hw/dmx/Makefile.am
+++ b/hw/dmx/Makefile.am
@@ -88,7 +88,7 @@ XDMX_LIBS = \
 
 Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
 Xdmx_DEPENDENCIES= $(XDMX_LIBS)
-Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS)
+Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS)
 
 # Man page
 appmandir = $(APP_MAN_DIR)
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index c17b3df..a5b09fe 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -22,7 +22,7 @@ XVFB_LIBS = \
         @XVFB_LIBS@ \
 	libfbcmap.a
 
-Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS)
+Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS)
 Xvfb_DEPENDENCIES = $(XVFB_LIBS)
 Xvfb_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
 
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 4409bc6..ce2ed6b 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -71,7 +71,7 @@ libxorg.c xorg.c:
 DISTCLEANFILES = libxorg.c xorg.c
 
 Xorg_DEPENDENCIES = libxorg.la
-Xorg_LDADD = libxorg.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
+Xorg_LDADD = libxorg.la $(XORG_SYS_LIBS)
 
 Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
 
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index 666a0f0..077e23b 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -55,7 +55,7 @@ XNEST_LIBS = \
 Xnest_SOURCES = $(SRCS)
 
 Xnest_DEPENDENCIES = $(XNEST_LIBS)
-Xnest_LDADD = $(XNEST_LIBS) $(XNEST_SYS_LIBS) $(XSERVER_SYS_LIBS)
+Xnest_LDADD = $(XNEST_LIBS) $(XNEST_SYS_LIBS)
 Xnest_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
 
 EXTRA_DIST = icon \
diff --git a/hw/xquartz/mach-startup/Makefile.am b/hw/xquartz/mach-startup/Makefile.am
index 1a9e63a..de94f07 100644
--- a/hw/xquartz/mach-startup/Makefile.am
+++ b/hw/xquartz/mach-startup/Makefile.am
@@ -21,7 +21,7 @@ X11_bin_LDADD = \
 	$(top_builddir)/dix/dixfonts.lo \
 	$(top_builddir)/miext/rootless/librootless.la \
 	$(top_builddir)/hw/xquartz/pbproxy/libxpbproxy.la \
-	$(DARWIN_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
+	$(DARWIN_LIBS) $(DARWIN_SYS_LIBS)
 
 X11_bin_LDFLAGS =  \
 	-XCClinker -Objc \
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 6a57887..9be86c7 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -146,7 +146,7 @@ XWin_SOURCES = $(SRCS)
 INCLUDES = -I$(top_srcdir)/miext/rootless
 
 XWin_DEPENDENCIES = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_LIBS)
-XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS)
+XWin_LDADD = $(MULTIWINDOWEXTWM_LIBS) $(XWIN_GLX_LIBS) $(XWIN_GLX_LINK_FLAGS) $(XWIN_LIBS) $(XWIN_SYS_LIBS)
 XWin_LDFLAGS = -mwindows -static
 
 .rc.o:
diff --git a/test/Makefile.am b/test/Makefile.am
index 255a3da..4783bca 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -7,7 +7,7 @@ TESTS=$(check_PROGRAMS)
 
 AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
 INCLUDES = @XORG_INCS@
-TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS)
+TEST_LDADD=libxservertest.la $(XORG_SYS_LIBS) $(GLIB_LIBS)
 
 if SPECIAL_DTRACE_OBJECTS
 TEST_LDADD += $(OS_LIB) $(DIX_LIB)
diff --git a/test/xi2/Makefile.am b/test/xi2/Makefile.am
index d8dc7e9..47b53d6 100644
--- a/test/xi2/Makefile.am
+++ b/test/xi2/Makefile.am
@@ -14,7 +14,7 @@ TESTS=$(check_PROGRAMS)
 
 AM_CFLAGS = $(DIX_CFLAGS) $(GLIB_CFLAGS) @XORG_CFLAGS@
 INCLUDES = @XORG_INCS@
-TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS) $(GLIB_LIBS)
+TEST_LDADD=../libxservertest.la $(XORG_SYS_LIBS) $(GLIB_LIBS)
 COMMON_SOURCES=protocol-common.h protocol-common.c
 
 if SPECIAL_DTRACE_OBJECTS
-- 
1.7.2.1.g43c6fa



More information about the xorg-devel mailing list