summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am37
-rw-r--r--XTrap/Makefile.am3
-rw-r--r--Xext/Makefile.am72
-rw-r--r--Xext/extmod/Makefile.am1
-rw-r--r--Xi/Makefile.am77
-rw-r--r--acinclude.m411
-rw-r--r--afb/Makefile.am49
-rwxr-xr-xautogen.sh3
-rw-r--r--cfb/Makefile.am21
-rw-r--r--cfb16/Makefile.am9
-rw-r--r--cfb24/Makefile.am11
-rw-r--r--cfb32/Makefile.am9
-rw-r--r--composite/Makefile.am8
-rw-r--r--configure.ac623
-rw-r--r--damageext/Makefile.am6
-rw-r--r--dix/Makefile.am33
-rw-r--r--fb/Makefile.am50
-rw-r--r--hw/Makefile.am9
-rw-r--r--hw/dmx/Makefile.am84
-rw-r--r--hw/dmx/glxProxy/Makefile.am7
-rw-r--r--hw/dmx/input/Makefile.am11
-rw-r--r--hw/xfree86/Makefile.am36
-rw-r--r--hw/xfree86/common/Makefile.am97
-rw-r--r--hw/xfree86/ddc/Makefile.am9
-rw-r--r--hw/xfree86/dixmods/Makefile.am26
-rw-r--r--hw/xfree86/dummylib/Makefile.am13
-rw-r--r--hw/xfree86/fbdevhw/Makefile.am13
-rw-r--r--hw/xfree86/i2c/Makefile.am7
-rw-r--r--hw/xfree86/int10/Makefile.am30
-rw-r--r--hw/xfree86/loader/Makefile.am40
-rw-r--r--hw/xfree86/os-support/Makefile.am6
-rw-r--r--hw/xfree86/os-support/bus/Makefile.am19
-rw-r--r--hw/xfree86/os-support/linux/Makefile.am27
-rw-r--r--hw/xfree86/os-support/linux/drm/Makefile.am8
-rw-r--r--hw/xfree86/os-support/linux/int10/Makefile.am6
-rw-r--r--hw/xfree86/os-support/misc/Makefile.am7
-rw-r--r--hw/xfree86/parser/Makefile.am11
-rw-r--r--hw/xfree86/rac/Makefile.am6
-rw-r--r--hw/xfree86/ramdac/Makefile.am16
-rw-r--r--hw/xfree86/scanpci/Makefile.am19
-rw-r--r--hw/xfree86/shadowfb/Makefile.am6
-rw-r--r--hw/xfree86/vbe/Makefile.am7
-rw-r--r--hw/xfree86/vgahw/Makefile.am5
-rw-r--r--hw/xfree86/xaa/Makefile.am63
-rw-r--r--hw/xfree86/xf1bpp/Makefile.am150
-rw-r--r--hw/xfree86/xf4bpp/Makefile.am59
-rw-r--r--hw/xfree86/xf8_16bpp/Makefile.am12
-rw-r--r--hw/xfree86/xf8_32bpp/Makefile.am34
-rw-r--r--hw/xfree86/xf8_32wid/Makefile.am15
-rw-r--r--include/Makefile.am50
-rw-r--r--mfb/Makefile.am129
-rw-r--r--mi/Makefile.am71
-rw-r--r--miext/Makefile.am4
-rw-r--r--miext/cw/Makefile.am6
-rw-r--r--miext/damage/Makefile.am6
-rw-r--r--miext/layer/Makefile.am9
-rw-r--r--miext/shadow/Makefile.am25
-rw-r--r--os/Makefile.am40
-rw-r--r--randr/Makefile.am6
-rw-r--r--record/Makefile.am5
-rw-r--r--render/Makefile.am17
-rw-r--r--xfixes/Makefile.am10
-rw-r--r--xkb/Makefile.am51
-rw-r--r--xorg-server.pc.in12
64 files changed, 2322 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 000000000..0417bf4ee
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,37 @@
+AUTOMAKE_OPTIONS=dist-bzip2 foreign
+
+if COMPOSITE
+COMPOSITE_DIR=composite
+endif
+if XTRAP
+XTRAP_DIR=XTrap
+endif
+
+SUBDIRS= \
+ include \
+ dix \
+ fb \
+ mi \
+ Xext \
+ miext \
+ os \
+ randr \
+ render \
+ Xi \
+ mfb \
+ xkb \
+ afb \
+ cfb \
+ cfb16 \
+ cfb24 \
+ cfb32 \
+ record \
+ xfixes \
+ damageext \
+ $(XTRAP_DIR) \
+ $(COMPOSITE_DIR) \
+ hw
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = xorg-server.pc
+EXTRA_DIST = xorg-server.pc.in
diff --git a/XTrap/Makefile.am b/XTrap/Makefile.am
new file mode 100644
index 000000000..c3958bee1
--- /dev/null
+++ b/XTrap/Makefile.am
@@ -0,0 +1,3 @@
+module_LTLIBRARIES = libxtrap.la
+
+libxtrap_la_SOURCES = xf86XTrapModule.c xtrapddmi.c xtrapdi.c xtrapdiswp.c xtrapditbl.c
diff --git a/Xext/Makefile.am b/Xext/Makefile.am
new file mode 100644
index 000000000..4ae2a7d36
--- /dev/null
+++ b/Xext/Makefile.am
@@ -0,0 +1,72 @@
+noinst_LTLIBRARIES = libXext.la
+
+sdk_HEADERS = dgaproc.h xvdix.h xvmcext.h
+
+SUBDIRS = extmod
+
+if MITSHM
+MITSHM_SRCS = shm.c
+endif
+
+if XV
+XV_SRCS = xvmain.c xvdisp.c xvmc.c xvdix.h xvmcext.h
+endif
+
+if RES
+RES_SRCS = xres.c
+endif
+
+if SCREENSAVER
+SCREENSAVER_SRCS = saver.c
+endif
+
+if XCSECURITY
+XCSECURITY_SRCS = security.c
+endif
+
+if XINERAMA
+PANORAMIX_SRCS = panoramiX.c panoramiX.h panoramiXh.h panoramiXsrv.h panoramiXprocs.c panoramiXSwap.c
+endif
+
+if XEVIE
+XEVIE_SRCS = xevie.c EVIstruct.h
+endif
+
+AM_CFLAGS = -I$(srcdir)/extmod
+
+EXTRA_DIST = \
+ dgaproc.h \
+ vidmodeproc.h \
+ xf86dgaext.h \
+ xf86miscproc.h \
+ appgroup.h \
+ xvdisp.h \
+ xvmodproc.h
+
+# dmx.c has a hard dependency on the dmx DDX
+libXext_la_SOURCES = \
+ bigreq.c \
+ mitmisc.c \
+ shape.c \
+ sleepuntil.c \
+ sleepuntil.h \
+ sync.c \
+ xtest.c \
+ xtest1di.c \
+ xtest1dd.c \
+ xtest1dd.h \
+ xcmisc.c \
+ dpms.c \
+ dpmsproc.h \
+ xf86bigfont.c \
+ xf86dga.c \
+ xf86dgaext.h \
+ xf86dga2.c \
+ $(MITSHM_SRCS) \
+ $(XV_SRCS) \
+ $(RES_SRCS) \
+ $(SCREENSAVER_SRCS) \
+ $(PANORAMIX_SRCS) \
+ $(XCSECURITY_SRCS) \
+ $(XEVIE_SRCS) \
+ extmod/modinit.c
diff --git a/Xext/extmod/Makefile.am b/Xext/extmod/Makefile.am
new file mode 100644
index 000000000..3044f0372
--- /dev/null
+++ b/Xext/extmod/Makefile.am
@@ -0,0 +1 @@
+EXTRA_DIST = modinit.h
diff --git a/Xi/Makefile.am b/Xi/Makefile.am
new file mode 100644
index 000000000..42514a3b9
--- /dev/null
+++ b/Xi/Makefile.am
@@ -0,0 +1,77 @@
+noinst_LTLIBRARIES = libXi.la
+
+libXi_la_SOURCES = \
+ allowev.c \
+ allowev.h \
+ chgdctl.c \
+ chgdctl.h \
+ chgfctl.c \
+ chgfctl.h \
+ chgkbd.c \
+ chgkbd.h \
+ chgkmap.c \
+ chgkmap.h \
+ chgprop.c \
+ chgprop.h \
+ chgptr.c \
+ chgptr.h \
+ closedev.c \
+ closedev.h \
+ devbell.c \
+ devbell.h \
+ exevents.c \
+ exglobals.h \
+ extinit.c \
+ getbmap.c \
+ getbmap.h \
+ getdctl.c \
+ getdctl.h \
+ getfctl.c \
+ getfctl.h \
+ getfocus.c \
+ getfocus.h \
+ getkmap.c \
+ getkmap.h \
+ getmmap.c \
+ getmmap.h \
+ getprop.c \
+ getprop.h \
+ getselev.c \
+ getselev.h \
+ getvers.c \
+ getvers.h \
+ grabdev.c \
+ grabdev.h \
+ grabdevb.c \
+ grabdevb.h \
+ grabdevk.c \
+ grabdevk.h \
+ gtmotion.c \
+ gtmotion.h \
+ listdev.c \
+ listdev.h \
+ opendev.c \
+ opendev.h \
+ queryst.c \
+ queryst.h \
+ selectev.c \
+ selectev.h \
+ sendexev.c \
+ sendexev.h \
+ setbmap.c \
+ setbmap.h \
+ setdval.c \
+ setdval.h \
+ setfocus.c \
+ setfocus.h \
+ setmmap.c \
+ setmmap.h \
+ setmode.c \
+ setmode.h \
+ stubs.c \
+ ungrdev.c \
+ ungrdev.h \
+ ungrdevb.c \
+ ungrdevb.h \
+ ungrdevk.c \
+ ungrdevk.h
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 000000000..cf7eb056a
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,11 @@
+AC_DEFUN([AC_DEFINE_DIR], [
+ prefix_NONE=
+ exec_prefix_NONE=
+ test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix
+ test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix
+ eval ac_define_dir="\"[$]$2\""
+ AC_SUBST($1, "$ac_define_dir")
+ AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3])
+ test "$prefix_NONE" && prefix=NONE
+ test "$exec_prefix_NONE" && exec_prefix=NONE
+])
diff --git a/afb/Makefile.am b/afb/Makefile.am
new file mode 100644
index 000000000..241fbd823
--- /dev/null
+++ b/afb/Makefile.am
@@ -0,0 +1,49 @@
+noinst_LTLIBRARIES = libafb.la
+
+libafb_gen_sources = afbbltC.c afbbltX.c afbbltCI.c afbbltO.c afbbltG.c afbtileC.c afbtileG.c afbseg.c
+
+DISTCLEANFILES = $(libafb_gen_sources)
+
+libafb_la_SOURCES = afbgc.c afbwindow.c afbfont.c afbfillrct.c afbpntwin.c afbpixmap.c \
+ afbimage.c afbline.c afbbres.c afbhrzvert.c afbbresd.c afbpushpxl.c afbply1rct.c \
+ afbzerarc.c afbfillarc.c afbfillsp.c afbsetsp.c afbscrinit.c afbplygblt.c \
+ afbclip.c afbgetsp.c afbpolypnt.c afbbitblt.c afbcmap.c afbimggblt.c afbpntarea.c \
+ afbmisc.c afbbstore.c afbtegblt.c $(libafb_gen_sources)
+
+INCLUDES = -I$(top_srcdir)/mfb
+
+EXTRA_DIST = afbline.c afbblt.c afbtile.c
+
+afbseg.c:
+ echo "#define POLYSEGMENT" > $@
+ echo "#include \"$(srcdir)/afbline.c\"" >> $@
+
+afbbltC.c:
+ echo "#define MROP Mcopy" > $@
+ echo "#include \"$(srcdir)/afbblt.c\"" >> $@
+
+afbbltX.c:
+ echo "#define MROP Mxor" > $@
+ echo "#include \"$(srcdir)/afbblt.c\"" >> $@
+
+afbbltCI.c:
+ echo "#define MROP McopyInverted" > $@
+ echo "#include \"$(srcdir)/afbblt.c\"" >> $@
+
+afbbltO.c:
+ echo "#define MROP Mor" > $@
+ echo "#include \"$(srcdir)/afbblt.c\"" >> $@
+
+afbbltG.c:
+ echo "#define MROP 0" > $@
+ echo "#include \"$(srcdir)/afbblt.c\"" >> $@
+
+afbtileC.c:
+ echo "#define MROP Mcopy" > $@
+ echo "#include \"$(srcdir)/afbtile.c\"" >> $@
+
+afbtileG.c:
+ echo "#define MROP 0" > $@
+ echo "#include \"$(srcdir)/afbtile.c\"" >> $@
+
+sdk_HEADERS = afb.h
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 000000000..b1376df5a
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,3 @@
+#! /bin/sh
+autoreconf -v --install || exit 1
+./configure --enable-maintainer-mode "$@"
diff --git a/cfb/Makefile.am b/cfb/Makefile.am
new file mode 100644
index 000000000..aa3744aed
--- /dev/null
+++ b/cfb/Makefile.am
@@ -0,0 +1,21 @@
+noinst_LTLIBRARIES = libcfb.la
+
+include Makefile.am.inc
+
+DISTCLEANFILES += cfbglrop8.c
+
+libcfb_la_SOURCES = cfb8bit.c cfbcmap.c cfbteblt8.c cfbglrop8.c cfbpush8.c \
+ cfbrctstp8.c $(libcfb_gen_sources) $(libcfb_common_sources)
+
+libcfb_la_LIBADD = ../mfb/libmfb.la
+
+AM_CFLAGS = -DPSZ=8
+
+INCLUDES = $(CFB_INCLUDES)
+
+EXTRA_DIST = cfbline.c cfbfillarc.c cfbzerarc.c cfbblt.c cfbsolid.c \
+ cfbtileodd.c cfbtile32.c cfb8line.c cfbply1rct.c cfbglblt8.c \
+ cfb16.h cfb24.h cfb32.h cfb8bit.h cfbmap.h cfbmskbits.h cfbrrop.h \
+ cfbtab.h cfbunmap.h
+
+sdk_HEADERS = cfb.h
diff --git a/cfb16/Makefile.am b/cfb16/Makefile.am
new file mode 100644
index 000000000..3f194273d
--- /dev/null
+++ b/cfb16/Makefile.am
@@ -0,0 +1,9 @@
+noinst_LTLIBRARIES = libcfb16.la
+
+include $(top_srcdir)/cfb/Makefile.am.inc
+
+libcfb16_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources)
+
+INCLUDES = $(CFB_INCLUDES)
+
+AM_CFLAGS = -DPSZ=16
diff --git a/cfb24/Makefile.am b/cfb24/Makefile.am
new file mode 100644
index 000000000..9c8ec7c31
--- /dev/null
+++ b/cfb24/Makefile.am
@@ -0,0 +1,11 @@
+noinst_LTLIBRARIES = libcfb24.la
+
+include $(top_srcdir)/cfb/Makefile.am.inc
+
+libcfb24_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources)
+
+EXTRA_DIST = cfbrrop24.h
+
+AM_CFLAGS = -DPSZ=24
+
+INCLUDES = $(CFB_INCLUDES)
diff --git a/cfb32/Makefile.am b/cfb32/Makefile.am
new file mode 100644
index 000000000..f2f8edda6
--- /dev/null
+++ b/cfb32/Makefile.am
@@ -0,0 +1,9 @@
+noinst_LTLIBRARIES = libcfb32.la
+
+include $(top_srcdir)/cfb/Makefile.am.inc
+
+libcfb32_la_SOURCES = $(libcfb_common_sources) $(libcfb_gen_sources)
+
+INCLUDES = $(CFB_INCLUDES)
+
+AM_CFLAGS = -DPSZ=32
diff --git a/composite/Makefile.am b/composite/Makefile.am
new file mode 100644
index 000000000..c4d0f3799
--- /dev/null
+++ b/composite/Makefile.am
@@ -0,0 +1,8 @@
+noinst_LTLIBRARIES = libcomposite.la
+
+libcomposite_la_SOURCES = \
+ compalloc.c \
+ compext.c \
+ compint.h \
+ compinit.c \
+ compwindow.c
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 000000000..36153f0f1
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,623 @@
+dnl
+dnl $Id$
+dnl
+dnl Copyright © 2003-2005 Keith Packard, Daniel Stone
+dnl
+dnl Permission to use, copy, modify, distribute, and sell this software and its
+dnl documentation for any purpose is hereby granted without fee, provided that
+dnl the above copyright notice appear in all copies and that both that
+dnl copyright notice and this permission notice appear in supporting
+dnl documentation, and that the names of Keith Packard and Daniel Stone not be
+dnl used in advertising or publicity pertaining to distribution of the software
+dnl without specific, written prior permission. Keith Packard and Daniel Stone
+dnl make no representations about the suitability of this software for any
+dnl purpose. It is provided "as is" without express or implied warranty.
+dnl
+dnl KEITH PACKARD AND DANIEL STONE DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
+dnl SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+dnl IN NO EVENT SHALL KEITH PACKARD OR DANIEL STONE BE LIABLE FOR ANY SPECIAL,
+dnl INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+dnl LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+dnl OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+dnl PERFORMANCE OF THIS SOFTWARE.
+dnl
+dnl Process this file with autoconf to create configure.
+
+AC_PREREQ(2.53)
+dnl we aren't intelligent about padding the version, so it always has to be four
+dnl digits. ho hum.
+AC_INIT([xorg-server], 6.9.99.0, [daniel@freedesktop.org], xorg-server)
+AC_CONFIG_SRCDIR([Makefile.am])
+AM_INIT_AUTOMAKE([dist-bzip2])
+AM_MAINTAINER_MODE
+dnl this gets generated by autoheader, and thus contains all the defines. we
+dnl don't ever actually use it, internally.
+AC_CONFIG_HEADERS(include/do-not-use-config.h)
+dnl xorg-server.h is an external header, designed to be included by loadable
+dnl drivers.
+AC_CONFIG_HEADERS(include/xorg-server.h)
+dnl dix-config.h covers most of the DIX (i.e. everything but the DDX, not just
+dnl dix/).
+AC_CONFIG_HEADERS(include/xorg-config.h)
+dnl xorg-config.h covers the Xorg DDX.
+AC_CONFIG_HEADERS(include/dix-config.h)
+
+AC_PROG_CC
+AM_PROG_AS
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_LIBTOOL_WIN32_DLL
+AC_PROG_LIBTOOL
+AC_PROG_MAKE_SET
+PKG_PROG_PKG_CONFIG
+
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_BIGENDIAN
+AC_TYPE_PID_T
+
+# Checks for library functions.
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([geteuid getuid link memmove memset mkstemp strchr strrchr strtol getopt getopt_long])
+AC_FUNC_ALLOCA
+
+# Find the math libary
+AC_CHECK_LIB(m, sqrt)
+
+AC_CHECK_HEADERS([ndbm.h dbm.h rpcsvc/dbm.h])
+
+# VM86 headers
+AC_CHECK_HEADERS([sys/vm86.h sys/io.h])
+
+# AGPGART headers
+AC_CHECK_HEADERS([linux/agpgart.h sys/agpio.h])
+
+# APM header
+AC_CHECK_HEADERS([linux/apm_bios.h])
+
+# fbdev header
+AC_CHECK_HEADERS([linux/fb.h])
+
+# MTRR header
+AC_CHECK_HEADERS([asm/mtrr.h])
+
+# Handhelds.org touchscreen driver
+AC_CHECK_HEADERS([linux/h3600_ts.h])
+
+# tslib touchscreen driver
+AC_CHECK_HEADERS([tslib.h])
+
+AC_CACHE_CHECK([for SYSV IPC],
+ ac_cv_sysv_ipc,
+ [AC_TRY_RUN([
+#include <sys/shm.h>
+int main () {
+ int id;
+ id = shmget(IPC_PRIVATE, 512, SHM_W | SHM_R);
+ if (id < 0) return -1;
+ return shmctl(id, IPC_RMID, 0);
+}],
+ [ac_cv_sysv_ipc=yes],
+ [ac_cv_sysv_ipc=no])])
+if test "$ac_cv_sysv_ipc" = yes; then
+ AC_DEFINE(HAVE_SYSV_IPC,1, [Define to 1 if SYSV IPC is available])
+fi
+
+case $host_cpu in
+ sparc*)
+ xorg_bus_sbus="yes"
+ DEFAULT_INT10=x86emu
+ ;;
+ i*86)
+ DEFAULT_INT10=vm86
+ ;;
+ *)
+ DEFAULT_INT10=x86emu
+ ;;
+esac
+
+REQUIRED_MODULES="randrproto renderproto fixesproto damageproto xextproto xfont xproto xtrans xau xf86dgaproto xf86miscproto xf86rushproto xf86vidmodeproto xf86bigfontproto"
+
+DEFAULT_VENDOR_STRING="X.Org"
+DEFAULT_VENDOR_RELEASE="$PACKAGE_VERSION"
+# e.g. 6.9.99.1 -> 6,9,99,1,0
+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])
+
+AC_ARG_ENABLE(werror, [ --enable-werror ],[WERROR=$enableval],[WERROR=no])
+AC_ARG_ENABLE(composite, [ --enable-composite ],[COMPOSITE=$enableval],[COMPOSITE=no])
+AC_ARG_ENABLE(mitshm, [ --disable-shm ],[MITSHM=$enableval],[MITSHM=yes])
+AC_ARG_ENABLE(xres, [ --disable-xres ],[RES=$enableval],[RES=yes])
+AC_ARG_ENABLE(xtrap, [ --enable-xtrap ],[XTRAP=$enableval],[XTRAP=no])
+AC_ARG_ENABLE(record, [ --enable-record ],[RECORD=$enableval],[RECORD=no])
+AC_ARG_ENABLE(screensaver, [ --disable-screensaver ],[SCREENSAVER=$enableval],[SCREENSAVER=yes])
+AC_ARG_ENABLE(xdmcp, [ --disable-xdmcp ],[XDMCP=$enableval],[XDMCP=auto])
+AC_ARG_ENABLE(xdm-auth-1, [ --disable-xdm-auth-1 ],[XDMAUTH=$enableval],[XDMAUTH=auto])
+AC_ARG_ENABLE(glx, [ --enable-glx ],[GLX=$enableval],[GLX=no])
+AC_ARG_ENABLE(dri, [ --enable-dri ],[DRI=$enableval],[DRI=no])
+AC_ARG_ENABLE(xinerama, [ --disable-xinerama ],[XINERAMA=$enableval],[XINERAMA=yes])
+AC_ARG_ENABLE(xcsecurity, AS_HELP_STRING([--enable-xcsecurity],[Build Security extension (default: disabled)]),[XCSECURITY=$enableval],[XCSECURITY=no])
+AC_ARG_ENABLE(dmx, AS_HELP_STRING([--enable-dmx],[Build DMX server (default: disabled)]),[DMX=$enableval],[DMX=no])
+AC_ARG_ENABLE(xevie, AS_HELP_STRING([--enable-xevie],[Build XEvIE extension (default: disabled)]), [XEVIE=$enableval],[XEVIE=no])
+
+# Transport selection
+AC_ARG_ENABLE(unix-transport,[ --disable-unix-transport ], [UNIXCONN=$enableval], [UNIXCONN=yes])
+AC_ARG_ENABLE(tcp-transport, [ --disable-tcp-transport ], [TCPCONN=$enableval], [TCPCONN=yes])
+AC_ARG_ENABLE(ipv6, [ --disable-ipv6 ], [IPV6CONN=$enableval], [IPV6CONN=yes])
+
+AC_ARG_WITH(int10, AS_HELP_STRING([--with-int10=BACKEND],[int10 backend: vm86, x86emu or stub]),
+ [INT10="$withval"],
+ [INT10="$DEFAULT_INT10"])
+AC_ARG_WITH(vendor-string, [ --with-vendor-string=VENDOR ],
+ [ VENDOR_STRING="$withval" ],
+ [ VENDOR_STRING="$DEFAULT_VENDOR_STRING" ])
+AC_ARG_WITH(vendor-release, [ --with-vendor-release=RELEASE ],
+ [ VENDOR_RELEASE="$withval" ],
+ [ VENDOR_RELEASE="$DEFAULT_VENDOR_RELEASE" ])
+AC_ARG_WITH(vendor-web, [ --with-vendor-web=URL ],
+ [ VENDOR_WEB="$withval" ],
+ [ VENDOR_WEB="$DEFAULT_VENDOR_WEB" ])
+AC_ARG_WITH(module-dir, [ --with-module-dir=DIR ],
+ [ moduledir="$withval" ],
+ [ moduledir="$libdir/xorg/modules" ])
+AC_ARG_WITH(builder-addr, [ --with-builder-addr=ADDRESS ],
+ [ BUILDERADDR="$withval" ],
+ [ BUILDERADDR="xorg@lists.freedesktop.org" ])
+
+AM_CONDITIONAL(INT10_VM86, [test x$INT10 = xvm86])
+AM_CONDITIONAL(INT10_X86EMU, [test x$INT10 = xx86emu])
+AM_CONDITIONAL(INT10_STUB, [test x$INT10 = xstub])
+
+driverdir="$moduledir/drivers"
+AC_SUBST([moduledir])
+AC_SUBST([driverdir])
+sdkdir="$includedir/xorg"
+extdir="$includedir/X11/extensions"
+AC_SUBST([sdkdir])
+AC_SUBST([extdir])
+
+AC_DEFINE(SHAPE,1,[Support SHAPE extension])
+
+AM_CONDITIONAL(XV, [test x$XV = xyes])
+if test "$XV" = yes; then
+ AC_DEFINE(XV,1,[Support Xv Extension])
+fi
+
+AM_CONDITIONAL(DMX, [test x$DMX = xyes])
+if test "$DMX" = yes; then
+ PKG_CHECK_MODULES([DMXMODULES],[xmuu xextproto x11 xrender xfont])
+ if test "$GLX" = yes; then
+ PKG_CHECK_MODULES(GL,gl)
+ fi
+fi
+
+AM_CONDITIONAL(COMPOSITE, [test x$COMPOSITE = xyes])
+if test "$COMPOSITE" = yes; then
+ AC_DEFINE(COMPOSITE,1,[Support Composite Extension])
+ REQUIRED_MODULES="$REQUIRED_MODULES compositeproto"
+fi
+
+AM_CONDITIONAL(MITSHM, [test x$MITSHM = xyes])
+if test "$MITSHM" = yes; then
+ AC_DEFINE(MITSHM,1,[Support MIT-SHM Extension])
+ AC_DEFINE(HAS_SHM,1,[Support SHM])
+fi
+
+if test "$UNIXCONN" = "yes"; then
+ AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
+fi
+if test "$TCPCONN" = "yes"; then
+ AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
+fi
+if test "$IPV6CONN" = "yes"; then
+ AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
+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])
+AC_DEFINE(XINPUT,,[Build XInput])
+
+AC_SUBST([XKB])
+
+AM_CONDITIONAL(XTRAP, [test x$XTRAP = xyes])
+if test "$XTRAP" = yes; then
+ AC_DEFINE(XTRAP,1,[Support XTrap extension])
+ DMX_EXTENSIONS="$DMX_EXTENSIONS "'$(top_builddir)/XTrap/libxtrap.la'
+fi
+AM_CONDITIONAL(RECORD, [test x$RECORD = xyes])
+if test "$RECORD" = yes; then
+ AC_DEFINE(RECORD,1,[Support Record extension])
+ REQUIRED_MODULES="$REQUIRED_MODULES recordproto"
+fi
+
+AM_CONDITIONAL(SCREENSAVER, [test x$SCREENSAVER = xyes])
+if test "$SCREENSAVER" = yes; then
+ AC_DEFINE(SCREENSAVER,1,[Support MIT-SCREEN-SAVER extension])
+fi
+AM_CONDITIONAL(RES, [test x$RES = xyes])
+if test "$RES" = yes; then
+ AC_DEFINE(RES,1,[Support X resource extension])
+ REQUIRED_MODULES="$REQUIRED_MODULES resourceproto"
+fi
+AM_CONDITIONAL(XCSECURITY, [test x$XCSECURITY = xyes])
+if test "$XCSECURITY" = yes; then
+ AC_DEFINE(XCSECURITY,1,[Build Security extension])
+fi
+
+AM_CONDITIONAL(GLX, test x$GLX = xyes)
+if test "$GLX" = yes; then
+ AC_DEFINE(GLXEXT,1,[Build GLX extension])
+# EXTENSION_LIBS="$EXTENSION_LIBS "'$(top_builddir)/GL/glx/libglx.la $(top_builddir)/GL/mesa/libglcore.la'
+ dnl EXTENSION_INCS="$EXTENSION_INCS "'-I$(top_srcdir)/glx'
+fi
+AC_SUBST([MESA_SOURCE])
+
+AM_CONDITIONAL(DRI, test x$DRI = xyes)
+if test "$DRI" = yes; then
+ AC_DEFINE(XORGDRI,1,[Build DRI extension])
+ AC_DEFINE(_XORGDRI_SERVER_,1,[XORGDRI internal define])
+fi
+AC_DEFINE(XINPUT,1,[Support X Input extension])
+EXTENSION_LIBS="$EXTENSION_LIBS "'$(top_builddir)/Xi/libXi.la'
+
+AM_CONDITIONAL(XINERAMA, [test x$XINERAMA = xyes])
+if test "$XINERAMA" = yes; then
+ AC_DEFINE(XINERAMA,1,[Support Xinerama extension])
+ AC_DEFINE(PANORAMIX,1,[Internal define for Xinerama])
+ REQUIRED_MODULES="$REQUIRED_MODULES panoramixproto"
+fi
+AM_CONDITIONAL(XCSECURITY, [test x$XCSECURITY = xyes])
+if test "$XCSECURITY" = yes; then
+ AC_DEFINE(XCSECURITY,1,[Build Security extension])
+fi
+AM_CONDITIONAL(XEVIE, [test x$XEVIE = xyes])
+if test "$XEVIE" = yes; then
+ AC_DEFINE(XEVIE,1,[Build XEvIE extension])
+fi
+
+AM_CONDITIONAL(XLOADABLE, [test x$XLOADABLE = xyes])
+if test "$XLOADABLE" = yes; then
+ AC_DEFINE(XLOADABLE,1,[Support loadable input and output drivers])
+fi
+
+PKG_CHECK_MODULES([XDMCP], [xdmcp], [have_libxdmcp="yes"], [have_libxdmcp="no"])
+
+if test "$have_libxdmcp" = yes; then
+ AC_CHECK_LIB(Xdmcp, XdmcpWrap, [have_xdmcpwrap="yes"], [have_xdmcpwrap="no"], [$XDMCP_LIBS])
+fi
+
+
+if test x$XDMCP = xauto; then
+ if test $have_libxdmcp = yes; then
+ XDMCP=yes
+ else
+ XDMCP=no
+ fi
+fi
+if test x$XDMAUTH = xauto; then
+ if test $have_libxdmcp = yes -a x$have_xdmcpwrap = xyes; then
+ XDMAUTH=yes
+ else
+ XDMAUTH=no
+ fi
+fi
+
+AM_CONDITIONAL(XDMCP, [test x$XDMCP = xyes])
+if test "$XDMCP" = yes; then
+ AC_DEFINE(XDMCP,1,[Support Xdmcp])
+ REQUIRED_MODULES="$REQUIRED_MODULES xdmcp"
+fi
+
+AM_CONDITIONAL(XDMAUTH, [test x$XDMAUTH = xyes])
+if test "$XDMAUTH" = yes; then
+ AC_DEFINE(HASXDMAUTH,1,[Support XDM-AUTH*-1])
+ if test "x$XDMCP" != yes; then
+ REQUIRED_MODULES="$REQUIRED_MODULES xdmcp"
+ fi
+fi
+
+if test "$ac_cv_header_tslib_h" = yes; then
+ AC_DEFINE(TSLIB, 1, [Include tslib touchscreen driver])
+ TSLIB=yes
+else
+ TSLIB=no
+fi
+
+AM_CONDITIONAL(TSLIB, [test x$TSLIB = xyes])
+if test "$TSLIB" = yes; then
+ AC_DEFINE(TSLIB,1,[Support tslib touchscreen abstraction library])
+else
+
+dnl Make sure tslib and ipaq ts dont *both* get enabled.
+
+ if test "$ac_cv_header_linux_h3600_ts_h" = yes; then
+ AC_DEFINE(H3600_TS, 1, [Include handhelds.org h3600 touchscreen driver])
+ H3600_TS=yes
+ else
+ H3600_TS=no
+fi
+
+fi
+
+AM_CONDITIONAL(H3600_TS, [test "$H3600_TS" = yes])
+if test "$TSLIB" = yes -o "$H3600_TS" = yes; then
+ AC_DEFINE(TOUCHSCREEN,1,[Enable touchscreen support])
+fi
+
+AM_CONDITIONAL(USE_RGB_BUILTIN, [test x$USE_RGB_BUILTIN = xyes])
+if test "$USE_RGB_BUILTIN" = yes; then
+ AC_DEFINE(USE_RGB_BUILTIN,1,[Use builtin rgb color database])
+fi
+
+# yes, this is redundant. bite me.
+PKG_CHECK_MODULES(XFONT, xfont)
+#AC_CHECK_LIB(Xfont, fs_register_fpe_functions, [have_xfont_fc="yes"], [have_xfont_fc="no"], [$XFONT_LIBS])
+#if test "$have_xfont_fc" = no; then
+# AC_MSG_ERROR([Your version of libXfont was not compiled with
+# --enable-fc. Please recompile libXfont with
+# --enable-fc.])
+#fi
+
+AC_DEFINE_UNQUOTED(COMPILEDDEFAULTFONTPATH, ["$FONTPATH"], [Default font path])
+AC_DEFINE_UNQUOTED(XVENDORNAME,["$VENDOR_STRING"], [Vendor name])
+AC_DEFINE_UNQUOTED(XORG_RELEASE, ["$VENDOR_RELEASE"], [Vendor release])
+AC_DEFINE_UNQUOTED(BUILDERADDR, ["$BUILDERADDR"], [Builder address])
+
+dnl
+dnl A bunch of configuration values which shouldn't be optional
+dnl
+AC_DEFINE(RENDER,1,[Support RENDER extension])
+EXTENSION_LIBS="$EXTENSION_LIBS "'$(top_builddir)/render/librender.la'
+EXTENSION_INCS="$EXTENSION_INCS "'-I$(top_srcdir)/render'
+
+AC_DEFINE(RANDR,1,[Support RANDR extension])
+EXTENSION_LIBS="$EXTENSION_LIBS "'$(top_builddir)/randr/librandr.la'
+EXTENSION_INCS="$EXTENSION_INCS "-I'$(top_srcdir)/randr'
+
+AC_DEFINE(DDXOSINIT,1,[Use OsVendorInit])
+AC_DEFINE(SERVER_LOCK,1,[Use a lock to prevent multiple servers on a display])
+AC_DEFINE(SMART_SCHEDULE,1,[Include time-based scheduler])
+AC_DEFINE(NDEBUG,1,[Disable some debugging code])
+AC_DEFINE(USE_RGB_TXT,1,[Use rgb.txt directly])
+AC_DEFINE(MITMISC,1,[Support MIT Misc extension])
+AC_DEFINE(XTEST,1,[Support XTest extension])
+AC_DEFINE(XSYNC,1,[Support XSync extension])
+AC_DEFINE(XCMISC,1,[Support XCMisc extension])
+AC_DEFINE(BIGREQS,1,[Support BigRequests extension])
+AC_DEFINE(PIXPRIV,1,[Support pixmap privates])
+AC_DEFINE(XFIXES,1,[Support XFixes extension])
+AC_DEFINE(XF86VIDMODE,1,[Support XFree86 Video Mode extension])
+AC_DEFINE(XF86MISC,1,[Support XFree86 miscellaneous extensions])
+# must come first as it uses stuff in Shape -d
+EXTENSION_LIBS='$(top_builddir)/xfixes/libxfixes.la'" $EXTENSION_LIBS"
+EXTENSION_INCS="$EXTENSION_INCS "'-I$(top_srcdir)/xfixes'
+
+AC_DEFINE(DAMAGE,1,[Support Damage extension])
+EXTENSION_LIBS="$EXTENSION_LIBS "'$(top_builddir)/damageext/libdamageext.la'
+EXTENSION_INCS="$EXTENSION_INCS "'-I$(top_srcdir)/damageext'
+
+if test "$COMPOSITE" = yes; then
+ EXTENSION_LIBS="$EXTENSION_LIBS "'$(top_builddir)/composite/libcomposite.la'" "'$(top_builddir)/miext/cw/libcw.la'
+ EXTENSION_INCS="$EXTENSION_INCS "'-I$(top_srcdir)/composite'
+fi
+
+DIX_LIB='$(top_builddir)/dix/libdix.la'
+OS_LIB='$(top_builddir)/os/libos.la'
+MI_LIB='$(top_builddir)/mi/libmi.la'
+MINIMI_LIB='$(top_builddir)/mi/libminimi.la'
+MI_EXT_LIB='$(top_builddir)/mi/libmiext.la'
+MI_INC='-I$(top_srcdir)/mi'
+FB_INC='-I$(top_srcdir)/fb'
+DAMAGE_LIB='$(top_builddir)/miext/damage/libdamage.la'
+DAMAGE_INC='-I$(top_srcdir)/miext/damage'
+SHADOW_INC='-I$(top_srcdir)/miext/shadow'
+LAYER_LIB='$(top_builddir)/miext/layer/liblayer.la'
+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'
+
+PKG_CHECK_MODULES([XSERVER], [$REQUIRED_MODULES])
+XSERVER_LIBS="${XSERVER_LIBS} -lm -lz"
+
+XORG_CORE_LIBS="$DIX_LIB"
+XORG_LIBS="$FB_LIB $MI_LIB $XI_LIB $XKB_LIB $COMPOSITE_LIB $DAMAGE_LIB $LAYER_LIB $EXTENSION_LIBS $XPSTUBS_LIB $OS_LIB $SHADOW_LIB"
+XDMX_LIBS="$OS_LIB $DAMAGE_LIB $MINIMI_LIB $XKB_LIB $XI_LIB $DMX_EXTENSIONS"
+XORG_DDXINCS='-I$(top_srcdir)/hw/xfree86 -I$(top_srcdir)/hw/xfree86/include -I$(top_srcdir)/hw/xfree86/common'
+XORG_OSINCS='-I$(top_srcdir)/hw/xfree86/os-support -I$(top_srcdir)/hw/xfree86/os-support/bus -I$(top_srcdir)/os'
+XORG_INCS="$XORG_DDXINCS $XORG_OSINCS"
+XSERVER_CFLAGS="$XSERVER_CFLAGS $CORE_INCS $EXTENSION_INCS $MI_INC $DAMAGE_INC $SHADOW_INC $FB_INC $XI_INC"
+if test "$WORDS_BIGENDIAN" = yes; then
+ ENDIAN="X_BIG_ENDIAN"
+else
+ ENDIAN="X_LITTLE_ENDIAN"
+fi
+AC_DEFINE_UNQUOTED(X_BYTE_ORDER,[$ENDIAN],[Endian order])
+XORG_CFLAGS="$XORGSERVER_CFLAGS $XORG_INCS"
+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"
+ ;;
+ *)
+ XORG_OS="unknown"
+ XORG_OS_SUBDIR="unknown"
+ AC_MSG_ERROR([Your OS is unknown. Xorg currently only supports Linux, \
+ Free/Open/NetBSD, and Solaris. If you are interested in porting Xorg \
+ to your platform, please email xorg@lists.freedesktop.org.])
+ ;;
+esac
+AC_SUBST([XORG_CORE_LIBS])
+AC_SUBST([XORG_LIBS])
+AC_SUBST([EXTENSION_LIBS])
+AC_SUBST([XDMX_LIBS])
+AC_SUBST([XORG_INCS])
+AC_SUBST([XORG_OS])
+AC_SUBST([XORG_OS_SUBDIR])
+AM_CONDITIONAL([XORG_BUS_SBUS], [test "x$xorg_bus_sbus" = xyes])
+
+dnl these only go in xorg-config.h
+CONFIGFILE="$sysconfdir/xorg.conf"
+LOGPREFIX="$localstatedir/log/Xorg."
+XKBDIR="$datadir/X11/xkb"
+AC_DEFINE(XFree86Server,1,[Building XFree86 server])
+AC_DEFINE(XORGSERVER,,[Building Xorg server])
+AC_DEFINE(XFree86LOADER,1,[Building XFree86 loader])
+AC_DEFINE_UNQUOTED(XORG_VERSION_CURRENT,[XF86_VERSION_NUMERIC($VERSION_STRING)],[Current Xorg version])
+AC_DEFINE(NEED_XF86_TYPES,1,[Need XFree86 typedefs])
+AC_DEFINE(NEED_XF86_PROTOTYPES,1,[Need XFree86 helper functions])
+AC_DEFINE(__XSERVERNAME__,"Xorg",[Name of X server])
+AC_DEFINE(__XKBDEFRULES__,"xorg",[Default XKB rules])
+AC_DEFINE(DLOPEN_SUPPORT,1,[Use libdl-based loader])
+AC_DEFINE(DRIVERS,{},[Built-in output drivers])
+AC_DEFINE(IDRIVERS,{},[Built-in input drivers])
+AC_DEFINE_DIR(__XCONFIGFILE__, XF86CONFIGFILE,[Location of configuration file])
+AC_DEFINE_DIR(XF86CONFIGFILE, CONFIGFILE, [Path to Xorg configuration file])
+AC_DEFINE_DIR(DEFAULT_MODULE_PATH, moduledir, [Default module search path])
+AC_DEFINE_DIR(DEFAULT_LOGPREFIX, LOGPREFIX, [Default log location])
+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 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])
+AC_DEFINE(XResExtension,1,[Build XRes extension])
+AC_DEFINE(DPMSExtension,1,[Build DPMS extension])
+AC_DEFINE(_POSIX_SOURCE,500,[POSIX-compliant source])
+AC_DEFINE(_XOPEN_SOURCE,1,[X/Open-compliant source])
+AC_DEFINE(_BSD_SOURCE,1,[BSD-compliant source])
+
+if test "x$GCC" = "xyes"; then
+ GCC_WARNINGS1="-Wall -Wpointer-arith -Wstrict-prototypes"
+ GCC_WARNINGS2="-Wmissing-prototypes -Wmissing-declarations"
+ GCC_WARNINGS3="-Wnested-externs -fno-strict-aliasing"
+ GCC_WARNINGS="$GCC_WARNINGS1 $GCC_WARNINGS2 $GCC_WARNINGS3"
+ if test "x$WERROR" = "xyes"; then
+ GCC_WARNINGS="${GCC_WARNINGS} -Werror"
+ fi
+ XSERVER_CFLAGS="$GCC_WARNINGS $XSERVER_CFLAGS"
+fi
+
+AC_DEFINE_DIR(PROJECTROOT, prefix, [Overall prefix])
+AC_SUBST([XORG_CFLAGS])
+
+CFLAGS="$XSERVER_CFLAGS $CFLAGS"
+AC_SUBST([CFLAGS])
+
+BUILD_DATE="$(date +'%Y%m%d')"
+AC_SUBST([BUILD_DATE])
+
+AC_MSG_CHECKING(if unaligned word accesses behave as expected)
+AC_TRY_RUN([
+#include <stdio.h>
+
+int main()
+{
+ char j[8]={1,2,3,4,5,6,7,8};
+ int k= *(int *)(j+1);
+ if(k==0x02030405 || k==0x05040302)
+ return 0;
+ return 1;
+}
+],
+ [AC_DEFINE(WORKING_UNALIGNED_INT, 1, [unaligned word accesses behave as expected])
+ AC_MSG_RESULT(yes)],
+ AC_MSG_RESULT(no),
+ AC_MSG_RESULT(assuming not on target machine))
+
+AC_SUBST([libdir exec_prefix prefix])
+
+AC_OUTPUT([
+Makefile
+include/Makefile
+afb/Makefile
+composite/Makefile
+damageext/Makefile
+dix/Makefile
+fb/Makefile
+record/Makefile
+XTrap/Makefile
+mfb/Makefile
+cfb/Makefile
+cfb16/Makefile
+cfb24/Makefile
+cfb32/Makefile
+mi/Makefile
+miext/Makefile
+miext/damage/Makefile
+miext/shadow/Makefile
+miext/cw/Makefile
+miext/layer/Makefile
+os/Makefile
+randr/Makefile
+render/Makefile
+xkb/Makefile
+Xext/Makefile
+Xext/extmod/Makefile
+Xi/Makefile
+xfixes/Makefile
+hw/Makefile
+hw/xfree86/Makefile
+hw/xfree86/common/Makefile
+hw/xfree86/common/xf86Build.h
+hw/xfree86/ddc/Makefile
+hw/xfree86/dixmods/Makefile
+hw/xfree86/dummylib/Makefile
+hw/xfree86/fbdevhw/Makefile
+hw/xfree86/i2c/Makefile
+hw/xfree86/int10/Makefile
+hw/xfree86/loader/Makefile
+hw/xfree86/os-support/Makefile
+hw/xfree86/os-support/bus/Makefile
+hw/xfree86/os-support/misc/Makefile
+hw/xfree86/os-support/linux/Makefile
+hw/xfree86/os-support/linux/drm/Makefile
+hw/xfree86/parser/Makefile
+hw/xfree86/rac/Makefile
+hw/xfree86/ramdac/Makefile
+hw/xfree86/scanpci/Makefile
+hw/xfree86/shadowfb/Makefile
+hw/xfree86/vbe/Makefile
+hw/xfree86/vgahw/Makefile
+hw/xfree86/xaa/Makefile
+hw/xfree86/xf1bpp/Makefile
+hw/xfree86/xf4bpp/Makefile
+hw/xfree86/xf8_16bpp/Makefile
+hw/xfree86/xf8_32wid/Makefile
+hw/dmx/input/Makefile
+hw/dmx/glxProxy/Makefile
+hw/dmx/Makefile
+xorg-server.pc
+])
diff --git a/damageext/Makefile.am b/damageext/Makefile.am
new file mode 100644
index 000000000..557a61e4d
--- /dev/null
+++ b/damageext/Makefile.am
@@ -0,0 +1,6 @@
+noinst_LTLIBRARIES = libdamageext.la
+
+libdamageext_la_SOURCES = \
+ damageext.c \
+ damageext.h \
+ damageextint.h
diff --git a/dix/Makefile.am b/dix/Makefile.am
new file mode 100644
index 000000000..02b04f574
--- /dev/null
+++ b/dix/Makefile.am
@@ -0,0 +1,33 @@
+noinst_LTLIBRARIES = libdix.la libxpstubs.la
+
+libdix_la_SOURCES = \
+ atom.c \
+ colormap.c \
+ cursor.c \
+ devices.c \
+ dispatch.c \
+ dispatch.h \
+ dixfonts.c \
+ dixutils.c \
+ events.c \
+ extension.c \
+ ffs.c \
+ gc.c \
+ globals.c \
+ glyphcurs.c \
+ grabs.c \
+ initatoms.c \
+ main.c \
+ pixmap.c \
+ privates.c \
+ property.c \
+ resource.c \
+ swaprep.c \
+ swapreq.c \
+ tables.c \
+ window.c
+
+libxpstubs_la_SOURCES = \
+ xpstubs.c
+
+INCLUDES = -I$(top_srcdir)/Xprint
diff --git a/fb/Makefile.am b/fb/Makefile.am
new file mode 100644
index 000000000..ab53dc27e
--- /dev/null
+++ b/fb/Makefile.am
@@ -0,0 +1,50 @@
+noinst_LTLIBRARIES = libfb.la
+
+sdk_HEADERS = fb.h fbrop.h
+
+AM_CFLAGS = -DXFree86Server -DXFree86Loader
+
+libfb_la_SOURCES = \
+ fb.h \
+ fb24_32.c \
+ fballpriv.c \
+ fbarc.c \
+ fbbits.c \
+ fbbits.h \
+ fbblt.c \
+ fbbltone.c \
+ fbbstore.c \
+ fbcmap.c \
+ fbcompose.c \
+ fbcopy.c \
+ fbfill.c \
+ fbfillrect.c \
+ fbfillsp.c \
+ fbgc.c \
+ fbgetsp.c \
+ fbglyph.c \
+ fbimage.c \
+ fbline.c \
+ fboverlay.c \
+ fboverlay.h \
+ fbpict.c \
+ fbpict.h \
+ fbpixmap.c \
+ fbpoint.c \
+ fbpush.c \
+ fbrop.h \
+ fbscreen.c \
+ fbseg.c \
+ fbsetsp.c \
+ fbsolid.c \
+ fbstipple.c \
+ fbtile.c \
+ fbtrap.c \
+ fbutil.c \
+ fbwindow.c \
+ fbpseudocolor.c \
+ fbpseudocolor.h \
+ fbedge.c \
+ fbedgeimp.h \
+ fbmmx.c \
+ fbmmx.h
diff --git a/hw/Makefile.am b/hw/Makefile.am
new file mode 100644
index 000000000..26343e56b
--- /dev/null
+++ b/hw/Makefile.am
@@ -0,0 +1,9 @@
+if DMX
+DMX_SUBDIRS = dmx
+endif
+
+XORG_SUBDIRS = xfree86
+
+SUBDIRS = \
+ $(XORG_SUBDIRS) \
+ $(DMX_SUBDIRS)
diff --git a/hw/dmx/Makefile.am b/hw/dmx/Makefile.am
new file mode 100644
index 000000000..b387a9ffe
--- /dev/null
+++ b/hw/dmx/Makefile.am
@@ -0,0 +1,84 @@
+SUBDIRS = input
+bin_PROGRAMS = Xdmx
+
+if XINERAMA
+PANORAMIX_SRCS = $(top_srcdir)/Xext/panoramiX.c
+endif
+
+if GLX
+SUBDIRS += glxProxy
+GLX_LIBS = glxProxy/libglxproxy.a
+GLX_SRCS = $(PANORAMIX_SRCS) dmx_glxvisuals.c
+endif
+
+Xdmx_SOURCES = dmxinit.c \
+ dmxscrinit.c \
+ dmxshadow.c \
+ dmxcursor.c \
+ dmxinput.c \
+ dmxdpms.c \
+ dmxgc.c \
+ dmxgcops.c \
+ dmxwindow.c \
+ dmxpixmap.c \
+ dmxfont.c \
+ dmxcmap.c \
+ dmxvisual.c \
+ dmxlog.c \
+ dmxcb.c \
+ dmxprop.c \
+ dmxstat.c \
+ dmxsync.c \
+ dmxextension.c \
+ miinitext.c \
+ dmxpict.c \
+ libc_wrapper.c \
+ $(GLX_SRCS)
+
+
+
+#if COMPOSITE
+#Xdmx_SOURCES += fakecw.c
+#endif
+
+miinitext.c:
+ echo "#include <config.h>" > $@
+ echo "#undef HAVE_CONFIG_H" >> $@
+ echo "#define DMXEXT" >> $@
+ echo "#undef BEZIER " >> $@
+ echo "#undef PEXEXT " >> $@
+ echo "#undef MULTIBUFFER " >> $@
+ echo "#undef XV " >> $@
+ echo "#undef XIE " >> $@
+ echo "#undef DBE " >> $@
+ echo "#undef XF86VIDMODE " >> $@
+ echo "#undef XF86MISC " >> $@
+ echo "#undef XFreeXDGA " >> $@
+ echo "#undef XF86DRI " >> $@
+ echo "#undef MITSHM " >> $@
+ echo "#undef TOGCUP " >> $@
+ echo "#undef DPSEXT " >> $@
+ echo "#undef MITMISC " >> $@
+ echo "#undef SCREENSAVER " >> $@
+ echo "#undef RANDR " >> $@
+ echo "#undef XFIXES " >> $@
+ echo "#undef DAMAGE " >> $@
+ echo "#undef COMPOSITE " >> $@
+ echo "#undef FONTCACHE " >> $@
+ echo "#undef XFree86LOADER " >> $@
+ echo "#include \"$(top_srcdir)/mi/miinitext.c\"" >> $@
+
+DISTCLEANFILES = miinitext.c libc_wrapper.c
+
+libc_wrapper.c:
+ echo "#define SELF_CONTAINED_WRAPPER" > $@
+ echo "#include \"$(top_srcdir)/hw/xorg/os-support/shared/libc_wrapper.c\"" >> $@
+
+
+Xdmx_LDFLAGS = -rdynamic
+Xdmx_LDADD = $(XORG_CORE_LIBS) $(top_srcdir)/hw/xorg/os-support/@XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.a \
+ $(XDMX_LIBS) $(GLX_LIBS) $(top_srcdir)/miext/shadow/.libs/libshadow.a $(top_srcdir)/fb/.libs/libfb.a \
+ $(top_srcdir)/hw/xorg/dummylib/libdummy.a input/libdmxinput.a \
+ config/libdmxconfig.a -lfl $(XDMCP_LIBS) @DMXMODULES_LIBS@ -lXi
+
+Xdmx_CFLAGS = @DMXMODULES_CFLAGS@
diff --git a/hw/dmx/glxProxy/Makefile.am b/hw/dmx/glxProxy/Makefile.am
new file mode 100644
index 000000000..65735ea3a
--- /dev/null
+++ b/hw/dmx/glxProxy/Makefile.am
@@ -0,0 +1,7 @@
+noinst_LIBRARIES = libglxproxy.a
+libglxproxy_a_SOURCES = g_disptab.c glxcmds.c glxext.c glxutil.c g_renderswap.c \
+ render2swap.c renderpixswap.c global.c glxcmdsswap.c \
+ compsize.c glxscreens.c glxvisuals.c \
+ glxsingle.c glxvendor.c glxfbconfig.c glxswap.c
+
+AM_CFLAGS = -I.. -I$(top_srcdir)/include @GL_CFLAGS@ -UXFree86LOADER \ No newline at end of file
diff --git a/hw/dmx/input/Makefile.am b/hw/dmx/input/Makefile.am
new file mode 100644
index 000000000..7ba10ce44
--- /dev/null
+++ b/hw/dmx/input/Makefile.am
@@ -0,0 +1,11 @@
+noinst_LIBRARIES = libdmxinput.a
+
+RAWSRCS = lnx-keyboard.c lnx-ms.c lnx-ps2.c
+USBSRCS = usb-keyboard.c usb-mouse.c usb-other.c usb-common.c
+DRVSRCS = dmxdummy.c dmxbackend.c dmxconsole.c dmxcommon.c
+DMXSRCS = dmxinputinit.c dmxarg.c dmxsigio.c dmxevents.c \
+ dmxxinput.c dmxmotion.c dmxeq.c dmxmap.c
+
+
+libdmxinput_a_SOURCES = ChkNotMaskEv.c $(RAWSRCS) $(USBSRCS) $(DRVSRCS) $(DMXSRCS) $(LIBSRCS)
+AM_CFLAGS = -I..
diff --git a/hw/xfree86/Makefile.am b/hw/xfree86/Makefile.am
new file mode 100644
index 000000000..1f48cb02d
--- /dev/null
+++ b/hw/xfree86/Makefile.am
@@ -0,0 +1,36 @@
+SUBDIRS = common ddc dummylib i2c int10 fbdevhw os-support parser rac \
+ ramdac shadowfb vbe vgahw xaa xf1bpp xf4bpp xf8_16bpp \
+ xf8_32wid loader scanpci dixmods
+
+bin_PROGRAMS = Xorg
+
+Xorg_SOURCES = dummy.c
+
+DISTCLEANFILES = dummy.c
+
+dummy.c:
+ touch $@
+
+OS_LIBS = os-support/bus/libbus.a \
+ os-support/@XORG_OS_SUBDIR@/lib@XORG_OS_SUBDIR@.a os-support/misc/libmisc.a
+
+XORG_LIBS = \
+ @XORG_CORE_LIBS@ \
+ common/libinit.a \
+ loader/libloader.a \
+ common/libcommon.a \
+ parser/libparser.a \
+ $(OS_LIBS) \
+ dummylib/libdummy.a \
+ dixmods/libdixmods.la \
+ vgahw/libvgahw.la \
+ $(top_builddir)/fb/libfb.la \
+ @XORG_LIBS@
+
+Xorg_LDADD = $(XORG_LIBS) \
+ @XSERVER_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
new file mode 100644
index 000000000..34b6cc384
--- /dev/null
+++ b/hw/xfree86/common/Makefile.am
@@ -0,0 +1,97 @@
+noinst_LIBRARIES = libcommon.a libinit.a
+
+if XORG_BUS_SBUS
+SBUS_SOURCES = xf86sbusBus.c
+endif
+
+#if DEBUG
+#DEBUGSOURCES = xf86Debug.c
+#endif
+
+#if BUILDXV
+XVSOURCES = xf86xv.c xf86xvmc.c
+XVSDKINCS = xf86xv.h xf86xvmc.h
+#endif
+
+#if XKB
+XKBSOURCES = xf86XKB.c
+#endif
+
+#if XINPUT
+XISOURCES = xf86Xinput.c xisb.c
+XISDKINCS = xf86Xinput.h xisb.h
+#endif
+
+RANDRSOURCES = xf86RandR.c
+
+BUSSOURCES = xf86isaBus.c xf86pciBus.c xf86fbBus.c xf86noBus.c $(SBUS_SOURCES)
+
+#if LINUX
+KBDSOURCES = xf86KbdLnx.c
+# XXX psuedocodeish
+#else if BSD
+#KBDSOURCES = xf86KbdBSD.c
+#else if Mach && !GNU/Mach
+#KBDSOURCES = xf86KbdMach.c
+#else
+#KBDSOURCES = xf86Kbd.c
+#endif
+
+# shouldn't isaBus and pciBus only be built on the relevant architectures? -ds
+# ditto DoScanPci
+AM_LDFLAGS = -r
+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 \
+ xf86VidMode.c xf86fbman.c xf86cmap.c \
+ ../scanpci/xf86ScanPci.c xf86Helper.c \
+ xf86Mode.c xf86Build.h xorgHelper.c xf86Versions.c \
+ $(XVSOURCES) $(BUSSOURCES) $(XKBSOURCES) \
+ $(DEBUGSOURCES) $(XISOURCES) $(RANDRSOURCES) \
+ $(KBDSOURCES)
+libinit_a_SOURCES = xf86Build.h xf86Init.c
+
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c \
+ -I$(srcdir)/../loader -I$(srcdir)/../rac -I$(srcdir)/../parser \
+ -I$(srcdir)/../scanpci -I$(srcdir)/../vbe -I$(srcdir)/../int10 \
+ -I$(srcdir)/../vgahw
+
+sdk_HEADERS = compiler.h fourcc.h xf86.h xf86Module.h xf86Opt.h \
+ xf86PciInfo.h xf86Priv.h xf86Privstr.h xf86Resources.h \
+ xf86cmap.h xf86fbman.h xf86str.h $(XISDKINCS) \
+ $(XVSDKINCS) atKeynames.h
+
+DISTCLEANFILES = xf86Build.h
+
+EXTRA_DIST = \
+ atKeynames.h \
+ compiler.h \
+ fourcc.h \
+ scoasm.h \
+ xf86.h \
+ xf86Build.h \
+ xf86Bus.h \
+ xf86Config.h \
+ xf86InPriv.h \
+ xf86Keymap.h \
+ xf86Module.h \
+ xf86Opt.h \
+ xf86PciInfo.h \
+ xf86Priv.h \
+ xf86Privstr.h \
+ xf86Resources.h \
+ xf86Xinput.h \
+ xf86cmap.h \
+ xf86fbman.h \
+ xf86pciBus.h \
+ xf86sbusBus.h \
+ xf86str.h \
+ xf86xv.h \
+ xf86xvmc.h \
+ xf86xvpriv.h \
+ xisb.h \
+ xf86Build.h.in
+
+AM_CFLAGS = $(XORG_CFLAGS)
diff --git a/hw/xfree86/ddc/Makefile.am b/hw/xfree86/ddc/Makefile.am
new file mode 100644
index 000000000..1000cd527
--- /dev/null
+++ b/hw/xfree86/ddc/Makefile.am
@@ -0,0 +1,9 @@
+sdk_HEADERS = edid.h vdif.h xf86DDC.h
+
+module_LTLIBRARIES = libddc.la
+libddc_la_SOURCES = xf86DDC.c edid.c interpret_edid.c print_edid.c \
+ interpret_vdif.c print_vdif.c ddcProperty.c
+
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
+
+EXTRA_DIST = ddcPriv.h
diff --git a/hw/xfree86/dixmods/Makefile.am b/hw/xfree86/dixmods/Makefile.am
new file mode 100644
index 000000000..d346fdd7f
--- /dev/null
+++ b/hw/xfree86/dixmods/Makefile.am
@@ -0,0 +1,26 @@
+noinst_LTLIBRARIES = libdixmods.la
+
+module_LTLIBRARIES = libbitmap.la libfb.la
+
+# yes, this is a cheesy hack.
+AM_CFLAGS = -include xorg-config.h $(XORG_CFLAGS)
+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
+
+libbitmap_la_SOURCES = bitmapmod.c
+libbitmap_la_LDFLAGS = -lXfont
+libfb_la_SOURCES = fbmodule.c
+
+libdixmods_la_SOURCES = \
+ afbmodule.c \
+ cfbmodule.c \
+ cfb16module.c \
+ cfb24module.c \
+ cfb32module.c \
+ mfbmodule.c \
+ miinitext.c \
+ laymodule.c \
+ shmodule.c \
+ $(top_srcdir)/Xext/xf86misc.c \
+ $(top_srcdir)/Xext/xf86vmode.c
diff --git a/hw/xfree86/dummylib/Makefile.am b/hw/xfree86/dummylib/Makefile.am
new file mode 100644
index 000000000..d96407d01
--- /dev/null
+++ b/hw/xfree86/dummylib/Makefile.am
@@ -0,0 +1,13 @@
+noinst_LIBRARIES = libdummy.a
+
+INCLUDES = $(XORG_INCS)
+
+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 \
+ strlcat.c strlcpy.c
+ #xf86errorf.c xf86errorfverb.c xf86msg.c xf86msgverb.c \
+ #logvwrite.c verrorf.c xf86info.c xalloc.c fatalerror.c \
+ #$(srcdir)/../os-support/shared/sigiostubs.c
diff --git a/hw/xfree86/fbdevhw/Makefile.am b/hw/xfree86/fbdevhw/Makefile.am
new file mode 100644
index 000000000..722ea35b0
--- /dev/null
+++ b/hw/xfree86/fbdevhw/Makefile.am
@@ -0,0 +1,13 @@
+module_LTLIBRARIES = libfbdevhw.la
+
+#if FBDEVHW
+libfbdevhw_la_SOURCES = fbdevhw.c
+#else
+#libxorgfbdevhw_la_SOURCES = fbdevhwstub.c
+#endif
+
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../i2c
+
+sdk_HEADERS = fbdevhw.h
+
+EXTRA_DIST = fbpriv.h
diff --git a/hw/xfree86/i2c/Makefile.am b/hw/xfree86/i2c/Makefile.am
new file mode 100644
index 000000000..1b29aec01
--- /dev/null
+++ b/hw/xfree86/i2c/Makefile.am
@@ -0,0 +1,7 @@
+module_LTLIBRARIES = libi2c.la
+
+libi2c_la_SOURCES = xf86i2c.c xf86i2cmodule.c
+
+INCLUDES = $(XORG_INCS)
+
+sdk_HEADERS = xf86i2c.h
diff --git a/hw/xfree86/int10/Makefile.am b/hw/xfree86/int10/Makefile.am
new file mode 100644
index 000000000..99fd30731
--- /dev/null
+++ b/hw/xfree86/int10/Makefile.am
@@ -0,0 +1,30 @@
+module_LTLIBRARIES = libint10.la
+
+sdk_HEADERS = xf86int10.h
+
+if INT10_VM86
+AM_CFLAGS = -D_PC -D_VM86_LINUX $(XORG_CFLAGS)
+INCLUDES = $(XORG_INCS)
+libint10_la_SOURCES = \
+ helper_exec.c \
+ helper_mem.c \
+ pci.c \
+ xf86int10.c \
+ xf86int10module.c \
+ $(srcdir)/../os-support/linux/int10/vm86/linux_vm86.c \
+ $(srcdir)/../os-support/linux/int10/linux.c
+endif
+
+if INT10_X86EMU
+AM_CFLAGS = -D_X86EMU -D_PC $(XORG_CFLAGS)
+INCLUDES = $(XORG_INCS) -I/home/daniels/x/xorg/xc/extras/x86emu/include -I/home/daniels/x/xorg/xc/extras/x86emu/src/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
+libint10_la_SOURCES = stub.c xf86int10module.c
+endif
+
+EXTRA_DIST = xf86x86emu.h
diff --git a/hw/xfree86/loader/Makefile.am b/hw/xfree86/loader/Makefile.am
new file mode 100644
index 000000000..948ee4ed8
--- /dev/null
+++ b/hw/xfree86/loader/Makefile.am
@@ -0,0 +1,40 @@
+noinst_LIBRARIES = libloader.a
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../parser -I$(srcdir)/../vbe \
+ -I$(srcdir)/../ddc -I$(srcdir)/../int10 -I$(srcdir)/../i2c \
+ -I$(srcdir)/../fbdevhw -I$(srcdir)/../scanpci -I$(srcdir)/../xaa \
+ -I$(srcdir)/../vgahw -I$(srcdir)/../ramdac -I$(srcdir)/../shadowfb
+
+#AM_LDFLAGS = -r
+AM_CFLAGS = -DIN_LOADER
+
+EXTRA_DIST = \
+ aout.h \
+ aoutloader.h \
+ ar.h \
+ coff.h \
+ coffloader.h \
+ dlloader.h \
+ elf.h \
+ elfloader.h \
+ hash.h \
+ loader.h \
+ loaderProcs.h \
+ sym.h
+
+libloader_a_SOURCES = \
+ loader.c \
+ loaderProcs.h \
+ loadext.c \
+ loadmod.c \
+ loadfont.c \
+ aoutloader.c \
+ dlloader.c \
+ elfloader.c \
+ coffloader.c \
+ os.c \
+ dixsym.c \
+ extsym.c \
+ fontsym.c \
+ misym.c \
+ xf86sym.c \
+ hash.c
diff --git a/hw/xfree86/os-support/Makefile.am b/hw/xfree86/os-support/Makefile.am
new file mode 100644
index 000000000..b55e9786d
--- /dev/null
+++ b/hw/xfree86/os-support/Makefile.am
@@ -0,0 +1,6 @@
+SUBDIRS = bus @XORG_OS_SUBDIR@ misc
+
+sdk_HEADERS = xf86_OSproc.h xf86_OSlib.h xf86_ansic.h xf86_libc.h xf86drm.h \
+ xf86drmCompat.h assyntax.h xf86OSKbd.h xf86OSmouse.h
+
+EXTRA_DIST = int10Defines.h xf86OSpriv.h
diff --git a/hw/xfree86/os-support/bus/Makefile.am b/hw/xfree86/os-support/bus/Makefile.am
new file mode 100644
index 000000000..4e9d7861b
--- /dev/null
+++ b/hw/xfree86/os-support/bus/Makefile.am
@@ -0,0 +1,19 @@
+noinst_LIBRARIES = libbus.a
+sdk_HEADERS = xf86Pci.h
+
+PCI_SOURCES = @XORG_OS@Pci.c ix86Pci.c
+
+libbus_a_SOURCES = Pci.c $(PCI_SOURCES)
+
+if XORG_BUS_SBUS
+ libbus_a_SOURCES += Sbus.c
+endif
+
+INCLUDES = $(XORG_INCS)
+
+EXTRA_DIST = \
+ 460gxPCI.h \
+ Pci.h \
+ altixPCI.h \
+ e8870PCI.h \
+ zx1PCI.h
diff --git a/hw/xfree86/os-support/linux/Makefile.am b/hw/xfree86/os-support/linux/Makefile.am
new file mode 100644
index 000000000..0dac944b9
--- /dev/null
+++ b/hw/xfree86/os-support/linux/Makefile.am
@@ -0,0 +1,27 @@
+if DRI
+DRI_SUBDIRS=drm
+DRI_LIBS=drm/libxorglinuxdrm.a
+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)
+
+sdk_HEADERS = agpgart.h
+
+AM_CFLAGS = -DUSESTDRES -DHAVE_SYSV_IPC
+
+SUBDIRS = $(DRI_SUBDIRS)
+
+INCLUDES = $(XORG_INCS) -I/usr/include/drm # FIXME this last part is crack
+
+EXTRA_DIST = \
+ lnx.h \
+ lnx_kbd.h
diff --git a/hw/xfree86/os-support/linux/drm/Makefile.am b/hw/xfree86/os-support/linux/drm/Makefile.am
new file mode 100644
index 000000000..6f2258f19
--- /dev/null
+++ b/hw/xfree86/os-support/linux/drm/Makefile.am
@@ -0,0 +1,8 @@
+INCLUDES = -I$(srcdir)/../../shared/drm/kernel
+
+noinst_LIBRARIES = libxorglinuxdrm.a
+libxorglinuxdrm_a_SOURCES = xf86drm.c xf86drmHash.c xf86drmRandom.c \
+ xf86drmSL.c drmmodule.c
+
+sdk_LIBDIR = $(libdir)/xorg
+sdk_LIBS = libxorglinuxdrm.a
diff --git a/hw/xfree86/os-support/linux/int10/Makefile.am b/hw/xfree86/os-support/linux/int10/Makefile.am
new file mode 100644
index 000000000..598b09e15
--- /dev/null
+++ b/hw/xfree86/os-support/linux/int10/Makefile.am
@@ -0,0 +1,6 @@
+INCLUDES = -I$(srcdir)/../../../int10
+
+noinst_LIBRARIES = libxorglinuxint10.a
+libxorglinuxint10_a_SOURCES = linux.c ../../../int10/helper_mem.c \
+ ../../../int10/pci.c \
+ ../../../int10/xf86int10module.c
diff --git a/hw/xfree86/os-support/misc/Makefile.am b/hw/xfree86/os-support/misc/Makefile.am
new file mode 100644
index 000000000..11d253479
--- /dev/null
+++ b/hw/xfree86/os-support/misc/Makefile.am
@@ -0,0 +1,7 @@
+noinst_LIBRARIES = libmisc.a
+
+libmisc_a_SOURCES = Delay.c IODelay.c BUSmemcpy.c SlowBcopy.c
+
+AM_LDFLAGS = -r
+
+INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/parser/Makefile.am b/hw/xfree86/parser/Makefile.am
new file mode 100644
index 000000000..812df92df
--- /dev/null
+++ b/hw/xfree86/parser/Makefile.am
@@ -0,0 +1,11 @@
+noinst_LIBRARIES = libparser.a
+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
+
+EXTRA_DIST = \
+ Configint.h \
+ configProcs.h \
+ xf86Optrec.h \
+ xf86Parser.h \
+ xf86tokens.h
diff --git a/hw/xfree86/rac/Makefile.am b/hw/xfree86/rac/Makefile.am
new file mode 100644
index 000000000..2d02a81c2
--- /dev/null
+++ b/hw/xfree86/rac/Makefile.am
@@ -0,0 +1,6 @@
+module_LTLIBRARIES = librac.la
+librac_la_SOURCES = xf86RACmodule.c xf86RAC.c
+
+sdk_HEADERS = xf86RAC.h
+
+INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/ramdac/Makefile.am b/hw/xfree86/ramdac/Makefile.am
new file mode 100644
index 000000000..e9edef244
--- /dev/null
+++ b/hw/xfree86/ramdac/Makefile.am
@@ -0,0 +1,16 @@
+module_LTLIBRARIES = libramdac.la
+libramdac_la_SOURCES = xf86RamDacMod.c xf86RamDac.c xf86RamDacCmap.c \
+ xf86Cursor.c xf86HWCurs.c IBM.c BT.c TI.c \
+ xf86BitOrder.c
+
+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
+INCLUDES = $(XORG_INCS)
+
+xf86BitOrder.c:
+ echo "#define XAAReverseBitOrder xf86ReverseBitOrder" > $@
+ echo "#include \"$(srcdir)/../xaa/xaaBitOrder.c\"" >> $@
diff --git a/hw/xfree86/scanpci/Makefile.am b/hw/xfree86/scanpci/Makefile.am
new file mode 100644
index 000000000..f52d91b61
--- /dev/null
+++ b/hw/xfree86/scanpci/Makefile.am
@@ -0,0 +1,19 @@
+module_LTLIBRARIES = libscanpci.la libpcidata.la
+
+libpcidata_la_SOURCES = xf86PciData.c
+libscanpci_la_SOURCES = xf86ScanPci.c
+
+INCLUDES = $(XORG_INCS)
+
+EXTRA_DIST = \
+ xf86PciData.h \
+ xf86PciIds.h \
+ xf86PciStdIds.h \
+ xf86PciStr.h \
+ xf86ScanPci.h
+
+xf86PciData.c:
+ echo "#define PCIDATA" > $@
+ echo "#include \"$(srcdir)/xf86ScanPci.c\"" >> $@
+
+DISTCLEANFILES = xf86PciData.c
diff --git a/hw/xfree86/shadowfb/Makefile.am b/hw/xfree86/shadowfb/Makefile.am
new file mode 100644
index 000000000..d8e2e1dc9
--- /dev/null
+++ b/hw/xfree86/shadowfb/Makefile.am
@@ -0,0 +1,6 @@
+module_LTLIBRARIES = libshadowfb.la
+libshadowfb_la_SOURCES = sfbmodule.c shadow.c
+
+sdk_HEADERS = shadowfb.h
+
+INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/vbe/Makefile.am b/hw/xfree86/vbe/Makefile.am
new file mode 100644
index 000000000..91d4a9129
--- /dev/null
+++ b/hw/xfree86/vbe/Makefile.am
@@ -0,0 +1,7 @@
+module_LTLIBRARIES = libvbe.la
+libvbe_la_SOURCES = vbe.c vbeModes.c vbe_module.c
+
+sdk_HEADERS = vbe.h vbeModes.h
+
+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
new file mode 100644
index 000000000..cffcea32f
--- /dev/null
+++ b/hw/xfree86/vgahw/Makefile.am
@@ -0,0 +1,5 @@
+module_LTLIBRARIES = libvgahw.la
+libvgahw_la_SOURCES = vgaHW.c vgaHWmodule.c
+INCLUDES = $(XORG_INCS) -I$(srcdir)/../ddc -I$(srcdir)/../i2c
+
+sdk_HEADERS = vgaHW.h
diff --git a/hw/xfree86/xaa/Makefile.am b/hw/xfree86/xaa/Makefile.am
new file mode 100644
index 000000000..eeebf924e
--- /dev/null
+++ b/hw/xfree86/xaa/Makefile.am
@@ -0,0 +1,63 @@
+LSB_FIRST = l-xaaBitmap.c l3-xaaBitmap.c l-xaaStipple.c l3-xaaStipple.c \
+ l-xaaTEGlyph.c
+MSB_FIRST = m-xaaBitmap.c m3-xaaBitmap.c m-xaaStipple.c m3-xaaStipple.c \
+ m-xaaTEGlyph.c
+LSB_FIXED = lf-xaaBitmap.c lf3-xaaBitmap.c lf-xaaStipple.c lf3-xaaStipple.c \
+ lf-xaaTEGlyph.c
+MSB_FIXED = mf-xaaBitmap.c mf3-xaaBitmap.c mf-xaaStipple.c mf3-xaaStipple.c \
+ mf-xaaTEGlyph.c
+POLYSEG = s-xaaLine.c s-xaaDashLine.c
+
+module_LTLIBRARIES = libxaa.la
+libxaa_la_SOURCES = xaaInit.c xaaGC.c xaaInitAccel.c xaaFallback.c \
+ xaaBitBlt.c xaaCpyArea.c xaaGCmisc.c xaaCpyWin.c \
+ xaaCpyPlane.c xaaFillRect.c xaaTEText.c xaaNonTEText.c \
+ xaaPCache.c xaaSpans.c xaaROP.c xaaImage.c xaaWrapper.c \
+ xaaPaintWin.c xaaRect.c xaaLineMisc.c xaaBitOrder.c \
+ xaaFillPoly.c xaaWideLine.c xaaTables.c xaaFillArc.c \
+ xaaLine.c xaaDashLine.c xaaOverlay.c xaaOffscreen.c \
+ xaaOverlayDF.c xaaStateChange.c xaaPict.c $(POLYSEG) \
+ $(LSB_FIRST) $(MSB_FIRST) $(LSB_FIXED) $(MSB_FIXED)
+s-%.c:
+ echo "#define POLYSEGMENT" > $@
+ echo '#include "$(srcdir)/$*.c"' >> $@
+l-%.c:
+ echo "#define LSBFIRST" > $@
+ echo '#include "$(srcdir)/$*.c"' >> $@
+l3-%.c:
+ echo "#define LSBFIRST" > $@
+ echo "#define TRIPLE_BITS" >> $@
+ echo '#include "$(srcdir)/$*.c"' >> $@
+lf-%.c:
+ echo "#define LSBFIRST" > $@
+ echo "#define FIXEDBASE" >> $@
+ echo '#include "$(srcdir)/$*.c"' >> $@
+lf3-%.c:
+ echo "#define LSBFIRST" > $@
+ echo "#define TRIPLE_BITS" >> $@
+ echo "#define FIXEDBASE" >> $@
+ echo '#include "$(srcdir)/$*.c"' >> $@
+m-%.c:
+ echo "#define MSBFIRST" > $@
+ echo '#include "$(srcdir)/$*.c"' >> $@
+m3-%.c:
+ echo "#define MSBFIRST" > $@
+ echo "#define TRIPLE_BITS" >> $@
+ echo '#include "$(srcdir)/$*.c"' >> $@
+mf-%.c:
+ echo "#define MSBFIRST" > $@
+ echo "#define FIXEDBASE" >> $@
+ echo '#include "$(srcdir)/$*.c"' >> $@
+mf3-%.c:
+ echo "#define MSBFIRST" > $@
+ echo "#define TRIPLE_BITS" >> $@
+ echo "#define FIXEDBASE" >> $@
+ echo '#include "$(srcdir)/$*.c"' >> $@
+
+DISTCLEANFILES = $(POLYSEG) $(LSB_FIRST) $(LSB_FIXED) $(MSB_FIRST) $(MSB_FIXED)
+
+sdk_HEADERS = xaa.h xaalocal.h xaarop.h
+EXTRA_DIST = xaaWrapper.h xaacexp.h xaawrap.h xaaLine.c xaaDashLine.c \
+ xaaStipple.c xaaTEGlyph.c xaaBitmap.c
+
+INCLUDES = $(XORG_INCS)
diff --git a/hw/xfree86/xf1bpp/Makefile.am b/hw/xfree86/xf1bpp/Makefile.am
new file mode 100644
index 000000000..79275ee55
--- /dev/null
+++ b/hw/xfree86/xf1bpp/Makefile.am
@@ -0,0 +1,150 @@
+module_LTLIBRARIES = libxf1bpp.la
+
+sdk_HEADERS = xf1bpp.h mfbmap.h mfbunmap.h
+
+libxf1bppgen_a_SOURCES = \
+ mfbseg.c \
+ mfbpgbwht.c \
+ mfbpgbblak.c \
+ mfbpgbinv.c \
+ mfbigbwht.c \
+ mfbigbblak.c \
+ mfbpawhite.c \
+ mfbpablack.c \
+ mfbpainv.c \
+ mfbtewhite.c \
+ mfbteblack.c \
+ mfbplywhite.c \
+ mfbplyblack.c \
+ mfbplyinv.c \
+ mfbbltC.c \
+ mfbbltX.c \
+ mfbbltCI.c \
+ mfbbltO.c \
+ mfbbltG.c \
+ mfbtileC.c \
+ mfbtileG.c
+
+DISTCLEANFILES = $(libxf1bppgen_a_SOURCES)
+
+libxf1bppmfb_a_SOURCES = \
+ $(top_srcdir)/mfb/maskbits.c \
+ $(top_srcdir)/mfb/mfbbitblt.c \
+ $(top_srcdir)/mfb/mfbbres.c \
+ $(top_srcdir)/mfb/mfbbresd.c \
+ $(top_srcdir)/mfb/mfbbstore.c \
+ $(top_srcdir)/mfb/mfbclip.c \
+ $(top_srcdir)/mfb/mfbcmap.c \
+ $(top_srcdir)/mfb/mfbfillarc.c \
+ $(top_srcdir)/mfb/mfbfillrct.c \
+ $(top_srcdir)/mfb/mfbfillsp.c \
+ $(top_srcdir)/mfb/mfbfont.c \
+ $(top_srcdir)/mfb/mfbgc.c \
+ $(top_srcdir)/mfb/mfbgetsp.c \
+ $(top_srcdir)/mfb/mfbhrzvert.c \
+ $(top_srcdir)/mfb/mfbimage.c \
+ $(top_srcdir)/mfb/mfbline.c \
+ $(top_srcdir)/mfb/mfbmisc.c \
+ $(top_srcdir)/mfb/mfbpixmap.c \
+ $(top_srcdir)/mfb/mfbpntwin.c \
+ $(top_srcdir)/mfb/mfbpolypnt.c \
+ $(top_srcdir)/mfb/mfbpushpxl.c \
+ $(top_srcdir)/mfb/mfbscrclse.c \
+ $(top_srcdir)/mfb/mfbscrinit.c \
+ $(top_srcdir)/mfb/mfbsetsp.c \
+ $(top_srcdir)/mfb/mfbwindow.c \
+ $(top_srcdir)/mfb/mfbzerarc.c \
+ mfbmodule.c
+
+libxf1bpp_la_SOURCES = $(libxf1bppmfb_a_SOURCES) $(libxf1bppgen_a_SOURCES)
+
+AM_CFLAGS = -DXF86MONO -include mfbmap.h
+INCLUDES = $(XORG_INCS)
+
+mfbseg.c:
+ echo "#define POLYSEGMENT" > $@
+ echo "#include \"$(top_srcdir)/mfb/mfbline.c\"" >> $@
+mfbpgbwht.c:
+ echo "#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltWhite" > $@
+ echo "#define OPEQ |=" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbplygblt.c\"" >> $@
+mfbpgbblak.c:
+ echo "#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltBlack" > $@
+ echo "#define OPEQ &=~" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbplygblt.c\"" >> $@
+mfbpgbinv.c:
+ echo "#define MFBPOLYGLYPHBLT xf1bppPolyGlyphBltInvert" > $@
+ echo "#define OPEQ ^=" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbplygblt.c\"" >> $@
+mfbigbwht.c:
+ echo "#define MFBIMAGEGLYPHBLT xf1bppImageGlyphBltWhite" > $@
+ echo "#define OPEQ |=" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbimggblt.c\"" >> $@
+mfbigbblak.c:
+ echo "#define MFBIMAGEGLYPHBLT xf1bppImageGlyphBltBlack" > $@
+ echo "#define OPEQ &=~" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbimggblt.c\"" >> $@
+mfbpawhite.c:
+ echo "#define MFBSOLIDFILLAREA xf1bppSolidWhiteArea" > $@
+ echo "#define MFBSTIPPLEFILLAREA xf1bppStippleWhiteArea" >> $@
+ echo "#define OPEQ |=" >> $@
+ echo "#define EQWHOLEWORD =~0" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbpntarea.c\"" >> $@
+mfbpablack.c:
+ echo "#define MFBSOLIDFILLAREA xf1bppSolidBlackArea" > $@
+ echo "#define MFBSTIPPLEFILLAREA xf1bppStippleBlackArea" >> $@
+ echo "#define OPEQ &=~" >> $@
+ echo "#define EQWHOLEWORD =0" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbpntarea.c\"" >> $@
+mfbpainv.c:
+ echo "#define MFBSOLIDFILLAREA xf1bppSolidInvertArea" > $@
+ echo "#define MFBSTIPPLEFILLAREA xf1bppStippleInvertArea" >> $@
+ echo "#define OPEQ ^=" >> $@
+ echo "#define EQWHOLEWORD ^=~0" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbpntarea.c\"" >> $@
+mfbtewhite.c:
+ echo "#define OP" > $@
+ echo "#define CLIPTETEXT xf1bppImageGlyphBltWhite" >> $@
+ echo "#define MFBTEGLYPHBLT xf1bppTEGlyphBltWhite" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbtegblt.c\"" >> $@
+mfbteblack.c:
+ echo "#define OP ~" > $@
+ echo "#define CLIPTETEXT xf1bppImageGlyphBltBlack" >> $@
+ echo "#define MFBTEGLYPHBLT xf1bppTEGlyphBltBlack" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbtegblt.c\"" >> $@
+mfbplywhite.c:
+ echo "#define MFBFILLPOLY1RECT xf1bppFillPolyWhite" > $@
+ echo "#define OPEQ |=" >> $@
+ echo "#define EQWHOLEWORD =~0" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbply1rct.c\"" >> $@
+mfbplyblack.c:
+ echo "#define MFBFILLPOLY1RECT xf1bppFillPolyBlack" > $@
+ echo "#define OPEQ &=~" >> $@
+ echo "#define EQWHOLEWORD =0" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbply1rct.c\"" >> $@
+mfbplyinv.c:
+ echo "#define MFBFILLPOLY1RECT xf1bppFillPolyInvert" > $@
+ echo "#define OPEQ ^=" >> $@
+ echo "#define EQWHOLEWORD ^=~0" >> $@
+ echo "#include \"$(top_srcdir)/mfb/mfbply1rct.c\"" >> $@
+mfbbltC.c:
+ echo "#define MROP Mcopy" > $@
+ echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@
+mfbbltX.c:
+ echo "#define MROP Mxor" > $@
+ echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@
+mfbbltCI.c:
+ echo "#define MROP McopyInverted" > $@
+ echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@
+mfbbltO.c:
+ echo "#define MROP Mor" > $@
+ echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@
+mfbbltG.c:
+ echo "#define MROP M0" > $@
+ echo "#include \"$(top_srcdir)/mfb/mfbblt.c\"" >> $@
+mfbtileC.c:
+ echo "#define MROP Mcopy" > $@
+ echo "#include \"$(top_srcdir)/mfb/mfbtile.c\"" >> $@
+mfbtileG.c:
+ echo "#define MRop M0" > $@
+ echo "#include \"$(top_srcdir)/mfb/mfbtile.c\"" >> $@
diff --git a/hw/xfree86/xf4bpp/Makefile.am b/hw/xfree86/xf4bpp/Makefile.am
new file mode 100644
index 000000000..c1b24d3de
--- /dev/null
+++ b/hw/xfree86/xf4bpp/Makefile.am
@@ -0,0 +1,59 @@
+module_LTLIBRARIES = libxf4bpp.la
+
+sdk_HEADERS = xf4bpp.h
+
+libxf4bpp_la_SOURCES = \
+ ppcArea.c \
+ ppcBStore.c \
+ ppcClip.c \
+ ppcCpArea.c \
+ ppcCReduce.c \
+ ppcDepth.c \
+ ppcFillRct.c \
+ ppcWinFS.c \
+ ppcPixFS.c \
+ ppcGC.c \
+ ppcGetSp.c \
+ ppcImg.c \
+ ppcPixmap.c \
+ ppcPntWin.c \
+ ppcPolyPnt.c \
+ ppcPolyRec.c \
+ ppcQuery.c \
+ ppcRslvC.c \
+ ppcSetSp.c \
+ ppcWindow.c \
+ ppcIO.c \
+ emulOpStip.c \
+ emulRepAre.c \
+ emulTile.c \
+ vgaGC.c \
+ vgaBitBlt.c \
+ vgaImages.c \
+ vgaStipple.c \
+ vgaSolid.c \
+ offscreen.c \
+ wm3.c \
+ mfbimggblt.c \
+ mfbline.c \
+ mfbseg.c \
+ mfbhrzvert.c \
+ mfbbres.c \
+ mfbbresd.c \
+ mfbfillarc.c \
+ mfbzerarc.c \
+ vgamodule.c
+
+libxf4bpp_la_LIBADD=../xf1bpp/libxf1bpp.la
+
+EXTRA_DIST = OScompiler.h ibmTrace.h ppcGCstr.h ppcSpMcro.h vgaReg.h \
+ vgaVideo.h wm3.h
+
+DISTCLEANFILES = mfbseg.c
+
+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
diff --git a/hw/xfree86/xf8_16bpp/Makefile.am b/hw/xfree86/xf8_16bpp/Makefile.am
new file mode 100644
index 000000000..b584362a7
--- /dev/null
+++ b/hw/xfree86/xf8_16bpp/Makefile.am
@@ -0,0 +1,12 @@
+module_LTLIBRARIES = libxf8_16bpp.la
+
+sdk_HEADERS = cfb8_16.h
+
+INCLUDES = $(XORG_INCS) -I$(top_srcdir)/cfb -I$(top_srcdir)/mfb
+
+libxf8_16bpp_la_SOURCES = \
+ cfb8_16module.c \
+ cfbscrinit.c \
+ cfbwindow.c
+
+libxf8_16bpp_la_LIBADD = $(top_builddir)/cfb16/libcfb16.la
diff --git a/hw/xfree86/xf8_32bpp/Makefile.am b/hw/xfree86/xf8_32bpp/Makefile.am
new file mode 100644
index 000000000..b9afbe557
--- /dev/null
+++ b/hw/xfree86/xf8_32bpp/Makefile.am
@@ -0,0 +1,34 @@
+module_LTLIBRARIES = libxf8_32bpp.la
+
+sdk_HEADERS = cfb8_32.h
+
+INCLUDES = -I$(top_srcdir)/cfb -I$(top_srcdir)/mfb
+
+libxf8_32bpp_la_SOURCES = \
+ cfbbstore.c \
+ cfbcpyarea.c \
+ cfbcpyplane.c \
+ cfbgcmisc.c \
+ cfbimage.c \
+ cfbpntwin.c \
+ cfbscrinit.c \
+ cfbwindow.c \
+ xf86overlay.c \
+ cfb8_32module.c \
+ cfbgc8.c \
+ cfbgc32.c \
+ cfbgcunder.c
+
+libxf8_32bpp_la_LIBADD = $(top_builddir)/cfb32/libcfb32.la
+
+EXTRA_DIST = cfbgc.c
+
+cfbgc8.c: $(srcdir)/cfbgc.c
+ echo '#define PSZ 8' > $@
+ echo '#include "$(srcdir)/cfbgc.c"' >> $@
+
+cfbgc32.c: $(srcdir)/cfbgc.c
+ echo '#define PSZ 32' > $@
+ echo '#include "$(srcdir)/cfbgc.c"' >> $@
+
+DISTCLEANFILES = cfbgc8.c cfbgc32.c
diff --git a/hw/xfree86/xf8_32wid/Makefile.am b/hw/xfree86/xf8_32wid/Makefile.am
new file mode 100644
index 000000000..1d1227189
--- /dev/null
+++ b/hw/xfree86/xf8_32wid/Makefile.am
@@ -0,0 +1,15 @@
+module_LTLIBRARIES = libxf8_32wid.la
+
+sdk_HEADERS = cfb8_32wid.h
+
+INCLUDES = $(XORG_INCS) -I$(top_srcdir)/cfb -I$(top_srcdir)/mfb
+
+libxf8_32wid_la_SOURCES = \
+ cfb8_32widmodule.c \
+ cfbscrinit.c \
+ cfbwindow.c \
+ cfbwid.c
+
+#libxf8_32wid_la_LIBADD = $(top_builddir)/cfb16/libcfb16.la \
+# $(top_builddir)/cfb24/libcfb24.la \
+# $(top_builddir)/cfb32/libcfb32.la
diff --git a/include/Makefile.am b/include/Makefile.am
new file mode 100644
index 000000000..7167d0481
--- /dev/null
+++ b/include/Makefile.am
@@ -0,0 +1,50 @@
+sdk_HEADERS = \
+ XIstubs.h \
+ bstore.h \
+ bstorestr.h \
+ closestr.h \
+ closure.h \
+ colormap.h \
+ colormapst.h \
+ cursor.h \
+ cursorstr.h \
+ dix.h \
+ dixevents.h \
+ dixfont.h \
+ dixfontstr.h \
+ dixgrabs.h \
+ dixstruct.h \
+ exevents.h \
+ extension.h \
+ extinit.h \
+ extnsionst.h \
+ gc.h \
+ gcstruct.h \
+ globals.h \
+ input.h \
+ inputstr.h \
+ misc.h \
+ miscstruct.h \
+ opaque.h \
+ os.h \
+ pixmap.h \
+ pixmapstr.h \
+ property.h \
+ propertyst.h \
+ region.h \
+ regionstr.h \
+ resource.h \
+ rgb.h \
+ screenint.h \
+ scrnintstr.h \
+ selection.h \
+ servermd.h \
+ site.h \
+ swaprep.h \
+ swapreq.h \
+ validate.h \
+ window.h \
+ windowstr.h \
+ xorg-server.h
+
+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
new file mode 100644
index 000000000..b023446d2
--- /dev/null
+++ b/mfb/Makefile.am
@@ -0,0 +1,129 @@
+noinst_LTLIBRARIES = libmfb.la
+
+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 \
+ mfbtileC.c mfbtileG.c mfbplywhite.c mfbplyblack.c mfbplyinv.c
+
+DISTCLEANFILES = $(libmfb_gen_sources)
+
+libmfb_la_SOURCES = mfbgc.c mfbwindow.c mfbfont.c \
+ mfbfillrct.c mfbpntwin.c maskbits.c mfbpixmap.c \
+ mfbimage.c mfbline.c mfbbres.c mfbhrzvert.c mfbbresd.c \
+ mfbpushpxl.c mfbzerarc.c mfbfillarc.c \
+ mfbfillsp.c mfbsetsp.c mfbscrinit.c mfbscrclse.c mfbclip.c \
+ mfbbitblt.c mfbgetsp.c mfbpolypnt.c \
+ mfbcmap.c mfbmisc.c mfbbstore.c $(libmfb_gen_sources)
+
+EXTRA_DIST = maskbits.h mergerop.h fastblt.h mfbline.c mfbblt.c mfbtile.c \
+ mfbplygblt.c mfbimggblt.c mfbpntarea.c mfbtegblt.c mfbply1rct.c
+
+sdk_HEADERS = mfb.h
+
+mfbseg.c:
+ echo "#define POLYSEGMENT" > $@
+ echo "#include \"$(srcdir)/mfbline.c\"" >> $@
+
+mfbbltC.c:
+ echo "#define MROP Mcopy" > $@
+ echo "#include \"$(srcdir)/mfbblt.c\"" >> $@
+
+mfbbltX.c:
+ echo "#define MROP Mxor" > $@
+ echo "#include \"$(srcdir)/mfbblt.c\"" >> $@
+
+mfbbltCI.c:
+ echo "#define MROP McopyInverted" > $@
+ echo "#include \"$(srcdir)/mfbblt.c\"" >> $@
+
+mfbbltO.c:
+ echo "#define MROP Mor" > $@
+ echo "#include \"$(srcdir)/mfbblt.c\"" >> $@
+
+mfbbltG.c:
+ echo "#define MROP 0" > $@
+ echo "#include \"$(srcdir)/mfbblt.c\"" >> $@
+
+mfbtileC.c:
+ echo "#define MROP Mcopy" > $@
+ echo "#include \"$(srcdir)/mfbtile.c\"" >> $@
+
+mfbtileG.c:
+ echo "#define MROP 0" > $@
+ echo "#include \"$(srcdir)/mfbtile.c\"" >> $@
+
+mfbpgbwht.c:
+ echo "#define OPEQ MFB_OPEQ_WHITE" > $@
+ echo "#define MFBPOLYGLYPHBLT mfbPolyGlyphBltWhite" >> $@
+ echo "#include \"$(srcdir)/mfbplygblt.c\"" >> $@
+
+mfbpgbblak.c:
+ echo "#define OPEQ MFB_OPEQ_BLACK" > $@
+ echo "#define MFBPOLYGLYPHBLT mfbPolyGlyphBltBlack" >> $@
+ echo "#include \"$(srcdir)/mfbplygblt.c\"" >> $@
+
+mfbpgbinv.c:
+ echo "#define OPEQ MFB_OPEQ_INVERT" > $@
+ echo "#define MFBPOLYGLYPHBLT mfbPolyGlyphBltInvert" >> $@
+ echo "#include \"$(srcdir)/mfbplygblt.c\"" >> $@
+
+mfbigbwht.c:
+ echo "#define OPEQ MFB_OPEQ_WHITE" > $@
+ echo "#define MFBIMAGEGLYPHBLT mfbImageGlyphBltWhite" >> $@
+ echo "#include \"$(srcdir)/mfbimggblt.c\"" >> $@
+
+mfbigbblak.c:
+ echo "#define OPEQ MFB_OPEQ_BLACK" > $@
+ echo "#define MFBIMAGEGLYPHBLT mfbImageGlyphBltBlack" >> $@
+ echo "#include \"$(srcdir)/mfbimggblt.c\"" >> $@
+
+mfbpawhite.c:
+ echo "#define OPEQ MFB_OPEQ_WHITE" > $@
+ echo "#define MFBSOLIDFILLAREA mfbSolidWhiteArea" >> $@
+ echo "#define EQWHOLEWORD MFB_EQWHOLEWORD_WHITE" >> $@
+ echo "#define MFBSTIPPLEFILLAREA mfbStippleWhiteArea" >> $@
+ echo "#include \"$(srcdir)/mfbpntarea.c\"" >> $@
+
+mfbpablack.c:
+ echo "#define OPEQ MFB_OPEQ_BLACK" > $@
+ echo "#define MFBSOLIDFILLAREA mfbSolidBlackArea" >> $@
+ echo "#define EQWHOLEWORD MFB_EQWHOLEWORD_BLACK" >> $@
+ echo "#define MFBSTIPPLEFILLAREA mfbStippleBlackArea" >> $@
+ echo "#include \"$(srcdir)/mfbpntarea.c\"" >> $@
+
+mfbpainv.c:
+ echo "#define OPEQ MFB_OPEQ_INVERT" > $@
+ echo "#define MFBSOLIDFILLAREA mfbSolidInvertArea" >> $@
+ echo "#define EQWHOLEWORD MFB_EQWHOLEWORD_INVERT" >> $@
+ echo "#define MFBSTIPPLEFILLAREA mfbStippleInvertArea" >> $@
+ echo "#include \"$(srcdir)/mfbpntarea.c\"" >> $@
+
+mfbtewhite.c:
+ echo "#define OP MFB_OP_WHITE" > $@
+ echo "#define MFBTEGLYPHBLT mfbTEGlyphBltWhite" >> $@
+ echo "#define CLIPTETEXT mfbImageGlyphBltWhite" >> $@
+ echo "#include \"$(srcdir)/mfbtegblt.c\"" >> $@
+
+mfbteblack.c:
+ echo "#define OP MFB_OP_BLACK" > $@
+ echo "#define MFBTEGLYPHBLT mfbTEGlyphBltBlack" >> $@
+ echo "#define CLIPTETEXT mfbImageGlyphBltBlack" >> $@
+ echo "#include \"$(srcdir)/mfbtegblt.c\"" >> $@
+
+mfbplywhite.c:
+ echo "#define OPEQ MFB_OPEQ_WHITE" > $@
+ echo "#define MFBFILLPOLY1RECT mfbFillPolyWhite" >> $@
+ echo "#define EQWHOLEWORD MFB_EQWHOLEWORD_WHITE" >> $@
+ echo "#include \"$(srcdir)/mfbply1rct.c\"" >> $@
+
+mfbplyblack.c:
+ echo "#define OPEQ MFB_OPEQ_BLACK" > $@
+ echo "#define MFBFILLPOLY1RECT mfbFillPolyBlack" >> $@
+ echo "#define EQWHOLEWORD MFB_EQWHOLEWORD_BLACK" >> $@
+ echo "#include \"$(srcdir)/mfbply1rct.c\"" >> $@
+
+mfbplyinv.c:
+ echo "#define OPEQ MFB_OPEQ_INVERT" > $@
+ echo "#define MFBFILLPOLY1RECT mfbFillPolyInvert" >> $@
+ echo "#define EQWHOLEWORD MFB_EQWHOLEWORD_INVERT" >> $@
+ echo "#include \"$(srcdir)/mfbply1rct.c\"" >> $@
diff --git a/mi/Makefile.am b/mi/Makefile.am
new file mode 100644
index 000000000..900fbfd59
--- /dev/null
+++ b/mi/Makefile.am
@@ -0,0 +1,71 @@
+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
+
+# libminimi is for dmx - it has different defines for miinitext.c
+libminimi_la_SOURCES = \
+ cbrt.c \
+ mi.h \
+ miarc.c \
+ mibank.c \
+ mibank.h \
+ mibitblt.c \
+ mibstore.c \
+ mibstore.h \
+ mibstorest.h \
+ miclipn.c \
+ micmap.c \
+ micmap.h \
+ micoord.h \
+ micursor.c \
+ midash.c \
+ midispcur.c \
+ mieq.c \
+ miexpose.c \
+ mifillarc.c \
+ mifillarc.h \
+ mifillrct.c \
+ mifpolycon.c \
+ mifpoly.h \
+ migc.c \
+ migc.h \
+ miglblt.c \
+ miline.h \
+ mioverlay.c \
+ mioverlay.h \
+ mipointer.c \
+ mipointer.h \
+ mipointrst.h \
+ mipoly.c \
+ mipoly.h \
+ mipolycon.c \
+ mipolygen.c \
+ mipolypnt.c \
+ mipolyrect.c \
+ mipolyseg.c \
+ mipolytext.c \
+ mipolyutil.c \
+ mipushpxl.c \
+ miregion.c \
+ miscanfill.h \
+ miscrinit.c \
+ mispans.c \
+ mispans.h \
+ misprite.c \
+ misprite.h \
+ mispritest.h \
+ mistruct.h \
+ mivaltree.c \
+ mivalidate.h \
+ miwideline.c \
+ miwideline.h \
+ miwindow.c \
+ mizerarc.c \
+ mizerarc.h \
+ mizerclip.c \
+ mizerline.c
+
+libmi_la_SOURCES = $(libminimi_la_SOURCES)
+
+INCLUDES = -I$(top_srcdir)/mfb
diff --git a/miext/Makefile.am b/miext/Makefile.am
new file mode 100644
index 000000000..aa3ab5681
--- /dev/null
+++ b/miext/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS = damage shadow layer
+if COMPOSITE
+SUBDIRS += cw
+endif
diff --git a/miext/cw/Makefile.am b/miext/cw/Makefile.am
new file mode 100644
index 000000000..cb5bc8c8a
--- /dev/null
+++ b/miext/cw/Makefile.am
@@ -0,0 +1,6 @@
+noinst_LTLIBRARIES = libcw.la
+
+libcw_la_SOURCES = \
+ cw.c \
+ cw_ops.c \
+ cw_render.c
diff --git a/miext/damage/Makefile.am b/miext/damage/Makefile.am
new file mode 100644
index 000000000..7c0a3cd64
--- /dev/null
+++ b/miext/damage/Makefile.am
@@ -0,0 +1,6 @@
+noinst_LTLIBRARIES = libdamage.la
+
+libdamage_la_SOURCES = \
+ damage.c \
+ damage.h \
+ damagestr.h
diff --git a/miext/layer/Makefile.am b/miext/layer/Makefile.am
new file mode 100644
index 000000000..cc4da4d88
--- /dev/null
+++ b/miext/layer/Makefile.am
@@ -0,0 +1,9 @@
+noinst_LTLIBRARIES = liblayer.la
+
+liblayer_la_SOURCES = \
+ layer.h \
+ layergc.c \
+ layerinit.c \
+ layerpict.c \
+ layerstr.h \
+ layerwin.c
diff --git a/miext/shadow/Makefile.am b/miext/shadow/Makefile.am
new file mode 100644
index 000000000..2c396ddfe
--- /dev/null
+++ b/miext/shadow/Makefile.am
@@ -0,0 +1,25 @@
+module_LTLIBRARIES = libshadow.la
+
+sdk_HEADERS = shadow.h
+
+libshadow_la_SOURCES = \
+ shadow.c \
+ shadow.h \
+ shalloc.c \
+ shpacked.c \
+ shplanar8.c \
+ shplanar.c \
+ shrot16pack_180.c \
+ shrot16pack_270.c \
+ shrot16pack_90.c \
+ shrot16pack.c \
+ shrot32pack_180.c \
+ shrot32pack_270.c \
+ shrot32pack_90.c \
+ shrot32pack.c \
+ shrot8pack_180.c \
+ shrot8pack_270.c \
+ shrot8pack_90.c \
+ shrot8pack.c \
+ shrotate.c \
+ shrotpack.h
diff --git a/os/Makefile.am b/os/Makefile.am
new file mode 100644
index 000000000..934ee55c6
--- /dev/null
+++ b/os/Makefile.am
@@ -0,0 +1,40 @@
+noinst_LTLIBRARIES = libos.la
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+# k5auth.c \
+# lbxio.c \
+# rpcauth.c \
+# genalloca.c \
+# hpsocket.c \
+# secauth.c
+# xalloc.c
+
+if XCSECURITY
+XCSECURITY_SOURCES = secauth.c
+endif
+
+if XDMCP
+XDMCP_SOURCES = xdmcp.c
+endif
+
+XORG_SOURCES = log.c
+
+libos_la_SOURCES = \
+ WaitFor.c \
+ access.c \
+ auth.c \
+ connection.c \
+ io.c \
+ mitauth.c \
+ oscolor.c \
+ osdep.h \
+ osinit.c \
+ utils.c \
+ xdmauth.c \
+ xstrans.c \
+ xprintf.c \
+ $(XCSECURITY_SOURCES) \
+ $(XDMCP_SOURCES) \
+ $(XORG_SOURCES)
diff --git a/randr/Makefile.am b/randr/Makefile.am
new file mode 100644
index 000000000..16cf287c0
--- /dev/null
+++ b/randr/Makefile.am
@@ -0,0 +1,6 @@
+noinst_LTLIBRARIES = librandr.la
+
+librandr_la_SOURCES = \
+ mirandr.c \
+ randr.c \
+ randrstr.h
diff --git a/record/Makefile.am b/record/Makefile.am
new file mode 100644
index 000000000..04ae8290f
--- /dev/null
+++ b/record/Makefile.am
@@ -0,0 +1,5 @@
+noinst_LTLIBRARIES = librecord.la
+
+librecord_la_SOURCES = record.c set.c
+
+EXTRA_DIST = set.h
diff --git a/render/Makefile.am b/render/Makefile.am
new file mode 100644
index 000000000..5041df14f
--- /dev/null
+++ b/render/Makefile.am
@@ -0,0 +1,17 @@
+noinst_LTLIBRARIES = librender.la
+
+librender_la_SOURCES = \
+ animcur.c \
+ filter.c \
+ glyph.c \
+ miglyph.c \
+ miindex.c \
+ mipict.c \
+ mirect.c \
+ mitrap.c \
+ mitri.c \
+ picture.c \
+ render.c \
+ renderedge.c
+
+sdk_HEADERS = picture.h mipict.h glyphstr.h picturestr.h renderedge.h
diff --git a/xfixes/Makefile.am b/xfixes/Makefile.am
new file mode 100644
index 000000000..eccdeef36
--- /dev/null
+++ b/xfixes/Makefile.am
@@ -0,0 +1,10 @@
+noinst_LTLIBRARIES = libxfixes.la
+
+libxfixes_la_SOURCES = \
+ cursor.c \
+ region.c \
+ saveset.c \
+ select.c \
+ xfixes.c \
+ xfixes.h \
+ xfixesint.h
diff --git a/xkb/Makefile.am b/xkb/Makefile.am
new file mode 100644
index 000000000..d02a446a0
--- /dev/null
+++ b/xkb/Makefile.am
@@ -0,0 +1,51 @@
+noinst_LTLIBRARIES = libxkb.la
+
+DDX_SRCS = \
+ ddxBeep.c \
+ ddxCtrls.c \
+ ddxFakeBtn.c \
+ ddxFakeMtn.c \
+ ddxInit.c \
+ ddxKeyClick.c \
+ ddxKillSrv.c \
+ ddxLEDs.c \
+ ddxVT.c \
+ ddxLoad.c \
+ ddxList.c \
+ ddxConfig.c \
+ ddxDevBtn.c \
+ ddxPrivate.c
+
+DIX_SRCS = \
+ xkb.c \
+ xkbUtils.c \
+ xkbEvents.c \
+ xkbAccessX.c \
+ xkbSwap.c \
+ xkbLEDs.c \
+ xkbInit.c \
+ xkbActions.c \
+ xkbPrKeyEv.c
+
+# this should be replaced by a common library or something, ideally -d
+XKBFILE_SRCS = \
+ maprules.c \
+ xkmread.c \
+ xkbtext.c \
+ xkbfmisc.c \
+ xkberrs.c \
+ xkbconfig.c \
+ xkbout.c
+
+X11_SRCS = \
+ XKBMisc.c \
+ XKBAlloc.c \
+ XKBGAlloc.c \
+ XKBMAlloc.c
+
+XI_SRCS = xkbPrOtherEv.c
+
+libxkb_la_SOURCES = $(DDX_SRCS) $(DIX_SRCS) $(XI_SRCS) $(XKBFILE_SRCS) \
+ $(X11_SRCS)
+
+EXTRA_DIST = xkb.h xkbDflts.h
diff --git a/xorg-server.pc.in b/xorg-server.pc.in
new file mode 100644
index 000000000..60fb04cb9
--- /dev/null
+++ b/xorg-server.pc.in
@@ -0,0 +1,12 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+moduledir=@moduledir@
+sdkdir=@sdkdir@
+
+Name: xorg-server
+Description: Modular X.Org X Server
+Version: @PACKAGE_VERSION@
+Libs: -L${libdir}
+Cflags: -I${sdkdir} -DIN_MODULE -DXFree86Module