Initial commit of XGL build infrastructure and XGL code changes for

building within the xorg server tree. Requires additional, uncommitted
    dix changes to successfully build, and successful running is still yet
    to happen.
This commit is contained in:
Eric Anholt 2005-12-28 10:31:46 +00:00
parent 36061c75ae
commit b1b40ed6a8
18 changed files with 187 additions and 88 deletions

View File

@ -39,6 +39,8 @@ AC_CONFIG_HEADERS(include/xorg-server.h)
dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just
dnl dix/).
AC_CONFIG_HEADERS(include/dix-config.h)
dnl xgl-config.h covers the Xgl DDX.
AC_CONFIG_HEADERS(include/xgl-config.h)
dnl xorg-config.h covers the Xorg DDX.
AC_CONFIG_HEADERS(include/xorg-config.h)
dnl xkb-config.h covers XKB for the Xorg and Xnest DDXs.
@ -400,6 +402,9 @@ AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server
AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
AC_ARG_ENABLE(xprint, AS_HELP_STRING([--enable-xprint], [Build Xprint extension and server (default: auto)]), [XPRINT=$enableval], [XPRINT=auto])
AC_ARG_ENABLE(xgl, AS_HELP_STRING([--enable-xgl], [Build Xgl server (default: no)]), [XGL=$enableval], [XGL=no])
AC_ARG_ENABLE(xglx, AS_HELP_STRING([--enable-xglx], [Build Xglx xgl module (default: no)]), [XGLX=$enableval], [XGLX=no])
AC_ARG_ENABLE(xegl, AS_HELP_STRING([--enable-xegl], [Build Xegl xgl module (default: no)]), [XEGL=$enableval], [XEGL=no])
# kdrive and its subsystems
AC_ARG_ENABLE(kdrive, AS_HELP_STRING([--enable-kdrive], [Build kdrive servers (default: no)]), [KDRIVE=$enableval], [KDRIVE=no])
AC_ARG_ENABLE(xephyr, AS_HELP_STRING([--enable-xephyr], [Build the kdrive Xephyr server (default: auto)]), [XEPHYR=$enableval], [XEPHYR=auto])
@ -901,6 +906,59 @@ if test "x$XORG" = xauto; then
fi
AC_MSG_RESULT([$XORG])
dnl Xgl DDX
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 $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 $LBX_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
AC_SUBST([XGL_LIBS])
AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules])
xglmoduledir="$moduledir/xgl"
AC_SUBST([xglmoduledir])
AC_DEFINE_DIR(XGL_MODULE_PATH, xglmoduledir, [Default XGL module search path])
fi
dnl Xegl DDX
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 $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 $LBX_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
AC_SUBST([XEGL_LIBS])
fi
dnl Xglx DDX
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 $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 $LBX_LIB $XPSTUBS_LIB $CWRAP_LIB $OS_LIB"
AC_SUBST([XGLX_LIBS])
fi
# XORG_CORE_LIBS is needed even if you're not building the Xorg DDX
XORG_CORE_LIBS="$DIX_LIB"
AC_SUBST([XORG_CORE_LIBS])
@ -1542,6 +1600,13 @@ hw/dmx/input/Makefile
hw/dmx/glxProxy/Makefile
hw/dmx/Makefile
hw/vfb/Makefile
hw/xgl/Makefile
hw/xgl/egl/Makefile
hw/xgl/egl/module/Makefile
hw/xgl/glx/Makefile
hw/xgl/glx/module/Makefile
hw/xgl/glxext/Makefile
hw/xgl/glxext/module/Makefile
hw/xnest/Makefile
hw/xwin/Makefile
hw/darwin/Makefile

View File

@ -18,6 +18,10 @@ if XWIN
XWIN_SUBDIRS = xwin
endif
if XGL
XGL_SUBDIRS = xgl
endif
if KDRIVE
KDRIVE_SUBDIRS = kdrive
endif
@ -26,6 +30,7 @@ endif
SUBDIRS = \
$(XORG_SUBDIRS) \
$(XGL_SUBDIRS) \
$(XWIN_SUBDIRS) \
$(XVFB_SUBDIRS) \
$(XNEST_SUBDIRS) \

