summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2013-10-30 11:34:29 -0400
committerAdam Jackson <ajax@redhat.com>2013-10-30 12:19:36 -0400
commitdf29efb8b90b8cbf5be2a05e9f8dcc4c13a1ad73 (patch)
tree543fefac8ea76a1ef468b1eac36539f683b2bfe4
parentc588a474131955c6bc2e0f9ce6e388546999753a (diff)
glamor: Move xfree86 code out of dixglamor-for-1.15
Signed-off-by: Adam Jackson <ajax@redhat.com>
-rw-r--r--configure.ac23
-rw-r--r--glamor/Makefile.am19
-rw-r--r--hw/xfree86/glamor/Makefile.am34
-rw-r--r--hw/xfree86/glamor/glamor_egl.c (renamed from glamor/glamor_egl.c)4
-rw-r--r--hw/xfree86/glamor/glamor_eglmodule.c (renamed from glamor/glamor_eglmodule.c)6
-rw-r--r--hw/xfree86/glamor/glamor_xv.c (renamed from glamor/glamor_xv.c)0
-rw-r--r--include/xorg-config.h.in4
7 files changed, 49 insertions, 41 deletions
diff --git a/configure.ac b/configure.ac
index dd117f367..88d37ea28 100644
--- a/configure.ac
+++ b/configure.ac
@@ -645,7 +645,6 @@ AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz
AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no])
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
AC_ARG_ENABLE(glamor, AS_HELP_STRING([--enable-glamor], [Build glamor dix module (default: no)]), [GLAMOR=$enableval], [GLAMOR=no])
-AC_ARG_ENABLE(glamor-ddx, AS_HELP_STRING([--enable-glamor-ddx], [Build glamor ddx (default: no)]), [GLAMOR_DDX=$enableval], [GLAMOR_DDX=no])
dnl 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])
@@ -1126,6 +1125,16 @@ if test "x$DRI" = xyes || test "x$DRI2" = xyes || test "x$CONFIG_UDEV_KMS" = xye
fi
fi
+PKG_CHECK_MODULES(EGL, $LIBEGL, [EGL=yes], [EGL=no])
+AM_CONDITIONAL([EGL], [test "x$EGL" = xyes])
+
+if test "x$EGL = xyes"; then
+ PKG_CHECK_MODULES(GBM, $LIBGBM, [GBM=yes], [GBM=no])
+ if test "x$GBM" = xyes; then
+ AC_DEFINE(GLAMOR_HAS_GBM, 1, [Use GBM.])
+ fi
+fi
+
if test "x$DRI2" = xyes; then
save_CFLAGS=$CFLAGS
CFLAGS="$GL_CFLAGS $LIBDRM_CFLAGS"
@@ -1896,13 +1905,8 @@ AM_CONDITIONAL([XORG_BUS_PLATFORM], [test "x$CONFIG_UDEV_KMS" = xyes])
dnl glamor
-if [test "x$XEPHYR" = xyes || test "x$GLAMOR_DDX" = xyes] ; then
- GLAMOR=yes
-fi
-
AM_CONDITIONAL([GLAMOR], [test "x$GLAMOR" = xyes])
AM_CONDITIONAL([GLAMOR_GLES2], [test "x$GLAMOR_GLES2" = xyes])
-AM_CONDITIONAL([GLAMOR_DDX], [test "x$GLAMOR_DDX" = xyes])
if test "x$GLAMOR" = xyes; then
AC_DEFINE(GLAMOR,1,[Build Glamor])
@@ -1916,13 +1920,6 @@ if test "x$GLAMOR" = xyes; then
PKG_CHECK_MODULES(GL, $LIBGL)
REQUIRED_LIBS="$REQUIRED_LIBS $LIBGL"
fi
-
- if test "x$GLAMOR_DDX" = xyes; then
- AC_DEFINE(GLAMOR_DDX,1,[Enable glamor ddx driver])
- PKG_CHECK_MODULES(EGL, $LIBEGL)
- PKG_CHECK_MODULES(EGL, $LIBGBM)
- REQUIRED_LIBS="$REQUIRED_LIBS $LIBEGL"
- fi
fi
dnl XWin DDX
diff --git a/glamor/Makefile.am b/glamor/Makefile.am
index c51b98f4b..220a91718 100644
--- a/glamor/Makefile.am
+++ b/glamor/Makefile.am
@@ -49,26 +49,7 @@ libglamor_la_SOURCES = \
glamor_gl_dispatch.c\
glamor_fbo.c\
glamor_compositerects.c\
- glamor_xv.c\
glamor_utils.h\
glamor.h
sdk_HEADERS = glamor.h
-
-if EGL
-LIBGLAMOREGL = libglamoregl.la
-module_LTLIBRARIES = $(LIBGLAMOREGL)
-libglamoregl_la_DEPENDENCIES = libglamor.la
-libglamoregl_la_LDFLAGS = -avoid-version -module
-libglamoregl_la_LIBADD = $(EGL_LIBS) $(GLX_SYS_LIBS) $(GBM_LIBS) libglamor.la
-libglamoregl_la_SOURCES = glamor_eglmodule.c $(top_srcdir)/src/glamor_egl.c
-libglamoregl_la_CFLAGS = \
- $(AM_CFLAGS) \
- $(GLX_DEFINES) \
- -I$(top_srcdir)/src \
- $(LIBDRM_CFLAGS) \
- $(EGL_CFLAGS) \
- $(GBM_CFLAGS)
-endif
-
-
diff --git a/hw/xfree86/glamor/Makefile.am b/hw/xfree86/glamor/Makefile.am
new file mode 100644
index 000000000..179c7e663
--- /dev/null
+++ b/hw/xfree86/glamor/Makefile.am
@@ -0,0 +1,34 @@
+module_LTLIBRARIES = libglamoregl.la
+
+# Override these since glamor doesn't need them and the needed files aren't
+# built (in hw/xfree86/os-support/solaris) until after glamor is built
+SOLARIS_ASM_CFLAGS=""
+
+if GLAMOR_GLES2
+GLAMOR_GL_LIBS = $(GLESV2_LIBS)
+else
+GLAMOR_GL_LIBS = $(GL_LIBS)
+endif
+
+AM_CPPFLAGS = \
+ $(XORG_INCS)
+
+AM_CFLAGS = $(CWARNFLAGS) $(XORG_CFLAGS) $(DIX_CFLAGS) $(LIBDRM_CFLAGS)
+
+libglamoregl_la_LDFLAGS = -module -avoid-version $(LD_NO_UNDEFINED_FLAG)
+libglamoregl_la_DEPENDENCIES = $(top_builddir)/glamor/libglamor.la
+libglamoregl_la_LIBADD = $(EGL_LIBS) $(GLX_SYS_LIBS) $(GBM_LIBS) \
+ $(top_builddir)/glamor/libglamor.la $(GLAMOR_GL_LIBS)
+
+libglamoregl_la_SOURCES = \
+ glamor_xv.c \
+ glamor_egl.c \
+ glamor_eglmodule.c
+
+libglamoregl_la_CFLAGS = \
+ $(AM_CFLAGS) \
+ $(GLX_DEFINES) \
+ -I$(top_srcdir)/glamor \
+ $(LIBDRM_CFLAGS) \
+ $(EGL_CFLAGS) \
+ $(GBM_CFLAGS)
diff --git a/glamor/glamor_egl.c b/hw/xfree86/glamor/glamor_egl.c
index b51935bd7..86e997626 100644
--- a/glamor/glamor_egl.c
+++ b/hw/xfree86/glamor/glamor_egl.c
@@ -27,9 +27,7 @@
*
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "xorg-config.h"
#define GLAMOR_FOR_XORG
#include <xorg-server.h>
diff --git a/glamor/glamor_eglmodule.c b/hw/xfree86/glamor/glamor_eglmodule.c
index 9a0dec9f2..bdd31ff27 100644
--- a/glamor/glamor_eglmodule.c
+++ b/hw/xfree86/glamor/glamor_eglmodule.c
@@ -27,9 +27,7 @@
* Zhigang Gong <zhigang.gong@gmail.com>
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "xorg-config.h"
#include <xorg-server.h>
#define GLAMOR_FOR_XORG
@@ -42,7 +40,7 @@ static XF86ModuleVersionInfo VersRec = {
MODINFOSTRING1,
MODINFOSTRING2,
XORG_VERSION_CURRENT,
- PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL,
+ 1, 0, 0,
ABI_CLASS_ANSIC, /* Only need the ansic layer */
ABI_ANSIC_VERSION,
MOD_CLASS_NONE,
diff --git a/glamor/glamor_xv.c b/hw/xfree86/glamor/glamor_xv.c
index 1d77eaa65..1d77eaa65 100644
--- a/glamor/glamor_xv.c
+++ b/hw/xfree86/glamor/glamor_xv.c
diff --git a/include/xorg-config.h.in b/include/xorg-config.h.in
index ac6a149e1..adcb7e8f4 100644
--- a/include/xorg-config.h.in
+++ b/include/xorg-config.h.in
@@ -148,7 +148,7 @@
/* Build GLAMOR over GLES2*/
#undef GLAMOR_GLES2
-/* Build GLAMOR ddx*/
-#undef GLAMOR_DDX
+/* Build GLAMOR for GBM */
+#undef GLAMOR_HAS_GBM
#endif /* _XORG_CONFIG_H_ */