mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-22 19:20:23 +01:00
Factor-out glucose symlinked code from xgl into a common library.
This commit is contained in:
parent
051d684156
commit
ac41255d56
29 changed files with 73 additions and 230 deletions
|
|
@ -30,7 +30,12 @@ if DBE
|
|||
DBE_DIR=dbe
|
||||
endif
|
||||
|
||||
if XGL
|
||||
XGL_DIR=xgl
|
||||
endif
|
||||
|
||||
if GLUCOSE
|
||||
XGL_DIR=xgl
|
||||
GLUCOSE_DIR=glucose
|
||||
endif
|
||||
|
||||
|
|
@ -60,6 +65,7 @@ SUBDIRS = \
|
|||
$(GLX_DIR) \
|
||||
exa \
|
||||
config \
|
||||
$(XGL_DIR) \
|
||||
$(GLUCOSE_DIR) \
|
||||
hw
|
||||
|
||||
|
|
@ -107,6 +113,7 @@ DIST_SUBDIRS = \
|
|||
GL \
|
||||
exa \
|
||||
config \
|
||||
xgl \
|
||||
glucose \
|
||||
hw
|
||||
|
||||
|
|
|
|||
15
configure.ac
15
configure.ac
|
|
@ -789,13 +789,10 @@ if test "x$GLX" = xyes && ! test "x$MESA_SOURCE" = x; then
|
|||
test -d GL || mkdir GL
|
||||
case $host_os in
|
||||
solaris*)
|
||||
SYMLINK_MESA="/usr/bin/bash $srcdir/GL/symlink-mesa.sh"
|
||||
SYMLINK_GLUCOSE="/usr/bin/bash $srcdir/glucose/symlink-xgl.sh" ;;
|
||||
*) SYMLINK_MESA=$srcdir/GL/symlink-mesa.sh
|
||||
SYMLINK_GLUCOSE=$srcdir/glucose/symlink-xgl.sh ;;
|
||||
SYMLINK_MESA="/usr/bin/bash $srcdir/GL/symlink-mesa.sh" ;;
|
||||
*) SYMLINK_MESA=$srcdir/GL/symlink-mesa.sh ;;
|
||||
esac
|
||||
$SYMLINK_MESA $MESA_SOURCE GL/
|
||||
$SYMLINK_GLUCOSE $srcdir/hw/xgl glucose/
|
||||
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
|
||||
|
|
@ -1263,10 +1260,13 @@ fi
|
|||
AC_MSG_RESULT([$XGL])
|
||||
AM_CONDITIONAL(XGL, [test "x$XGL" = xyes])
|
||||
|
||||
if test "x$XGL" = xyes; then
|
||||
if test "x$XGL" = xyes -o "x$GLUCOSE" = xyes; then
|
||||
XGL_LIBS="$FB_LIB $COMPOSITE_LIB $FIXES_LIB $XEXT_LIB $CONFIG_LIB $DBE_LIB $XTRAP_LIB $RECORD_LIB $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])
|
||||
fi
|
||||
|
||||
if test "x$XGL" = xyes; then
|
||||
XGL_SYS_LIBS="$XGLMODULES_LIBS $GLX_SYS_LIBS $DLOPEN_LIBS"
|
||||
AC_SUBST([XGL_SYS_LIBS])
|
||||
AC_DEFINE(XGL_MODULAR, 1, [Use loadable XGL modules])
|
||||
AC_DEFINE(XGLServer, 1, [Building XGL server])
|
||||
|
|
@ -2063,6 +2063,7 @@ Xext/Makefile
|
|||
Xi/Makefile
|
||||
xfixes/Makefile
|
||||
exa/Makefile
|
||||
xgl/Makefile
|
||||
glucose/Makefile
|
||||
hw/Makefile
|
||||
hw/xfree86/Makefile
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ INCLUDES = -I@MESA_SOURCE@/include \
|
|||
-I$(top_srcdir)/GL/mesa/glapi \
|
||||
-I$(top_srcdir)/GL/glx \
|
||||
-I$(top_srcdir)/GL/include \
|
||||
-I$(top_srcdir)/xgl \
|
||||
-I$(top_srcdir)/hw/xfree86/os-support \
|
||||
-I$(top_srcdir)/hw/xfree86/os-support/bus \
|
||||
-I$(top_srcdir)/hw/xfree86/common
|
||||
|
|
@ -27,27 +28,3 @@ libglucose_la_SOURCES = \
|
|||
glucose_info.c
|
||||
|
||||
libglucose_la_LIBADD = $(GLUCOSE_LIBS)
|
||||
|
||||
|
||||
nodist_libglucose_la_SOURCES = \
|
||||
xgl.h \
|
||||
xglarea.c \
|
||||
xglcmap.c \
|
||||
xglcompose.c \
|
||||
xglcopy.c \
|
||||
xglfill.c \
|
||||
xglgc.c \
|
||||
xglgeometry.c \
|
||||
xglget.c \
|
||||
xglglyph.c \
|
||||
xglpict.c \
|
||||
xglpixmap.c \
|
||||
xglshm.c \
|
||||
xglsolid.c \
|
||||
xglsync.c \
|
||||
xgltile.c \
|
||||
xgltrap.c \
|
||||
xglwindow.c \
|
||||
xglxv.c
|
||||
|
||||
EXTRA_DIST = symlink_xgl.sh
|
||||
|
|
|
|||
|
|
@ -1,166 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
#
|
||||
# A script that symlinks source files from xgl to glucose
|
||||
#
|
||||
# Author: Soren Sandmann (sandmann@redhat.com) (original)
|
||||
# adapted for glucose by Alan Hourihane <alanh@tungstengraphics.com>
|
||||
|
||||
#
|
||||
# Things we would like to do
|
||||
#
|
||||
# - Check that all the relevant files exist
|
||||
# - AUTHORS, autogen.sh, configure.ac, ...
|
||||
# - Check that we have actually linked everything
|
||||
# - if a file doesn't need to be linked, then it needs
|
||||
# to be listed as "not-linked"
|
||||
# - Compute diffs between all the files (shouldn't be necessary)
|
||||
# - possibly check that files are listet in Makefile.am's
|
||||
# - Clean target directory of irrelevant files
|
||||
#
|
||||
|
||||
check_destinations () {
|
||||
# don't do anything - we are relying on the side
|
||||
# effect of dst_dir
|
||||
true
|
||||
}
|
||||
|
||||
check_exist() {
|
||||
# Check whether $1 exists
|
||||
|
||||
if [ ! -e $1 ] ; then
|
||||
error "$1 not found"
|
||||
fi
|
||||
}
|
||||
|
||||
delete_existing() {
|
||||
# Delete $2
|
||||
|
||||
rm -f $2
|
||||
}
|
||||
|
||||
link_files() {
|
||||
# Link $1 to $2
|
||||
|
||||
if [ ! -e $2 ] ; then
|
||||
ln -s $1 $2
|
||||
fi
|
||||
}
|
||||
|
||||
main() {
|
||||
check_args $1 $2
|
||||
|
||||
run check_destinations "Creating destination directories"
|
||||
run check_exist "Checking that the source files exist"
|
||||
run delete_existing "Deleting existing files"
|
||||
run link_files "Linking files"
|
||||
}
|
||||
|
||||
## actual symlinking
|
||||
|
||||
symlink_xgl() {
|
||||
src_dir .
|
||||
dst_dir .
|
||||
|
||||
for src in $REAL_SRC_DIR/*.c $REAL_SRC_DIR/*.h; do
|
||||
action `basename $src`
|
||||
done
|
||||
}
|
||||
|
||||
#########
|
||||
#
|
||||
# Helper functions
|
||||
#
|
||||
#########
|
||||
|
||||
error() {
|
||||
echo
|
||||
echo \ \ \ error:\ \ \ $1
|
||||
exit 1
|
||||
}
|
||||
|
||||
# printing out what's going on
|
||||
run_module() {
|
||||
# $1 module
|
||||
# $2 explanation
|
||||
echo -n $EXPLANATION for $1 module ...\
|
||||
symlink_$1
|
||||
echo DONE
|
||||
}
|
||||
|
||||
run() {
|
||||
# $1 what to do
|
||||
# $2 explanation
|
||||
|
||||
ACTION=$1 EXPLANATION=$2 run_module xgl
|
||||
}
|
||||
|
||||
src_dir() {
|
||||
REAL_SRC_DIR=$SRC_DIR/$1
|
||||
if [ ! -d $REAL_SRC_DIR ] ; then
|
||||
error "Source directory $REAL_SRC_DIR does not exist"
|
||||
fi
|
||||
}
|
||||
|
||||
dst_dir() {
|
||||
REAL_DST_DIR=$DST_DIR/$1
|
||||
if [ ! -d $REAL_DST_DIR ] ; then
|
||||
mkdir -p $REAL_DST_DIR
|
||||
fi
|
||||
}
|
||||
|
||||
action() {
|
||||
if [ -z $2 ] ; then
|
||||
$ACTION $REAL_SRC_DIR/$1 $REAL_DST_DIR/$1
|
||||
else
|
||||
$ACTION $REAL_SRC_DIR/$1 $REAL_DST_DIR/$2
|
||||
fi
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo symlink-xgl.sh src-dir dst-dir
|
||||
echo src-dir: the xgl source directory
|
||||
echo dst-dir: the glucose directory
|
||||
}
|
||||
|
||||
# Check commandline args
|
||||
check_args() {
|
||||
if [ -z $1 ] ; then
|
||||
echo Missing source dir
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z $2 ] ; then
|
||||
echo Missing destination dir
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $1 ] ; then
|
||||
echo $1 is not a dir
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -d $2 ] ; then
|
||||
echo $2 is not a dir
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $1 = $2 ] ; then
|
||||
echo source and destination can\'t be the same
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
|
||||
D=`dirname "$relpath"`
|
||||
B=`basename "$relpath"`
|
||||
abspath="`cd \"$D\" 2>/dev/null && pwd || echo \"$D\"`/$B"
|
||||
|
||||
SRC_DIR=`( cd $1 ; pwd )`
|
||||
DST_DIR=`(cd $2 ; pwd )`
|
||||
}
|
||||
|
||||
main $1 $2
|
||||
|
|
@ -28,53 +28,31 @@ AM_CFLAGS = \
|
|||
-I$(top_srcdir)/GL/include \
|
||||
-I@MESA_SOURCE@/include \
|
||||
-I@MESA_SOURCE@/src/mesa/glapi \
|
||||
-I$(top_srcdir)/xgl \
|
||||
$(XGLMODULES_CFLAGS)
|
||||
|
||||
noinst_LIBRARIES = libxgl.a
|
||||
|
||||
libxgl_a_SOURCES = \
|
||||
xgl.h \
|
||||
xglmodule.h \
|
||||
xglglx.h \
|
||||
xglinput.c \
|
||||
xgloutput.c \
|
||||
xglcmap.c \
|
||||
xglparse.c \
|
||||
xglscreen.c \
|
||||
xglarea.c \
|
||||
xglgeometry.c \
|
||||
xglpixmap.c \
|
||||
xglsync.c \
|
||||
xglsolid.c \
|
||||
xgltile.c \
|
||||
xglcopy.c \
|
||||
xglfill.c \
|
||||
xglwindow.c \
|
||||
xglget.c \
|
||||
xglgc.c \
|
||||
xglshm.c \
|
||||
xglcompose.c \
|
||||
xglpict.c \
|
||||
xglglyph.c \
|
||||
xgltrap.c \
|
||||
xglloader.c \
|
||||
xglhash.c \
|
||||
xglglx.c \
|
||||
xglxv.c
|
||||
|
||||
EXTRA_DIST = \
|
||||
xglmodule.h
|
||||
|
||||
Xgl_LDFLAGS = -export-dynamic
|
||||
Xgl_SOURCES = \
|
||||
xglinit.c \
|
||||
xglmodule.h \
|
||||
xglglx.h \
|
||||
xglinput.c \
|
||||
xgloutput.c \
|
||||
xglparse.c \
|
||||
xglscreen.c \
|
||||
xglloader.c \
|
||||
xglhash.c \
|
||||
xglglx.c \
|
||||
$(top_srcdir)/mi/miinitext.c \
|
||||
$(top_srcdir)/Xext/dpmsstubs.c \
|
||||
$(top_srcdir)/Xi/stubs.c \
|
||||
$(top_srcdir)/fb/fbcmap.c
|
||||
|
||||
XGL_LIBS = \
|
||||
libxgl.a \
|
||||
$(top_srcdir)/xgl/libxgl.la \
|
||||
@XGL_LIBS@ \
|
||||
$(XSERVER_LIBS)
|
||||
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ AM_CFLAGS = \
|
|||
-I$(top_srcdir)/GL/include \
|
||||
-I@MESA_SOURCE@/include \
|
||||
-I@MESA_SOURCE@/src/mesa/glapi \
|
||||
-I$(top_srcdir)/xgl \
|
||||
$(DIX_CFLAGS) \
|
||||
-DHAVE_XGL_CONFIG_H \
|
||||
-DHAVE_DIX_CONFIG_H \
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ AM_CFLAGS = \
|
|||
@DIX_CFLAGS@ \
|
||||
@LIBDRM_CFLAGS@ \
|
||||
@DRIPROTO_CFLAGS@ \
|
||||
-I$(top_srcdir)/xgl \
|
||||
-I$(srcdir)/.. \
|
||||
-I$(srcdir)/../.. \
|
||||
$(XGLXMODULES_CFLAGS)
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ AM_CFLAGS = \
|
|||
$(XGLMODULES_CFLAGS) \
|
||||
-I$(top_srcdir)/GL/glx \
|
||||
-I$(top_srcdir)/GL/include \
|
||||
-I$(top_srcdir)/xgl \
|
||||
-I$(top_srcdir)/hw/xgl \
|
||||
-I@MESA_SOURCE@/include \
|
||||
-I@MESA_SOURCE@/src/mesa/glapi
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ AM_CFLAGS = \
|
|||
-DHAVE_XGL_CONFIG_H \
|
||||
-DHAVE_DIX_CONFIG_H \
|
||||
$(XGLMODULES_CFLAGS) \
|
||||
-I$(top_srcdir)/xgl \
|
||||
-I$(top_srcdir)/hw/xgl
|
||||
|
||||
libglxext_la_LDFLAGS = -avoid-version
|
||||
|
|
|
|||
42
xgl/Makefile.am
Normal file
42
xgl/Makefile.am
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
noinst_LTLIBRARIES = libxgl.la
|
||||
|
||||
INCLUDES = -I@MESA_SOURCE@/include \
|
||||
-I$(top_srcdir)/GL/mesa/glapi \
|
||||
-I$(top_srcdir)/GL/glx \
|
||||
-I$(top_srcdir)/GL/include \
|
||||
-I$(top_srcdir)/hw/xfree86/os-support \
|
||||
-I$(top_srcdir)/hw/xfree86/os-support/bus \
|
||||
-I$(top_srcdir)/hw/xfree86/common
|
||||
|
||||
# -DXFree86Server is required because the X11 driver in Mesa thinks that
|
||||
# symbol means "being built in the server"
|
||||
AM_CFLAGS = \
|
||||
@DIX_CFLAGS@ \
|
||||
@LIBDRM_CFLAGS@ \
|
||||
@DRIPROTO_CFLAGS@ \
|
||||
$(XGL_CFLAGS) \
|
||||
@GLX_DEFINES@ \
|
||||
-DXFree86Server
|
||||
|
||||
libxgl_la_SOURCES = \
|
||||
xgl.h \
|
||||
xglarea.c \
|
||||
xglcmap.c \
|
||||
xglcompose.c \
|
||||
xglcopy.c \
|
||||
xglfill.c \
|
||||
xglgc.c \
|
||||
xglgeometry.c \
|
||||
xglget.c \
|
||||
xglglyph.c \
|
||||
xglpict.c \
|
||||
xglpixmap.c \
|
||||
xglshm.c \
|
||||
xglsolid.c \
|
||||
xglsync.c \
|
||||
xgltile.c \
|
||||
xgltrap.c \
|
||||
xglwindow.c \
|
||||
xglxv.c
|
||||
|
||||
libxgl_la_LIBADD = $(XGL_LIBS)
|
||||
Loading…
Add table
Reference in a new issue