View File

@ -16,11 +16,9 @@ SUBDIRS = \
$(XGLX_SUBDIRS) \
$(XEGL_SUBDIRS)
INCLUDES = \
@XGL_INCS@ \
@XSERVER_CFLAGS@ \
@XGLSERVER_CFLAGS@ \
-DMODULEPATH=\"@MODULEPATH@\"
AM_CFLAGS = \
@SERVER_DEFINES@ \
$(XGLMODULES_CFLAGS)
noinst_LIBRARIES = libxgl.a
@ -52,15 +50,20 @@ libxgl_a_SOURCES = \
xglloader.c \
xglglx.c
if XGLSERVER
Xgl_DEPENDENCIES = @XGL_LIBS@
Xgl_LDFLAGS = -export-dynamic
Xgl_SOURCES = xglinit.c
Xgl_SOURCES = \
xglinit.c \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
$(top_srcdir)/fb/fbcmap.c
Xgl_LDADD = \
@XGL_LIBS@ \
@XSERVER_LIBS@ \
@XGLSERVER_LIBS@
libxgl.a \
$(XORG_CORE_LIBS) \
$(XGL_LIBS) \
$(XSERVER_LIBS) \
$(EXTENSION_LIBS) \
$(XGLMODULES_LIBS)
Xgl_programs = Xgl
endif
bin_PROGRAMS = $(Xgl_programs)

View File

@ -1,16 +1,14 @@
if XGLSERVER
MODULE_SUBDIRS = module
if XGL
XGL_MODULE_DIRS = module
endif
SUBDIRS = \
. \
$(MODULE_SUBDIRS)
$(XGL_MODULE_DIRS)
INCLUDES = \
@XEGL_INCS@ \
@XSERVER_CFLAGS@ \
@XGLSERVER_CFLAGS@ \
@XEGLSERVER_CFLAGS@
AM_CFLAGS = \
@SERVER_DEFINES@ \
$(XEGLMODULES_CFLAGS)
noinst_LTLIBRARIES = libxegl.la
@ -22,16 +20,22 @@ libxegl_la_SOURCES = \
kinput.c \
evdev.c
if XEGLSERVER
Xegl_DEPENDENCIES = @XEGL_LIBS@
Xegl_LDFLAGS = -export-dynamic
Xegl_SOURCES = xeglinit.c
Xegl_SOURCES = \
xglxinit.c \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
$(top_srcdir)/fb/fbcmap.c
Xegl_LDADD = \
@XEGL_LIBS@ \
@XSERVER_LIBS@ \
@XGLSERVER_LIBS@ \
@XEGLSERVER_LIBS@
libxegl.la \
../libxgl.a \
$(XORG_CORE_LIBS) \
$(XEGL_LIBS) \
$(XSERVER_LIBS) \
$(EXTENSION_LIBS) \
$(XGLXMODULES_LIBS)
Xegl_programs = Xegl
endif
bin_PROGRAMS = $(Xegl_programs)

View File

@ -22,9 +22,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#define NEED_EVENTS
#include <errno.h>
#include <linux/input.h>

View File

@ -23,9 +23,7 @@
*/
/* $RCSId: xc/programs/Xserver/hw/kdrive/kinput.c,v 1.30 2002/11/13 16:37:39 keithp Exp $ */
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#include <signal.h>
#include <stdio.h>

View File

