summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/dmx/glxProxy/Makefile.am4
-rw-r--r--hw/xfree86/Makefile.am2
-rw-r--r--hw/xfree86/common/Makefile.am2
-rw-r--r--hw/xfree86/ddc/Makefile.am2
-rw-r--r--hw/xfree86/dixmods/Makefile.am30
-rw-r--r--hw/xfree86/dixmods/extmod/Makefile.am7
-rw-r--r--hw/xfree86/dri/Makefile.am3
-rw-r--r--hw/xfree86/dummylib/Makefile.am8
-rw-r--r--hw/xfree86/exa/Makefile.am2
-rw-r--r--hw/xfree86/fbdevhw/Makefile.am5
-rw-r--r--hw/xfree86/i2c/Makefile.am5
-rw-r--r--hw/xfree86/int10/Makefile.am8
-rw-r--r--hw/xfree86/loader/Makefile.am2
-rw-r--r--hw/xfree86/os-support/bsd/Makefile.am2
-rw-r--r--hw/xfree86/os-support/bus/Makefile.am2
-rw-r--r--hw/xfree86/os-support/drm/Makefile.am3
-rw-r--r--hw/xfree86/os-support/linux/Makefile.am2
-rw-r--r--hw/xfree86/os-support/misc/Makefile.am2
-rw-r--r--hw/xfree86/os-support/solaris/Makefile.am2
-rw-r--r--hw/xfree86/parser/Makefile.am2
-rw-r--r--hw/xfree86/rac/Makefile.am2
-rw-r--r--hw/xfree86/ramdac/Makefile.am2
-rw-r--r--hw/xfree86/scanpci/Makefile.am2
-rw-r--r--hw/xfree86/shadowfb/Makefile.am2
-rw-r--r--hw/xfree86/utils/xorgcfg/Makefile.am7
-rw-r--r--hw/xfree86/vbe/Makefile.am2
-rw-r--r--hw/xfree86/vgahw/Makefile.am2
-rw-r--r--hw/xfree86/x86emu/Makefile.am2
-rw-r--r--hw/xfree86/xaa/Makefile.am2
-rw-r--r--hw/xfree86/xf1bpp/Makefile.am3
-rw-r--r--hw/xfree86/xf4bpp/Makefile.am2
-rw-r--r--hw/xfree86/xf8_16bpp/Makefile.am2
-rw-r--r--hw/xfree86/xf8_32bpp/Makefile.am2
-rw-r--r--hw/xfree86/xf8_32wid/Makefile.am2
34 files changed, 71 insertions, 58 deletions
diff --git a/hw/dmx/glxProxy/Makefile.am b/hw/dmx/glxProxy/Makefile.am
index 78fe186c1..e325b5c8a 100644
--- a/hw/dmx/glxProxy/Makefile.am
+++ b/hw/dmx/glxProxy/Makefile.am
@@ -37,4 +37,6 @@ AM_CFLAGS = -I$(top_srcdir)/hw/dmx \
-I$(top_builddir)/GL/include \
-I@MESA_SOURCE@/include \
-DHAVE_DMX_CONFIG_H \
- @DMXMODULES_CFLAGS@
+ @DMXMODULES_CFLAGS@ \
+ @MODULE_DEFINES@ \
+ -I$(top_srcdir)/hw/xfree86/os-support
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
index 944042521..89ef3bbe7 100644
--- a/hw/xfree86/Makefile.am
+++ b/hw/xfree86/Makefile.am
@@ -17,7 +17,7 @@ DIST_SUBDIRS = common ddc dummylib i2c x86emu int10 fbdevhw os-support \
bin_PROGRAMS = Xorg
-AM_CFLAGS = @XORG_CFLAGS@
+AM_CFLAGS = @XORG_CFLAGS@ @LOADER_DEFINES@
INCLUDES = @XORG_INCS@
Xorg_SOURCES = xorg.c
diff --git a/hw/xfree86/common/Makefile.am b/hw/xfree86/common/Makefile.am
index 8c18be5dc..3a2ca19a4 100644
--- a/hw/xfree86/common/Makefile.am
+++ b/hw/xfree86/common/Makefile.am
@@ -98,4 +98,4 @@ EXTRA_DIST = \
modeline2c.pl \
$(DISTKBDSOURCES)
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @LOADER_DEFINES@
diff --git a/hw/xfree86/ddc/Makefile.am b/hw/xfree86/ddc/Makefile.am
index 7cfff4763..eb43195a2 100644
--- a/hw/xfree86/ddc/Makefile.am
+++ b/hw/xfree86/ddc/Makefile.am
@@ -8,6 +8,6 @@ libddc_la_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \
INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
EXTRA_DIST = ddcPriv.h DDC.HOWTO
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
index e7b2a264b..68aaea8af 100644
--- a/hw/xfree86/dixmods/Makefile.am
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -11,23 +11,27 @@ XTRAPMOD = libxtrap.la
endif
module_LTLIBRARIES = libafb.la \
- libbitmap.la \
libcfb.la \
libcfb16.la \
libcfb24.la \
libcfb32.la \
- libdbe.la \
libfb.la \
liblayer.la \
libmfb.la \
- librecord.la \
- libshadow.la \
- libfreetype.la \
- libtype1.la \
- $(GLXMODS) \
- $(XTRAPMOD)
-
-AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@
+ libshadow.la
+
+extsmoduledir = $(moduledir)/extensions
+extsmodule_LTLIBRARIES = libdbe.la \
+ librecord.la \
+ $(GLXMODS) \
+ $(XTRAPMOD)
+
+fontsmoduledir = $(moduledir)/fonts
+fontsmodule_LTLIBRARIES = libbitmap.la \
+ libfreetype.la \
+ libtype1.la
+
+AM_CFLAGS = @XORG_CFLAGS@ @DIX_CFLAGS@ @LOADER_DEFINES@
INCLUDES = @XORG_INCS@ \
-I$(top_srcdir)/afb \
-I$(top_srcdir)/cfb \
@@ -67,7 +71,7 @@ libcfb32_la_LIBADD = $(top_builddir)/cfb32/libcfb32.la
libcfb32_la_SOURCES = cfb32module.c
libdbe_la_LDFLAGS = -avoid-version
-libdbe_la_LIBADD = $(top_builddir)/dbe/libdbe.la
+libdbe_la_LIBADD = $(top_builddir)/dbe/libdbemodule.la
libdbe_la_SOURCES = dbemodule.c
libfb_la_CFLAGS = -DXFree86Server $(AM_CFLAGS)
@@ -88,7 +92,7 @@ libmfb_la_LIBADD = $(top_builddir)/mfb/libmfb.la
libmfb_la_SOURCES = mfbmodule.c
librecord_la_LDFLAGS = -avoid-version
-librecord_la_LIBADD = $(top_builddir)/record/librecord.la
+librecord_la_LIBADD = $(top_builddir)/record/librecordmodule.la
librecord_la_SOURCES = recordmod.c
libshadow_la_LDFLAGS = -avoid-version
@@ -106,7 +110,7 @@ libdixmods_la_SOURCES = $(top_srcdir)/mi/miinitext.c
libxorgxkb_la_SOURCES = xkbVT.c xkbPrivate.c xkbKillSrv.c
libxtrap_la_LDFLAGS = -avoid-version
-libxtrap_la_LIBADD = $(top_builddir)/XTrap/libxtrap.la
+libxtrap_la_LIBADD = $(top_builddir)/XTrap/libxtrapmodule.la
libxtrap_la_SOURCES = xf86XTrapModule.c
xkb%.c:
diff --git a/hw/xfree86/dixmods/extmod/Makefile.am b/hw/xfree86/dixmods/extmod/Makefile.am
index 9f3c9ffc8..35b32f6d0 100644
--- a/hw/xfree86/dixmods/extmod/Makefile.am
+++ b/hw/xfree86/dixmods/extmod/Makefile.am
@@ -1,6 +1,7 @@
sdk_HEADERS = dgaproc.h
-module_LTLIBRARIES = libextmod.la
+extsmoduledir = $(moduledir)/extensions
+extsmodule_LTLIBRARIES = libextmod.la
if DGA
DGA_SRCS = xf86dga.c xf86dga2.c dgaproc.h xf86dgaext.h
@@ -10,7 +11,7 @@ if XV
XV_SRCS = xvmod.c xvmodproc.h
endif
-AM_CFLAGS = @XORG_CFLAGS@ -DEXTMODULE
+AM_CFLAGS = @XORG_CFLAGS@ -DEXTMODULE @LOADER_DEFINES@
INCLUDES = @XORG_INCS@ \
-I$(top_srcdir)/afb \
-I$(top_srcdir)/mfb \
@@ -29,4 +30,4 @@ libextmod_la_SOURCES = modinit.c \
xf86vmode.c \
vidmodeproc.h \
$(XV_SRCS)
-libextmod_la_LIBADD = $(top_builddir)/Xext/libXext.la
+libextmod_la_LIBADD = $(top_builddir)/Xext/libXextmodule.la
diff --git a/hw/xfree86/dri/Makefile.am b/hw/xfree86/dri/Makefile.am
index 6a3c96170..7740c10b3 100644
--- a/hw/xfree86/dri/Makefile.am
+++ b/hw/xfree86/dri/Makefile.am
@@ -7,7 +7,8 @@ libdri_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
-I$(top_builddir)/GL/include \
-I@MESA_SOURCE@/include \
-DHAVE_XORG_CONFIG_H \
- -DXFree86Module -DIN_MODULE \
+ @MODULE_DEFINES@ \
+ @LOADER_DEFINES@ \
@DRIPROTO_CFLAGS@ \
@LIBDRM_CFLAGS@ \
@GL_CFLAGS@
diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am
index 74f319ad1..012008573 100644
--- a/hw/xfree86/dummylib/Makefile.am
+++ b/hw/xfree86/dummylib/Makefile.am
@@ -6,24 +6,18 @@ noinst_LIBRARIES = libdummy.a libdummy-nonserver.a
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS)
-
-if NEED_STRLCAT
-STRL_SRCS = strlcat.c strlcpy.c
-endif
+AM_CFLAGS = $(XORG_CFLAGS) @LOADER_DEFINES@
libdummy_a_SOURCES = getvalidbios.c \
pcitestmulti.c xf86allocscripi.c \
xf86addrestolist.c xf86drvmsg.c xf86drvmsgverb.c \
xf86getverb.c \
xf86opt.c xf86screens.c xf86servisinit.c xf86verbose.c \
- $(STRL_SRCS)
#xf86errorf.c xf86errorfverb.c xf86msg.c xf86msgverb.c \
#logvwrite.c verrorf.c xf86info.c xalloc.c fatalerror.c \
#$(srcdir)/../os-support/shared/sigiostubs.c
libdummy_nonserver_a_SOURCES = \
- $(STRL_SRCS) \
fatalerror.c \
getvalidbios.c \
logvwrite.c \
diff --git a/hw/xfree86/exa/Makefile.am b/hw/xfree86/exa/Makefile.am
index d3a7edce5..ad5265889 100644
--- a/hw/xfree86/exa/Makefile.am
+++ b/hw/xfree86/exa/Makefile.am
@@ -8,7 +8,7 @@ INCLUDES = \
$(XORG_INCS) \
-I$(srcdir)/../../../miext/cw
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
libexa_la_SOURCES = \
exaasync.c \
diff --git a/hw/xfree86/fbdevhw/Makefile.am b/hw/xfree86/fbdevhw/Makefile.am
index 3ab56630b..05f78f8d1 100644
--- a/hw/xfree86/fbdevhw/Makefile.am
+++ b/hw/xfree86/fbdevhw/Makefile.am
@@ -1,4 +1,5 @@
-module_LTLIBRARIES = libfbdevhw.la
+linuxmoduledir = $(moduledir)/linux
+linuxmodule_LTLIBRARIES = libfbdevhw.la
libfbdevhw_la_LDFLAGS = -avoid-version
@@ -10,7 +11,7 @@ endif
INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
sdk_HEADERS = fbdevhw.h
diff --git a/hw/xfree86/i2c/Makefile.am b/hw/xfree86/i2c/Makefile.am
index 00053dd6a..ed9acc184 100644
--- a/hw/xfree86/i2c/Makefile.am
+++ b/hw/xfree86/i2c/Makefile.am
@@ -1,6 +1,7 @@
+module_LTLIBRARIES = libi2c.la
+
multimediadir = $(moduledir)/multimedia
multimedia_LTLIBRARIES = \
- libi2c.la \
bt829_drv.la \
fi1236_drv.la \
msp3430_drv.la \
@@ -14,7 +15,7 @@ libi2c_la_SOURCES = xf86i2c.c xf86i2cmodule.c
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
sdk_HEADERS = xf86i2c.h bt829.h fi1236.h msp3430.h tda8425.h tda9850.h tda9885.h uda1380.h i2c_def.h
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
index 47b98b5b3..18174769e 100644
--- a/hw/xfree86/int10/Makefile.am
+++ b/hw/xfree86/int10/Makefile.am
@@ -2,10 +2,12 @@ module_LTLIBRARIES = libint10.la
sdk_HEADERS = xf86int10.h
+EXTRA_CFLAGS = @MODULE_DEFINES@ @LOADER_DEFINES@
+
libint10_la_LDFLAGS = -avoid-version
if INT10_VM86
-AM_CFLAGS = -D_PC -D_VM86_LINUX $(XORG_CFLAGS)
+AM_CFLAGS = -D_PC -D_VM86_LINUX $(XORG_CFLAGS) $(EXTRA_CFLAGS)
INCLUDES = $(XORG_INCS)
libint10_la_SOURCES = \
helper_exec.c \
@@ -18,14 +20,14 @@ libint10_la_SOURCES = \
endif
if INT10_X86EMU
-AM_CFLAGS = -D_X86EMU -DNO_SYS_HEADERS -D_PC $(XORG_CFLAGS)
+AM_CFLAGS = -D_X86EMU -DNO_SYS_HEADERS -D_PC $(XORG_CFLAGS) $(EXTRA_CFLAGS)
INCLUDES = $(XORG_INCS) -I$(srcdir)/../x86emu
libint10_la_SOURCES = pci.c xf86int10module.c helper_exec.c helper_mem.c \
xf86int10.c xf86x86emu.c generic.c x86emu.c
endif
if INT10_STUB
-AM_CFLAGS = -D_PC -D_VM86_LINUX $(XORG_CFLAGS)
+AM_CFLAGS = -D_PC -D_VM86_LINUX $(XORG_CFLAGS) $(EXTRA_CFLAGS)
libint10_la_SOURCES = stub.c xf86int10module.c
endif
diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am
index fab3fa906..6e4343df2 100644
--- a/hw/xfree86/loader/Makefile.am
+++ b/hw/xfree86/loader/Makefile.am
@@ -7,7 +7,7 @@ INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../vbe \
-I$(srcdir)/../../../miext/damage
#AM_LDFLAGS = -r
-AM_CFLAGS = -DIN_LOADER $(XORG_CFLAGS)
+AM_CFLAGS = -DIN_LOADER $(XORG_CFLAGS) @LOADER_DEFINES@
if XORG_LOADER_SPARC
SPARC_SOURCES = SparcMulDiv.S
diff --git a/hw/xfree86/os-support/bsd/Makefile.am b/hw/xfree86/os-support/bsd/Makefile.am
index 96eab820d..39c1a9ed6 100644
--- a/hw/xfree86/os-support/bsd/Makefile.am
+++ b/hw/xfree86/os-support/bsd/Makefile.am
@@ -49,7 +49,7 @@ ARCH_SOURCES = \
endif
# FIXME: NetBSD Aperture defines (configure.ac)
-AM_CFLAGS = -DUSESTDRES -DUSE_DEV_IO $(XORG_CFLAGS)
+AM_CFLAGS = -DUSESTDRES -DUSE_DEV_IO $(XORG_CFLAGS) @LOADER_DEFINES@
INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am
index 7db119fb6..a9a70c9e8 100644
--- a/hw/xfree86/os-support/bus/Makefile.am
+++ b/hw/xfree86/os-support/bus/Makefile.am
@@ -21,7 +21,7 @@ libbus_la_SOURCES = Pci.c $(PCI_SOURCES) $(PLATFORM_PCI_SOURCES) \
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @LOADER_DEFINES@
# hack to keep all the OS PCI support files in the distball even though
# there aren't rules to build them all yet. also the AC_SUBST pattern
diff --git a/hw/xfree86/os-support/drm/Makefile.am b/hw/xfree86/os-support/drm/Makefile.am
index bc9b078f6..a1f62b62d 100644
--- a/hw/xfree86/os-support/drm/Makefile.am
+++ b/hw/xfree86/os-support/drm/Makefile.am
@@ -7,7 +7,8 @@ libdrm_la_CFLAGS = -I$(top_srcdir)/hw/xfree86/common \
-I$(top_srcdir)/GL/glx \
-I$(top_srcdir)/GL/include \
-DHAVE_XORG_CONFIG_H \
- @LIBDRM_CFLAGS@
+ @LIBDRM_CFLAGS@ \
+ @LOADER_DEFINES@
libdrm_la_LDFLAGS = -module -avoid-version
libdrm_ladir = $(moduledir)/@XORG_OS@
libdrm_la_SOURCES = \
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
index 9dee240a7..554c78d5a 100644
--- a/hw/xfree86/os-support/linux/Makefile.am
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -22,7 +22,7 @@ liblinux_la_SOURCES = lnx_init.c lnx_video.c lnx_io.c lnx_kbd.c lnx_mouse.c \
$(srcdir)/../shared/at_scancode.c \
$(PLATFORM_PCI_SUPPORT)
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS)
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) @LOADER_DEFINES@
INCLUDES = $(XORG_INCS) -I/usr/include/drm # FIXME this last part is crack
diff --git a/hw/xfree86/os-support/misc/Makefile.am b/hw/xfree86/os-support/misc/Makefile.am
index f546e1a92..29d8489b7 100644
--- a/hw/xfree86/os-support/misc/Makefile.am
+++ b/hw/xfree86/os-support/misc/Makefile.am
@@ -18,6 +18,6 @@ libmisc_la_SOURCES = xf86_Util.c Delay.c $(ARCH_SOURCES)
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @LOADER_DEFINES@
EXTRA_DIST = $(I386_SOURCES) $(PORTIO_SOURCES) $(ILHACK_SOURCES)
diff --git a/hw/xfree86/os-support/solaris/Makefile.am b/hw/xfree86/os-support/solaris/Makefile.am
index 6b29b3080..74edc6900 100644
--- a/hw/xfree86/os-support/solaris/Makefile.am
+++ b/hw/xfree86/os-support/solaris/Makefile.am
@@ -34,7 +34,7 @@ nodist_libsolaris_la_SOURCES = $(SOLARIS_INOUT_SRC)
sdk_HEADERS = agpgart.h
nodist_sdk_HEADERS = solaris-$(SOLARIS_INOUT_ARCH).il
-AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS)
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC $(XORG_CFLAGS) @LOADER_DEFINES@
INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am
index acda83d27..7d801e975 100644
--- a/hw/xfree86/parser/Makefile.am
+++ b/hw/xfree86/parser/Makefile.am
@@ -23,7 +23,7 @@ libxf86config_a_SOURCES = \
DRI.c \
Extensions.c
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @LOADER_DEFINES@
EXTRA_DIST = \
Configint.h \
diff --git a/hw/xfree86/rac/Makefile.am b/hw/xfree86/rac/Makefile.am
index b125a1424..9975db4ea 100644
--- a/hw/xfree86/rac/Makefile.am
+++ b/hw/xfree86/rac/Makefile.am
@@ -6,4 +6,4 @@ sdk_HEADERS = xf86RAC.h
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
diff --git a/hw/xfree86/ramdac/Makefile.am b/hw/xfree86/ramdac/Makefile.am
index c9afdad60..4af131345 100644
--- a/hw/xfree86/ramdac/Makefile.am
+++ b/hw/xfree86/ramdac/Makefile.am
@@ -13,7 +13,7 @@ EXTRA_DIST = BTPriv.h IBMPriv.h TIPriv.h xf86CursorPriv.h xf86RamDacPriv.h \
CURSOR.NOTES
AM_CFLAGS = -DXAAReverseBitOrder=xf86ReverseBitOrder -DRAMDAC_MODULE \
- $(XORG_CFLAGS)
+ $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
INCLUDES = $(XORG_INCS)
xf86BitOrder.c:
diff --git a/hw/xfree86/scanpci/Makefile.am b/hw/xfree86/scanpci/Makefile.am
index 7e5671aa1..202b984d6 100644
--- a/hw/xfree86/scanpci/Makefile.am
+++ b/hw/xfree86/scanpci/Makefile.am
@@ -8,7 +8,7 @@ libscanpci_la_SOURCES = xf86ScanPci.c
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
BUILT_SOURCES = xf86PciIds.h
diff --git a/hw/xfree86/shadowfb/Makefile.am b/hw/xfree86/shadowfb/Makefile.am
index cb5ebb14a..e8e3fd826 100644
--- a/hw/xfree86/shadowfb/Makefile.am
+++ b/hw/xfree86/shadowfb/Makefile.am
@@ -6,4 +6,4 @@ sdk_HEADERS = shadowfb.h
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
diff --git a/hw/xfree86/utils/xorgcfg/Makefile.am b/hw/xfree86/utils/xorgcfg/Makefile.am
index aba175184..a4b0d9ef4 100644
--- a/hw/xfree86/utils/xorgcfg/Makefile.am
+++ b/hw/xfree86/utils/xorgcfg/Makefile.am
@@ -48,6 +48,10 @@ TEXTOBJ = text-mode.o
CURSESDEFINES = -DHAS_NCURSES
endif
+if NEED_STRLCAT
+STRL_SRCS = $(top_srcdir)/os/strlcat.c $(top_srcdir)/os/strlcpy.c
+endif
+
xorgcfg_SOURCES = \
accessx.c \
card-cfg.c \
@@ -83,7 +87,8 @@ xorgcfg_SOURCES = \
screen.h \
stubs.h \
vidmode.h \
- xf86config.h
+ xf86config.h \
+ $(STRL_SRCS)
XBMdir = $(includedir)/X11/bitmaps
XPMdir = $(includedir)/X11/pixmaps
diff --git a/hw/xfree86/vbe/Makefile.am b/hw/xfree86/vbe/Makefile.am
index 02fdb4837..162029263 100644
--- a/hw/xfree86/vbe/Makefile.am
+++ b/hw/xfree86/vbe/Makefile.am
@@ -4,7 +4,7 @@ libvbe_la_SOURCES = vbe.c vbeModes.c vbe_module.c
sdk_HEADERS = vbe.h vbeModes.h
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
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 2aa27fa41..4038ef427 100644
--- a/hw/xfree86/vgahw/Makefile.am
+++ b/hw/xfree86/vgahw/Makefile.am
@@ -2,7 +2,7 @@ module_LTLIBRARIES = libvgahw.la
libvgahw_la_LDFLAGS = -avoid-version
libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c
INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
sdk_HEADERS = vgaHW.h
diff --git a/hw/xfree86/x86emu/Makefile.am b/hw/xfree86/x86emu/Makefile.am
index 5959c867a..568eb56e9 100644
--- a/hw/xfree86/x86emu/Makefile.am
+++ b/hw/xfree86/x86emu/Makefile.am
@@ -11,7 +11,7 @@ libx86emu_a_SOURCES = debug.c \
INCLUDES =
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @LOADER_DEFINES@
EXTRA_DIST = validate.c \
x86emu/debug.h \
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
index fb9ebe4b7..593c8724b 100644
--- a/hw/xfree86/xaa/Makefile.am
+++ b/hw/xfree86/xaa/Makefile.am
@@ -65,4 +65,4 @@ EXTRA_DIST = xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
INCLUDES = $(XORG_INCS)
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
diff --git a/hw/xfree86/xf1bpp/Makefile.am b/hw/xfree86/xf1bpp/Makefile.am
index db5264cb0..47ff33a16 100644
--- a/hw/xfree86/xf1bpp/Makefile.am
+++ b/hw/xfree86/xf1bpp/Makefile.am
@@ -60,7 +60,8 @@ libxf1bppmfb_a_SOURCES = \
libxf1bpp_la_SOURCES = $(libxf1bppmfb_a_SOURCES) $(libxf1bppgen_a_SOURCES)
-AM_CFLAGS = -DXF86MONO -include mfbmap.h $(XORG_CFLAGS)
+AM_CFLAGS = -DXF86MONO -include mfbmap.h $(DIX_CFLAGS) $(XORG_CFLAGS) \
+ @MODULE_DEFINES@ @LOADER_DEFINES@
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb
mfbseg.c:
diff --git a/hw/xfree86/xf4bpp/Makefile.am b/hw/xfree86/xf4bpp/Makefile.am
index 7a9dc3a9c..fcef297a1 100644
--- a/hw/xfree86/xf4bpp/Makefile.am
+++ b/hw/xfree86/xf4bpp/Makefile.am
@@ -59,4 +59,4 @@ mfbseg.c:
INCLUDES = $(XORG_INCS) -I$(srcdir)/../xf1bpp -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
diff --git a/hw/xfree86/xf8_16bpp/Makefile.am b/hw/xfree86/xf8_16bpp/Makefile.am
index c800cbbc7..2942c9345 100644
--- a/hw/xfree86/xf8_16bpp/Makefile.am
+++ b/hw/xfree86/xf8_16bpp/Makefile.am
@@ -4,7 +4,7 @@ sdk_HEADERS = cfb8_16.h
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
libxf8_16bpp_la_LDFLAGS = -avoid-version
diff --git a/hw/xfree86/xf8_32bpp/Makefile.am b/hw/xfree86/xf8_32bpp/Makefile.am
index 3050b81d1..8b9329d8c 100644
--- a/hw/xfree86/xf8_32bpp/Makefile.am
+++ b/hw/xfree86/xf8_32bpp/Makefile.am
@@ -4,7 +4,7 @@ sdk_HEADERS = cfb8_32.h
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
libxf8_32bpp_la_LDFLAGS = -avoid-version
diff --git a/hw/xfree86/xf8_32wid/Makefile.am b/hw/xfree86/xf8_32wid/Makefile.am
index dfe6e4f92..23f7ecbf3 100644
--- a/hw/xfree86/xf8_32wid/Makefile.am
+++ b/hw/xfree86/xf8_32wid/Makefile.am
@@ -5,7 +5,7 @@ sdk_HEADERS = cfb8_32wid.h
libxf8_32wid_la_LDFLAGS = -avoid-version
INCLUDES = $(XORG_INCS) -I$(top_srcdir)/mfb -I$(top_srcdir)/cfb
-AM_CFLAGS = $(XORG_CFLAGS)
+AM_CFLAGS = $(XORG_CFLAGS) @MODULE_DEFINES@ @LOADER_DEFINES@
libxf8_32wid_la_SOURCES = \
cfb8_32widmodule.c \