Content-Location: http://lists.freedesktop.org/archives/xorg-commit/2007-February/010341.html
Content-Transfer-Encoding: 8bit
xf86-video-intel: Branch 'modesetting' - configure.ac src/bios_reader/Makefile.am src/ch7017/ch7017.c src/ch7017/Makefile.am src/ch7xxx/ch7xxx.c src/ch7xxx/Makefile.am src/ivch/ivch.c src/ivch/Makefile.am src/Makefile.am src/sil164/Makefile.am src/sil164/sil164.c
xf86-video-intel: Branch 'modesetting' - configure.ac src/bios_reader/Makefile.am src/ch7017/ch7017.c src/ch7017/Makefile.am src/ch7xxx/ch7xxx.c src/ch7xxx/Makefile.am src/ivch/ivch.c src/ivch/Makefile.am src/Makefile.am src/sil164/Makefile.am src/sil164/sil164.c
Keith Packard
keithp at kemper.freedesktop.org
Fri Feb 16 12:19:10 EET 2007
configure.ac | 71 ++++++++++++++++++++++++--------------------
src/Makefile.am | 38 +++++++++++++----------
src/bios_reader/Makefile.am | 2 -
src/ch7017/Makefile.am | 2 -
src/ch7017/ch7017.c | 2 -
src/ch7xxx/Makefile.am | 2 -
src/ch7xxx/ch7xxx.c | 2 -
src/ivch/Makefile.am | 2 -
src/ivch/ivch.c | 2 -
src/sil164/Makefile.am | 2 -
src/sil164/sil164.c | 2 -
11 files changed, 71 insertions(+), 56 deletions(-)
New commits:
diff-tree 0ca926e63c7fa9122a8cba1424ce4cdee1c7b215 (from 972f1109d23c0a3f821fa573e2aa40cd17ce2795)
Author: Keith Packard <keithp at guitar.keithp.com>
Date: Fri Feb 16 02:19:10 2007 -0800
Check for presence of xf86Modes.h file.
xf86Modes.h file signals the availability of the new modes API in the
server; use that instead of counting on X server version numbers.
Also, finish eliminating use of local copies of those header files.
diff --git a/configure.ac b/configure.ac
index e0d828e..8a81859 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,37 +76,6 @@ AC_ARG_WITH(xserver-source,AC_HELP_STRIN
[ XSERVER_SOURCE="" ])
-PKG_CHECK_MODULES(XORG_XSERVER, xorg-server >= 1.2.99, [XMODES=yes], [XMODES=no])
-
-AM_CONDITIONAL(XMODES, [test "x$XMODES" = xyes])
-
-if test "x$XMODES" = xyes; then
- AC_DEFINE(XMODES, 1,[X server as built-in mode code])
-else
- if test "x$XSERVER_SOURCE" = x; then
- if test -d ../../xserver; then
- XSERVER_SOURCE="`cd ../../xserver && pwd`"
- fi
- fi
-
- if test "x$XSERVER_SOURCE" = x; then
- AC_MSG_ERROR([Must have X server >= 1.3 source tree for mode setting code. Please specify --with-xserver-source])
- fi
-
- if test -f src/modes/xf86Crtc.h; then
- :
- else
- ln -s $XSERVER_SOURCE/hw/xfree86/modes src/modes
- fi
-
- if test -f src/parser/xf86Parser.h; then
- :
- else
- ln -s $XSERVER_SOURCE/hw/xfree86/parser src/parser
- fi
-
-fi
-
# Checks for extensions
XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)
XORG_DRIVER_CHECK_EXT(RANDR, randrproto)
@@ -144,6 +113,46 @@ if test x$DRI = xauto; then
fi
AC_MSG_RESULT([$DRI])
+save_CFLAGS="$CFLAGS"
+CFLAGS="$XORG_CFLAGS"
+AC_CHECK_HEADER(xf86Modes.h,[XMODES=yes],[XMODES=no],[#include "xorg-server.h"])
+CFLAGS="$save_CFLAGS"
+
+AM_CONDITIONAL(XMODES, test "x$XMODES" = xno)
+
+if test "x$XMODES" = xyes; then
+ echo built-in mode code
+ AC_DEFINE(XMODES, 1,[X server has built-in mode code])
+ XMODES_CFLAGS=
+else
+ echo symlink mode code
+ if test "x$XSERVER_SOURCE" = x; then
+ if test -d ../../xserver; then
+ XSERVER_SOURCE="`cd ../../xserver && pwd`"
+ fi
+ fi
+
+ if test "x$XSERVER_SOURCE" = x; then
+ AC_MSG_ERROR([Must have X server >= 1.3 source tree for mode setting code. Please specify --with-xserver-source])
+ fi
+ XMODES_CFLAGS='-DXF86_MODES_RENAME -I$(top_srcdir)/src/modes -I$(top_srcdir)/src/parser'
+fi
+
+if test -d "$XSERVER_SOURCE"; then
+ if test -f src/modes/xf86Modes.h; then
+ :
+ else
+ ln -s $XSERVER_SOURCE/hw/xfree86/modes src/modes
+ fi
+
+ if test -f src/parser/xf86Parser.h; then
+ :
+ else
+ ln -s $XSERVER_SOURCE/hw/xfree86/parser src/parser
+ fi
+fi
+AC_SUBST([XMODES_CFLAGS])
+
dnl Use lots of warning flags with GCC
WARN_CFLAGS=""
diff --git a/src/Makefile.am b/src/Makefile.am
index f656270..1e0505f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,13 +25,32 @@ SUBDIRS = xvmc bios_reader ch7017 ch7xxx
# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@ -Iparser -Imodes \
- -DI830_XV -DI830_USE_XAA -DI830_USE_EXA -DXF86_MODES_RENAME
+
+AM_CFLAGS = @WARN_CFLAGS@ @XORG_CFLAGS@ @DRI_CFLAGS@ @XMODES_CFLAGS@ \
+ -DI830_XV -DI830_USE_XAA -DI830_USE_EXA
intel_drv_la_LTLIBRARIES = intel_drv.la
intel_drv_la_LDFLAGS = -module -avoid-version
intel_drv_ladir = @moduledir@/drivers
+if XMODES
+XMODE_SRCS=\
+ local_xf86Rename.h \
+ parser/xf86Rename.h \
+ parser/xf86Parser.h \
+ parser/xf86Optrec.h \
+ modes/xf86Modes.h \
+ modes/xf86Modes.c \
+ modes/xf86cvt.c \
+ modes/xf86Crtc.h \
+ modes/xf86Crtc.c \
+ modes/xf86EdidModes.c \
+ modes/xf86RandR12.c \
+ modes/xf86RandR12.h \
+ modes/xf86Rotate.c \
+ modes/xf86DiDGA.c
+endif
+
intel_drv_la_SOURCES = \
brw_defines.h \
brw_structs.h \
@@ -86,20 +105,7 @@ intel_drv_la_SOURCES = \
i830_render.c \
i915_render.c \
i965_render.c \
- local_xf86Rename.h \
- parser/xf86Rename.h \
- parser/xf86Parser.h \
- parser/xf86Optrec.h \
- modes/xf86Modes.h \
- modes/xf86Modes.c \
- modes/xf86cvt.c \
- modes/xf86Crtc.h \
- modes/xf86Crtc.c \
- modes/xf86EdidModes.c \
- modes/xf86RandR12.c \
- modes/xf86RandR12.h \
- modes/xf86Rotate.c \
- modes/xf86DiDGA.c
+ $(XMODE_SRCS)
EXTRA_DIST = \
packed_yuv_sf.g4a \
diff --git a/src/bios_reader/Makefile.am b/src/bios_reader/Makefile.am
index f18a00c..a5c81a6 100644
--- a/src/bios_reader/Makefile.am
+++ b/src/bios_reader/Makefile.am
@@ -1,4 +1,4 @@
-AM_CFLAGS = @XORG_CFLAGS@
+AM_CFLAGS = @XORG_CFLAGS@ @XMODES_CFLAGS@
noinst_PROGRAMS = bios_reader
diff --git a/src/ch7017/Makefile.am b/src/ch7017/Makefile.am
index 9cf2fa4..7fbb440 100644
--- a/src/ch7017/Makefile.am
+++ b/src/ch7017/Makefile.am
@@ -3,7 +3,7 @@
# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@
+AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(srcdir)/.. -I$(srcdir)/../modes
ch7017_la_LTLIBRARIES = ch7017.la
ch7017_la_LDFLAGS = -module -avoid-version
diff --git a/src/ch7017/ch7017.c b/src/ch7017/ch7017.c
index 28bce0d..019dcea 100644
--- a/src/ch7017/ch7017.c
+++ b/src/ch7017/ch7017.c
@@ -37,7 +37,7 @@
#include "compiler.h"
#include "miscstruct.h"
#include "xf86i2c.h"
-#include "../i830_xf86Crtc.h"
+#include "xf86Crtc.h"
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
diff --git a/src/ch7xxx/Makefile.am b/src/ch7xxx/Makefile.am
index 7f3b1e1..b827bf8 100644
--- a/src/ch7xxx/Makefile.am
+++ b/src/ch7xxx/Makefile.am
@@ -3,7 +3,7 @@
# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(srcdir)/../
+AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(srcdir)/.. -I$(srcdir)/../modes
ch7xxx_la_LTLIBRARIES = ch7xxx.la
ch7xxx_la_LDFLAGS = -module -avoid-version
diff --git a/src/ch7xxx/ch7xxx.c b/src/ch7xxx/ch7xxx.c
index 161aebf..9ce581f 100644
--- a/src/ch7xxx/ch7xxx.c
+++ b/src/ch7xxx/ch7xxx.c
@@ -37,7 +37,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
#include "compiler.h"
#include "miscstruct.h"
#include "xf86i2c.h"
-#include "i830_xf86Crtc.h"
+#include "xf86Crtc.h"
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
diff --git a/src/ivch/Makefile.am b/src/ivch/Makefile.am
index fac074d..40e2627 100644
--- a/src/ivch/Makefile.am
+++ b/src/ivch/Makefile.am
@@ -3,7 +3,7 @@
# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@
+AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(srcdir)/.. -I$(srcdir)/../modes
ivch_la_LTLIBRARIES = ivch.la
ivch_la_LDFLAGS = -module -avoid-version
diff --git a/src/ivch/ivch.c b/src/ivch/ivch.c
index 085b542..71f41f5 100644
--- a/src/ivch/ivch.c
+++ b/src/ivch/ivch.c
@@ -35,7 +35,7 @@
#include "compiler.h"
#include "miscstruct.h"
#include "xf86i2c.h"
-#include "../i830_xf86Crtc.h"
+#include "xf86Crtc.h"
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
diff --git a/src/sil164/Makefile.am b/src/sil164/Makefile.am
index 927f5a7..4cf717c 100644
--- a/src/sil164/Makefile.am
+++ b/src/sil164/Makefile.am
@@ -3,7 +3,7 @@
# -avoid-version prevents gratuitous .0.0.0 version numbers on the end
# _ladir passes a dummy rpath to libtool so the thing will actually link
# TODO: -nostdlib/-Bstatic/-lgcc platform magic, not installing the .a, etc.
-AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(srcdir)/../
+AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@ -I$(srcdir)/.. -I$(srcdir)/../modes
sil164_la_LTLIBRARIES = sil164.la
sil164_la_LDFLAGS = -module -avoid-version
diff --git a/src/sil164/sil164.c b/src/sil164/sil164.c
index 453ed04..80b1b6a 100644
--- a/src/sil164/sil164.c
+++ b/src/sil164/sil164.c
@@ -37,7 +37,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN
#include "compiler.h"
#include "miscstruct.h"
#include "xf86i2c.h"
-#include "i830_xf86Crtc.h"
+#include "xf86Crtc.h"
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
More information about the xorg-commit
mailing list
------------ANkSVCmprpyRJqOEtJfqin--