@ -1,14 +1,14 @@
INCLUDES = \
@XEGL_INCS@ \
@XSERVER_CFLAGS@ \
@XEGLSERVER_CFLAGS@
AM_CFLAGS = \
-I$(srcdir)/.. \
-I$(srcdir)/../.. \
$(XEGLMODULES_CFLAGS)
libxegl_la_LDFLAGS = -avoid-version
libxegl_la_SOURCES = xeglmodule.c
libxegl_la_LIBADD = \
@XEGL_MOD_LIBS@ \
@XEGLSERVER_LIBS@
$(top_builddir)/hw/xgl/glx/libxegl.la \
$(XEGLMODULES_LIBS)
moduledir = @MODULEPATH@/xgl
moduledir = @xglmoduledir@
module_LTLIBRARIES = libxegl.la

View File

@ -1,16 +1,15 @@
if XGLSERVER
MODULE_SUBDIRS = module
if XGL
XGL_MODULE_DIRS = module
endif
SUBDIRS = \
. \
$(MODULE_SUBDIRS)
$(XGL_MODULE_DIRS)
INCLUDES = \
@XGLX_INCS@ \
@XSERVER_CFLAGS@ \
@XGLSERVER_CFLAGS@ \
@XGLXSERVER_CFLAGS@
AM_CFLAGS = \
-I$(srcdir)/.. \
@SERVER_DEFINES@ \
$(XGLXMODULES_CFLAGS)
noinst_LTLIBRARIES = libxglx.la
@ -18,16 +17,22 @@ libxglx_la_SOURCES = \
xglx.h \
xglx.c
if XGLXSERVER
Xglx_DEPENDENCIES = @XGLX_LIBS@
Xglx_LDFLAGS = -export-dynamic
Xglx_SOURCES = xglxinit.c
Xglx_SOURCES = \
xglxinit.c \
$(top_srcdir)/mi/miinitext.c \
$(top_srcdir)/Xext/dpmsstubs.c \
$(top_srcdir)/Xi/stubs.c \
$(top_srcdir)/fb/fbcmap.c
Xglx_LDADD = \
@XGLX_LIBS@ \
@XSERVER_LIBS@ \
@XGLSERVER_LIBS@ \
@XGLXSERVER_LIBS@
libxglx.la \
../libxgl.a \
$(XORG_CORE_LIBS) \
$(XGLX_LIBS) \
$(XSERVER_LIBS) \
$(EXTENSION_LIBS) \
$(XGLXMODULES_LIBS)
Xglx_programs = Xglx
endif
bin_PROGRAMS = $(Xglx_programs)

View File

@ -1,14 +1,14 @@
INCLUDES = \
@XGLX_INCS@ \
@XSERVER_CFLAGS@ \
@XGLXSERVER_CFLAGS@
AM_CFLAGS = \
-I$(srcdir)/.. \
-I$(srcdir)/../.. \
$(XGLXMODULES_CFLAGS)
libxglx_la_LDFLAGS = -avoid-version
libxglx_la_SOURCES = xglxmodule.c
libxglx_la_LIBADD = \
@XGLX_MOD_LIBS@ \
@XGLXSERVER_LIBS@
$(top_builddir)/hw/xgl/glx/libxglx.la \
$(XGLXMODULES_LIBS)
moduledir = @MODULEPATH@/xgl
moduledir = @xglmoduledir@
module_LTLIBRARIES = libxglx.la

View File

@ -25,7 +25,7 @@
#include "xglx.h"
static xglScreenInfoRec xglxScreenInfo = {
xglScreenInfoRec xglScreenInfo = {
NULL, 0, 0, 0, 0,
DEFAULT_GEOMETRY_DATA_TYPE,
DEFAULT_GEOMETRY_USAGE,
@ -53,7 +53,7 @@ InitOutput (ScreenInfo *pScreenInfo,
}
#endif
xglxInitOutput (&xglxScreenInfo, pScreenInfo, argc, argv);
xglxInitOutput (pScreenInfo, argc, argv);
}
Bool
@ -73,7 +73,7 @@ void
InitInput (int argc,
char **argv)
{
xglxInitInput (&xglxScreenInfo, argc, argv);
xglxInitInput (argc, argv);
}
void
@ -105,11 +105,11 @@ ddxProcessArgument (int argc,
}
#endif
skip = xglProcessArgument (&xglxScreenInfo, argc, argv, i);
skip = xglProcessArgument (argc, argv, i);
if (skip)
return skip;
return xglxProcessArgument (&xglxScreenInfo, argc, argv, i);
return xglxProcessArgument (argc, argv, i);
}
void
@ -129,3 +129,7 @@ OsVendorInit (void)
{
xglxOsVendorInit ();
}
void ddxInitGlobals(void)
{
}

