summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac71
-rw-r--r--src/Makefile.am38
-rw-r--r--src/bios_reader/Makefile.am2
-rw-r--r--src/ch7017/Makefile.am2
-rw-r--r--src/ch7017/ch7017.c2
-rw-r--r--src/ch7xxx/Makefile.am2
-rw-r--r--src/ch7xxx/ch7xxx.c2
-rw-r--r--src/ivch/Makefile.am2
-rw-r--r--src/ivch/ivch.c2
-rw-r--r--src/sil164/Makefile.am2
-rw-r--r--src/sil164/sil164.c2
11 files changed, 71 insertions, 56 deletions
diff --git a/configure.ac b/configure.ac
index e0d828e8..8a81859c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -76,37 +76,6 @@ AC_ARG_WITH(xserver-source,AC_HELP_STRING([--with-xserver-source=XSERVER_SOURCE]
[ 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 f656270a..1e0505f6 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,13 +25,32 @@ SUBDIRS = xvmc bios_reader ch7017 ch7xxx ivch sil164
# -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 f18a00c3..a5c81a6c 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 9cf2fa49..7fbb4408 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 28bce0d2..019dcea0 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 7f3b1e1e..b827bf8e 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 161aebf4..9ce581fa 100644
--- a/src/ch7xxx/ch7xxx.c
+++ b/src/ch7xxx/ch7xxx.c
@@ -37,7 +37,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#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 fac074db..40e26277 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 085b542a..71f41f58 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 927f5a77..4cf717c4 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 453ed044..80b1b6a8 100644
--- a/src/sil164/sil164.c
+++ b/src/sil164/sil164.c
@@ -37,7 +37,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#include "compiler.h"
#include "miscstruct.h"
#include "xf86i2c.h"
-#include "i830_xf86Crtc.h"
+#include "xf86Crtc.h"
#define DPMS_SERVER
#include <X11/extensions/dpms.h>