summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-08-31 12:24:07 -0700
committerEric Anholt <eric@anholt.net>2007-08-31 13:09:45 -0700
commita02db0d500cac20d0f0f107d27c064a175018421 (patch)
tree2530044e3e5c99afa615b464c52c8a0e1219a3d9
parent3f42af8c0ef1e5379bc836f589e0cbee43c02ac5 (diff)
Convert servers to using _DEPENDENCIES to ensure proper rebuilds.
This cleans up server Makefile.ams a little bit, but also means that people messing with configure.ac need to be careful with whether they put libraries in the _LIBS or _SYS_LIBS targets. Hopefully the comment in configure.ac will clarify the issues.
-rw-r--r--configure.ac184
-rw-r--r--hw/darwin/Makefile.am77
-rw-r--r--hw/dmx/Makefile.am15
-rw-r--r--hw/vfb/Makefile.am13
-rw-r--r--hw/xfree86/Makefile.am11
-rw-r--r--hw/xgl/Makefile.am12
-rw-r--r--hw/xgl/egl/Makefile.am23
-rw-r--r--hw/xnest/Makefile.am11
-rw-r--r--hw/xwin/Makefile.am10
9 files changed, 186 insertions, 170 deletions
diff --git a/configure.ac b/configure.ac
index 1f3743fc2..cad85a91d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -166,6 +166,9 @@ b = bswap16(a);
fi
fi
+AC_CHECK_FUNC([dlopen], [],
+ AC_CHECK_LIB([dl], [dlopen], DLOPEN_LIBS="-ldl"))
+
dnl Checks for library functions.
AC_FUNC_VPRINTF
AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr \
@@ -624,13 +627,9 @@ XEXT_INC='-I$(top_srcdir)/Xext'
XEXT_LIB='$(top_builddir)/Xext/libXext.la'
XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
-PIXMAN="[pixman-1 >= 0.9.5]"
-PKG_CHECK_MODULES(PIXMAN, $PIXMAN)
-AC_SUBST(PIXMAN_CFLAGS)
-
dnl Core modules for most extensions, et al.
REQUIRED_MODULES="[randrproto >= 1.2] renderproto [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto xextproto [xproto >= 7.0.9] xtrans [scrnsaverproto >= 1.1] bigreqsproto resourceproto fontsproto [inputproto >= 1.4.2] [kbproto >= 1.0.3]"
-REQUIRED_LIBS="xfont xau fontenc $PIXMAN"
+REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.9.5]"
dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
dnl CONFIG_DBUS_API is true if we want to enable the D-Bus config
@@ -674,6 +673,49 @@ if test "x$NEED_DBUS" = xyes; then
fi
CONFIG_LIB='$(top_builddir)/config/libconfig.a'
+AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes],
+ [AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt],
+ [have_clock_gettime=no])])
+
+AC_MSG_CHECKING([for a useful monotonic clock ...])
+
+if ! test "x$have_clock_gettime" = xno; then
+ if ! test "x$have_clock_gettime" = xyes; then
+ CLOCK_LIBS="$have_clock_gettime"
+ else
+ CLOCK_LIBS=""
+ fi
+
+ LIBS_SAVE="$LIBS"
+ LIBS="$CLOCK_LIBS"
+
+ AC_RUN_IFELSE([
+#define _POSIX_C_SOURCE 199309L
+#include <time.h>
+
+int main(int argc, char *argv[[]]) {
+ struct timespec tp;
+
+ if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
+ return 0;
+ else
+ return 1;
+}
+ ], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
+ [MONOTONIC_CLOCK="cross compiling"])
+
+ LIBS="$LIBS_SAVE"
+else
+ MONOTONIC_CLOCK=no
+fi
+
+AC_MSG_RESULT([$MONOTONIC_CLOCK])
+
+if test "x$MONOTONIC_CLOCK" = xyes; then
+ AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()])
+ LIBS="$LIBS $CLOCK_LIBS"
+fi
+
AM_CONDITIONAL(XV, [test "x$XV" = xyes])
if test "x$XV" = xyes; then
AC_DEFINE(XV, 1, [Support Xv extension])
@@ -759,7 +801,7 @@ AM_CONDITIONAL(AIGLX, test "x$AIGLX" = xyes)
if test "x$GLX_USE_TLS" = xyes -a "x$AIGLX" = xyes; then
GLX_DEFINES="-DGLX_USE_TLS -DPTHREADS"
- GLX_LIBS="$GLX_LIBS -lpthread"
+ GLX_SYS_LIBS="$GLX_SYS_LIBS -lpthread"
fi
AC_SUBST([GLX_DEFINES])
@@ -1036,9 +1078,26 @@ CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/include'
PKG_CHECK_MODULES([XSERVERCFLAGS], [$REQUIRED_MODULES $REQUIRED_LIBS])
PKG_CHECK_MODULES([XSERVERLIBS], [$REQUIRED_LIBS])
+# Autotools has some unfortunate issues with library handling. In order to
+# get a server to rebuild when a dependency in the tree is changed, it must
+# be listed in SERVERNAME_DEPENDENCIES. However, no system libraries may be
+# listed there, or some versions of autotols will break (especially if a -L
+# is required to find the library). So, we keep two sets of libraries
+# detected: NAMESPACE_LIBS for in-tree libraries to be linked against, which
+# will go into the _DEPENDENCIES and _LDADD of the server, and
+# NAMESPACE_SYS_LIBS which will go into only the _LDADD. The
+# NAMESPACEMODULES_LIBS detected from pkgconfig should always go in
+# NAMESPACE_SYS_LIBS.
+#
+# XSERVER_LIBS is the set of in-tree libraries which all servers require.
+# XSERVER_SYS_LIBS is the set of out-of-tree libraries which all servers
+# require.
+#
XSERVER_CFLAGS="${XSERVERCFLAGS_CFLAGS}"
-XSERVER_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
-AC_SUBST([SYS_LIBS])
+XSERVER_LIBS="$DIX_LIB $CONFIG_LIB $MI_LIB $OS_LIB"
+XSERVER_SYS_LIBS="${XSERVERLIBS_LIBS} ${SYS_LIBS} ${LIBS}"
+AC_SUBST([XSERVER_LIBS])
+AC_SUBST([XSERVER_SYS_LIBS])
# The Xorg binary needs to export symbols so that they can be used from modules
# Some platforms require extra flags to do this. gcc should set these flags
@@ -1066,50 +1125,6 @@ case $host_os in
esac
AC_SUBST([LD_EXPORT_SYMBOLS_FLAG])
-AC_CHECK_FUNCS([clock_gettime], [have_clock_gettime=yes],
- [AC_CHECK_LIB([rt], [clock_gettime], [have_clock_gettime=-lrt],
- [have_clock_gettime=no])])
-
-AC_MSG_CHECKING([for a useful monotonic clock ...])
-
-if ! test "x$have_clock_gettime" = xno; then
- if ! test "x$have_clock_gettime" = xyes; then
- CLOCK_LIBS="$have_clock_gettime"
- else
- CLOCK_LIBS=""
- fi
-
- LIBS_SAVE="$LIBS"
- LIBS="$CLOCK_LIBS"
-
- AC_RUN_IFELSE([
-#define _POSIX_C_SOURCE 199309L
-#include <time.h>
-
-int main(int argc, char *argv[[]]) {
- struct timespec tp;
-
- if (clock_gettime(CLOCK_MONOTONIC, &tp) == 0)
- return 0;
- else
- return 1;
-}
- ], [MONOTONIC_CLOCK=yes], [MONOTONIC_CLOCK=no],
- [MONOTONIC_CLOCK="cross compiling"])
-
- LIBS="$LIBS_SAVE"
-else
- MONOTONIC_CLOCK=no
-fi
-
-AC_MSG_RESULT([$MONOTONIC_CLOCK])
-
-if test "x$MONOTONIC_CLOCK" = xyes; then
- AC_DEFINE(MONOTONIC_CLOCK, 1, [Have monotonic clock from clock_gettime()])
- XSERVER_LIBS="$XSERVER_LIBS $CLOCK_LIBS"
- LIBS="$LIBS $CLOCK_LIBS"
-fi
-
dnl Imake defines SVR4 on SVR4 systems, and many files check for it, so
dnl we need to replicate that here until those can all be fixed
AC_MSG_CHECKING([if SVR4 needs to be defined])
@@ -1136,8 +1151,6 @@ AH_VERBATIM([X_BYTE_ORDER],[
#endif
])
-AC_SUBST([XSERVER_LIBS])
-
dnl ---------------------------------------------------------------------------
dnl DDX section.
dnl ---------------------------------------------------------------------------
@@ -1145,7 +1158,7 @@ dnl ---------------------------------------------------------------------------
dnl DMX DDX
AC_MSG_CHECKING([whether to build Xdmx DDX])
-PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES $PIXMAN], [have_dmx=yes], [have_dmx=no])
+PKG_CHECK_MODULES([DMXMODULES], [xmuu xext x11 xrender xfixes xfont xi dmxproto xau $XDMCP_MODULES], [have_dmx=yes], [have_dmx=no])
if test "x$DMX" = xauto; then
DMX="$have_dmx"
fi
@@ -1158,8 +1171,12 @@ if test "x$DMX" = xyes; then
modules not found.])
fi
DMX_INCLUDES="$XEXT_INC $RENDER_INC $XTRAP_INC $RECORD_INC"
- XDMX_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $OS_LIB $CWRAP_LIB"
+ XDMX_CFLAGS="$DMXMODULES_CFLAGS"
+ XDMX_LIBS="$FB_LIB $XEXT_LIB $CONFIG_LIB $RENDER_LIB $XTRAP_LIB $RECORD_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $CWRAP_LIB"
+ XDMX_SYS_LIBS="$DMXMODULES_LIBS"
+ AC_SUBST([XDMX_CFLAGS])
AC_SUBST([XDMX_LIBS])
+ AC_SUBST([XDMX_SYS_LIBS])
dnl USB sources in DMX require <linux/input.h>
AC_CHECK_HEADER([linux/input.h], DMX_BUILD_USB="yes",
@@ -1197,8 +1214,10 @@ AC_MSG_RESULT([$XVFB])
AM_CONDITIONAL(XVFB, [test "x$XVFB" = xyes])
if test "x$XVFB" = xyes; then
- XVFB_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS"
+ XVFB_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB"
+ XVFB_SYS_LIBS="$XVFBMODULES_LIBS"
AC_SUBST([XVFB_LIBS])
+ AC_SUBST([XVFB_SYS_LIBS])
fi
@@ -1213,8 +1232,10 @@ AC_MSG_RESULT([$XNEST])
AM_CONDITIONAL(XNEST, [test "x$XNEST" = xyes])
if test "x$XNEST" = xyes; then
- XNEST_LIBS="$MI_LIB $CONFIG_LIB $XSERVER_LIBS $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB $LIBS"
+ XNEST_LIBS="$CONFIG_LIB $FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $CWRAP_LIB"
+ XNEST_SYS_LIBS="$XNESTMODULES_LIBS"
AC_SUBST([XNEST_LIBS])
+ AC_SUBST([XNEST_SYS_LIBS])
fi
@@ -1235,14 +1256,15 @@ AC_MSG_CHECKING([whether to build Xgl DDX])
if test "x$XGL" != xno; then
PKG_CHECK_MODULES([XGLMODULES], [glitz-glx >= 0.4.3], [XGL=yes], [XGL=no])
AC_SUBST(XGLMODULES_CFLAGS)
- AC_SUBST(XGLMODULES_LIBS)
fi
AC_MSG_RESULT([$XGL])
AM_CONDITIONAL(XGL, [test "x$XGL" = xyes])
if test "x$XGL" = xyes; then
- XGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
+ XGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB"
+ XGL_SYS_LIBS="$XGLMODULES_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
AC_SUBST([XGL_LIBS])
+ AC_SUBST([XGL_SYS_LIBS])
AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules])
xglmoduledir="$moduledir/xgl"
@@ -1256,14 +1278,15 @@ AC_MSG_CHECKING([whether to build Xegl DDX])
if test "x$XEGL" != xno; then
PKG_CHECK_MODULES([XGLMODULES], [glitz-glx >= 0.4.3], [XEGL=yes], [XEGL=no])
AC_SUBST(XEGLMODULES_CFLAGS)
- AC_SUBST(XEGLMODULES_LIBS)
fi
AC_MSG_RESULT([$XEGL])
AM_CONDITIONAL(XEGL, [test "x$XEGL" = xyes])
if test "x$XEGL" = xyes; then
- XEGL_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
+ XEGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB"
+ XEGL_SYS_LIBS = "$XEGL_SYS_LIBS $XEGLMODULES_LIBS $GLX_SYS_LIBS"
AC_SUBST([XEGL_LIBS])
+ AC_SUBST([XEGL_SYS_LIBS])
fi
dnl Xglx DDX
@@ -1272,20 +1295,17 @@ AC_MSG_CHECKING([whether to build Xglx DDX])
if test "x$XGLX" != xno; then
PKG_CHECK_MODULES([XGLXMODULES], [glitz-glx >= 0.4.3 xrender], [XGLX=yes], [XGLX=no])
AC_SUBST(XGLXMODULES_CFLAGS)
- AC_SUBST(XGLXMODULES_LIBS)
fi
AC_MSG_RESULT([$XGLX])
AM_CONDITIONAL(XGLX, [test "x$XGLX" = xyes])
if test "x$XGLX" = xyes; then
- XGLX_LIBS="$FB_LIB $MI_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
+ XGLX_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $MIEXT_LAYER_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $XPSTUBS_LIB $CWRAP_LIB"
+ XGLX_SYS_LIBS="$XGLX_SYS_LIBS $XGLXMODULES_LIBS $GLX_SYS_LIBS"
AC_SUBST([XGLX_LIBS])
+ AC_SUBST([XGLX_SYS_LIBS])
fi
-# XORG_CORE_LIBS is needed even if you're not building the Xorg DDX
-XORG_CORE_LIBS="$DIX_LIB $CONFIG_LIB"
-AC_SUBST([XORG_CORE_LIBS])
-
xorg_bus_linuxpci=no
xorg_bus_bsdpci=no
xorg_bus_ix86pci=no
@@ -1298,15 +1318,13 @@ if test "x$XORG" = xyes -o "x$XGL" = xyes; then
XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
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"
+ XORG_LIBS="$COMPOSITE_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"
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"))
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
- XSERVER_LIBS="$XSERVER_LIBS $PCIACCESS_LIBS"
+ XORG_SYS_LIBS="$XORG_SYS_LIBS $PCIACCESS_LIBS $DLOPEN_LIBS $GLX_SYS_LIBS"
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
case $host_os in
@@ -1345,7 +1363,7 @@ return 0;}
# LDFLAGS=$save_LDFLAGS
# ])
xorg_cv_AGL_framework=no
- DARWIN_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
+ DARWIN_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"
AC_SUBST([DARWIN_LIBS])
AC_CHECK_LIB([Xplugin],[xp_init],[:])
AC_SUBST([APPLE_APPLICATIONS_DIR])
@@ -1538,10 +1556,11 @@ return 0;}
if test -n "$XORG_MODULES"; then
PKG_CHECK_MODULES(XORG_MODULES, [$XORG_MODULES])
XORG_CFLAGS="$XORG_CFLAGS $XORG_MODULES_CFLAGS"
- XORG_LIBS="$XORG_LIBS $XORG_MODULES_LIBS"
+ XORG_SYS_LIBS="$XORG_SYS_LIBS $XORG_MODULES_LIBS"
fi
AC_SUBST([XORG_LIBS])
+ AC_SUBST([XORG_SYS_LIBS])
AC_SUBST([XORG_INCS])
AC_SUBST([XORG_OS])
AC_SUBST([XORG_OS_SUBDIR])
@@ -1623,9 +1642,9 @@ AC_MSG_CHECKING([whether to build Xprint DDX])
AC_MSG_RESULT([$XPRINT])
if test "x$XPRINT" = xyes; then
- PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau $PIXMAN])
+ PKG_CHECK_MODULES([XPRINT], [printproto x11 xfont $XDMCP_MODULES xau])
XPRINT_EXTENSIONS="$XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $RENDER_LIB $COMPOSITE_LIB $RANDR_LIB $XI_LIB $FIXES_LIB $DAMAGE_LIB $XI_LIB $GLX_LIBS"
- XPRINT_LIBS="$DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MI_LIB $MIEXT_DAMAGE_LIB $CWRAP_LIB $OS_LIB $LIBS $XPRINT_LIBS"
+ XPRINT_LIBS="$DIX_LIB $XKB_LIB $XKB_STUB_LIB $XPRINT_EXTENSIONS $MIEXT_DAMAGE_LIB $CWRAP_LIB $XPRINT_LIBS"
AC_SUBST([XPRINT_CFLAGS])
AC_SUBST([XPRINT_LIBS])
@@ -1680,7 +1699,7 @@ if test "x$XWIN" = xauto; then
mingw*) XWIN="yes" ;;
*) XWIN="no" ;;
esac
- XWIN_LIBS="$FB_LIB $MI_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $OS_LIB $SHADOW_LIB"
+ XWIN_LIBS="$FB_LIB $XEXT_LIB $CONFIG_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $XPSTUBS_LIB $SHADOW_LIB"
AC_SUBST([XWIN_LIBS])
fi
AC_MSG_RESULT([$XWIN])
@@ -1699,11 +1718,12 @@ if test "x$XWIN" = xyes; then
XWIN_SERVER_NAME=Xming
AC_DEFINE(RELOCATE_PROJECTROOT,1,[Make PROJECT_ROOT relative to the xserver location])
AC_DEFINE(HAS_WINSOCK,1,[Use Windows sockets])
- XWIN_SYSTEM_LIBS=-lwinsock2
+ XWIN_SYS_LIBS=-lwinsock2
;;
esac
+ XWIN_SYS_LIBS="$XWIN_SYS_LIBS $(XWINMODULES_LIBS)"
AC_SUBST(XWIN_SERVER_NAME)
- AC_SUBST(XWIN_SYSTEM_LIBS)
+ AC_SUBST(XWIN_SYS_LIBS)
if test "x$DEBUGGING" = xyes; then
AC_DEFINE(CYGDEBUG, 1, [Simple debug messages])
@@ -1810,7 +1830,7 @@ if test "$KDRIVE" = yes; then
if test x"$XSDL" = xyes; then
# PKG_CHECK_MODULES(XSDL_EXTRA, Xfont xau $XDMCP_MODULES)
AC_DEFINE(XSDLSERVER,1,[Build Xsdl server])
- XSDL_LIBS="`sdl-config --libs` $XSERVER_LIBS"
+ XSDL_LIBS="`sdl-config --libs`"
XSDL_INCS="`sdl-config --cflags` $XSERVER_CFLAGS"
fi
@@ -1839,7 +1859,7 @@ if test "$KDRIVE" = yes; then
KDRIVE_CFLAGS="$XSERVER_CFLAGS -DHAVE_KDRIVE_CONFIG_H $TSLIB_CFLAGS"
- KDRIVE_PURE_LIBS="$FB_LIB $MI_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB $OS_LIB"
+ KDRIVE_PURE_LIBS="$FB_LIB $FIXES_LIB $XEXT_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $GLX_LIBS $RENDER_LIB $RANDR_LIB $DAMAGE_LIB $MIEXT_DAMAGE_LIB $MIEXT_SHADOW_LIB $XI_LIB $XKB_LIB $XKB_STUB_LIB $COMPOSITE_LIB $XPSTUBS_LIB"
KDRIVE_LIB='$(top_builddir)/hw/kdrive/src/libkdrive.a'
case $host_os in
*linux*)
@@ -1924,7 +1944,7 @@ AC_ARG_ENABLE(xorgcfg, AS_HELP_STRING([--enable-xorgcfg],
if test x$XORGCFG = xyes ; then
PKG_CHECK_MODULES([XORGCFG_DEP],
[xkbui >= 1.0.2 xkbfile xxf86misc xxf86vm xaw7 xmu xt xpm xext x11])
- XORGCFG_DEP_CFLAGS="$XORGCFG_DEP_CFLAGS $PIXMAN_CFLAGS"
+ XORGCFG_DEP_CFLAGS="$XORGCFG_DEP_CFLAGS"
AC_CHECK_LIB([curses],[waddstr],
[XORGCFG_DEP_LIBS="$XORGCFG_DEP_LIBS -lcurses"; CURSES=yes],
AC_CHECK_LIB([ncurses],[waddstr],
diff --git a/hw/darwin/Makefile.am b/hw/darwin/Makefile.am
index b773910fc..00811e746 100644
--- a/hw/darwin/Makefile.am
+++ b/hw/darwin/Makefile.am
@@ -56,34 +56,29 @@ Xquartz_SOURCES = \
quartz/xpr/x-hook.c \
quartz/xpr/x-list.c
-XDarwin_LDADD = \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/dix/libdix.la \
- $(top_builddir)/config/libconfig.a \
- ./libdarwinShared.a \
- ./iokit/libiokit.a \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/miext/cw/libcw.la \
- $(DARWIN_LIBS) \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- @XORG_LIBS@ \
- $(XSERVER_LIBS)
-
-Xquartz_LDADD = \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/dix/libdix.la \
- $(top_builddir)/config/libconfig.a \
- ./libdarwinShared.a \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/miext/cw/libcw.la \
- $(DARWIN_LIBS) \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- @XORG_LIBS@ \
- $(XSERVER_LIBS) -lXplugin
+DARWIN_LIBS = \
+ $(top_builddir)/dix/dixfonts.lo \
+ $(top_builddir)/config/libconfig.a \
+ $(top_builddir)/miext/shadow/libshadow.la \
+ $(top_builddir)/miext/cw/libcw.la \
+ @DARWIN_LIBS@ \
+ $(top_builddir)/miext/rootless/librootless.la \
+ $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
+ $(top_builddir)/miext/rootless/accel/librlAccel.la \
+ ./libdarwinShared.a \
+ $(XSERVER_LIBS)
+
+XDARWIN_LIBS = \
+ $(DARWIN_LIBS) \
+ ./iokit/libiokit.a
+XQUARTZ_LIBS = \
+ $(DARWIN_LIBS)
+
+XDarwin_DEPENDENCIES = $(XDARWIN_LIBS)
+XDarwin_LDADD = $(XDARWIN_LIBS) $(XSERVER_SYS_LIBS)
+
+Xquartz_DEPENDENCIES = $(XQUARTZ_LIBS)
+Xquartz_LDADD = $(XQUARTZ_LIBS) $(XSERVER_SYS_LIBS) -lXplugin
XDarwin_LDFLAGS = \
-XCClinker -Objc \
@@ -118,22 +113,16 @@ XDarwinApp_SOURCES = \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xi/stubs.c
-XDarwinApp_LDADD = \
- $(top_builddir)/dix/dixfonts.lo \
- $(top_builddir)/dix/libdix.la \
- $(top_builddir)/config/libconfig.a \
- $(top_builddir)/os/libos.la \
- ./quartz/XApplication.o \
- ./libdarwinShared.a \
- ./quartz/libXQuartz.a \
- $(top_builddir)/miext/shadow/libshadow.la \
- $(top_builddir)/miext/cw/libcw.la \
- $(DARWIN_LIBS) \
- $(top_builddir)/miext/rootless/librootless.la \
- $(top_builddir)/miext/rootless/safeAlpha/libsafeAlpha.la \
- $(top_builddir)/miext/rootless/accel/librlAccel.la \
- @XORG_LIBS@ \
- $(XSERVER_LIBS)
+XDARWINAPP_LIBS = \
+ $(DARWIN_LIBS) \
+ $(top_builddir)/dix/dixfonts.lo \
+ ./quartz/XApplication.o \
+ ./libdarwinShared.a \
+ ./quartz/libXQuartz.a \
+ $(XSERVER_LIBS)
+
+XDarwinApp_DEPENDENCIES = $(XDARWINAPP_LIBS)
+XDarwinApp_LDADD = $(XDARWINAPP_LIBS) $(XSERVER_SYS_LIBS)
XDarwinApp_LDFLAGS = \
-XCClinker -Objc \
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
index 002ea112a..8457aea60 100644
--- a/hw/dmx/Makefile.am
+++ b/hw/dmx/Makefile.am
@@ -81,13 +81,16 @@ Xdmx_SOURCES = dmx.c \
#Xdmx_SOURCES += fakecw.c
#endif
+XDMX_LIBS = \
+ @XDMX_LIBS@ \
+ $(GLX_LIBS) \
+ input/libdmxinput.a \
+ config/libdmxconfig.a \
+ $(XSERVER_LIBS)
+
Xdmx_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
-Xdmx_LDADD = $(XORG_CORE_LIBS) \
- $(XDMX_LIBS) \
- $(GLX_LIBS) \
- input/libdmxinput.a \
- config/libdmxconfig.a \
- @DMXMODULES_LIBS@
+Xdmx_DEPENDENCIES= $(XDMX_LIBS)
+Xdmx_LDADD = $(XDMX_LIBS) $(XDMX_SYS_LIBS) $(XSERVER_SYS_LIBS)
# Man page
appmandir = $(APP_MAN_DIR)
diff --git a/hw/vfb/Makefile.am b/hw/vfb/Makefile.am
index 6842b45a5..9ceecccc0 100644
--- a/hw/vfb/Makefile.am
+++ b/hw/vfb/Makefile.am
@@ -19,12 +19,13 @@ libfbcmap_a_SOURCES = $(top_srcdir)/fb/fbcmap_mi.c
Xvfb_SOURCES = $(SRCS)
-Xvfb_LDADD = $(XORG_CORE_LIBS) \
- $(XVFB_LIBS) \
- $(XSERVER_LIBS) \
- $(EXTENSION_LIBS) \
- $(XVFBMODULES_LIBS) \
- libfbcmap.a
+XVFB_LIBS = \
+ @XVFB_LIBS@ \
+ libfbcmap.a \
+ $(XSERVER_LIBS)
+
+Xvfb_LDADD = $(XVFB_LIBS) $(XVFB_SYS_LIBS) $(XSERVER_SYS_LIBS)
+Xvfb_DEPENDENCIES = $(XVFB_LIBS)
# Man page
include $(top_srcdir)/cpprules.in
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 3ba6adc16..511e224d3 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -48,7 +48,7 @@ osandcommon.c xorg.c:
DISTCLEANFILES = osandcommon.c xorg.c
XORG_LIBS = \
- @XORG_CORE_LIBS@ \
+ $(XSERVER_LIBS \
common/libinit.a \
loader/libloader.a \
libosandcommon.la \
@@ -59,14 +59,11 @@ XORG_LIBS = \
ramdac/libramdac.a \
ddc/libddc.a \
i2c/libi2c.a \
+ dixmods/libxorgxkb.la \
@XORG_LIBS@
-Xorg_DEPENDENCIES = \
- $(XORG_LIBS)
-
-Xorg_LDADD = $(XORG_LIBS) \
- @XSERVER_LIBS@ \
- dixmods/libxorgxkb.la
+Xorg_DEPENDENCIES = $(XORG_LIBS)
+Xorg_LDADD = $(XORG_LIBS) $(XORG_SYS_LIBS) $(XSERVER_SYS_LIBS)
Xorg_LDFLAGS = $(LD_EXPORT_SYMBOLS_FLAG)
diff --git a/hw/xgl/Makefile.am b/hw/xgl/Makefile.am
index 81484b99a..ef9fc0ea9 100644
--- a/hw/xgl/Makefile.am
+++ b/hw/xgl/Makefile.am
@@ -70,12 +70,14 @@ Xgl_SOURCES = \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
$(top_srcdir)/fb/fbcmap.c
-Xgl_LDADD = \
+
+XGL_LIBS = \
libxgl.a \
- $(XORG_CORE_LIBS) \
- $(XGL_LIBS) \
- $(XSERVER_LIBS) \
- $(EXTENSION_LIBS) -lglitz -ldl
+ @XGL_LIBS@ \
+ $(XSERVER_LIBS)
+
+Xgl_DEPENDENCIES = $(XGL_LIBS)
+Xgl_LDADD = $(XGL_LIBS) $(XSERVER_SYS_LIBS) $(XGL_SYS_LIBS)
Xgl_programs = Xgl
bin_PROGRAMS = $(Xgl_programs)
diff --git a/hw/xgl/egl/Makefile.am b/hw/xgl/egl/Makefile.am
index 5136e58b1..8c4e9af75 100644
--- a/hw/xgl/egl/Makefile.am
+++ b/hw/xgl/egl/Makefile.am
@@ -24,7 +24,12 @@ libxegl_la_SOURCES = \
kinput.c \
evdev.c
-Xegl_DEPENDENCIES = @XEGL_LIBS@
+XEGL_LIBS = \
+ @XEGL_LIBS@ \
+ libxegl.la \
+ ../libxgl.a \
+ $XSERVER_LIBS
+
Xegl_LDFLAGS = -export-dynamic
Xegl_SOURCES = \
xeglinit.c \
@@ -32,14 +37,8 @@ Xegl_SOURCES = \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
$(top_srcdir)/fb/fbcmap.c
-Xegl_LDADD = \
- libxegl.la \
- ../libxgl.a \
- $(XORG_CORE_LIBS) \
- $(XEGL_LIBS) \
- $(XSERVER_LIBS) \
- $(EXTENSION_LIBS) \
- $(XGLXMODULES_LIBS)
-Xegl_programs = Xegl
-
-bin_PROGRAMS = $(Xegl_programs)
+
+Xegl_DEPENDENCIES = $(XEGL_LIBS)
+Xegl_LDADD = $(XEGL_LIBS) $(XSERVER_SYS_LIBS) $(XEGL_SYS_LIBS)
+
+bin_PROGRAMS = Xegl
diff --git a/hw/xnest/Makefile.am b/hw/xnest/Makefile.am
index 99dba60bd..92f840c97 100644
--- a/hw/xnest/Makefile.am
+++ b/hw/xnest/Makefile.am
@@ -48,12 +48,15 @@ SRCS = Args.c \
libfbcmap_a_SOURCES = $(top_srcdir)/fb/fbcmap_mi.c
libfbcmap_a_CFLAGS = $(AM_CFLAGS)
+XNEST_LIBS = \
+ @XNEST_LIBS@ \
+ libfbcmap.a \
+ $(XSERVER_LIBS)
+
Xnest_SOURCES = $(SRCS)
-Xnest_LDADD = $(XORG_CORE_LIBS) \
- $(XNEST_LIBS) \
- $(XNESTMODULES_LIBS) \
- libfbcmap.a
+Xnest_DEPENDENCIES = $(XNEST_LIBS)
+Xnest_LDADD = $(XNEST_LIBS) $(XNEST_SYS_LIBS) $(XSERVER_SYS_LIBS)
EXTRA_DIST = icon \
screensaver \
diff --git a/hw/xwin/Makefile.am b/hw/xwin/Makefile.am
index 57e20102e..8aaed8c21 100644
--- a/hw/xwin/Makefile.am
+++ b/hw/xwin/Makefile.am
@@ -146,10 +146,12 @@ XWin_SOURCES = $(SRCS)
INCLUDES = -I$(top_srcdir)/miext/rootless \
-I$(top_srcdir)/miext/rootless/safeAlpha
-XWin_LDADD = $(XORG_CORE_LIBS) \
- $(top_builddir)/fb/libfb.la \
- $(XWIN_LIBS) \
- $(XWINMODULES_LIBS)
+XWIN_LIBS = \
+ $(top_builddir)/fb/libfb.la \
+ $(XSERVER_LIBS)
+
+XWin_DEPENDENCIES = $(XWIN_LIBS)
+XWin_LDADD = $(XWIN_LIBS) $(XSERVER_SYS_LIBS) $(XWIN_SYS_LIBS)
XWin_LDFLAGS = -mwindows -static