View File

@ -26,9 +26,7 @@
#ifndef _XGL_GLXEXT_H_
#define _XGL_GLXEXT_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#include "scrnintstr.h"

View File

@ -26,9 +26,7 @@
#ifndef _XGL_H_
#define _XGL_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#include <stdint.h>
#include <stdio.h>
@ -53,6 +51,11 @@ typedef struct _GCFuncs *GCFuncsPtr;
#include "mipict.h"
#endif
/* For the modules. We should decide what the actual version numbering should
* be.
*/
#define VERSION "0.0.1"
extern WindowPtr *WindowTable;
#define XGL_DEFAULT_PBO_MASK 0
@ -1331,7 +1334,7 @@ xglAddTraps (PicturePtr pDst,
#endif
#ifdef XLOADABLE
#ifdef XGL_MODULAR
/* xglloader.c */

View File

@ -139,7 +139,7 @@ Bool
xglLoadGLXModules (void)
{
#ifdef XLOADABLE
#ifdef XGL_MODULAR
if (!glXHandle)
{
xglSymbolRec sym[] = {
@ -207,7 +207,7 @@ void
xglUnloadGLXModules (void)
{
#ifdef XLOADABLE
#ifdef XGL_MODULAR
if (glXHandle)
{
xglUnloadModule (glXHandle);

View File

@ -52,7 +52,7 @@ Bool
xglLoadHashFuncs (void *handle)
{
#ifdef XLOADABLE
#ifdef XGL_MODULAR
xglSymbolRec sym[] = {
SYM (__hashFunc.NewHashTable, "_mesa_NewHashTable"),
SYM (__hashFunc.DeleteHashTable, "_mesa_DeleteHashTable"),

View File

@ -98,7 +98,7 @@ static Bool
xglEnsureDDXModule (void)
{
#ifdef XLOADABLE
#ifdef XGL_MODULAR
static void *ddxHandle = 0;
static Bool status = TRUE;
@ -285,3 +285,7 @@ OsVendorInit (void)
if (xglEnsureDDXModule ())
(*__ddxFunc.osVendorInit) ();
}
void ddxInitGlobals(void)
{
}

View File

@ -26,7 +26,7 @@
#include "xgl.h"
#include "xglmodule.h"
#ifdef XLOADABLE
#ifdef XGL_MODULAR
#include <dlfcn.h>
@ -44,11 +44,11 @@ xglLoadModule (const char *name)
SYM (moduleInit, "moduleInit")
};
module = malloc (strlen (MODULEPATH "/xgl/lib.so") + strlen (name) + 1);
module = malloc (strlen (XGL_MODULE_PATH "/lib.so") + strlen (name) + 1);
if (!module)
return 0;
sprintf (module, MODULEPATH "/xgl/lib%s.so", name);
sprintf (module, XGL_MODULE_PATH "/lib%s.so", name);
handle = dlopen (module, RTLD_NOW);
if (handle)

View File

@ -26,9 +26,7 @@
#ifndef _XGL_MODULE_H_
#define _XGL_MODULE_H_
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <xgl-config.h>
#include <X11/Xdefs.h>
#include "misc.h"

14
include/xgl-config.h.in Normal file
View File

@ -0,0 +1,14 @@
/*
* xgl-config.h.in
*
* This file has defines used in the xgl ddx
*
*/
#include <dix-config.h>
/* Use loadable XGL modules. */
#undef XGL_MODULAR
/* Default XGL module search path */
#undef XGL_MODULE_PATH