summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GL/glx/glcontextmodes.c3
-rw-r--r--GL/glx/glcontextmodes.h3
-rw-r--r--Makefile.am2
-rw-r--r--XTrap/Makefile.am2
-rw-r--r--Xext/Makefile.am4
-rw-r--r--Xext/extmod/Makefile.am2
-rw-r--r--Xi/Makefile.am2
-rw-r--r--afb/Makefile.am2
-rw-r--r--cfb/Makefile.am2
-rw-r--r--cfb16/Makefile.am2
-rw-r--r--cfb24/Makefile.am2
-rw-r--r--cfb32/Makefile.am2
-rw-r--r--composite/Makefile.am2
-rw-r--r--configure.ac21
-rw-r--r--damageext/Makefile.am2
-rw-r--r--dix/Makefile.am2
-rw-r--r--fb/Makefile.am2
-rw-r--r--hw/xfree86/Makefile.am2
-rw-r--r--hw/xfree86/common/Makefile.am9
-rw-r--r--hw/xfree86/ddc/Makefile.am2
-rw-r--r--hw/xfree86/dixmods/Makefile.am4
-rw-r--r--hw/xfree86/dummylib/Makefile.am2
-rw-r--r--hw/xfree86/fbdevhw/Makefile.am2
-rw-r--r--hw/xfree86/i2c/Makefile.am2
-rw-r--r--hw/xfree86/int10/Makefile.am2
-rw-r--r--hw/xfree86/loader/Makefile.am2
-rw-r--r--hw/xfree86/os-support/bus/Makefile.am2
-rw-r--r--hw/xfree86/os-support/linux/Makefile.am20
-rw-r--r--hw/xfree86/os-support/linux/drm/Makefile.am8
-rw-r--r--hw/xfree86/os-support/linux/int10/Makefile.am2
-rw-r--r--hw/xfree86/os-support/misc/Makefile.am4
-rw-r--r--hw/xfree86/parser/Makefile.am2
-rw-r--r--hw/xfree86/rac/Makefile.am2
-rw-r--r--hw/xfree86/ramdac/Makefile.am3
-rw-r--r--hw/xfree86/scanpci/Makefile.am9
-rw-r--r--hw/xfree86/shadowfb/Makefile.am2
-rw-r--r--hw/xfree86/vbe/Makefile.am2
-rw-r--r--hw/xfree86/vgahw/Makefile.am1
-rw-r--r--hw/xfree86/xaa/Makefile.am2
-rw-r--r--hw/xfree86/xf1bpp/Makefile.am2
-rw-r--r--hw/xfree86/xf4bpp/Makefile.am9
-rw-r--r--hw/xfree86/xf8_16bpp/Makefile.am4
-rw-r--r--hw/xfree86/xf8_32bpp/Makefile.am3
-rw-r--r--hw/xfree86/xf8_32wid/Makefile.am3
-rw-r--r--include/Makefile.am2
-rw-r--r--mfb/Makefile.am2
-rw-r--r--mi/Makefile.am2
-rw-r--r--miext/cw/Makefile.am2
-rw-r--r--miext/damage/Makefile.am2
-rw-r--r--miext/layer/Makefile.am2
-rw-r--r--miext/shadow/Makefile.am2
-rw-r--r--os/Makefile.am5
-rw-r--r--randr/Makefile.am2
-rw-r--r--record/Makefile.am2
-rw-r--r--render/Makefile.am2
-rw-r--r--xfixes/Makefile.am2
-rw-r--r--xkb/Makefile.am2
57 files changed, 144 insertions, 49 deletions
diff --git a/GL/glx/glcontextmodes.c b/GL/glx/glcontextmodes.c
index c540e5bae..1893a9e69 100644
--- a/GL/glx/glcontextmodes.c
+++ b/GL/glx/glcontextmodes.c
@@ -31,6 +31,9 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
+#ifdef HAVE_CONFIG_H
+#include <dix-config.h>
+#endif
#ifdef DRI_NEW_INTERFACE_ONLY
# include <stdlib.h>
# include <string.h>
diff --git a/GL/glx/glcontextmodes.h b/GL/glx/glcontextmodes.h
index 46b4c68dc..d8f2064d5 100644
--- a/GL/glx/glcontextmodes.h
+++ b/GL/glx/glcontextmodes.h
@@ -27,6 +27,9 @@
* \author Ian Romanick <idr@us.ibm.com>
*/
+#ifdef HAVE_CONFIG_H
+#include <dix-config.h>
+#endif
#ifndef GLCONTEXTMODES_H
#define GLCONTEXTMODES_H
diff --git a/Makefile.am b/Makefile.am
index 0417bf4ee..acd068ee1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-AUTOMAKE_OPTIONS=dist-bzip2 foreign
+AUTOMAKE_OPTIONS=dist-bzip2 foreign nostdinc
if COMPOSITE
COMPOSITE_DIR=composite
diff --git a/XTrap/Makefile.am b/XTrap/Makefile.am
index c3958bee1..1d9aeeb17 100644
--- a/XTrap/Makefile.am
+++ b/XTrap/Makefile.am
@@ -1,3 +1,5 @@
module_LTLIBRARIES = libxtrap.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libxtrap_la_SOURCES = xf86XTrapModule.c xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c
diff --git a/Xext/Makefile.am b/Xext/Makefile.am
index 4ae2a7d36..7d0251229 100644
--- a/Xext/Makefile.am
+++ b/Xext/Makefile.am
@@ -32,7 +32,9 @@ if XEVIE
XEVIE_SRCS = xevie.c EVIstruct.h
endif
-AM_CFLAGS = -I$(srcdir)/extmod
+INCLUDES = -I$(srcdir)/extmod
+
+AM_CFLAGS = $(DIX_CFLAGS)
EXTRA_DIST = \
dgaproc.h \
diff --git a/Xext/extmod/Makefile.am b/Xext/extmod/Makefile.am
index 3044f0372..4a11295a0 100644
--- a/Xext/extmod/Makefile.am
+++ b/Xext/extmod/Makefile.am
@@ -1 +1,3 @@
+AM_CFLAGS = $(DIX_CFLAGS)
+
EXTRA_DIST = modinit.h
diff --git a/Xi/Makefile.am b/Xi/Makefile.am
index 42514a3b9..224377e2f 100644
--- a/Xi/Makefile.am
+++ b/Xi/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libXi.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libXi_la_SOURCES = \
allowev.c \
allowev.h \
diff --git a/afb/Makefile.am b/afb/Makefile.am
index 241fbd823..9d89beb82 100644
--- a/afb/Makefile.am
+++ b/afb/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libafb.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC.c afbtileG.c afbseg.c
DISTCLEANFILES = $(libafb_gen_sources)
diff --git a/cfb/Makefile.am b/cfb/Makefile.am
index aa3744aed..4e249a7ef 100644
--- a/cfb/Makefile.am
+++ b/cfb/Makefile.am
@@ -9,7 +9,7 @@ libcfb_la_SOURCES = cfb8bit.c cfbcmap.c cfbteblt8.c cfbglrop8.c cfbpush8.c \
libcfb_la_LIBADD = ../mfb/libmfb.la
-AM_CFLAGS = -DPSZ=8
+AM_CFLAGS = -DPSZ=8 $(DIX_CFLAGS)
INCLUDES = $(CFB_INCLUDES)
diff --git a/cfb16/Makefile.am b/cfb16/Makefile.am
index 3f194273d..23d42dfb4 100644
--- a/cfb16/Makefile.am
+++ b/cfb16/Makefile.am
@@ -6,4 +6,4 @@ libcfb16_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources)
INCLUDES = $(CFB_INCLUDES)
-AM_CFLAGS = -DPSZ=16
+AM_CFLAGS = -DPSZ=16 $(DIX_CFLAGS)
diff --git a/cfb24/Makefile.am b/cfb24/Makefile.am
index 9c8ec7c31..ab389c69b 100644
--- a/cfb24/Makefile.am
+++ b/cfb24/Makefile.am
@@ -6,6 +6,6 @@ libcfb24_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources)
EXTRA_DIST = cfbrrop24.h
-AM_CFLAGS = -DPSZ=24
+AM_CFLAGS = -DPSZ=24 $(DIX_CFLAGS)
INCLUDES = $(CFB_INCLUDES)
diff --git a/cfb32/Makefile.am b/cfb32/Makefile.am
index f2f8edda6..9ebc7166e 100644
--- a/cfb32/Makefile.am
+++ b/cfb32/Makefile.am
@@ -4,6 +4,6 @@ include $(top_srcdir)/cfb/Makefile.am.inc
libcfb32_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources)
-INCLUDES = $(CFB_INCLUDES)
+INCLUDES = $(CFB_INCLUDES) $(DIX_CFLAGS)
AM_CFLAGS = -DPSZ=32
diff --git a/composite/Makefile.am b/composite/Makefile.am
index c4d0f3799..21504e659 100644
--- a/composite/Makefile.am
+++ b/composite/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libcomposite.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libcomposite_la_SOURCES = \
compalloc.c \
compext.c \
diff --git a/configure.ac b/configure.ac
index 36153f0f1..e8d8c6dd9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -129,7 +129,6 @@ VERSION_STRING="${DEFAULT_VENDOR_RELEASE//./,},0"
DEFAULT_VENDOR_WEB="http://wiki.x.org"
EXTENSION_LIBS='$(top_builddir)/Xext/libXext.la'
DMX_EXTENSIONS='$(top_builddir)/Xext/libXext.la'" "'$(top_builddir)/render/librender.la'
-CORE_INCS='-I$(top_srcdir)/include'
EXTENSION_INCS='-I$(top_srcdir)/Xext'
AC_DEFINE(XORG_SERVER, 1, [Build X.Org X server])
@@ -225,6 +224,7 @@ fi
AC_DEFINE(XKB,1,[Build XKB])
AC_DEFINE(XKB_IN_SERVER,1,[Build XKB server])
AC_DEFINE(XKB_DFLT_DISABLED,0,[Enable XKB per default])
+REQUIRED_MODULES="$REQUIRED_MODULES xkbfile"
AC_DEFINE(XINPUT,,[Build XInput])
AC_SUBST([XKB])
@@ -426,6 +426,7 @@ XPSTUBS_LIB='$(top_builddir)/dix/libxpstubs.la'
XKB_LIB='$(top_builddir)/xkb/libxkb.la'
XI_LIB='$(top_builddir)/Xi/libXi.la'
XI_INC='-I$(top_srcdir)/Xi'
+CORE_INCS='-I$(top_srcdir)/include -I$(top_builddir)/inc'
PKG_CHECK_MODULES([XSERVER], [$REQUIRED_MODULES])
XSERVER_LIBS="${XSERVER_LIBS} -lm -lz"
@@ -443,30 +444,25 @@ else
ENDIAN="X_LITTLE_ENDIAN"
fi
AC_DEFINE_UNQUOTED(X_BYTE_ORDER,[$ENDIAN],[Endian order])
-XORG_CFLAGS="$XORGSERVER_CFLAGS $XORG_INCS"
+XORG_CFLAGS="$XORGSERVER_CFLAGS -DHAVE_XORG_CONFIG_H"
case $host_os in
linux-gnu*)
- # support: yea
XORG_OS="linux"
XORG_OS_SUBDIR="linux"
;;
freebsd*)
- # support: nay
XORG_OS="freebsd"
XORG_OS_SUBDIR="bsd"
;;
netbsd*)
- # support: nay
XORG_OS="netbsd"
XORG_OS_SUBDIR="bsd"
;;
openbsd*)
- # support: nay
XORG_OS="openbsd"
XORG_OS_SUBDIR="bsd"
;;
solaris*)
- # support: nay
XORG_OS="solaris"
XORG_OS_SUBDIR="solaris"
;;
@@ -510,6 +506,14 @@ AC_DEFINE_DIR(XKB_BASE_DIRECTORY, XKBDIR, [Path to XKB data])
AC_DEFINE(XORGSERVER,,[Build Xorg server])
AC_DEFINE_UNQUOTED(__VENDORDWEBSUPPORT__, ["$VENDOR_WEB"], [Vendor web address for support])
+dnl only used in hw/xfree86/scanpci, TTBOMK
+AC_PATH_PROG(PERL, perl, no)
+dnl unlikely as this may be ...
+if test "x$PERL" = xno; then
+ AC_MSG_ERROR([Perl is required to build the XFree86/Xorg DDX.])
+fi
+AC_SUBST(PERL)
+
dnl and the rest of these are generic, so they're in config.h
AC_DEFINE(XFree86XDGA,1,[Build XDGA support])
AC_DEFINE(XF86BIGFONT,1,[Build XFree86 BigFont extension])
@@ -539,6 +543,9 @@ AC_SUBST([CFLAGS])
BUILD_DATE="$(date +'%Y%m%d')"
AC_SUBST([BUILD_DATE])
+DIX_CFLAGS="-DHAVE_DIX_CONFIG_H"
+AC_SUBST([DIX_CFLAGS])
+
AC_MSG_CHECKING(if unaligned word accesses behave as expected)
AC_TRY_RUN([
#include <stdio.h>
diff --git a/damageext/Makefile.am b/damageext/Makefile.am
index 557a61e4d..35f7620fb 100644
--- a/damageext/Makefile.am
+++ b/damageext/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libdamageext.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libdamageext_la_SOURCES = \
damageext.c \
damageext.h \
diff --git a/dix/Makefile.am b/dix/Makefile.am
index 02b04f574..ba65c2909 100644
--- a/dix/Makefile.am
+++ b/dix/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libdix.la libxpstubs.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libdix_la_SOURCES = \
atom.c \
colormap.c \
diff --git a/fb/Makefile.am b/fb/Makefile.am
index 64bbef2ab..4f82f6db4 100644
--- a/fb/Makefile.am
+++ b/fb/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libfb.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
sdk_HEADERS = fb.h fbrop.h
libfb_la_SOURCES = \
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 1f48cb02d..b45a8685f 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -32,5 +32,3 @@ Xorg_LDADD = $(XORG_LIBS) \
-ldl
Xorg_LDFLAGS = -rdynamic
-
-sdk_HEADERS = xf86Date.h xf86Version.h xorgVersion.h
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 34b6cc384..e67d14dd3 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -44,9 +44,9 @@ libcommon_a_SOURCES = xf86Configure.c xf86Bus.c xf86Config.c \
xf86Cursor.c xf86DGA.c xf86DPMS.c xf86DefModes.c \
xf86DoProbe.c xf86DoScanPci.c xf86Events.c \
xf86Globals.c xf86Io.c xf86AutoConfig.c \
- xf86MiscExt.c xf86Option.c xf86PM.c \
+ xf86MiscExt.c xf86Option.c \
xf86VidMode.c xf86fbman.c xf86cmap.c \
- ../scanpci/xf86ScanPci.c xf86Helper.c \
+ xf86Helper.c \
xf86Mode.c xf86Build.h xorgHelper.c xf86Versions.c \
$(XVSOURCES) $(BUSSOURCES) $(XKBSOURCES) \
$(DEBUGSOURCES) $(XISOURCES) $(RANDRSOURCES) \
@@ -92,6 +92,9 @@ EXTRA_DIST = \
xf86xvmc.h \
xf86xvpriv.h \
xisb.h \
- xf86Build.h.in
+ xf86Build.h.in \
+ xf86Version.h \
+ xorgVersion.h \
+ xf86Date.h
AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/ddc/Makefile.am b/hw/xfree86/ddc/Makefile.am
index 1000cd527..d4d85d2ad 100644
--- a/hw/xfree86/ddc/Makefile.am
+++ b/hw/xfree86/ddc/Makefile.am
@@ -6,4 +6,6 @@ libddc_la_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \
INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
+AM_CFLAGS = $(XORG_CFLAGS)
+
EXTRA_DIST = ddcPriv.h
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index 361b71a79..0810c6b00 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -3,7 +3,7 @@ noinst_LTLIBRARIES = libdixmods.la
module_LTLIBRARIES = libbitmap.la libfb.la
# yes, this is a cheesy hack.
-AM_CFLAGS = -include xorg-config.h $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) -include xorg-config.h
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/afb -I$(top_srcdir)/mfb \
-I$(top_srcdir)/cfb -I$(top_srcdir)/dbe -I$(srcdir)/../loader \
-I$(top_srcdir)/miext/layer -I$(top_srcdir)/miext/shadow
@@ -32,7 +32,7 @@ libdixmods_la_SOURCES = \
$(top_srcdir)/Xext/xf86misc.c \
$(top_srcdir)/Xext/xf86vmode.c
-xkb%.c: $(srcdir)/ddx$*.c
+xkb%.c:
echo "#define XF86DDXACTIONS" > $@
echo "#include \"$(top_srcdir)/xkb/ddx$*.c\"" >> $@
diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am
index d96407d01..0938eec49 100644
--- a/hw/xfree86/dummylib/Makefile.am
+++ b/hw/xfree86/dummylib/Makefile.am
@@ -2,6 +2,8 @@ noinst_LIBRARIES = libdummy.a
INCLUDES = $(XORG_INCS)
+AM_CFLAGS = $(XORG_CFLAGS)
+
libdummy_a_SOURCES = getvalidbios.c \
pcitestmulti.c xf86allocscripi.c \
xf86addrestolist.c xf86drvmsg.c xf86drvmsgverb.c \
diff --git a/hw/xfree86/fbdevhw/Makefile.am b/hw/xfree86/fbdevhw/Makefile.am
index 722ea35b0..a3283290c 100644
--- a/hw/xfree86/fbdevhw/Makefile.am
+++ b/hw/xfree86/fbdevhw/Makefile.am
@@ -8,6 +8,8 @@ libfbdevhw_la_SOURCES = fbdevhw.c
INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
+AM_CFLAGS = $(XORG_CFLAGS)
+
sdk_HEADERS = fbdevhw.h
EXTRA_DIST = fbpriv.h
diff --git a/hw/xfree86/i2c/Makefile.am b/hw/xfree86/i2c/Makefile.am
index 1b29aec01..cd244a1c6 100644
--- a/hw/xfree86/i2c/Makefile.am
+++ b/hw/xfree86/i2c/Makefile.am
@@ -4,4 +4,6 @@ libi2c_la_SOURCES = xf86i2c.c xf86i2cmodule.c
INCLUDES = $(XORG_INCS)
+AM_CFLAGS = $(XORG_CFLAGS)
+
sdk_HEADERS = xf86i2c.h
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index 99fd30731..b0ff56f9f 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -23,7 +23,7 @@ libint10_la_SOURCES = pci.c xf86int10module.c helper_exec.c helper_mem.c \
endif
if INT10_STUB
-AM_CFLAGS = -D_PC -D_VM86_LINUX
+AM_CFLAGS = -D_PC -D_VM86_LINUX $(XORG_CFLAGS)
libint10_la_SOURCES = stub.c xf86int10module.c
endif
diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am
index 948ee4ed8..832d46a0b 100644
--- a/hw/xfree86/loader/Makefile.am
+++ b/hw/xfree86/loader/Makefile.am
@@ -5,7 +5,7 @@ INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../vbe \
-I$(srcdir)/../vgahw -I$(srcdir)/../ramdac -I$(srcdir)/../shadowfb
#AM_LDFLAGS = -r
-AM_CFLAGS = -DIN_LOADER
+AM_CFLAGS = -DIN_LOADER $(XORG_CFLAGS)
EXTRA_DIST = \
aout.h \
diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am
index 4e9d7861b..020554512 100644
--- a/hw/xfree86/os-support/bus/Makefile.am
+++ b/hw/xfree86/os-support/bus/Makefile.am
@@ -11,6 +11,8 @@ endif
INCLUDES = $(XORG_INCS)
+AM_CFLAGS = $(XORG_CFLAGS)
+
EXTRA_DIST = \
460gxPCI.h \
Pci.h \
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 0dac944b9..eca77f123 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -5,18 +5,20 @@ endif
noinst_LIBRARIES = liblinux.a
liblinux_a_SOURCES = lnx_init.c lnx_video.c lnx_io.c lnx_kbd.c lnx_mouse.c \
- lnx_pci.c lnx_apm.c lnx_agp.c lnx_kmod.c lnx_KbdMap.c \
- ../shared/bios_mmap.c ../shared/VTsw_usl.c \
- ../shared/std_kbdEv.c ../shared/posix_tty.c \
- ../shared/vidmem.c ../shared/sigio.c \
- ../shared/stdResource.c ../shared/libc_wrapper.c \
- ../shared/at_scancode.c
-#libxorglinux_a_LIBADD = int10/libxorglinuxint10.a \
-# $(DRI_LIBS)
+ lnx_pci.c lnx_agp.c lnx_kmod.c lnx_KbdMap.c \
+ $(srcdir)/../shared/bios_mmap.c \
+ $(srcdir)/../shared/VTsw_usl.c \
+ $(srcdir)/../shared/std_kbdEv.c \
+ $(srcdir)/../shared/posix_tty.c \
+ $(srcdir)/../shared/vidmem.c \
+ $(srcdir)/../shared/sigio.c \
+ $(srcdir)/../shared/stdResource.c \
+ $(srcdir)/../shared/libc_wrapper.c \
+ $(srcdir)/../shared/at_scancode.c
sdk_HEADERS = agpgart.h
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS)
SUBDIRS = $(DRI_SUBDIRS)
diff --git a/hw/xfree86/os-support/linux/drm/Makefile.am b/hw/xfree86/os-support/linux/drm/Makefile.am
index 6f2258f19..0be0ccba3 100644
--- a/hw/xfree86/os-support/linux/drm/Makefile.am
+++ b/hw/xfree86/os-support/linux/drm/Makefile.am
@@ -1,8 +1,8 @@
INCLUDES = -I$(srcdir)/../../shared/drm/kernel
-noinst_LIBRARIES = libxorglinuxdrm.a
+sdklibdir = $(libdir)/xorg
+sdklib_LIBRARIES = libxorglinuxdrm.a
libxorglinuxdrm_a_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c \
- xf86drmSL.c drmmodule.c
+ xf86drmSL.c drmmodule.c
-sdk_LIBDIR = $(libdir)/xorg
-sdk_LIBS = libxorglinuxdrm.a
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/os-support/linux/int10/Makefile.am b/hw/xfree86/os-support/linux/int10/Makefile.am
index 598b09e15..d944053ec 100644
--- a/hw/xfree86/os-support/linux/int10/Makefile.am
+++ b/hw/xfree86/os-support/linux/int10/Makefile.am
@@ -1,5 +1,7 @@
INCLUDES = -I$(srcdir)/../../../int10
+AM_CFLAGS = $(XORG_CFLAGS)
+
noinst_LIBRARIES = libxorglinuxint10.a
libxorglinuxint10_a_SOURCES = linux.c ../../../int10/helper_mem.c \
../../../int10/pci.c \
diff --git a/hw/xfree86/os-support/misc/Makefile.am b/hw/xfree86/os-support/misc/Makefile.am
index 11d253479..a401320d6 100644
--- a/hw/xfree86/os-support/misc/Makefile.am
+++ b/hw/xfree86/os-support/misc/Makefile.am
@@ -2,6 +2,8 @@ noinst_LIBRARIES = libmisc.a
libmisc_a_SOURCES = Delay.c IODelay.c BUSmemcpy.c SlowBcopy.c
-AM_LDFLAGS = -r
+#AM_LDFLAGS = -r
INCLUDES = $(XORG_INCS)
+
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am
index 812df92df..5dfa33dd0 100644
--- a/hw/xfree86/parser/Makefile.am
+++ b/hw/xfree86/parser/Makefile.am
@@ -3,6 +3,8 @@ libparser_a_SOURCES = Device.c Files.c Flags.c Input.c Keyboard.c Layout.c \
Module.c Video.c Monitor.c Pointer.c Screen.c \
Vendor.c read.c scan.c write.c DRI.c Extensions.c
+AM_CFLAGS = $(XORG_CFLAGS)
+
EXTRA_DIST = \
Configint.h \
configProcs.h \
diff --git a/hw/xfree86/rac/Makefile.am b/hw/xfree86/rac/Makefile.am
index 2d02a81c2..a4a751cd0 100644
--- a/hw/xfree86/rac/Makefile.am
+++ b/hw/xfree86/rac/Makefile.am
@@ -4,3 +4,5 @@ librac_la_SOURCES = xf86RACmodule.c xf86RAC.c
sdk_HEADERS = xf86RAC.h
INCLUDES = $(XORG_INCS)
+
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/ramdac/Makefile.am b/hw/xfree86/ramdac/Makefile.am
index e9edef244..9833431de 100644
--- a/hw/xfree86/ramdac/Makefile.am
+++ b/hw/xfree86/ramdac/Makefile.am
@@ -8,7 +8,8 @@ sdk_HEADERS = BT.h IBM.h TI.h xf86Cursor.h xf86RamDac.h
DISTCLEANFILES = xf86BitOrder.c
EXTRA_DIST = BTPriv.h IBMPriv.h TIPriv.h xf86CursorPriv.h xf86RamDacPriv.h
-AM_CFLAGS = -DXAAReverseBitOrder=xf86ReverseBitOrder -DRAMDAC_MODULE
+AM_CFLAGS = -DXAAReverseBitOrder=xf86ReverseBitOrder -DRAMDAC_MODULE \
+ $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS)
xf86BitOrder.c:
diff --git a/hw/xfree86/scanpci/Makefile.am b/hw/xfree86/scanpci/Makefile.am
index f52d91b61..78aaffdd2 100644
--- a/hw/xfree86/scanpci/Makefile.am
+++ b/hw/xfree86/scanpci/Makefile.am
@@ -5,6 +5,10 @@ libscanpci_la_SOURCES = xf86ScanPci.c
INCLUDES = $(XORG_INCS)
+AM_CFLAGS = $(XORG_CFLAGS)
+
+BUILT_SOURCES = xf86PciIds.h
+
EXTRA_DIST = \
xf86PciData.h \
xf86PciIds.h \
@@ -16,4 +20,7 @@ xf86PciData.c:
echo "#define PCIDATA" > $@
echo "#include \"$(srcdir)/xf86ScanPci.c\"" >> $@
-DISTCLEANFILES = xf86PciData.c
+xf86PciIds.h: $(srcdir)/../common/xf86PciInfo.h
+ $(PERL) $(srcdir)/pciid2c.pl $(srcdir)/../common/xf86PciInfo.h < $(srcdir)/pci.ids > xf86PciIds.h
+
+DISTCLEANFILES = xf86PciData.c xf86PciIds.h
diff --git a/hw/xfree86/shadowfb/Makefile.am b/hw/xfree86/shadowfb/Makefile.am
index d8e2e1dc9..8316eb660 100644
--- a/hw/xfree86/shadowfb/Makefile.am
+++ b/hw/xfree86/shadowfb/Makefile.am
@@ -4,3 +4,5 @@ libshadowfb_la_SOURCES = sfbmodule.c shadow.c
sdk_HEADERS = shadowfb.h
INCLUDES = $(XORG_INCS)
+
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/vbe/Makefile.am b/hw/xfree86/vbe/Makefile.am
index 91d4a9129..c27541ae6 100644
--- a/hw/xfree86/vbe/Makefile.am
+++ b/hw/xfree86/vbe/Makefile.am
@@ -3,5 +3,7 @@ libvbe_la_SOURCES = vbe.c vbeModes.c vbe_module.c
sdk_HEADERS = vbe.h vbeModes.h
+AM_CFLAGS = $(XORG_CFLAGS)
+
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
-I$(srcdir)/../int10
diff --git a/hw/xfree86/vgahw/Makefile.am b/hw/xfree86/vgahw/Makefile.am
index cffcea32f..5e8c41f49 100644
--- a/hw/xfree86/vgahw/Makefile.am
+++ b/hw/xfree86/vgahw/Makefile.am
@@ -1,5 +1,6 @@
module_LTLIBRARIES = libvgahw.la
libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c
+AM_CFLAGS = $(XORG_CFLAGS)
sdk_HEADERS = vgaHW.h
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index eeebf924e..36e2adae7 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -61,3 +61,5 @@ EXTRA_DIST = xaaWrapper.h xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
xaaStipple.c xaaTEGlyph.c xaaBitmap.c
INCLUDES = $(XORG_INCS)
+
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/xf1bpp/Makefile.am b/hw/xfree86/xf1bpp/Makefile.am
index 79275ee55..0758e6709 100644
--- a/hw/xfree86/xf1bpp/Makefile.am
+++ b/hw/xfree86/xf1bpp/Makefile.am
@@ -58,7 +58,7 @@ libxf1bppmfb_a_SOURCES = \
libxf1bpp_la_SOURCES = $(libxf1bppmfb_a_SOURCES) $(libxf1bppgen_a_SOURCES)
-AM_CFLAGS = -DXF86MONO -include mfbmap.h
+AM_CFLAGS = -DXF86MONO -include mfbmap.h $(XORG_CFLAGS)
INCLUDES = $(XORG_INCS)
mfbseg.c:
diff --git a/hw/xfree86/xf4bpp/Makefile.am b/hw/xfree86/xf4bpp/Makefile.am
index c1b24d3de..2dfc20b8c 100644
--- a/hw/xfree86/xf4bpp/Makefile.am
+++ b/hw/xfree86/xf4bpp/Makefile.am
@@ -43,8 +43,8 @@ libxf4bpp_la_SOURCES = \
mfbfillarc.c \
mfbzerarc.c \
vgamodule.c
-
-libxf4bpp_la_LIBADD=../xf1bpp/libxf1bpp.la
+
+libxf4bpp_la_LIBADD = ../xf1bpp/libxf1bpp.la
EXTRA_DIST = OScompiler.h ibmTrace.h ppcGCstr.h ppcSpMcro.h vgaReg.h \
vgaVideo.h wm3.h
@@ -55,5 +55,6 @@ mfbseg.c:
echo "#define POLYSEGMENT" > $@
echo "#include \"$(top_srcdir)/mfb/mfbline.c\"" >> $@
-INCLUDES = $(XORG_INCS) -I$(srcdir)/../xf1bpp -I$(top_srcdir)/mfb \
- -I$(top_srcdir)/cfb
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../xf1bpp
+
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/xf8_16bpp/Makefile.am b/hw/xfree86/xf8_16bpp/Makefile.am
index b584362a7..1ead8f1bd 100644
--- a/hw/xfree86/xf8_16bpp/Makefile.am
+++ b/hw/xfree86/xf8_16bpp/Makefile.am
@@ -2,7 +2,9 @@ module_LTLIBRARIES = libxf8_16bpp.la
sdk_HEADERS = cfb8_16.h
-INCLUDES = $(XORG_INCS) -I$(top_srcdir)/cfb -I$(top_srcdir)/mfb
+INCLUDES = $(XORG_INCS)
+
+AM_CFLAGS = $(XORG_CFLAGS)
libxf8_16bpp_la_SOURCES = \
cfb8_16module.c \
diff --git a/hw/xfree86/xf8_32bpp/Makefile.am b/hw/xfree86/xf8_32bpp/Makefile.am
index b9afbe557..f96fb6b19 100644
--- a/hw/xfree86/xf8_32bpp/Makefile.am
+++ b/hw/xfree86/xf8_32bpp/Makefile.am
@@ -2,7 +2,8 @@ module_LTLIBRARIES = libxf8_32bpp.la
sdk_HEADERS = cfb8_32.h
-INCLUDES = -I$(top_srcdir)/cfb -I$(top_srcdir)/mfb
+INCLUDES = $(XORG_INCS)
+AM_CFLAGS = $(XORG_CFLAGS)
libxf8_32bpp_la_SOURCES = \
cfbbstore.c \
diff --git a/hw/xfree86/xf8_32wid/Makefile.am b/hw/xfree86/xf8_32wid/Makefile.am
index 1d1227189..0e1860e5d 100644
--- a/hw/xfree86/xf8_32wid/Makefile.am
+++ b/hw/xfree86/xf8_32wid/Makefile.am
@@ -2,7 +2,8 @@ module_LTLIBRARIES = libxf8_32wid.la
sdk_HEADERS = cfb8_32wid.h
-INCLUDES = $(XORG_INCS) -I$(top_srcdir)/cfb -I$(top_srcdir)/mfb
+INCLUDES = $(XORG_INCS)
+AM_CFLAGS = $(XORG_CFLAGS)
libxf8_32wid_la_SOURCES = \
cfb8_32widmodule.c \
diff --git a/include/Makefile.am b/include/Makefile.am
index 5890c964e..7c14785e4 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -45,4 +45,6 @@ sdk_HEADERS = \
windowstr.h \
xorg-server.h
+AM_CFLAGS = $(DIX_CFLAGS)
+
EXTRA_DIST = $(sdk_HEADERS) do-not-use-config.h dix-config.h xorg-config.h
diff --git a/mfb/Makefile.am b/mfb/Makefile.am
index b023446d2..95bdabb57 100644
--- a/mfb/Makefile.am
+++ b/mfb/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libmfb.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libmfb_gen_sources = mfbseg.c mfbpgbwht.c mfbpgbblak.c mfbpgbinv.c mfbigbwht.c \
mfbigbblak.c mfbpawhite.c mfbpablack.c mfbpainv.c mfbtewhite.c \
mfbteblack.c mfbbltC.c mfbbltX.c mfbbltCI.c mfbbltO.c mfbbltG.c \
diff --git a/mi/Makefile.am b/mi/Makefile.am
index 900fbfd59..ff1fec605 100644
--- a/mi/Makefile.am
+++ b/mi/Makefile.am
@@ -3,6 +3,8 @@ noinst_LTLIBRARIES = libminimi.la libmi.la
sdk_HEADERS = mibank.h micmap.h miline.h mipointer.h mi.h mibstore.h \
migc.h mipointrst.h mizerarc.h micoord.h
+AM_CFLAGS = $(DIX_CFLAGS)
+
# libminimi is for dmx - it has different defines for miinitext.c
libminimi_la_SOURCES = \
cbrt.c \
diff --git a/miext/cw/Makefile.am b/miext/cw/Makefile.am
index cb5bc8c8a..9380ae8f2 100644
--- a/miext/cw/Makefile.am
+++ b/miext/cw/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libcw.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libcw_la_SOURCES = \
cw.c \
cw_ops.c \
diff --git a/miext/damage/Makefile.am b/miext/damage/Makefile.am
index 7c0a3cd64..1fe137fc3 100644
--- a/miext/damage/Makefile.am
+++ b/miext/damage/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libdamage.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libdamage_la_SOURCES = \
damage.c \
damage.h \
diff --git a/miext/layer/Makefile.am b/miext/layer/Makefile.am
index cc4da4d88..fdb4f50c5 100644
--- a/miext/layer/Makefile.am
+++ b/miext/layer/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = liblayer.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
liblayer_la_SOURCES = \
layer.h \
layergc.c \
diff --git a/miext/shadow/Makefile.am b/miext/shadow/Makefile.am
index 2c396ddfe..1351bc702 100644
--- a/miext/shadow/Makefile.am
+++ b/miext/shadow/Makefile.am
@@ -1,5 +1,7 @@
module_LTLIBRARIES = libshadow.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
sdk_HEADERS = shadow.h
libshadow_la_SOURCES = \
diff --git a/os/Makefile.am b/os/Makefile.am
index 934ee55c6..30c4b56c8 100644
--- a/os/Makefile.am
+++ b/os/Makefile.am
@@ -1,8 +1,7 @@
noinst_LTLIBRARIES = libos.la
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+AM_CFLAGS = $(DIX_CFLAGS)
+
# k5auth.c \
# lbxio.c \
# rpcauth.c \
diff --git a/randr/Makefile.am b/randr/Makefile.am
index 16cf287c0..5e1067b70 100644
--- a/randr/Makefile.am
+++ b/randr/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = librandr.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
librandr_la_SOURCES = \
mirandr.c \
randr.c \
diff --git a/record/Makefile.am b/record/Makefile.am
index 04ae8290f..2a64f3189 100644
--- a/record/Makefile.am
+++ b/record/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = librecord.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
librecord_la_SOURCES = record.c set.c
EXTRA_DIST = set.h
diff --git a/render/Makefile.am b/render/Makefile.am
index 5041df14f..e85f0fef3 100644
--- a/render/Makefile.am
+++ b/render/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = librender.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
librender_la_SOURCES = \
animcur.c \
filter.c \
diff --git a/xfixes/Makefile.am b/xfixes/Makefile.am
index eccdeef36..2a95c065b 100644
--- a/xfixes/Makefile.am
+++ b/xfixes/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libxfixes.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
libxfixes_la_SOURCES = \
cursor.c \
region.c \
diff --git a/xkb/Makefile.am b/xkb/Makefile.am
index d02a446a0..d4142b6df 100644
--- a/xkb/Makefile.am
+++ b/xkb/Makefile.am
@@ -1,5 +1,7 @@
noinst_LTLIBRARIES = libxkb.la
+AM_CFLAGS = $(DIX_CFLAGS)
+
DDX_SRCS = \
ddxBeep.c \
ddxCtrls.c \