aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/config
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/config')
-rw-r--r--nx-X11/config/Imakefile35
-rw-r--r--nx-X11/config/cf/Amoeba.cf428
-rw-r--r--nx-X11/config/cf/DGUX.cf190
-rw-r--r--nx-X11/config/cf/DragonFly.cf354
-rw-r--r--nx-X11/config/cf/FreeBSD.cf582
-rw-r--r--nx-X11/config/cf/Imake.cf1180
-rw-r--r--nx-X11/config/cf/Imake.rules3649
-rw-r--r--nx-X11/config/cf/Imake.tmpl2320
-rw-r--r--nx-X11/config/cf/Imakefile173
-rw-r--r--nx-X11/config/cf/Library.tmpl582
-rw-r--r--nx-X11/config/cf/Mips.cf72
-rw-r--r--nx-X11/config/cf/Motif.rules709
-rw-r--r--nx-X11/config/cf/Motif.tmpl573
-rw-r--r--nx-X11/config/cf/NetBSD.cf692
-rw-r--r--nx-X11/config/cf/Oki.cf30
-rw-r--r--nx-X11/config/cf/OpenBSD.cf1017
-rw-r--r--nx-X11/config/cf/OpenBSDLib.rules191
-rw-r--r--nx-X11/config/cf/OpenBSDLib.tmpl531
-rw-r--r--nx-X11/config/cf/QNX4.cf98
-rw-r--r--nx-X11/config/cf/QNX4.rules65
-rw-r--r--nx-X11/config/cf/README700
-rw-r--r--nx-X11/config/cf/Server.tmpl79
-rw-r--r--nx-X11/config/cf/ServerLib.tmpl142
-rw-r--r--nx-X11/config/cf/Threads.tmpl105
-rw-r--r--nx-X11/config/cf/Win32.cf133
-rw-r--r--nx-X11/config/cf/Win32.rules531
-rw-r--r--nx-X11/config/cf/WinLib.tmpl16
-rw-r--r--nx-X11/config/cf/X11.rules136
-rw-r--r--nx-X11/config/cf/X11.tmpl4775
-rw-r--r--nx-X11/config/cf/apollo.cf38
-rw-r--r--nx-X11/config/cf/bsd.cf37
-rw-r--r--nx-X11/config/cf/bsdLib.rules540
-rw-r--r--nx-X11/config/cf/bsdLib.tmpl100
-rw-r--r--nx-X11/config/cf/bsdi.cf364
-rw-r--r--nx-X11/config/cf/bsdiLib.rules239
-rw-r--r--nx-X11/config/cf/bsdiLib.tmpl43
-rw-r--r--nx-X11/config/cf/cde.rules226
-rw-r--r--nx-X11/config/cf/cde.tmpl439
-rw-r--r--nx-X11/config/cf/convex.cf102
-rw-r--r--nx-X11/config/cf/cray.cf49
-rw-r--r--nx-X11/config/cf/cross.def45
-rw-r--r--nx-X11/config/cf/cross.def.NX.original45
-rw-r--r--nx-X11/config/cf/cross.def.X.original45
-rw-r--r--nx-X11/config/cf/cross.rules147
-rw-r--r--nx-X11/config/cf/cygwin.cf469
-rw-r--r--nx-X11/config/cf/cygwin.rules454
-rw-r--r--nx-X11/config/cf/cygwin.tmpl77
-rw-r--r--nx-X11/config/cf/darwin.cf330
-rw-r--r--nx-X11/config/cf/darwinLib.rules167
-rw-r--r--nx-X11/config/cf/darwinLib.tmpl61
-rw-r--r--nx-X11/config/cf/dmx.cf65
-rw-r--r--nx-X11/config/cf/fujitsu.cf95
-rw-r--r--nx-X11/config/cf/generic.cf21
-rw-r--r--nx-X11/config/cf/gnu.cf187
-rw-r--r--nx-X11/config/cf/gnuLib.rules176
-rw-r--r--nx-X11/config/cf/gnuLib.tmpl28
-rw-r--r--nx-X11/config/cf/host.def1020
-rw-r--r--nx-X11/config/cf/host.def.NX.original1020
-rw-r--r--nx-X11/config/cf/host.def.X.original0
-rw-r--r--nx-X11/config/cf/hp.cf210
-rw-r--r--nx-X11/config/cf/hpLib.rules144
-rw-r--r--nx-X11/config/cf/hpLib.tmpl39
-rw-r--r--nx-X11/config/cf/iPAQH3600.cf109
-rw-r--r--nx-X11/config/cf/iPAQH3600.cf.NX.original109
-rw-r--r--nx-X11/config/cf/iPAQH3600.cf.X.original0
-rw-r--r--nx-X11/config/cf/ibm.cf198
-rw-r--r--nx-X11/config/cf/ibmLib.rules349
-rw-r--r--nx-X11/config/cf/ibmLib.tmpl96
-rw-r--r--nx-X11/config/cf/isc.cf284
-rw-r--r--nx-X11/config/cf/linux.cf1076
-rw-r--r--nx-X11/config/cf/lnxLib.rules680
-rw-r--r--nx-X11/config/cf/lnxLib.tmpl86
-rw-r--r--nx-X11/config/cf/lnxdoc.rules145
-rw-r--r--nx-X11/config/cf/lnxdoc.tmpl85
-rw-r--r--nx-X11/config/cf/luna.cf115
-rw-r--r--nx-X11/config/cf/lynx.cf421
-rw-r--r--nx-X11/config/cf/macII.cf51
-rw-r--r--nx-X11/config/cf/mach.cf76
-rw-r--r--nx-X11/config/cf/mingw.cf551
-rw-r--r--nx-X11/config/cf/mingw.rules445
-rw-r--r--nx-X11/config/cf/mingw.tmpl77
-rw-r--r--nx-X11/config/cf/minix.cf64
-rw-r--r--nx-X11/config/cf/moto.cf58
-rw-r--r--nx-X11/config/cf/ncr.cf131
-rw-r--r--nx-X11/config/cf/nec.cf131
-rw-r--r--nx-X11/config/cf/necLib.rules131
-rw-r--r--nx-X11/config/cf/necLib.tmpl29
-rw-r--r--nx-X11/config/cf/noop.rules1
-rw-r--r--nx-X11/config/cf/nto.cf152
-rw-r--r--nx-X11/config/cf/nto.rules240
-rw-r--r--nx-X11/config/cf/oldlib.rules109
-rw-r--r--nx-X11/config/cf/os2.cf212
-rw-r--r--nx-X11/config/cf/os2.rules112
-rw-r--r--nx-X11/config/cf/os2Lib.rules210
-rw-r--r--nx-X11/config/cf/os2Lib.tmpl208
-rw-r--r--nx-X11/config/cf/os2def.db5095
-rw-r--r--nx-X11/config/cf/osf1.cf211
-rw-r--r--nx-X11/config/cf/osfLib.rules163
-rw-r--r--nx-X11/config/cf/osfLib.tmpl53
-rw-r--r--nx-X11/config/cf/pegasus.cf34
-rw-r--r--nx-X11/config/cf/sco.cf206
-rw-r--r--nx-X11/config/cf/sco5.cf380
-rw-r--r--nx-X11/config/cf/scoLib.rules68
-rw-r--r--nx-X11/config/cf/sequent.cf444
-rw-r--r--nx-X11/config/cf/sequentLib.rules323
-rw-r--r--nx-X11/config/cf/sgi.cf318
-rw-r--r--nx-X11/config/cf/sgiLib.rules204
-rw-r--r--nx-X11/config/cf/sgiLib.tmpl18
-rw-r--r--nx-X11/config/cf/site.def148
-rw-r--r--nx-X11/config/cf/site.sample125
-rw-r--r--nx-X11/config/cf/sony.cf100
-rw-r--r--nx-X11/config/cf/sun.cf966
-rw-r--r--nx-X11/config/cf/sun.cf.NX.original966
-rw-r--r--nx-X11/config/cf/sun.cf.X.original957
-rw-r--r--nx-X11/config/cf/sunLib.rules133
-rw-r--r--nx-X11/config/cf/sunLib.tmpl145
-rw-r--r--nx-X11/config/cf/sunLib.tmpl.NX.original145
-rw-r--r--nx-X11/config/cf/sunLib.tmpl.X.original258
-rw-r--r--nx-X11/config/cf/sv3Lib.rules252
-rw-r--r--nx-X11/config/cf/sv3Lib.tmpl70
-rw-r--r--nx-X11/config/cf/sv4Lib.rules206
-rw-r--r--nx-X11/config/cf/sv4Lib.tmpl89
-rw-r--r--nx-X11/config/cf/svr3.cf348
-rw-r--r--nx-X11/config/cf/svr4.cf295
-rw-r--r--nx-X11/config/cf/svr4.cf.NX.original295
-rw-r--r--nx-X11/config/cf/svr4.cf.X.original290
-rw-r--r--nx-X11/config/cf/ultrix.cf82
-rw-r--r--nx-X11/config/cf/usl.cf318
-rw-r--r--nx-X11/config/cf/x386.cf153
-rw-r--r--nx-X11/config/cf/xf86.rules229
-rw-r--r--nx-X11/config/cf/xf86.tmpl128
-rw-r--r--nx-X11/config/cf/xf86site.def693
-rw-r--r--nx-X11/config/cf/xfree86.cf2132
-rw-r--r--nx-X11/config/cf/xorg.cf1689
-rw-r--r--nx-X11/config/cf/xorg.tmpl145
-rw-r--r--nx-X11/config/cf/xorgsite.def768
-rw-r--r--nx-X11/config/cf/xorgversion.def5
-rw-r--r--nx-X11/config/cf/xprint_host.def305
-rwxr-xr-xnx-X11/config/docbook/docbookconv.sh124
-rw-r--r--nx-X11/config/imake/Imakefile84
-rw-r--r--nx-X11/config/imake/Makefile.ini86
-rw-r--r--nx-X11/config/imake/ccimake.c62
-rw-r--r--nx-X11/config/imake/imake.c2203
-rw-r--r--nx-X11/config/imake/imake.man262
-rw-r--r--nx-X11/config/imake/imakemdep.h1532
-rw-r--r--nx-X11/config/imake/imakesvc.cmd302
-rw-r--r--nx-X11/config/makedepend/Imakefile101
-rw-r--r--nx-X11/config/makedepend/cpp.ed75
-rw-r--r--nx-X11/config/makedepend/cppsetup.c233
-rw-r--r--nx-X11/config/makedepend/def.h188
-rw-r--r--nx-X11/config/makedepend/ifparser.c553
-rw-r--r--nx-X11/config/makedepend/ifparser.h83
-rw-r--r--nx-X11/config/makedepend/include.c318
-rw-r--r--nx-X11/config/makedepend/main.c865
-rw-r--r--nx-X11/config/makedepend/mkdepend.man382
-rw-r--r--nx-X11/config/makedepend/parse.c686
-rw-r--r--nx-X11/config/makedepend/pr.c124
-rw-r--r--nx-X11/config/pswrap/Imakefile27
-rw-r--r--nx-X11/config/pswrap/lexer.l814
-rw-r--r--nx-X11/config/pswrap/main.c225
-rw-r--r--nx-X11/config/pswrap/psw.c1961
-rw-r--r--nx-X11/config/pswrap/psw.h92
-rw-r--r--nx-X11/config/pswrap/pswdict.c180
-rw-r--r--nx-X11/config/pswrap/pswdict.h76
-rw-r--r--nx-X11/config/pswrap/pswfile.c87
-rw-r--r--nx-X11/config/pswrap/pswparser.y278
-rw-r--r--nx-X11/config/pswrap/pswpriv.h177
-rw-r--r--nx-X11/config/pswrap/pswrap.man141
-rw-r--r--nx-X11/config/pswrap/pswsemantics.c551
-rw-r--r--nx-X11/config/pswrap/pswsemantics.h63
-rw-r--r--nx-X11/config/pswrap/pswstring.c140
-rw-r--r--nx-X11/config/pswrap/pswtypes.h49
-rw-r--r--nx-X11/config/pswrap/pswversion.h42
-rw-r--r--nx-X11/config/pswrap/sysname_gen.c429
-rw-r--r--nx-X11/config/pswrap/systemnames.c47
-rw-r--r--nx-X11/config/pswrap/yyerror.c77
-rw-r--r--nx-X11/config/util/Imakefile168
-rw-r--r--nx-X11/config/util/Makefile.ini20
-rw-r--r--nx-X11/config/util/aminstall.sh74
-rw-r--r--nx-X11/config/util/bsdinst.sh168
-rw-r--r--nx-X11/config/util/buildos2.cmd1
-rw-r--r--nx-X11/config/util/ccmakedep.man142
-rw-r--r--nx-X11/config/util/checktree.c339
-rw-r--r--nx-X11/config/util/chownxterm.c79
-rw-r--r--nx-X11/config/util/cleanlinks.man29
-rw-r--r--nx-X11/config/util/cleanlinks.sh27
-rw-r--r--nx-X11/config/util/crayar.sh9
-rw-r--r--nx-X11/config/util/elistgen.hp202
-rw-r--r--nx-X11/config/util/elistgen.ibm220
-rw-r--r--nx-X11/config/util/elistgen.sun267
-rw-r--r--nx-X11/config/util/elistgen.usl221
-rw-r--r--nx-X11/config/util/gccmakedep.man126
-rw-r--r--nx-X11/config/util/gccmdep.cpp126
-rw-r--r--nx-X11/config/util/indir.cmd28
-rw-r--r--nx-X11/config/util/install.sh108
-rw-r--r--nx-X11/config/util/lndir.c391
-rw-r--r--nx-X11/config/util/lndir.man119
-rw-r--r--nx-X11/config/util/makedef.cmd620
-rw-r--r--nx-X11/config/util/makeg.man64
-rw-r--r--nx-X11/config/util/makeg.sh13
-rw-r--r--nx-X11/config/util/makestrs.c752
-rw-r--r--nx-X11/config/util/makestrs.man219
-rw-r--r--nx-X11/config/util/mdepend.cpp286
-rw-r--r--nx-X11/config/util/mergelib.cpp105
-rw-r--r--nx-X11/config/util/mergelib.man28
-rw-r--r--nx-X11/config/util/mkdirhier.c80
-rw-r--r--nx-X11/config/util/mkdirhier.cmd54
-rw-r--r--nx-X11/config/util/mkdirhier.man42
-rw-r--r--nx-X11/config/util/mkdirhier.sh67
-rw-r--r--nx-X11/config/util/mkhtmlindex.man32
-rw-r--r--nx-X11/config/util/mkhtmlindex.pl103
-rw-r--r--nx-X11/config/util/mkhtmlindex.sh60
-rw-r--r--nx-X11/config/util/mkshadow/Imakefile5
-rw-r--r--nx-X11/config/util/mkshadow/README38
-rw-r--r--nx-X11/config/util/mkshadow/mkshadow.c378
-rw-r--r--nx-X11/config/util/mkshadow/savedir.c119
-rw-r--r--nx-X11/config/util/mkshadow/wildmat.c167
-rw-r--r--nx-X11/config/util/printver.c29
-rw-r--r--nx-X11/config/util/revpath.c47
-rw-r--r--nx-X11/config/util/revpath.man45
-rw-r--r--nx-X11/config/util/syminst.sh90
-rw-r--r--nx-X11/config/util/x11mf.sh28
-rw-r--r--nx-X11/config/util/xmake.cmd5
-rw-r--r--nx-X11/config/util/xmkmf.cpp70
-rw-r--r--nx-X11/config/util/xmkmf.man89
225 files changed, 74021 insertions, 0 deletions
diff --git a/nx-X11/config/Imakefile b/nx-X11/config/Imakefile
new file mode 100644
index 000000000..f589e9636
--- /dev/null
+++ b/nx-X11/config/Imakefile
@@ -0,0 +1,35 @@
+XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:41:45 cpqbld Exp $
+XCOMM $XFree86: xc/config/Imakefile,v 1.3 2001/01/17 16:22:29 dawes Exp $
+#define IHaveSubdirs
+#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)"
+
+#undef BootstrapCleanSubdirs
+#define BootstrapCleanSubdirs BOOTSTRAPSUBDIRS="$(BOOTSTRAPSUBDIRS)"
+
+BOOTSTRAPSUBDIRS = imake makedepend
+#if BuildDPSLibrary
+PSWRAPDIR = pswrap
+#endif
+SUBDIRS = cf $(BOOTSTRAPSUBDIRS) util $(PSWRAPDIR)
+
+#if (defined(XFree86VersionString) || defined(XorgVersionString)) \
+ && defined(ProjectRoot) && \
+ defined(BuildBindist)
+all:: version
+
+version: cf/version.def
+ RemoveFile(version)
+#if defined (XFree86VersionString)
+ echo XFree86VersionString > version
+#elif defined (XorgVersionString)
+ echo XorgVersionString > version
+#endif
+
+InstallNamedNonExec(version,.$(VENDORNAMESHORT)_Version,ProjectRoot)
+
+clean::
+ RemoveFile(version)
+#endif
+
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
diff --git a/nx-X11/config/cf/Amoeba.cf b/nx-X11/config/cf/Amoeba.cf
new file mode 100644
index 000000000..858da13bd
--- /dev/null
+++ b/nx-X11/config/cf/Amoeba.cf
@@ -0,0 +1,428 @@
+XCOMM platform: $Xorg: Amoeba.cf,v 1.3 2000/08/17 19:41:45 cpqbld Exp $
+XCOMM platform: $XFree86: xc/config/cf/Amoeba.cf,v 3.10tsi Exp $
+
+/* The presence of this configuration file in the X distribution
+ * does not imply full support for the system it describes.
+ * Additional patches from The XFree86 Project, Inc. will be required to
+ * compile the X distribution on Amoeba. According to them, these patches
+ * will also be made available at the regular Amoeba ftp site
+ * ftp.am.cs.vu.nl.
+ */
+
+/*
+ * Configuration file for Amoeba 5.2
+ */
+
+#ifndef OSName
+#define OSName Amoeba 5.2
+#endif
+XCOMM operating system: OSName
+#ifndef OSMajorVersion
+#define OSMajorVersion 5
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 2
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 0
+#endif
+#ifndef OSVendor
+#define OSVendor Vrije Universiteit
+#endif
+
+#define AmoebaArchitecture YES
+
+/* Configuration defaults */
+#ifndef AmoebaTop
+#define AmoebaTop __AM_TOP__
+#endif
+#ifndef AmoebaBin
+#define AmoebaBin $(ATOP)/bin.sun4
+#endif
+#ifndef AmoebaConf
+#define AmoebaConf __AM_CONF__
+#endif
+
+#define HasNdbm YES
+#define NeedSdbm YES
+#define HasShm NO
+#define HasSecureRPC NO
+#define SetTtyGroup NO
+#define HasPutenv YES
+#define HasSockets NO
+#define HasStreams NO
+
+#if defined(Sun3Architecture) || defined(SparcArchitecture)
+#define XsunAmoebaServer YES
+#define XsunAmoebaMonoServer YES
+#endif
+
+#define BuildFonts NO
+#define BuildFontServer NO
+#define BuildXIE NO
+
+#define YaccCmd byacc
+#define TermcapLibrary /* in libajax */
+#define LexLib /* not needed */
+
+#define ServerOSDefines XFree86ServerOSDefines
+
+#define UsrLibDir $(DESTDIR)/profile/module/x11/lib
+#define LibDir $(DESTDIR)/profile/module/x11/lib
+#define ManDirectoryRoot $(DESTDIR)/profile/module/x11/man
+#define BinDir $(DESTDIR)/profile/module/x11/bin
+#define IncRoot $(DESTDIR)/profile/module/x11/include
+#define FontDir $(DESTDIR)/profile/module/x11/fonts/$(ARCH)
+#define DefaultRGBDatabase $(DESTDIR)/profile/module/x11/lib/rgb/$(ARCH)/rgb
+
+#define ManSuffix 1
+#define ManPath ManDirectoryRoot
+#define XmanLocalSearchPath ManDirectoryRoot
+
+#define DefaultUserPath :/bin:$(BINDIR)
+#define DefaultSystemPath /bin:$(BINDIR):
+
+#define StandardIncludes -I$(ATOP)/src/h \
+ -I$(ATOP)/src/h/posix \
+ -I$(ATOP)/src/h/posix/machdep/$(ARCH) \
+ -I$(ATOP)/src/h/machdep/arch/$(ARCH) \
+ -I$(ATOP)/src/h/toolset/$(TOOLSET)
+
+#define Malloc0ReturnsNull YES
+#define ServerInstallFlags -s 32
+#define FontDefines -DFONT_SNF
+#define ConnectionFlags -DAMTCPCONN -DAMRPCCONN
+#define ServerXdmcpDefines /* no -DXDMCP */
+#define UseRgbTxt YES
+#define NdbmDefines -DSDBM -DNDBM -I$(XINCLUDESRC)
+#define DBMLibrary /* $(LIBSRC)/sdbm/libsdbm.a */
+
+#if defined(i386Architecture)
+#ifndef AckToolset
+#define AckToolset YES
+#define ExtraFPLoadFlags -fp
+#endif
+#define XF86MonoServer YES
+#endif
+
+#if defined(Sun3Architecture)
+#ifndef AckToolset
+#define AckToolset YES
+#endif
+#endif
+
+#if AckToolset
+#define CcCmd ack
+#define ServerCcCmd ack
+#define LdCmd ack
+#define AckArchOption -mam_$(ARCH)
+#define DefaultCCOptions AckArchOption
+#define LibraryCCOptions AckArchOption
+#define LdCombineFlags -Rled-r -c.out
+#define ArCmd aal clrv
+#define RanlibCmd /bin/true
+#define AsCmd AmoebaConf/$(ARCH).$(TOOLSET)/toolset/do_as AckArchOption
+#define AsIncl -I$(ATOP)/src/h/machdep/arch/$(ARCH)
+#define AsmDefines -DACK_ASSEMBLER
+#define LdPreLib /**/
+#define LdPostLib /**/
+#endif
+
+#if defined(SparcArchitecture)
+#define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+
+#define CcCmd cc
+#define ServerCcCmd cc
+#define LdCmd AmoebaConf/$(ARCH).$(TOOLSET)/toolset/do_gld
+#define DefaultCCOptions -sun4
+#define LibraryCCOptions -sun4
+#define AmoebaCompilerDefs -Usun
+#define ServerExtraDefines AllocateLocalDefines
+#define LdPostLib /**/
+#endif
+
+#ifndef AmoebaCompilerDefs
+#define AmoebaCompilerDefs /**/
+#endif
+
+#define CommonAmoebaDefines -DAMOEBA -D$(ARCH) AmoebaCompilerDefs
+#define StandardDefines CommonAmoebaDefines
+#define StandardCppDefines StandardDefines
+
+#ifndef ExtraFPLoadFlags
+#define ExtraFPLoadFlags
+#endif
+#define MathLibrary $(ALIB)/math/libmath.a
+#define OSLibraries $(ALIB)/ajax/libajax.a \
+ $(ALIB)/amoeba/libamoeba.a \
+ MathLibrary \
+ ExtraFPLoadFlags
+#define ServerExtraSysLibs $(CBRT) OSLibraries
+#define ExtraLoadFlags OSLibraries
+
+ATOP = AmoebaTop
+ALIB = AmoebaConf/$(ARCH).$(TOOLSET)/lib
+#if AckToolset
+/* The ACK toolset already links in the appropriate head.o by default */
+HEAD =
+#else
+HEAD = $(ALIB)/head/head.o
+#endif
+
+ABIN = AmoebaBin
+AINSTALL = /bin/sh $(CONFIGSRC)/util/aminstall.sh $(ABIN)
+AINSTALLFLAGS =
+TOB = /bin/sh $(CONFIGSRC)/util/aminstall.sh $(ABIN)
+MKXDIRHIER = /bin/sh $(CONFIGSRC)/util/ammkdirhier.sh $(ABIN)
+
+/* Make wizardy: */
+COMPILE.c=$(CC) $(CFLAGS) $(CPPFLAGS) -c
+LINK.c=$(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
+
+#if defined(i386Architecture)
+ARCH = i80386
+TOOLSET = ack
+ALDFLAGS = /* -mam_i80386 now in CCopts */ -.c -Rcv-s32
+
+#include <xorg.cf>
+#endif
+
+#if defined(Sun3Architecture)
+ARCH = mc68000
+TOOLSET = ack
+ALDFLAGS = -.c -Rcv-s32
+#endif
+
+#if defined(SparcArchitecture)
+ARCH = sparc
+TOOLSET = sun
+SPARCLIBDIR = AmoebaBin/gnu/sparc
+ALDFLAGS = -mam_sparc -n -Ttext 40000 -Bstatic -e start -L$(SPARCLIBDIR)
+#endif
+
+#define BootstrapCFlags -DAMOEBA -DCROSS_$(ARCH) -DCROSS_COMPILE
+
+/*
+ * The rest of this files consists of rules to allow cross-compilation
+ * and installation of binaries and data files from the Unix host to
+ * the Amoeba file system.
+ */
+
+/* #ifdef CROSS_COMPILING */
+#define CrossCompiling YES
+
+#define HostLinkRule(target, flags, src, libs) cc -o target src
+
+#define LinkRule(program,options,objects,libraries) \
+$(LD) $(ALDFLAGS) $(HEAD) -o program options objects libraries $(EXTRA_LOAD_FLAGS)
+
+/* ComplexHostProgramTarget - Compile a program such that we can run
+ * it on this host, i.e., don't use the default cross compiler.
+ */
+#ifndef ComplexHostProgramTarget
+#define ComplexHostProgramTarget(program) @@\
+ CC=cc @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+program: $(OBJS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+DependTarget() @@\
+ @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* ComplexHostProgramTarget */
+
+#ifndef SimpleHostProgramTarget
+#define SimpleHostProgramTarget(program) @@\
+ OBJS = program.o @@\
+ SRCS = program.c @@\
+ @@\
+ComplexHostProgramTarget(program)
+#endif /* SimpleHostProgramTarget */
+
+
+#ifndef Concat
+#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
+#define Concat(a,b)a##b
+#else
+#define Concat(a,b)a/**/b
+#endif
+#endif
+
+/*
+ * LintLibReferences - variables for lint libraries
+ */
+#ifndef LintLibReferences
+#define LintLibReferences(varname,libname,libsource) @@\
+Concat(LINT,varname) = Concat(libsource/llib-,libname.ln)
+#endif
+
+/*
+ * UnsharedLibReferences - variables for unshared libraries
+ */
+#ifndef UnsharedLibReferences
+#define UnsharedLibReferences(varname,libname,libsource) @@\
+Concat3(DEP,varname,LIB) = Concat($(BUILDLIBDIR)/lib,libname.a) @@\
+ Concat(varname,LIB) = Concat($(BUILDLIBDIR)/lib,libname.a) @@\
+LintLibReferences(varname,libname,libsource)
+#endif
+
+#ifndef InstallLibrary
+#define InstallLibrary(libname,dest) @@\
+install:: Concat(lib,libname.a) @@\
+ @echo '** TODO: Install Library ' Concat(lib,libname.a)
+#endif /* InstallLibrary */
+
+#ifndef MergeIntoInstalledLibrary
+#define MergeIntoInstalledLibrary(tolib,fromlib) @@\
+install:: fromlib @@\
+ @echo '** TODO: merge ' fromlib into tolib
+#endif /* MergeIntoInstalledLibrary */
+
+#ifndef InstallLibraryAlias
+#define InstallLibraryAlias(libname,alias,dest) @@\
+install:: @@\
+ @echo '** TODO: Install lib alias ' libname alias dest
+#endif /* InstallLibraryAlias */
+
+#ifndef InstallLintLibrary
+#define InstallLintLibrary(libname,dest) @@\
+install.ln:: Concat(llib-l,libname.ln) @@\
+ @echo '** TODO: Install lintlib ' Concat(llib-l,libname.ln)
+#endif /* InstallLintLibrary */
+
+#ifndef InstallManPageLong
+#define InstallManPageLong(file,destdir,dest) @@\
+install.man:: file.man @@\
+ @echo '** TODO: Install man page ' file.man
+#endif /* InstallManPageLong */
+
+#ifndef InstallGenManPageLong
+#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
+install.man:: file.man @@\
+ @echo '** TODO: Install man page ' file.man
+#endif /* InstallGenManPageLong */
+
+#ifndef InstallManPageAliases
+#define InstallManPageAliases(file,destdir,aliases) @@\
+install.man:: @@\
+ @(TMP=/tmp/tmp.$$$$; \ @@\
+ $(RM) $${TMP}; \ @@\
+ echo .so `basename destdir`/file.$(MANSUFFIX) > $${TMP}; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ $(TOB) $${TMP} $(DESTDIR)destdir/$$i.$(MANSUFFIX)); \ @@\
+ done; \ @@\
+ $(RM) $${TMP})
+#endif /* InstallManPageAliases */
+
+#ifndef InstallGenManPageAliases
+#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
+install.man:: @@\
+ @(TMP=/tmp/tmp.$$$$; \ @@\
+ $(RM) $${TMP}; \ @@\
+ echo .so `basename destdir`/file.suffix > $${TMP}; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ $(TOB) $${TMP} $(DESTDIR)destdir/$$i.suffix); \ @@\
+ done; \ @@\
+ $(RM) $${TMP})
+#endif /* InstallGenManPageAliases */
+
+#ifndef InstallNamedNonExec
+#define InstallNamedNonExec(srcname,dstname,dest) @@\
+install:: srcname @@\
+ $(MKXDIRHIER) $(DESTDIR)dest @@\
+ $(TOB) srcname $(DESTDIR)dest/dstname
+#endif /* InstallNamedNonExec */
+
+#ifndef InstallNonExecFile
+#define InstallNonExecFile(file,dest) @@\
+install:: file @@\
+ $(MKXDIRHIER) dest @@\
+ $(TOB) file dest/file
+#endif /* InstallNonExecFile */
+
+#ifndef InstallNonExec
+#define InstallNonExec(file,dest) @@\
+install:: file @@\
+ $(TOB) file dest/file
+#endif /* InstallNonExec */
+
+#ifndef InstallProgramWithFlags
+#define InstallProgramWithFlags(program,dest,flags) @@\
+install:: program @@\
+ $(MKXDIRHIER) dest/program @@\
+ $(AINSTALL) $(AINSTALLFLAGS) program dest/program/pd.$(ARCH)
+#endif /* InstallProgramWithFlags */
+
+#ifndef InstallScript
+#define InstallScript(program,dest) @@\
+install:: program.script @@\
+ $(TOB) program.script dest/program
+#endif /* InstallScript */
+
+#ifndef InstallNamedScript
+#define InstallNamedScript(srcname,dstname,dest) @@\
+install:: srcname @@\
+ $(TOB) srcname dest/dstname
+#endif /* InstallNamedScript */
+
+#ifndef InstallNamedProg
+#define InstallNamedProg(srcname,dstname,dest) @@\
+install:: srcname @@\
+ $(MKXDIRHIER) $(DESTDIR)dest/dstname @@\
+ $(AINSTALL) $(AINSTALLFLAGS) srcname $(DESTDIR)dest/dstname/pd.$(ARCH)
+#endif /* InstallNamedProg */
+
+#ifndef InstallMultipleDestFlags
+#define InstallMultipleDestFlags(step,list,dest,flags) @@\
+step:: list @@\
+ $(MKXDIRHIER) $(DESTDIR)dest @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (set -x; $(TOB) $$i dest/$$i); \ @@\
+ done
+#endif /* InstallMultipleDestFlags */
+
+#ifndef InstallMultipleProg
+#define InstallMultipleProg(list,dest) @@\
+install:: list @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (set -x; \ @@\
+ $(MKXDIRHIER) $(DESTDIR)dest/$$i; \ @@\
+ $(AINSTALL) $(AINSTALLFLAGS) $$i dest/$$i/pd.$(ARCH));\ @@\
+ done
+#endif /* InstallMultipleProg */
+
+#ifndef InstallAppDefaults
+#if InstallAppDefFiles
+#define InstallAppDefaults(class) @@\
+install:: class.ad @@\
+ $(MKXDIRHIER) $(XAPPLOADDIR) @@\
+ $(TOB) class.ad $(DESTDIR)$(XAPPLOADDIR)/class
+#else
+#define InstallAppDefaults(class)
+#endif /* InstallAppDefFiles */
+#endif /* InstallAppDefaults */
+
+#ifndef InstallAppDefaultsLong
+#if InstallAppDefFiles
+#define InstallAppDefaultsLong(file,class) @@\
+install:: file.ad @@\
+ $(MKXDIRHIER) $(DESTDIR)$(XAPPLOADDIR) @@\
+ $(TOB) file.ad $(DESTDIR)$(XAPPLOADDIR)/class
+#else
+#define InstallAppDefaultsLong(file,class)
+#endif /* InstallAppDefFiles */
+#endif /* InstallAppDefaultsLong */
+
+/* #endif CROSS_COMPILE */
diff --git a/nx-X11/config/cf/DGUX.cf b/nx-X11/config/cf/DGUX.cf
new file mode 100644
index 000000000..722fe7bc6
--- /dev/null
+++ b/nx-X11/config/cf/DGUX.cf
@@ -0,0 +1,190 @@
+XCOMM platform: $XFree86: xc/config/cf/DGUX.cf,v 1.5 2000/07/07 20:06:56 tsi Exp $
+/* Copyright Takis Psarogiannakopoulos <takis@pmms.cam.ac.uk>
+ * This is the DG/ux configuration file of X11R6.3
+ */
+#define OSName DG/ux R4.20MU03
+#define i386Architecture
+#ifndef OSVendor
+#define OSVendor Data General Corporation
+#endif
+
+#define OSMajorVersion 4
+#define OSMinorVersion 20
+#define OSTeenyVersion 3
+#define BootstrapCFlags -DDGUX
+
+/* Some stuff that all SVR4s ,so and DG/ux, should have */
+
+#define SystemV4 YES
+#ifndef HasLdRunPath
+#define HasLdRunPath YES
+#endif
+#define HasPoll YES
+#ifndef SVR4Architecture
+#define SVR4Architecture
+#endif
+#ifndef PatheticCpp
+#define PatheticCpp YES
+#endif
+#define Malloc0ReturnsNull YES /* in case -lmalloc used */
+
+/*
+ * Here are the default paths to use tools for building.
+ */
+
+#define ArCmdBase /usr/bin/ar
+#define AsCmd /usr/bin/as
+#define CppCmd /usr/lib/cpp
+#define LdCmd /usr/bin/ld
+#define LexCmd /usr/bin/lex
+#define CcCmd /usr/local/bin/gcc /* ? -fpcc-struct-return */
+#define UNCOMPRESSPATH /usr/bin/uncompress
+#define MakeCmd /usr/local/bin/make
+#define YaccCmd /usr/bin/yacc
+#define InstallCmd /usr/bin/install /* I use gnu install-sh */
+#define LnCmd ln -s
+#define RanlibCmd true /* Or make a link ranlib->true */
+#define CplusplusCmd /usr/local/bin/g++
+
+
+
+
+
+
+#ifndef MkdirHierCmd
+#define MkdirHierCmd mkdir -p
+#endif
+/* Stuff for SVR4 4.0 */
+#ifndef XawI18nDefines
+#define XawI18nDefines -DUSE_XWCHAR_STRING
+#endif
+
+#define HasPutenv YES
+#define HasVFork YES
+#define HasVoidSignalReturn YES
+#define HasBsearch YES
+#define HasSockets YES
+#define BuildServer YES
+#define HasSharedLibraries YES /* to build shared libs */
+#define HasCplusplus YES
+#define HasGnuMake YES /* Added for 3.2Xc */
+#define UseGnuMalloc YES
+#define GnuMallocLibrary -L/usr/local/lib -lmalloc
+#define Malloc0ReturnsNull YES /* Added for 3.2Xh,i... GNU does return 0 */
+#define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL /* define for GNU malloc X3.2i */
+/*******TCL TK DEFINITIONS ***********/
+#define HasTk YES /* Comment out if you dont have this */
+#define TkLibDir /usr/X11R6.3/lib
+#define TkIncDir /usr/X11R6.3/include
+#define TkLibName tk8.0
+#define HasTcl YES
+#define TclLibName tcl8.0
+#define TclLibDir /usr/X11R6.3/lib
+#define TclIncDir /usr/X11R6.3/include
+
+#define SystemManDirectory /usr/local/man/X
+
+#define ExtraLibraries -lelf -lgen -lresolv -lsocket -lnsl -lw
+
+#define StandardDefines -DDGUX -DSVR4 -Di386 -D__ix86 -D_DGUX_SOURCE -D_LITTLE_ENDIAN -D_PENTIUM_CHANGE
+
+#define PositionIndependentCFlags -fpic
+#define PositionIndependentCplusplusFlags -fpic
+
+/*
+ * To forceably build static libraries in addition to shared libraries,
+ * we put this.
+ */
+#define ForceNormalLib YES
+
+#ifndef ToolkitStringsABIOptions
+#define ToolkitStringsABIOptions -intelabi -earlyR6bc
+#endif
+
+#ifndef DefaultCCOptions
+#define DefaultCCOptions /* -ansi -pedantic */
+#endif
+#define OptimizedCDebugFlags -O2 /* Add -g -mstandard for full debuging info */
+#define OptimizedCplusplusDebugFlags
+#define DebuggableCDebugFlags -g -mstandard
+#define DebuggableCplusplusDebugFlags
+#define SharedLibraryLoadFlags -G -z text
+#define PositionIndependentCFlags -fpic
+#define PositionIndependentCplusplusFlags -fpic
+
+
+
+/*
+ * The default optimisation flags for GCC 2.x. -fno-strength-reduce is
+ * here to work around a bug in -O2 for GCC 2.x on i386 platforms.
+ * If you are using a version that doesn't have this bug, you can
+ * uncomment the following line, and remove '-fno-strength-reduce'
+ *
+#define DefaultGcc2i386Opt -O2 -fno-strength-reduce
+ */
+
+/* Compress all the Fonts */
+#define CompressAllFonts YES
+
+
+
+/* Manual pages installed under their full names */
+
+#define ExpandManNames YES
+#define CompressManPages YES
+
+
+
+
+/* Install with stripping before ? */
+#define StripInstalledPrograms YES
+
+/* Server to Install */
+#define XserverNeedsSetUID YES
+#define InstallXserverSetUID YES
+
+
+#ifndef ServerOSDefines
+#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
+#endif
+#ifndef BuildDynamicLoading
+#define BuildDynamicLoading NO
+#endif
+#if BuildDynamicLoading
+#define ServerExtraSysLibs -ldl
+#endif
+
+/*
+ * The TLI interface is more robust on most SVR4s, so it will be the default.
+ */
+#ifndef ConnectionFlags
+#define ConnectionFlags -DSTREAMSCONN -DUNIXCONN -DLOCALCONN
+#endif
+
+#ifndef ManSuffix
+#define ManSuffix 1x
+#define ManDir $(MANSOURCEPATH)1
+#endif
+#ifndef LibManSuffix
+#define LibManSuffix 3x
+#define LibmanDir $(MANSOURCEPATH)3
+#endif
+#ifndef FileManSuffix
+#define FileManSuffix 4
+#endif
+
+#ifndef StaticLibrary
+#ifndef HasGcc
+#define StaticLibrary(libpath,libname) -B static Concat(-L,libpath) Concat(-l,libname) -B dynamic
+#endif
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+#ifdef i386Architecture
+#include <xorg.cf>
+#endif
+
+#include <sv4Lib.rules>
diff --git a/nx-X11/config/cf/DragonFly.cf b/nx-X11/config/cf/DragonFly.cf
new file mode 100644
index 000000000..feec8a50b
--- /dev/null
+++ b/nx-X11/config/cf/DragonFly.cf
@@ -0,0 +1,354 @@
+XCOMM $XdotOrg: xc/config/cf/DragonFly.cf,v 1.1 2005/03/02 11:20:29 gisburn Exp $
+
+#define UseElfFormat YES
+
+#define OSBinaryFormat [ELF]
+
+#ifndef OSName
+#define OSName DefaultOSName OSBinaryFormat
+#endif
+#ifndef OSVendor
+#define OSVendor /**/
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+
+#ifndef OSRelVersion
+/* Include this to get finer-grained information about the OS version */
+#include "/usr/include/osreldate.h"
+#define OSRelVersion __DragonFly_version
+#endif
+
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion) (OSRelVersion)
+
+/*
+ * Base OS setup
+ */
+#define HasCplusplus YES
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#define HasBasename YES
+#define HasBSD44Sockets YES
+#define HasDlopen YES
+#define HasGetIfAddrs YES
+#define HasIssetugid YES
+#define HasLibCrypt YES
+#define HasMktemp YES
+#define HasNCurses YES
+#define HasNdbm YES
+#define HasPlugin YES
+#define HasPoll YES
+#define HasPutenv YES
+#define HasUsableFileMmap YES
+#define HasSetProcTitle YES
+#define HasShm YES
+#define HasSnprintf YES
+#define HasStrlcat YES
+#define HasVarDb YES
+#define HasVarRun YES
+#define HasWChar32 YES
+#define HasWeakSymbols UseElfFormat
+#define BuildXaw6 NO /*depreciated*/
+#define BuildXaw7 NO /*depreciated*/
+#define BuildXaw YES /*needed*/
+#ifndef BuildPDFdocs
+#define BuildPDFdocs NO
+#endif
+#define IPv6SocketsAlsoIPv4 NO
+#define InstallXloadSetGID NO
+
+/*
+ * Multi-thread safe libs
+ */
+#ifndef HasLibPthread
+# define HasLibPthread NO
+#endif
+#define HasPosixThreads YES
+#define ThreadedX YES
+#define SystemMTDefines -D_REENTRANT -D_THREAD_SAFE
+#define HasThreadSafeAPI YES
+#define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI
+#if HasLibPthread
+# define ThreadsLibraries -lpthread
+#else
+# define ThreadsLibraries -pthread
+#endif
+
+
+#define AvoidNullMakeCommand YES
+#define StripInstalledPrograms YES
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull YES
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedWidePrototypes NO
+
+#define MkdirHierCmd mkdir -p
+
+#define LexCmd flex -l
+#define HasFlex YES
+
+#ifndef CcCmd
+# define CcCmd cc
+#endif
+#ifndef CplusplusCmd
+# define CplusplusCmd c++
+#endif
+#define CppCmd /usr/bin/cpp
+#define PreProcessCmd CppCmd
+#define StandardCppOptions -traditional
+#define StandardCppDefines /**/
+#ifndef DefaultCCOptions
+# if defined(UseInstalled)
+# define DefaultCCOptions /**/
+# else
+# if defined(HasGcc3) && HasGcc3
+# define NoSystemWarn -Wno-system-headers
+# else
+# define NoSystemWarn
+# endif
+# define DefaultCCOptions -ansi NoSystemWarn -Dasm=__asm GccWarningOptions
+#endif
+#ifndef ExtraLibraries
+/* support for multi-byte locales is in libxpg4 rather than libc */
+#define ExtraLibraries -lxpg4
+#endif
+#define HasSetUserContext YES
+#define HasGetpeereid YES
+#define HasMTRRSupport YES
+
+#ifndef BuildXF86DRI
+# define BuildXF86DRI YES
+#endif
+
+#if defined(i386Architecture)
+#define HasAgpGart YES
+#endif
+
+/*
+ * SSE and 3DNow will be autodetected, so binutils is the only
+ * requirement for enabling this.
+ */
+#if defined(i386Architecture)
+# define HasX86Support YES
+# define HasMMXSupport YES
+# define Has3DNowSupport YES
+# define HasSSESupport YES
+#else
+# define HasX86Support NO
+# define HasMMXSupport NO
+# define Has3DNowSupport NO
+# define HasSSESupport NO
+#endif
+
+#ifndef UseRpath
+# define UseRpath YES
+#endif
+
+#ifndef RpathLoadFlags
+# if UseRpath
+# define RpathLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
+# else
+# define RpathLoadFlags /**/
+# endif
+#endif
+
+#ifndef ExtraLoadFlags
+# if !defined(UseInstalled)
+# define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(BUILDLIBDIR)
+# else
+# define ExtraLoadFlags RpathLoadFlags
+# endif
+#endif
+
+#endif
+
+#ifndef LibraryRpathLoadFlags
+# if UseRpath
+# define LibraryRpathLoadFlags -rpath $(USRLIBDIRPATH)
+# else
+# define LibraryRpathLoadFlags /**/
+# endif
+#endif
+
+#ifndef SharedLibraryLoadFlags
+# define SharedLibraryLoadFlags -shared LibraryRpathLoadFlags
+#endif
+
+#ifndef HasZlib
+# define HasZlib YES
+#endif
+
+#ifndef HasPam
+# define HasPam YES
+#endif
+
+/* Take from FreeBSD */
+/* There are two options for building. One is to assume that the system has
+ * many of the dependencies provided by the ports tree. The other is to just
+ * build everything from this tree.
+ */
+
+#ifndef HasStandardPorts
+# define HasStandardPorts YES
+#endif
+
+#ifndef LocalBase
+# define LocalBase /usr/local
+#endif
+#ifndef X11Base
+# define X11Base /usr/X11R6
+#endif
+
+#if HasStandardPorts
+
+#ifndef HasExpat
+# define HasExpat YES
+# define ExpatDir LocalBase
+#endif
+
+#ifndef HasFreetype2
+# define HasFreetype2 NO /* set this to YES once DragonFly ships FT218 */
+# define Freetype2Dir LocalBase
+#endif
+
+#ifndef HasFontconfig
+# define HasFontconfig YES
+# define FontconfigDir X11Base
+#endif
+
+#ifndef HasLibpng
+# define HasLibpng YES
+# define LibpngDir LocalBase
+#endif
+
+#endif /* HasStandardPorts */
+
+#undef InstallCmd
+#define InstallCmd /usr/bin/install
+
+#define AsmElfDefines -D__ELF__
+
+#if GccUsesGas
+# define GccGasOption -DGCCUSESGAS
+# define AsmDefines -DUSE_GAS AsmElfDefines
+#else
+# define GccGasOption /**/
+# define AsmDefines AsmElfDefines
+#endif
+
+#ifdef i386Architecture
+#define ServerExtraDefines GccGasOption XFree86ServerDefines
+#endif
+#if defined(Sparc64Architecture) || defined(ia64Architecture) || \
+ defined(AMD64Architecture)
+#define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
+#endif
+
+#define StandardDefines -DCSRG_BASED
+
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+#define XawI18nDefines -DUSE_XWCHAR_STRING
+#define HasMakefileSafeInclude YES
+#define IncludeMakefile(file) @@# dependencies are in .depend
+#define DependFileName .depend
+#ifndef DoLoadableServer
+# define DoLoadableServer YES
+#endif
+#ifndef ForceNormalLib
+# define ForceNormalLib YES
+#endif
+#define HasMkstemp YES
+
+#define OptimizedCDebugFlags -O
+
+#ifndef PreIncDir
+# define PreIncDir /usr/include
+#endif
+
+#define HasGroff YES
+#define NroffCmd env GROFF_NO_SGR=y groff -Tascii
+#define SetTtyGroup YES
+
+#ifndef ExtraFilesToClean
+# define ExtraFilesToClean *.core
+#endif
+
+#define DefaultUserPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR):/usr/local/bin
+#define DefaultSystemPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR)
+#ifndef SystemManDirectory
+# define SystemManDirectory /usr/share/man
+#endif
+
+#define InstKmemFlags -g kmem -m 2755
+
+/*
+ * Compress manual pages
+ */
+#ifndef CompressManPages
+# define CompressManPages YES
+#endif
+
+#define HasBsdMake YES
+
+#ifndef StaticLibrary
+# define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic
+#endif
+
+#define DlLibrary -Wl,--export-dynamic
+
+#ifndef PamLibraries
+# define PamLibraries -lpam DlLibrary
+#endif
+
+#ifndef SharedLibXdmGreet
+# define SharedLibXdmGreet NO
+#endif
+
+/*
+ * On FreeBSD, the run-time loader will use the built-in "rpath" before
+ * LD_LIBRARY_PATH. This means that utilities like mkfontdir will load
+ * installed libraries (if they exist) in preference to the ones in the
+ * build tree, even though LD_LIBRARY_PATH points to the build tree.
+ * This can result in the build failing. One way to avoid this is to
+ * pre-load the libraries from the build tree.
+ *
+ * There should be a better way than this hack...
+ */
+#if UseElfFormat
+#ifndef PreloadFontSetup
+#define PreloadFontSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(XFONTPRELOADPATTERN))`"
+#endif
+#ifndef PreloadFreetypeSetup
+#define PreloadFreetypeSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(FT2PRELOADPATTERN))`"
+#endif
+#ifndef PreloadXFTSetup
+#define PreloadXFTSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(FT2PRELOADPATTERN) $(XFTPRELOADPATTERN) $(XRENDERPRELOADPATTERN) $(FCPRELOADPATTERN))`"
+#endif
+#endif
+
+#ifndef HasCookieMaker
+# define HasCookieMaker YES
+# define MkCookieCmd \
+ 'dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"'
+#endif
+
+/*
+ * A hack to work around an optimization problem with gcc 2.95.2 - 2.95.4
+ */
+#if (GccMajorVersion == 2 && GccMinorVersion == 95)
+# define GccOptBug295
+#endif
+
+#include <bsdLib.rules>
+
+#include <xorg.cf>
+
+
diff --git a/nx-X11/config/cf/FreeBSD.cf b/nx-X11/config/cf/FreeBSD.cf
new file mode 100644
index 000000000..80454b792
--- /dev/null
+++ b/nx-X11/config/cf/FreeBSD.cf
@@ -0,0 +1,582 @@
+XCOMM platform: $Xorg: FreeBSD.cf,v 1.3 2000/08/17 19:41:45 cpqbld Exp $
+XCOMM platform: $XdotOrg: xc/config/cf/FreeBSD.cf,v 1.11 2005/05/04 04:14:57 anholt Exp $
+XCOMM
+XCOMM
+XCOMM
+XCOMM platform: $XFree86: xc/config/cf/FreeBSD.cf,v 3.147 2004/01/28 01:46:21 dawes Exp $
+
+#ifndef UseElfFormat
+#define UseElfFormat DefaultToElfFormat
+#endif
+
+#if UseElfFormat
+#define OSBinaryFormat [ELF]
+#else
+#define OSBinaryFormat [a.out]
+#endif
+
+#ifndef OSName
+#define OSName DefaultOSName OSBinaryFormat
+#endif
+#ifndef OSVendor
+#define OSVendor /**/
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+
+#ifndef OSRelVersion
+/* Include this to get finer-grained information about the OS version */
+#include "/usr/include/osreldate.h"
+#define OSRelVersion __FreeBSD_version
+#endif
+
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion) (OSRelVersion)
+
+
+#define HasCplusplus YES
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#define HasNdbm YES
+#define HasPutenv YES
+#define HasSnprintf YES
+#if OSMajorVersion == 3 && OSMinorVersion >= 3 || OSMajorVersion > 3
+# define HasStrlcat YES
+#endif
+#if OSMajorVersion == 4 && OSMinorVersion >= 2 || OSMajorVersion > 4
+# define HasBasename YES
+#else
+# define HasBasename NO
+#endif
+#define HasBSD44Sockets YES
+#define HasDlopen YES
+#if ((OSRelVersion >= 410002) && OSRelVersion < 500000) || (OSRelVersion >= 500012)
+#define HasSetProcTitle YES
+#endif
+#ifndef HasLibCrypt
+# define HasLibCrypt YES
+#endif
+#ifndef HasShm
+# define HasShm YES
+#endif
+#define HasWChar32 YES
+#define HasUsableFileMmap YES
+#define HasNCurses YES
+#define HasVarRun YES
+#define HasVarDb YES
+#ifndef BuildPDFdocs
+# define BuildPDFdocs NO
+#endif
+#if (OSMajorVersion >= 3)
+#define HasIssetugid YES
+#define HasPoll YES
+#endif
+
+#if OSMajorVersion >= 4
+#define HasGetIfAddrs YES
+#endif
+
+/* All versions define AF_INET6. 3.x and earlier don't have IPv6 support. */
+#if OSMajorVersion < 4
+#ifndef BuildIPv6
+#define BuildIPv6 NO
+#endif
+#endif
+
+#define IPv6SocketsAlsoIPv4 NO
+
+#if (OSMajorVersion > 1)
+#define InstallXloadSetGID NO
+#else
+#define InstallXloadSetGID YES
+#endif
+
+#define HasWeakSymbols UseElfFormat
+
+/*
+ * Multi-thread safe libs
+ */
+/* 2.2.7 and later has libc_r (POSIX threads) */
+#if OSMajorVersion == 2 && OSMinorVersion == 2 && OSTeenyVersion >= 7 || \
+ OSMajorVersion >= 3
+# define HasPosixThreads YES
+# define ThreadedX YES
+# define HasThreadSafeAPI YES
+# if OSRelVersion < 501000
+# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI
+# else
+# define MTSafeAPIDefines -DXUSE_MTSAFE_API
+# endif
+# if (OSRelVersion < 500043)
+# define NeedUIThrStubs YES
+# endif
+# if (OSRelVersion >= 502102)
+# define ThreadsLibraries -lpthread
+# elif (OSRelVersion >= 500016)
+# define ThreadsLibraries -lc_r
+# else
+# define ThreadsLibraries -pthread
+# endif
+# define SystemMTDefines -D_THREAD_SAFE
+#endif
+
+/* This fixes linking C programs against libGLU on FreeBSD 3.x */
+#if (OSMajorVersion == 3)
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB) -lstdc++ -lgcc
+#endif
+
+#define AvoidNullMakeCommand YES
+#define StripInstalledPrograms YES
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull YES
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedWidePrototypes NO
+
+#define HasPlugin YES
+#define VendorHasX11R6_3libXext YES /* XC or XFree86 >= 3.3.1 */
+
+#define MkdirHierCmd mkdir -p
+
+#ifndef LexCmd
+#define LexCmd flex -l
+#endif
+#ifndef HasFlex
+#define HasFlex YES
+#endif
+
+#ifndef HasMktemp
+#if (OSMajorVersion >= 4) || (OSMajorVersion == 3 && OSMinorVersion >= 1) || \
+ (OSMajorVersion == 2 && OSMinorVersion == 2 && OSTeenyVersion >= 7)
+#define HasMktemp YES
+#else
+#define HasMktemp NO
+#endif
+#endif
+
+/*
+ * 2.2.x has perl 4 by default, not perl 5.
+ */
+#if (OSMajorVersion <= 2)
+#ifndef HasPerl5
+#define HasPerl5 NO
+#endif
+#endif
+
+#ifndef CcCmd
+#define CcCmd cc
+#endif
+#ifndef CplusplusCmd
+#define CplusplusCmd c++
+#endif
+#define CppCmd /usr/bin/cpp
+#define PreProcessCmd CppCmd
+#define StandardCppOptions -traditional
+#define StandardCppDefines /**/
+#ifndef DefaultCCOptions
+#if defined(UseInstalled)
+#define DefaultCCOptions /**/
+#else
+#if defined(HasGcc3) && HasGcc3
+#define NoSystemWarn -Wno-system-headers
+#else
+#define NoSystemWarn
+#endif
+#define DefaultCCOptions -ansi -pedantic NoSystemWarn -Dasm=__asm \
+ GccWarningOptions
+#endif
+#endif
+#ifndef ExtraLibraries
+/* support for multi-byte locales is in libxpg4 rather than libc */
+#if (OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2)) && \
+ !(OSMajorVersion == 4 && OSRelVersion >= 400020) && \
+ !(OSRelVersion >= 500005)
+#define ExtraLibraries -lxpg4
+#else
+#define ExtraLibraries /**/
+#endif
+#endif
+#ifndef UseGnuMalloc
+/* 2.2 doesn't really have GnuMalloc */
+#if OSMajorVersion < 2 || (OSMajorVersion == 2 && OSMinorVersion < 2)
+#define UseGnuMalloc YES
+#else
+#define UseGnuMalloc NO
+#endif
+#endif
+/* 2.2.2 and later has setusercontext() */
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 2) || \
+ (OSMajorVersion == 2 && OSMinorVersion == 2 && OSTeenyVersion >= 2)
+#define HasSetUserContext YES
+#endif
+
+#if OSMajorVersion >= 5 || (OSMajorVersion == 4 && OSMinorVersion >= 6)
+#define HasGetpeereid YES
+#endif
+
+/* 3.3(?) and later has support for setting MTRRs */
+#ifndef HasMTRRSupport
+#if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion >= 3)
+#define HasMTRRSupport YES
+#else
+#define HasMTRRSupport NO
+#endif
+#endif
+
+/*
+ * Drivers that don't need AGP can work with 4.0, but we don't have a
+ * mechanism for specifying a subset of drivers in the OS.cf files yet.
+ */
+#ifndef BuildXF86DRI
+#if OSMajorVersion >= 5 || (OSMajorVersion == 4 && OSMinorVersion >= 1)
+#define BuildXF86DRI YES
+#endif
+#endif
+
+/*
+ * 4.1/i386 and 5.0/i386,alpha,ia64,amd64 have the AGP driver.
+ */
+#ifndef HasAgpGart
+#if defined(i386Architecture) && \
+ (OSMajorVersion >= 5 || (OSMajorVersion == 4 && OSMinorVersion >= 1))
+#define HasAgpGart YES
+#endif
+#if (defined(AlphaArchitecture) || defined(ia64Architecture) || \
+ defined(AMD64Architecture)) && (OSMajorVersion >= 5)
+#define HasAgpGart YES
+#endif
+#endif
+
+/*
+ * SSE and 3DNow will be autodetected, so binutils is the only
+ * requirement for enabling this. By 4.2 they were all supported.
+ */
+#if defined(AMD64Architecture) || defined(i386Architecture) && \
+ (OSMajorVersion >= 5 || (OSMajorVersion == 4 && OSMinorVersion >= 2))
+# define HasX86Support YES
+# define HasMMXSupport YES
+# define Has3DNowSupport YES
+# define HasSSESupport YES
+#else
+# define HasX86Support NO
+# define HasMMXSupport NO
+# define Has3DNowSupport NO
+# define HasSSESupport NO
+#endif
+
+/*
+ * This doesn't work the way it does on every other system. On FreeBSD it's
+ * only a "hint, not a demand", whatever that means. Note that this is not
+ * what it says in the ld and ld.so man pages, which are rather vague on the
+ * matter.
+ *
+ * But we do know that if a) you do what the X Project team does and set your
+ * ProjectRoot to something like "/X11", and b) you have other X libraries,
+ * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your
+ * ld.so.cache with ldconfig, then any programs linked with this "hint" will
+ * find that ld.so ignores the "hint" at runtime and loads the libraries in
+ * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
+ * the run-path is only used as a last resort to find the libraries, after
+ * the LD_LIBRARY_PATH and ld.so.cache.
+ *
+ * N. B. to FreeBSD users who are not familiar with the semantics of the run-
+ * path on other systems. The run-path is akin to a per-program ld.so.cache.
+ * If a program is linked with a run-path, that run-path should take
+ * precedence over _everything_ else! In my opinion ldconfig and the
+ * ld.so.cache should be deprecated immediately now that FreeBSD has run-
+ * paths. Any program that needs libraries that are outside the "well known"
+ * locations should be linked with a run-path.
+ *
+ * All of which begs the question: If this option doesn't work in any useful
+ * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
+ * would fix ld.so so that run-paths are truly useful.
+ *
+ * Using run-paths is added with the intent that vendors who ship X for
+ * FreeBSD should use it too. Once everyone uses it then there will be no
+ * reason for FreeBSD to assume that it knows where X libraries are installed
+ * and they can remove it from the list of directories they add to ld.so.cache
+ * in their /etc/rc file.
+ */
+
+#ifndef UseRpath
+# define UseRpath YES
+#endif
+
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 2)
+
+# ifndef RpathLoadFlags
+# if UseRpath
+# if UseElfFormat
+# define RpathLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
+# else
+# define RpathLoadFlags -Wl,-R,$(USRLIBDIRPATH)
+# endif
+# else
+# define RpathLoadFlags /**/
+# endif
+# endif
+
+# ifndef ExtraLoadFlags
+# if UseElfFormat && !defined(UseInstalled)
+# define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(BUILDLIBDIR)
+# else
+# define ExtraLoadFlags RpathLoadFlags
+# endif
+# endif
+
+#endif
+
+#ifndef LibraryRpathLoadFlags
+# if UseRpath
+# if UseElfFormat
+# define LibraryRpathLoadFlags -rpath $(USRLIBDIRPATH)
+# else
+# define LibraryRpathLoadFlags -R $(USRLIBDIRPATH)
+# endif
+# else
+# define LibraryRpathLoadFlags /**/
+# endif
+#endif
+
+#ifndef SharedLibraryLoadFlags
+# if UseElfFormat
+# define SharedLibraryLoadFlags -shared LibraryRpathLoadFlags
+# else
+# define SharedLibraryLoadFlags -Bshareable LibraryRpathLoadFlags
+# endif
+#endif
+
+#ifndef GnuMallocLibrary
+#define GnuMallocLibrary -lgnumalloc
+#endif
+
+#if (OSMajorVersion > 2) || (OSMajorVersion == 2 && OSMinorVersion >= 2) \
+ || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 6)
+/* 2.1.6 and 2.2 have libz */
+#ifndef HasZlib
+#define HasZlib YES
+#endif
+#endif
+
+/* PAM appeared in FreeBSD 3.1 */
+#if (OSMajorVersion > 3) || (OSMajorVersion == 3 && OSMinorVersion >=1 )
+#ifndef HasPam
+#define HasPam YES
+#endif
+#endif
+
+/* There are two options for building. One is to assume that the system has
+ * many of the dependencies provided by the ports tree. The other is to just
+ * build everything from this tree.
+ */
+
+#ifndef HasStandardPorts
+#define HasStandardPorts YES
+#endif
+
+#ifndef LocalBase
+#define LocalBase /usr/local
+#endif
+#ifndef X11Base
+#define X11Base /usr/X11R6
+#endif
+
+#if HasStandardPorts
+
+#ifndef HasExpat
+# define HasExpat YES
+# define ExpatDir LocalBase
+#endif
+
+#ifndef HasFreetype2
+# define HasFreetype2 YES
+# define Freetype2Dir LocalBase
+#endif
+
+#ifndef HasFontconfig
+# define HasFontconfig YES
+# define FontconfigDir X11Base
+#endif
+
+#ifndef HasLibpng
+# define HasLibpng YES
+# define LibpngDir LocalBase
+#endif
+
+#endif /* HasStandardPorts */
+
+#undef InstallCmd
+#define InstallCmd /usr/bin/install
+
+#if UseElfFormat
+# define AsmElfDefines -D__ELF__
+#else
+# define AsmElfDefines /**/
+#endif
+
+#if GccUsesGas
+# define GccGasOption -DGCCUSESGAS
+# define AsmDefines -DUSE_GAS AsmElfDefines
+#else
+# define GccGasOption /**/
+# define AsmDefines AsmElfDefines
+#endif
+
+#ifdef i386Architecture
+#define ServerExtraDefines GccGasOption XFree86ServerDefines
+#endif
+#if defined(AlphaArchitecture) || defined(Sparc64Architecture) || \
+ defined(ia64Architecture) || defined(AMD64Architecture)
+#define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
+#endif
+#ifdef Sparc64Architecture
+#define AsVISOption -Av9a
+#define AsOutputArchSize 64
+#endif
+
+#ifdef PpcArchitecture
+#define XF86INT10_BUILD X86INT10_STUB
+#endif
+
+#define StandardDefines -DCSRG_BASED
+
+#if OSMajorVersion > 1
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+#define XawI18nDefines -DUSE_XWCHAR_STRING
+#define HasMakefileSafeInclude YES
+#define IncludeMakefile(file) @@# dependencies are in .depend
+#define DependFileName .depend
+#ifndef DoLoadableServer
+#define DoLoadableServer YES
+#endif
+#ifndef ForceNormalLib
+#define ForceNormalLib YES
+#endif
+#define HasMkstemp YES
+#else
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#endif
+
+/* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
+#ifndef DefaultGcc2i386Opt
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
+#define DefaultGcc2i386Opt -O2 GccAliasingArgs
+#endif
+#endif
+
+#ifdef i386Architecture
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+#else
+# define OptimizedCDebugFlags -O
+#endif
+
+#ifndef PreIncDir
+# define PreIncDir /usr/include
+#endif
+
+#define HasGroff YES
+#define NroffCmd env GROFF_NO_SGR=y groff -Tascii
+#define SetTtyGroup YES
+
+#ifndef ExtraFilesToClean
+# define ExtraFilesToClean *.core
+#endif
+
+#define DefaultUserPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR):/usr/gnu/bin:/usr/local/bin
+#define DefaultSystemPath /bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR)
+#ifndef SystemManDirectory
+#define SystemManDirectory /usr/share/man
+#endif
+
+#define InstKmemFlags -g kmem -m 2755
+
+/*
+ * Compress manual pages
+ */
+#ifndef CompressManPages
+# define CompressManPages YES
+#endif
+
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 1)
+#define HasBsdMake YES
+#endif
+
+#ifndef StaticLibrary
+#define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic
+#endif
+
+#if UseElfFormat
+#define DlLibrary -rdynamic
+#else
+#define DlLibrary /**/
+#endif
+
+#ifdef AlphaArchitecture
+#define IoLibrary -lio
+#else
+#define IoLibrary /**/
+#endif
+
+#define ServerExtraSysLibs IoLibrary
+
+#ifndef PamLibraries
+#define PamLibraries -lpam DlLibrary
+#endif
+
+#ifndef SharedLibXdmGreet
+# define SharedLibXdmGreet NO
+#endif
+
+/*
+ * On FreeBSD, the run-time loader will use the built-in "rpath" before
+ * LD_LIBRARY_PATH. This means that utilities like mkfontdir will load
+ * installed libraries (if they exist) in preference to the ones in the
+ * build tree, even though LD_LIBRARY_PATH points to the build tree.
+ * This can result in the build failing. One way to avoid this is to
+ * pre-load the libraries from the build tree.
+ *
+ * There should be a better way than this hack...
+ */
+#if UseElfFormat
+#ifndef PreloadFontSetup
+#define PreloadFontSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(XFONTPRELOADPATTERN))`"
+#endif
+#ifndef PreloadFreetypeSetup
+#define PreloadFreetypeSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(FT2PRELOADPATTERN))`"
+#endif
+#ifndef PreloadXFTSetup
+#define PreloadXFTSetup LD_PRELOAD="`(cd $(XENVLIBDIR); echo $(FT2PRELOADPATTERN) $(XFTPRELOADPATTERN) $(XRENDERPRELOADPATTERN) $(FCPRELOADPATTERN))`"
+#endif
+#endif
+
+#ifndef HasCookieMaker
+/* Which versions have /dev/urandom? */
+#if OSMajorVersion >= 4
+#define HasCookieMaker YES
+#define MkCookieCmd \
+ 'dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"'
+#else
+#define HasCookieMaker NO
+#endif
+#endif
+
+/*
+ * A hack to work around an optimization problem with gcc 2.95.2 - 2.95.4
+ */
+#if (GccMajorVersion == 2 && GccMinorVersion == 95)
+#define GccOptBug295
+#endif
+
+#include <bsdLib.rules>
+
+#include <xorg.cf>
diff --git a/nx-X11/config/cf/Imake.cf b/nx-X11/config/cf/Imake.cf
new file mode 100644
index 000000000..1be537b80
--- /dev/null
+++ b/nx-X11/config/cf/Imake.cf
@@ -0,0 +1,1180 @@
+XCOMM $XdotOrg: xc/config/cf/Imake.cf,v 1.12 2005/11/08 06:33:24 jkj Exp $
+XCOMM $Xorg: Imake.cf,v 1.4 2000/08/17 19:41:45 cpqbld Exp $
+/*
+ * To add support for another platform:
+ *
+ * 1. Identify a machine-specific cpp symbol. If your preprocessor
+ * does not have any built in, you will need to add the symbol to the
+ * cpp_argv table in config/imake/imakemdep.h and rebuild imake with
+ * the BOOTSTRAPCFLAGS variable set (see the macII for an example).
+ *
+ * 2. Add all machine-specific cpp symbols (either defined by you or by
+ * the preprocessor or compiler) to the predefs table in
+ * config/imake/imakemdep.h.
+ *
+ * 3. But a new #ifdef block below that defines MacroIncludeFile and
+ * MacroFile for your new platform and then #undefs the machine-
+ * specific preprocessor symbols (to avoid problems with file names).
+ *
+ * 4. Create a .cf file with the name given by MacroFile.
+ */
+XCOMM $XFree86: xc/config/cf/Imake.cf,v 3.88 2003/12/16 21:30:21 herrb Exp $
+
+#if defined(__APPLE__)
+# undef __APPLE__
+# define MacroIncludeFile <darwin.cf>
+# define MacroFile darwin.cf
+# define DarwinArchitecture
+# ifdef __ppc__
+# define PpcDarwinArchitecture
+# undef __ppc__
+# endif
+# ifdef __i386__
+# define i386DarwinArchitecture
+# undef __i386__
+# endif
+#endif
+
+#if defined(clipper) || defined(__clipper__)
+# undef clipper
+# define MacroIncludeFile <ingr.cf>
+# define MacroFile ingr.cf
+# define IngrArchitecture
+#endif /* clipper */
+
+#ifdef __CYGWIN__
+#define MacroIncludeFile <cygwin.cf>
+#define MacroFile cygwin.cf
+#define cygwinArchitecture
+#define i386Architecture
+#undef i386
+#undef i486
+#undef i586
+#undef i686
+#undef __i386__
+#undef _X86_
+#undef __CYGWIN__
+#endif /* CYGWIN */
+
+#ifdef ultrix
+# define MacroIncludeFile <ultrix.cf>
+# define MacroFile ultrix.cf
+# ifdef vax
+# undef vax
+# define VaxArchitecture
+# endif
+# ifdef mips
+# undef mips
+# define MipsArchitecture
+# define MipselArchitecture
+# endif
+# undef ultrix
+# define UltrixArchitecture
+#endif /* ultrix */
+
+#if defined(vax) && !defined(UltrixArchitecture) && !defined(__OpenBSD__)
+# define MacroIncludeFile <bsd.cf>
+# define MacroFile bsd.cf
+# undef vax
+# define BSDArchitecture
+# define VaxArchitecture
+#endif /* vax */
+
+#ifdef __bsdi__
+# define MacroIncludeFile <bsdi.cf>
+# define MacroFile bsdi.cf
+# undef __bsdi__
+# ifdef bsdi
+# undef bsdi
+# endif
+# define BSDOSArchitecture
+# if defined(__i386__) || defined(i386)
+# define i386BsdArchitecture
+# define i386Architecture
+# undef i386
+# undef __i386__
+# endif
+# if defined(__ppc__) || defined(ppc)
+# define PpcBsdArchitecture
+# define PpcArchitecture
+# undef ppc
+# undef __ppc__
+# endif
+# if defined(__sparc__) || defined(__sparc_v9__) || defined(sparc)
+# define SparcBsdArchitecture
+# define SparcArchitecture
+# undef sparc
+# undef __sparc__
+# undef __sparc_v9__
+# endif
+#endif /* bsdi */
+
+#ifdef __OpenBSD__
+# undef __OpenBSD__
+# undef __NetBSD__
+# define OpenBSDArchitecture
+# define KOpenBSDArchitecture
+# define MacroIncludeFile <OpenBSD.cf>
+# define MacroFile OpenBSD.cf
+# ifdef __i386__
+# define i386BsdArchitecture
+# define i386Architecture
+# undef i386
+# endif
+# if defined(__sparc__) || defined(sparc)
+# if !defined(__arch64__)
+# define SparcArchitecture
+# else
+# define Sparc64Architecture
+# endif
+# undef sparc
+# endif
+# if defined(__mips__) || defined(mips)
+# define MipsArchitecture
+# ifdef arc
+# define ArcArchitecture
+# undef arc
+# endif
+# ifdef pmax
+# define PmaxArchitecture
+# undef pmax
+# endif
+# undef mips
+# endif
+# if defined(__alpha__) || defined(alpha)
+# define AlphaArchitecture
+# undef __alpha__
+# undef alpha
+# endif
+# if defined(__amd64__) || defined(__x86_64__)
+# define AMD64Architecture
+# undef __amd64__
+# undef __x86_64__
+# undef amd64
+# endif
+# if defined(__mc68020__) || defined(mc68020)
+# define Mc68020Architecture
+# if defined(amiga)
+# define AmigaArchitecture
+# undef amiga
+# endif
+# if defined(hp300)
+# define Hp300Architecture
+# undef hp300
+# endif
+# if defined(mac68k)
+# define Mac68kArchitecture
+# undef mac68k
+# endif
+# if defined(mvme68k)
+# define Mvme68kArchitecture
+# undef mvme68k
+# endif
+# if defined(sun3)
+# define Sun3Architecture
+# undef sun3
+# endif
+# undef mc68000
+# endif
+# ifdef __powerpc__
+# define PpcArchitecture
+# undef __powerpc__
+# undef __macppc__
+# undef macppc
+# endif
+# ifdef __vax__
+# undef vax
+# undef __vax__
+# define VaxArchitecture
+# endif
+# ifdef __hppa__
+# ifndef HPArchitecture
+# define HPArchitecture
+# endif
+# undef __hppa__
+# endif /* __hppa__ */
+#endif /* OpenBSD */
+
+/* Systems based on kernel of OpenBSD */
+#if defined(__OpenBSD_kernel__)
+#define KOpenBSDArchitecture
+#endif
+
+#ifdef __NetBSD__
+# define MacroIncludeFile <NetBSD.cf>
+# define MacroFile NetBSD.cf
+# undef __NetBSD__
+# define NetBSDArchitecture
+# define KNetBSDArchitecture
+# ifdef __i386__
+# define i386BsdArchitecture
+# define i386Architecture
+# undef i386
+# endif
+# if defined(__sparc64__) || defined(__sparc_v9__) || defined(__arch64__)
+# define Sparc64Architecture
+# endif
+# if defined(__sparc__) || defined(sparc)
+# define SparcArchitecture
+# undef sparc
+# if defined(__sparc_v9__) || defined(__arch64__)
+# define Sparc64Architecture
+# endif
+# endif
+# ifdef mips
+# define MipsArchitecture
+# define ArcArchitecture
+# undef mips
+# endif
+# ifdef __alpha__
+# define AlphaArchitecture
+# define AlphaBsdArchitecture
+# undef __alpha__
+# endif
+# ifdef mc68000
+# define Mc68020Architecture
+# endif
+# ifdef __arm32__
+# define Arm32Architecture
+# undef __arm32__
+# endif
+# ifdef __vax__
+# define VaxArchitecture
+# undef __vax__
+# endif
+# ifdef __powerpc__
+# define PpcArchitecture
+# undef __powerpc__
+# endif
+#endif /* NetBSD */
+
+/* Systems based on kernel of NetBSD */
+#if defined(__NetBSD_kernel__)
+#define KNetBSDArchitecture
+#endif
+
+#ifdef __DragonFly__
+# define MacroIncludeFile <DragonFly.cf>
+# define MacroFile DragonFly.cf
+# undef __DragonFly__
+# undef __FreeBSD__
+# define DragonFlyArchitecture
+# define FreeBSDArchitecture
+# ifdef __i386__
+# define i386BsdArchitecture
+# define i386Architecture
+# undef i386
+# endif
+# ifdef __sparc64__
+# define Sparc64Architecture
+# undef __sparc64__
+# endif
+# ifdef __ia64__
+# define ia64Architecture
+# undef __ia64__
+# endif
+# ifdef __amd64__
+# define x86_64Architecture
+# undef __amd64__
+# undef __x86_64__
+# endif
+#endif /* __DragonFly__ */
+
+#ifdef __FreeBSD__
+# define MacroIncludeFile <FreeBSD.cf>
+# define MacroFile FreeBSD.cf
+# undef __FreeBSD__
+# define FreeBSDArchitecture
+# define KFreeBSDArchitecture
+# ifdef __i386__
+# define i386BsdArchitecture
+# define i386Architecture
+# undef i386
+# endif
+# ifdef __alpha__
+# define AlphaBsdArchitecture
+# define AlphaArchitecture
+# undef __alpha__
+# endif
+# ifdef __sparc64__
+# define Sparc64Architecture
+# undef __sparc64__
+# endif
+# ifdef __ia64__
+# define ia64Architecture
+# undef __ia64__
+# endif
+# ifdef __amd64__
+# define AMD64Architecture
+# undef __amd64__
+# undef __x86_64__
+# endif
+# ifdef __powerpc__
+# define PpcArchitecture
+# undef __powerpc__
+# endif
+#endif /* __FreeBSD__ */
+
+/* Systems based on kernel of FreeBSD */
+#if defined(__FreeBSD_kernel__)
+#define KFreeBSDArchitecture
+#endif
+
+#ifdef AMOEBA
+ /* Should be before the 'sun' entry because we may be cross-compiling */
+# define MacroIncludeFile <Amoeba.cf>
+# define MacroFile Amoeba.cf
+# if defined(i80386) || defined(__i80386__)
+# undef i80386
+# define i386Architecture
+# else
+# if defined(mc68000) || defined(__mc68000__)
+# undef mc68000
+# define Sun3Architecture
+# define SunArchitecture
+# else
+# if defined(sparc) || defined(__sparc__)
+# undef sparc
+# define SparcArchitecture
+# define SunArchitecture
+# endif
+# endif
+# undef sun
+# endif
+#endif /* AMOEBA */
+
+#ifdef sun
+# define MacroIncludeFile <sun.cf>
+# define MacroFile sun.cf
+# ifdef SVR4
+# undef SVR4
+# define SVR4Architecture
+# endif
+# ifdef sparc
+# undef sparc
+# define SparcArchitecture
+# endif
+# ifdef __sparcv9
+# undef __sparcv9
+# define Sparc64Architecture
+# endif
+# ifdef mc68000
+# undef mc68000
+# define Sun3Architecture
+# endif
+# if defined(__amd64) || defined(__x86_64)
+# undef __amd64
+# undef __x86_64
+# undef amd64
+# undef i386
+# define AMD64Architecture
+# endif
+# ifdef i386
+# undef i386
+# define i386Architecture
+# endif
+# undef sun
+# define SunArchitecture
+#endif /* sun */
+
+#ifdef hpux
+# define MacroIncludeFile <hp.cf>
+# define MacroFile hp.cf
+# undef hpux
+# define HPArchitecture
+#endif /* hpux */
+
+#ifdef __SCO__
+# define MacroIncludeFile <sco5.cf>
+# define MacroFile sco5.cf
+# undef __SCO__
+# undef sco
+# undef USL
+# undef SYSV
+# undef i386
+# undef SCO
+# undef SVR4
+# define i386Architecture
+# define SCOArchitecture
+# define i386SVR3Architecture
+# define SVR3Architecture
+# define i386ScoArchitecture
+# define i386Sco325Architecture
+# undef i386
+# undef i486
+# undef i586
+# undef i686
+# undef k6
+# undef __i386__
+# undef __i486__
+# undef __i586__
+# undef __i686__
+# undef __k6__
+# undef __i386
+# undef __i486
+# undef __i586
+# undef __i686
+# undef __k6
+# undef pentium
+# undef __pentium
+# undef pentiumpro
+# undef __pentiumpro
+#endif /* __SCO__ - SCO Open Server 5 */
+
+#ifdef __UNIXWARE__
+# define MacroIncludeFile <usl.cf>
+# define MacroFile usl.cf
+# undef __UNIXWARE__
+# undef USL
+# undef SVR4
+# undef i386
+# undef SVR5
+# undef SYSV5
+# define SVR4Architecture
+# define i386Architecture
+# define USLArchitecture
+# define UnixWareArchitecture
+# undef i386
+# undef i486
+# undef i586
+# undef i686
+# undef k6
+# undef __i386__
+# undef __i486__
+# undef __i586__
+# undef __i686__
+# undef __k6__
+# undef __i386
+# undef __i486
+# undef __i586
+# undef __i686
+# undef __k6
+# undef pentium
+# undef __pentium
+# undef pentiumpro
+# undef __pentiumpro
+#endif /* __UNIXWARE__ */
+
+#ifdef NCR
+# define MacroIncludeFile <ncr.cf>
+# define MacroFile ncr.cf
+# undef NCR
+# undef SVR4
+# undef i386
+# define SVR4Architecture
+# define i386Architecture
+# define NCRArchitecture
+#endif /* NCR */
+
+#ifdef apollo
+# define MacroIncludeFile <apollo.cf>
+# define MacroFile apollo.cf
+# undef apollo
+# define ApolloArchitecture
+#endif /* apollo */
+
+#ifdef sony
+# define MacroIncludeFile <sony.cf>
+# define MacroFile sony.cf
+# undef sony
+# undef sony_news
+# define SonyArchitecture
+# ifdef mc68020
+# undef mc68020
+# undef mc68030
+# define Mc68020Architecture
+# endif
+# ifdef mips
+# undef mips
+# define MipsArchitecture
+# endif
+# ifdef __svr4
+# define SVR4Architecture
+# else
+# if !defined(bsd43) || defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
+# define SonySysvArchitecture
+# else
+# define SonyBsdArchitecture
+# endif
+# endif
+#endif /* sony */
+
+#ifdef M4310
+# define MacroIncludeFile <pegasus.cf>
+# define MacroFile pegasus.cf
+# undef M4310
+# define PegasusArchitecture
+#endif /* M4310 */
+
+#ifdef M4330
+# define MacroIncludeFile <m4330.cf>
+# define MacroFile m4330.cf
+# undef M4330
+# define M4330Architecture
+#endif /* M4330 */
+
+#ifdef macII
+# define MacroIncludeFile <macII.cf>
+# define MacroFile macII.cf
+# undef macII
+# define MacIIArchitecture
+#endif /* macII */
+
+#ifdef _CRAY
+# define MacroIncludeFile <cray.cf>
+# define MacroFile cray.cf
+# undef cray
+# undef CRAY
+# undef CRAY1
+# undef CRAY2
+# undef YMP
+# define CrayArchitecture
+#endif /* _CRAY */
+
+#ifdef sgi
+# define MacroIncludeFile <sgi.cf>
+# define MacroFile sgi.cf
+# undef sgi
+# define SGIArchitecture
+# undef mips
+# undef __mips
+# define MipsArchitecture
+# ifdef _SVR4
+# undef _SVR4
+# define SVR4Architecture
+# endif
+# ifdef _SYSTYPE_SVR4
+# undef _SYSTYPE_SVR4
+# define SVR4Architecture
+# endif
+#endif /* sgi */
+
+#ifdef stellar
+# define MacroIncludeFile <stellar.cf>
+# define MacroFile stellar.cf
+# undef stellar
+# define StellarArchitecture
+#endif /* stellar */
+
+#if defined(ibm) || defined(_IBMR2) || defined(ibm032) || defined(aix)
+# define MacroIncludeFile <ibm.cf>
+# define MacroFile ibm.cf
+# ifdef ibm
+# undef ibm
+# endif
+# define IBMArchitecture
+# ifdef i386
+# undef i386
+# define PS2Architecture
+# endif
+# ifdef ibm032
+# undef ibm032
+# define RtArchitecture
+# endif
+# ifdef aix
+# undef aix
+# define AIXArchitecture
+# endif
+# ifdef _IBMR2
+# undef _IBMR2
+# if (DefaultOSMajorVersion < 5)
+# define RsArchitecture
+# else
+# define PpcArchitecture
+# endif
+# endif
+#endif /* ibm */
+
+#ifdef luna
+# undef luna
+# define MacroIncludeFile <luna.cf>
+# define MacroFile luna.cf
+# define LunaArchitecture
+# ifdef mc68000
+# undef mc68000
+# define Mc68000Architecture
+# else
+# undef mc88000
+# define Mc88000Architecture
+# endif
+#endif /* luna */
+
+#ifdef Mips
+# define MacroIncludeFile <Mips.cf>
+# define MacroFile Mips.cf
+# undef Mips
+# undef mips
+# if defined(SYSTYPE_BSD43) || defined(BSD) || defined(BSD43)
+# define MipsBsdArchitecture
+# else /* BSD */
+# define MipsSysvArchitecture
+# endif /* BSD */
+#endif /* Mips */
+
+#ifdef MOTOROLA
+# define MacroIncludeFile <moto.cf>
+# define MacroFile moto.cf
+# undef MOTOROLA
+# ifdef SYSV
+# define MotoR3Architecture
+# endif
+# ifdef SVR4
+# define MotoR4Architecture
+# endif
+#endif /* MOTOROLA */
+
+#if defined(SVR4) && !defined(DGUX)
+# ifdef i386
+# define i386Architecture
+# undef i386
+# endif
+# ifdef PC98
+# define PANIX98Architecture
+# undef PC98
+# endif
+# define SVR4Architecture
+# define MacroIncludeFile <svr4.cf>
+# define MacroFile svr4.cf
+# undef SVR4
+#endif /* SVR4 */
+
+#ifdef SYSV
+# ifdef i386
+# undef i386
+# ifdef ISC
+# define i386Architecture
+# define i386SVR3Architecture
+# define MacroIncludeFile <isc.cf>
+# define MacroFile isc.cf
+# define i386IscArchitecture
+# undef ISC
+# ifdef ISC202
+# define IscVersion 202
+# undef ISC202
+# else
+# ifdef ISC30
+# define IscVersion 300
+# undef ISC30
+# else
+# ifdef ISC40
+# define IscVersion 400
+# undef ISC40
+# else
+# define IscVersion 221
+# endif /* ISC40 */
+# endif /* ISC30 */
+# endif /* ISC202 */
+# endif /* ISC */
+# ifndef MacroFile
+# define i386SVR3Architecture
+# define MacroIncludeFile <x386.cf>
+# define MacroFile x386.cf
+# endif /* MacroFile */
+# endif /* i386 */
+#endif /* SYSV */
+
+/* SYSV386 is here for backward compatibility only */
+#ifdef SYSV386
+# undef i386
+# ifdef SVR4
+# define i386Architecture
+# define SVR4Architecture
+# define i386SVR4Architecture
+# define MacroIncludeFile <svr4.cf>
+# define MacroFile svr4.cf
+# undef SVR4
+# else /* ! SVR4 */
+# ifdef ISC
+# define i386Architecture
+# define i386SVR3Architecture
+# define MacroIncludeFile <isc.cf>
+# define MacroFile isc.cf
+# define i386IscArchitecture
+# undef ISC
+# ifdef ISC202
+# define IscVersion 202
+# undef ISC202
+# else
+# ifdef ISC30
+# define IscVersion 300
+# undef ISC30
+# else
+# ifdef ISC40
+# define IscVersion 400
+# undef ISC40
+# else
+# define IscVersion 221
+# endif /* ISC40 */
+# endif /* ISC30 */
+# endif /* ISC202 */
+# endif /* ISC */
+# ifndef MacroFile
+# define i386SVR3Architecture
+# define MacroIncludeFile <x386.cf>
+# define MacroFile x386.cf
+# endif /* MacroFile */
+# endif /* ! SVR4 */
+#endif /* SYSV386 */
+
+#ifdef DGUX
+# define i386Architecture
+# define SVR4Architecture
+# define MacroIncludeFile <DGUX.cf>
+# define MacroFile DGUX.cf
+# undef DGUX
+# define DguxArchitecture
+#endif /* DGUX */
+
+#ifdef __convex__
+# define MacroIncludeFile <convex.cf>
+# define MacroFile convex.cf
+# ifdef convex
+# undef convex
+# endif
+# define ConvexArchitecture
+#endif /* _convex_ */
+
+#ifdef __osf__
+# define MacroIncludeFile <osf1.cf>
+# define MacroFile osf1.cf
+# define OSF1Architecture
+# undef __osf__
+# ifdef __mips__
+# undef __mips__
+# define MipsArchitecture
+# define MipselArchitecture
+# endif
+# ifdef __alpha
+# undef __alpha
+# define AlphaArchitecture
+# endif
+#endif /* __osf__ */
+
+#ifdef Oki
+# define MacroIncludeFile <Oki.cf>
+# define MacroFile Oki.cf
+# undef Oki
+# define i860SVR4Architecture
+# define SVR4Architecture
+# undef SVR4
+#endif /* Oki */
+
+#if defined(WIN32) && !defined(__GNUC__)
+# define MacroIncludeFile <Win32.cf>
+# define MacroFile Win32.cf
+# define Win32Architecture
+#endif /* WIN32 */
+
+#if defined(WIN32) && defined(__GNUC__)
+#define MacroIncludeFile <mingw.cf>
+#define MacroFile mingw.cf
+#define Win32Architecture
+#define mingwArchitecture
+#define i386Architecture
+#undef i386
+#undef i486
+#undef i586
+#undef i686
+#undef __i386__
+#undef _X86_
+#undef __MINGW32__
+#endif /* CYGWIN */
+
+#if defined(linux) || defined(__GLIBC__)
+# define MacroIncludeFile <linux.cf>
+# define MacroFile linux.cf
+# undef linux
+# ifdef __linux__
+# define LinuxArchitecture
+# endif
+# ifdef i386
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef i386
+XCOMM Keep cpp from replacing path elements containing i486/i586/i686
+# ifdef i486
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef i486
+# endif
+# ifdef i586
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef i586
+# endif
+# ifdef i686
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef i686
+# endif
+# ifdef k6
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef k6
+# endif
+# endif /* k6 */
+# ifdef __i386__
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __i386__
+# endif /* __i386__ */
+# ifdef __i486__
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __i486__
+# endif /* __i486__ */
+# ifdef __i586__
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __i586__
+# endif /* __i586__ */
+# ifdef __i686__
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __i686__
+# endif /* __i686__ */
+# ifdef __k6__
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __k6__
+# endif /* __k6__ */
+# ifdef __i386
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __i386
+# endif /* __i386 */
+# ifdef __i486
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __i486
+# endif /* __i486 */
+# ifdef __i586
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __i586
+# endif /* __i586 */
+# ifdef __i686
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __i686
+# endif /* __i686 */
+# ifdef __k6
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __k6
+# endif /* __k6 */
+/* Keep this order! s390x has also __s390__ defined */
+# if defined(__s390x__)
+# define s390xArchitecture
+# undef __s390x__
+# undef __s390__
+# endif
+# ifdef __s390__
+# define s390Architecture
+# undef __s390__
+# endif /* s390 */
+# ifdef __alpha
+# define AlphaArchitecture
+# undef __alpha
+# endif /* __alpha */
+# ifdef __alpha__
+# ifndef AlphaArchitecture
+# define AlphaArchitecture
+# endif
+# undef __alpha__
+# endif /* __alpha__ */
+# ifdef __arm__
+# define Arm32Architecture
+# undef arm
+# undef __arm
+# undef __arm__
+# if defined(__ARMEB__)
+# define Arm32ebArchitecture
+# endif
+# undef __ARMEB__
+# endif
+# ifdef mc68000
+# define Mc68020Architecture
+# undef mc68000
+# endif /* mc68000 */
+# if defined (powerpc) && !defined(__powerpc64__) && !defined (powerpc64)
+# define PpcArchitecture
+# undef powerpc
+# endif
+# if defined (__powerpc__) && !defined(__powerpc64__) && !defined (powerpc64)
+# ifndef PpcArchitecture
+# define PpcArchitecture
+# endif
+# undef __powerpc__
+# endif
+# ifdef __powerpc64__
+# ifndef Ppc64Architecture
+# define Ppc64Architecture
+# endif
+# undef __powerpc64__
+# endif
+# ifdef sparc
+# define SparcArchitecture
+# undef sparc
+# endif
+# ifdef __sparc__
+# ifndef SparcArchitecture
+# define SparcArchitecture
+# endif
+# undef __sparc__
+# endif
+# ifdef ia64
+# define ia64Architecture
+# undef ia64
+# endif
+# ifdef __ia64__
+# ifndef ia64Architecture
+# define ia64Architecture
+# endif
+# undef __ia64__
+# endif
+# if defined(mips) || defined(__mips__)
+# define MipsArchitecture
+# undef mips
+# undef __mips__
+# if defined(MIPSEL) || defined(_MIPSEL)
+# define MipselArchitecture
+# endif
+# undef MIPSEL
+# undef _MIPSEL
+# endif
+# ifdef __hppa__
+# ifndef HPArchitecture
+# define HPArchitecture
+# endif
+# undef __hppa__
+# endif /* __hppa__ */
+# ifdef __sh__
+# ifndef SuperHArchitecture
+# define SuperHArchitecture
+# endif
+# ifdef __BIG_ENDIAN__
+# ifndef SuperHebArchitecture
+# define SuperHebArchitecture
+# endif
+# endif
+# undef __sh__
+# endif /* __sh__ */
+# if defined(__SH3__) || defined(__sh3__)
+# ifndef SuperH3Architecture
+# define SuperH3Architecture
+# endif
+# undef __SH3__
+# undef __sh3__
+# endif /* __SH3__ or __sh3__ */
+# ifdef __SH4__
+# ifdef __SH4_NOFPU__
+# ifndef SuperH4NOFPUArchitecture
+# define SuperH4NOFPUArchitecture
+# endif
+# undef __SH4_NOFPU__
+# else
+# ifndef SuperH4Architecture
+# define SuperH4Architecture
+# endif
+# endif
+# undef __SH4__
+# endif /* __SH4__ */
+/* for compatibility with 3.3.x */
+# ifdef PpcArchitecture
+# define PowerPCArchitecture
+# endif
+# if defined(__s390x__)
+# define s390xArchitecture
+# undef __s390x__
+# endif
+# if defined(__amd64__) || defined (__x86_64__)
+# undef __amd64__
+# undef __x86_64__
+# define AMD64Architecture
+# endif
+# if defined(amd64__) || defined (x86_64__)
+# undef amd64__
+# undef x86_64__
+# ifndef AMD64Architecture
+# define AMD64Architecture
+# endif
+# endif
+#endif /* linux || __GLIBC__ */
+
+#if (defined(__Lynx__) || defined(Lynx)) && (defined(i386) || defined(__i386__) || defined(__x86__) || defined(__powerpc__) || defined(__sparc__) || defined(sparc))
+# define MacroIncludeFile <lynx.cf>
+# define MacroFile lynx.cf
+# define LynxOSArchitecture
+# undef __Lynx__
+# undef Lynx
+# undef lynx
+# if defined(i386) || defined(__i386__) || defined(__x86__)
+# define i386Architecture
+# undef i386
+# undef __i386__
+# undef __x86__
+# endif
+# ifdef __powerpc__
+# define PpcArchitecture
+# undef __powerpc__
+# endif
+# if defined(sparc) || defined(__sparc__)
+# define SparcArchitecture
+# undef sparc
+# undef __sparc__
+# endif
+/* for compatibility with 3.3.x */
+# ifdef PpcArchitecture
+# define PowerPCArchitecture
+# endif
+#endif /* LynxOS AT/PPC/microSPARC */
+
+#ifdef __uxp__
+# define MacroIncludeFile <fujitsu.cf>
+# define MacroFile fujitsu.cf
+# define FujitsuArchitecture
+# undef __uxp__
+# define UXPArchitecture
+# define SVR4Architecture
+# ifdef sparc
+# undef sparc
+# define SparcArchitecture
+# endif
+#endif /* __uxp__ */
+
+#ifdef __sxg__
+# define MacroIncludeFile <fujitsu.cf>
+# define MacroFile fujitsu.cf
+# define FujitsuArchitecture
+# undef __sxg__
+# define mc68000Architecture
+#endif /* __sxg__ */
+
+#ifdef _SEQUENT_
+/* undefine assignments resulting from -DSVR4 */
+# undef MacroIncludeFile
+# define MacroIncludeFile <sequent.cf>
+# undef MacroFile
+# define MacroFile sequent.cf
+# undef _SEQUENT_
+# define DynixPtxArchitecture
+# define SequentArchitecture
+#endif
+
+#if defined(_nec_ews_svr4) || defined(nec_ews_svr4) || defined(nec_ews_svr2) || defined(SX) || defined(_nec_up) || defined(_nec_ft) || defined(PC_UX)
+# ifdef nec
+# undef nec
+# endif
+# define MacroIncludeFile <nec.cf>
+# define MacroFile nec.cf
+# define NecArchitecture
+#endif
+
+#ifdef minix
+#define MacroIncludeFile <minix.cf>
+#define MacroFile minix.cf
+#undef minix
+#define MinixArchitecture
+#define i386Architecture
+#endif /* minix */
+
+/* Systems with GNU libc and userland */
+#if defined(__GNU__)
+#define GNUArchitecture
+#define MacroIncludeFile <gnu.cf>
+#define MacroFile gnu.cf
+#ifdef __i386__
+#define i386Architecture
+#endif
+#endif
+
+#ifdef MACH
+#ifdef __GNU__
+/* Mach-based GNU system */
+#define GNUMachArchitecture
+#else
+#define MacroIncludeFile <mach.cf>
+#define MacroFile mach.cf
+#endif
+#undef MACH
+#ifdef i386
+#define i386MachArchitecture
+#define i386Architecture
+#endif /* i386 */
+#undef i386
+#endif /* MACH */
+
+/* On NetBSD, `unix' is not defined, and cpp emits a warning every time
+ * it sees a test using the `unix' symbol */
+#if !defined(NetBSDArchitecture) || (defined(NetBSDArchitecture) && DefaultOSMajorVersion == 1 && DefaultOSMinorVersion <= 3)
+#ifdef unix
+#undef unix
+#endif
+#endif
+
+#ifdef emxos2
+#define MacroIncludeFile <os2.cf>
+#define MacroFile os2.cf
+#define OS2Architecture
+#define i386Architecture
+#endif /* emxos2 */
+
+#if defined(__QNX__) && !defined(__QNXNTO__)
+#define MacroIncludeFile <QNX4.cf>
+#define MacroFile QNX4.cf
+#define QNX4Architecture
+#define i386Architecture
+#endif /* QNX4 */
+
+#ifdef __QNXNTO__
+#define MacroIncludeFile <nto.cf>
+#define MacroFile nto.cf
+#define NTOArchitecture
+# ifdef PPC
+# define PPCArchitecture
+# undef PPC
+# endif
+# ifdef MIPS
+# define mipsArchitecture
+# undef MIPS
+# endif
+# ifdef i386
+# define i386Architecture
+# undef i386
+# endif /* i386 */
+# ifdef __i386__
+# ifndef i386Architecture
+# define i386Architecture
+# endif
+# undef __i386__
+# endif /* __i386__ */
+#endif /* QNX/Neutrino */
+
+#ifdef SparcArchitecture
+# if defined(__sparc_v9) || defined(__arch64__)
+# define Sparc64Architecture
+# endif
+#endif
+
+#ifndef MacroIncludeFile
+XCOMM WARNING: Imake.cf not configured; guessing at definitions!!!
+XCOMM This might mean that BOOTSTRAPCFLAGS was not set when building imake.
+#define MacroIncludeFile <generic.cf>
+#define MacroFile generic.cf
+#endif
diff --git a/nx-X11/config/cf/Imake.rules b/nx-X11/config/cf/Imake.rules
new file mode 100644
index 000000000..21c223d8e
--- /dev/null
+++ b/nx-X11/config/cf/Imake.rules
@@ -0,0 +1,3649 @@
+XCOMM ---------------------------------------------------------------------
+XCOMM Imake rules for building libraries, programs, scripts, and data files
+XCOMM rules: $Xorg: Imake.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+XCOMM rules: $XdotOrg: xc/config/cf/Imake.rules,v 1.11 2005/11/08 06:33:24 jkj Exp $
+XCOMM
+XCOMM
+XCOMM
+XCOMM
+XCOMM rules: $XFree86: xc/config/cf/Imake.rules,v 3.128 2003/11/15 03:25:17 dawes Exp $
+
+/*
+ * MACHINE-INDEPENDENT RULES; DO NOT MODIFY
+ *
+ * Warning, when defining rules: make sure you do not include both a trailing
+ * backslash and double ampersand backslash or else you will get an extra
+ * backslash in the Makefile.
+ *
+ * The following macros are defined for the various templates and Imakefiles
+ * (for a list of the applicable make variables, see the template files):
+ *
+ * Concat (a,b)
+ * Concat3 (a,b,c)
+ * Concat4 (a,b,c,d)
+ * _Use (a,b)
+ * _UseCat (a,b,c)
+ * _MUse (a,b)
+ * _MUseCat (a,b,c)
+ * ProgramTargetName (target)
+ * HostProgramTargetName (target)
+ * RunProgram (progvar,options)
+ * RunProgramWithSetup (setup,progvar,options)
+ * RemoveFile (file)
+ * RemoveFiles (files)
+ * CenterLoadTarget (target,srclist,libs,defines)
+ * CenterProgramTarget (program,srclist,objlist,locallibs,syslibs)
+ * SentinelLinkTarget (step,program,linklist)
+ * SentinelProgramTarget (program,deplist,linklist)
+ * SentinelCplusplusProgramTarget (program,deplist,linklist)
+ * PurifyLinkTarget (step,program,linklist)
+ * PurifyProgramTarget (program,deplist,linklist)
+ * PurifyCplusplusProgramTarget (program,deplist,linklist)
+ * ProofLinkTarget (step,program,linklist)
+ * ProofProgramTarget (program,deplist,linklist)
+ * ProofCplusplusProgramTarget (program,deplist,linklist)
+ * ProofCleanTarget ()
+ * RemoveTargetProgram (program)
+ * MakeDir (dir)
+ * InstallDirectory (dir)
+ * BuildIncludesTop (srclist)
+ * BuildIncludes (srclist,dstsubdir,dstupdir)
+ * LinkRule (program,options,objects,libraries)
+ * HostLinkRule (program,options,objects,libraries)
+ * NoCmpScript (target)
+ * NoConfigRec (target)
+ * NormalProgramTarget (program,objects,deplibs,locallibs,syslibs)
+ * SetUIDProgramTarget (program,objects,deplibs,locallibs,syslibs)
+ * SingleProgramTarget (program,objects,locallibs,syslibs)
+ * SimpleProgramTarget (program)
+ * ComplexProgramTarget (program)
+ * ComplexProgramTarget_1 (program,locallib,syslib)
+ * ComplexProgramTarget_2 (program,locallib,syslib)
+ * ComplexProgramTarget_3 (program,locallib,syslib)
+ * ServerTargetWithFlags (server,subdirs,objects,libs,syslibs,flags)
+ * ServerTarget (server,subdirs,objects,libs,syslibs)
+ * MoveToBakFile (file)
+ * RMoveToBakFile (file)
+ * RanLibrary (args)
+ * LibraryTargetName (libname)
+ * LibraryTargetNameSuffix (libname,suffix)
+ * InstallNamedTarget (step,srcname,flags,dest,dstname)
+ * InstallTarget (step,file,flags,dest)
+ * InstallLibrary (libname,dest)
+ * MergeIntoInstalledLibrary (tolib,fromlib)
+ * InstallLibraryAlias (libname,alias,dest)
+ * InstallLintLibrary (libname,dest)
+ * InstallManPageLong (file,destdir,dest)
+ * InstallManPage (file,destdir)
+ * InstallManPageAliases (file,destdir,aliases)
+ * ManKeywordsTarget (manpath)
+ * InstallNamedNonExec (srcname,dstname,dest)
+ * InstallNonExecFile (file,dest)
+ * InstallNonExecFileNoClobber (file,dest)
+ * InstallNonExec (file,dest)
+ * InstallProgramWithFlags (program,dest,flags)
+ * InstallProgram (program,dest)
+ * InstallScript (program,dest)
+ * InstallNamedProg (srcname,dstname,dest)
+ * InstallNamedProgNoClobber (srcname,dstname,dest)
+ * MakeFlagsToShellFlags (makeflags,shellcmd)
+ * MakeNamedTargetSubdir (dir,flags,subname)
+ * LinkConfDirectoryLong (mdir,cdir,rdir,ldir,opath,npath)
+ * LinkConfDirectory (mdir,cdir,rdir,ldir)
+ * LinkConfFileLong (cfile,lfile,opath,npath)
+ * LinkConfFile (cfile,lfile)
+ * LinkFileList (step,list,dir,sub)
+ * LinkVarDirectory (mdir,cdir,rdir,ldir)
+ * InstallMultipleDestFlags (step,list,dest,flags)
+ * InstallMultipleDest (step,list,dest)
+ * InstallMultiple (list,dest)
+ * InstallMultipleFlags (list,dest,flags)
+ * InstallMultipleMan (list,dest)
+ * InstallMultipleManSuffix (list,dest,suffix)
+ * DependDependency ()
+ * DependTarget ()
+ * DependTarget3 (srcs1,srcs2,srcs3)
+ * CleanTarget ()
+ * TagsTarget ()
+ * ImakeDependency (target)
+ * BuildMakefileTarget (notused,imakeflags)
+ * MakefileTarget ()
+ * LibMkdir (dir)
+ * LibCleanDir (dir)
+ * LintLibReferences (varname,libname,libsource)
+ * UnsharedLibReferences (varname,libname,libsource)
+ * ProjectUnsharedLibReferences (varname,libname,libsource,buildlibdir)
+ * SharedLibDependencies (libname,libsource,revname)
+ * SharedDSLibDependencies (libname,libsource,revname)
+ * SharedLibReferences (varname,libname,libsource,revname,rev)
+ * SharedDSLibReferences (varname,libname,libsource,revname,rev)
+ * ObjectCompile (options)
+ * NormalLibObjCompile (options)
+ * NormalSharedLibObjCompile (options)
+ * NormalRelocLibObjCompile (options)
+ * LibObjCompile (dir,options)
+ * DebuggedLibObjCompile (options)
+ * ProfiledLibObjCompile (options)
+ * SharedLibObjCompile (options)
+ * NormalLibraryObjectRule ()
+ * NormalFortranObjectRule ()
+ * ObjectFromSpecialSource (dst,src,flags)
+ * SpecialObjectRule (objs,depends,options)
+ * SpecialCObjectRule (basename,depends,options)
+ * LexFile (file)
+ * M4File (file,includes)
+ * YaccFile (file,flags)
+ * YaccFileNoFlags (file)
+ * MakeLibrary (libname,objlist)
+ * LinkBuildLibrary (lib)
+ * LinkBuildSonameLibrary (lib)
+ * NormalLibraryTarget (libname,objlist)
+ * NormalLibraryTarget2 (libname,objlist1,objlist2)
+ * NormalLibraryTarget3 (libname,objlist1,objlist2,objlist3)
+ * NormalDepLibraryTarget (libname,deplist,objlist)
+ * UnsharedLibraryTarget (libname,objlist,down,up)
+ * UnsharedLibraryTarget3 (libname,objlist1,objlist2,objlist3,down,up)
+ * SubdirLibraryRule (objlist)
+ * ProfiledLibraryTarget (libname,objlist)
+ * DebuggedLibraryTarget (libname,objlist)
+ * AliasedLibraryTarget (libname,alias)
+ * NormalRelocatableTarget (objname,objlist)
+ * ProfiledRelocatableTarget (objname,objlist)
+ * DebuggedRelocatableTarget (objname,objlist)
+ * LintLibraryTarget (libname,srclist)
+ * NormalLintTarget (srclist)
+ * LintTarget ()
+ * LinkSourceFile (src,dir)
+ * LinkFile (tofile,fromfile)
+ * MakeSubincludesForBuild (step,dir,srclist)
+ * LangNamedTargetSubdirs (lang,name,dirs,verb,flags,subname)
+ * LangNamedMakeSubdirs (lang,name,dirs)
+ * LangMakeSubdirs (lang,dirs)
+ * NamedTargetSubdirs (name,dirs,verb,flags,subname)
+ * NamedMakeSubdirs (name,dirs)
+ * MakeSubdirs (dirs)
+ * DependSubdirs (dirs)
+ * ForceSubdirs (dirs)
+ * InstallSubdirs (dirs)
+ * InstallManSubdirs (dirs)
+ * IncludesSubdirs (dirs)
+ * NamedCleanSubdirs (name,dirs)
+ * CleanSubdirs (dirs)
+ * NamedTagSubdirs (name,dirs)
+ * TagSubdirs (dirs)
+ * MakeLintSubdirs (dirs,target,subtarget)
+ * LintSubdirs (dirs)
+ * MakeLintLibSubdirs (dirs)
+ * MakeMakeSubdirs (dirs,target)
+ * MakefileSubdirs (dirs)
+ * CppScriptTarget (dst,src,defs,deplist)
+ * MakeScriptFromCpp (name,defs)
+ * CppFileTarget (dst,src,defs,deplist)
+ * CppSourceFile (dst,src,defs,deplist)
+ * MakeDirectories (step,dirs)
+ * AllTarget (depends)
+ * StaticLibrary (libpath,libname)
+ * MakeMutex (targets)
+ * LinkBuildModule (module,subdir)
+ * LinkBuildNamedModule (module,name,subdir)
+ * DynamicModuleTarget (module,modlist)
+ * InstallDynamicModule (module,dest,subdir)
+ * InstallDynamicNamedModule (module,instname,dest,subdir)
+ * LinkerRuntimeLibraryPathFlag (path)
+ *
+ *
+ * The following are in specific <os>Lib.rules:
+ *
+ * SharedLibraryTarget (libname,rev,solist,down,up)
+ * SharedLibraryDataTarget (libname,rev,salist)
+ * InstallSharedLibrary (libname,rev,dest)
+ * InstallSharedLibraryData (libname,rev,dest)
+ * SharedDepModuleTarget (name,deps,solist)
+ *
+ */
+
+#define NullParameter
+
+/* if [ -d ] or [ ! -d ] causes make to fail, define this as - */
+#ifndef DirFailPrefix
+#define DirFailPrefix
+#endif
+
+/*
+ * NoCmpScript - suppress clearmake build script comparison.
+ */
+#ifndef NoCmpScript
+#if HasClearmake
+#define NoCmpScript(targ) @@\
+XCOMM special target for clearmake @@\
+.NO_CMP_SCRIPT: targ
+#else
+#define NoCmpScript(targ) /**/
+#endif
+#endif
+
+/*
+ * NoConfigRec - suppress using clearmake configuration records.
+ */
+#ifndef NoConfigRec
+#if HasClearmake
+#define NoConfigRec(targ) @@\
+XCOMM special target for clearmake @@\
+.NO_CONFIG_REC: targ
+#else
+#define NoConfigRec(targ) /**/
+#endif
+#endif
+
+/*
+ * Concat - concatenates two strings.
+ */
+#ifndef Concat
+#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
+#define Concat(a,b)a##b
+#else
+#define Concat(a,b)a/**/b
+#endif
+#endif
+
+/*
+ * Concat3 - concatenates three strings.
+ */
+#ifndef Concat3
+#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
+#define Concat3(a,b,c)a##b##c
+#else
+#define Concat3(a,b,c)a/**/b/**/c
+#endif
+#endif
+
+/*
+ * Concat4 - concatenates four strings.
+ */
+#ifndef Concat4
+#if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
+#define Concat4(a,b,c,d)a##b##c##d
+#else
+#define Concat4(a,b,c,d)a/**/b/**/c/**/d
+#endif
+#endif
+
+/*
+ * _XUse - makes a choice based on UseInstalledX11.
+ */
+#ifndef _XUse
+# if defined(UseInstalled) || UseInstalledX11
+# define _XUse(a,b) a
+# else
+# define _XUse(a,b) b
+# endif
+#endif /* _XUse */
+
+/*
+ * _Use - makes a choice based on UseInstalled.
+ */
+#ifndef _Use
+# define _Use _XUse
+#endif /* _Use */
+
+/*
+ * _XUseCat - combination of _XUse and Concat.
+ * exists to avoid problems with some preprocessors
+ */
+#ifndef _XUseCat
+# if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
+# if defined(UseInstalled) || UseInstalledX11
+# define _XUseCat(a,b,c) a##c
+# else
+# define _XUseCat(a,b,c) b##c
+# endif
+# else
+# if defined(UseInstalled) || UseInstalledX11
+# define _XUseCat(a,b,c) a/**/c
+# else
+# define _XUseCat(a,b,c) b/**/c
+# endif
+# endif
+#endif /* _XUseCat */
+
+/*
+ * _UseCat - combination of _Use and Concat.
+ * exists to avoid problems with some preprocessors
+ */
+#ifndef _UseCat
+# define _UseCat _XUseCat
+#endif /* _UseCat */
+
+#ifndef ProgramTargetName
+#define ProgramTargetName(target)target
+#endif
+
+#ifndef HostProgramTargetName
+#define HostProgramTargetName(target)target
+#endif
+
+#ifndef RunProgram
+#define RunProgram(progvar,options) $(progvar) options
+#endif
+
+#ifndef RunProgramWithSetup
+#define RunProgramWithSetup(setup,progvar,options) setup $(progvar) options
+#endif
+
+#ifndef RunPerlScript
+#define RunPerlScript(script,options) $(PERLENVSETUP) $(PERL) $(PERLOPTS) script options
+#endif
+
+#ifndef RemoveFile
+#define RemoveFile(file) $(RM) file
+#endif /* RemoveFile */
+
+#ifndef RemoveFiles
+#define RemoveFiles(files) $(RM) files
+#endif /* RemoveFiles */
+
+#if RemoveObsoleteFiles
+#define RemoveOldFile(new,old,dir) @@\
+ @if [ -f new ]; then set -x; \ @@\
+ RemoveFile($(DESTDIR)dir/old); \ @@\
+ fi
+#else
+#define RemoveOldFile(new,old,dir) $(_NULLCMD_)
+#endif
+
+/*
+ * CenterLoadTarget - generate rules to load files into CodeCenter
+ */
+#ifndef CenterLoadTarget
+#if HasCodeCenter
+#define CenterLoadTarget(target,srclist,libs,defines) @@\
+ProgramTargetName(target):: srclist @@\
+ XCOMM load defines srclist libs
+#else
+#define CenterLoadTarget(target,srclist,libs,defines) /**/
+#endif
+#endif /* CenterLoadTarget */
+
+/*
+ * CenterProgramTarget - generate rules to make CodeCenter read in sources
+ * and objects.
+ */
+#ifndef CenterProgramTarget
+#define CenterProgramTarget(program,srclist,objlist,locallibs,syslibs) @@\
+CenterLoadTarget(Concat(debug_,program),srclist,$(EXTRA_LDOPTIONS) $(LOCAL_LDFLAGS) $(LDPRELIBS) locallibs $(LDLIBS) syslibs,$(ALLDEFINES)) @@\
+ @@\
+CenterLoadTarget(Concat(odebug_,program),objlist,$(EXTRA_LDOPTIONS) $(LOCAL_LDFLAGS) $(LDPRELIBS) locallibs $(LDLIBS) syslibs,$(ALLDEFINES))
+#endif /* CenterProgramTarget */
+
+#ifndef SentinelLinkTarget
+#if HasSentinel
+#define SentinelLinkTarget(step,program,linklist) @@\
+ProgramTargetName(step.sentinel): @@\
+ RemoveTargetProgram($@) @@\
+ $(CCENVSETUP) $(SENTINEL) $(SENTINELOPTIONS) $(CC) -o program.sentinel $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS)
+#else
+#define SentinelLinkTarget(step,program,linklist) /**/
+#endif
+#endif /* SentinelLinkTarget */
+
+/*
+ * SentinelProgramTarget - generate rules to make Sentinel image
+ */
+#ifndef SentinelProgramTarget
+#if HasSentinel
+#define SentinelProgramTarget(program,deplist,linklist) @@\
+ProgramTargetName(program.sentinel): deplist @@\
+ RemoveTargetProgram($@) @@\
+ $(CCENVSETUP) $(SENTINEL) $(SENTINELOPTIONS) $(CC) -o $@ $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+clean clean.sentinel:: @@\
+ RemoveFile(program.sentinel)
+#else
+#define SentinelProgramTarget(program,deplist,linklist) /**/
+#endif
+#endif /* SentinelProgramTarget */
+
+/*
+ * SentinelCplusplusProgramTarget - generate rules to make Sentinel image
+ */
+#ifndef SentinelCplusplusProgramTarget
+#if HasSentinel
+#define SentinelCplusplusProgramTarget(program,deplist,linklist) @@\
+ProgramTargetName(program.sentinel): deplist @@\
+ RemoveTargetProgram($@) @@\
+ $(CXXENVSETUP) $(SENTINEL) $(SENTINELOPTIONS) $(CXX) -o $@ $(CXXLDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+clean clean.sentinel:: @@\
+ RemoveFile(program.sentinel)
+#else
+#define SentinelCplusplusProgramTarget(program,deplist,linklist) /**/
+#endif
+#endif /* SentinelCplusplusProgramTarget */
+
+#ifndef PurifyLinkTarget
+#if HasPurify
+#define PurifyLinkTarget(step,program,linklist) @@\
+ProgramTargetName(step.pure): @@\
+ RemoveTargetProgram($@) @@\
+ $(CCENVSETUP) $(PURIFY) $(PURIFYOPTIONS) $(CC) -o program.pure $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS)
+#else
+#define PurifyLinkTarget(step,program,linklist) /**/
+#endif
+#endif /* PurifyLinkTarget */
+
+/*
+ * PurifyProgramTarget - generate rules to make Purify'ed image
+ */
+#ifndef PurifyProgramTarget
+#if HasPurify
+#define PurifyProgramTarget(program,deplist,linklist) @@\
+ProgramTargetName(program.pure): deplist @@\
+ RemoveTargetProgram($@) @@\
+ $(CCENVSETUP) $(PURIFY) $(PURIFYOPTIONS) $(CC) -o $@ $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+clean clean.pure:: @@\
+ RemoveFile(program.pure)
+#else
+#define PurifyProgramTarget(program,deplist,linklist) /**/
+#endif
+#endif /* PurifyProgramTarget */
+
+/*
+ * PurifyCplusplusProgramTarget - generate rules to make Purify'ed image
+ */
+#ifndef PurifyCplusplusProgramTarget
+#if HasPurify
+#define PurifyCplusplusProgramTarget(program,deplist,linklist) @@\
+ProgramTargetName(program.pure): deplist @@\
+ RemoveTargetProgram($@) @@\
+ $(CXXENVSETUP) $(PURIFY) $(PURIFYOPTIONS) $(CXX) -o $@ $(CXXLDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+clean clean.pure:: @@\
+ RemoveFile(program.pure)
+#else
+#define PurifyCplusplusProgramTarget(program,deplist,linklist) /**/
+#endif
+#endif /* PurifyCplusplusProgramTarget */
+
+#ifndef ProofLinkTarget
+#if HasTestCenter
+#define ProofLinkTarget(step,program,linklist) @@\
+ProgramTargetName(step.tc): @@\
+ RemoveTargetProgram($@) @@\
+ $(CCENVSETUP) $(PROOF) $(PROOFOPTIONS) $(CC) -o program.tc $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS)
+#else
+#define ProofLinkTarget(step,program,linklist) /**/
+#endif
+#endif /* ProofLinkTarget */
+
+/*
+ * ProofProgramTarget - generate rules to make Proof'ed image
+ */
+#ifndef ProofProgramTarget
+#if HasTestCenter
+#define ProofProgramTarget(program,deplist,linklist) @@\
+ProgramTargetName(program.tc): deplist @@\
+ RemoveTargetProgram($@) @@\
+ $(CCENVSETUP) $(PROOF) $(PROOFOPTIONS) $(CC) -o $@ $(LDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+clean cleantc:: @@\
+ RemoveFiles(program.tc program.tc.*.*)
+#else
+#define ProofProgramTarget(program,deplist,linklist) /**/
+#endif
+#endif /* ProofProgramTarget */
+
+/*
+ * ProofCplusplusProgramTarget - generate rules to make Proof'ed image
+ */
+#ifndef ProofCplusplusProgramTarget
+#if HasTestCenter
+#define ProofCplusplusProgramTarget(program,deplist,linklist) @@\
+ProgramTargetName(program.tc): deplist @@\
+ RemoveTargetProgram($@) @@\
+ $(CXXENVSETUP) $(PROOF) $(PROOFOPTIONS) $(CXX) -o $@ $(CXXLDOPTIONS) linklist $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+clean cleantc:: @@\
+ RemoveFiles(program.tc program.tc.*.*)
+#else
+#define ProofCplusplusProgramTarget(program,deplist,linklist) /**/
+#endif
+#endif /* ProofCplusplusProgramTarget */
+
+#ifndef ProofCleanTarget
+#if HasTestCenter
+#define ProofCleanTarget() @@\
+clean cleantc:: @@\
+ $(RM) -r TC.Cache
+#else
+#define ProofCleanTarget() /**/
+#endif
+#endif /* ProofCleanTarget */
+
+#ifndef RemoveTargetProgram
+#if RemoveTargetProgramByMoving
+#define RemoveTargetProgram(program) \
+-if [ -f program ]; then RemoveFile(Concat(program,~)); $(MV) program Concat(program,~); fi
+#else
+#define RemoveTargetProgram(program) RemoveFile(program)
+#endif
+#endif /* RemoveTargetProgram */
+
+#ifndef MakeDir
+#define MakeDir(dir) DirFailPrefix@if [ -d dir ]; then \ @@\
+ set +x; \ @@\
+ else \ @@\
+ if [ -h dir ]; then \ @@\
+ (set -x; rm -f dir); \ @@\
+ fi; \ @@\
+ (set -x; $(MKDIRHIER) dir); \ @@\
+ fi
+#endif /* MakeDir */
+
+#ifndef MakeDirInline
+#define MakeDirInline(dir) if [ -d dir ]; then \ @@\
+ :; \ @@\
+ else \ @@\
+ if [ -h dir ]; then \ @@\
+ (set -x; rm -f dir); \ @@\
+ fi; \ @@\
+ (set -x; $(MKDIRHIER) dir); \ @@\
+ fi
+#endif /* MakeDirInline */
+
+#ifndef InstallDirectory
+#define InstallDirectory(dir) @@\
+install:: @@\
+ MakeDir(dir)
+#endif /* InstallDirectory */
+
+#ifndef InstallCreateLink
+# define InstallCreateLink(dest,from,to) @@\
+install:: @@\
+ cd $(DESTDIR)dest && \ @@\
+ $(LN) -sf from to
+#endif
+
+#ifndef BuildIncludesTop
+#define BuildIncludesTop(srclist) @@\
+includes:: srclist @@\
+ MakeDir($(BUILDINCDIR)) @@\
+ @(set -x; cd $(BUILDINCDIR) && for i in srclist; do \ @@\
+ RemoveFile($$i); \ @@\
+ $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/$$i .; \ @@\
+ done)
+#endif /* BuildIncludesTop */
+
+#ifndef BuildIncludes
+#define BuildIncludes(srclist,dstsubdir,dstupdir) @@\
+includes:: srclist @@\
+ MakeDir($(BUILDINCDIR)/dstsubdir) @@\
+ @(set -x; cd $(BUILDINCDIR)/dstsubdir && for i in srclist; do \ @@\
+ RemoveFile($$i); \ @@\
+ $(LN) $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR)/$$i .; \ @@\
+ done)
+#endif /* BuildIncludes */
+
+/*
+ * LinkBuildBinary - export a binary from the build tree.
+ */
+#ifndef LinkBuildBinary
+#define LinkBuildBinary(binary) @@\
+all:: $(BUILDBINDIR)/binary binary @@\
+ @@\
+$(BUILDBINDIR)/binary: binary @@\
+ MakeDir($(BUILDBINDIR)) @@\
+ RemoveFile($@) @@\
+ cd $(BUILDBINDIR) && $(LN) $(BUILDBINTOP)/$(CURRENT_DIR)/binary .
+#endif /* LinkBuildBinary */
+
+#ifndef BuildInterfaces
+#define BuildInterfaces(srclist,dstsubdir,dstupdir) @@\
+interfaces:: @@\
+ MakeDir($(BUILDINCDIR)/dstsubdir) @@\
+ @(set -x; cd $(BUILDINCDIR)/dstsubdir && for i in srclist; do \ @@\
+ RemoveFile($$i); \ @@\
+ $(LN) $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR)/$$i .; \ @@\
+ done)
+#endif /* BuildInterfaces */
+
+/*
+ * LinkRule - link a program
+ */
+#ifndef LinkRule
+#define LinkRule(program,options,objects,libraries) \
+$(CCLINK) -o program options objects libraries $(EXTRA_LOAD_FLAGS)
+#endif /* LinkRule */
+
+/*
+ * HostLinkRule - link a utility to be used on the build host
+ * (differs from LinkRule if cross compiling)
+ */
+#ifndef HostLinkRule
+#define HostLinkRule LinkRule
+#endif
+
+#ifndef CplusplusLinkRule
+#define CplusplusLinkRule(program,options,objects,libraries) \
+$(CXXLINK) -o program options objects libraries $(EXTRA_LOAD_FLAGS)
+#endif /* CplusplusLinkRule */
+
+/*
+ * NormalProgramTarget - generate rules to compile and link the indicated
+ * program; since it does not use any default object files, it may be used for
+ * multiple programs in the same Imakefile.
+ */
+#ifndef NormalProgramTarget
+#define NormalProgramTarget(program,objects,deplibs,locallibs,syslibs) @@\
+ProgramTargetName(program): objects deplibs @@\
+ RemoveTargetProgram($@) @@\
+ LinkRule($@,$(LDOPTIONS),objects,locallibs $(LDLIBS) syslibs) @@\
+ @@\
+SentinelProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\
+PurifyProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\
+ProofProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* NormalProgramTarget */
+
+
+/*
+ * NormalCplusplusProgramTarget - Like NormalTargetProgram, but uses
+ * C++ linking rules.
+ */
+#ifndef NormalCplusplusProgramTarget
+#define NormalCplusplusProgramTarget(program,objects,deplibs,locallibs,syslibs) @@\
+ProgramTargetName(program): objects deplibs @@\
+ RemoveTargetProgram($@) @@\
+ CplusplusLinkRule($@,$(CXXLDOPTIONS),objects,locallibs $(LDLIBS) syslibs) @@\
+ @@\
+SentinelCplusplusProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\
+PurifyCplusplusProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\
+ProofCplusplusProgramTarget(program,objects deplibs,objects locallibs $(LDLIBS) syslibs) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* NormalCplusplusProgramTarget */
+
+
+#ifndef SetUIDProgramTarget
+#define SetUIDProgramTarget NormalProgramTarget
+#endif
+
+
+/*
+ * SingleProgramTarget - obsolete version of NormalProgramTarget that does
+ * not have deplibs.
+ */
+#ifndef SingleProgramTarget
+#define SingleProgramTarget(program,objects,locallibs,syslibs) @@\
+NormalProgramTarget(program,objects,NullParameter,locallibs,syslibs)
+#endif /* SingleProgramTarget */
+
+/*
+ * SimpleProgramTarget - generate rules for compiling and linking programs
+ * that only have one C source file. It should only be used in Imakefiles
+ * that describe a single program.
+ */
+#ifndef SimpleProgramTarget
+#define SimpleProgramTarget(program) @@\
+ OBJS = program.o @@\
+ SRCS = program.c @@\
+ @@\
+ComplexProgramTarget(program)
+#endif /* SimpleProgramTarget */
+
+#ifndef SimpleProgramTarget_1
+#define SimpleProgramTarget_1(program) @@\
+ OBJS1 = program.o @@\
+ SRCS1 = program.c @@\
+ @@\
+ComplexProgramTarget_1(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_1 */
+#ifndef SimpleProgramTarget_2
+#define SimpleProgramTarget_2(program) @@\
+ OBJS2 = program.o @@\
+ SRCS2 = program.c @@\
+ @@\
+ComplexProgramTarget_2(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_2 */
+#ifndef SimpleProgramTarget_3
+#define SimpleProgramTarget_3(program) @@\
+ OBJS3 = program.o @@\
+ SRCS3 = program.c @@\
+ @@\
+ComplexProgramTarget_3(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_3 */
+#ifndef SimpleProgramTarget_4
+#define SimpleProgramTarget_4(program) @@\
+ OBJS4 = program.o @@\
+ SRCS4 = program.c @@\
+ @@\
+ComplexProgramTarget_4(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_4 */
+#ifndef SimpleProgramTarget_5
+#define SimpleProgramTarget_5(program) @@\
+ OBJS5 = program.o @@\
+ SRCS5 = program.c @@\
+ @@\
+ComplexProgramTarget_5(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_5 */
+#ifndef SimpleProgramTarget_6
+#define SimpleProgramTarget_6(program) @@\
+ OBJS6 = program.o @@\
+ SRCS6 = program.c @@\
+ @@\
+ComplexProgramTarget_6(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_6 */
+#ifndef SimpleProgramTarget_7
+#define SimpleProgramTarget_7(program) @@\
+ OBJS7 = program.o @@\
+ SRCS7 = program.c @@\
+ @@\
+ComplexProgramTarget_7(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_7 */
+#ifndef SimpleProgramTarget_8
+#define SimpleProgramTarget_8(program) @@\
+ OBJS8 = program.o @@\
+ SRCS8 = program.c @@\
+ @@\
+ComplexProgramTarget_8(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_8 */
+#ifndef SimpleProgramTarget_9
+#define SimpleProgramTarget_9(program) @@\
+ OBJS9 = program.o @@\
+ SRCS9 = program.c @@\
+ @@\
+ComplexProgramTarget_9(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_9 */
+#ifndef SimpleProgramTarget_10
+#define SimpleProgramTarget_10(program) @@\
+ OBJS10 = program.o @@\
+ SRCS10 = program.c @@\
+ @@\
+ComplexProgramTarget_10(program,$(LOCAL_LIBRARIES),NullParameter)
+#endif /* SimpleProgramTarget_10 */
+
+#ifndef SimpleCplusplusProgramTarget
+#define SimpleCplusplusProgramTarget(program) @@\
+ OBJS = program.o @@\
+ SRCS = program.CCsuf @@\
+ @@\
+ComplexCplusplusProgramTarget(program)
+#endif /* SimpleCplusplusProgramTarget */
+
+#ifndef ProgramTargetHelper
+#define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\
+ProgramTargetName(program): $(objs) $(deplib) @@\
+ RemoveTargetProgram($@) @@\
+ LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\
+ @@\
+CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\
+SentinelProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+PurifyProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ProofProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR)) @@\
+InstallManPage(program,$(MANDIR))
+#endif /* ProgramTargetHelper */
+
+#ifndef ProgramTargetHelperNoMan
+#define ProgramTargetHelperNoMan(program,srcs,objs,deplib,locallib,syslib) @@\
+ProgramTargetName(program): $(objs) $(deplib) @@\
+ RemoveTargetProgram($@) @@\
+ LinkRule($@,$(LDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\
+ @@\
+CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\
+SentinelProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+PurifyProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ProofProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+#endif /* ProgramTargetHelperNoMan */
+
+#ifndef CplusplusProgramTargetHelper
+#define CplusplusProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\
+ProgramTargetName(program): $(objs) $(deplib) @@\
+ RemoveTargetProgram($@) @@\
+ CplusplusLinkRule($@,$(CXXLDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\
+ @@\
+CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\
+SentinelCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+PurifyCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ProofCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR)) @@\
+InstallManPage(program,$(MANDIR))
+#endif /* CplusplusProgramTargetHelper */
+
+#ifndef CplusplusProgramTargetHelperNoMan
+#define CplusplusProgramTargetHelperNoMan(program,srcs,objs,deplib,locallib,syslib) @@\
+ProgramTargetName(program): $(objs) $(deplib) @@\
+ RemoveTargetProgram($@) @@\
+ CplusplusLinkRule($@,$(CXXLDOPTIONS),$(objs),locallib $(LDLIBS) syslib) @@\
+ @@\
+CenterProgramTarget(program,$(srcs),$(objs),locallib,syslib) @@\
+SentinelCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+PurifyCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ProofCplusplusProgramTarget(program,$(objs) $(deplib),$(objs) locallib $(LDLIBS) syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR)) @@
+#endif /* CplusplusProgramTargetHelperNoMan */
+
+/*
+ * ComplexProgramTarget - generate rules for compiling and linking the
+ * program specified by $(OBJS) and $(SRCS), installing the program and its
+ * man page, and generating dependencies. It should only be used in
+ * Imakefiles that describe a single program.
+ */
+#ifndef ComplexProgramTarget
+#define ComplexProgramTarget(program) @@\
+ PROGRAM = ProgramTargetName(program) @@\
+ @@\
+AllTarget(ProgramTargetName(program)) @@\
+ @@\
+ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* ComplexProgramTarget */
+
+#ifndef ComplexCplusplusProgramTarget
+#define ComplexCplusplusProgramTarget(program) @@\
+ PROGRAM = ProgramTargetName(program) @@\
+ @@\
+AllTarget(ProgramTargetName(program)) @@\
+ @@\
+CplusplusProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* ComplexCplusplusProgramTarget */
+
+/*
+ * ComplexProgramTargetNoMan - generate rules for compiling and linking
+ * the program specified by $(OBJS) and $(SRCS), installing the program
+ * and generating dependencies. It should only be used in Imakefiles
+ * that describe a single program, and have no manual page.
+ */
+#ifndef ComplexProgramTargetNoMan
+#define ComplexProgramTargetNoMan(program) @@\
+ PROGRAM = ProgramTargetName(program) @@\
+ @@\
+AllTarget(ProgramTargetName(program)) @@\
+ @@\
+ProgramTargetHelperNoMan(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* ComplexProgramTargetNoMan */
+
+#ifndef ComplexCplusplusProgramTarget
+#define ComplexCplusplusProgramTarget(program) @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+CplusplusProgramTargetHelperNoMan(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* ComplexCplusplusProgramTarget */
+
+/*
+ * ComplexProgramTarget_1 - generate rules for compiling and linking the
+ * program specified by $(OBJS1) and $(SRCS1), installing the program and its
+ * man page, and generating dependencies for it and any programs described
+ * by $(SRCS2) through $(SRCS10). It should be used to build the primary
+ * program in Imakefiles that describe multiple programs.
+ */
+#ifndef ComplexProgramTarget_1
+#define ComplexProgramTarget_1(program,locallib,syslib) @@\
+ OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) \ @@\
+ $(OBJS6) $(OBJS7) $(OBJS8) $(OBJS9) $(OBJS10) @@\
+ SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS5) \ @@\
+ $(SRCS6) $(SRCS7) $(SRCS8) $(SRCS9) $(SRCS10) @@\
+ @@\
+AllTarget($(PROGRAMS)) @@\
+ @@\
+ProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib) @@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFiles($(PROGRAMS))
+#endif /* ComplexProgramTarget_1 */
+
+#ifndef ComplexCplusplusProgramTarget_1
+#define ComplexCplusplusProgramTarget_1(program,locallib,syslib) @@\
+ OBJS = $(OBJS1) $(OBJS2) $(OBJS3) $(OBJS4) $(OBJS5) \ @@\
+ $(OBJS6) $(OBJS7) $(OBJS8) $(OBJS9) $(OBJS10) @@\
+ SRCS = $(SRCS1) $(SRCS2) $(SRCS3) $(SRCS4) $(SRCS5) \ @@\
+ $(SRCS6) $(SRCS7) $(SRCS8) $(SRCS9) $(SRCS10) @@\
+ @@\
+AllTarget($(PROGRAMS)) @@\
+ @@\
+CplusplusProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib)@@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFiles($(PROGRAMS))
+#endif /* ComplexCplusplusProgramTarget_1 */
+
+/*
+ * ComplexProgramTarget_2 - generate rules for compiling and linking the
+ * program specified by $(OBJS2) and $(SRCS2) and installing the program and
+ * man page. It should be used to build the second program in Imakefiles
+ * describing more than one program.
+ */
+#ifndef ComplexProgramTarget_2
+#define ComplexProgramTarget_2(program,locallib,syslib) @@\
+ProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib)
+#endif /* ComplexProgramTarget_2 */
+
+#ifndef ComplexCplusplusProgramTarget_2
+#define ComplexCplusplusProgramTarget_2(program,locallib,syslib) @@\
+CplusplusProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib)
+#endif /* ComplexCplusplusProgramTarget_2 */
+
+/*
+ * ComplexProgramTarget_3 - generate rules for compiling and linking the
+ * program specified by $(OBJS3) and $(SRCS3) and installing the program and
+ * man page. It should be used to build the third program in Imakefiles
+ * describing more than one program.
+ */
+#ifndef ComplexProgramTarget_3
+#define ComplexProgramTarget_3(program,locallib,syslib) @@\
+ProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib)
+#endif /* ComplexProgramTarget_3 */
+
+#ifndef ComplexCplusplusProgramTarget_3
+#define ComplexCplusplusProgramTarget_3(program,locallib,syslib) @@\
+CplusplusProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib)
+#endif /* ComplexCplusplusProgramTarget_3 */
+
+/*
+ * ComplexProgramTarget_4 - generate rules for compiling and linking the
+ * program specified by $(OBJS4) and $(SRCS4) and installing the program and
+ * man page. It should be used to build the third program in Imakefiles
+ * describing more than one program.
+ */
+#ifndef ComplexProgramTarget_4
+#define ComplexProgramTarget_4(program,locallib,syslib) @@\
+ProgramTargetHelper(program,SRCS4,OBJS4,DEPLIBS4,locallib,syslib)
+#endif /* ComplexProgramTarget_4 */
+
+#ifndef ComplexCplusplusProgramTarget_4
+#define ComplexCplusplusProgramTarget_4(program,locallib,syslib) @@\
+CplusplusProgramTargetHelper(program,SRCS4,OBJS4,DEPLIBS4,locallib,syslib)
+#endif /* ComplexCplusplusProgramTarget_4 */
+
+/*
+ * ComplexProgramTarget_5 - generate rules for compiling and linking the
+ * program specified by $(OBJS5) and $(SRCS5) and installing the program and
+ * man page. It should be used to build the third program in Imakefiles
+ * describing more than one program.
+ */
+#ifndef ComplexProgramTarget_5
+#define ComplexProgramTarget_5(program,locallib,syslib) @@\
+ProgramTargetHelper(program,SRCS5,OBJS5,DEPLIBS5,locallib,syslib)
+#endif /* ComplexProgramTarget_5 */
+
+#ifndef ComplexCplusplusProgramTarget_5
+#define ComplexCplusplusProgramTarget_5(program,locallib,syslib) @@\
+CplusplusProgramTargetHelper(program,SRCS5,OBJS5,DEPLIBS5,locallib,syslib)
+#endif /* ComplexCplusplusProgramTarget_5 */
+
+/*
+ * ComplexProgramTarget_6 - generate rules for compiling and linking the
+ * program specified by $(OBJS6) and $(SRCS6) and installing the program and
+ * man page. It should be used to build the third program in Imakefiles
+ * describing more than one program.
+ */
+#ifndef ComplexProgramTarget_6
+#define ComplexProgramTarget_6(program,locallib,syslib) @@\
+ProgramTargetHelper(program,SRCS6,OBJS6,DEPLIBS6,locallib,syslib)
+#endif /* ComplexProgramTarget_6 */
+
+#ifndef ComplexCplusplusProgramTarget_6
+#define ComplexCplusplusProgramTarget_6(program,locallib,syslib) @@\
+CplusplusProgramTargetHelper(program,SRCS6,OBJS6,DEPLIBS6,locallib,syslib)
+#endif /* ComplexCplusplusProgramTarget_6 */
+
+/*
+ * ComplexProgramTarget_7 - generate rules for compiling and linking the
+ * program specified by $(OBJS7) and $(SRCS7) and installing the program and
+ * man page. It should be used to build the third program in Imakefiles
+ * describing more than one program.
+ */
+#ifndef ComplexProgramTarget_7
+#define ComplexProgramTarget_7(program,locallib,syslib) @@\
+ProgramTargetHelper(program,SRCS7,OBJS7,DEPLIBS7,locallib,syslib)
+#endif /* ComplexProgramTarget_7 */
+
+#ifndef ComplexCplusplusProgramTarget_7
+#define ComplexCplusplusProgramTarget_7(program,locallib,syslib) @@\
+CplusplusProgramTargetHelper(program,SRCS7,OBJS7,DEPLIBS7,locallib,syslib)
+#endif /* ComplexCplusplusProgramTarget_7 */
+
+/*
+ * ComplexProgramTarget_8 - generate rules for compiling and linking the
+ * program specified by $(OBJS8) and $(SRCS8) and installing the program and
+ * man page. It should be used to build the third program in Imakefiles
+ * describing more than one program.
+ */
+#ifndef ComplexProgramTarget_8
+#define ComplexProgramTarget_8(program,locallib,syslib) @@\
+ProgramTargetHelper(program,SRCS8,OBJS8,DEPLIBS8,locallib,syslib)
+#endif /* ComplexProgramTarget_8 */
+
+#ifndef ComplexCplusplusProgramTarget_8
+#define ComplexCplusplusProgramTarget_8(program,locallib,syslib) @@\
+CplusplusProgramTargetHelper(program,SRCS8,OBJS8,DEPLIBS8,locallib,syslib)
+#endif /* ComplexCplusplusProgramTarget_8 */
+
+/*
+ * ComplexProgramTarget_9 - generate rules for compiling and linking the
+ * program specified by $(OBJS9) and $(SRCS9) and installing the program and
+ * man page. It should be used to build the third program in Imakefiles
+ * describing more than one program.
+ */
+#ifndef ComplexProgramTarget_9
+#define ComplexProgramTarget_9(program,locallib,syslib) @@\
+ProgramTargetHelper(program,SRCS9,OBJS9,DEPLIBS9,locallib,syslib)
+#endif /* ComplexProgramTarget_9 */
+
+#ifndef ComplexCplusplusProgramTarget_9
+#define ComplexCplusplusProgramTarget_9(program,locallib,syslib) @@\
+CplusplusProgramTargetHelper(program,SRCS9,OBJS9,DEPLIBS9,locallib,syslib)
+#endif /* ComplexCplusplusProgramTarget_9 */
+
+/*
+ * ComplexProgramTarget_10 - generate rules for compiling and linking the
+ * program specified by $(OBJS10) and $(SRCS10) and installing the program and
+ * man page. It should be used to build the third program in Imakefiles
+ * describing more than one program.
+ */
+#ifndef ComplexProgramTarget_10
+#define ComplexProgramTarget_10(program,locallib,syslib) @@\
+ProgramTargetHelper(program,SRCS10,OBJS10,DEPLIBS10,locallib,syslib)
+#endif /* ComplexProgramTarget_10 */
+
+#ifndef ComplexCplusplusProgramTarget_10
+#define ComplexCplusplusProgramTarget_10(program,locallib,syslib) @@\
+CplusplusProgramTargetHelper(program,SRCS10,OBJS10,DEPLIBS10,locallib,syslib)
+#endif /* ComplexCplusplusProgramTarget_10 */
+
+#ifndef MoveToBakFile
+#define MoveToBakFile(file) -@if [ -f file ]; then set -x; \ @@\
+ $(MV) file file.bak; else exit 0; fi
+#endif /* MoveToBakFile */
+
+#ifndef RMoveToBakFile
+#define RMoveToBakFile(file) -@if [ -f file ]; then set -x; \ @@\
+ RemoveFile(file.bak); $(MV) file file.bak; \ @@\
+ else exit 0; fi
+#endif /* RMoveToBakFile */
+
+/*
+ * ServerTargetWithFlags - generate rules to compile, link, and relink a server
+ */
+#ifndef ServerTargetWithFlags
+#define ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\
+AllTarget(ProgramTargetName(server)) @@\
+ProgramTargetName(server): subdirs objects libs @@\
+ MoveToBakFile($@) @@\
+ LinkRule($@,$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\
+ @@\
+Concat(load,server): @@\
+ MoveToBakFile(ProgramTargetName(server)) @@\
+ LinkRule(ProgramTargetName(server),$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\
+ @@\
+loadX:: Concat(load,server) @@\
+ @@\
+SentinelProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
+SentinelLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
+PurifyProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
+PurifyLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
+ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
+ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
+ @@\
+InstallProgramWithFlags(server,$(BINDIR),flags) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(server))
+#endif /* ServerTargetWithFlags */
+
+/*
+ * ServerTarget - rules to compile, link, and relink a normal server
+ */
+#ifndef ServerTarget
+#define ServerTarget(server,subdirs,objects,libs,syslibs) @@\
+ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(_NOOP_))
+#endif /* ServerTarget */
+
+#if DoRanlibCmd
+#define RanLibrary(args) $(RANLIB) args
+#else
+#define RanLibrary(args) $(_NULLCMD_)
+#endif
+
+#ifndef LibraryTargetName
+#define LibraryTargetName(libname)Concat(lib,libname.a)
+#endif
+
+/* This rule is used for libs in Xserver/Imakefile which are loaded, not
+ * linked into the core module. Since modules are called libXXXX.a,
+ * this rule mustn't be overriden by .cf files.
+ */
+#ifndef ModuleLibraryTargetName
+#define ModuleLibraryTargetName(libname)Concat(lib,libname.a)
+#endif
+
+#ifndef LibraryTargetNameSuffix
+#define LibraryTargetNameSuffix(libname,suffix)Concat3(lib,libname,suffix.a)
+#endif
+
+#ifndef InstallNamedInline
+#define InstallNamedInline(srcname,flags,dest,dstname) $(INSTALL) $(INSTALLFLAGS) flags srcname $(DESTDIR)dest/dstname
+#endif
+
+#ifndef InstallNamedTarget
+#define InstallNamedTarget(step,srcname,flags,dest,dstname) @@\
+step:: srcname @@\
+ MakeDir($(DESTDIR)dest) @@\
+ InstallNamedInline(srcname,flags,dest,dstname)
+#endif /* InstallNamedTarget */
+
+/*
+ * InstallNamedTargetNoClobber - Like InstallNamedTarget, but doesn't
+ * do the install if an installed version already exists. Useful
+ * for files that might have local customizations that you don't
+ * want to clobber. Config files are good candidates for this.
+ */
+#ifndef InstallNamedTargetNoClobber
+#define InstallNamedTargetNoClobber(step,srcname,flags,dest,dstname) @@\
+step:: srcname @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @if [ -f $(DESTDIR)dest/dstname ]; then \ @@\
+ echo "Not overwriting existing" $(DESTDIR)dest/dstname; \ @@\
+ else set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) flags srcname $(DESTDIR)dest/dstname; fi
+#endif /* InstallNamedTargetNoClobber */
+
+#ifndef InstallTarget
+#define InstallTarget(step,file,flags,dest) @@\
+InstallNamedTarget(step,file,flags,dest,file)
+#endif /* InstallTarget */
+
+#ifndef InstallInline
+#define InstallInline(file,flags,dest) InstallNamedInline(file,flags,dest,file)
+#endif
+
+/*
+ * InstallLibrary - generate rules to install the indicated library.
+ */
+#ifndef InstallLibrary
+#define InstallLibrary(libname,dest) @@\
+install:: LibraryTargetName(libname) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\
+ RanLibrary($(RANLIBINSTFLAGS) $(DESTDIR)dest/LibraryTargetName(libname))
+#endif /* InstallLibrary */
+
+
+/*
+ * InstallDriverSDKLibrary - rule to install Driver SDK library.
+ * (only used for XFree86). This is a no-op
+ * rule so that Imakefiles on non-XFree86 systems
+ * continue to build Makefiles correctly.
+ */
+#ifndef InstallDriverSDKLibrary
+#define InstallDriverSDKLibrary(lib,dir)
+#endif
+
+
+/*
+ * InstallDriverSDKNamedLibrary - rule to install Driver SDK library.
+ * (only used for XFree86). This is a no-op
+ * rule so that Imakefiles on non-XFree86 systems
+ * continue to build Makefiles correctly.
+ */
+#ifndef InstallDriverSDKNamedLibrary
+#define InstallDriverSDKNamedLibrary(lib,dlib,dir)
+#endif
+
+
+/*
+ * InstallDriverSDKLibraryModule - rule to install Driver SDK library module.
+ * (only used for XFree86). This is a no-op
+ * rule so that Imakefiles on non-XFree86 systems
+ * continue to build Makefiles correctly.
+ */
+#ifndef InstallDriverSDKLibraryModule
+#define InstallDriverSDKLibraryModule(lib,dlib,dir)
+#endif
+
+
+/*
+ * MergeIntoInstalledLibrary - generate rules to merge one library into another
+ */
+#ifndef MergeIntoInstalledLibrary
+#define MergeIntoInstalledLibrary(tolib,fromlib) @@\
+install:: fromlib @@\
+ $(SCRIPTSRC)/mergelib $(DESTDIR)tolib fromlib
+#endif /* MergeIntoInstalledLibrary */
+
+/*
+ * InstallLibraryAlias - generate rules to create a link from one library name
+ * to another for the purposes of aliasing.
+ */
+#ifndef InstallLibraryAlias
+#define InstallLibraryAlias(libname,alias,dest) @@\
+install:: @@\
+ -(cd $(DESTDIR)dest && ( \ @@\
+ RemoveFile(LibraryTargetName(alias)); \ @@\
+ $(LN) LibraryTargetName(libname) LibraryTargetName(alias)))
+#endif /* InstallLibraryAlias */
+
+
+/*
+ * InstallLintLibrary - generate rules to install the indicated lint library.
+ */
+#ifndef InstallLintLibrary
+#define InstallLintLibrary(libname,dest) @@\
+InstallTarget(install.ln,Concat(llib-l,libname.ln),$(INSTLIBFLAGS),dest)
+#endif /* InstallLintLibrary */
+
+
+#if !CompressManPages
+/*
+ * InstallManPageLong - generate rules to install the indicated manual page,
+ * giving it an alternate name. This is used for installing man pages whose
+ * base name without the .man suffix would normally be longer than 8 characters
+ * (the limit for using source code control systems on files systems with
+ * short file names).
+ */
+#ifndef InstallManPageLong
+#define InstallManPageLong(file,destdir,dest) @@\
+BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\
+ @@\
+CppManTarget(file,$(EXTRAMANDEFS)) @@\
+ @@\
+InstallNamedTarget(install.man,file.$(MANNEWSUFFIX),$(INSTMANFLAGS),destdir,dest.$(MANSUFFIX))
+#endif /* InstallManPageLong */
+
+
+/*
+ * InstallManPageAliases - generate rules to install manual page aliases.
+ */
+#ifndef InstallManPageAliases
+#define InstallManPageAliases(file,destdir,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\
+ @@\
+install.man:: @@\
+ @(TMP="#tmp.$$$$"; \ @@\
+ RemoveFile($${TMP}); \ @@\
+ echo .so `basename destdir`/file.$(MANSUFFIX) > $${TMP}; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) $${TMP} $(DESTDIR)destdir/$$i.$(MANSUFFIX)); \ @@\
+ done; \ @@\
+ RemoveFile($${TMP}))
+#endif /* InstallManPageAliases */
+
+
+/*
+ * InstallGenManPageLong - More general rules for installing manual pages --
+ * doesn't assume MANSUFFIX.
+ */
+#ifndef InstallGenManPageLong
+#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
+BuildInstallHtmlManPage(file,dest,suffix) @@\
+ @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+install.man:: file.$(MANNEWSUFFIX) @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.$(MANNEWSUFFIX) \ @@\
+ $(DESTDIR)destdir/dest.suffix
+#endif /* InstallGenManPageLong */
+
+
+/*
+ * InstallGenManPageAliases - general equivalent of InstallManPageAliases
+ */
+#ifndef InstallGenManPageAliases
+#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,suffix) @@\
+ @@\
+install.man:: @@\
+ @(TMP="#tmp.$$$$"; \ @@\
+ RemoveFile($${TMP}); \ @@\
+ echo .so `basename destdir`/file.suffix > $${TMP}; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) $${TMP} $(DESTDIR)destdir/$$i.suffix); \ @@\
+ done; \ @@\
+ RemoveFile($${TMP}))
+#endif /* InstallGenManPageAliases */
+
+#else /* CompressManPages */
+
+#ifndef InstallManPageLong
+#define InstallManPageLong(file,destdir,dest) @@\
+BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\
+ @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+install.man:: file.$(MANNEWSUFFIX) @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ $(RM) $(DESTDIR)destdir/dest.$(MANSUFFIX)* @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.$(MANNEWSUFFIX) \ @@\
+ $(DESTDIR)destdir/dest.$(MANSUFFIX) @@\
+ -$(COMPRESSMANCMD) $(DESTDIR)destdir/dest.$(MANSUFFIX)
+#endif
+
+#ifndef InstallGenManPageLong
+#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
+BuildInstallHtmlManPage(file,dest,suffix) @@\
+ @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+install.man:: file.$(MANNEWSUFFIX) @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ $(RM) $(DESTDIR)destdir/dest.suffix* @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.$(MANNEWSUFFIX) \ @@\
+ $(DESTDIR)destdir/dest.suffix @@\
+ -$(COMPRESSMANCMD) $(DESTDIR)destdir/dest.suffix
+#endif
+
+#ifndef InstallMultipleMan
+#define InstallMultipleMan(list,dest) @@\
+install.man:: list @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (MNAME=`echo $$i | cut -f1 -d.`; \ @@\
+ set -x; \ @@\
+ $(RM) $(DESTDIR)dest/$${MNAME}*; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) $$i \ @@\
+ $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX); \ @@\
+ $(COMPRESSMANCMD) $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX)); \ @@\
+ done
+#endif
+
+/*
+ * InstallManPageAliases - install soft links for aliases.
+ */
+#ifndef InstallManPageAliasesBase
+#define InstallManPageAliasesBase(file,destdir,aliases) @@\
+install.man:: @@\
+ @(SUFFIX=`echo $(DESTDIR)destdir/file.* | sed -e 's,.*/[^\.]*.,,'`; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ $(RM) $(DESTDIR)destdir/$$i.*; \ @@\
+ (cd $(DESTDIR)destdir; $(LN) file.$${SUFFIX} \ @@\
+ $$i.$${SUFFIX})); \ @@\
+ done)
+#endif
+
+#ifndef InstallManPageAliases
+#define InstallManPageAliases(file,destdir,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\
+ @@\
+InstallManPageAliasesBase(file,destdir,aliases)
+#endif
+
+
+/*
+ * InstallGenManPageAliases - install soft links for aliases.
+ */
+#ifndef InstallGenManPageAliases
+#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,suffix) @@\
+ @@\
+InstallManPageAliasesBase(file,destdir,aliases)
+#endif
+
+#endif /* CompressManPages */
+
+
+/*
+ * InstallManPage - generate rules to install the indicated manual page.
+ */
+#ifndef InstallManPage
+#define InstallManPage(file,destdir) @@\
+InstallManPageLong(file,destdir,file)
+#endif /* InstallManPage */
+
+
+/*
+ * InstallGenManPage - general equivalent of InstallManPage
+ */
+#ifndef InstallGenManPage
+#define InstallGenManPage(file,destdir,suffix) @@\
+InstallGenManPageLong(file,destdir,file,suffix)
+#endif /* InstallGenManPage */
+
+
+/*
+ * RmanDependency - generate rules to build the rman program if
+ * this Imakefile is within the source tree.
+ */
+#ifndef RmanDependency
+#ifdef UseInstalled
+#define RmanDependency() /**/
+#else
+#define RmanDependency() @@\
+NoCmpScript(ProgramTargetName($(RMAN))) @@\
+ @@\
+ProgramTargetName($(RMAN)): @@\
+ @echo "checking $(RMANBASENAME) over in $(TOP)/config/util first..."; \ @@\
+ cd $(TOP)/config/util && $(MAKE) rmanonly; \ @@\
+ echo "okay, continuing in $(CURRENT_DIR)"
+
+#endif /* UseInstalled */
+#endif /* RmanDependency */
+
+#ifndef RmanCmdDependency
+#ifdef UseInstalled
+#define RmanCmdDependency /**/
+#else
+#define RmanCmdDependency ProgramTargetName($(RMAN))
+#endif
+#endif
+
+#ifndef BuildInstallHtmlManPage
+#if BuildHtmlManPages
+#define BuildInstallHtmlManPage(file,dest,suffix) @@\
+AllTarget(dest.suffix.html) @@\
+ @@\
+dest.suffix.html: file.$(MANNEWSUFFIX) RmanCmdDependency @@\
+ RemoveFiles(dest.suffix.html dest.suffix-html) @@\
+ RunProgram(RMAN,$(RMANOPTIONS) < file.$(MANNEWSUFFIX) \ @@\
+ > dest.suffix-html) && $(MV) dest.suffix-html $@ @@\
+ @@\
+install.man:: dest.suffix.html @@\
+ MakeDir($(DESTDIR)$(DOCHTMLDIR)) @@\
+ @(SUF=`expr suffix \: '\(.\)'`; \ @@\
+ set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) dest.suffix.html $(DESTDIR)$(DOCHTMLDIR)/dest.$$SUF.html) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(dest.suffix.html dest.suffix-html)
+#else
+#define BuildInstallHtmlManPage(file,dest,suffix) /**/
+#endif
+#endif
+
+#ifndef InstallHtmlManPageAliases
+#if BuildHtmlManPages
+#define InstallHtmlManPageAliases(file,aliases,suffix) @@\
+install.man:: file.suffix.html @@\
+ MakeDir($(DESTDIR)$(DOCHTMLDIR)) @@\
+ @SUF=`expr suffix \: '\(.\)'`; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ RemoveFile($(DESTDIR)$(DOCHTMLDIR)/$$i.$$SUF.html); \ @@\
+ (cd $(DESTDIR)$(DOCHTMLDIR); \ @@\
+ $(LN) file.$$SUF.html $$i.$$SUF.html)); \ @@\
+ done
+#else
+#define InstallHtmlManPageAliases(file,aliases,suffix) /**/
+#endif
+#endif
+
+#ifndef HtmlManIndex
+#if BuildHtmlManPages
+#define HtmlManIndex @@\
+html_index:: @@\
+ MakeDir($(DESTDIR)$(DOCHTMLDIR)) @@\
+ $(HTMLINDEXCMD) $(DESTDIR)$(DOCHTMLDIR)
+#else
+#define HtmlManIndex html_index::
+#endif
+#endif
+
+
+/*
+ * ManKeywordsTarget - generate the database used by "man -k".
+ * This rule updates the index in the directory "manpath", which
+ * indexes all the manual pages in the section subdirectories under
+ * it. An update command is defined only on systems that have a
+ * per MANPATH element index. If the OS supports only one system-wide
+ * database, we don't update it, because then we can't do cross
+ * installations or use a non-empty DESTDIR for testing.
+ */
+#ifndef ManKeywordsTarget
+#define ManKeywordsTarget(manpath) man_keywords::
+#endif
+
+/*
+ * InstallNamedNonExec - generate rules to install a data file
+ */
+#ifndef InstallNamedNonExec
+#define InstallNamedNonExec(srcname,dstname,dest) @@\
+InstallNamedTarget(install,srcname,$(INSTDATFLAGS),dest,dstname)
+#endif /* InstallNamedNonExec */
+
+
+/*
+ * InstallDriverSDKNamedNonExec - rule for installing server Driver SDK files.
+ * (only used for XFree86). This is a no-op
+ * rule so that Imakefiles on non-XFree86 systems
+ * continue to build Makefiles correctly.
+ */
+#ifndef InstallDriverSDKNamedNonExec
+#define InstallDriverSDKNamedNonExec(srcname,dstname,dest)
+#endif
+
+
+/*
+ * InstallNonExecFile - generate rules to install a data file
+ */
+#ifndef InstallNonExecFile
+#define InstallNonExecFile(file,dest) @@\
+InstallTarget(install,file,$(INSTDATFLAGS),dest)
+#endif /* InstallNonExecFile */
+
+
+/*
+ * InstallNonExecFileNoClobber - install a data file once
+ */
+#ifndef InstallNonExecFileNoClobber
+#define InstallNonExecFileNoClobber(file,dest) @@\
+InstallNamedTargetNoClobber(install,file,$(INSTDATFLAGS),dest,file)
+#endif /* InstallNonExecFileNoClobber */
+
+
+/*
+ * InstallDriverSDKNonExecFile - rule for installing server Driver SDK files.
+ * (only used for XFree86). This is a no-op
+ * rule so that Imakefiles on non-XFree86 systems
+ * continue to build Makefiles correctly.
+ */
+#ifndef InstallDriverSDKNonExecFile
+#define InstallDriverSDKNonExecFile(file,dir)
+#endif
+
+
+/*
+ * InstallNonExec - generate rules to install a data file, but does not
+ * try to create the destination directory (deprecated)
+ */
+#ifndef InstallNonExec
+#define InstallNonExec(file,dest) @@\
+install:: file @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) file $(DESTDIR)dest
+#endif /* InstallNonExec */
+
+
+/*
+ * InstallProgramWithFlags - generate rules to install an executable program
+ * using given install flags.
+ */
+#ifndef InstallProgramWithFlags
+#if StripInstalledPrograms && CrossCompiling
+#define InstallProgramWithFlags(program,dest,flags) @@\
+InstallTarget(install,ProgramTargetName(program),$(INSTPGMFLAGS) flags,dest) @@\
+ CrossStripCmd $(DESTDIR)dest/ProgramTargetName(program)
+#else
+#define InstallProgramWithFlags(program,dest,flags) @@\
+InstallTarget(install,ProgramTargetName(program),$(INSTPGMFLAGS) flags,dest)
+#endif /* StripInstalledPrograms && CrossCompiling */
+#endif /* InstallProgramWithFlags */
+
+
+/*
+ * InstallProgram - generate rules to install an executable program using any
+ * special install flags set in $(INSTALLFLAGS).
+ */
+#ifndef InstallProgram
+#define InstallProgram(program,dest) @@\
+InstallProgramWithFlags(program,dest,NullParameter)
+#endif /* InstallProgram */
+
+
+
+/*
+ * InstallScript - install a shell script.
+ */
+#ifndef InstallScript
+#define InstallScript(program,dest) @@\
+InstallNamedTarget(install,program.script,$(INSTBINFLAGS),dest,program)
+#endif /* InstallScript */
+
+
+/*
+ * InstallNamedProg - install a program with renaming and no stripping.
+ */
+#ifndef InstallNamedProg
+#define InstallNamedProg(srcname,dstname,dest) @@\
+InstallNamedTarget(install,srcname,$(INSTBINFLAGS),dest,dstname)
+#endif /* InstallNamedProg */
+
+
+/*
+ * InstallNamedProgNoClobber - Like InstallNamedProg, but doesn't
+ * do the install if an installed version already exists.
+ */
+#ifndef InstallNamedProgNoClobber
+#define InstallNamedProgNoClobber(srcname,dstname,dest) @@\
+InstallNamedTargetNoClobber(install,srcname,$(INSTBINFLAGS),dest,dstname)
+#endif /* InstallNamedProgNoClobber */
+
+
+/*
+ * InstallDriverSDKNamedProg - rule for installing server Driver SDK files.
+ * (only used for XFree86). This is a no-op
+ * rule so that Imakefiles on non-XFree86 systems
+ * continue to build Makefiles correctly.
+ */
+#ifndef InstallDriverSDKNamedProg
+#define InstallDriverSDKNamedProg(srcname,dstname,dest)
+#endif
+
+
+/*
+ * MakeFlagsToShellFlags - set variables before starting a loop.
+ * makeflags is the set of "make" flags to check.
+ * shellcmd is the shell command to execute if any of the flags are set.
+ *
+ * The usual use of this rule is to translate make's "don't quit on error"
+ * flags into the equivalent for the shell. To do this, "make -i" always
+ * becomes "set +e". "make -k" should also turn on "set +e" if the target
+ * is building subdirectories. That is, subdirectories are independent
+ * and should appear to be multiple targets, even though they are
+ * implemented in a loop in a single target.
+ */
+#ifndef MakeFlagsToShellFlags
+#define MakeFlagsToShellFlags(makeflags,shellcmd)\
+ for flag in ${MAKEFLAGS} ''; do \ @@\
+ case "$$flag" in *=*) ;; --*) ;; *[makeflags]*) shellcmd;; esac; done
+#endif
+
+/*
+ * MakeNamedTargetSubdir - do make in a subdir.
+ */
+#ifndef MakeNamedTargetSubdir
+#define MakeNamedTargetSubdir(dir,flags,subname)\
+ (cd dir && $(MAKE) $(MFLAGS) $(PARALLELMFLAGS) \ @@\
+ flags subname)
+#endif
+
+/*
+ * LinkFileList - link a list of files from one place to another
+ */
+#ifndef LinkFileList
+#define LinkFileList(step,list,dir,sub) @@\
+step:: @@\
+ @MakeFlagsToShellFlags(i,set +e); \ @@\
+ echo " cd" dir; cd dir && \ @@\
+ for i in list; do (set -x; $(LN) -f sub/$$i .); done
+#endif
+
+
+/*
+ * LinkConfDirectoryLong
+ *
+ * Make links from opath (usually <ProjectRoot>/lib/X11) to npath
+ * For example /usr/X11R6/lib/X11/xdm ==> /etc/X11/xdm so that X
+ * binaries can be mounted from a read-only volume like a CD-ROM;
+ * but files that may need to be edited can be stored locally on
+ * read-write media. If someone has an existing installation, be
+ * careful and move existing files to the new location in /etc.
+ * XXX Need to make the installation script do this when installing
+ * binary distributions.
+ *
+ * Since the link is used in the installation process, we need to
+ * make the link relative in order to honor $(DESTDIR) if it is set.
+ *
+ * Note: The sed script used here is not completely general. It assumes
+ * that no elements of the path are '..', and that none start with '.'
+ * that aren't just '.'.
+ *
+ * For a more general solution $(REVPATH) could be used. Even though
+ * it was intended for something a little different, it does do what is
+ * required here.
+ *
+ */
+#ifndef LinkConfDirectoryLong
+#if UseSeparateConfDir && HasSymLinks
+#define LinkConfDirectoryLong(mdir,cdir,rdir,ldir,opath,npath) @@\
+install:: @@\
+ @MakeFlagsToShellFlags(i,set +e); \ @@\
+ if [ -h Concat($(DESTDIR),npath/mdir) ]; then \ @@\
+ $(RM) Concat($(DESTDIR),npath/mdir); \ @@\
+ fi @@\
+ MakeDir(Concat($(DESTDIR),opath/cdir)) @@\
+ MakeDir(Concat($(DESTDIR),npath/mdir)) @@\
+ @MakeFlagsToShellFlags(i,set +e); \ @@\
+ if [ -d Concat($(DESTDIR),opath/cdir) ]; then \ @@\
+ RELPATH=`echo opath/cdir | \ @@\
+ sed -e 's:^/::' -e 's:[^/.][^/]*:..:'g -e 's:/\.$$::'`; \ @@\
+ cd Concat($(DESTDIR),opath/cdir); \ @@\
+ if [ -d rdir -a ! -h rdir ]; then \ @@\
+ (cd rdir; tar cf - . | \ @@\
+ (cd Concat($(DESTDIR),npath/mdir); \ @@\
+ tar xf -; exit 0); exit 0); \ @@\
+ fi; \ @@\
+ $(RM) -r rdir; \ @@\
+ $(LN) Concat($${RELPATH},npath/mdir) ldir; \ @@\
+ fi
+#else
+#define LinkConfDirectoryLong(mdir,cdir,rdir,ldir,opath,npath)
+#endif
+#endif
+
+#ifndef LinkConfDirectory
+#define LinkConfDirectory(mdir,cdir,rdir,ldir) LinkConfDirectoryLong(mdir,cdir,rdir,ldir,$(LIBDIR),$(CONFDIR))
+#endif
+
+#ifndef LinkVarDirectory
+#define LinkVarDirectory(mdir,cdir,rdir,ldir) LinkConfDirectoryLong(mdir,cdir,rdir,ldir,$(LIBDIR),$(VARDIR))
+#endif
+
+/*
+ * LinkConfFileLong
+ *
+ * Make links from opath (<ProjectRoot>/lib/X11) to npath
+ * For example /usr/X11R6/lib/X11/xxx ==> /etc/X11/xxx so that X binaries
+ * can be mounted from a read-only volume like a CD-ROM;
+ * but files that may need to be edited can be stored locally on
+ * read-write media. If someone has an existing installation, be
+ * careful and move existing files to the new location in /etc.
+ * XXX Need to make the installation script do this when installing
+ * binary distributions.
+ *
+ * Since the link is used in the installation process, we need to
+ * make the link relative in order to honor $(DESTDIR) if it is set.
+ */
+#ifndef LinkConfFileLong
+#if UseSeparateConfDir && HasSymLinks
+#define LinkConfFileLong(cfile,lfile,opath,npath) @@\
+install:: @@\
+ MakeDir(Concat($(DESTDIR),opath)) @@\
+ MakeDir(Concat($(DESTDIR),npath)) @@\
+ @MakeFlagsToShellFlags(i,set +e); \ @@\
+ if [ -d Concat($(DESTDIR),opath) ]; then \ @@\
+ RELPATH=`echo opath | \ @@\
+ sed -e 's:^.::' -e 's:[^/.][^/]*:..:'g`; \ @@\
+ cd Concat($(DESTDIR),opath); \ @@\
+ if [ -f lfile -a ! -h lfile ]; then \ @@\
+ cp -p lfile Concat($(DESTDIR),npath/cfile); \ @@\
+ fi; \ @@\
+ $(RM) -r lfile; \ @@\
+ $(LN) Concat($${RELPATH},npath/cfile) lfile; \ @@\
+ fi
+#else
+#define LinkConfFileLong(cfile,lfile,opath,npath)
+#endif
+#endif
+
+
+#ifndef LinkConfFile
+#define LinkConfFile(cfile,lfile) LinkConfFileLong(cfile,lfile,$(LIBDIR),$(CONFDIR))
+#endif
+
+/*
+ * InstallMultipleDestFlags - generate rules to install multiple files at
+ * once during a particular step in the build using a specific set of install
+ * flags.
+ */
+#ifndef InstallMultipleDestFlags
+#define InstallMultipleDestFlags(step,list,dest,flags) @@\
+step:: list @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @MakeFlagsToShellFlags(i,set +e); \ @@\
+ for i in list; do \ @@\
+ (set -x; $(INSTALL) $(INSTALLFLAGS) flags $$i $(DESTDIR)dest); \ @@\
+ done
+#endif /* InstallMultipleDestFlags */
+
+
+/*
+ * InstallDriverSDKMultipleDestFlags - rule for installing server Driver SDK
+ * files. (only used for XFree86). This is a no-op
+ * rule so that Imakefiles on non-XFree86 systems
+ * continue to build Makefiles correctly.
+ */
+#ifndef InstallDriverSDKMultipleDestFlags
+#define InstallDriverSDKMultipleDestFlags(list,dest,flags)
+#endif
+
+
+/*
+ * InstallMultipleDest - generate rules to install multiple files at once
+ * during a particular step in the build using any install flags set in
+ * $(INSTDATFLAGS).
+ */
+#ifndef InstallMultipleDest
+#define InstallMultipleDest(step,list,dest) @@\
+InstallMultipleDestFlags(step,list,dest,$(INSTDATFLAGS))
+#endif /* InstallMultipleDest */
+
+/*
+ * InstallMultiple - generate rules to install multiple files at once
+ * during the install step of the build using any install flags set in
+ * $(INSTALLFLAGS).
+ */
+#ifndef InstallMultiple
+#define InstallMultiple(list,dest) @@\
+InstallMultipleDest(install,list,dest)
+#endif /* InstallMultiple */
+
+
+/*
+ * InstallMultipleFlags - generate rules to install multiple files at once
+ * during the install step of the build using the given install flags.
+ */
+#ifndef InstallMultipleFlags
+#define InstallMultipleFlags(list,dest,flags) @@\
+InstallMultipleDestFlags(install,list,dest,flags)
+#endif /* InstallMultipleFlags */
+
+
+/*
+ * InstallMultipleMan - generate rules to install a variety of manual pages
+ * during the install.man step of the build.
+ */
+#ifndef InstallMultipleMan
+#define InstallMultipleMan(list,dest) @@\
+InstallMultipleDestFlags(install.man,list,dest,$(INSTMANFLAGS))
+#endif /* InstallMultipleMan */
+
+/*
+ * InstallMultipleManSuffix - generate rules to install multiple manual
+ * pages dufing the install.man step of the build, where
+ * the target files have the suffix given.
+ */
+#ifndef InstallMultipleManSuffix
+#define InstallMultipleManSuffix(list,dest,suffix) @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @MakeFlagsToShellFlags(i,set +e); \ @@\
+ for i in list; do \ @@\
+ (set -x; $(INSTALL) $(INSTALLFLAGS) $(INSTMANFLAGS) $$i.suffix $(DESTDIR)dest/$$i.$(MANSUFFIX)); \ @@\
+ done
+#endif /* InstallMultipleManSuffix */
+
+
+/*
+ * IncludeMakefile - rule to include another Makefile.
+ * Must not generate an error or even a warning if the named file
+ * is not present, since we use this to include Makefile.dep, which
+ * may not be built yet.
+ * This is defined non-null iff HasMakefileSafeInclude is YES.
+ * The double-@ is to ensure no leading spaces on the line.
+ */
+#ifndef IncludeMakefile
+#if HasClearmake
+#define IncludeMakefile(file) @@sinclude file
+#else
+#if HasBsdMake
+#define IncludeMakefile(file) @@# dependencies are in .depend
+#else
+#define IncludeMakefile(file) /**/
+#endif
+#endif
+#endif
+
+/*
+ * DependDependencyStatement - Used by DependDependency to set up the
+ * most specific dependency, which differs based on whether we support
+ * a separate Makefile.dep on this platform.
+ */
+#ifndef DependDependencyStatement
+#if HasMakefileSafeInclude
+#define DependDependencyStatement() @@\
+DependFileName:: ProgramTargetName($(DEPEND))
+#else
+#define DependDependencyStatement() @@\
+depend:: ProgramTargetName($(DEPEND))
+#endif
+#endif
+
+/*
+ * DependDependency - generate rules to build the makedepend program if
+ * this Imakefile is within the source tree.
+ */
+#ifndef DependDependency
+#ifdef UseInstalled
+#define DependDependency() /**/
+#else
+#define DependDependency() @@\
+DependDependencyStatement() @@\
+ @@\
+NoCmpScript(ProgramTargetName($(DEPEND))) @@\
+ @@\
+ProgramTargetName($(DEPEND)): @@\
+ @echo "checking $@ over in $(DEPENDSRC) first..."; \ @@\
+ cd $(DEPENDSRC) && $(MAKE) makedependonly; \ @@\
+ echo "okay, continuing in $(CURRENT_DIR)"
+
+#endif /* UseInstalled */
+#endif /* DependDependency */
+
+
+/*
+ * DependTarget - generate rules to compute dependencies for all files listed
+ * in $(SRCS).
+ */
+#ifndef DependTarget
+#if HasMakefileSafeInclude
+#define DependTarget() @@\
+DependDependency() @@\
+ @@\
+depend:: DependFileName @@\
+ @@\
+DependFileName:: @@\
+ RemoveFile($@) @@\
+ RunProgram(DEPEND,-f- $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)) > $@
+#else /* HasMakefileSafeInclude */
+#define DependTarget() @@\
+DependDependency() @@\
+ @@\
+depend:: @@\
+ RunProgram(DEPEND,$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS))
+#endif /* HasMakefileSafeInclude else */
+#endif /* DependTarget */
+
+/*
+ * DependTarget3 - generate rules to compute dependencies for all files given.
+ */
+#ifndef DependTarget3
+#if HasMakefileSafeInclude
+#define DependTarget3(srcs1,srcs2,srcs3) @@\
+DependDependency() @@\
+ @@\
+depend:: DependFileName @@\
+ @@\
+DependFileName:: @@\
+ RemoveFile($@) @@\
+ RunProgram(DEPEND,-f- $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1) > $@ @@\
+ RunProgram(DEPEND,-f- $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs2) >> $@ @@\
+ RunProgram(DEPEND,-f- $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs3) >> $@
+#else /* HasMakefileSafeInclude */
+#define DependTarget3(srcs1,srcs2,srcs3) @@\
+DependDependency() @@\
+ @@\
+depend:: @@\
+ RunProgram(DEPEND,$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1) @@\
+ RunProgram(DEPEND,-a $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs2) @@\
+ RunProgram(DEPEND,-a $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs3)
+#endif /* HasMakefileSafeInclude else */
+#endif /* DependTarget3 */
+
+
+/*
+ * CleanTarget - generate rules to remove any garbage files
+ */
+#ifndef CleanTarget
+#define CleanTarget() @@\
+clean:: @@\
+ $(RM) FilesToClean ExtraFilesToClean DocFilesToClean "#"* @@\
+ @@\
+ProofCleanTarget()
+#endif /* CleanTarget */
+
+
+/*
+ * TagsTarget - generate rules to compute tags files for C source code.
+ */
+#ifndef TagsTarget
+#define TagsTarget() @@\
+tags:: @@\
+ $(TAGS) -w *.[ch] @@\
+ $(TAGS) -xw *.[ch] > TAGS
+#endif /* TagsTarget */
+
+
+/*
+ * ImakeDependency - generate rules to compile imake if this Imakefile is
+ * within the source tree.
+ */
+#ifndef ImakeDependency
+#ifdef UseInstalled
+#define ImakeDependency(target) /**/
+#else
+#define ImakeDependency(target) @@\
+target:: ProgramTargetName($(IMAKE)) @@\
+ @@\
+NoCmpScript(ProgramTargetName($(IMAKE)) $(IMAKE).Osuf) @@\
+ @@\
+ProgramTargetName($(IMAKE)) $(IMAKE).Osuf: @@\
+ -@(cd $(IMAKESRC) && if [ -f Makefile ]; then \ @@\
+ echo "checking $@ in $(IMAKESRC) first..."; $(MAKE) imakeonly; else \ @@\
+ echo "bootstrapping $@ from Makefile.ini in $(IMAKESRC) first..."; \ @@\
+ $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; fi; \ @@\
+ echo "okay, continuing in $(CURRENT_DIR)")
+#endif /* UseInstalled */
+#endif /* ImakeDependency */
+
+
+/*
+ * BuildMakefileTarget - generate rules to build a Makefile from an Imakefile
+ * and any special imake flags. This is generally done automatically by the
+ * template or by any special Imakefiles. The first argument exists just
+ * because imakeflags is usually empty and some preprocessors will complain
+ * if an empty argument is passed as the sole argument to a macro.
+ */
+#ifndef BuildMakefileTarget
+#define BuildMakefileTarget(notused,imakeflags) @@\
+ImakeDependency(Makefile) @@\
+ @@\
+Makefile:: @@\
+ RMoveToBakFile(Makefile) @@\
+ $(IMAKE_CMD) -DTOPDIR=$(TOP) -DCURDIR=$(CURRENT_DIR) imakeflags
+
+#endif /* BuildMakefileTarget */
+
+
+/*
+ * MakefileTarget - generate rules to build a normal Makefile.
+ */
+#ifndef MakefileTarget
+#define MakefileTarget() @@\
+BuildMakefileTarget(Imakefile,NullParameter)
+#endif /* MakefileTarget */
+
+
+/*
+ * LibMkdir - helper for creating library object subdirectories
+ */
+#ifndef LibMkdir
+#define LibMkdir(dir) DirFailPrefix@if [ -d dir ]; then exit 0; else set -x; mkdir dir; fi
+#endif
+
+#ifndef LibMkdirLinkSubdirs
+#define LibMkdirLinkSubdirs(dir) DirFailPrefix@if [ -d dir ]; then \ @@\
+ exit 0; \ @@\
+ else \ @@\
+ echo "mkdir dir"; mkdir dir; \ @@\
+ for i in $(SUBDIRS); do \ @@\
+ j=`echo "$$i" | sed -e 's;[^/]\{1,\};..;g'`; \ @@\
+ if [ ! -d "dir/`dirname $$i`" ]; then \ @@\
+ $(MKDIRHIER) "dir/`dirname $$i`"; \ @@\
+ fi; \ @@\
+ echo $(LN) "$$j/$$i/dir" "dir/$$i"; \ @@\
+ $(LN) "$$j/$$i/dir" "dir/$$i"; \ @@\
+ done; \ @@\
+ fi
+#endif
+
+/*
+ * LibCleanDir - helper for cleaning library object subdirectories
+ */
+#ifndef LibCleanDir
+#define LibCleanDir(dir) -@if [ -d dir ]; then \ @@\
+ set -x; $(RM) -r dir; else exit 0; fi
+#endif
+
+/*
+ * LintLibReferences - variables for lint libraries
+ */
+#ifndef LintLibReferences
+#define LintLibReferences(varname,libname,libsource) @@\
+Concat(LINT,varname) = _UseCat($(LINTLIBDIR)/llib-l,libsource/llib-,libname.ln)
+#endif
+
+
+/*
+ * UnsharedLibReferences - variables for unshared libraries
+ */
+#ifndef UnsharedLibReferences
+#define UnsharedLibReferences(varname,libname,libsource) @@\
+ProjectUnsharedLibReferences(varname,libname,libsource,$(BUILDLIBDIR))
+#endif
+
+/*
+ * ProjectUnsharedLibReferences - variables for unshared libraries
+ */
+#ifndef ProjectUnsharedLibReferences
+#define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\
+Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,buildlibdir/,LibraryTargetName(libname)) @@\
+Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\
+LintLibReferences(varname,libname,libsource)
+#endif
+
+ /*
+ * ProjectUnsharedFontLibReferences - unshared font libraries
+ */
+#ifndef ProjectUnsharedFontLibReferences
+#define ProjectUnsharedFontLibReferences() @@\
+DEPFONTLIB = _UseCat($(USRLIBDIR)/,XBuildLibDir/,LibraryTargetName(Xfont)) @@\
+FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\
+LintLibReferences(XFONT,Xfont,$(FONTLIBSRC))
+#endif
+
+/*
+ * SharedLibDependencies - shared library dependencies
+ */
+#ifndef SharedLibDependencies
+#define SharedLibDependencies(libname,libsource,revname) /**/
+#endif
+
+/*
+ * SharedFontLibReferences - shared font libraries
+ */
+#ifndef SharedFontLibReferences
+#define SharedFontLibReferences() @@\
+SOFONTREV = SharedFontRev @@\
+DEPFONTLIB = SharedLibDependencies(Xfont,$(FONTLIBSRC),SOFONTREV) @@\
+FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\
+LintLibReferences(XFONT,Xfont,$(FONTLIBSRC))
+#endif
+
+/*
+ * SharedDSLibDependencies - shared library dependencies with data separation
+ */
+#ifndef SharedDSLibDependencies
+#define SharedDSLibDependencies(libname,libsource,revname) /**/
+#endif
+
+/*
+ * SharedLibReferences - variables for shared libraries
+ */
+#ifndef SharedLibReferences
+#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
+revname = rev @@\
+Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
+Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\
+LintLibReferences(varname,libname,libsource)
+#endif
+
+/*
+ * SharedDSLibReferences - variables for shared libraries with data separation
+ */
+#ifndef SharedDSLibReferences
+#define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\
+revname = rev @@\
+Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\
+Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\
+LintLibReferences(varname,libname,libsource)
+#endif
+
+/*
+ * CPPOnlyCompile - run C compiler's preprocessor only
+ */
+#ifndef CPPOnlyCompile
+#define CPPOnlyCompile(src,options) RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(CC) -E $(CFLAGS) options src > $@
+#endif
+
+/*
+ * ObjectCompile - compile fragment for a normal object file
+ */
+#ifndef ObjectCompile
+#define ObjectCompile(options) RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(CC) -c $(CFLAGS) options $*.c
+#endif
+
+/*
+ * CompileCToAsm - compile C file to assembler
+ */
+#ifndef CompileCToAsm
+#define CompileCToAsm(options) RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(CC) -S $(CFLAGS) options $*.c
+#endif
+
+
+/*
+ * CompileCplusplusToAsm - compile C++ file to assembler
+ */
+#ifndef CompileCplusplusToAsm
+#define CompileCplusplusToAsm(options) RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(CC) -S $(CFLAGS) options $*.cc
+#endif
+
+
+#ifndef ObjectCplusplusCompile
+#define ObjectCplusplusCompile(options) RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(CXX) -c $(CXXFLAGS) options $*.CCsuf
+#endif
+
+/*
+ * NormalLibObjCompile - compile fragment for a normal library object file
+ */
+#ifndef NormalLibObjCompile
+#define NormalLibObjCompile(options) ObjectCompile(options)
+#endif
+
+#ifndef NormalRelocLibObjCompile
+# if !StaticNeedsPicForShared
+# define NormalRelocLibObjCompile(options) NormalLibObjCompile(options)
+# else
+# define NormalRelocLibObjCompile(options) NormalLibObjCompile(options $(PICFLAGS))
+# endif
+#endif
+
+#ifndef NormalLibObjCplusplusCompile
+#define NormalLibObjCplusplusCompile(options) ObjectCplusplusCompile(options)
+#endif
+
+/*
+ * NormalSharedLibObjCompile - compile fragment for shared objects
+ */
+#ifndef NormalSharedLibObjCompile
+#define NormalSharedLibObjCompile(options) NormalLibObjCompile(options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS))
+#endif
+
+#ifndef NormalSharedLibObjCplusplusCompile
+#define NormalSharedLibObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options $(SHLIBDEF) $(SHAREDCODEDEF) $(CXXPICFLAGS))
+#endif
+
+/*
+ * LibObjCompile - compile fragment for unshared/profiled/debugged objects
+ */
+#ifndef LibObjCompile
+#if HasGcc || HasGcc2
+#define LibObjCompile(dir,options) RemoveFiles($@ dir/$@) @@\
+ ClearmakeOSName \
+ $(CC) -c $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) \
+ options $*.c -o dir/$@
+#else
+#define LibObjCompile(dir,options) RemoveFiles($@ dir/$@) @@\
+ ClearmakeOSName \
+ $(CC) -c $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES) \
+ options $*.c @@\
+ $(MV) $@ dir/$@
+#endif
+#endif
+
+#ifndef LibObjCplusplusCompile
+#if HasGcc || HasGcc2
+#define LibObjCplusplusCompile(dir,options) RemoveFiles($@ dir/$@) @@\
+ ClearmakeOSName \
+ $(CXX) -c $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) \
+ options $*.CCsuf -o dir/$@
+#else
+#define LibObjCplusplusCompile(dir,options) RemoveFiles($@ dir/$@) @@\
+ ClearmakeOSName \
+ $(CXX) -c $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES) \
+ options $*.CCsuf @@\
+ $(MV) $@ dir/$@
+#endif
+#endif
+
+/*
+ * DebuggedLibObjCompile - compile fragment for debugged objects
+ */
+#ifndef DebuggedLibObjCompile
+#define DebuggedLibObjCompile(options) LibObjCompile(debugger,DebuggableCDebugFlags options)
+#endif
+
+#ifndef DebuggedLibObjCplusplusCompile
+#define DebuggedLibObjCplusplusCompile(options) LibObjCplusplusCompile(debugger,DebuggableCplusplusDebugFlags options)
+#endif
+
+/*
+ * ProfiledLibObjCompile - compile fragment for profiled objects
+ */
+#ifndef ProfiledLibObjCompile
+#define ProfiledLibObjCompile(options) LibObjCompile(profiled,ProfiledCDebugFlags options)
+#endif
+
+#ifndef ProfiledLibObjCplusplusCompile
+#define ProfiledLibObjCplusplusCompile(options) LibObjCplusplusCompile(profiled,ProfiledCplusplusDebugFlags options)
+#endif
+
+/*
+ * UnsharedLibObjCompile - compile fragment for unshared objects
+ */
+#ifndef UnsharedLibObjCompile
+#define UnsharedLibObjCompile(options) LibObjCompile(unshared,$(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) options)
+#endif
+
+#ifndef UnsharedLibObjCplusplusCompile
+#define UnsharedLibObjCplusplusCompile(options) LibObjCplusplusCompile(unshared,$(CXXDEBUGFLAGS) $(CXXLIBDEBUGFLAGS) options)
+#endif
+
+/*
+ * SharedLibObjCompile - compile fragment for shared objects
+ */
+#ifndef SharedLibObjCompile
+#define SharedLibObjCompile(options) LibObjCompile(shared,options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $(CDEBUGFLAGS) $(CLIBDEBUGFLAGS))
+#endif
+
+/*
+ * NormalLibraryObjectRule - for simple libraries
+ */
+#ifndef NormalLibraryObjectRule
+#define NormalLibraryObjectRule() @@\
+.c.Osuf: @@\
+ NormalLibObjCompile($(_NOOP_))
+#endif /* NormalLibraryObjectRule */
+
+#ifndef NormalCplusplusObjectRule
+#define NormalCplusplusObjectRule() @@\
+.CCsuf.Osuf: @@\
+ NormalLibObjCplusplusCompile($(_NOOP_))
+#endif
+
+#ifndef NormalFortranObjectRule
+#define NormalFortranObjectRule() @@\
+.f.Osuf: @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(FC) -c $(FCFLAGS) $*.f
+#endif
+
+/*
+ * SpecialObjectRule - generate rules to compile a file with special flags.
+ */
+#ifndef SpecialObjectRule
+#define SpecialObjectRule(objs,depends,options) @@\
+objs: depends @@\
+ ObjectCompile(options)
+#endif /* SpecialObjectRule */
+
+#ifndef SpecialCplusplusObjectRule
+#define SpecialCplusplusObjectRule(baseobj,basedep,options) @@\
+baseobj.Osuf: basedep.CCsuf @@\
+ ObjectCplusplusCompile(options)
+#endif /* SpecialCplusplusObjectRule */
+
+/*
+ * SpecialCObjectRule - generate rules to compile a C file with special flags.
+ * also handles CodeCenter rules
+ */
+#ifndef SpecialCObjectRule
+#define SpecialCObjectRule(basename,depends,options) @@\
+SpecialObjectRule(basename.Osuf,basename.c depends,options) @@\
+ @@\
+basename.i: basename.c depends @@\
+ CPPOnlyCompile(basename.c,options) @@\
+ @@\
+basename.s: basename.c depends @@\
+ CompileCToAsm(options) @@\
+ @@\
+CenterLoadTarget(debug_src,basename.c,NullParameter,$(ALLDEFINES) options)
+#endif /* SpecialCObjectRule */
+
+
+#ifndef ObjectFromSpecialSource
+#define ObjectFromSpecialSource(dst,src,flags) @@\
+NoConfigRec(dst.c) @@\
+ @@\
+dst.c: src.c @@\
+ RemoveFile($@) @@\
+ $(LN) $? $@ @@\
+ @@\
+SpecialCObjectRule(dst,NullParameter,flags) @@\
+ @@\
+includes:: dst.c @@\
+ @@\
+depend:: dst.c @@\
+ @@\
+clean:: @@\
+ RemoveFile(dst.c)
+#endif /* ObjectFromSpecialSource */
+
+#ifndef CPPOnlyAsm
+#define CPPOnlyAsm(basename,options) RemoveFile(basename.i) @@\
+ $(CPP) AsmDefines $(DEFINES) $(INCLUDES) options basename.S | \ @@\
+ grep -v '^\#' > basename.i
+#endif
+
+#ifndef AssembleObject
+#define AssembleObject(basename,flags) CPPOnlyAsm(basename,flags) @@\
+ RemoveFile(basename.o) @@\
+ $(AS) -o basename.o basename.i @@\
+ RemoveFile(basename.i)
+#endif
+
+#ifndef NormalAsmObjectRule
+#define NormalAsmObjectRule() @@\
+.S.o: @@\
+ AssembleObject($*,$(_NOOP_)) @@\
+ @@\
+.S.i: @@\
+ CPPOnlyAsm($*,$(_NOOP_))
+#endif
+
+#ifndef ObjectFromSpecialAsmSource
+#define ObjectFromSpecialAsmSource(dst,src,flags) @@\
+dst.S: src.S @@\
+ RemoveFile($@) @@\
+ $(LN) $? $@ @@\
+ @@\
+dst.o: dst.S @@\
+ AssembleObject(dst,flags) @@\
+ @@\
+dst.i: dst.S @@\
+ CPPOnlyAsm(dst,flags) @@\
+ @@\
+depend:: dst.S @@\
+ @@\
+clean:: @@\
+ RemoveFile(dst.S)
+#endif
+
+#ifndef ObjectFromAsmSource
+#define ObjectFromAsmSource(src,flags) @@\
+ @@\
+src.o: src.S @@\
+ AssembleObject(src,flags) @@\
+ @@\
+src.i: src.S @@\
+ CPPOnlyAsm(src,flags) @@\
+ @@\
+depend:: src.S
+#endif
+
+#ifndef SwitchYYPrefix
+#define SwitchYYPrefix(in,out,prefix) \
+ sed 's/yy/prefix/g' in | sed 's/__REALLY_YY__/yy/' > out && RemoveFile(in)
+#endif
+
+#ifndef LexFilePrefix
+#define LexFilePrefix(file,prefix) @@\
+file.c: file.l @@\
+ ClearmakeOSName \
+ $(LEX) $(LFLAGS) file.l @@\
+ SwitchYYPrefix(lex.yy.c,file.c,prefix) @@\
+ @@\
+depend:: file.c @@\
+ @@\
+clean:: @@\
+ RemoveFiles(lex.yy.c file.c)
+#endif
+
+#ifndef LexFileExplicit
+#if HasClearmake /* provide a place to hang ClearmakeOSName */
+#define LexFileExplicit(file) @@\
+file.c: file.l @@\
+ ClearmakeOSName \
+ $(LEX) $(LFLAGS) file.l @@\
+ $(MV) lex.yy.c file.c
+#else
+#define LexFileExplicit(file) /* the default rule is fine */
+#endif
+#endif
+
+#ifndef LexFile
+#define LexFile(file) @@\
+LexFileExplicit(file) @@\
+ @@\
+depend:: file.c @@\
+ @@\
+clean:: @@\
+ RemoveFiles(lex.yy.c file.c)
+#endif /* LexFile */
+
+
+#ifndef M4File
+#define M4File(file,includes) @@\
+file: file.m4 includes @@\
+ RemoveFile(file) @@\
+ $(M4) $(M4FLAGS) file.m4 >file @@\
+ @@\
+depend:: file @@\
+ @@\
+clean:: @@\
+ RemoveFile(file)
+#endif /* M4File */
+
+#ifndef YaccFilePrefix
+#if HasGnuMake
+#define YaccFilePrefix(file,flags,prefix) @@\
+depend:: file.c @@\
+ @@\
+file.h: file.c @@\
+ @@\
+file.c: file.y @@\
+ ClearmakeOSName \
+ $(YACC) flags file.y @@\
+ SwitchYYPrefix(y.tab.c,file.c,prefix) @@\
+ @if [ -f y.tab.h ]; then set -x; SwitchYYPrefix(y.tab.h,file.h,prefix); \@@\
+ else exit 0; fi @@\
+ @@\
+clean:: @@\
+ RemoveFiles(y.tab.c y.tab.h file.h file.c)
+#else
+#define YaccFilePrefix(file,flags,prefix) @@\
+depend:: file.c @@\
+ @@\
+file.h file.c: file.y @@\
+ ClearmakeOSName \
+ $(YACC) flags file.y @@\
+ SwitchYYPrefix(y.tab.c,file.c,prefix) @@\
+ @if [ -f y.tab.h ]; then set -x; SwitchYYPrefix(y.tab.h,file.h,prefix); \ @@\
+ else exit 0; fi @@\
+ @@\
+clean:: @@\
+ RemoveFiles(y.tab.c y.tab.h file.h file.c)
+#endif
+#endif /* YaccFile */
+
+#ifndef YaccFile
+#if HasGnuMake
+#define YaccFile(file,flags) @@\
+depend:: file.c @@\
+ @@\
+file.h: file.c @@\
+ @@\
+file.c: file.y @@\
+ ClearmakeOSName \
+ $(YACC) flags file.y @@\
+ $(MV) y.tab.c file.c @@\
+ @if [ -f y.tab.h ]; then set -x; $(MV) y.tab.h file.h; \ @@\
+ else exit 0; fi @@\
+ @@\
+clean:: @@\
+ RemoveFiles(y.tab.c y.tab.h file.h file.c)
+#else
+#define YaccFile(file,flags) @@\
+depend:: file.c @@\
+ @@\
+file.h file.c: file.y @@\
+ ClearmakeOSName \
+ $(YACC) flags file.y @@\
+ $(MV) y.tab.c file.c @@\
+ @if [ -f y.tab.h ]; then set -x; $(MV) y.tab.h file.h; \ @@\
+ else exit 0; fi @@\
+ @@\
+clean:: @@\
+ RemoveFiles(y.tab.c y.tab.h file.h file.c)
+#endif
+#endif /* YaccFile */
+
+#ifndef YaccFileNoFlags
+#define YaccFileNoFlags(file) @@\
+depend:: file.c @@\
+ @@\
+file.c: file.y @@\
+ ClearmakeOSName \
+ $(YACC) file.y @@\
+ $(MV) y.tab.c file.c @@\
+ @@\
+clean:: @@\
+ RemoveFiles(y.tab.c file.c)
+#endif /* YaccFileNoFlags */
+
+
+#ifndef MakeLibrary
+#define MakeLibrary(libname,objlist) $(AR) libname objlist
+#endif
+
+#ifndef LinkBuildLibrary
+#ifdef UseInstalled
+#define LinkBuildLibrary(lib) $(_NULLCMD_)
+#else
+#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\
+ RemoveFile($(BUILDLIBDIR)/lib) @@\
+ cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .
+#endif
+#endif /* LinkBuildLibrary */
+
+#ifndef LinkBuildLibraryMaybe
+#ifdef UseInstalled
+#define LinkBuildLibraryMaybe(lib,doit) $(_NULLCMD_)
+#else
+#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\
+ @if doit; then (set -x; \ @@\
+ RemoveFile($(BUILDLIBDIR)/lib); \ @@\
+ cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi
+#endif
+#endif /* LinkBuildLibraryMaybe */
+
+#ifndef _LinkBuildLibrary /* will get redefined elsewhere */
+#define _LinkBuildLibrary(lib) $(_NULLCMD_)
+#endif /* _LinkBuildLibrary */
+
+#ifndef LinkBuildSonameLibrary
+#ifdef UseInstalled
+#define LinkBuildSonameLibrary(lib) true
+#else
+#define LinkBuildSonameLibrary(lib) MakeDirInline($(BUILDLIBDIR));\ @@\
+ (set -x; RemoveFile($(BUILDLIBDIR)/lib);\ @@\
+ (cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .))
+#endif
+#endif /* LinkBuildSonameLibrary */
+
+#ifndef LinkBuildLibraryInline
+#define LinkBuildLibraryInline(lib) LinkBuildSonameLibrary(lib)
+#endif /* LinkBuildLibraryInline */
+
+/*
+ * NormalLibraryTarget - generate rules to create a library.
+ */
+#ifndef NormalLibraryTarget
+#define NormalLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+LibraryTargetName(libname): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,objlist) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@)
+#endif /* NormalLibraryTarget */
+
+
+/*
+ * NormalLibraryTarget2 - generate rules to create a library in two steps.
+ * This is used to create libraries with large numbers of files.
+ */
+#ifndef NormalLibraryTarget2
+#define NormalLibraryTarget2(libname,objlist1,objlist2) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+LibraryTargetName(libname): objlist1 objlist2 $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,objlist1) @@\
+ MakeLibrary($@,objlist2) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@)
+#endif /* NormalLibraryTarget2 */
+
+
+/*
+ * NormalLibraryTarget3 - generate rules to create a library in three steps.
+ * This is used to create libraries with very large numbers of files.
+ */
+#ifndef NormalLibraryTarget3
+#define NormalLibraryTarget3(libname,objlist1,objlist2,objlist3) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+LibraryTargetName(libname): objlist1 objlist2 objlist3 $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,objlist1) @@\
+ MakeLibrary($@,objlist2) @@\
+ MakeLibrary($@,objlist3) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@)
+#endif /* NormalLibraryTarget3 */
+
+
+/*
+ * NormalDepLibraryTarget - generate rules to create a library.
+ */
+#ifndef NormalDepLibraryTarget
+#define NormalDepLibraryTarget(libname,deplist,objlist) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+LibraryTargetName(libname): deplist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,objlist) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@)
+#endif /* NormalDepLibraryTarget */
+
+
+/*
+ * UnsharedLibraryTarget - generate rules to create a library.
+ */
+#ifndef UnsharedLibraryTarget
+#define UnsharedLibraryTarget(libname,objlist,down,up) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+LibraryTargetName(libname): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ @(set -x; cd down && MakeLibrary(up/$@,objlist)) || exit 1; @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@)
+#endif /* UnsharedLibraryTarget */
+
+
+/*
+ * UnsharedLibraryTarget3 - generate rules to create a library in three steps.
+ * This is used to create libraries with very large numbers of files.
+ */
+#ifndef UnsharedLibraryTarget3
+#define UnsharedLibraryTarget3(libname,objlist1,objlist2,objlist3,down,up) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+LibraryTargetName(libname): objlist1 objlist2 objlist3 $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ (cd down && MakeLibrary(up/$@,objlist1)) @@\
+ (cd down && MakeLibrary(up/$@,objlist2)) @@\
+ (cd down && MakeLibrary(up/$@,objlist3)) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@)
+#endif /* UnsharedLibraryTarget3 */
+
+
+/*
+ * SubdirLibraryRule -
+ */
+#ifndef SubdirLibraryRule
+#define SubdirLibraryRule(objlist) @@\
+all:: DONE @@\
+ @@\
+DONE: objlist @@\
+ RemoveFile($@) @@\
+ touch $@ @@\
+ @@\
+clean:: @@\
+ RemoveFile(DONE)
+#endif /* SubdirLibraryRule */
+
+
+/*
+ * ProfiledLibraryTarget - generate rules to create a profiled library.
+ */
+#ifndef ProfiledLibraryTarget
+#define ProfiledLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_p)) @@\
+ @@\
+LibraryTargetNameSuffix(libname,_p): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ cd profiled && MakeLibrary(../$@,objlist) @@\
+ RanLibrary($@)
+
+#endif /* ProfiledLibraryTarget */
+
+
+/*
+ * ProfiledDepLibraryTarget - generate rules to create a profiled library.
+ */
+#ifndef ProfiledDepLibraryTarget
+#define ProfiledDepLibraryTarget(libname,deplist,objlist) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_p)) @@\
+ @@\
+LibraryTargetNameSuffix(libname,_p): deplist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,objlist) @@\
+ RanLibrary($@)
+
+#endif /* ProfiledDepLibraryTarget */
+
+
+/*
+ * DebuggedLibraryTarget - generate rules to create a debuggable library.
+ */
+#ifndef DebuggedLibraryTarget
+#define DebuggedLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_d)) @@\
+ @@\
+LibraryTargetNameSuffix(libname,_d): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ cd debugger && MakeLibrary(../$@,objlist) @@\
+ RanLibrary($@)
+
+#endif /* DebuggedLibraryTarget */
+
+
+/*
+ * DebuggedDepLibraryTarget - generate rules to create a debuggable library.
+ */
+#ifndef DebuggedDepLibraryTarget
+#define DebuggedDepLibraryTarget(libname,deplist,objlist) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_d)) @@\
+ @@\
+LibraryTargetNameSuffix(libname,_d): deplist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,objlist) @@\
+ RanLibrary($@)
+
+#endif /* DebuggedDepLibraryTarget */
+
+
+/*
+ * AliasedLibraryTarget - generate rules to link one library to another.
+ */
+#ifndef AliasedLibraryTarget
+#define AliasedLibraryTarget(libname,alias) @@\
+AllTarget(LibraryTargetName(alias)) @@\
+ @@\
+LibraryTargetName(alias): LibraryTargetName(libname) @@\
+ RemoveFile($@) @@\
+ $(LN) LibraryTargetName(libname) $@ @@\
+ @@\
+clean:: @@\
+ RemoveFile(LibraryTargetName(alias))
+#endif /* AliasedLibraryTarget */
+
+
+/*
+ * NormalRelocatableTarget - generate rules to produce a relocatable object
+ * file instead of a library.
+ */
+#ifndef NormalRelocatableTarget
+#define NormalRelocatableTarget(objname,objlist) @@\
+AllTarget(objname.Osuf) @@\
+ @@\
+objname.Osuf: objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(LD) $(LDCOMBINEFLAGS) objlist -o $@
+#endif /* NormalRelocatableTarget */
+
+
+/*
+ * NormalDepRelocatableTarget - generate rules to produce a relocatable object
+ * file instead of a library.
+ */
+#ifndef NormalDepRelocatableTarget
+#define NormalDepRelocatableTarget(objname,deplist,objlist) @@\
+AllTarget(objname.Osuf) @@\
+ @@\
+objname.Osuf: deplist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(LD) $(LDCOMBINEFLAGS) objlist -o $@
+#endif /* NormalDepRelocatableTarget */
+
+
+/*
+ * ProfiledRelocatableTarget - generate rules to produce a profiled relocatable
+ * object file instead of a library.
+ */
+#ifndef ProfiledRelocatableTarget
+#define ProfiledRelocatableTarget(objname,objlist) @@\
+AllTarget(Concat(objname,_p.Osuf)) @@\
+ @@\
+Concat(objname,_p.Osuf): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(LD) -X -r objlist -o $@
+
+#endif /* ProfiledRelocatableTarget */
+
+
+/*
+ * DebuggedRelocatableTarget - generate rules to produce a debuggable
+ * relocatable object file instead of a library.
+ */
+#ifndef DebuggedRelocatableTarget
+#define DebuggedRelocatableTarget(objname,objlist) @@\
+AllTarget(Concat(objname,_d.Osuf)) @@\
+ @@\
+Concat(objname,_d.Osuf): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(LD) -X -r objlist -o $@
+
+#endif /* DebuggedRelocatableTarget */
+
+
+/*
+ * LintLibraryTarget - generate rules to create a lint library. Note that the
+ * lint library is always forced to be newer than the library itself.
+ */
+#ifndef LintLibraryTarget
+#define LintLibraryTarget(libname,srclist) @@\
+lintlib:: Concat(llib-l,libname.ln) @@\
+ @@\
+Concat(llib-l,libname.ln): srclist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(LINT) Concat($(LINTLIBFLAG),libname) $(LINTFLAGS) srclist
+#endif /* LintLibraryTarget */
+
+
+/*
+ * NormalLintTarget - generate rules to lint a set of sources.
+ */
+#ifndef NormalLintTarget
+#define NormalLintTarget(srclist) @@\
+lint: @@\
+ $(LINT) $(LINTFLAGS) srclist $(LINTLIBS) @@\
+lint1: @@\
+ $(LINT) $(LINTFLAGS) $(FILE) $(LINTLIBS)
+#endif /* NormalLintTarget */
+
+
+/*
+ * LintTarget - generate rules to lint $(SRCS)
+ */
+#ifndef LintTarget
+#define LintTarget() @@\
+NormalLintTarget($(SRCS))
+#endif
+
+
+/*
+ * LinkSourceFile - snag source file from some other directory
+ */
+#ifndef LinkSourceFile
+#define LinkSourceFile(src,dir) @@\
+src: dir/src @@\
+ RemoveFile($@) @@\
+ $(LN) $? $@ @@\
+ @@\
+NoConfigRec(src) @@\
+ @@\
+includes:: src @@\
+ @@\
+depend:: src @@\
+ @@\
+clean:: @@\
+ RemoveFile(src)
+#endif
+
+
+/*
+ * LinkFile - link a file
+ */
+#ifndef LinkFile
+#define LinkFile(tofile,fromfile) @@\
+tofile:: fromfile @@\
+ RemoveFile($@) @@\
+ $(LN) $? $@ @@\
+ @@\
+NoConfigRec(tofile) @@\
+ @@\
+includes:: tofile @@\
+ @@\
+depend:: tofile @@\
+ @@\
+clean:: @@\
+ RemoveFile(tofile)
+#endif
+
+
+#ifndef MakeSubincludesForBuild
+#define MakeSubincludesForBuild(step,dir,srclist) @@\
+step:: dir srclist @@\
+ @-(list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\
+ set -x; cd dir && RemoveFiles($$list)) @@\
+ @for i in srclist; do \ @@\
+ (set -x; cd dir && $(LN) ../$$i .); \ @@\
+ done @@\
+ @@\
+dir:: @@\
+ $(MKDIRHIER) dir @@\
+ @@\
+clean:: @@\
+ @-(if [ -d dir ]; then \ @@\
+ list=`echo srclist | sed -e 's/[^ ]*\///g'`; \ @@\
+ set -x; cd dir && RemoveFile($$list); else exit 0; fi)
+#endif
+
+
+/*
+ * LangNamedTargetSubdirs - recursively make a series of steps
+ */
+#ifndef LangNamedTargetSubdirs
+#define LangNamedTargetSubdirs(lang,name,dirs,verb,flags,subname) @@\
+name:: @@\
+ @MakeFlagsToShellFlags(ik,set +e); \ @@\
+ for i in dirs ;\ @@\
+ do \ @@\
+ echo verb "in $(CURRENT_DIR)/$$i..."; \ @@\
+ (cd $$i && LANG=lang $(MAKE) $(MFLAGS) flags subname);\ @@\
+ done
+#endif
+
+
+/*
+ * NamedMakeSubdirs - generate rules to do makes in the given subdirectories.
+ * If you want CDEBUGFLAGS passed along to subdirectories, provide a line like
+ * the following in the appropriate Imakefile
+ *
+ * #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
+ */
+#ifndef LangNamedMakeSubdirs
+#define LangNamedMakeSubdirs(lang,name,dirs) \
+LangNamedTargetSubdirs(lang,name,dirs,"making" name,PassCDebugFlags,all)
+#endif /* LangNamedMakeSubdirs */
+
+#ifndef LangMakeSubdirs
+#define LangMakeSubdirs(lang,dirs) @@\
+LangNamedMakeSubdirs(lang,all,dirs)
+#endif /* LangMakeSubdirs */
+
+
+
+/*
+ * NamedTargetSubdirs - recursively make a series of steps
+ */
+#ifndef NamedTargetSubdirs
+#define NamedTargetSubdirs(name,dirs,verb,flags,subname) @@\
+name:: @@\
+ @MakeFlagsToShellFlags(ik,set +e); \ @@\
+ for i in dirs ;\ @@\
+ do \ @@\
+ echo verb "in $(CURRENT_DIR)/$$i..."; \ @@\
+ MakeNamedTargetSubdir($$i,flags,subname); \ @@\
+ done
+#endif
+
+
+/*
+ * NamedMakeSubdirs - generate rules to do makes in the given subdirectories.
+ * If you want CDEBUGFLAGS passed along to subdirectories, provide a line like
+ * the following in the appropriate Imakefile
+ *
+ * #define PassCDebugFlags 'CDEBUGFLAGS=$(CDEBUGFLAGS)'
+ */
+#ifndef NamedMakeSubdirs
+#define NamedMakeSubdirs(name,dirs) \
+NamedTargetSubdirs(name,dirs,"making" name,PassCDebugFlags,all)
+#endif /* NamedMakeSubdirs */
+
+#ifndef MakeSubdirs
+#define MakeSubdirs(dirs) @@\
+NamedMakeSubdirs(all,dirs)
+#endif /* MakeSubdirs */
+
+
+/*
+ * DependSubdirs - generate rules to recursively compute dependencies as
+ * part of the make depend step.
+ */
+#ifndef DependSubdirs
+#define DependSubdirs(dirs) \
+NamedTargetSubdirs(depend,dirs,"depending",NullParameter,depend)
+#endif /* DependSubdirs */
+
+
+/*
+ * ForceSubdirs - force make to build subdirectories
+ */
+#ifndef ForceSubdirs
+#if !HasBsdMake
+#define ForceSubdirs(dirs) @@\
+dirs: FRC @@\
+ @echo "making all in $(CURRENT_DIR)/$@..." @@\
+ @MakeNamedTargetSubdir($@,PassCDebugFlags,all) @@\
+ @@\
+FRC:
+#else
+/* For BSD 4.4 make */
+#define ForceSubdirs(dirs) @@\
+dirs: .EXEC @@\
+ @cd $@ ; echo "making all in $(CURRENT_DIR)/$@..."; \ @@\
+ $(MAKE) $(MFLAGS) PassCDebugFlags all @@\
+ @@\
+.EXEC:
+#endif
+
+#endif /* ForceSubdirs */
+
+/*
+ * InstallSubdirs - generate rules to recursively install programs and files.
+ */
+#ifndef InstallSubdirs
+#define InstallSubdirs(dirs) \
+NamedTargetSubdirs(install,dirs,"installing",DESTDIR=$(DESTDIR),install)
+#endif /* InstallSubdirs */
+
+
+/*
+ * InstallManSubdirs - generate rules to recursively install manual pages.
+ */
+#ifndef InstallManSubdirs
+#define InstallManSubdirs(dirs) \
+NamedTargetSubdirs(install.man,dirs,"installing man pages",DESTDIR=$(DESTDIR),install.man)
+#endif /* InstallManSubdirs */
+
+
+/*
+ * IncludesSubdirs - generate rules to recursively put include files in build
+ */
+#ifndef IncludesSubdirs
+#define IncludesSubdirs(dirs) \
+NamedTargetSubdirs(includes,dirs,including,NullParameter,includes)
+#endif
+
+
+/*
+ * InstallDriverSDKSubdirs - generate rules to recursively install Driver
+ * SDK (only used for XFree86). This is a no-op
+ * rule so that Imakefiles on non-XFree86 systems
+ * continue to build Makefiles correctly.
+ */
+#ifndef InstallDriverSDKSubdirs
+#define InstallDriverSDKSubdirs(dirs)
+#endif
+
+/*
+ * InstallDriverSDKObjectModule - generate rules to recursively install Driver
+ * SDK (only used for XFree86). This is a no-op
+ * rule so that Imakefiles on non-XFree86 systems
+ * continue to build Makefiles correctly.
+ */
+#ifndef InstallDriverSDKObjectModule
+#define InstallDriverSDKObjectModule(module,dest,subdir)
+#endif
+#ifndef InstallDriverSDKObjectSubModule
+#define InstallDriverSDKObjectSubModule(module,dest,subdir)
+#endif
+
+
+
+/*
+ * CleanSubdirs - generate rules to recursively clean out garbage files.
+ */
+#define BootstrapCleanSubdirs /**/ /* used at top-level */
+#ifndef NamedCleanSubdirs
+#define NamedCleanSubdirs(name,dirs) \
+NamedTargetSubdirs(name,dirs,"cleaning",BootstrapCleanSubdirs,clean)
+#endif /* NamedCleanSubdirs */
+
+#ifndef CleanSubdirs
+#define CleanSubdirs(dirs) \
+NamedCleanSubdirs(clean,dirs)
+#endif
+
+
+/*
+ * TagSubdirs - generate rules to recursively create tags files.
+ */
+#ifndef NamedTagSubdirs
+#define NamedTagSubdirs(name,dirs) \
+NamedTargetSubdirs(name,dirs,"tagging",TAGS='$(TAGS)',tags)
+#endif /* TagSubdirs */
+
+#ifndef TagSubdirs
+#define TagSubdirs(dirs) \
+NamedTagSubdirs(tags,dirs)
+#endif
+
+/*
+ * MakeLintSubdirs - generate rules to recursively lint directories as part
+ * of the named step.
+ */
+#ifndef MakeLintSubdirs
+#define MakeLintSubdirs(dirs,target,subtarget) \
+NamedTargetSubdirs(target,dirs,"linting" for target and subtarget,DESTDIR=$(DESTDIR) LINTOPTS='$(LINTOPTS)',subtarget)
+#endif /* MakeLintSubdirs */
+
+
+/*
+ * LintSubdirs - generate rules to recursively lint directories as part of
+ * the make lint step.
+ */
+#ifndef LintSubdirs
+#define LintSubdirs(dirs) @@\
+MakeLintSubdirs(dirs,lint,lint)
+#endif /* LintSubdirs */
+
+
+/*
+ * MakeLintLibSubdirs - generate rules to recursively create lint libraries.
+ */
+#ifndef MakeLintLibSubdirs
+#define MakeLintLibSubdirs(dirs) @@\
+MakeLintSubdirs(dirs,lintlib,lintlib)
+#endif /* MakeLintLibSubdirs */
+
+
+/*
+ * MakeMakeSubdirs - generate rules to recursively recreate Makefiles as part
+ * of the specified step in the build. If $(TOP) is set to an absolute path,
+ * do not prepend the ../ prefix. This makes running things outside of the
+ * source tree much easier.
+ * $(ONESUBDIR)/Makefile exists as a separate, explicit target so that
+ * clearmake will know what its goal is and do wink-in.
+ */
+#ifndef MakeMakeSubdirs
+#define MakeMakeSubdirs(dirs,target) @@\
+$(ONESUBDIR)/Makefile: @@\
+ @MakeFlagsToShellFlags(n,executeit="no"); \ @@\
+ cd $(ONESUBDIR) && \ @@\
+ if [ "$$executeit" != "no" ]; then \ @@\
+ ImakeSubCmdHelper -DTOPDIR=$(IMAKETOP) -DCURDIR=$(ONECURDIR)$(ONESUBDIR); \ @@\
+ fi; @@\
+ @@\
+target:: @@\
+ -@MakeFlagsToShellFlags(ik,set +e); \ @@\
+ MakeFlagsToShellFlags(n,executeit="no"); \ @@\
+ for i in dirs ;\ @@\
+ do \ @@\
+ case "$(CURRENT_DIR)" in \ @@\
+ .) curdir= ;; \ @@\
+ *) curdir=$(CURRENT_DIR)/ ;; \ @@\
+ esac; \ @@\
+ echo "making Makefiles in $$curdir$$i..."; \ @@\
+ itmp=`echo $$i | sed -e 's;^\./;;g' -e 's;/\./;/;g'`; \ @@\
+ curtmp="$(CURRENT_DIR)" \ @@\
+ toptmp=""; \ @@\
+ case "$$itmp" in \ @@\
+ ../?*) \ @@\
+ while echo "$$itmp" | grep '^\.\./' > /dev/null;\ @@\
+ do \ @@\
+ toptmp="/`basename $$curtmp`$$toptmp"; \ @@\
+ curtmp="`dirname $$curtmp`"; \ @@\
+ itmp="`echo $$itmp | sed 's;\.\./;;'`"; \ @@\
+ done \ @@\
+ ;; \ @@\
+ esac; \ @@\
+ case "$$itmp" in \ @@\
+ */?*/?*/?*/?*) newtop=../../../../..;; \ @@\
+ */?*/?*/?*) newtop=../../../..;; \ @@\
+ */?*/?*) newtop=../../..;; \ @@\
+ */?*) newtop=../..;; \ @@\
+ *) newtop=..;; \ @@\
+ esac; \ @@\
+ newtop="$$newtop$$toptmp"; \ @@\
+ case "$(TOP)" in \ @@\
+ /?*) imaketop=$(TOP) \ @@\
+ imakeprefix= ;; \ @@\
+ .) imaketop=$$newtop \ @@\
+ imakeprefix=$$newtop/ ;; \ @@\
+ *) imaketop=$$newtop/$(TOP) \ @@\
+ imakeprefix=$$newtop/ ;; \ @@\
+ esac; \ @@\
+ RemoveFile($$i/Makefile.bak); \ @@\
+ if [ -f $$i/Makefile ]; then \ @@\
+ echo " $(MV) Makefile Makefile.bak"; \ @@\
+ if [ "$$executeit" != "no" ]; then \ @@\
+ $(MV) $$i/Makefile $$i/Makefile.bak; \ @@\
+ fi; \ @@\
+ fi; \ @@\
+ $(MAKE) $(MFLAGS) $(MAKE_OPTS) ONESUBDIR=$$i ONECURDIR=$$curdir IMAKETOP=$$imaketop IMAKEPREFIX=$$imakeprefix $$i/Makefile; \ @@\
+ if [ -d $$i ] ; then \ @@\
+ cd $$i; \ @@\
+ $(MAKE) $(MFLAGS) Makefiles; \ @@\
+ cd $$newtop; \ @@\
+ else \ @@\
+ exit 1; \ @@\
+ fi; \ @@\
+ done
+
+#ifdef UseInstalled
+#define ImakeSubCmdHelper $(IMAKE_CMD)
+#else
+#define ImakeSubCmdHelper $(IMAKEPREFIX)$(IMAKE) -I$(IMAKEPREFIX)$(IRULESRC) \
+ $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
+#endif
+
+#endif /* MakeMakeSubdirs */
+
+
+/*
+ * MakefileSubdirs - generate rules to create Makefiles.
+ */
+#ifndef MakefileSubdirs
+#define MakefileSubdirs(dirs) @@\
+MakeMakeSubdirs(dirs,Makefiles)
+#endif /* MakefileSubdirs */
+
+/*
+ * Translate XCOMM into pound sign with sed, rather than passing -DXCOMM=XCOMM
+ * to cpp, because that trick does not work on all ANSI C preprocessors.
+ * Delete line numbers from the cpp output (-P is not portable, I guess).
+ * Allow XCOMM to be preceded by whitespace and provide a means of generating
+ * output lines with trailing backslashes.
+ * Allow XHASH to always be substituted, even in cases where XCOMM isn't.
+ */
+#ifndef CppSedMagic
+#define CppSedMagic sed -e '/^# *[0-9][0-9]* *.*$$/d' \
+ -e '/^#line *[0-9][0-9]* *.*$$/d' \
+ -e '/^[ ]*XCOMM$$/s/XCOMM/#/' \
+ -e '/^[ ]*XCOMM[^a-zA-Z0-9_]/s/XCOMM/#/' \
+ -e '/^[ ]*XHASH/s/XHASH/#/' \
+ -e '/\@\@$$/s/\@\@$$/\\/'
+#endif /* CppSedMagic */
+
+#ifndef CppFileTarget
+#define CppFileTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(CPP) CppNoLineInfoOption defs <src | CppSedMagic >$@ @@\
+ @@\
+clean:: @@\
+ RemoveFiles(dst)
+#endif /* CppFileTarget */
+
+/*
+ * CppScriptTarget - generate rules to create a shell script by running the
+ * input through cpp. If the ExecableScripts configuration parameter is not
+ * set, then make sure that the first line begins with a colon.
+ */
+#ifndef CppScriptTarget
+#if ExecableScripts /* can use #! instead of colon */
+#define CppScriptTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(CPP) CppNoLineInfoOption defs <src | CppSedMagic >$@ @@\
+ chmod a+x $@ @@\
+ @@\
+clean:: @@\
+ RemoveFiles(dst)
+#else
+#define CppScriptTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \
+ echo \: >$@ @@\
+ sed '1d' src | $(CPP) CppNoLineInfoOption defs | CppSedMagic >>$@ @@\
+ chmod a+x $@ @@\
+ @@\
+clean:: @@\
+ RemoveFile(dst)
+#endif /* ExecableScripts */
+#endif /* CppScriptTarget */
+
+
+/*
+ * MakeScriptFromCpp - generate rules to create a script from a file with a
+ * .cpp suffix.
+ */
+#ifndef MakeScriptFromCpp
+#define MakeScriptFromCpp(name,defs) @@\
+CppScriptTarget(name,name.cpp,defs,NullParameter)
+#endif /* MakeScriptFromCpp */
+
+#ifndef CppSourceFile
+#define CppSourceFile(dst,src,defs,deplist) @@\
+CppFileTarget(dst,src,defs,deplist) @@\
+ @@\
+includes:: dst @@\
+ @@\
+depend:: dst
+#endif /* CppSourceFile */
+
+/* Like CppFileTarget, but don't add any default defines */
+#ifndef CppRawFileTarget
+#define CppRawFileTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(RAWCPP) CppNoLineInfoOption defs <src | CppSedMagic >$@ @@\
+ @@\
+clean:: @@\
+ RemoveFiles(dst)
+#endif /* CppFileTarget */
+
+/*
+ * CppManTarget - preprocess man pages. OS-specific man sections are replaced.
+ */
+#ifndef CppManTarget
+#define CppManTarget(name,defs) @@\
+AllTarget(name.$(MANNEWSUFFIX)) @@\
+ @@\
+name.$(MANNEWSUFFIX): name.$(MANSRCSUFFIX) @@\
+ RemoveFile($@) @@\
+ if test -z "$(PREPROCESSMANPAGES)" ; then \ @@\
+ cd `dirname name` && \ @@\
+ $(LN) `basename name.$(MANSRCSUFFIX)` `basename $@`; \ @@\
+ else \ @@\
+ ClearmakeOSName \
+ $(RAWCPP) CppNoLineInfoOption $(MANDEFS) defs \ @@\
+ < name.$(MANSRCSUFFIX) | CppSedMagic >$@; \ @@\
+ fi @@\
+ @@\
+clean:: @@\
+ RemoveFile(name.$(MANNEWSUFFIX))
+#endif /* CppManTarget */
+
+/*
+ * MakeDirectories - generate rules to create a hierarchy of directories.
+ */
+#ifndef MakeDirectories
+#define MakeDirectories(step,dirs) @@\
+step:: @@\
+ DirFailPrefix@MakeFlagsToShellFlags(i,set +e); \ @@\
+ for i in dirs; do if [ -d $(DESTDIR)$$i ]; then \ @@\
+ set +x; else (set -x; $(MKDIRHIER) $(DESTDIR)$$i); fi; \ @@\
+ done
+#endif /* MakeDirectories */
+
+
+/*
+ * AllTarget - generate rules to build necessary things during make all.
+ */
+#ifndef AllTarget
+#define AllTarget(depends) @@\
+all:: depends
+#endif /* AllTarget */
+
+#ifdef DefineOldLibraryRules
+#include <oldlib.rules>
+#endif
+
+#ifndef StaticLibrary
+#define StaticLibrary(libpath,libname) Concat3(libpath,/,LibraryTargetName(libname))
+#endif
+
+/*
+ * MakeMutex - generate mutex rules for parallel make
+ */
+#ifndef MakeMutex
+#ifdef MutexDirective
+#define MakeMutex(targets) @@\
+MutexDirective: targets
+#endif /* MutexDirective */
+#endif /* MakeMutex */
+
+/*
+ * Rules for dynamic modules. These are primarily used by XFree86
+ */
+
+#ifndef LinkBuildModule
+#ifdef UseInstalled
+#define LinkBuildModule(module,subdir) $(_NULLCMD_)
+#else
+#define LinkBuildModule(module,subdir)\
+ MakeDir($(BUILDMODULEDIR)/subdir) @@\
+ RemoveFile($(BUILDMODULEDIR)/subdir/module) @@\
+ @(UP="`$(REVPATH) subdir`"; set -x; \ @@\
+ cd $(BUILDMODULEDIR)/subdir && \ @@\
+ $(LN) $(BUILDMODULETOP)/$${UP}$(CURRENT_DIR)/module .)
+#endif
+#endif /* LinkBuildModule */
+
+#ifndef LinkBuildNamedModule
+#ifdef UseInstalled
+#define LinkBuildNamedModule(module,name,subdir) $(_NULLCMD_)
+#else
+#define LinkBuildNamedModule(module,name,subdir)\
+ MakeDir($(BUILDMODULEDIR)/subdir) @@\
+ RemoveFile($(BUILDMODULEDIR)/subdir/name) @@\
+ @(UP="`$(REVPATH) subdir`"; set -x; \ @@\
+ cd $(BUILDMODULEDIR)/subdir && \ @@\
+ $(LN) $(BUILDMODULETOP)/$${UP}$(CURRENT_DIR)/module name)
+#endif
+#endif /* LinkBuildNamedModule */
+
+/*
+ * ModuleObjectRule
+ */
+#ifndef ModuleObjectRule
+#define ModuleObjectRule() NormalLibraryObjectRule()
+#endif
+
+/*
+ * ObjectModuleTarget - build a module as a single object file
+ */
+#ifndef ObjectModuleTarget
+#if MakeDllModules && DoLoadableServer
+#define ObjectModuleTarget(module,objects) @@\
+DynamicModuleTarget(Concat(module,_drv.so), objects)
+#else
+#define ObjectModuleTarget(module,objects) @@\
+NormalRelocatableTarget(Concat(module,_drv), objects)
+#endif
+#endif
+
+/*
+ * LibraryModuleTarget
+ */
+#ifndef LibraryModuleTarget
+#if MakeDllModules && DoLoadableServer
+#define LibraryModuleTarget(module,objects) @@\
+NormalLibraryTarget(module, objects) @@\
+DynamicModuleTarget(Concat3(lib,module,.so), objects)
+#else
+#define LibraryModuleTarget(module, objects) @@\
+NormalLibraryTarget(module, objects)
+#endif
+#endif
+
+/*
+ * DepLibraryModuleTarget
+ */
+#ifndef DepLibraryModuleTarget
+#if MakeDllModules && DoLoadableServer
+#define DepLibraryModuleTarget(module,deplist,objects) @@\
+NormalDepLibraryTarget(module, deplist, objects) @@\
+DepDynamicModuleTarget(Concat3(lib,module,.so), deplist, objects)
+#else
+#define DepLibraryModuleTarget(module,deplist,objects) @@\
+NormalDepLibraryTarget(module, deplist, objects)
+#endif
+#endif
+
+/*
+ * DynamicModuleTarget - build a module to be dynamically loaded
+ */
+#ifndef DynamicModuleTarget
+#define DynamicModuleTarget(module,modlist) @@\
+AllTarget(module) @@\
+ @@\
+module: modlist @@\
+ RemoveFile($@) @@\
+ $(CC) -o $@ $(SHLIBLDFLAGS) $(NOSTDLIB) modlist $(POSTNOSTDLIB) @@\
+ @@\
+clean:: @@\
+ RemoveFile(module)
+#endif /* DynamicModuleTarget */
+
+/*
+ * DepDynamicModuleTarget - build a module to be dynamically loaded
+ */
+#ifndef DepDynamicModuleTarget
+#define DepDynamicModuleTarget(module,deplist,modlist) @@\
+AllTarget(module) @@\
+ @@\
+module: deplist @@\
+ RemoveFile($@) @@\
+ $(CC) -o $@ $(SHLIBLDFLAGS) $(NOSTDLIB) modlist $(POSTNOSTDLIB) @@\
+ @@\
+clean:: @@\
+ RemoveFile(module)
+#endif /* DepDynamicModuleTarget */
+
+/*
+ * InstallDynamicModule - install a dynamic module
+ */
+#ifndef InstallDynamicModule
+#define InstallDynamicModule(module,dest,subdir) @@\
+AllTarget(module) @@\
+ LinkBuildModule(module,subdir) @@\
+ @@\
+install:: module @@\
+ MakeDir($(DESTDIR)dest/subdir) @@\
+ $(INSTALL) -c $(INSTDATFLAGS) module $(DESTDIR)dest/subdir
+#endif
+
+#ifndef InstallDynamicNamedModule
+#define InstallDynamicNamedModule(module,instname,dest,subdir) @@\
+AllTarget(module) @@\
+ LinkBuildNamedModule(module,instname,subdir) @@\
+ @@\
+install:: module @@\
+ MakeDir($(DESTDIR)dest/subdir) @@\
+ $(INSTALL) -c $(INSTDATFLAGS) module $(DESTDIR)dest/subdir/instname
+#endif
+
+/* Shortcuts for installing driver module, one per class */
+#ifndef InstallVideoObjectModule
+#define InstallVideoObjectModule(module,dest) @@\
+InstallObjectModule(module,dest,drivers)
+#endif
+#ifndef InstallInputObjectModule
+#define InstallInputObjectModule(module,dest) @@\
+InstallObjectModule(module,dest,input)
+#endif
+#ifndef InstallExtensionsObjectModule
+#define InstallExtensionsObjectModule(module,dest) @@\
+InstallObjectModule(module,dest,extensions)
+#endif
+#ifndef InstallFontsObjectModule
+#define InstallFontsObjectModule(module,dest) @@\
+InstallObjectModule(module,dest,fonts)
+#endif
+#ifndef InstallMultimediaObjectModule
+#define InstallMultimediaObjectModule(module,dest) @@\
+InstallObjectModule(module,dest,multimedia)
+#endif
+
+#ifndef InstallObjectModule
+#if !DoLoadableServer
+#define InstallObjectModule(module,dest,subdir) /**/
+#else
+#if MakeDllModules
+#define InstallObjectModule(module,dest,subdir) @@\
+InstallDynamicModule(Concat(module,_drv.so),dest,subdir)
+#else
+#define InstallObjectModule(module,dest,subdir) @@\
+InstallDynamicModule(Concat(module,_drv.o),dest,subdir)
+#endif
+#endif
+#endif
+
+#ifndef InstallLibraryModule
+#if !DoLoadableServer
+#define InstallLibraryModule(module,dest,subdir) /**/
+#else
+#if MakeDllModules
+#define InstallLibraryModule(module,dest,subdir) @@\
+InstallDynamicModule(Concat3(lib,module,.so),dest,subdir)
+#else
+#define InstallLibraryModule(module,dest,subdir) @@\
+InstallDynamicModule(ModuleLibraryTargetName(module),dest,subdir)
+#endif
+#endif
+#endif
+
+#ifndef InstallModuleManPage
+#define InstallModuleManPage(module) @@\
+InstallGenManPage(module,$(DRIVERMANDIR),$(DRIVERMANSUFFIX))
+#endif
+
+#ifndef BuildObjectFromLibraryWithPath
+#define BuildObjectFromLibraryWithPath(libpath,libname,objname) @@\
+AllTarget(objname.Osuf) @@\
+ @@\
+objname.Osuf: Concat3(libpath,/lib,libname.a) @@\
+ @$(MKDIRHIER) tmp @@\
+ @$(CP) Concat3(libpath,/lib,libname.a) tmp @@\
+ @(cd tmp; set -x; ArExtCmd Concat(lib,libname.a); \ @@\
+ $(LD) $(LDCOMBINEFLAGS) *.Osuf -o ../$@; \ @@\
+ RemoveFiles(*.Osuf)) @@\
+ @$(RM) -r tmp @@\
+ @@\
+clean:: @@\
+ RemoveFile(objname.Osuf)
+#endif
+
+#ifndef BuildObjectFromLibrary
+#define BuildObjectFromLibrary(libname,objname) BuildObjectFromLibraryWithPath(.,libname,objname)
+#endif
+
+/*
+ * LinkerRuntimeLibraryPathFlag - defined here to be a no-op for systems that
+ * don't need it. Overridden in system-specific config files for systems that
+ * need it, usually with something like "Concat(-R,path)"
+ */
+#ifndef LinkerRuntimeLibraryPathFlag
+# define LinkerRuntimeLibraryPathFlag(path) /* */
+#endif
+
+/* Phony targets - GNU make has a feature to mark a target as phony,
+ * which means that it wont consider that target to be the name of a
+ * file. In general this speeds up make, since it doesn't have to
+ * look for those files when it sets out to create a phony target.
+ * However, on cygwin, this is actually required for correct
+ * operation, since the Win32 filesystems are case insensitive and the
+ * install target conflicts with the INSTALL file present in some
+ * (autotooled) directories.
+ *
+ * We probably don't need the #ifdef protection, since other make
+ * implementations would just consider this a normal rule. Better
+ * safe than sorry, though.
+ */
+#if HasGnuMake
+.PHONY: all interfaces install install.man install.lib install.sdk \
+ depend includes clean
+#endif
diff --git a/nx-X11/config/cf/Imake.tmpl b/nx-X11/config/cf/Imake.tmpl
new file mode 100644
index 000000000..26811085d
--- /dev/null
+++ b/nx-X11/config/cf/Imake.tmpl
@@ -0,0 +1,2320 @@
+XCOMM ----------------------------------------------------------------------
+XCOMM Makefile generated from IMAKE_TEMPLATE and INCLUDE_IMAKEFILE
+XCOMM $Xorg: Imake.tmpl,v 1.4 2000/08/17 19:41:46 cpqbld Exp $
+XCOMM $XdotOrg: xc/config/cf/Imake.tmpl,v 1.16 2005/11/08 06:33:24 jkj Exp $
+XCOMM
+XCOMM
+XCOMM
+XCOMM
+XCOMM $XFree86: xc/config/cf/Imake.tmpl,v 3.155 2003/12/24 18:58:41 dickey Exp $
+XCOMM ----------------------------------------------------------------------
+
+/*
+ * generic imake template
+ */
+
+/*
+ * Modify Imake.cf when adding a new architecture, do not modify this file.
+ * Platform-specific parameters may be set in the appropriate <vendor>.cf
+ * configuration files. Site-specific parameters should be set in the file
+ * site.def. Full rebuilds are recommended if any parameters are changed.
+ * If your C preprocessor does not define any unique symbols, you will need
+ * to set BOOTSTRAPCFLAGS when rebuilding imake (usually when doing
+ * "make World" the first time).
+ */
+
+#define ImakeConfigRelease 6
+
+#define YES 1
+#define NO 0
+
+/* Ensure that "all" is the default target in the Makefile. */
+all::
+
+.SUFFIXES: .i
+
+/* Intercept clean rules for current directory */
+#undef clean
+#define clean cleandir
+
+#include <Imake.cf>
+
+XCOMM -----------------------------------------------------------------------
+XCOMM site-specific configuration parameters that need to come before
+XCOMM the platform-specific parameters - edit site.def to change
+#define BeforeVendorCF
+#include <site.def>
+#undef BeforeVendorCF
+
+#if defined(HasGcc3) && !defined(HasGcc2)
+# define HasGcc2 HasGcc3
+#endif
+#if defined(HasGcc2) && !defined(HasGcc)
+# define HasGcc HasGcc2
+#endif
+
+#ifndef HasCenterLineC
+#define HasCenterLineC NO
+#endif
+#ifndef HasCenterLineCplusplus
+#define HasCenterLineCplusplus NO
+#endif
+
+#ifndef HasClearmake
+# define HasClearmake NO
+#endif
+
+#ifndef ProPoliceSupport
+#define ProPoliceSupport NO
+#endif
+
+/*
+ * ClearmakeOSName - insert the current OS type into the clearmake
+ * build script, so .o files from different platforms cannot be winked in.
+ * If clearmake finds the build script for two .o files is the same, it
+ * will share the .o, even across different architectures. Inserting the
+ * O/S name into the build script in a comment prevents unwanted sharing.
+ * Note the trailing double-@ in the macro: end a line using this macro
+ * with backslash without the double-@ usually used.
+ * Like this:
+ *
+ * #define SomeRule() @@\
+ * something or other @@\
+ * ClearmakeOSName \
+ * something else @@\
+ * and more
+ */
+#ifndef ClearmakeOSName
+# if HasClearmake
+# define ClearmakeOSName @ XCOMM $(OSNAME) @@
+# else
+# define ClearmakeOSName /**/
+# endif
+#endif
+
+#if HasClearmake
+# ifndef MakeCmd
+# define MakeCmd clearmake
+# endif
+#endif
+
+#if HasClearmake
+XCOMM ----------------------------------------------------------------------
+.c.o:
+ ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
+#endif
+
+XCOMM ----------------------------------------------------------------------
+XCOMM platform-specific configuration parameters - edit MacroFile to change
+#include MacroIncludeFile
+
+XCOMM ----------------------------------------------------------------------
+XCOMM site-specific configuration parameters that go after
+XCOMM the platform-specific parameters - edit site.def to change
+#define AfterVendorCF
+#include <site.def>
+#undef AfterVendorCF
+
+/*
+ * defaults for various generic parameters; set in site.def if needed
+ */
+
+/* the following are needed before we can include Imake.rules */
+
+#ifndef NothingOutsideProjectRoot
+#define NothingOutsideProjectRoot NO
+#endif
+
+#ifndef RemoveObsoleteFiles
+#define RemoveObsoleteFiles YES
+#endif
+
+#ifndef HasVarDirectory
+#define HasVarDirectory YES
+#endif
+#ifndef UseEtcX11
+#define UseEtcX11 YES
+#endif
+#ifndef UseInstalledX11
+# define UseInstalledX11 NO
+#endif
+#ifdef UseInstalled
+# undef UseInstalledX11
+# define UseInstalledX11 YES
+#endif
+#if NothingOutsideProjectRoot
+#undef UseEtcX11
+#define UseEtcX11 NO
+#endif
+#ifndef UseSeparateConfDir
+#define UseSeparateConfDir (UseEtcX11 || HasVarDirectory)
+#endif
+#if NothingOutsideProjectRoot
+#undef UseSeparateConfDir
+#define UseSeparateConfDir NO
+#endif
+#ifndef SystemV
+#define SystemV NO /* SYSV (R3) */
+#endif
+#ifndef SystemV4
+#define SystemV4 NO /* SVR4 */
+#endif
+#ifndef HasCodeCenter
+#define HasCodeCenter NO
+#endif
+#ifndef HasSentinel
+#define HasSentinel NO
+#endif
+#ifndef HasPurify
+#define HasPurify NO
+#endif
+#ifndef HasTestCenter
+#define HasTestCenter NO
+#endif
+#ifndef HasGnuMake
+#define HasGnuMake NO
+#endif
+/*
+ * The following fixes a glitch with GNU make -j
+ */
+#ifndef ForceServerRemake
+#define ForceServerRemake HasGnuMake
+#endif
+#ifndef HasBsdMake
+#define HasBsdMake NO
+#endif
+#ifndef HasParallelMake
+#define HasParallelMake NO
+#endif
+#ifndef RemoveTargetProgramByMoving
+#define RemoveTargetProgramByMoving NO
+#endif
+#ifndef DoRanlibCmd
+#if SystemV || SystemV4
+#define DoRanlibCmd NO
+#else
+#define DoRanlibCmd YES
+#endif
+#endif
+#ifndef ExecableScripts
+#if SystemV
+#define ExecableScripts NO
+#else
+#define ExecableScripts YES /* kernel exec() can handle #! */
+#endif
+#endif
+
+#ifndef HasMakefileSafeInclude /* -include or sinclude in a Makefile */
+#if HasClearmake || HasBsdMake
+#define HasMakefileSafeInclude YES
+#else
+#define HasMakefileSafeInclude NO /* see also vendor-specific .cf files */
+#endif
+#endif
+
+#ifndef HasSymLinks
+#define HasSymLinks YES
+#endif
+
+#ifndef HasPerl
+#define HasPerl YES
+#endif
+
+#ifndef HasPerl5
+#define HasPerl5 HasPerl
+#endif
+
+#ifndef PerlCmd
+#define PerlCmd perl
+#endif
+
+#ifndef PerlOptions
+#define PerlOptions /**/
+#endif
+
+#ifndef PerlEnvSetup
+#define PerlEnvSetup env LC_ALL=C
+#endif
+
+#ifndef BuildRman
+#define BuildRman YES
+#endif
+
+#ifndef HasGperf
+#define HasGperf NO
+#endif
+
+#ifndef GperfCmd
+#define GperfCmd gperf
+#endif
+
+#ifndef RmanCmd
+#if BuildRman
+#ifdef UseInstalled /* assume BINDIR in path */
+#define RmanCmd rman
+#else
+#define RmanCmd $(TOP)/config/util/rman
+#endif
+#endif
+#endif
+
+#ifndef RmanOptions
+#if BuildRman
+#define RmanOptions -f HTML
+#endif
+#endif
+
+#ifndef BuildHtmlManPages
+#ifdef RmanCmd
+#define BuildHtmlManPages YES
+#else
+#define BuildHtmlManPages NO
+#endif
+#endif
+/* Can't do this while bootstrapping imake */
+#ifdef BootStrap
+#undef BuildHtmlManPages
+#define BuildHtmlManPages NO
+#endif
+
+#ifndef DontPreprocessManPages
+#ifdef UseInstalled
+#define DontPreprocessManPages YES
+#else
+#define DontPreprocessManPages NO
+#endif
+#endif
+
+#ifndef CompressManPages
+#define CompressManPages NO
+#endif
+
+#ifndef HasGroff
+#define HasGroff NO
+#endif
+#ifndef HasGroffHtml
+#define HasGroffHtml NO
+#endif
+
+#ifndef HasCookieMaker
+#define HasCookieMaker NO
+#endif
+
+#ifndef DoLoadableServer
+#define DoLoadableServer NO
+#endif
+#ifndef MakeDllModules
+#define MakeDllModules NO
+#endif
+#ifndef StripInstalledPrograms
+#define StripInstalledPrograms NO /* leave symbol table just in case */
+#endif
+#ifndef StaticNeedsPicForShared
+#define StaticNeedsPicForShared NO
+#endif
+
+#include <Imake.rules>
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries NO
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 0
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 0
+#endif
+#ifndef UnalignedReferencesAllowed
+#define UnalignedReferencesAllowed NO /* if arbitrary deref is okay */
+#endif
+#ifndef AvoidNullMakeCommand
+#if !HasBsdMake
+#define AvoidNullMakeCommand NO
+#else
+#define AvoidNullMakeCommand YES
+#endif
+#endif
+#if AvoidNullMakeCommand
+#ifndef NullMakeCommand
+#define NullMakeCommand @ echo -n
+#endif
+/*
+ * An obscure bug in BSD4.3's original make causes it not to recognize a
+ * macro definition if the macro name starts with a non-alpha and in
+ * column one.
+ */
+ _NULLCMD_ = NullMakeCommand
+#endif
+
+#ifndef CrossCompiling
+#define CrossCompiling NO
+#undef CrossCompileDir
+#endif
+#ifndef BourneShell /* to force shell in makefile */
+#define BourneShell /bin/sh
+#endif
+#ifndef ConstructMFLAGS
+#if SystemV
+#define ConstructMFLAGS YES /* build MFLAGS from MAKEFLAGS */
+#else
+#define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */
+#endif
+#endif
+
+#ifndef ConstructMAKEFLAGS /* needed on old BSD-based? */
+#define ConstructMAKEFLAGS NO /* build MAKEFLAGS from MFLAGS */
+#endif
+
+#ifndef HasLargeTmp
+#define HasLargeTmp NO /* be paranoid */
+#endif
+
+#ifndef HasMotif
+#define HasMotif NO
+#endif
+#ifndef HasMotif2
+#define HasMotif2 NO /* only if system has working Motif2 or OpenMotif */
+#endif
+#ifndef HasBSDAuth
+#define HasBSDAuth NO
+#endif
+
+#ifndef HasBSD44Sockets
+#define HasBSD44Sockets NO
+#endif
+#ifndef HasSockets
+#define HasSockets YES
+#endif
+#ifndef HasStreams
+#define HasStreams !HasSockets
+#endif
+#ifndef HasDECnet
+#define HasDECnet NO
+#endif
+#ifndef HasPoll
+#if SystemV || SystemV4
+#define HasPoll YES
+#else
+#define HasPoll NO
+#endif
+#endif
+#ifndef HasVFork
+#if SystemV
+#define HasVFork NO /* not yet... */
+#else
+#define HasVFork YES
+#endif
+#endif
+#ifndef HasSetProcTitle
+#define HasSetProcTitle NO
+#endif
+#ifndef HasSetUserContext
+#define HasSetUserContext NO
+#endif
+#ifndef HasLibCrypt
+#define HasLibCrypt NO
+#endif
+#ifndef HasPutenv
+#define HasPutenv NO /* assume not */
+#endif
+/* setenv(3) and unsetenv(3) */
+#ifndef HasSetenv
+#define HasSetenv YES /* assume yes */
+#endif
+#ifndef HasVoidSignalReturn
+#define HasVoidSignalReturn YES /* assume yes */
+#endif
+#ifndef HasBsearch
+#define HasBsearch YES /* assume yes */
+#endif
+#ifndef HasSnprintf
+#define HasSnprintf NO /* assume not */
+#endif
+#ifndef HasStrlcat
+#define HasStrlcat NO /* assume not */
+#endif
+#ifndef HasDlopen
+#define HasDlopen NO /* assume not */
+#endif
+#ifndef HasWeakSymbols
+#define HasWeakSymbols NO /* assume not */
+#endif
+#ifndef HasIssetugid
+#define HasIssetugid NO /* assume not */
+#endif
+#ifndef HasGetresuid
+#define HasGetresuid NO /* assume not */
+#endif
+#ifndef HasMkstemp
+#define HasMkstemp NO /* assume not */
+#endif
+#ifndef HasUsableFileMmap
+#define HasUsableFileMmap NO /* assume not */
+#endif
+#ifndef HasGetIfAddrs
+#define HasGetIfAddrs NO /* assume not */
+#endif
+#ifndef HasStickyDirBit
+#define HasStickyDirBit YES
+#endif
+#ifndef HasFchown
+#define HasFchown YES
+#endif
+#ifndef HasPam
+#define HasPam NO
+#endif
+#ifndef HasPamMisc
+#define HasPamMisc NO
+#endif
+#ifndef HasGetpeereid
+#define HasGetpeereid NO
+#endif
+#ifndef HasGetpeerucred
+#define HasGetpeerucred NO
+#endif
+#ifndef NoStrstr
+#define NoStrstr NO
+#endif
+#ifndef HasShadowPasswd
+#define HasShadowPasswd NO
+#endif
+#ifndef HasBasename
+#define HasBasename YES
+#endif
+#ifndef HasGetopt
+# if !defined(Win32Architecture) && !defined(OS2Architecture)
+# define HasGetopt YES
+# else
+# define HasGetopt NO
+# endif
+#endif
+#ifndef HasGetoptLong
+# define HasGetoptLong NO
+#endif
+/* byte-order defaults */
+#ifndef ByteOrder
+#if defined(VaxArchitecture)
+#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(MipsArchitecture) && defined(MipselArchitecture)
+#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(MipsArchitecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(i386Architecture)
+#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(ia64Architecture)
+#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(AMD64Architecture)
+#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(SparcArchitecture) || defined(Sparc64Architecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(AlphaArchitecture)
+#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(Mc68000Architecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(Mc68020Architecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(Mc88000Architecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(s390Architecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(s390xArchitecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(Arm32ebArchitecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(Arm32Architecture)
+#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(RsArchitecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(PpcArchitecture) || defined(Ppc64Architecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(HPArchitecture)
+#define ByteOrder X_BIG_ENDIAN
+#elif defined(SuperHArchitecture)
+#define ByteOrder X_LITTLE_ENDIAN
+#elif defined(SuperHebArchitecture)
+#define ByteOrder X_BIG_ENDIAN
+#endif
+#endif /* ByteOrder */
+X_BYTE_ORDER = ByteOrder
+
+#ifndef HasFortran
+#define HasFortran NO
+#endif
+#ifndef HasGcc2ForCplusplus
+#define HasGcc2ForCplusplus NO
+#endif
+#ifndef HasCplusplus
+#if HasGcc2ForCplusplus
+#define HasCplusplus YES
+#else
+#define HasCplusplus NO
+#endif
+#endif
+#ifndef HasMktemp
+#define HasMktemp NO /* if you have the mktemp command */
+#endif
+#ifndef HasNdbm
+#define HasNdbm NO
+#endif
+#ifndef HasSecureRPC
+#define HasSecureRPC NO /* if you have Secure RPC */
+#endif
+#ifndef HasKrbIV
+#define HasKrbIV NO /* if you have Kerberos IV */
+#endif
+#ifndef HasKrb5
+#define HasKrb5 NO /* if you have Kerberos V5 */
+#endif
+#ifndef HasLatex
+#define HasLatex NO
+#endif
+#ifndef HasShm
+#if SystemV || SystemV4
+#define HasShm YES
+#else
+#define HasShm NO
+#endif
+#endif
+#ifndef HasCbrt
+#define HasCbrt YES
+#endif
+#ifndef HasFfs
+#define HasFfs YES
+#endif
+#ifndef HasZlib
+#define HasZlib YES
+#endif
+#ifndef OsNeedZlibHeaders
+#define OsNeedZlibHeaders !HasZlib
+#endif
+#if !HasZlib /* if OS doesn't have it, we'll build it */
+XCOMM Building your own zlib can be a harmful security risk and is
+XCOMM deprecated; please strongly consider using vendor-supplied packages.
+#undef GzipLibrary /* GzipLibrary was valid only if HasZlib */
+#endif
+#ifndef GzipLibrary /* if OS config didn't define it, assume it's -lz */
+#define GzipLibrary -lz
+#endif
+/* If the system has the Freetype2 library - if NO, the copy in extras is built */
+#ifndef HasFreetype2
+#define HasFreetype2 YES
+#endif
+/* If the system has the Fontconfig library - if NO, the copy in extras is built */
+#ifndef HasFontconfig
+#define HasFontconfig NO
+#endif
+/* If the system has the PNG library - if NO, xcursorgen is not built */
+#ifndef HasLibpng
+#define HasLibpng NO
+#endif
+#if HasKrbIV
+#ifndef KrbIVIncludes
+#define KrbIVIncludes /**/
+#endif
+#ifndef KrbIVLibraries
+#define KrbIVLibraries -lkrb -ldes
+#endif
+#endif
+#if HasKrb5
+#ifndef Krb5Includes
+#define Krb5Includes -I/krb5/include
+#endif
+#ifndef Krb5Libraries
+#define Krb5Libraries -L/krb5/lib -L/usr/isode/lib -lkrb5 -lcrypto -lisode -lcom_err -ldbm
+#endif
+#else
+#undef Krb5Includes
+#define Krb5Includes /**/
+#undef Krb5Libraries
+#define Krb5Libraries /**/
+#endif
+#ifndef UseGnuMalloc
+#define UseGnuMalloc NO
+#endif
+#ifndef GnuMallocLibrary
+#define GnuMallocLibrary -lgmalloc
+#endif
+#ifndef MallocLibraries
+#if UseGnuMalloc
+#define MallocLibraries GnuMallocLibrary
+#else
+#define MallocLibraries /**/
+#endif
+#endif
+#ifndef HasPosixRegex /* Most modern platforms have it */
+#define HasPosixRegex YES
+#endif
+#ifndef RegexLibrary
+#if HasPosixRegex
+#define RegexLibrary /**/
+#else
+#define RegexLibrary -lregex
+#endif
+#endif
+#ifndef HasNCurses
+#define HasNCurses NO
+#endif
+#ifndef NCursesLibName
+#if HasNCurses
+#define NCursesLibName -lncurses
+#else
+#define NCursesLibName
+#endif
+#endif
+#ifdef NCursesLibDir
+NCURSESLIBDIR = NCursesLibDir
+#endif
+#ifdef NCursesIncDir
+NCURSESINCDIR = NCursesIncDir
+#endif
+#ifndef HasGlide2
+#define HasGlide2 NO
+#endif
+#ifndef Glide2IncDir
+#if HasGlide2
+#define Glide2IncDir /usr/include/glide
+#else
+#define Glide2IncDir
+#endif
+#endif
+GLIDE2INCDIR = Glide2IncDir
+#ifndef HasGlide3
+#define HasGlide3 NO
+#endif
+#ifndef Glide3IncDir
+#if HasGlide3
+#define Glide3IncDir /usr/include/glide3
+#else
+#define Glide3IncDir
+#endif
+#endif
+GLIDE3INCDIR = Glide3IncDir
+#ifndef Glide3LibName
+#if HasGlide3
+#define Glide3LibName glide3
+#else
+#define Glide3LibName
+#endif
+#endif
+GLIDE3LIBNAME = Glide3LibName
+#ifndef HasTk
+#define HasTk NO
+#endif
+#ifndef TkLibName
+#if HasTk
+#define TkLibName tk
+#else
+#define TkLibName
+#endif
+#endif
+TKLIBNAME = TkLibName
+#ifndef TkLibDir
+#if HasTk
+#define TkLibDir /usr/local/lib
+#else
+#define TkLibDir
+#endif
+#endif
+TKLIBDIR = TkLibDir
+#ifndef TkIncDir
+#if HasTk
+#define TkIncDir /usr/local/include
+#else
+#define TkIncDir
+#endif
+#endif
+#ifndef TkLibrary
+#ifdef HasTk
+#define TkLibrary Concat(-L,$(TKLIBDIR)) Concat(-l,$(TKLIBNAME))
+#else
+#define TkLibrary
+#endif
+#endif
+#ifndef HasTcl
+#define HasTcl NO
+#endif
+#ifndef TclLibName
+#if HasTcl
+#define TclLibName tcl
+#else
+#define TclLibName
+#endif
+#endif
+TCLLIBNAME = TclLibName
+#ifndef TclLibDir
+#if HasTcl
+#define TclLibDir /usr/local/lib
+#else
+#define TclLibDir
+#endif
+#endif
+TCLIBDIR = TclLibDir
+#ifndef TclIncDir
+#if HasTcl
+#define TclIncDir /usr/local/include
+#else
+#define TclIncDir
+#endif
+#endif
+#ifndef TclLibrary
+#ifdef HasTcl
+#define TclLibrary Concat(-L,$(TCLLIBDIR)) Concat(-l,$(TCLLIBNAME))
+#else
+#define TclLibrary
+#endif
+#endif
+#ifndef HasTsLib
+#define HasTsLib NO
+#endif
+/*
+ * Libtool has two different behaviours for version numbers.
+ * On platforms which support a minor number, the library
+ * version is (version - minor).minor, on those that don't,
+ * the version if version.0. Linux and Darwin support minor
+ * numbers; some BSDs do as well. Set this to YES if libtool
+ * uses minor numbers on your platform.
+ */
+#ifndef LibtoolMinorVersions
+#define LibtoolMinorVersions NO
+#endif
+#ifndef NeedConstPrototypes
+#define NeedConstPrototypes NO
+#endif
+#ifndef NeedVarargsPrototypes
+#define NeedVarargsPrototypes NO
+#endif
+#ifndef NeedNestedPrototypes
+#define NeedNestedPrototypes NO
+#endif
+#ifndef NeedFunctionPrototypes
+#define NeedFunctionPrototypes (NeedVarargsPrototypes || NeedNestedPrototypes)
+#endif
+#ifndef NeedWidePrototypes
+#define NeedWidePrototypes YES /* mix and match ANSI-C, non-ANSI */
+#endif
+
+#ifndef UseCCMakeDepend /* use slow cc -E script */
+#define UseCCMakeDepend NO
+#endif
+#ifndef UseGccMakeDepend /* use slowish but correct gcc -M */
+#define UseGccMakeDepend NO
+#endif
+
+#ifndef CaseSensitiveFileSystem
+#define CaseSensitiveFileSystem YES
+#endif
+
+/* DefaultUsrBin is independent of ProjectRoot.
+ This is a directory where programs will be found even if PATH
+ is not set, for example when coming in remotely via rsh. */
+#ifndef DefaultUsrBin
+#define DefaultUsrBin /usr/bin
+#endif
+
+#ifndef LibDirName
+# define LibDirName lib
+#endif
+
+#ifndef UsrLibDir
+#ifdef ProjectRoot
+#define UsrLibDir Concat3(ProjectRoot,/,LibDirName)
+#ifndef AlternateUsrLibDir
+#define AlternateUsrLibDir YES
+#endif
+#else
+#define UsrLibDir Concat3(/usr,/,LibDirName)
+#ifndef AlternateUsrLibDir
+#define AlternateUsrLibDir NO
+#endif
+#endif
+#else
+#ifndef AlternateUsrLibDir
+#define AlternateUsrLibDir YES
+#endif
+#endif
+#ifndef VarDirectory
+#ifdef ProjectVar
+#define VarDirectory ProjectVar
+#else
+#define VarDirectory /var
+#endif
+#endif
+#ifndef VarLibDir
+#define VarLibDir $(VARDIR)/lib
+#endif
+
+/*
+ * SystemUsrLibDir is independent of ProjectRoot. It is used primarily
+ * to allow links for shared libraries in /usr/lib for compliance to
+ * various standards (e.g., Linux/OpenGL).
+ */
+#ifndef SystemUsrLibDir
+#define SystemUsrLibDir /usr/LibDirName
+#endif
+#ifndef SystemUsrIncDir
+#define SystemUsrIncDir /usr/include
+#endif
+
+#ifndef ShLibDir
+#define ShLibDir UsrLibDir
+#endif
+#ifndef IncRoot
+#ifdef ProjectRoot
+#define IncRoot Concat(ProjectRoot,/include)
+#ifndef AlternateIncRoot
+#define AlternateIncRoot YES
+#endif
+#else
+#define IncRoot /usr/include
+#ifndef AlternateIncRoot
+#define AlternateIncRoot NO
+#endif
+#endif
+#else
+#ifndef AlternateIncRoot
+#define AlternateIncRoot YES
+#endif
+#endif
+#ifndef LintlibDir
+#define LintlibDir $(USRLIBDIR)/lint
+#endif
+#ifndef SystemManDirectory
+#if SystemV4
+#define SystemManDirectory /usr/share/man
+#else
+#define SystemManDirectory /usr/man
+#endif
+#endif
+#ifndef ManDirectoryRoot
+#ifdef ProjectRoot
+#define ManDirectoryRoot Concat(ProjectRoot,/man)
+#else
+#define ManDirectoryRoot SystemManDirectory
+#endif
+#endif
+#ifndef ManPath
+#define ManPath ManDirectoryRoot
+#endif
+#ifndef ManSourcePath
+#define ManSourcePath $(MANPATH)/man
+#endif
+#ifndef ManDir
+#define ManDir $(MANSOURCEPATH)$(MANSUFFIX)
+#endif
+#ifndef LibmanDir
+#define LibmanDir $(MANSOURCEPATH)$(LIBMANSUFFIX)
+#endif
+#ifndef FileManDir
+#define FileManDir $(MANSOURCEPATH)$(FILEMANSUFFIX)
+#endif
+#ifndef MiscManDir
+#define MiscManDir $(MANSOURCEPATH)$(MISCMANSUFFIX)
+#endif
+#ifndef DriverManDir
+#define DriverManDir $(MANSOURCEPATH)$(DRIVERMANSUFFIX)
+#endif
+#ifndef AppLoadDefs
+#define AppLoadDefs -D__apploaddir__=$(XAPPLOADDIR)
+#endif
+#ifndef AppManDefs
+#define AppManDefs -D__appmansuffix__=$(MANSUFFIX)
+#endif
+#ifndef LibManDefs
+#define LibManDefs -D__libmansuffix__=$(LIBMANSUFFIX)
+#endif
+#ifndef FileManDefs
+#define FileManDefs -D__filemansuffix__=$(FILEMANSUFFIX)
+#endif
+#ifndef MiscManDefs
+#define MiscManDefs -D__miscmansuffix__=$(MISCMANSUFFIX)
+#endif
+#ifndef DriverManDefs
+#define DriverManDefs -D__drivermansuffix__=$(DRIVERMANSUFFIX)
+#endif
+#ifndef AdminManDefs
+#define AdminManDefs -D__adminmansuffix__=$(ADMINMANSUFFIX)
+#endif
+#ifndef ProjectManDefs
+#define ProjectManDefs -D__projectroot__=$(PROJECTROOT)
+#endif
+#ifndef XConfigFileManDefs
+#define XConfigFileManDefs -D__xconfigfile__=$(XCONFIGFILE)
+#endif
+#ifndef XConfigDirManDefs
+#define XConfigDirManDefs -D__xconfigdir__=$(XCONFIGDIR)
+#endif
+#ifndef XLogFileManDefs
+#define XLogFileManDefs -D__xlogfile__=$(XLOGFILE)
+#endif
+#ifndef XServerManDefs
+#define XServerManDefs -D__xservername__=$(XSERVERNAME)
+#endif
+
+#ifndef CompressManCmd
+#define CompressManCmd gzip -n
+#endif
+
+#ifndef HtmlIndexCmd
+#if BuildHtmlManPages
+#define HtmlIndexCmd $(MKHTMLINDEX)
+#endif
+#endif
+
+#ifndef LogDirectory
+#if HasVarDirectory
+#define LogDirectory $(VARDIR)/log
+#else
+#define LogDirectory /usr/adm
+#endif
+#endif
+
+#ifndef HasVarRun
+#define HasVarRun NO
+#endif
+
+#ifndef VarRunDirectory
+#if HasVarRun
+#define VarRunDirectory $(VARDIR)/run
+#endif
+#endif
+
+#ifndef HasVarDb
+#define HasVarDb NO
+#endif
+
+#ifndef VarDbDirectory
+#if HasVarDb
+#define VarDbDirectory $(VARDIR)/db
+#endif
+#endif
+
+#ifndef ConfigSrc
+#define ConfigSrc $(TOP)/config
+#endif
+#ifndef DependDir
+#if UseCCMakeDepend || UseGccMakeDepend
+#define DependDir $(CONFIGSRC)/util
+#else
+#define DependDir $(CONFIGSRC)/makedepend
+#endif
+#endif
+#ifndef UNCOMPRESSPATH
+#define UNCOMPRESSPATH /usr/ucb/uncompress /* obsolete */
+#endif
+#ifndef OptimizedCDebugFlags
+#define OptimizedCDebugFlags -O
+#endif
+#ifndef OptimizedCplusplusDebugFlags
+#define OptimizedCplusplusDebugFlags OptimizedCDebugFlags
+#endif
+#ifndef DebuggableCDebugFlags
+#define DebuggableCDebugFlags -g
+#endif
+#ifndef DebuggableCplusplusDebugFlags
+#define DebuggableCplusplusDebugFlags DebuggableCDebugFlags
+#endif
+#ifndef ProfiledCDebugFlags
+#define ProfiledCDebugFlags -pg
+#endif
+#ifndef ProfiledCplusplusDebugFlags
+#define ProfiledCplusplusDebugFlags ProfiledCDebugFlags
+#endif
+#ifndef NoOpCDebugFlags
+#define NoOpCDebugFlags /**/
+#endif
+#ifndef DefaultCDebugFlags
+#define DefaultCDebugFlags OptimizedCDebugFlags
+#endif
+#ifndef DefaultCplusplusDebugFlags
+#define DefaultCplusplusDebugFlags OptimizedCplusplusDebugFlags
+#endif
+#ifndef DefaultCCOptions
+#define DefaultCCOptions /* floating point, etc. */
+#endif
+#ifndef DefaultCplusplusOptions
+#define DefaultCplusplusOptions /* floating point, etc. */
+#endif
+#ifndef HardCodeLibdirFlag
+#define HardCodeLibdirFlag /**/
+#endif
+#ifndef NoRConst
+#define NoRConst NO /* YES if const for structs of funcs is bad */
+#endif
+#ifndef InstPgmFlags
+# if CrossCompiling
+# define InstPgmFlags
+# else
+# define InstPgmFlags -s
+# endif
+#endif
+#ifndef InstBinFlags
+#define InstBinFlags -m 0755
+#endif
+#ifndef InstUidFlags
+#define InstUidFlags -m 4711
+#endif
+#ifndef InstLibFlags
+#define InstLibFlags -m 0644
+#endif
+#ifndef InstIncFlags
+#define InstIncFlags -m 0444
+#endif
+#ifndef InstManFlags
+#define InstManFlags -m 0444
+#endif
+#ifndef InstDatFlags
+#define InstDatFlags -m 0444
+#endif
+#ifndef InstKmemFlags /* put -g kmem -m 2711 in site.def... */
+#define InstKmemFlags InstUidFlags
+#endif
+#ifndef ParallelMakeFlags
+#define ParallelMakeFlags /**/
+#endif
+#ifndef ArCmdBase
+#define ArCmdBase ar
+#endif
+#ifndef ArCmd
+#if HasLargeTmp || SystemV4
+#define ArCmd ArCmdBase cq
+#else
+#define ArCmd ArCmdBase clq
+#endif
+#endif
+#ifndef ArAddCmd
+#if HasLargeTmp || SystemV4
+#define ArAddCmd ArCmdBase ru
+#else
+#define ArAddCmd ArCmdBase rul
+#endif
+#endif
+#ifndef ArExtCmd
+#if HasLargeTmp || SystemV4
+#define ArExtCmd ArCmdBase x
+#else
+#define ArExtCmd ArCmdBase xl
+#endif
+#endif
+#ifndef BootstrapCFlags
+#define BootstrapCFlags /**/
+#endif
+#ifndef HasGcc3
+#define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+#define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+#define HasGcc HasGcc2
+#endif
+#ifndef HasIntelC
+#define HasIntelC NO
+#endif
+#ifndef HasSunC
+#define HasSunC NO
+#endif
+#ifndef HasBrokenCCForLink
+#define HasBrokenCCForLink NO
+#endif
+#ifndef CcCmd
+#if HasGcc2
+#define CcCmd gcc -fpcc-struct-return
+#else
+#if HasGcc
+#define CcCmd gcc -fstrength-reduce -fpcc-struct-return
+#else
+#if HasCenterLineC
+#define CcCmd clcc
+#else
+#define CcCmd cc
+#endif
+#endif
+#endif
+#endif
+#ifndef CplusplusCmd
+#if HasGcc2ForCplusplus
+#define CplusplusCmd g++
+#else
+#define CplusplusCmd CC
+#endif
+#endif
+#ifndef CplusplusFilt
+# define CplusplusFilt c++filt
+#endif
+#ifndef CplusplusLibC
+#if HasGcc2ForCplusplus
+#define CplusplusLibC -lstdc++
+#else
+#define CplusplusLibC /**/
+#endif
+#endif
+#ifndef CplusplusStandardDefines
+#define CplusplusStandardDefines StandardDefines
+#endif
+#ifndef CplusplusExtraDefines
+#define CplusplusExtraDefines /**/
+#endif
+#ifndef CplusplusExtraIncludes
+#define CplusplusExtraIncludes /**/
+#endif
+#ifndef CplusplusDependIncludes
+#define CplusplusDependIncludes /**/
+#endif
+#ifndef CplusplusOptions
+#define CplusplusOptions DefaultCplusplusOptions
+#endif
+#ifndef CplusplusSpecialOptions
+#define CplusplusSpecialOptions /**/
+#endif
+#if HasFortran
+#ifndef FortranCmd
+#define FortranCmd f77
+#endif
+#ifndef FortranFlags
+#define FortranFlags /**/
+#endif
+#ifndef FortranDebugFlags /* for -O or -g */
+#define FortranDebugFlags /**/
+#endif
+#endif
+#ifndef AsCmd
+#define AsCmd as
+#endif
+#ifndef AsmDefines
+#define AsmDefines /**/
+#endif
+#ifndef CompressCmd
+#define CompressCmd compress
+#endif
+#ifndef GzipCmd
+#define GzipCmd gzip
+#endif
+#ifndef CppCmd
+#define CppCmd /LibDirName/cpp
+#endif
+#ifndef RawCppCmd
+#define RawCppCmd CppCmd -undef
+#endif
+#ifndef CppNoLineInfoOption
+#define CppNoLineInfoOption /**/
+#endif
+#ifndef PreProcessCmd
+#define PreProcessCmd CcCmd -E
+#endif
+#ifndef InstallCmd /* hack should be in project */
+#if SystemV || SystemV4
+#ifdef UseInstalled /* assume BINDIR in path */
+#define InstallCmd bsdinst
+#else
+#define InstallCmd $(SHELL) $(CONFIGSRC)/util/bsdinst.sh
+#endif
+#else
+#define InstallCmd install
+#endif
+#endif
+#ifndef InstallFlags
+#define InstallFlags -c
+#endif
+#ifndef StripCmd
+#define StripCmd strip
+#endif
+#ifndef LdCmd
+#define LdCmd ld
+#endif
+#ifndef M4Cmd
+#define M4Cmd m4
+#endif
+#ifndef M4Flags
+#define M4Flags /**/
+#endif
+#ifndef LexCmd
+#define LexCmd lex
+#endif
+#ifndef LexLib
+#define LexLib -ll
+#endif
+#ifndef HasFlex
+#define HasFlex NO
+#endif
+#ifndef YaccCmd
+#define YaccCmd yacc
+#endif
+#ifndef CplusplusYaccCmd
+#define CplusplusYaccCmd YaccCmd
+#endif
+#ifndef LintCmd
+#define LintCmd lint
+#endif
+#ifndef LintLibFlag
+#if SystemV || SystemV4
+#define LintLibFlag -o
+#else
+#define LintLibFlag -C
+#endif
+#endif
+#ifndef LintOpts
+#if SystemV || SystemV4
+#define LintOpts -bh
+#else
+#define LintOpts -axz
+#endif
+#endif
+#ifndef CpCmd
+#define CpCmd cp
+#endif
+#ifndef LnCmd /* can use cp instead of ln if necessary */
+#if HasSymLinks
+#define LnCmd ln -s
+#else
+#define LnCmd ln
+#endif
+#endif
+#ifndef MakeCmd
+#define MakeCmd make
+#endif
+#ifndef MvCmd
+#define MvCmd mv -f
+#endif
+#ifndef RanlibCmd
+#define RanlibCmd ranlib
+#endif
+#ifndef RanlibInstFlags
+#define RanlibInstFlags /**/
+#endif
+#ifndef RmCmd
+#define RmCmd rm -f
+#endif
+
+/*
+ * Module cross-compile stuff. By default they are defined to be exactly the
+ * same as the non-module versions.
+ */
+#ifndef ModuleCcCmd
+#define ModuleCcCmd CcCmd
+#endif
+#ifndef ModuleCppCmd
+#define ModuleCppCmd CppCmd
+#endif
+#ifndef ModuleCFlags
+#define ModuleCFlags $(CFLAGS)
+#endif
+#ifndef ModuleAsCmd
+#define ModuleAsCmd AsCmd
+#endif
+#ifndef ModuleAsFlags
+#define ModuleAsFlags /**/
+#endif
+#ifndef ModuleLdCmd
+#define ModuleLdCmd LdCmd
+#endif
+#ifndef ModuleLdFlags
+#define ModuleLdFlags /**/
+#endif
+#ifndef ModuleLdCombineFlags
+#define ModuleLdCombineFlags LdCombineFlags
+#endif
+#ifndef ModuleArCmd
+#define ModuleArCmd ArCmd
+#endif
+#ifndef NeedModuleRanlib
+#define NeedModuleRanlib NO
+#endif
+#ifndef ModuleRanlibCmd
+#define ModuleRanlibCmd RanlibCmd
+#endif
+
+#ifndef HostCcCmd
+#define HostCcCmd cc
+#endif
+#ifndef StandardIncludes /* for platform-specifics */
+#define StandardIncludes /**/
+#endif
+#ifndef StandardDefines
+#if SystemV
+#define StandardDefines -DSYSV
+#else
+#if SystemV4
+#define StandardDefines -DSVR4
+#else
+#define StandardDefines /**/
+#endif
+#endif
+#endif
+#ifndef StandardCppOptions
+#define StandardCppOptions /**/
+#endif
+#ifndef StandardCppDefines
+#define StandardCppDefines StandardCppOptions StandardDefines
+#endif
+#ifndef Malloc0ReturnsNull
+#if UseGnuMalloc
+#define Malloc0ReturnsNull YES
+#else
+#define Malloc0ReturnsNull NO
+#endif
+#endif
+#if Malloc0ReturnsNull
+#ifndef Malloc0ReturnsNullDefines
+#define Malloc0ReturnsNullDefines -DMALLOC_0_RETURNS_NULL
+#endif
+#endif
+#ifndef ToolkitStringsABIOptions
+#define ToolkitStringsABIOptions /**/
+#endif
+#ifndef NdbmDefines
+#if HasNdbm
+#define NdbmDefines -DNDBM
+#else
+#define NdbmDefines /**/
+#endif
+#endif
+#ifndef HasLdRunPath
+#define HasLdRunPath NO
+#endif
+#ifndef LdPreLib
+# if !defined(UseInstalled)
+# define LdPreLib -L$(BUILDLIBDIR)
+# else
+# if AlternateUsrLibDir
+# define LdPreLib -L$(USRLIBDIR)
+# else
+# define LdPreLib /**/
+# endif
+#endif
+#endif
+#ifndef LdPostLib
+#if !defined(UseInstalled) && AlternateUsrLibDir && !HasLdRunPath && !defined(CrossCompileDir)
+#define LdPostLib -L$(USRLIBDIR)
+#else
+#define LdPostLib /**/
+#endif
+#endif
+#ifndef MathLibrary
+#define MathLibrary -lm
+#endif
+#ifndef DBMLibrary
+#define DBMLibrary -ldbm
+#endif
+#ifndef DlLibrary
+#define DlLibrary -ldl
+#endif
+#ifndef ExtraLibraries
+#if SystemV4
+#if HasSockets
+#define ExtraLibraries -lsocket -lnsl -lw
+#else
+#define ExtraLibraries -lnsl -lw
+#endif
+#else
+#define ExtraLibraries /**/
+#endif
+#endif
+#ifndef ExtraLoadOptions
+#define ExtraLoadOptions /**/
+#endif
+#ifndef ExtraLoadFlags
+#define ExtraLoadFlags /**/
+#endif
+#ifndef LdCombineFlags
+#if SystemV4
+#define LdCombineFlags -r
+#else
+#define LdCombineFlags -X -r
+#endif
+#endif
+#ifndef LdStripFlags
+#define LdStripFlags -x
+#endif
+#ifndef TagsCmd
+#define TagsCmd ctags
+#endif
+#ifndef LoaderLibPrefix
+#define LoaderLibPrefix /**/
+#endif
+#ifndef ImakeCmd
+#ifdef UseInstalled /* assume BINDIR in path */
+#define ImakeCmd imake
+#else
+#define ImakeCmd $(IMAKESRC)/imake
+#endif
+#endif
+#ifndef ImakeWarningFlags
+#define ImakeWarningFlags /* Nothing */
+#endif
+#ifndef DependCmd
+#if UseGccMakeDepend
+#ifdef UseInstalled /* assume BINDIR in path */
+#define DependCmd gccmakedep
+#else
+#define DependCmd $(DEPENDSRC)/gccmakedep
+#endif
+#elif UseCCMakeDepend
+#ifdef UseInstalled /* assume BINDIR in path */
+#define DependCmd ccmakedep
+#else
+#define DependCmd $(DEPENDSRC)/ccmakedep
+#endif
+#else
+#ifdef UseInstalled /* assume BINDIR in path */
+#define DependCmd makedepend
+#else
+#define DependCmd $(DEPENDSRC)/makedepend
+#endif
+#endif
+#endif
+#ifndef DependDefines
+# if UseCCMakeDepend || UseGccMakeDepend
+# define DependDefines /**/
+# else
+# define DependDefines -DUSE_MAKEDEPEND
+# endif
+#endif
+#ifndef DependFlags
+#define DependFlags /**/
+#endif
+#ifndef DependFileName
+#if !HasBsdMake
+#define DependFileName Makefile.dep
+#else
+#define DependFileName .depend
+#endif
+#endif
+#ifndef ExportListCmd
+# ifndef ExportListGenSource
+# define ExportListCmd /**/
+# elif !defined(UseInstalled)
+# define ExportListCmd $(CONFIGSRC)/util/exportlistgen
+# else
+# define ExportListCmd exportlistgen
+# endif
+#endif
+#ifndef MkdirHierCmd
+#ifdef UseInstalled /* assume BINDIR in path */
+#define MkdirHierCmd mkdirhier
+#else
+#define MkdirHierCmd $(SHELL) $(CONFIGSRC)/util/mkdirhier.sh
+#endif
+#endif
+#ifndef RevPathCmd
+#ifdef UseInstalled /* assume BINDIR in path */
+#define RevPathCmd revpath
+#else
+#define RevPathCmd $(CONFIGSRC)/util/revpath
+#endif
+#endif
+#ifndef TroffCmd
+#if HasGroff
+#define TroffCmd groff -Tps
+#else
+#define TroffCmd troff -Tps
+#endif
+#endif
+#ifndef NroffCmd
+#define NroffCmd nroff
+#endif
+#ifndef HTMLroffCmd
+#if HasGroff && HasGroffHtml
+#define HTMLroffCmd groff -Thtml
+#endif
+#endif
+#ifdef HTMLroffCmd
+#ifndef DocFilesToClean
+#define DocFilesToClean grohtml*.png *-auto-*.png
+#endif
+#endif
+#ifndef MsMacros
+#define MsMacros -ms
+#endif
+#ifndef ManMacros
+#define ManMacros -man
+#endif
+#ifndef TblCmd
+#define TblCmd tbl
+#endif
+#ifndef EqnCmd
+#define EqnCmd eqn
+#endif
+#ifndef NeqnCmd
+#define NeqnCmd neqn
+#endif
+#ifndef ColCmd
+#define ColCmd col
+#endif
+#ifndef ColFlags
+#define ColFlags -b
+#endif
+#ifndef DvipsCmd
+#define DvipsCmd dvips
+#endif
+#ifndef LatexCmd
+#define LatexCmd latex
+#endif
+#ifndef HasPdfLatex
+#define HasPdfLatex NO
+#endif
+#ifndef PdfLatexCmd
+#define PdfLatexCmd pdflatex
+#endif
+#ifndef GhostScriptCmd
+#define GhostScriptCmd gs
+#endif
+#ifndef HasGhostPCL
+#define HasGhostPCL NO
+#endif
+#ifndef HasGhostScript
+#define HasGhostScript NO
+#endif
+#ifndef BuildPDFdocs
+#define BuildPDFdocs (HasGhostScript)
+#endif
+#if BuildPDFdocs
+#define PsToPdfCmd GhostScriptCmd -q -sOutputFile=- -sDEVICE=pdfwrite -dSAFER -dNOPAUSE -
+#endif
+#if HasSentinel
+#ifndef SentinelCmd
+#define SentinelCmd sentinel
+#endif
+#ifndef SentinelOptions
+#define SentinelOptions /**/
+#endif
+#endif
+#if HasPurify
+#ifndef PurifyCmd
+#define PurifyCmd purify
+#endif
+#ifndef PurifyOptions
+#define PurifyOptions /**/
+#endif
+#endif
+#if HasTestCenter
+#ifndef ProofCmd
+#define ProofCmd proof
+#endif
+#ifndef ProofOptions
+#define ProofOptions /**/
+#endif
+#endif
+#ifndef PathSeparator
+#define PathSeparator /
+#endif
+#ifndef Osuf
+#define Osuf o
+#endif
+#ifndef CCsuf
+#define CCsuf cc
+#endif
+#ifndef SHsuf
+#define SHsuf sh
+#endif
+#ifndef ManSuffix
+#define ManSuffix n /* use just one tab or cpp will die */
+#endif
+#ifndef LibManSuffix
+#define LibManSuffix 3 /* use just one tab or cpp will die */
+#endif
+#ifndef FileManSuffix
+#if SystemV || SystemV4 || defined(OSF1Architecture)
+#define FileManSuffix 4 /* use just one tab or cpp will die */
+#else
+#define FileManSuffix 5 /* use just one tab or cpp will die */
+#endif
+#endif
+#ifndef MiscManSuffix
+#if SystemV || SystemV4 || defined(OSF1Architecture)
+#define MiscManSuffix 5 /* use just one tab or cpp will die */
+#else
+#define MiscManSuffix 7 /* use just one tab or cpp will die */
+#endif
+#endif
+#ifndef DriverManSuffix
+#if SystemV || SystemV4 || defined(OSF1Architecture)
+#define DriverManSuffix 7 /* use just one tab or cpp will die */
+#else
+#define DriverManSuffix 4 /* use just one tab or cpp will die */
+#endif
+#endif
+#ifndef AdminManSuffix
+#if SystemV || SystemV4
+#define AdminManSuffix 1m /* use just one tab or cpp will die */
+#else
+#define AdminManSuffix 8 /* use just one tab or cpp will die */
+#endif
+#endif
+#ifndef ExpandManNames
+#if SystemV
+#define ExpandManNames NO
+#else
+#define ExpandManNames YES
+#endif
+#endif
+#ifndef ManSrcSuffix
+#define ManSrcSuffix man
+#endif
+#ifndef ManNewSuffix
+#define ManNewSuffix _man
+#endif
+#ifndef TOPDIR
+#define TOPDIR .
+#endif
+#ifndef CURDIR
+#define CURDIR .
+#endif
+#ifndef SiteIConfigFiles
+#define SiteIConfigFiles /**/
+#endif
+#ifndef OtherIConfigFiles
+#define OtherIConfigFiles /**/
+#endif
+#ifndef ExtraFilesToClean
+#define ExtraFilesToClean /**/
+#endif
+#ifndef DocFilesToClean
+#define DocFilesToClean /**/
+#endif
+#ifndef FilesToClean
+#define FilesToClean *.CKP *.ln *.BAK *.bak *.Osuf core errs ,* *~ *.a .emacs_* tags TAGS make.log MakeOut
+#endif
+
+#ifdef CrossCompileDir
+# ifndef StripPath
+# define StripPath(x) `echo x|sed "s%.*/%%"`
+# endif
+# ifndef CrossArCmd
+# define CrossArCmd Concat3(CrossCompileDir,/,StripPath(ArCmd))
+# endif
+# ifndef CrossCcCmd
+# define CrossCcCmd Concat3(CrossCompileDir,/,StripPath(CcCmd))
+# endif
+# ifndef CrossAsCmd
+# define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd))
+# endif
+# ifdef HasFortran
+# ifndef CrossFortranCmd
+# define CrossFortranCmd Concat3(CrossCompileDir,/,StripPath(FortranCmd))
+# endif
+# endif
+# ifndef CrossCplusplusCmd
+# define CrossCplusplusCmd Concat3(CrossCompileDir,/,StripPath(CplusplusCmd))
+# endif
+# ifndef CrossCppCmd
+# define CrossCppCmd Concat3(CrossCompileDir,/,StripPath(CppCmd))
+# endif
+# ifndef CrossRawCppCmdCmd
+# define CrossRawCppCmd Concat3(CrossCompileDir,/,StripPath(RawCppCmd))
+# endif
+# ifndef CrossPreProcessCmd
+# define CrossPreProcessCmd Concat3(CrossCompileDir,/,StripPath(PreProcessCmd))
+# endif
+# ifndef CrossAsCmd
+# define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd))
+# endif
+# ifndef CrossLdCmd
+# define CrossLdCmd Concat3(CrossCompileDir,/,StripPath(LdCmd))
+# endif
+# ifndef CrossModuleLdCmd
+# define CrossModuleLdCmd CrossLdCmd
+# endif
+# ifndef CrossLintCmd
+# define CrossLintCmd Concat3(CrossCompileDir,/,StripPath(LintCmd))
+# endif
+# ifndef CrossRanlibCmd
+# define CrossRanlibCmd Concat3(CrossCompileDir,/,StripPath(RanlibCmd))
+# endif
+# ifndef CrossModuleCcCmd
+# define CrossModuleCcCmd Concat3(CrossCompileDir,/,StripPath(ModuleCcCmd))
+# endif
+# ifndef CrossAsCmd
+# define CrossAsCmd Concat3(CrossCompileDir,/,StripPath(AsCmd))
+# endif
+# ifndef CrossStripCmd
+# define CrossStripCmd Concat3(CrossCompileDir,/,StripPath(StripCmd))
+# endif
+#endif
+
+ PATHSEP = PathSeparator
+ SHELL = BourneShell
+
+ TOP = TOPDIR
+ CURRENT_DIR = CURDIR
+
+ IMAKE = ImakeCmd
+ DEPEND = DependCmd
+ MKDIRHIER = MkdirHierCmd
+ REVPATH = RevPathCmd
+ EXPORTLISTGEN = ExportListCmd
+ RMAN = RmanCmd
+ RMANBASENAME = HostProgramTargetName(rman)
+ RMANOPTIONS = RmanOptions
+ CONFIGSRC = ConfigSrc
+ IMAKESRC = $(CONFIGSRC)/imake
+ DEPENDSRC = DependDir
+
+ INCROOT = IncRoot /* base of where to put header files */
+ USRLIBDIR = UsrLibDir /* nonshared libraries */
+ VARDIR = VarDirectory /* usually /var */
+ VARLIBDIR = VarLibDir /* xdm runtime files */
+ SYSTEMUSRLIBDIR = SystemUsrLibDir /* system's "/usr/lib" */
+ SYSTEMUSRINCDIR = SystemUsrIncDir /* system's "/usr/include" */
+ SHLIBDIR = ShLibDir /* shared libraries */
+ LINTLIBDIR = LintlibDir /* lint libraries */
+ MANPATH = ManPath /* top of manual page tree */
+ MANSOURCEPATH = ManSourcePath /* prefix for man page sources */
+ MANDIR = ManDir /* man pages for commands */
+ LIBMANDIR = LibmanDir /* man pages for library routines */
+ FILEMANDIR = FileManDir /* man pages for config files */
+ MISCMANDIR = MiscManDir /* man pages for miscellaneous files */
+ DRIVERMANDIR = DriverManDir /* man pages for drivers */
+ LOGDIRECTORY = LogDirectory /* OS location of log files */
+#ifdef VarRunDirectory
+ VARRUNDIR = VarRunDirectory /* OS location of PID files */
+#endif
+#ifdef VarDbDirectory
+ VARDBDIR = VarDbDirectory /* OS location of db/state files */
+#endif
+#ifdef CrossCompileDir
+ AR = CrossArCmd
+#else
+ AR = ArCmd
+#endif
+XCOMM Nice try but useless: make will inherit BOOTSTRAPCFLAGS
+XCOMM from top Makefile
+ BOOTSTRAPCFLAGS = BootstrapCFlags /* set if cpp does not have uniq sym */
+#ifdef CrossCompileDir
+ CC = CrossCcCmd
+ AS = CrossAsCmd
+#else
+ CC = CcCmd
+ AS = AsCmd
+#endif
+#if HasFortran
+# ifdef CrossCompileDir
+ FC = CrossFortranCmd
+# else
+ FC = FortranCmd
+# endif
+ FDEBUGFLAGS = FortranDebugFlags
+ FCFLAGS = FortranFlags $(FDEBUGFLAGS)
+#endif
+#if HasCplusplus
+
+.SUFFIXES: Concat(.,CCsuf)
+
+#ifdef CrossCompileDir
+ CXX = CrossCplusplusCmd
+#else
+ CXX = CplusplusCmd
+#endif
+ CXXFILT = CplusplusFilt
+#ifdef CplusplusLibCDir
+ CXXLIBDIR = CplusplusLibCDir
+ CXXLIB = -L$(CXXLIBDIR) CplusplusLibC
+#else
+ CXXLIB = CplusplusLibC
+#endif
+
+ CXXDEBUGFLAGS = DefaultCplusplusDebugFlags
+CXXDEPENDINCLUDES = CplusplusDependIncludes
+ CXXEXTRA_DEFINES = CplusplusExtraDefines
+CXXEXTRA_INCLUDES = CplusplusExtraIncludes
+ CXXSTD_DEFINES = CplusplusStandardDefines $(CXXPROJECT_DEFINES)
+ CXXOPTIONS = CplusplusOptions
+ CXXINCLUDES = $(INCLUDES) $(TOP_INCLUDES) $(CXXEXTRA_INCLUDES)
+ CXXDEFINES = $(CXXINCLUDES) $(CXXSTD_DEFINES) $(THREADS_CXXDEFINES) $(DEFINES) $(CXXEXTRA_DEFINES)
+ CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
+#endif
+ COMPRESS = CompressCmd
+ GZIPCMD = GzipCmd
+#ifdef CrossCompileDir
+ CPP = CrossCppCmd $(STD_CPP_DEFINES)
+ RAWCPP = CrossRawCppCmd $(STD_CPP_OPTIONS)
+ PREPROCESSCMD = CrossPreProcessCmd $(STD_CPP_DEFINES)
+#else
+ CPP = CppCmd $(STD_CPP_DEFINES) /* simple filters */
+ RAWCPP = RawCppCmd $(STD_CPP_OPTIONS)
+ PREPROCESSCMD = PreProcessCmd $(STD_CPP_DEFINES) /* prefered; mdep */
+#endif
+ INSTALL = InstallCmd
+ INSTALLFLAGS = InstallFlags
+#ifdef CrossCompileDir
+ LD = CrossLdCmd
+#else
+ LD = LdCmd
+#endif
+ LEX = LexCmd
+ M4 = M4Cmd
+ M4FLAGS = M4Flags
+ LEXLIB = LexLib
+ YACC = YaccCmd
+ CCYACC = CplusplusYaccCmd
+#ifdef CrossCompileDir
+ LINT = CrossLintCmd
+#else
+ LINT = LintCmd
+#endif
+ LINTLIBFLAG = LintLibFlag
+ LINTOPTS = LintOpts
+ LN = LnCmd
+ MAKE = MakeCmd
+ MV = MvCmd
+ CP = CpCmd
+#if DoRanlibCmd
+#ifdef CrossCompileDir
+ RANLIB = CrossCompileDir/RanlibCmd
+#else
+ RANLIB = RanlibCmd
+#endif
+ RANLIBINSTFLAGS = RanlibInstFlags
+#endif
+ RM = RmCmd
+ PERL = PerlCmd
+ PERLOPTS = PerlOptions
+ PERLENVSETUP = PerlEnvSetup
+ MANSUFFIX = ManSuffix /* suffix for command man pages */
+ LIBMANSUFFIX = LibManSuffix /* suffix for library man pages */
+ FILEMANSUFFIX = FileManSuffix /* suffix for file format man pages */
+ MISCMANSUFFIX = MiscManSuffix /* suffix for misc man pages */
+ DRIVERMANSUFFIX = DriverManSuffix /* suffix for driver man pages */
+ ADMINMANSUFFIX = AdminManSuffix /* suffix for admin command man pages */
+ MANSRCSUFFIX = ManSrcSuffix /* suffix for man page source */
+ MANNEWSUFFIX = ManNewSuffix /* suffix for preprocessed man source */
+ MANDEFS = AppLoadDefs AppManDefs FileManDefs LibManDefs MiscManDefs DriverManDefs AdminManDefs ProjectManDefs XConfigFileManDefs XConfigDirManDefs XLogFileManDefs XServerManDefs $(XORGMANDEFS) $(VENDORMANDEFS)
+
+ COMPRESSMANCMD = CompressManCmd
+
+ TROFF = TroffCmd
+ NROFF = NroffCmd
+#ifdef HTMLroffCmd
+ HTMLROFF = HTMLroffCmd
+#endif
+#ifdef PsToPdfCmd
+ PSTOPDFCMD = PsToPdfCmd
+#endif
+ MSMACROS = MsMacros
+ MANMACROS = ManMacros
+ TBL = TblCmd
+ EQN = EqnCmd
+ NEQN = NeqnCmd
+ COL = ColCmd
+ COLFLAGS = ColFlags
+#ifdef CrossCompileDir
+ MODCC = CrossModuleCcCmd
+#else
+ MODCC = ModuleCcCmd
+#endif
+ MODCPP = ModuleCppCmd
+ MODCFLAGS = ModuleCFlags
+ MODAS = ModuleAsCmd
+ MODASFLAGS = ModuleAsFlags
+#ifdef CrossCompileDir
+ MODLD = CrossModuleLdCmd
+#else
+ MODLD = ModuleLdCmd
+#endif
+ MODLDFLAGS = ModuleLdFlags
+MODLDCOMBINEFLAGS = ModuleLdCombineFlags
+ MODAR = ModuleArCmd
+#ifdef CrossCompileDir
+ MODRANLIB = CrossCompileDir/ModuleRanlibCmd
+#else
+ MODRANLIB = ModuleRanlibCmd
+#endif
+#if HasLatex
+ DVIPS = DvipsCmd
+ LATEX = LatexCmd
+#endif
+#if HasPdfLatex
+ PDFLATEXCMD = PdfLatexCmd
+#endif
+#if HasSentinel
+ SENTINEL = SentinelCmd
+ SENTINELOPTIONS = SentinelOptions
+#endif
+#if HasPurify
+ PURIFY = PurifyCmd
+ PURIFYOPTIONS = PurifyOptions
+#endif
+#if HasTestCenter
+ PROOF = ProofCmd
+ PROOFOPTIONS = ProofOptions
+#endif
+#if CrossCompiling
+ HOST_CC = HostCcCmd
+#endif
+ STD_INCLUDES = StandardIncludes
+ STD_CPP_OPTIONS = StandardCppOptions
+ STD_CPP_DEFINES = StandardCppOptions StandardCppDefines $(PROJECT_DEFINES)
+ STD_DEFINES = StandardDefines $(PROJECT_DEFINES)
+ EXTRA_LOAD_FLAGS = ExtraLoadFlags
+ EXTRA_LDOPTIONS = ExtraLoadOptions
+ EXTRA_LIBRARIES = MallocLibraries ExtraLibraries Krb5Libraries
+ TAGS = TagsCmd
+#if ConstructMFLAGS
+ MFLAGS = -$(MAKEFLAGS)
+#endif
+#if ConstructMAKEFLAGS
+ MAKEFLAGS = $(MFLAGS)
+#endif
+ PARALLELMFLAGS = ParallelMakeFlags
+#if HasSharedLibraries
+ SHAREDCODEDEF = SharedCodeDef
+ SHLIBDEF = SharedLibraryDef
+#ifdef SharedLibraryLoadFlags
+ SHLIBLDFLAGS = SharedLibraryLoadFlags $(SHLIBGLOBALSFLAGS)
+#if HasGcc
+ NOSTDLIB = -nostdlib
+ POSTNOSTDLIB = -Wl,-Bstatic -lgcc -Wl,-Bdynamic
+#elif HasIntelC
+ NOSTDLIB = -nostdlib
+ POSTNOSTDLIB =
+#elif HasSunC
+ NOSTDLIB = -xnolib
+ POSTNOSTDLIB =
+#endif
+#endif
+/*
+ * Here we set up flags needed to produce position-independent code
+ * when doing C and C++ compilation. The default if you specify C
+ * PIC flags without also specifying C++ PIC flags is to assume that
+ * the C flags work for both. If your C++ compiler requires different
+ * flags, specify them explicitly in PositionIndependentCplusplusFlags.
+ */
+#ifdef PositionIndependentCFlags
+ PICFLAGS = PositionIndependentCFlags
+#endif
+#ifdef PositionIndependentCplusplusFlags
+ CXXPICFLAGS = PositionIndependentCplusplusFlags
+#else
+#ifdef PositionIndependentCFlags
+ CXXPICFLAGS = PositionIndependentCFlags
+#endif
+#endif
+#endif
+#if !HasVoidSignalReturn
+ SIGNAL_DEFINES = -DSIGNALRETURNSINT
+#endif
+/*
+ * The following supports forcing of function prototypes
+ */
+#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes && NeedNestedPrototypes
+#define _funcprotodef -DFUNCPROTO=15
+#else
+#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedNestedPrototypes
+#define _funcprotodef -DFUNCPROTO=11
+#else
+#if NeedFunctionPrototypes && NeedNestedPrototypes
+#define _funcprotodef -DFUNCPROTO=9
+#else
+#if NeedFunctionPrototypes && NeedVarargsPrototypes && NeedConstPrototypes
+#define _funcprotodef -DFUNCPROTO=7
+#else
+#if NeedFunctionPrototypes && NeedConstPrototypes
+#define _funcprotodef -DFUNCPROTO=5
+#else
+#if NeedFunctionPrototypes && NeedVarargsPrototypes
+#define _funcprotodef -DFUNCPROTO=3
+#else
+#if NeedFunctionPrototypes
+#define _funcprotodef -DFUNCPROTO
+#else
+#define _funcprotodef /**/
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+#if NeedWidePrototypes
+#define _wideprotodef /**/
+#else
+#define _wideprotodef -DNARROWPROTO
+#endif
+ PROTO_DEFINES = _funcprotodef _wideprotodef
+#undef _funcprotodef
+#undef _wideprotodef
+
+#if StripInstalledPrograms
+ INSTPGMFLAGS = InstPgmFlags /* install flags for stripping */
+#else
+ INSTPGMFLAGS =
+#endif
+ INSTBINFLAGS = InstBinFlags /* install flags for programs */
+ INSTUIDFLAGS = InstUidFlags /* install flags for setuid programs */
+ INSTLIBFLAGS = InstLibFlags /* install flags for libraries */
+ INSTINCFLAGS = InstIncFlags /* install flags for headers */
+ INSTMANFLAGS = InstManFlags /* install flags for man pages */
+ INSTDATFLAGS = InstDatFlags /* install flags for data files */
+ INSTKMEMFLAGS = InstKmemFlags /* install flags for /dev/kmem progs */
+
+#ifdef ProjectRoot
+ PROJECTROOT = ProjectRoot
+#endif
+#ifdef UseInstalled
+# if AlternateIncRoot
+# define TopInclude -I$(INCROOT)
+# else
+# define TopInclude /**/
+# endif
+#else
+# define TopInclude -I$(TOP)
+#endif
+
+ CDEBUGFLAGS = DefaultCDebugFlags
+ CCOPTIONS = DefaultCCOptions /* to distinguish from param flags */
+/*
+ * STD_INCLUDES contains system-specific includes
+ * TOP_INCLUDES specifies how to get to /usr/include or its build substitute
+ * EXTRA_INCLUDES contains project-specific includes set in project incfiles
+ * INCLUDES contains client-specific includes set in Imakefile
+ * LOCAL_LDFLAGS contains client-specific ld flags flags set in Imakefile
+ */
+ ALLINCLUDES = $(INCLUDES) $(EXTRA_INCLUDES) $(TOP_INCLUDES) $(INSTALLED_INCLUDES) $(STD_INCLUDES)
+ ALLDEFINES = $(ALLINCLUDES) $(STD_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(MODULE_DEFINES) $(DEFINES) $(EXTRA_DEFINES)
+ CFLAGS = $(CDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(MODULE_CFLAGS) $(ALLDEFINES)
+ LINTFLAGS = $(LINTOPTS) -DLINT $(ALLDEFINES) $(DEPEND_DEFINES)
+ LDPRELIB = LdPreLib $(INSTALLED_LIBS)
+ LDPOSTLIB = LdPostLib
+ LDOPTIONS = $(CDEBUGFLAGS) $(CCOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_LDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
+ CXXLDOPTIONS = $(CXXDEBUGFLAGS) $(CXXOPTIONS) $(EXTRA_LDOPTIONS) $(THREADS_CXXLDFLAGS) $(LOCAL_LDFLAGS) $(LDPRELIBS)
+
+ LDLIBS = $(LDPOSTLIBS) $(THREADS_LIBS) $(SYS_LIBRARIES) $(EXTRA_LIBRARIES)
+#if HasBrokenCCForLink
+ CCLINK = LdCmd
+#else
+#if AlternateUsrLibDir && HasLdRunPath
+ CCENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
+ CCLINK = $(CCENVSETUP) $(CC)
+#else
+ CCLINK = $(CC)
+#endif
+#endif
+#if AlternateUsrLibDir && HasLdRunPath
+ CXXENVSETUP = LD_RUN_PATH=$(USRLIBDIRPATH)
+ CXXLINK = $(CXXENVSETUP) $(CXX)
+#else
+ CXXLINK = $(CXX)
+#endif
+ LDSTRIPFLAGS = LdStripFlags
+ LDCOMBINEFLAGS = LdCombineFlags
+ DEPENDFLAGS = DependFlags
+ DEPEND_DEFINES = DependDefines
+
+XCOMM Not sure this belongs here
+ TKLIBDIR = TkLibDir
+ TKINCDIR = TkIncDir
+ TKLIBNAME = TkLibName
+ TKLIBRARY = TkLibrary
+ TCLLIBDIR = TclLibDir
+ TCLINCDIR = TclIncDir
+ TCLLIBNAME = TclLibName
+ TCLLIBRARY = TclLibrary
+
+ MACROFILE = MacroFile
+ RM_CMD = $(RM)
+
+ IMAKE_DEFINES = /* leave blank, for command line use only */
+ IMAKE_WARNINGS = ImakeWarningFlags
+#ifdef UseInstalled
+ IRULESRC = $(CONFIGDIR) /* used in rules file */
+ IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(IRULESRC) $(IMAKE_DEFINES) \
+ $(IMAKE_WARNINGS)
+#else
+ IRULESRC = $(CONFIGSRC)/cf
+ IMAKE_CMD = $(IMAKE) -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
+#endif
+#if !HasClearmake
+ /* clearmake records relevant defines and flags in the build script,
+ so it knows when they change and we don't need this coarser-level
+ dependency. We also don't want it, since it prevents sharing if
+ even one config file, say site.def or host.def, changes. */
+ ICONFIGFILES = $(IRULESRC)/Imake.tmpl $(IRULESRC)/X11.tmpl \
+ $(IRULESRC)/site.def $(IRULESRC)/$(MACROFILE) \
+ OtherIConfigFiles SiteIConfigFiles $(EXTRA_ICONFIGFILES)
+#endif
+
+#ifndef TopLevelProject
+# define TopLevelProject X11
+#endif
+#ifndef ProjectRulesFile
+# define ProjectRulesFile Concat3(<,TopLevelProject,.rules>)
+#endif
+#include ProjectRulesFile
+#ifndef LocalRulesFile
+/* need this to make ANSI-style preprocessors happy */
+#define LocalRulesFile <noop.rules>
+#endif
+#include LocalRulesFile
+
+/*
+ * get project-specific configuration and rules
+ */
+#ifndef ProjectTmplFile
+#define ProjectTmplFile Concat3(<,TopLevelProject,.tmpl>)
+#endif
+#include ProjectTmplFile
+#ifndef LocalTmplFile
+/* need this to make ANSI-style preprocessors happy */
+#define LocalTmplFile <noop.rules>
+#endif
+#include LocalTmplFile
+
+#if !BuildLibraries && AlternateIncRoot && !defined(CrossCompileDir)
+INSTALLED_INCLUDES = -I$(INCROOT)
+#endif
+
+#if !defined(UseInstalled) && !BuildLibraries && AlternateUsrLibDir && !defined(CrossCompileDir)
+INSTALLED_LIBS = -L$(USRLIBDIR)
+#endif
+
+#ifdef FixupLibReferences
+FixupLibReferences()
+#endif
+
+/* ConfigDir comes from X11.tmpl */
+ CONFIGDIR = ConfigDir /* build configuration information */
+#if HasClearmake
+ OSNAME = OSName
+#endif
+ USRLIBDIRPATH = UsrLibDirPath
+ LDPRELIBS = LdPreLibs $(INSTALLED_LIBS)
+ LDPOSTLIBS = LdPostLibs
+ TOP_INCLUDES = TopIncludes
+ PROJECT_DEFINES = ProjectDefines
+ VENDOR_DEFINES = VendorDefines
+#if HasCplusplus
+CXXPROJECT_DEFINES = CplusplusProjectDefines
+#endif
+
+XCOMM ----------------------------------------------------------------------
+XCOMM start of Imakefile
+#include INCLUDE_IMAKEFILE
+
+XCOMM ----------------------------------------------------------------------
+XCOMM common rules for all Makefiles - do not edit
+
+.c.i:
+ CPPOnlyCompile($*.c,$(_NOOP_))
+
+.SUFFIXES: .ii
+
+.cc.ii:
+ CPPOnlyCompile($*.cc,$(_NOOP_))
+
+.SUFFIXES: .s
+
+.c.s:
+ CompileCToAsm($(_NOOP_))
+
+.cc.s:
+ CompileCplusplusToAsm($(_NOOP_))
+
+/*
+ * These need to be here so that rules in Imakefile occur first; the blank
+ * emptyrule is to make sure that an empty Imakefile does not default to make
+ * clean.
+ */
+emptyrule::
+
+CleanTarget()
+
+#ifndef IHaveSpecialMakefileTarget
+MakefileTarget()
+#endif
+
+#if BuildHtmlManPages
+RmanDependency()
+#endif
+
+TagsTarget()
+#ifdef MakefileAdditions
+MakefileAdditions()
+#endif
+
+CenterLoadTarget(debug_src,$(SRCS),NullParameter,$(ALLDEFINES))
+
+CenterLoadTarget(debug_obj,$(OBJS),NullParameter,$(ALLDEFINES))
+
+ManKeywordsTarget($(MANPATH))
+
+HtmlManIndex
+
+/* Generate the "real" clean rules */
+#undef clean
+
+clean:: cleandir
+
+distclean:: cleandir
+
+#ifdef IHaveSubdirs
+XCOMM ----------------------------------------------------------------------
+XCOMM rules for building in SUBDIRS - do not edit
+
+InstallSubdirs($(SUBDIRS))
+InstallManSubdirs($(SUBDIRS))
+InstallDriverSDKSubdirs($(SUBDIRS))
+CleanSubdirs($(SUBDIRS))
+TagSubdirs($(SUBDIRS))
+MakefileSubdirs($(SUBDIRS))
+IncludesSubdirs($(SUBDIRS))
+
+/* "distclean" subdirectories */
+#undef BootstrapCleanSubdirs
+#define BootstrapCleanSubdirs /**/
+#define clean distclean
+CleanSubdirs($(SUBDIRS))
+#undef clean
+
+#endif
+
+#if !DontPreprocessManPages || defined(PreprocessManPages)
+ PREPROCESSMANPAGES = true
+#endif
+/* must be after all install.man rules that install anything */
+#ifndef MakeManKeywords
+#define MakeManKeywords NO
+#endif
+#if MakeManKeywords /* typically only at top level */
+install.man:: man_keywords
+#endif
+
+/* must be after all install.man rules that install anything */
+#ifndef MakeHtmlManIndex
+#define MakeHtmlManIndex NO
+#endif
+#if MakeHtmlManIndex /* typically only at top level */
+install.man:: html_index
+#endif
+
+#ifndef IHaveSubdirs
+XCOMM ----------------------------------------------------------------------
+XCOMM empty rules for directories that do not have SUBDIRS - do not edit
+
+install::
+ @echo "install in $(CURRENT_DIR) done"
+
+install.man::
+ @echo "install.man in $(CURRENT_DIR) done"
+
+install.sdk::
+ @echo "install.sdk in $(CURRENT_DIR) done"
+
+Makefiles::
+
+includes::
+
+depend::
+
+#endif /* if subdirectory rules are needed */
+
+#ifndef IHaveSpecialMakefileTarget
+/* "distclean" also removes the Makefile and the depend file */
+distclean::
+ RemoveFiles(Makefile DependFileName)
+#endif
+
+XCOMM ----------------------------------------------------------------------
+XCOMM dependencies generated by makedepend
+IncludeMakefile(DependFileName)
diff --git a/nx-X11/config/cf/Imakefile b/nx-X11/config/cf/Imakefile
new file mode 100644
index 000000000..2eb7e995c
--- /dev/null
+++ b/nx-X11/config/cf/Imakefile
@@ -0,0 +1,173 @@
+XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+XCOMM $XFree86: xc/config/cf/Imakefile,v 3.29 2002/10/16 14:07:49 tsi Exp $
+
+XCOMM Some compilers generate fatal errors if an -L directory does
+XCOMM not exist. Since BUILDLIBDIR may not exist yet suppress its use.
+ LDPRELIB =
+ LDPRELIBS =
+
+#ifdef LocalConfigFiles
+LOCALFILES = LocalConfigFiles
+#endif
+
+#ifndef InstallEmptyHostDef
+HOSTDEFFILES = \
+host.def
+#endif
+
+#if defined(XFree86Version) || defined(XorgVersion)
+VERSIONDEFFILES = \
+date.def \
+version.def
+#endif
+
+DEFFILES = \
+xf86site.def \
+xorgsite.def \
+$(VERSIONDEFFILES) \
+$(HOSTDEFFILES) \
+site.def \
+xorgversion.def
+
+RULEFILES = \
+Imake.rules \
+Motif.rules \
+Win32.rules \
+X11.rules \
+bsdLib.rules \
+cde.rules \
+cygwin.rules \
+mingw.rules \
+darwinLib.rules \
+gnuLib.rules \
+hpLib.rules \
+ibmLib.rules \
+lnxLib.rules \
+lnxdoc.rules \
+necLib.rules \
+noop.rules \
+nto.rules \
+oldlib.rules \
+os2.rules \
+os2Lib.rules \
+os2Lib.rules \
+osfLib.rules \
+scoLib.rules \
+sgiLib.rules \
+sunLib.rules \
+sv3Lib.rules \
+sv4Lib.rules \
+QNX4.rules \
+xf86.rules
+
+TMPLFILES = \
+Imake.tmpl \
+Library.tmpl \
+Motif.tmpl \
+Server.tmpl \
+ServerLib.tmpl \
+Threads.tmpl \
+WinLib.tmpl \
+X11.tmpl \
+bsdLib.tmpl \
+cde.tmpl \
+cygwin.tmpl \
+mingw.tmpl \
+darwinLib.tmpl \
+hpLib.tmpl \
+gnuLib.tmpl \
+ibmLib.tmpl \
+lnxLib.tmpl \
+lnxdoc.tmpl \
+necLib.tmpl \
+os2Lib.tmpl \
+osfLib.tmpl \
+sgiLib.tmpl \
+sunLib.tmpl \
+sv3Lib.tmpl \
+sv4Lib.tmpl \
+xf86.tmpl \
+xorg.tmpl
+
+CFFILES = \
+Imake.cf \
+Amoeba.cf \
+DGUX.cf \
+DragonFly.cf \
+FreeBSD.cf \
+Mips.cf \
+NetBSD.cf \
+OpenBSD.cf \
+Oki.cf \
+cygwin.cf \
+mingw.cf \
+Win32.cf \
+apollo.cf \
+bsd.cf \
+bsdi.cf \
+convex.cf \
+cray.cf \
+fujitsu.cf \
+generic.cf \
+gnu.cf \
+hp.cf \
+ibm.cf \
+isc.cf \
+linux.cf \
+luna.cf \
+macII.cf \
+mach.cf \
+minix.cf \
+moto.cf \
+ncr.cf \
+nec.cf \
+nto.cf \
+os2.cf \
+osf1.cf \
+pegasus.cf \
+sco.cf \
+sco5.cf \
+sequent.cf \
+sgi.cf \
+sony.cf \
+sun.cf \
+svr3.cf \
+svr4.cf \
+ultrix.cf \
+usl.cf \
+lynx.cf \
+x386.cf \
+QNX4.cf \
+darwin.cf \
+xfree86.cf \
+xorg.cf
+
+INSTFILES = $(RULEFILES) $(TMPLFILES) $(DEFFILES) $(CFFILES) $(LOCALFILES)
+
+all::
+
+#if BuildLibraries
+InstallMultipleDestFlags(install,$(INSTFILES),$(CONFIGDIR),$(INSTDATFLAGS))
+#endif
+
+InstallDriverSDKMultipleDestFlags($(INSTFILES),$(DRIVERSDKDIR)/config/cf,$(INSTDATFLAGS))
+
+#ifdef InstallEmptyHostDef
+install::
+ @(TMP=/tmp/tmp.$$$$; \
+ RemoveFile($${TMP}); \
+ echo "" > $${TMP}; \
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) $${TMP} \
+ $(DESTDIR)$(CONFIGDIR)/host.def; \
+ RemoveFile($${TMP}))
+
+#if defined(XFree86Version) || defined(XorgVersion)
+install.sdk::
+ @(TMP=/tmp/tmp.$$$$; \
+ RemoveFile($${TMP}); \
+ echo "" > $${TMP}; \
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) $${TMP} \
+ $(DESTDIR)$(DRIVERSDKDIR)/config/cf/host.def; \
+ RemoveFile($${TMP}))
+#endif
+#endif
diff --git a/nx-X11/config/cf/Library.tmpl b/nx-X11/config/cf/Library.tmpl
new file mode 100644
index 000000000..95a9207fb
--- /dev/null
+++ b/nx-X11/config/cf/Library.tmpl
@@ -0,0 +1,582 @@
+/*
+ * Library imakefile info - this contains any special redefinitions, etc.
+ * that Imakefiles in the various library subtrees will need.
+ *
+ * Before including this, you must set the following boolean variables:
+ * DoNormalLib, DoSharedLib, DoDebugLib, DoProfileLib
+ *
+ * To get automatic generation of standard rules, also set the variables:
+ * LibName, SoRev, HasSharedData, and optionally HugeLibrary and IncSubdir.
+ *
+ * To suppress installation of the library define LibInstall NO.
+ * To suppress creating (and installing) the library define LibCreate NO.
+ * To suppress installing headers define LibHeaders NO.
+ * Define LargePICTable YES if large (32-bit) PIC tables are needed.
+ */
+
+XCOMM $Xorg: Library.tmpl,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+
+
+
+XCOMM $XFree86: xc/config/cf/Library.tmpl,v 3.23tsi Exp $
+
+#ifndef DoNormalLib
+#define DoNormalLib NO
+#endif
+#ifndef DoSharedLib
+#define DoSharedLib NO
+#endif
+#ifndef DoDebugLib
+#define DoDebugLib NO
+#endif
+#ifndef DoProfileLib
+#define DoProfileLib NO
+#endif
+#ifndef DoExtraLib
+#define DoExtraLib NO
+#endif
+
+#ifndef HasSharedData
+#define HasSharedData NO
+#endif
+#ifndef HugeLibrary
+#define HugeLibrary NO
+#endif
+
+#ifndef ShlibBindGlobals
+#define ShlibBindGlobals NO
+#endif
+
+#if ShlibBindGlobals && defined(ShlibGlobalsFlags)
+SHLIBGLOBALSFLAGS = ShlibGlobalsFlags
+#endif
+
+#ifndef LibraryCplusplusOptions
+# if DoSharedLib && defined(SharedLibraryCplusplusOptions)
+# define LibraryCplusplusOptions SharedLibraryCplusplusOptions
+# else
+# define LibraryCplusplusOptions DefaultCplusplusOptions
+# endif
+#endif
+#ifndef LibraryDefines
+# define LibraryDefines StandardDefines
+#endif
+#ifndef LibraryDebugOpt
+# define LibraryDebugOpt /**/
+#endif
+/* Note: Changing LibraryCDebugFlags has no effect because CDEBUGFLAGS is over-
+ ridden by PassCDebugFlags in the parent Makefile or toplevel xmakefile. */
+#ifndef LibraryCDebugFlags
+# define LibraryCDebugFlags DefaultCDebugFlags
+#endif
+#ifndef LibraryCplusplusDebugFlags
+# define LibraryCplusplusDebugFlags DefaultCplusplusDebugFlags
+#endif
+#ifndef SeparateSharedCompile
+# define SeparateSharedCompile YES
+#endif
+
+#ifdef CrossCompileDir
+# ifndef StripPath
+# define StripPath(x) `echo x|sed "s%.*/%%"`
+# endif
+#endif
+
+#ifndef CplusplusSource
+# ifndef LibraryCcCmd
+# if DoSharedLib && defined(SharedLibraryCcCmd)
+# define LibraryCcCmd SharedLibraryCcCmd
+# else
+# define LibraryCcCmd CcCmd
+# endif
+# endif
+# ifndef LibraryCCOptions
+# if DoSharedLib && defined(SharedLibraryCCOptions)
+# define LibraryCCOptions SharedLibraryCCOptions
+# else
+# define LibraryCCOptions DefaultCCOptions
+# endif
+# endif
+
+#ifdef CrossCompileDir
+# ifndef CrossLibraryCcCmd
+# define CrossLibraryCcCmd Concat3(CrossCompileDir,/,StripPath(LibraryCcCmd))
+# endif
+#endif
+
+#ifdef CrossCompileDir
+ CC = CrossLibraryCcCmd
+#else
+ CC = LibraryCcCmd
+#endif
+ CCOPTIONS = LibraryCCOptions
+STD_DEFINES = LibraryDefines $(PROJECT_DEFINES)
+CDEBUGFLAGS = LibraryCDebugFlags
+CLIBDEBUGFLAGS = LibraryDebugOpt
+ CFLAGS = $(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) $(CCOPTIONS) $(THREADS_CFLAGS) $(ALLDEFINES)
+# if defined(LargePICTable) && LargePICTable && defined(LargePositionIndependentCFlags)
+ PICFLAGS = LargePositionIndependentCFlags
+# endif
+#else
+# ifndef CrossCompileDir
+# ifndef LibraryCplusplusCmd
+# if DoSharedLib && defined(SharedLibraryCplusplusCmd)
+# define LibraryCplusplusCmd SharedLibraryCplusplusCmd
+# else
+# define LibraryCplusplusCmd CplusplusCmd
+# endif
+# endif
+# else
+# ifndef CrossLibraryCplusplusCmd
+# if DoSharedLib && defined(SharedLibraryCplusplusCmd)
+# define CrossLibraryCplusplusCmd Concat3(CrossCompileDir,/,StripPath(SharedLibraryCplusplusCmd))
+# else
+# define CrossLibraryCplusplusCmd Concat3(CrossCompileDir,/,StripPath(CplusplusCmd))
+# endif
+# endif
+# endif
+
+# ifndef LibraryCplusplusOptions
+# if DoSharedLib && defined(SharedLibraryCplusplusOptions)
+# define LibraryCplusplusOptions SharedLibraryCplusplusOptions
+# else
+# define LibraryCplusplusOptions DefaultCplusplusOptions
+# endif
+# endif
+
+#ifdef CrossCompileDir
+ CXX = CrossLibraryCplusplusCmd
+#else
+ CXX = LibraryCplusplusCmd
+#endif
+ CXXOPTIONS = LibraryCplusplusOptions
+ STD_DEFINES = LibraryDefines $(PROJECT_DEFINES)
+CXXDEBUGFLAGS = LibraryCplusplusDebugFlags
+CXXLIBDEBUGFLAGS = LibraryDebugOpt
+ CXXFLAGS = $(CXXDEBUGFLAGS) $(CXXLIBDEBUGFLAGS) $(CXXOPTIONS) $(THREADS_CXXFLAGS) $(CXXDEFINES)
+# if defined(LargePICTable) && LargePICTable
+# ifdef LargePositionIndependentCplusplusFlags
+ CXXPICFLAGS = LargePositionIndependentCplusplusFlags
+# elif defined(LargePositionIndependentCFlags)
+ CXXPICFLAGS = LargePositionIndependentCFlags
+# endif
+# endif
+#endif
+
+#ifdef LibraryMTDefines
+LIB_MT_DEFINES = LibraryMTDefines
+#endif
+
+#if defined(IHaveSubdirs) && HasSymLinks && !defined(NoLibSubdirs)
+#define _LibMkdir LibMkdirLinkSubdirs
+#else
+#define _LibMkdir LibMkdir
+#endif
+
+#if DoDebugLib
+# define _DebuggedLibMkdir() _LibMkdir(debugger)
+# define _DebuggedObjCompile(options) DebuggedLibObjCompile(options)
+# define _DebuggedObjCplusplusCompile(options) DebuggedLibObjCplusplusCompile(options)
+# define _DebuggedCleanDir() LibCleanDir(debugger)
+#else
+# define _DebuggedLibMkdir() $(_NULLCMD_)
+# define _DebuggedObjCompile(options) $(_NULLCMD_)
+# define _DebuggedObjCplusplusCompile(options) $(_NULLCMD_)
+# define _DebuggedCleanDir() $(_NULLCMD_)
+#endif
+
+#if DoProfileLib
+# define _ProfiledLibMkdir() _LibMkdir(profiled)
+# define _ProfiledObjCompile(options) ProfiledLibObjCompile(options)
+# define _ProfiledObjCplusplusCompile(options) ProfiledLibObjCplusplusCompile(options)
+# define _ProfiledCleanDir() LibCleanDir(profiled)
+#else
+# define _ProfiledLibMkdir() $(_NULLCMD_)
+# define _ProfiledObjCompile(options) $(_NULLCMD_)
+# define _ProfiledObjCplusplusCompile(options) $(_NULLCMD_)
+# define _ProfiledCleanDir() $(_NULLCMD_)
+#endif
+
+#if !DoNormalLib
+# define _NormalLibMkdir() $(_NULLCMD_)
+# define _NormalObjCompile(options) $(_NULLCMD_)
+# define _NormalObjCplusplusCompile(options) $(_NULLCMD_)
+# define _NormalCleanDir() $(_NULLCMD_)
+#else
+# if DoSharedLib && SeparateSharedCompile
+# define _NormalLibMkdir() _LibMkdir(unshared)
+# define _NormalObjCompile(options) UnsharedLibObjCompile(options)
+# define _NormalObjCplusplusCompile(options) UnsharedLibObjCplusplusCompile(options)
+# define _NormalCleanDir() LibCleanDir(unshared)
+# else
+# define _NormalLibMkdir() $(_NULLCMD_)
+# if !DoSharedLib && defined(IncludeSharedObjectInNormalLib)
+# define _NormalObjCompile(options) NormalRelocLibObjCompile(options)
+# else
+# define _NormalObjCompile(options) NormalLibObjCompile(options)
+# endif
+# define _NormalObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options)
+# define _NormalCleanDir() $(_NULLCMD_)
+# endif
+#endif
+
+#if !DoSharedLib || (DoNormalLib && !SeparateSharedCompile)
+# define _SharedObjCompile(options) $(_NULLCMD_)
+# define _SharedObjCplusplusCompile(options) $(_NULLCMD_)
+#else
+# if SeparateSharedCompile
+# define _SharedObjCompile(options) NormalSharedLibObjCompile(options)
+# define _SharedObjCplusplusCompile(options) NormalSharedLibObjCplusplusCompile(options)
+#else
+# define _SharedObjCompile(options) NormalLibObjCompile(options)
+# define _SharedObjCplusplusCompile(options) NormalLibObjCplusplusCompile(options)
+#endif
+#endif
+
+#ifndef LibInstallBuild
+#define LibInstallBuild NO
+#endif
+
+#if DoExtraLib && defined(ExtraLibRules)
+# define _ExtraLibMkdir() ExtraLibMkdir()
+# define _ExtraObjCompile(options) ExtraObjCompile(options)
+# define _ExtraObjCplusplusCompile(options) ExtraObjCplusplusCompile(options)
+# define _ExtraCleanDir() ExtraCleanDir()
+#else
+# define _ExtraLibMkdir() $(_NULLCMD_)
+# define _ExtraObjCompile(options) $(_NULLCMD_)
+# define _ExtraObjCplusplusCompile(options) $(_NULLCMD_)
+# define _ExtraCleanDir() $(_NULLCMD_)
+#endif
+
+#ifndef CplusplusSource
+# define SRCsuf c
+# define Isuf i
+#else
+# define SRCsuf CCsuf
+# define Isuf ii
+# ifdef SunArchitecture
+.SUFFIXES: Concat(.,CCsuf)
+# endif
+#endif
+
+#define _CompileObj(target, options) @@\
+target @@\
+ _DebuggedObjCompile(options) @@\
+ _ProfiledObjCompile(options) @@\
+ _NormalObjCompile(options) @@\
+ _ExtraObjCompile(options) @@\
+ _SharedObjCompile(options)
+
+#ifndef SeparateSharedCompile
+# define _CompileObjSeparateOpts(target,staticopts,sharedopts) \
+ _CompileObj(target,sharedopts)
+#else
+# define _CompileObjSeparateOpts(target,staticopts,sharedopts) @@\
+target @@\
+ _DebuggedObjCompile(staticopts) @@\
+ _ProfiledObjCompile(staticopts) @@\
+ _NormalObjCompile(staticopts) @@\
+ _ExtraObjCompile(staticopts) @@\
+ _SharedObjCompile(sharedopts)
+#endif
+
+#ifdef CplusplusSource
+# define _CompileObjCplusplus(target, options) @@\
+target @@\
+ _DebuggedObjCplusplusCompile(options) @@\
+ _ProfiledObjCplusplusCompile(options) @@\
+ _NormalObjCplusplusCompile(options) @@\
+ _ExtraObjCplusplusCompile(options) @@\
+ _SharedObjCplusplusCompile(options)
+#else
+# define _CompileObjCplusplus(target, options)
+#endif
+
+#ifndef LibraryObjectRule
+# define LibraryObjectRule() @@\
+all:: @@\
+ _DebuggedLibMkdir() @@\
+ _ProfiledLibMkdir() @@\
+ _NormalLibMkdir() @@\
+ _ExtraLibMkdir() @@\
+ @@\
+includes:: @@\
+ _DebuggedLibMkdir() @@\
+ _ProfiledLibMkdir() @@\
+ _NormalLibMkdir() @@\
+ _ExtraLibMkdir() @@\
+ @@\
+_CompileObj(.c.Osuf:,$(_NOOP_)) @@\
+_CompileObjCplusplus(.SRCsuf.Osuf:,$(_NOOP_)) @@\
+ @@\
+clean:: @@\
+ _DebuggedCleanDir() @@\
+ _ProfiledCleanDir() @@\
+ _NormalCleanDir() @@\
+ _ExtraCleanDir() @@\
+
+#endif /* LibraryObjectRule */
+
+#ifndef SpecialLibObjectRule
+# define SpecialLibObjectRule(objs,depends,options) @@\
+_CompileObj(objs: depends,options)
+#endif /* SpecialLibObjectRule */
+
+#ifndef SpecialCLibObjectRule
+# define SpecialCLibObjectRule(basename,depends,options) @@\
+_CompileObj(basename.Osuf: basename.SRCsuf depends,options) @@\
+ @@\
+basename.Isuf: basename.SRCsuf depends @@\
+ CPPOnlyCompile(basename.SRCsuf,options) @@\
+ @@\
+CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options)
+#endif /* SpecialCLibObjectRule */
+
+#ifndef SpecialCLibObjectRuleSeparateOpts
+# define SpecialCLibObjectRuleSeparateOpts(basename,depends,staticopts,shopts) @@\
+_CompileObjSeparateOpts(basename.Osuf: basename.SRCsuf depends,staticopts,shopts) @@\
+ @@\
+basename.Isuf: basename.SRCsuf depends @@\
+ CPPOnlyCompile(basename.SRCsuf,sharedopts) @@\
+ @@\
+CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options)
+#endif /* SpecialCLibObjectRuleSepareateOpts */
+
+#ifndef SpecialCplusplusLibObjectRule
+# define SpecialCplusplusLibObjectRule(basename,depends,options) @@\
+_CompileObjCplusplus(basename.Osuf: basename.SRCsuf depends,options) @@\
+ @@\
+CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options)
+#endif /* SpecialCplusplusLibObjectRule */
+
+/*
+ * ToolkitMakeStrings generates a string-table, i.e., a C source
+ * file and the matching header(s), e.g., Xt's StringDefs.c, StringDefs.h,
+ * and Shell.h files; or Motif's XmStrDefs.c and XmStrDefs.h files.
+ *
+ * The 'files' argument is the list of files that will be produced by
+ * this rule, e.g., for Xt they would be "Shell.h StringDefs.c StringDefs.h"
+ * and for Motif they would be "XmStrDefs.c XmStrDefs.h".
+ *
+ * The 'source' argument is the string-list file to be parsed, e.g., in
+ * Xt that would be "util/string.list". For Motif 2.0 it would be
+ * "../../tools/makestr/xmstring.list", and for Motif-CDE1 it would be
+ * "util/xmstring.list".
+ *
+ * The 'options' argument is passed by the library's Imakefile, see the
+ * Xt Imakefile for an example. Typically this would be nothing, -intelabi,
+ * or -sparcabi; there are other choices, but these are typical.
+ *
+ * The 'depends' argument names additional files the target files
+ * depend on. It should name the #ctmpl and #htmpl files from the
+ * 'source' file.
+ *
+ * The 'dest' argument is the C source output file. For Xt this should
+ * be "StringDefs.c", and for all versions of Motif it would be "XmStrDefs.c"
+ *
+ * Headers are generated and named according to data in the 'source'
+ * file.
+ */
+/*
+ * The NoCmpScript
+ * prevents clearmake from trying to remake makestrs if it exists.
+ * Including both $(MAKESTRS) and $(MAKESTRS).o as primary targets
+ * prevents clearmake from trying to recompile makestrs from here.
+ * We have includes, not files, depend on makestrs to try to get
+ * clearmake to wink in the files. Bug in clearmake 2.0.2?
+ */
+
+#ifndef MakeStringsDependency
+# ifndef UseInstalled
+# define MakeStringsDependency @@\
+MAKESTRS = $(CONFIGSRC)/util/makestrs @@\
+NoCmpScript(HostProgramTargetName($(MAKESTRS)) $(MAKESTRS).Osuf) @@\
+ @@\
+HostProgramTargetName($(MAKESTRS)) $(MAKESTRS).Osuf: @@\
+ cd $(CONFIGSRC)/util && $(MAKE) HostProgramTargetName(makestrs) @@\
+ @@\
+includes:: HostProgramTargetName($(MAKESTRS))
+# else
+# define MakeStringsDependency /**/
+# endif
+#endif
+
+#ifndef ToolkitMakeStrings
+# if defined(LibTookitMakeStringsDependency) && LibTookitMakeStringsDependency
+# define ToolkitMakeStrings(files,source,options,depends,dest) @@\
+files: source depends @@\
+ RemoveFiles(files) @@\
+ RunProgram(MAKESTRS,options < source > dest) @@\
+ @@\
+AllTarget(files) @@\
+ @@\
+includes:: files @@\
+ @@\
+depend:: files @@\
+ @@\
+clean:: @@\
+ RemoveFiles(files)
+# else
+# define ToolkitMakeStrings(files,source,options,depends,dest) @@\
+MakeStringsDependency @@\
+ @@\
+files: source depends @@\
+ RemoveFiles(files) @@\
+ RunProgram(MAKESTRS,options < source > dest) @@\
+ @@\
+AllTarget(files) @@\
+ @@\
+includes:: files @@\
+ @@\
+depend:: files @@\
+ @@\
+clean:: @@\
+ RemoveFiles(files)
+# endif
+#endif /* ToolkitMakeStrings */
+
+#ifdef LibName
+
+LIBNAME = LibName
+
+# if defined(LibTookitMakeStringsDependency) && LibTookitMakeStringsDependency
+/*
+ * Do ToolkitMakeStrings() before BuildIncludes so makestrs is still
+ * built first, even if the generated header will be installed.
+ */
+MakeStringsDependency
+# endif
+
+LibraryObjectRule()
+
+# undef _LinkBuildLibrary
+# if !defined(LibInstall) || LibInstall || LibInstallBuild
+# define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
+# else
+# define _LinkBuildLibrary(lib) $(_NULLCMD_)
+# endif
+
+# if defined(LibBuild) && !LibBuild
+# define LibCreate NO
+# endif
+
+# if !defined(LibCreate) || LibCreate
+# if DoSharedLib
+# if HugeLibrary && defined(SharedLibraryTarget3)
+SharedLibraryTarget3($(LIBNAME),$(SoRev),$(OBJS1),$(OBJS2),$(OBJS3) $(EXTRASHAREDOBJS),.,.)
+# else
+# if defined(SharedLibtoolRev) && defined(SharedLibtoolLibraryTarget)
+SharedLibtoolLibraryTarget($(LIBNAME),SharedLibtoolRev,$(OBJS) $(EXTRASHAREDOBJS),.,.)
+# else
+SharedLibraryTarget($(LIBNAME),$(SoRev),$(OBJS) $(EXTRASHAREDOBJS),.,.)
+# endif
+# endif
+# if !defined(LibInstall) || LibInstall
+# if defined(SharedLibtoolRev) && defined(InstallSharedLibtoolLibrary)
+InstallSharedLibtoolLibrary($(LIBNAME),SharedLibtoolRev,$(SHLIBDIR))
+# else
+InstallSharedLibrary($(LIBNAME),$(SoRev),$(SHLIBDIR))
+# endif
+# endif
+# if HasSharedData
+SharedLibraryDataTarget($(LIBNAME),$(SoRev),$(UNSHAREDOBJS))
+# if !defined(LibInstall) || LibInstall
+InstallSharedLibraryData($(LIBNAME),$(SoRev),$(SHLIBDIR))
+# endif
+# endif
+# endif
+# if DoNormalLib
+# if HugeLibrary
+# if DoSharedLib && SeparateSharedCompile
+UnsharedLibraryTarget3($(LIBNAME),$(OBJS1),$(OBJS2),$(OBJS3) $(EXTRAUNSHAREDOBJS),unshared,..)
+# else
+NormalLibraryTarget3($(LIBNAME),$(OBJS1),$(OBJS2),$(OBJS3) $(EXTRAUNSHAREDOBJS))
+# endif
+# else
+# if DoSharedLib && SeparateSharedCompile
+UnsharedLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS),unshared,..)
+# else
+NormalLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS))
+# endif
+# endif
+# if !defined(LibInstall) || LibInstall
+InstallLibrary($(LIBNAME),$(USRLIBDIR))
+# endif
+# endif
+# if DoProfileLib
+ProfiledLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS))
+# if !defined(LibInstall) || LibInstall
+InstallLibrary($(LIBNAME)_p,$(USRLIBDIR))
+# endif
+# endif
+# if DoDebugLib
+DebuggedLibraryTarget($(LIBNAME),$(OBJS) $(EXTRAUNSHAREDOBJS))
+# if !defined(LibInstall) || LibInstall
+InstallLibrary($(LIBNAME)_d,$(USRLIBDIR))
+# endif
+# endif
+# if DoExtraLib && defined(ExtraLibRules)
+ExtraLibraryTarget($(LIBNAME),$(SoRev),$(OBJS) $(EXTRAUNSHAREDOBJS))
+# if !defined(LibInstall) || LibInstall
+ExtraInstallLibrary($(LIBNAME),$(SoRev))
+# endif
+# endif
+
+LintLibraryTarget($(LIBNAME),$(SRCS))
+# if !defined(LibInstall) || LibInstall
+InstallLintLibrary($(LIBNAME),$(LINTLIBDIR))
+# endif
+# else /* not LibCreate */
+# if LibBuild
+# if HugeLibrary
+AllTarget($(OBJS1))
+AllTarget($(OBJS2))
+AllTarget($(OBJS3))
+# else
+AllTarget($(OBJS))
+# endif
+# if DoSharedLib
+AllTarget($(EXTRASHAREDOBJS))
+# endif
+# if DoNormalLib
+AllTarget($(EXTRAUNSHAREDOBJS))
+# endif
+# endif /* LibBuild */
+# endif /* LibCreate */
+# ifdef IncSubdir
+# ifdef IncSubSubdir
+# if !defined(LibHeaders) || LibHeaders
+BuildIncludes($(HEADERS),IncSubdir/IncSubSubdir,../..)
+# if BuildLibraries
+InstallMultipleFlags($(HEADERS),$(INCDIR)/IncSubdir/IncSubSubdir,$(INSTINCFLAGS))
+# endif
+# endif
+# else
+# if !defined(LibHeaders) || LibHeaders
+BuildIncludes($(HEADERS),IncSubdir,..)
+# if BuildLibraries
+InstallMultipleFlags($(HEADERS),$(INCDIR)/IncSubdir,$(INSTINCFLAGS))
+# endif
+# endif
+# endif
+# else
+# ifndef CplusplusSource
+# if !defined(LibHeaders) || LibHeaders
+BuildIncludesTop($(HEADERS))
+# if BuildLibraries
+InstallMultipleFlags($(HEADERS),$(INCDIR),$(INSTINCFLAGS))
+# endif
+# endif
+# endif
+# endif
+
+NormalLintTarget($(SRCS))
+#endif /* defined(LibName) */
+
+#ifdef NoSoSymlink
+SOSYMLINK = false
+#else
+SOSYMLINK = true
+#endif
diff --git a/nx-X11/config/cf/Mips.cf b/nx-X11/config/cf/Mips.cf
new file mode 100644
index 000000000..cf0446510
--- /dev/null
+++ b/nx-X11/config/cf/Mips.cf
@@ -0,0 +1,72 @@
+/*
+ * Set version numbers before making makefiles.
+ *
+ * X11r5 only builds using the berkeley libraries and compiler. Make
+ * sure your path includes /bsd43/bin before /bin/ or /usr/bin.
+ */
+
+#ifndef OSName
+#define OSName RISCOS
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 50
+#endif
+
+XCOMM platform: $Xorg: Mips.cf,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+XCOMM operating system: OSName
+
+/***************************************************************************
+ * Platform-specific parameters *
+ ***************************************************************************/
+
+#define HasVoidSignalReturn NO
+#define SetTtyGroup YES
+#define UnalignedReferencesAllowed NO /* if arbitrary deref okay */
+#define HasBsearch NO
+
+#define MipsArchitecture
+#define MakeEnv -e
+
+#define DefaultCCOptions -signed -systype bsd43 -Olimit 2000 -Wf,-XNd8400,-XNp12000
+#define StandardDefines -DMips -DBSD43
+#define PostIncDir /usr/include/bsd43
+#define ExtraLibraries -lmld
+#define ArCmd ar clr
+#define BootstrapCFlags -DMips
+#define InstallCmd /etc/mipsinstall -f
+#define MakeCmd make MakeEnv
+#define DoRanlibCmd NO
+#define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+
+/***************************************************************************
+ * *
+ * DEFINE PARAMETERS FOR BUILDING *
+ * *
+ ***************************************************************************/
+
+#define XmipsServer YES
+
+/***************************************************************************
+ * *
+ * OVERRIDE ANY CONFIGURATION PARAMETERS FROM Imake.tmpl *
+ * *
+ ***************************************************************************/
+
+#define SpecialMalloc NO
+
+#define PrimaryScreenResolution 110
+
+#define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */
+
+#define DefaultUserPath /usr/net:/bin:/usr/bin:$(BINDIR):/usr/ucb
+#define DefaultSystemPath /usr/net:/bin:/usr/bin:/etc:$(BINDIR):/usr/ucb
+
+/* mips manuals are really complicated. This certainly won't work. */
+
+#define ManDirectoryRoot /man/cat
+#define ManSourcePath $(MANPATH)/man
+
+#define InstKmemFlags -g sys -m 2711
diff --git a/nx-X11/config/cf/Motif.rules b/nx-X11/config/cf/Motif.rules
new file mode 100644
index 000000000..283ce6ca6
--- /dev/null
+++ b/nx-X11/config/cf/Motif.rules
@@ -0,0 +1,709 @@
+/*
+ * @OSF_COPYRIGHT@
+ * COPYRIGHT NOTICE
+ * Copyright (c) 1990, 1991, 1992, 1993, 1998 The Open Group, Inc.
+ * ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
+ * the full copyright text.
+ *
+ * (c) Copyright 1996 Digital Equipment Corporation.
+ * (c) Copyright 1996 Hewlett-Packard Company.
+ * (c) Copyright 1996 International Business Machines Corp.
+ * (c) Copyright 1996 Sun Microsystems, Inc.
+ * (c) Copyright 1996 Novell, Inc.
+ * (c) Copyright 1996 FUJITSU LIMITED.
+ * (c) Copyright 1996 Hitachi.
+ */
+XCOMM $Xorg: Motif.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+/* Note whether we are the top level project. */
+#ifndef SeenTopLevelProject
+# define SeenTopLevelProject YES
+# define MotifIsTopLevelProject YES
+#else
+# define MotifIsTopLevelProject NO
+#endif
+
+/* Include the X11 project rules file. */
+#include <X11.rules>
+
+
+/* Use the in-tree Motif by default. */
+#ifndef UseInstalledMotif
+# define UseInstalledMotif NO
+#endif
+#ifdef UseInstalled
+# undef UseInstalledMotif
+# define UseInstalledMotif YES
+#endif
+
+#ifndef ImportMotif
+# ifdef UseImports
+# define ImportMotif YES
+# else
+# define ImportMotif NO
+# endif
+#endif
+#if UseInstalledMotif
+# undef ImportMotif
+# define ImportMotif NO
+#endif
+
+#ifndef MSimpleProgramTarget
+#define MSimpleProgramTarget(program) @@\
+AllTarget(program) @@\
+ @@\
+program: program.o $(DEPS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ program.o $(LDOPTIONS) $(DEPS) $(LOCAL_LIBRARIES) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+clean:: @@\
+ $(RM) program
+#endif
+
+#ifndef MSimpleUilTarget
+#define MSimpleUilTarget(program) @@\
+MSimpleProgramTarget(program) @@\
+ @@\
+InstallProgram(program,$(BINDIR)) @@\
+ @@\
+MSimpleUidTarget(program)
+#endif
+
+/*
+ * UILFLAGS contains site/vendor-specific flags
+ * defined by UilFlags, which supposed to be set in *.cf or
+ * site.def files.
+ * LOCAL_UILFLAGS(_n) contains client-specific uil flags set in Imakefile
+ */
+
+#ifndef MSimpleUidTarget
+#define MSimpleUidTarget(program) @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: program.uil $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MSimpleUidLocaleTarget
+#define MSimpleUidLocaleTarget(program,locale) @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: program.uil $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(LIBDIR)/locale/uid) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_1
+#define MComplexUidTarget_1(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS1) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_1) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_2
+#define MComplexUidTarget_2(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS2) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_2) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_3
+#define MComplexUidTarget_3(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS3) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_3) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_4
+#define MComplexUidTarget_4(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS4) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_4) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_5
+#define MComplexUidTarget_5(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS5) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_5) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_6
+#define MComplexUidTarget_6(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS6) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_6) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_7
+#define MComplexUidTarget_7(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS7) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_7) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_8
+#define MComplexUidTarget_8(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS8) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_8) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_9
+#define MComplexUidTarget_9(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS9) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_9) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexUidTarget_10
+#define MComplexUidTarget_10(program) @@\
+ @@\
+AllTarget(program.uid) @@\
+ @@\
+program.uid: $(UILS10) $(DEPUIL) @@\
+ RemoveTargetProgram($@) @@\
+ $(CLIENTENVSETUP) $(UIL) $(UILFLAGS) $(LOCAL_UILFLAGS_10) -o $@ program.uil $(UIL_INCLUDES) @@\
+ @@\
+InstallNonExecFile(program.uid,$(UIDDIR)) @@\
+ @@\
+clean:: @@\
+ $(RM) program.uid
+#endif
+
+#ifndef MComplexProgramTarget
+#define MComplexProgramTarget(program,locallib,syslib) @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+program: $(OBJS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS),$(OBJS),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR)) @@\
+ @@\
+install.man:: @@\
+ @echo To install documentation for $(PROGRAM), consult the Release Notes @@\
+ @echo and/or README file in the current directory. @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ $(RM) $(PROGRAM)
+#endif
+
+#ifndef MComplexProgramTarget_1
+#define MComplexProgramTarget_1(program,locallib,syslib) @@\
+ OBJS = $(OBJS1) $(OBJS2) $(OBJS3) @@\
+ SRCS = $(SRCS1) $(SRCS2) $(SRCS3) @@\
+ @@\
+AllTarget($(PROGRAMS)) @@\
+ @@\
+program: $(OBJS1) $(DEPLIBS1) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS1) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS1),$(OBJS1),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR)) @@\
+ @@\
+install.man:: @@\
+ @echo To install documentation for $(PROGRAMS), consult the Release Notes @@\
+ @echo and/or README file in the current directory. @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ $(RM) $(PROGRAMS)
+#endif
+
+#ifndef MComplexProgramTarget_2
+#define MComplexProgramTarget_2(program,locallib,syslib) @@\
+program: $(OBJS2) $(DEPLIBS2) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS2) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS2),$(OBJS2),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+#endif
+
+#ifndef MComplexProgramTarget_3
+#define MComplexProgramTarget_3(program,locallib,syslib) @@\
+ PROGRAM_3 = program @@\
+program: $(OBJS3) $(DEPLIBS3) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS3) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS3),$(OBJS3),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+#endif
+
+#ifndef MComplexProgramTarget_4
+#define MComplexProgramTarget_4(program,locallib,syslib) @@\
+ PROGRAM_4 = program @@\
+program: $(OBJS4) $(DEPLIBS4) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS4) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS4),$(OBJS4),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+#endif
+
+#ifndef MComplexProgramTarget_5
+#define MComplexProgramTarget_5(program,locallib,syslib) @@\
+ PROGRAM_5 = program @@\
+program: $(OBJS5) $(DEPLIBS5) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS5) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS5),$(OBJS5),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+#endif
+
+#ifndef MComplexProgramTarget_6
+#define MComplexProgramTarget_6(program,locallib,syslib) @@\
+ PROGRAM_6 = program @@\
+program: $(OBJS6) $(DEPLIBS6) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS6) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS6),$(OBJS6),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+#endif
+
+#ifndef MComplexProgramTarget_7
+#define MComplexProgramTarget_7(program,locallib,syslib) @@\
+ PROGRAM_7 = program @@\
+program: $(OBJS7) $(DEPLIBS7) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS7) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS7),$(OBJS7),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+#endif
+
+#ifndef MComplexProgramTarget_8
+#define MComplexProgramTarget_8(program,locallib,syslib) @@\
+ PROGRAM_8 = program @@\
+program: $(OBJS8) $(DEPLIBS8) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS8) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS8),$(OBJS8),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+#endif
+
+#ifndef MComplexProgramTarget_9
+#define MComplexProgramTarget_9(program,locallib,syslib) @@\
+ PROGRAM_9 = program @@\
+program: $(OBJS9) $(DEPLIBS9) @@\
+ RemoveTargetProgram($@) @@\
+ $(CC) -o $@ $(LDOPTIONS) $(OBJS9) locallib $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS9),$(OBJS9),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR))
+#endif
+
+#ifdef AUTOMATION
+#ifndef TestPPTarget
+#define TestPPTarget(root) @@\
+all:: root.Scr root.Dat @@\
+ @@\
+root.Dat: root.dat @@\
+ $(RM) root.Dat @@\
+ $(COMMONPP) $(DEFINES) root.dat @@\
+root.Scr: root.scr @@\
+ $(RM) root.Scr @@\
+ $(COMMONPP) $(DEFINES) root.scr
+#endif
+#else
+#ifndef TestPPTarget
+#define TestPPTarget(root) @@\
+all:: root.Dat @@\
+ @@\
+root.Dat: root.dat @@\
+ $(RM) root.Dat @@\
+ $(COMMONPP) $(DEFINES) root.dat
+#endif
+#endif
+
+#ifdef AUTOMATION
+#ifndef TestPPTargetScr
+#define TestPPTargetScr(root) @@\
+all:: root.Scr @@\
+ @@\
+root.Scr: root.scr @@\
+ $(RM) root.Scr @@\
+ $(COMMONPP) $(DEFINES) root.scr
+#endif
+#else
+#ifndef TestPPTargetScr
+#define TestPPTargetScr(root) /**/
+#endif
+#endif
+
+#ifdef AUTOMATION
+#ifndef TestPPTargetDat
+#define TestPPTargetDat(root) @@\
+all:: root.Dat @@\
+ @@\
+root.Dat: root.dat @@\
+ $(RM) root.Dat @@\
+ $(COMMONPP) $(DEFINES) root.dat
+#endif
+#endif
+#ifndef AUTOMATION
+#ifndef TestPPTargetDat
+#define TestPPTargetDat(root) @@\
+all:: root.Dat @@\
+ @@\
+root.Dat: root.dat @@\
+ $(RM) root.Dat @@\
+ $(COMMONPP) $(DEFINES) root.dat
+#endif
+#endif
+
+
+#ifndef NO_AUTOMATION
+#ifndef RunTarget
+#define RunTarget() @@\
+all:: RUN @@\
+ @@\
+RUN: always @@\
+ $(GENRUN) $(CURRENT_DIR) $(MTOP) $(DEFINES) @@\
+ @@\
+always: @@\
+ $(RM) RUN
+#endif
+#else
+#ifdef UseVista
+#ifndef RunTarget
+#define RunTarget() @@\
+all:: RUN @@\
+ @@\
+RUN: always @@\
+ $(MANRUN) $(CURRENT_DIR) $(MTOP) $(DEFINES) @@\
+ @@\
+always: @@\
+ $(RM) RUN
+#endif
+#else
+#ifdef UsePurify
+#ifndef RunTarget
+#define RunTarget() @@\
+all:: RUN @@\
+ @@\
+RUN: always @@\
+ $(MANRUN) $(CURRENT_DIR) $(MTOP) $(DEFINES) @@\
+ @@\
+always: @@\
+ $(RM) RUN
+#endif
+#else
+#ifndef RunTarget
+#define RunTarget() @@\
+all:: RUN @@\
+ @@\
+RUN: always @@\
+ @@\
+always: @@\
+
+#endif
+#endif
+#endif
+#endif
+#ifdef UseVista
+#ifndef VistaMapRule
+#define VistaMapRule(targetmap,depend) @@\
+all:: targetmap @@\
+ @@\
+targetmap: depend @@\
+ $(RM) $(MTOP)/tests/Vista/targetmap @@\
+ CATCMD *.M > $(MTOP)/tests/Vista/targetmap
+#endif
+#ifndef ComplexVistaMapRule
+#define ComplexVistaMapRule(program,filelist) @@\
+all:: program.M @@\
+ @@\
+program.M: filelist @@\
+ $(RM) program.vista.tmpfile @@\
+ touch program.vista.tmpfile @@\
+ @case '${MFLAGS}' in *[ik]*) set +e;; esac; @@\
+ @for i in filelist; do \ @@\
+ cat `basename $$i .o`.M >> program.vista.tmpfile ; done @@\
+ $(RM) program.M @@\
+ $(MV) program.vista.tmpfile program.M @@\
+ @@\
+clean:: @@\
+ $(RM) *.M
+#endif
+
+#endif
+
+/* Rule for making shadow trees. */
+#ifndef MakeShadowTree
+#define MakeShadowTree(name,dirs) @@\
+all:: @@\
+ @case '${MFLAGS}' in *[ik]*) set +e;; esac; @@\
+ MakeDir(name) @@\
+ @for i in dirs; \ @@\
+ do if [ -d $$i/name ]; then \ @@\
+ exit 0; else set -x; mkdir $$i/name; fi \ @@\
+ done @@\
+ @for i in dirs; \ @@\
+ do if [ -r name/$$i ]; then \ @@\
+ set +x; \ @@\
+ else (set -x; $(LN) ../$$i/name name/$$i); fi \@@\
+ done
+#endif
+
+#ifdef BuildPlusPlus
+
+/* Rules for C++ */
+
+/*
+ * "CPlusPlusObjectCompile" - compile fragment for a normal C++ object file
+*/
+#ifndef CPlusPlusObjectCompile
+#define CPlusPlusObjectCompile(options) $(RM) $@ @@\
+ $(CPLUSPLUSCOM) -c $(CPLUSPLUSFLAGS) options $*.cxx
+#endif
+
+#ifndef CPlusPlusObjectRule
+#define CPlusPlusObjectRule() @@\
+.cxx.o: @@\
+ CPlusPlusObjectCompile($(_NOOP_))
+#endif /* CPlusPlusObjectRule */
+
+#ifndef MCPlusPlusSimpleProgramTarget
+#define MCPlusPlusSimpleProgramTarget(program) @@\
+AllTarget(program) @@\
+ @@\
+program: program.o $(DEPS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ $(CPLUSPLUSLINKCOM) -o $@ program.o $(LDOPTIONS) $(DEPS) $(LOCAL_LIBRARIES) $(CPLUSPLUSLIBS) $(LDLIBS) $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+clean:: @@\
+ $(RM) program
+#endif
+
+#ifndef MCPlusPlusComplexProgramTarget
+#define MCPlusPlusComplexProgramTarget(program,locallib,syslib) @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+program: $(OBJS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ $(CPLUSPLUSLINKCOM) -o $@ $(LDOPTIONS) $(OBJS) locallib $(CPLUSPLUSLIBS) $(LDLIBS) syslib $(EXTRA_LOAD_FLAGS) @@\
+ @@\
+CenterProgramTarget(program,$(SRCS),$(OBJS),locallib,syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR)) @@\
+ @@\
+install.man:: @@\
+ @echo To install documentation for $(PROGRAM), consult the Release Notes @@\
+ @echo and/or README file in the current directory. @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ $(RM) $(PROGRAM)
+#endif
+
+#endif /* BuildPlusPlus */
+
+/* Rules for message catalog building */
+#ifndef Real_MessageCatalogRule
+#define Real_MessageCatalogRule(prefix) @@\
+prefix.cat Concat(prefix,MsgCatI.h): @@\
+ $(RM) Concat(prefix,MsgCatI.h) prefix.cat $(MLOCSRC)/C/msg/prefix.msg @@\
+ $(MKCATTOOL) Concat(prefix,MsgCatI.h) prefix.msg > $(MLOCSRC)/C/msg/prefix.msg @@\
+ $(GENCAT) prefix.cat $(MLOCSRC)/C/msg/prefix.msg @@\
+ @@\
+includes:: prefix.cat Concat(prefix,MsgCatI.h) @@\
+ @@\
+depend:: prefix.cat Concat(prefix,MsgCatI.h) @@\
+ @@\
+all:: prefix.cat @@\
+ @@\
+clean:: @@\
+ $(RM) prefix.cat Concat(prefix,MsgCatI.h)
+#endif
+#define Stub_MessageCatalogRule(prefix) /**/
+
+
+/* The X BuildLibDir is now an import, not an export. */
+#if UseImports || ImportX11
+# ifndef XBuildLibDir
+# define XBuildLibDir $(TOP)/imports/x11/lib
+# endif
+#endif
+
+
+/* Search the Motif ProjectRoot too if it is different. */
+#ifdef MotifProjectRoot
+# define MUsrLibDirPath Concat(XUsrLibDirPath,:$(MPROJECTROOT)/lib)
+#else
+# define MUsrLibDirPath XUsrLibDirPath
+#endif
+#ifdef UsrLibDirPath
+# undef UsrLibDirPath
+#endif
+#define UsrLibDirPath MUsrLibDirPath
+
+#if ImportMotif
+# define MLdPreLibs -L$(MLIBSRC)
+#elif defined(UseInstalledMotif) && defined(MotifProjectRoot)
+# define MLdPreLibs -L$(MPROJECTROOT)/lib
+#else
+# define MLdPreLibs /**/
+#endif
+#ifdef LdPreLibs
+# undef LdPreLibs
+#endif
+#define LdPreLibs LdPreLib MLdPreLibs XLdPreLibs
+
+#ifdef LdPostLibs
+# undef LdPostLibs
+#endif
+#ifdef MotifProjectRoot
+# define MLdPostLibs -L$(MPROJECTROOT)/lib
+#else
+# define MLdPostLibs /**/
+#endif
+#define LdPostLibs LdPostLib MLdPostLibs XLdPostLibs
+
+#ifdef TopIncludes
+# undef TopIncludes
+#endif
+#define TopIncludes TopInclude $(TOP_MOTIF_INCLUDES) $(TOP_X_INCLUDES)
+
+#if UseInstalledMotif && defined(MotifProjectRoot)
+# define MotifBuildLibPath $(MPROJECTROOT)/lib
+#elif UseInstalledMotif
+# define MotifBuildLibPath $(USRLIBDIR)
+#elif ImportMotif
+# define MotifBuildLibPath $(MLIBSRC)
+#else
+# define MotifBuildLibPath $(TOP)/exports/lib
+#endif
+#ifdef BuildLibPath
+# undef BuildLibPath
+#endif
+#ifdef SystemBuildLibPath
+# define BuildLibPath $(MOTIFENVLIBDIR):$(XENVLIBDIR):$(SYSTEMENVLIBDIR)
+#else
+# define BuildLibPath $(MOTIFENVLIBDIR):$(XENVLIBDIR)
+#endif
+
+#ifndef MotifProjectDefines
+# define MotifProjectDefines MotifDefines MessageCatalogDefines
+#endif
+#ifdef ProjectDefines
+# undef ProjectDefines
+#endif
+#define ProjectDefines X11ProjectDefines MotifProjectDefines
+
+#ifndef MotifCplusplusProjectDefines
+# define MotifCplusplusProjectDefines MotifProjectDefines
+#endif
+#ifdef CplusplusProjectDefines
+# undef CplusplusProjectDefines
+#endif
+#define CplusplusProjectDefines \
+ X11CplusplusProjectDefines MotifCplusplusProjectDefines
diff --git a/nx-X11/config/cf/Motif.tmpl b/nx-X11/config/cf/Motif.tmpl
new file mode 100644
index 000000000..d4b7d3a49
--- /dev/null
+++ b/nx-X11/config/cf/Motif.tmpl
@@ -0,0 +1,573 @@
+/*
+ * @OSF_COPYRIGHT@
+ * COPYRIGHT NOTICE
+ * Copyright (c) 1990, 1991, 1992, 1993, 1998 The Open Group, Inc.
+ * ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
+ * the full copyright text.
+ *
+ * (c) Copyright 1996 Digital Equipment Corporation.
+ * (c) Copyright 1996 Hewlett-Packard Company.
+ * (c) Copyright 1996 International Business Machines Corp.
+ * (c) Copyright 1996 Sun Microsystems, Inc.
+ * (c) Copyright 1996 Novell, Inc.
+ * (c) Copyright 1996 FUJITSU LIMITED.
+ * (c) Copyright 1996 Hitachi.
+ */
+XCOMM $Xorg: Motif.tmpl,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+/* Include the X11 project template file. */
+#include <X11.tmpl>
+
+#ifdef AUTOMATION
+# ifndef Automation
+# define Automation YES
+# endif
+#else
+# define NO_AUTOMATION
+#endif
+
+#ifdef USE_VISTACC
+# ifndef UseVista
+# define UseVista
+# endif
+# ifndef CATCMD
+# define CATCMD cat
+# endif
+#endif
+
+#ifdef USE_PURIFY
+# ifndef UsePurify
+# define UsePurify
+# endif
+#endif
+
+#ifdef DEBUG_GEOMETRY
+# ifndef DebugGeometry
+# define DebugGeometry YES
+# endif
+#endif
+
+
+#ifndef _MUse
+# if UseInstalledMotif
+# define _MUse(a,b) a
+# else
+# define _MUse(a,b) b
+# endif
+#endif
+
+#ifndef _MUseCat
+# if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
+# if UseInstalledMotif
+# define _MUseCat(a,b,c) a##c
+# else
+# define _MUseCat(a,b,c) b##c
+# endif
+# else
+# if UseInstalledMotif
+# define _MUseCat(a,b,c) a/**/c
+# else
+# define _MUseCat(a,b,c) b/**/c
+# endif
+# endif
+#endif
+
+#ifndef MTop
+# if ImportMotif
+# define MTop $(TOP)/imports/motif
+# else
+# define MTop $(TOP)
+# endif
+#endif
+
+#ifndef BuildDocDir
+# define BuildDocDir $(BUILDINCROOT)/doc
+#endif
+#ifndef BuildLocDir
+# define BuildLocDir $(BUILDINCROOT)/localized
+#endif
+
+#ifndef MotifDefines
+# define MotifDefines /**/
+#endif
+
+#ifndef XmDefines
+# define XmDefines /**/
+#endif
+
+/* To compile without SHAPE extension, set this to -DNO_SHAPE */
+#ifndef MwmDefines
+# define MwmDefines /**/
+#endif
+
+#ifndef UilFlags
+# define UilFlags /**/
+#endif
+
+#ifndef TestDefines
+# define TestDefines /**/
+#endif
+
+#ifndef AutoDefines
+# if Automation
+# define AutoDefines -DAUTOMATION
+# else
+# define AutoDefines /**/
+# endif
+#endif
+
+#ifndef AutoIncludes
+# if Automation
+# define AutoIncludes -I$(AUTOSCRIPTSRC)
+# else
+# define AutoIncludes /**/
+# endif
+#endif
+
+#ifdef UsePurify
+# define PurifyFilesToClean *.pure_linkinfo *.pure_hardlink
+#else
+# define PurifyFilesToClean
+#endif
+#if Automation
+# define TestExtraFilesToClean *.Dat *.Scr PurifyFilesToClean
+#else
+# define TestExtraFilesToClean *.Dat PurifyFilesToClean
+#endif
+
+#ifndef UsrIncDir
+# define UsrIncDir IncRoot
+#endif
+
+/* Place to install .uid files */
+#ifndef UidDir
+# define UidDir $(LIBDIR)/uid
+#endif
+
+#ifndef XmExtraLibraries
+# define XmExtraLibraries /**/
+#endif
+
+#ifndef YaccFlags
+# define YaccFlags /**/
+#endif
+
+#define MotifSharedRev 2.1
+
+#ifndef SharedLibXm
+# define SharedLibXm HasSharedLibraries
+#endif
+#ifndef NormalLibXm
+# define NormalLibXm (!SharedLibXm | ForceNormalLib)
+#endif
+#ifndef DebugLibXm
+# define DebugLibXm NO
+#endif
+#ifndef ProfileLibXm
+# define ProfileLibXm NO
+#endif
+#ifndef SharedXmRev
+# define SharedXmRev MotifSharedRev
+#endif
+
+#ifndef SharedLibMrm
+# define SharedLibMrm HasSharedLibraries
+#endif
+#ifndef NormalLibMrm
+# define NormalLibMrm (!SharedLibMrm | ForceNormalLib)
+#endif
+#ifndef DebugLibMrm
+# define DebugLibMrm NO
+#endif
+#ifndef ProfileLibMrm
+# define ProfileLibMrm NO
+#endif
+#ifndef SharedMrmRev
+# define SharedMrmRev MotifSharedRev
+#endif
+
+#ifndef SharedLibUil
+# define SharedLibUil HasSharedLibraries
+#endif
+#ifndef NormalLibUil
+# define NormalLibUil (!SharedLibUil | ForceNormalLib)
+#endif
+#ifndef DebugLibUil
+# define DebugLibUil NO
+#endif
+#ifndef ProfileLibUil
+# define ProfileLibUil NO
+#endif
+#ifndef SharedUilRev
+# define SharedUilRev MotifSharedRev
+#endif
+
+#ifndef SharedLibACommon
+# define SharedLibACommon HasSharedLibraries
+#endif
+#ifndef NormalLibACommon
+# define NormalLibACommon (!SharedLibACommon | ForceNormalLib)
+#endif
+#ifndef DebugLibACommon
+# define DebugLibACommon NO
+#endif
+#ifndef ProfileLibACommon
+# define ProfileLibACommon NO
+#endif
+#ifndef SharedACommonRev
+# define SharedACommonRev MotifSharedRev
+#endif
+
+#ifndef SharedLibScript
+# define SharedLibScript HasSharedLibraries
+#endif
+#ifndef NormalLibScript
+# define NormalLibScript (!SharedLibScript | ForceNormalLib)
+#endif
+#ifndef DebugLibScript
+# define DebugLibScript NO
+#endif
+#ifndef ProfileLibScript
+# define ProfileLibScript NO
+#endif
+#ifndef SharedScriptRev
+# define SharedScriptRev MotifSharedRev
+#endif
+
+#ifndef SharedLibUtil
+# define SharedLibUtil HasSharedLibraries
+#endif
+#ifndef NormalLibUtil
+# define NormalLibUtil (!SharedLibUtil | ForceNormalLib)
+#endif
+#ifndef DebugLibUtil
+# define DebugLibUtil NO
+#endif
+#ifndef ProfileLibUtil
+# define ProfileLibUtil NO
+#endif
+#ifndef SharedUtilRev
+# define SharedUtilRev MotifSharedRev
+#endif
+
+#ifndef SharedLibCreate
+# define SharedLibCreate HasSharedLibraries
+#endif
+#ifndef NormalLibCreate
+# define NormalLibCreate (!SharedLibCreate | ForceNormalLib)
+#endif
+#ifndef DebugLibCreate
+# define DebugLibCreate NO
+#endif
+#ifndef ProfileLibCreate
+# define ProfileLibCreate NO
+#endif
+#ifndef SharedCreateRev
+# define SharedCreateRev MotifSharedRev
+#endif
+
+#ifndef SharedLibVisual
+# define SharedLibVisual HasSharedLibraries
+#endif
+#ifndef NormalLibVisual
+# define NormalLibVisual (!SharedLibVisual | ForceNormalLib)
+#endif
+#ifndef DebugLibVisual
+# define DebugLibVisual NO
+#endif
+#ifndef ProfileLibVisual
+# define ProfileLibVisual NO
+#endif
+#ifndef SharedVisualRev
+# define SharedVisualRev MotifSharedRev
+#endif
+
+#ifndef SharedLibSynth
+# define SharedLibSynth HasSharedLibraries
+#endif
+#ifndef NormalLibSynth
+# define NormalLibSynth (!SharedLibSynth | ForceNormalLib)
+#endif
+#ifndef DebugLibSynth
+# define DebugLibSynth NO
+#endif
+#ifndef ProfileLibSynth
+# define ProfileLibSynth NO
+#endif
+#ifndef SharedSynthRev
+# define SharedSynthRev MotifSharedRev
+#endif
+
+#ifndef SharedLibMCommon
+# define SharedLibMCommon HasSharedLibraries
+#endif
+#ifndef NormalLibMCommon
+# define NormalLibMCommon (!SharedLibMCommon | ForceNormalLib)
+#endif
+#ifndef DebugLibMCommon
+# define DebugLibMCommon NO
+#endif
+#ifndef ProfileLibMCommon
+# define ProfileLibMCommon NO
+#endif
+#ifndef SharedMCommonRev
+# define SharedMCommonRev MotifSharedRev
+#endif
+
+#ifndef XmClientLibs
+# define XmClientLibs $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XMEXTRA_LIBS)
+#endif
+#ifndef XmClientDepLibs
+# define XmClientDepLibs $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
+#endif
+
+#ifndef MrmClientLibs
+# define MrmClientLibs $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XMEXTRA_LIBS)
+#endif
+#ifndef MrmClientDepLibs
+# define MrmClientDepLibs $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
+#endif
+
+#ifndef UilClientLibs
+# define UilClientLibs $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(XMEXTRA_LIBS)
+#endif
+#ifndef UilClientDepLibs
+# define UilClientDepLibs $(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
+#endif
+
+#ifndef TestClientLibs
+# define TestClientLibs $(PURIFYLIBS) $(TESTCOMLIB) \
+ $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
+ $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
+ $(XMLIB) $(TESTGEOLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) \
+ $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
+#endif
+#ifndef TestUilClientLibs
+# define TestUilClientLibs $(PURIFYLIBS) $(TESTUILCOMLIB) $(TESTCOMLIB) \
+ $(AUTOSCRIPTLIB) $(AUTOUTILLIB) \
+ $(AUTOCREATELIB) $(AUTOVISUALLIB) $(AUTOSYNTHLIB) \
+ $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(TESTGEOLIB) \
+ $(XTOOLLIB) $(XPLIB) $(XLIB) $(AUTOEXTRALIBS) $(XMEXTRA_LIBS)
+#endif
+#ifndef TestClientDepLibs
+# define TestClientDepLibs XmClientDepLibs
+#endif
+#ifndef TestUilClientDepLibs
+# define TestUilClientDepLibs UilClientDepLibs
+#endif
+
+/* hardcoded default path. Contrary to the original duplicate of USRLIBDIR
+ in the Imakefiles. */
+#ifndef VirtualBindingsPath
+# define VirtualBindingsPath /usr/lib/Xm/bindings
+#endif
+
+ MTOP = MTop
+TOP_MOTIF_INCLUDES = -I$(MINCLUDESRC)
+#if defined(UseInstalled) || (UseInstalledMotif && UseInstalledX11)
+ UIL_INCLUDES = -I$(USRINCDIR)/uil
+#else
+ UIL_INCLUDES = -I$(UILSRC)
+#endif
+#ifdef BuildLibPathVar
+ MOTIFENVLIBDIR = MotifBuildLibPath
+#endif
+
+/* Message catalog usage */
+#ifndef GencatCmd
+# define GencatCmd gencat
+#endif
+#ifndef GencatFlags
+# define GencatFlags /**/
+#endif
+#if defined(NoMessageCatalog)
+# define BuildMessageCatalog NO
+# define MessageCatalogDefines -DNO_MESSAGE_CATALOG
+#else
+# define BuildMessageCatalog YES
+# define MessageCatalogDefines /**/
+#endif
+#ifndef MessageCatalogRule
+# if BuildMessageCatalog
+# define MessageCatalogRule(prefix) Real_MessageCatalogRule(prefix)
+# else
+# define MessageCatalogRule(prefix) Stub_MessageCatalogRule(prefix)
+# endif
+#endif
+
+ USRINCDIR = UsrIncDir
+ UIDDIR = UidDir
+ TESTSRC = $(MTOP)/tests
+ TESTLIB = $(TESTSRC)/lib
+ GENERALSRCLIB = $(TESTSRC)/General/lib
+ GENERALSRCBIN = $(TESTSRC)/General/bin
+ MANUALSRCLIB = $(TESTSRC)/Manual/lib
+ MANUALSRCBIN = $(TESTSRC)/Manual/bin
+ AUTOSRCLIB = $(TESTSRC)/Auto/lib
+ AUTOSRCBIN = $(TESTSRC)/Auto/bin
+ COMMONPP = $(GENERALSRCBIN)/Commonpp
+ GENRUN = $(GENERALSRCBIN)/Genrun
+ MANRUN = $(GENERALSRCBIN)/Manrun
+#ifdef DebugLib
+ TESTMALLOCSRC = $(GENERALSRCLIB)/Malloc
+#endif
+#ifdef DebugGeometry
+ TESTGEOSRC = $(TESTLIB)/Geometry
+#endif
+#ifdef Automation
+ TESTCOMSRC = $(AUTOSRCLIB)/Common
+ AUTOSCRIPTSRC = $(AUTOSRCLIB)/Script
+ AUTOSYNTHSRC = $(AUTOSRCLIB)/Synth
+ AUTOCREATESRC = $(AUTOSRCLIB)/Create
+ AUTOVISUALSRC = $(AUTOSRCLIB)/Visual
+ AUTOUTILSRC = $(AUTOSRCLIB)/Util
+ AUTOEXTRALIBS = -ll -ly -lm
+#else
+ TESTCOMSRC = $(MANUALSRCLIB)/Common
+#endif
+
+ BUILDDOCDIR = BuildDocDir
+ BUILDLOCDIR = BuildLocDir
+
+/* MTOOLKITSRC should be removed */
+ MTOOLKITSRC = $(TOOLKITSRC)
+#if ImportMotif || UseInstalledMotif
+ MINCLUDESRC = $(MTOP)/include
+ MDOCSRC = $(MTOP)/doc
+ MLOCSRC = $(MTOP)/localized
+#else
+ MINCLUDESRC = $(MTOP)/exports/include
+ MLOCSRC = $(MTOP)/exports/localized
+#endif
+ MLIBSRC = $(MTOP)/lib
+ MCLIENTSRC = $(MTOP)/clients
+ MDEMOSRC = $(MTOP)/demos
+ MWIDGETSRC = $(MLIBSRC)/Xm
+ MRESOURCESRC = $(MLIBSRC)/Mrm
+ UILSRC = $(MCLIENTSRC)/uil
+#ifdef MotifProjectRoot
+ MPROJECTROOT = MotifProjectRoot
+#endif
+
+ UIL = _MUse(uil,$(UILSRC)/uil)
+ DEPUIL = _MUseCat($(BINDIR),$(UILSRC),/uil)
+
+ XMEXTRA_LIBS = XmExtraLibraries
+
+/* These libraries use UseInstalledMotif instead of UseInstalled. */
+#undef _Use
+#undef _UseCat
+#define _Use _MUse
+#define _UseCat _MUseCat
+
+#ifndef MBuildLibDir
+# define MBuildLibDir BuildLibDir
+#endif
+
+#if SharedLibXm
+SharedLibReferences(XM,Xm,$(MWIDGETSRC),SOXMREV,SharedXmRev)
+#else
+ProjectUnsharedLibReferences(XM,Xm,$(MWIDGETSRC),MBuildLibDir)
+#endif
+
+#if SharedLibMrm
+SharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),SOMRMREV,SharedMrmRev)
+#else
+ProjectUnsharedLibReferences(MRESOURCE,Mrm,$(MRESOURCESRC),MBuildLibDir)
+#endif
+
+#if SharedLibUil
+SharedLibReferences(UIL,Uil,$(UILSRC),SOUILREV,SharedUilRev)
+#else
+ProjectUnsharedLibReferences(UIL,Uil,$(UILSRC),MBuildLibDir)
+#endif
+
+#ifdef DebugGeometry
+ProjectUnsharedLibReferences(TESTGEO,XtGeo,$(TESTGEOSRC),MBuildLibDir)
+#endif
+
+#if Automation
+
+# if SharedLibACommon
+SharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),SOACOMMONREV,SharedACommonRev)
+# else
+ProjectUnsharedLibReferences(TESTCOM,ACommon,$(TESTCOMSRC),MBuildLibDir)
+# endif
+
+TESTUILCOMLIB = $(TESTCOMSRC)/libACommonUil.a
+
+# if SharedLibScript
+SharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),SOSCRIPTREV,SharedScriptRev)
+# else
+ProjectUnsharedLibReferences(AUTOSCRIPT,Script,$(AUTOSCRIPTSRC),MBuildLibDir)
+# endif
+
+# if SharedLibSynth
+SharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),SOSYNTHREV,SharedSynthRev)
+# else
+ProjectUnsharedLibReferences(AUTOSYNTH,Synth,$(AUTOSYNTHSRC),MBuildLibDir)
+# endif
+
+# if SharedLibCreate
+SharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),SOCREATEREV,SharedCreateRev)
+# else
+ProjectUnsharedLibReferences(AUTOCREATE,Create,$(AUTOCREATESRC),MBuildLibDir)
+# endif
+
+# if SharedLibVisual
+SharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),SOVISUALREV,SharedVisualRev)
+# else
+ProjectUnsharedLibReferences(AUTOVISUAL,Visual,$(AUTOVISUALSRC),MBuildLibDir)
+# endif
+
+# if SharedLibUtil
+SharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),SOUTILREV,SharedUtilRev)
+# else
+ProjectUnsharedLibReferences(AUTOUTIL,Util,$(AUTOUTILSRC),MBuildLibDir)
+# endif
+
+#else /* Manual */
+
+# if SharedLibMCommon
+SharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),SOMCOMMONREV,SharedMCommonRev)
+# else
+ProjectUnsharedLibReferences(TESTCOM,MCommon,$(TESTCOMSRC),MBuildLibDir)
+# endif
+TESTUILCOMLIB = $(TESTCOMSRC)/libMCommonUil.a
+
+#endif /* Automation */
+
+
+/* Revert to the normal library rules. */
+#undef _Use
+#undef _UseCat
+#define _Use _XUse
+#define _UseCat _XUseCat
+
+
+#ifdef UsePurify
+ PURIFYLIBS = $(PURIFYHOME)/purify_stubs.a
+#endif
+ LINTMRESOURCE = $(MRESOURCESRC)/libMrm.a
+LINTXMWIDGETLIB = $(MWIDGETSRC)/llib-l/Xm.ln
+ LINTXMTOOL = $(MTOOLKITSRC)/llib-lXt.ln
+ LINTUILLIB = $(UILSRC)/llib-lUil.ln
+
+ YACCFLAGS = YaccFlags
+ UILFLAGS = UilFlags
+ GENCATFLAGS = GencatFlags
+ GENCAT = GencatCmd $(GENCATFLAGS)
+ MKCATTOOL = $(MLOCSRC)/util/mkcatdefs
+
+ RM_CMD = $(RM) FilesToClean ExtraFilesToClean TestExtraFilesToClean
+
+#if NeedDefaultDepLibs
+# if HasSharedLibraries || defined(UseInstalled)
+ DEPLIBS = $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
+# else
+ DEPLIBS = $(LOCAL_LIBRARIES)
+# endif
+ DEPLIBS1 = $(DEPLIBS)
+ DEPLIBS2 = $(DEPLIBS)
+ DEPLIBS3 = $(DEPLIBS)
+#endif /* NeedDefaultDepLibs */
diff --git a/nx-X11/config/cf/NetBSD.cf b/nx-X11/config/cf/NetBSD.cf
new file mode 100644
index 000000000..b41828059
--- /dev/null
+++ b/nx-X11/config/cf/NetBSD.cf
@@ -0,0 +1,692 @@
+XCOMM platform: $Xorg: NetBSD.cf,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/NetBSD.cf,v 3.122 2003/11/18 18:09:45 dawes Exp $
+
+
+#ifndef OSName
+#define OSName DefaultOSName OSBinaryType
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+
+
+#ifndef OSVendor
+#define OSVendor The NetBSD Foundation, Inc.
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+/*
+ * C library features
+ */
+#if ((OSMajorVersion > 1) || \
+ (OSMajorVersion == 1 && OSMinorVersion > 2) || \
+ (OSMajorVersion == 1 && OSMinorVersion == 2 && OSTeenyVersion > 1))
+# define HasPoll YES
+#endif
+#define HasNdbm YES
+#define HasPutenv YES
+#if OSMajorVersion == 1 && OSMinorVersion > 4 || OSMajorVersion > 1
+# define HasStrlcat YES
+#endif
+#define HasSnprintf YES
+#define HasBSD44Sockets YES
+#define Malloc0ReturnsNull NO
+#define SetTtyGroup YES
+#define DBMLibrary /**/
+#define HasDlopen YES
+#define HasSetProcTitle YES
+#ifndef HasLibCrypt
+# define HasLibCrypt YES
+#endif
+#ifndef BuildPDFdocs
+# define BuildPDFdocs NO
+#endif
+#ifndef HasShm
+# if OSMajorVersion == 0 && OSMinorVersion == 9 && OSTeenyVersion == 2
+/*
+ * Shm memory was removed in 0.9B because it was encumbered.
+ * A free version was added in 0.9C
+ */
+# define HasShm NO
+# else
+# define HasShm YES
+# endif
+#endif
+#define HasWChar32 YES
+/*
+ * There's a bug in NetBSD 1.0, 1.1 and 1.2 dlsym()
+ */
+#if ((OSMajorVersion == 1 && OSMinorVersion < 2) || \
+ (OSMajorVersion == 1 && OSMinorVersion == 2 && OSTeenyVersion < 2))
+# define HasDlsymBug YES
+#endif
+/* Mkstemp is there since 1.2 (at least) */
+#if (!(OSMajorVersion == 0 || \
+ (OSMajorVersion == 1 && OSMinorVersion < 2)))
+#define HasMkstemp YES
+#endif
+/* But the standalone mktemp doesn't exist before NetBSD 1.5*/
+#if (OSMajorVersion ==0 || (OSMajorVersion == 1 && OSMinorVersion <= 4))
+# define HasMktemp NO
+#else
+# define HasMktemp YES
+#endif
+
+#ifndef HasIssetugid
+# if (OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion >= 5))
+# define HasIssetugid YES
+# endif
+#endif
+
+#if (OSMajorVersion == 1 && OSMinorVersion >= 5 || OSMajorVersion > 1)
+#define HasGetIfAddrs YES
+#endif
+
+#define HasUsableFileMmap YES
+
+#define HasVarRun YES
+#define HasVarDb YES
+
+#define HasShadowPasswd NO
+
+#define InstallXloadSetGID NO
+
+#if OSMajorVersion < 1 || (OSMajorVersion == 1 && OSMinorVersion < 5)
+#define BuildIPv6 NO
+#endif
+
+#define IPv6SocketsAlsoIPv4 NO
+
+/*
+ * NetBSD 1.6M and newer supports POSIX Threads.
+ */
+
+#ifndef NetBSDThreads
+# define NetBSDThreads YES
+#endif
+
+#if NetBSDThreads && \
+ ((OSMajorVersion > 1) || \
+ (OSMajorVersion == 1 && OSMinorVersion > 6) || \
+ (OSMajorVersion == 1 && OSMinorVersion == 6 && OSTeenyVersion >= 13))
+
+# define HasPosixThreads YES
+# define ThreadedX YES
+# define HasThreadSafeAPI YES
+# define ThreadsLibraries -lpthread
+# if ((OSMajorVersion == 2 && OSMinorVersion == 99 && OSTeenyVersion < 11) || \
+ (OSMajorVersion == 2 && OSMinorVersion < 99) || \
+ (OSMajorVersion < 2))
+# define LibraryMTDefines -DUSE_NBSD_THREADLIB
+# endif
+# define SystemMTDefines -D_REENTRANT
+# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI
+#else
+# define ThreadedX NO
+#endif
+
+/*
+ * Compiler Features
+ */
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedWidePrototypes NO
+
+#define MkdirHierCmd mkdir -p
+
+#undef CcCmd
+#define CcCmd gcc
+#ifndef DefaultCCOptions
+#if defined(UseInstalled)
+#define DefaultCCOptions /**/
+#else
+#ifdef Arm32Architecture
+#define DefaultCCOptions -ansi -Dasm=__asm -fsigned-char \
+ -fomit-frame-pointer
+#elif defined(PpcArchitecture)
+# define DefaultCCOptions -ansi -Dasm=__asm -fsigned-char
+#else
+#define DefaultCCOptions -ansi -Dasm=__asm GccWarningOptions
+#endif
+#endif
+#endif
+
+#define CppCmd cpp
+#define StandardCppOptions -traditional
+#define StandardCppDefines /**/
+#define PreProcessCmd CcCmd -E
+#define PostIncDir /usr/include
+
+#define GccGasOption -DGCCUSESGAS
+#define AsmDefines -DUSE_GAS
+
+/* UseElfFormat defaults to YES if __ELF__ set */
+#ifndef UseElfFormat
+# ifdef __ELF__
+# undef __ELF__ /* other imake files shouldn't care */
+# define UseElfFormat YES
+# else
+# define UseElfFormat NO
+# endif
+#endif
+
+/*
+ * Dynamic loading supported starting in 1.0 on a.out platforms,
+ * and on all ELF platforms.
+ *
+ * XXX May not be correct on NetBSD/pmax (ELF, but might not have
+ * working shared libs).
+ *
+ * Disabled for NetBSD/vax until I figure out the scheme. --CS
+ */
+#if ((OSMajorVersion > 0) && defined(i386Architecture)) || \
+ defined(PpcArchitecture)
+# ifndef DoLoadableServer
+# define DoLoadableServer YES
+# endif
+#else
+# ifndef DoLoadableServer
+# define DoLoadableServer NO
+# endif
+#endif
+
+#if UseElfFormat
+#define DlLibrary -rdynamic /* no -ldl yet */
+#else
+#define DlLibrary /**/
+#endif
+
+/* All ELF NetBSD systems support Weak symbols */
+#define HasWeakSymbols UseElfFormat
+
+#ifdef i386Architecture
+# ifndef DefaultGcc2i386Opt
+# if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 2)
+ /* The GCC strength-reduce bug is fixed for NetBSD 1.3 and later */
+# define DefaultGcc2i386Opt -O2 GccAliasingArgs
+# endif
+# endif
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# if OSMajorVersion < 1
+# define ServerOSDefines XFree86ServerOSDefines -DXNO_SYSCONF
+# else
+# define ServerOSDefines XFree86ServerOSDefines
+# endif
+# if OSMajorVersion == 1 && OSMinorVersion >= 1 || OSMajorVersion >= 2
+# define ServerExtraSysLibs -li386
+# endif
+#else
+# define OptimizedCDebugFlags -O2
+# if defined(SparcArchitecture)
+# define ServerOSDefines -DDDXOSINIT
+# elif defined(AlphaArchitecture)
+# define ServerOSDefines XFree86ServerOSDefines
+# elif defined(Arm32Architecture)
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# elif defined(PpcArchitecture)
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT
+# else
+# define ServerOSDefines /**/
+# endif
+# if defined(AlphaArchitecture)
+# define ServerExtraSysLibs -lalpha
+# else
+# define ServerExtraSysLibs /**/
+# endif
+#endif
+#ifdef i386Architecture
+# define ServerExtraDefines GccGasOption XFree86ServerDefines
+# ifndef XFree86ConsoleDefines
+# if (OSMajorVersion == 1 && ((OSMinorVersion == 3 && OSTeenyVersion >= 6) \
+ || OSMinorVersion >= 4) \
+ || OSMajorVersion >= 2)
+# define XFree86ConsoleDefines -DPCCONS_SUPPORT -DPCVT_SUPPORT -DWSCONS_SUPPORT
+# else
+# define XFree86ConsoleDefines -DPCCONS_SUPPORT -DPCVT_SUPPORT
+# endif
+# endif
+#elif defined(SparcArchitecture)
+# if defined(Sparc64Architecture)
+# define ServerExtraDefines XFree86ServerDefines -D_XSERVER64
+# else
+# define ServerExtraDefines XFree86ServerDefines
+# endif
+# elif defined(AlphaArchitecture)
+ /* XXX for the following */
+# define ServerExtraDefines GccGasOption XFree86ServerDefines -D_XSERVER64
+# ifndef XFree86ConsoleDefines
+# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCCONS_SUPPORT -DPCVT_SUPPORT
+# endif
+#elif defined(AlphaArchitecture)
+# define ServerExtraDefines GccGasOption -D_XSERVER64
+#elif defined(Arm32Architecture)
+# define ServerExtraDefines GccGasOption XFree86ServerDefines
+# ifndef XFree86ConsoleDefines
+# define XFree86ConsoleDefines -DPCCONS_SUPPORT
+# endif
+#elif defined(PpcArchitecture)
+# define ServerExtraDefines GccGasOption XFree86ServerDefines
+# ifndef XFree86ConsoleDefines
+# define XFree86ConsoleDefines -DWSCONS_SUPPORT
+# endif
+#else
+# define ServerExtraDefines GccGasOption
+#endif
+
+#define StandardDefines -DCSRG_BASED
+/* Citrus mb locale were added in 1.5P */
+#if ((OSMajorVersion > 1) || \
+ (OSMajorVersion == 1 && OSMinorVersion > 5) || \
+ (OSMajorVersion == 1 && OSMinorVersion == 5 && OSTeenyVersion >= 15))
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H
+#else
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#endif
+
+#ifndef ExtraLibraries
+#define ExtraLibraries /**/
+#endif
+#ifndef UseGnuMalloc
+/*
+ * There is no way to map 1.4J correctly to OS*Version, so 'J' is mapped
+ * to OSTeenyVersion == 9. That should be safe, since there will never
+ * be a release for 1.4.9.
+ */
+# if ((OSMajorVersion > 1) || \
+ (OSMajorVersion == 1 && OSMinorVersion > 4) || \
+ (OSMajorVersion == 1 && OSMinorVersion == 4 && OSTeenyVersion > 9))
+# define UseGnuMalloc NO
+# else
+# define UseGnuMalloc YES
+#endif
+#endif
+#ifndef GnuMallocLibrary
+#define GnuMallocLibrary -lgnumalloc
+#endif
+
+#if ((OSMajorVersion > 1) || \
+ (OSMajorVersion == 1 && OSMinorVersion > 2) || \
+ (OSMajorVersion == 1 && OSMinorVersion == 2 && OSTeenyVersion > 1))
+#ifndef HasZlib
+#define HasZlib YES
+#endif
+#endif
+
+#define AdmDir /var/log
+
+#define HasFlex YES
+
+/* NetBSD doesn't have gperf in the base install */
+#define DontRebuildGperfOutput YES
+
+/*
+ * NetBSD doesn't have perl in default system
+ * you may override this in host.def if you installed perl from the packages
+ */
+#ifndef HasPerl
+#define HasPerl NO
+#endif
+
+/*
+ * NetBSD doesn't have gperf in default system
+ * you may override this in host.def if you installed perl from the packages
+ */
+#ifndef HasGperf
+#define HasGperf NO
+#endif
+
+/*
+ * Make & install Features
+ */
+#define HasBsdMake YES
+#define CompressAllFonts YES
+#define GzipFontCompression YES
+#define DefaultUserPath /bin:/usr/bin:/usr/pkg/bin:/usr/local/bin:$(BINDIR)
+#define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
+
+#ifdef InstallCmd
+# undef InstallCmd
+# define InstallCmd /usr/bin/install
+#endif
+
+#ifndef ExtraFilesToClean
+# define ExtraFilesToClean *.core
+#endif
+
+/*
+ * Documentation formatting
+ */
+#define NeqnCmd neqn -Tlatin1
+#define NroffCmd nroff -Tlatin1
+#define EqnCmd eqn -Tps
+#define HasGroff YES
+
+/*
+ * To use the NetBSD Aperture driver
+ */
+#if defined(i386Architecture)
+# ifndef HasNetBSDApertureDriver
+# define HasNetBSDApertureDriver YES
+# endif
+
+/*
+ * Builtin MTRR support (NetBSD 1.5Y and up)
+ */
+# if ((OSMajorVersion > 1) || \
+ (OSMajorVersion == 1 && OSMinorVersion >= 6) || \
+ (OSMajorVersion == 1 && OSMinorVersion == 5 && \
+ OSTeenyVersion >= 25))
+# define HasMTRRBuiltin YES
+# else
+ /*
+ * MTRR support provided by the Aperture driver
+ */
+# if HasNetBSDApertureDriver
+# ifndef HasMTRRSupport
+# define HasMTRRSupport YES
+# endif
+# endif
+# endif /* MTRRBuiltin */
+#endif /* i386Architecture */
+
+/*
+ * agpgart support (NetBSD 1.5Y and up)
+ */
+#if ((OSMajorVersion > 1) || \
+ (OSMajorVersion == 1 && OSMinorVersion >= 6) || \
+ (OSMajorVersion == 1 && OSMinorVersion == 5 && \
+ OSTeenyVersion >= 25))
+# ifndef HasAgpGart
+# define HasAgpGart YES
+# endif
+#endif
+
+/*
+ * MMX, SSE and 3DNow will be autodetected. NetBSD 1.6 and up have the
+ * necessary kernel and toolchain support.
+ */
+#if defined(i386Architecture) && \
+ ((OSMajorVersion > 1) || (OSMajorVersion == 1 && OSMinorVersion > 5))
+# define HasX86Support YES
+# define HasMMXSupport YES
+# define Has3DNowSupport YES
+# define HasSSESupport YES
+#else
+# define HasX86Support NO
+# define HasMMXSupport NO
+# define Has3DNowSupport NO
+# define HasSSESupport NO
+#endif
+
+#ifndef HasCookieMaker
+# if OSMajorVersion == 1 && OSMinorVersion >= 5 || OSMajorVersion >= 2
+ /* NetBSD 1.5 and later have /dev/urandom */
+# define HasCookieMaker YES
+# define MkCookieCmd \
+ 'dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"'
+# else
+# define HasCookieMaker NO
+# endif
+#endif
+
+
+/*
+ * ForceSubdirs - force make to build subdirectories
+ *
+ * For BSD 4.4 make
+ */
+#define ForceSubdirs(dirs) @@\
+dirs: .EXEC @@\
+ @cd $@ ; echo "making all in $(CURRENT_DIR)/$@..."; \ @@\
+ $(MAKE) $(MFLAGS) PassCDebugFlags all @@\
+ @@\
+.EXEC:
+
+/*
+ * Man pages need to be formatted when installed, so override the default
+ * imake rules.
+ */
+#define ManSuffix 1
+#define FileManSuffix 5
+#define ManSourcePath $(MANPATH)/cat
+
+#define InstallManPageLongBase(file,destdir,dest) @@\
+ @@\
+all:: file.0 @@\
+ @@\
+file.0:: file.$(MANNEWSUFFIX) @@\
+ @if [ -f file.$(MANNEWSUFFIX) ]; \ @@\
+ then \ @@\
+ cat file.$(MANNEWSUFFIX) | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) > file.0; \ @@\
+ fi @@\
+ @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ -@if [ -f file.0 ]; \ @@\
+ then \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/dest.0; \@@\
+ fi @@\
+ @@\
+clean:: @@\
+ RemoveFile(file.0)
+
+#define InstallManPageLong(file,destdir,dest) @@\
+BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\
+ @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+InstallManPageLongBase(file,destdir,dest)
+
+#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
+BuildInstallHtmlManPage(file,dest,suffix) @@\
+ @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+InstallManPageLongBase(file,destdir,dest)
+
+#define InstallMultipleMan(list,dest) @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (MNAME=`echo $$i | cut -f1 -d.`; \ @@\
+ set -x; \ @@\
+ cat $$i | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \ @@\
+ | $(COL) > $${MNAME}.0; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) $${MNAME}.0 \ @@\
+ $(DESTDIR)dest/$${MNAME}.0; \ @@\
+ $(RM) $${MNAME}.0); \ @@\
+ done
+
+#define InstallMultipleManSuffix(list,dest,suff) @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (set -x; \ @@\
+ cat $$i.suff | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \ @@\
+ | $(COL) > $$i.0; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) $$i.0 \ @@\
+ $(DESTDIR)dest/$$i.0; \ @@\
+ $(RM) $$i.0 ); \ @@\
+ done
+
+#define InstallManPageAliasesBase(file,destdir,aliases) @@\
+install.man:: @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in aliases; do \ @@\
+ (set -x; \ @@\
+ $(RM) $(DESTDIR)destdir/$$i.0;\ @@\
+ (cd $(DESTDIR)/destdir; $(LN) file.0 $$i.0);\ @@\
+ ); \ @@\
+ done
+
+#define InstallManPageAliases(file,destdir,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\
+ @@\
+InstallManPageAliasesBase(file,destdir,aliases)
+
+#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,suffix) @@\
+ @@\
+InstallManPageAliasesBase(file,destdir,aliases)
+
+/*
+ * Shared libraries supported starting in 1.0 on a.out platforms,
+ * and on all ELF platforms.
+ *
+ * XXX May not be correct on NetBSD/pmax (ELF, but might not have
+ * working shared libs).
+ */
+#if ((OSMajorVersion > 0) && \
+ !defined(AlphaArchitecture) && !defined(MipsArchitecture)) || \
+ UseElfFormat
+# ifndef HasSharedLibraries
+# define HasSharedLibraries YES
+# endif
+#endif
+
+#ifndef OSBinaryType
+#if UseElfFormat
+#define OSBinaryType [ELF]
+#else
+#define OSBinaryType /**/
+#endif
+#endif
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries NO
+#endif
+
+/*
+ * Unresolved references are fatal on NetBSD 1.5 for libGL, which is
+ * built with -Bsymbolic.
+ */
+#if UseElfFormat && OSMajorVersion == 1 && OSMinorVersion == 5
+#define SharedGLReqs $(LDPRELIBS) $(XLIB) -lc
+#endif
+
+#if HasSharedLibraries
+#include <bsdLib.rules>
+#endif /* HasSharedLibraries */
+
+/* Always build the XInput library, regardless of server support on this plattform */
+#if !defined(BuildXInputLib) && !defined(BuildServersOnly)
+# define BuildXInputLib YES
+#endif
+
+#if defined(i386Architecture) || defined(Arm32Architecture) || defined(AlphaArchitecture) || defined(PpcArchitecture)
+# include <xorg.cf>
+#endif
+
+/*
+ * Definitions for the SUN server on NetBSD/sparc
+ */
+#ifdef SparcArchitecture
+#ifndef Xsun24Server
+#define Xsun24Server YES
+#endif
+#ifndef XsunServer
+#define XsunServer YES
+#endif
+#ifndef XsunMonoServer
+#define XsunMonoServer NO /* XXX: does not link */
+#endif
+#ifndef BuildScreenSaverLibrary
+#define BuildScreenSaverLibrary YES
+#endif
+
+/*
+ * XFree86 uses its own (more portable) database routines to speed up
+ * the RGB database lookups
+ * However, if you want to use ndbm anyway, you can set that to NO in
+ * site.def
+ */
+#ifndef UseRgbTxt
+#define UseRgbTxt YES
+#endif
+#define BuildXF86VidModeExt NO
+#define BuildXF86DGA NO
+#define BuildXInputExt NO
+#include <xorg.cf>
+#endif
+
+/*
+ * Definition for compiling on MIPS machines
+ */
+#ifdef MipsArchitecture
+#define PositionIndependentCFlags
+#define SharedLibraryLoadFlags -x -shared --whole-archive -soname `echo $@ |
+sed 's/\.[0-9]*$$//'`
+#define SharedXtReqs $(XONLYLIB) $(SMLIB) $(ICELIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLONLYLIB) $(XLIB)
+#endif
+
+/*
+ * Definition for compiling on Alpha machines
+ */
+#ifdef AlphaArchitecture
+
+/* Build the shared XDM greeter on Alpha if it supports shared libs */
+#define SharedLibXdmGreet HasSharedLibraries
+#endif
+
+/*
+ * Definition for compile on macppc machines
+ */
+#ifdef PpcArchitecture
+
+# define OptimizedCDebugFlags -O2
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+
+# ifndef DoLoadableServer
+# define DoLoadableServer YES
+# endif
+
+# define UseElfFormat YES
+
+#endif
+
+/*
+ * Definition for compiling on VAX machines
+ */
+#ifdef VaxArchitecture
+#define BuildServer NO
+#endif
+
+/*
+ * General settings for all platforms
+ */
+#ifndef SharedLibXdmGreet
+#define SharedLibXdmGreet NO
+#endif
+
+#ifndef BuildHtmlManPages
+#define BuildHtmlManPages NO /* We don't want HTML manpages */
+#endif
+
+#ifndef UseSeparateConfDir
+#define UseSeparateConfDir NO /* We don't want appdefs in "/etc/X11". */
+#endif
+
+#if defined(NetBSDArchitecture) && \
+ ((OSMajorVersion > 1) || \
+ (OSMajorVersion == 1 && OSMinorVersion > 3))
+#define HasDevRandom YES
+#define RandomDeviceFile /dev/urandom
+#endif
diff --git a/nx-X11/config/cf/Oki.cf b/nx-X11/config/cf/Oki.cf
new file mode 100644
index 000000000..79992e5ed
--- /dev/null
+++ b/nx-X11/config/cf/Oki.cf
@@ -0,0 +1,30 @@
+XCOMM platform: $Xorg: Oki.cf,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+#ifndef OSName
+#define OSName Unix System V/860 Release 4.0 Version 3
+#endif
+XCOMM operating system: OSName
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 3
+#endif
+
+#define BootstrapCFlags -DOki
+#define SystemV4 YES
+#define HasLdRunPath YES
+#define ConnectionFlags -DTCPCONN -DUNIXCONN -DLOCALCONN
+#define SetTtyGroup YES
+#define HasPutenv YES
+#define HasPoll YES
+#define PatheticCpp YES
+#define CcCmd /usr/bin/cc
+#define StandardDefines -DSVR4 -Di860
+#define DefaultCCOptions -Xa
+#define BuildServer NO
+#define ToolkitStringsABIOptions -intelabi
+#include <sv4Lib.rules>
diff --git a/nx-X11/config/cf/OpenBSD.cf b/nx-X11/config/cf/OpenBSD.cf
new file mode 100644
index 000000000..d5b88daf3
--- /dev/null
+++ b/nx-X11/config/cf/OpenBSD.cf
@@ -0,0 +1,1017 @@
+XCOMM platform: $XFree86: xc/config/cf/OpenBSD.cf,v 3.100 2004/01/08 22:51:41 herrb Exp $
+XCOMM $XdotOrg: xc/config/cf/OpenBSD.cf,v 1.12 2005/10/01 16:42:11 herrb Exp $
+XCOMM
+
+#ifndef OSName
+#define OSName DefaultOSName OSBinaryType
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+
+#ifndef OSVendor
+#define OSVendor /**/
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+#ifdef Ports
+
+#define BinDir /usr/local/bin
+#define LibDir /usr/local/lib/X11
+#define UsrLibDir /usr/local/lib
+#define ManDirectoryRoot /usr/local/man
+#define LdPreLib -L/usr/X11R6/lib -L/usr/local/lib
+#define XpmLibDir /usr/X11R6/lib
+#define XpmIncDir /usr/X11R6/include
+#define ConfigDir /usr/X11R6/lib/X11/config
+#define IncRoot /usr/local/include
+#define TopXInclude -I/usr/X11R6/include
+#define ImakeCmd imake -DPorts
+#define DocDir /usr/local/share/doc
+#define BuildHtmlManPages NO
+
+#endif
+
+/*
+ * C library features
+ */
+#define HasPoll YES
+#define HasNdbm YES
+#define HasPutenv YES
+#define HasSnprintf YES
+#if OSMajorVersion == 2 && OSMinorVersion >= 4 || OSMajorVersion >= 3
+# define HasStrlcat YES
+#endif
+#define HasBSD44Sockets YES
+#define Malloc0ReturnsNull NO
+#define SetTtyGroup YES
+#define DBMLibrary /**/
+#define HasLibCrypt NO
+#define HasShm YES
+#define HasWChar32 YES
+#define HasMkstemp YES
+#define HasSetProcTitle YES
+#define HasZlib YES
+#ifndef HasLibpng
+# define HasLibpng NO
+#endif
+#ifndef HasKrbIV
+# if OSMajorVersion == 2 || OSMajorVersion == 3 && OSMinorVersion < 3
+# define HasKrbIV YES
+# if OSMajorVersion == 2 && OSMinorVersion <= 8
+# define KrbIVLibraries -lkrb -lkafs -ldes
+# endif
+# else
+ /* Kerberos IV was removed after OpenBSD 3.3 */
+# define HasKrbIV NO
+# endif
+#endif
+#define HasUsableFileMmap YES
+#define HasShadowPasswd NO
+#define IPv6SocketsAlsoIPv4 NO
+
+#define HasArc4Random YES
+
+#define HasNCurses YES
+#define NCursesLibName -lcurses
+#if defined(TermcapLibrary)
+#undef TermcapLibrary
+#endif
+#define TermcapLibrary -lcurses
+
+#define HasVarRun YES
+#define HasVarDb YES
+#define VarLibDir VarDbDirectory
+
+#define InstallXloadSetGID NO
+
+#ifndef HasIssetugid
+# if (OSMajorVersion >= 2)
+# define HasIssetugid YES
+# endif
+#endif
+
+#ifndef HasMktemp
+# if (OSMajorVersion > 2) || (OSMajorVersion == 2 && OSMinorVersion >= 1)
+# define HasMktemp YES
+# else
+# define HasMktemp NO
+# endif
+#endif
+
+/* OpenBSD >= 2.7 has getifaddrs() */
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 7)
+#define HasGetIfAddrs YES
+#endif
+
+/* OpenBSD >= 2.8 has setusercontext() */
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 7)
+#define HasSetUserContext YES
+#endif
+
+/* OpenBSD after 2.9 has BSD authentication */
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 9)
+# define HasBSDAuth YES
+#endif
+
+/* OpenBSD 3.0 and later has getpeereid() */
+#if OSMajorVersion >= 3
+# define HasGetpeereid YES
+#endif
+
+/* OpenBSD 3.0 has APM with kqueue interface */
+#if OSMajorVersion >= 3
+# define HasApmKqueue YES
+#endif
+
+/* OpenBSD 3.0 has libusb, next versions have libusbhid */
+#if OSMajorVersion >= 3
+# define HasLibUsb YES
+# ifndef HasLibUsbHid
+# if OSMajorVersion == 3 && OSMinorVersion > 0 || OSMajorVersion > 3
+# define HasLibUsbHid YES
+# define UsbHidLib -lusbhid
+# else
+# define HasLibUsbHid NO
+# define UsbHidLib -lusb
+# endif
+# endif
+#endif
+
+/*
+ * Compiler Features
+ */
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+
+#define UseGnuMalloc NO
+
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedWidePrototypes NO
+
+#define MkdirHierCmd mkdir -p
+
+#ifndef CppCmd
+#define CppCmd /usr/libexec/cpp
+#endif
+#define StandardCppOptions -traditional
+#define StandardCppDefines /**/
+#define PreProcessCmd CppCmd
+#define PreIncDir DefaultGccIncludeDir
+
+#ifndef CcCmd
+#define CcCmd cc
+#endif
+#ifndef AsCmd
+#define AsCmd cc -c -x assembler
+#endif
+#ifndef DefaultCCOptions
+#if defined(UseInstalled)
+ /* conform to OpenBSD's habits */
+# define DefaultCCOptions $(COPTS)
+#else
+# ifdef PpcArchitecture
+# define DefaultCCOptions -pipe -fsigned-char GccWarningOptions
+# else
+# define DefaultCCOptions -pipe GccWarningOptions
+# endif
+#endif
+#endif
+
+#define GccGasOption -DGCCUSESGAS
+#define AsmDefines -DUSE_GAS
+
+/* UseElfFormat defaults to YES if __ELF__ set */
+#ifndef UseElfFormat
+# ifdef __ELF__
+# undef __ELF__ /* other imake files shouldn't care */
+# define UseElfFormat YES
+# else
+# define UseElfFormat NO
+# endif
+#endif
+
+/*
+ * Increment shared libraries major numbers if using Gcc Stack Protector
+ * (This introduces an ABI change)
+ */
+#ifndef OverrideShlibRevs
+# define OverrideShlibRevs ProPoliceSupport
+#endif
+
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+
+
+#define AdmDir /var/log
+
+#define HasFlex YES
+
+/* OpenBSD doesn't have gperf in the base install */
+#define DontRebuildGperfOutput YES
+
+/*
+ * Make & install Features
+ */
+
+#define HasBsdMake YES
+
+#define BuildCyrillicFonts YES
+#define GzipFontCompression YES
+#define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR)
+#define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
+
+#define InstUidFlags -m 4755
+
+#ifdef InstallCmd
+# undef InstallCmd
+# define InstallCmd /usr/bin/install
+#endif
+
+#ifndef ExtraFilesToClean
+# define ExtraFilesToClean *.core
+#endif
+
+/*
+ * Documentation formatting
+ */
+#define NeqnCmd neqn -Tlatin1
+#define NroffCmd nroff -Tlatin1
+#define EqnCmd eqn -Tps
+#define HasGroff YES
+
+#ifndef HasCookieMaker
+# define HasCookieMaker YES
+# define MkCookieCmd \
+ 'dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"'
+#endif
+
+
+/*
+ * Man pages need to be formatted when installed, so override the default
+ * imake rules.
+ */
+#define ManSuffix 1
+#define FileManSuffix 5
+#define ManSourcePath $(MANPATH)/cat
+
+#define InstallManPageLongBase(file,destdir,dest) @@\
+all:: file.0 @@\
+ @@\
+file.0:: file.$(MANNEWSUFFIX) @@\
+ @if [ -f file.$(MANNEWSUFFIX) ]; \ @@\
+ then \ @@\
+ cat file.$(MANNEWSUFFIX) | $(NEQN) | $(TBL) | \ @@\
+ $(NROFF) $(MANMACROS) | $(COL) > file.0; \ @@\
+ fi @@\
+ @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ -@if [ -f file.0 ]; \ @@\
+ then \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/dest.0; \@@\
+ fi @@\
+ @@\
+clean:: @@\
+ RemoveFile(file.0)
+
+#define InstallManPageLong(file,destdir,dest) @@\
+BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\
+ @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+InstallManPageLongBase(file,destdir,dest)
+
+#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
+BuildInstallHtmlManPage(file,dest,suffix) @@\
+ @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+InstallManPageLongBase(file,destdir,dest)
+
+#define InstallMultipleMan(list,dest) @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (MNAME=`echo $$i | cut -f1 -d.`; \ @@\
+ set -x; \ @@\
+ cat $$i | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \ @@\
+ | $(COL) > $${MNAME}.0; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) $${MNAME}.0 \ @@\
+ $(DESTDIR)dest/$${MNAME}.0; \ @@\
+ $(RM) $${MNAME}.0); \ @@\
+ done
+
+#define InstallMultipleManSuffix(list,dest,suff) @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (set -x; \ @@\
+ cat $$i.suff | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \ @@\
+ | $(COL) > $$i.0; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) $$i.0 \ @@\
+ $(DESTDIR)dest/$$i.0; \ @@\
+ $(RM) $$i.0 ); \ @@\
+ done
+
+#define InstallManPageAliasesBase(file,destdir,aliases) @@\
+install.man:: @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in aliases; do \ @@\
+ (set -x; \ @@\
+ $(RM) $(DESTDIR)destdir/$$i.0;\ @@\
+ (cd $(DESTDIR)/destdir; $(LN) file.0 $$i.0);\ @@\
+ ); \ @@\
+ done
+
+#define InstallManPageAliases(file,destdir,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\
+ @@\
+InstallManPageAliasesBase(file,destdir,aliases)
+
+#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,suffix) @@\
+ @@\
+InstallManPageAliasesBase(file,destdir,aliases)
+
+
+/*
+ * InstallFontAliases - generate rules to install font aliases
+ * databases without comments for X11R5 servers
+ */
+#ifndef InstallFontAliasesNoComment
+#define InstallFontAliasesNoComment(dest) @@\
+install:: fonts.alias @@\
+ $(RM) _fonts.alias @@\
+ sed -e '/^!/d' -e '/^$$/d' < fonts.alias > _fonts.alias @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTALLDATFLAGS) _fonts.alias \ @@\
+ $(DESTDIR)dest/fonts.alias @@\
+ $(RM) _fonts.alias
+#endif /* InstallFontAliasesNoComment */
+
+/*
+ * OpenBSD specific Imake Config files
+ */
+#ifndef LocalConfigFiles
+#define LocalConfigFiles \
+ OpenBSDLib.rules OpenBSDLib.tmpl
+#endif
+
+/*
+ * Architecture specific sections - put all architecture dependent
+ * options and setting here into the correct section
+ */
+
+
+/*
+ * Definitions for the alpha architecture
+ */
+#ifdef AlphaArchitecture
+
+# if OSMajorVersion == 3 && OSMinorVersion > 1 || OSMajorVersion > 3
+# define HasWeakSymbols YES
+# endif
+
+/* XXX Xvfb currently causes a linker error: */
+/* XXX crtbegin.c(.fini+0x10): relocation truncated to fit: BRADDR text */
+# ifdef XVirtualFramebufferServer
+# undef XVirtualFramebufferServer
+# endif
+# define XVirtualFramebufferServer NO
+# ifdef XnestServer
+# undef XnestServer
+# endif
+# define XnestServer NO
+
+# if (OSMajorVersion < 3)
+# define HasSharedLibraries NO
+# endif
+
+# ifndef XorgServer
+# if OSMajorVersion == 3 && OSMinorVersion >= 2 || OSMajorVersion > 3
+# define XorgServer YES
+# else
+# define XorgServer NO
+# endif
+# endif
+
+/* Definitions for building the XFree86 server */
+# if XorgServer
+# ifndef HasNetBSDApertureDriver
+# define HasNetBSDApertureDriver YES
+# endif
+# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT
+# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines
+# define ServerExtraSysLibs -lalpha
+# ifndef DoLoadableServer
+# define DoLoadableServer YES
+# endif
+# define XF86OSCardDrivers wsfb
+# ifndef XFree86ConsoleDefines
+# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT
+# endif
+# define UseMatroxHal NO /* Matrox HAL is i386 only */
+
+# endif /* XorgServer */
+
+# include <xorg.cf>
+
+#endif /* AlphaArchitecture */
+
+/*
+ * Definitions for the AMD64 architecture
+ */
+#ifdef AMD64Architecture
+
+# define HasWeakSymbols YES
+# define HasSharedLibraries YES
+# define HasDlopen YES
+
+# define XorgServer YES
+
+# ifndef DoLoadableServer
+# define DoLoadableServer YES
+# endif
+
+# ifndef HasNetBSDApertureDriver
+# define HasNetBSDApertureDriver YES
+# endif
+
+# define HasAgpGart YES
+
+# define ServerExtraSysLibs -lamd64
+# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines
+
+# ifndef XFree86ConsoleDefines
+# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT
+# endif
+
+# ifndef HasMMXSupport
+# define HasMMXSupport YES
+# endif
+
+# ifndef HasX86Support
+# define HasX86Support YES
+# endif
+# include <xorg.cf>
+
+#endif /* AMD64Architecture */
+
+/*
+ * Definitions for the i386 architecture
+ */
+#ifdef i386Architecture
+
+# ifndef DoLoadableServer
+# define DoLoadableServer YES
+# endif
+
+/* Direct rendering (OpenBSD 3.3 and up). */
+# if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion > 2)
+# ifndef BuildXF86DRI
+# define BuildXF86DRI NO
+# endif
+# endif
+
+# define HasWeakSymbols YES
+
+/* To use the NetBSD Aperture driver */
+# ifndef HasNetBSDApertureDriver
+# define HasNetBSDApertureDriver YES
+# endif
+
+/* 2.7 and later have support for setting MTRRs */
+# ifndef HasMTRRSupport
+# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 6)
+# define HasMTRRSupport YES
+# else
+# define HasMTRRSupport NO
+# endif
+# endif
+
+/*
+ * agpgart support (OpenBSD 3.2 and up)
+ */
+# if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion > 1)
+# ifndef HasAgpGart
+# define HasAgpGart YES
+# endif
+# endif
+
+
+# ifndef DefaultGcc2i386Opt
+# if (OSMajorVersion == 2 && OSMinorVersion >= 3) || OSMajorVersion > 2
+ /* The GCC strength-reduce bug is fixed for OpenBSD 2.3 and later */
+# define DefaultGcc2i386Opt -O2 GccAliasingArgs
+# endif
+# endif
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraSysLibs -li386
+# define LdPostLib /**/
+# define ServerExtraDefines GccGasOption XFree86ServerDefines
+# ifndef XFree86ConsoleDefines
+# define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT
+# endif
+
+# define JoystickSupport NO
+
+/* A hack to work around an optimization problem with gcc 2.95.2 */
+# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 6)
+# define GccOptBug295
+# endif
+
+/* No MMX support in OpenBSD/a.out gas */
+# ifndef HasMMXSupport
+# define HasMMXSupport UseElfFormat
+# endif
+
+/* for DRI */
+# ifndef HasX86Support
+# define HasX86Support UseElfFormat
+# endif
+
+# include <xorg.cf>
+
+#endif /* i386Architecture */
+
+
+/*
+ * Definitions for the m68k architecture (currently amiga, hp300,
+ * mac68k, mvme68k, sun3)
+ */
+#ifdef Mc68020Architecture
+
+/*
+ * Function CSE makes gas -k not recognize external function calls as lazily
+ * resolvable symbols, thus sometimes making ld.so report undefined symbol
+ * errors on symbols found in shared library members that would never be
+ * called. Ask niklas@openbsd.org for details.
+ */
+
+# define PositionIndependentCFlags -fpic -fno-function-cse
+# define BuildGlxExt NO
+# define BuildGLXLibrary YES
+
+#endif /* Mc68020Architecture */
+
+
+/*
+ * Definitions for the amiga architecture
+ */
+#ifdef AmigaArchitecture
+
+# ifndef BuildServer
+# define BuildServer NO
+# endif
+
+# define ServerExtraDefines -DXFree86Server
+
+# include <xorg.cf>
+
+#endif /* AmigaArchitecture */
+
+
+/*
+ * Definitions for the hp300 architecture
+ */
+#ifdef Hp300Architecture
+
+# ifndef BuildServer
+# define BuildServer NO
+# endif
+/* For the X11R5 server */
+# define CompressAllFonts NO
+# define InstallFontAliases InstallFontAliasesNoComment
+# define UseRgbTxt NO
+# define UseRgb YES
+
+# define ServerExtraDefines -DXFree86Server
+
+#include <xorg.cf>
+
+#endif /* Hp300Architecture */
+
+
+/*
+ * Definitions for the mac68k architecture
+ */
+#ifdef Mac68kArchitecture
+
+# ifndef BuildServer
+# define BuildServer NO
+# endif
+
+# define ServerExtraDefines -DXFree86Server
+
+# include <xorg.cf>
+
+#endif /* mac68kArchitecture */
+
+
+/*
+ * Definitions for the mvme68k architecture
+ */
+#ifdef Mvme68kArchitecture
+
+# ifndef BuildServer
+# define BuildServer NO
+# endif
+
+# define ServerExtraDefines -DXFree86Server
+
+# include <xorg.cf>
+
+#endif /* Mvme68kArchitecture */
+
+
+/*
+ * Definitions for the sun3 architecture
+ */
+#ifdef Sun3Architecture
+
+# include <xf86.rules>
+
+# define ServerOSDefines -DDDXOSINIT
+# define BootstrapCFlags -Dsun3
+# define UnalignedReferencesAllowed YES /* changes _XtCopyArgs() */
+# define ServerExtraDefines GccGasOption -Dmc68000 -Dmc68020 \
+ -DXFree86Server -DINCLUDE_CG2_HEADER
+
+# ifndef Xsun24Server
+# define Xsun24Server NO
+# endif
+# ifndef XsunServer
+# define XsunServer YES
+# endif
+# ifndef XsunMonoServer
+# define XsunMonoServer NO
+# endif
+
+#define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+
+#endif /* Sun3Architecture */
+
+
+/*
+ * Definitions for the mips architecture (currently arc, pmax)
+ */
+#ifdef MipsArchitecture
+
+ /*
+ * Mips ELF shared libs need some special handling.
+ */
+# define PositionIndependentCFlags
+# define SharedLibraryLoadFlags -x -shared --whole-archive -soname `echo $@ | sed 's/\.[0-9]*$$//'`
+# define SharedXtReqs -L$(BUILDLIBDIR) $(XONLYLIB) $(SMLIB) $(ICELIB)
+# define SharedXmuReqs $(LDPRELIB) $(XTOOLONLYLIB) $(XLIB)
+
+#endif /* MipsArchitecture */
+
+
+/*
+ * Definitions for the arc architecture
+ */
+#ifdef ArcArchitecture
+
+# define ServerExtraDefines GccGasOption XFree86ServerDefines
+# ifndef XFree86ConsoleDefines
+# define XFree86ConsoleDefines -DPCCONS_SUPPORT
+# endif
+
+# include <xorg.cf>
+
+#endif /* ArcArchitecture */
+
+
+/*
+ * Definitions for the pmax architecture
+ */
+#ifdef PmaxArchitecture
+
+# include <xf86.rules>
+# ifndef BuildServer
+# define BuildServer NO
+# endif
+/* For the X11R5 server */
+# define CompressAllFonts NO
+# define InstallFontAliases InstallFontAliasesNoComment
+# define UseRgbTxt NO
+
+#endif /* PmaxArchitecture */
+
+/*
+ * Definitions for the PowerPC architecture
+ */
+#ifdef PpcArchitecture
+
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+# ifndef XFree86ConsoleDefines
+# define XFree86ConsoleDefines -DWSCONS_SUPPORT
+# endif
+
+# if OSMajorVersion == 3 && OSMinorVersion > 1 || OSMajorVersion > 3
+# define HasWeakSymbols YES
+# endif
+# ifndef GccWarningOptions
+# if defined(XFree86Devel) && XFree86Devel
+# define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wnested-externs
+# else
+# define GccWarningOptions -Wall -Wpointer-arith
+# endif
+# endif
+
+# ifndef XorgServer
+# define XorgServer YES
+# endif
+
+/* Definitions for building the X server */
+# if XorgServer
+# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT
+# define ServerExtraDefines GccGasOption XFree86ServerDefines
+# ifndef DoLoadableServer
+# define DoLoadableServer YES
+# endif
+# define XF86OSCardDrivers wsfb
+# ifndef XF86CardDrivers
+# define XF86CardDrivers ati mga glint s3virge sis savage\
+ trident chips tdfx \
+ DevelDrivers vga \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+# ifndef DevelDrivers
+# define DevelDrivers nv
+# endif
+
+# endif /* XorgServer */
+
+# include <xorg.cf>
+
+#endif /* PpcArchitecture */
+
+/*
+ * Definitions for the sparc architecture
+ */
+#ifdef SparcArchitecture
+
+# define BuildXF86MiscExt NO
+# define BuildMITMiscExt NO
+
+# if OSMajorVersion > 3 || OSMajorVersion == 3 && OSMinorVersion >= 2
+# define HasWeakSymbols YES
+#endif
+
+# if OSMajorVersion == 2 || OSMajorVersion == 3 && OSMinorVersion < 2
+# define ServerOSDefines -DDDXOSINIT
+# define ServerExtraDefines -DAVOID_GLYPHBLT -DPIXPRIV -DXFree86Server \
+ DebugDefines -DINCLUDE_CG2_HEADER \
+ -DX_BYTE_ORDER=$(X_BYTE_ORDER)
+# define XOrgServer NO
+# else
+# define XorgServer YES
+# endif
+
+# if !XorgServer
+
+# ifndef Xsun24Server
+# define Xsun24Server YES
+# endif
+# ifndef XsunServer
+# define XsunServer YES
+# endif
+# ifndef XsunMonoServer
+# define XsunMonoServer YES
+# endif
+# ifndef InstallXserverSetUID
+# define InstallXserverSetUID NO
+# endif
+
+# else /* XF86Server */
+
+# ifndef Xsun24Server
+# define Xsun24Server NO
+# endif
+# ifndef XsunServer
+# define XsunServer NO
+# endif
+# ifndef XsunMonoServer
+# define XsunMonoServer NO
+# endif
+# ifndef DoLoadableServer
+# define DoLoadableServer YES
+# endif
+
+# define XF86CardDrivers wsfb
+# define XFree86ConsoleDefines -DWSCONS_SUPPORT
+# define BuildXInputExt YES
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT
+# define ServerExtraDefines GccGasOption XFree86ServerDefines
+
+# endif
+
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+
+# define BuildXF86VidModeExt NO
+# define BuildXF86DGA NO
+# ifndef BuildXInputExt
+# define BuildXInputExt NO
+# endif
+# include <xorg.cf>
+
+#endif /* SparcArchitecture */
+
+/*
+ * Definitions for the sparc64 architecture
+ */
+
+#ifdef Sparc64Architecture
+
+# if OSMajorVersion == 3 && OSMinorVersion > 1 || OSMajorVersion > 3
+# define HasWeakSymbols YES
+# endif
+
+# ifndef XorgServer
+# define XorgServer YES
+# endif
+
+# define ServerExtraDefines GccGasOption -D_XSERVER64 XFree86ServerDefines
+# define ServerOSDefines XFree86ServerOSDefines -DDDXOSINIT
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+
+# if XorgServer
+# ifndef DoLoadableServer
+# define DoLoadableServer YES
+# endif
+# define XF86OSCardDrivers wsfb
+# define XFree86ConsoleDefines -DWSCONS_SUPPORT
+# endif
+
+# include <xorg.cf>
+
+#endif /* Sparc64Architecture */
+
+/*
+ * Definitions for the vax architecture
+ */
+#ifdef VaxArchitecture
+
+# ifndef BuildServer
+# define BuildServer NO
+# endif
+
+/* For the X11R5 server */
+# define CompressAllFonts NO
+# define InstallFontAliases InstallFontAliasesNoComment
+# define UseRgbTxt NO
+# define UseRgb YES
+
+# define ServerExtraDefines -DXFree86Server
+# define UnalignedReferencesAllowed YES
+# define HasSharedLibraries NO
+# define HasDlopen NO
+
+# define BuildGlxExt NO
+# define BuildGLXLibrary NO
+
+# include <xorg.cf>
+
+#endif /* VaxArchitecture */
+
+/* End or architecture specific section */
+
+/*
+ * Generic settings for all architectures
+ * which can be overridden by architecture specific sections above
+ */
+
+#ifndef StandardDefines
+# define StandardDefines -DCSRG_BASED
+#endif
+
+#if !defined(OptimizedCDebugFlags)
+# define OptimizedCDebugFlags -O2
+#endif
+
+#ifndef ServerOSDefines
+# define ServerOSDefines /**/
+#endif
+
+#ifndef ServerExtraDefines
+# define ServerExtraDefines GccGasOption
+#endif
+
+#ifndef HasWeakSymbols
+# define HasWeakSymbols NO
+#endif
+
+/*
+ * Multi-thread safe libs
+ */
+#if HasWeakSymbols == YES && (OSMajorVersion == 2 && OSMinorVersion >= 6 || OSMajorVersion >= 3)
+# define HasPosixThreads YES
+# define ThreadedX YES
+# define NeedUIThrStubs YES
+# define ThreadsCompileFlag -pthread
+# define ThreadsLibraries -pthread
+#else
+# define ThreadedX NO
+#endif
+
+
+/* Set this to YES when getpwuid_r is added to libc_r */
+#define HasThreadSafeAPI NO
+
+#ifndef ExtraLibraries
+# define ExtraLibraries /**/
+#endif
+
+#ifndef DoLoadableServer
+#define DoLoadableServer NO
+#endif
+
+#ifndef XVirtualFramebufferServer
+# undef BuildServer
+# define BuildServer YES
+# define XVirtualFramebufferServer YES
+#endif
+
+#ifndef XnestServer
+# undef BuildServer
+# define BuildServer YES
+# define XnestServer YES
+#endif
+
+#ifndef BuildScreenSaverLibrary
+# define BuildScreenSaverLibrary YES
+#endif
+
+#ifndef CompressAllFonts
+# define CompressAllFonts YES
+#endif
+
+#ifndef SharedLibXdmGreet
+# define SharedLibXdmGreet NO
+#endif
+
+#define HasFreetype2 NO
+#define HasExpat NO
+#define BuildXterm BuildClients
+
+/*
+ * XFree86 uses its own (more portable) database routines to speed up
+ * the RGB database lookups
+ * However, if you want to use ndbm anyway, you can set that to NO in
+ * host.def
+ */
+#ifndef UseRgbTxt
+# define UseRgbTxt YES
+#endif
+
+#ifndef OSBinaryType
+# if UseElfFormat
+# define OSBinaryType [ELF]
+# else
+# define OSBinaryType /**/
+# endif
+#endif
+
+#ifndef HasDlopen
+# define HasDlopen YES
+#endif
+
+#ifndef DlLibrary
+# if UseElfFormat
+# if (OSMajorVersion < 3 || OSMajorVersion == 3 && OSMinorVersion == 0)
+# define DlLibrary -ldl
+# else
+# define DlLibrary -Wl,--export-dynamic
+# endif
+# else
+# define DlLibrary /**/
+# endif
+#endif
+
+#if !defined(GccWarningOptions)
+# define GccWarningOptions -Wall -Wpointer-arith
+#endif
+
+/* This must come last */
+#if OSMajorVersion == 2 && OSMinorVersion >= 8 || OSMajorVersion > 2
+# include <OpenBSDLib.rules>
+#else
+# include <bsdLib.rules>
+#endif
diff --git a/nx-X11/config/cf/OpenBSDLib.rules b/nx-X11/config/cf/OpenBSDLib.rules
new file mode 100644
index 000000000..5bb9a4761
--- /dev/null
+++ b/nx-X11/config/cf/OpenBSDLib.rules
@@ -0,0 +1,191 @@
+XCOMM $OpenBSD: OpenBSDLib.rules,v 1.1 2000/10/09 20:43:58 matthieu Exp $
+
+
+
+
+/*
+ * OpenBSD shared library rules
+ */
+
+XCOMM $XFree86: xc/config/cf/OpenBSDLib.rules,v 1.10 2003/10/31 20:49:03 herrb Exp $
+
+#ifndef UseElfFormat
+#define UseElfFormat NO
+#endif
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+#ifndef ForceNormalLib
+#define ForceNormalLib YES
+#endif
+
+#ifndef UseRpath
+#define UseRpath YES
+#endif
+
+#ifndef BaseShLibReqs
+#define BaseShLibReqs /* -lc implied by $(CC) */
+#endif
+
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <OpenBSDLib.tmpl>
+#endif
+#ifndef RpathLoadFlags
+#if UseRpath
+#define RpathLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
+#else
+#define RpathLoadFlags /**/
+#endif
+#endif
+#ifndef LibraryRpathLoadFlags
+#define LibraryRpathLoadFlags RpathLoadFlags
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -shared PositionIndependentCFlags LibraryRpathLoadFlags
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -fPIC
+#endif
+#ifndef PositionIndependentCplusplusFlags
+#define PositionIndependentCplusplusFlags -fPIC
+#endif
+#if UseElfFormat
+#ifndef ExtraLoadFlags
+#ifdef UseInstalled
+#define ExtraLoadFlags RpathLoadFlags
+#else
+#define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(BUILDLIBDIR)
+#endif
+#endif
+#ifndef HardCodeLibdirFlag
+#define HardCodeLibdirFlag RpathLoadFlags
+#endif
+#endif /* UseElfFormat */
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ * NOTE: file must be executable, hence "INSTBINFLAGS"
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist @@\
+ $(RM) $@~ @@\
+ set -x; \ @@\
+ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$@\ @@\
+ solist $(REQUIREDLIBS) BaseShLibReqs); @@\
+ LinkBuildSonameLibrary($@) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedLibraryTarget */
+
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedDepLibraryTarget */
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ @@\
+ $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name
+
+#endif /* SharedDepModuleTarget */
+
+#ifndef SharedDriModuleTarget
+#define SharedDriModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ $@.map @@\
+ $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ $(RM) $@ $@.map @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name @@\
+ $(RM) name.map
+
+#endif /* SharedDriModuleTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
+
+/*
+ * DynamicModuleTarget - build a module to be dynamically loaded
+ */
+#ifdef DynamicModuleTarget
+#undef DynamicModuleTarget
+#define DynamicModuleTarget(module,modlist) @@\
+AllTarget(module) @@\
+ @@\
+module: modlist @@\
+ RemoveFile($@) @@\
+ $(CC) -o $@ $(SHLIBLDFLAGS) modlist @@\
+ @@\
+clean:: @@\
+ RemoveFile(module)
+#endif /* DynamicModuleTarget */
+
diff --git a/nx-X11/config/cf/OpenBSDLib.tmpl b/nx-X11/config/cf/OpenBSDLib.tmpl
new file mode 100644
index 000000000..db6da5548
--- /dev/null
+++ b/nx-X11/config/cf/OpenBSDLib.tmpl
@@ -0,0 +1,531 @@
+XCOMM platform: $OpenBSD: OpenBSDLib.tmpl,v 1.6 2003/04/04 19:48:58 matthieu Exp $
+XCOMM platform: $XFree86: xc/config/cf/OpenBSDLib.tmpl,v 1.10 2004/06/29 22:57:46 herrb Exp $
+XCOMM
+
+/* Shared libraries dependencies */
+#if HasGcc && GccMajorVersion >= 3
+# define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB) -lsupc++
+#endif
+
+/* Shared Library Revisions. Crank major on API Changes */
+
+#if OverrideShlibRevs
+
+# if OSMajorVersion == 3 && OSMinorVersion > 1 && OSMinorVersion <= 5
+# ifndef SharedX11Rev
+# define SharedX11Rev 7.0
+# endif
+# ifndef SharedXThrStubRev
+# define SharedXThrStubRev 7.0
+# endif
+# ifndef SharedXextRev
+# define SharedXextRev 7.0
+# endif
+# ifndef SharedXssRev
+# define SharedXssRev 2.0
+# endif
+# ifndef SharedXxf86miscRev
+# define SharedXxf86miscRev 2.0
+# endif
+# ifndef SharedXxf86vmRev
+# define SharedXxf86vmRev 2.0
+# endif
+# ifndef SharedXxf86dgaRev
+# define SharedXxf86dgaRev 2.0
+# endif
+# ifndef SharedXxf86rushRev
+# define SharedXxf86rushRev 2.0
+# endif
+# ifndef SharedXvRev
+# define SharedXvRev 2.0
+# endif
+# ifndef SharedXvMCRev
+# define SharedXvMCRev 2.0
+# endif
+# ifndef SharedXineramaRev
+# define SharedXineramaRev 2.0
+# endif
+# ifndef SharedDpsRev
+# define SharedDpsRev 2.0
+# endif
+# ifndef SharedDpsTkRev
+# define SharedDpsTkRev 2.0
+# endif
+# ifndef SharedPSResRev
+# define SharedPSResRev 2.0
+# endif
+# ifndef SharedGluRev
+# if HasGcc && GccMajorVersion >= 3
+ /* Gcc 3 changes the name mangling scheme on OpenBSD */
+# define SharedGluRev 3.0
+# else
+# define SharedGluRev 2.0
+# endif
+# endif
+# ifndef SharedGlxRev
+# define SharedGlxRev 2.0
+# endif
+# ifndef SharedGLwRev
+# define SharedGLwRev 2.0
+# endif
+# ifndef SharedXrenderRev
+# define SharedXrenderRev 2.1
+# endif
+# ifndef SharedXrandrRev
+# define SharedXrandrRev 3.0
+# endif
+# ifndef SharedXcursorRev
+# define SharedXcursorRev 1.0
+# endif
+# ifndef SharedXfontcacheRev
+# define SharedXfontcacheRev 2.0
+# endif
+# ifndef SharedXauRev
+# define SharedXauRev 7.0
+# endif
+# ifndef SharedXdmcpRev
+# define SharedXdmcpRev 7.0
+# endif
+# ifndef SharedXmuRev
+# define SharedXmuRev 7.0
+# endif
+# ifndef SharedXmuuRev
+# define SharedXmuuRev 2.0
+# endif
+# ifndef SharedOldXRev
+# define SharedOldXRev 7.0
+# endif
+# ifndef SharedXpRev
+# define SharedXpRev 7.0
+# endif
+# ifndef SharedXtRev
+# define SharedXtRev 7.0
+# endif
+# ifndef SharedXaRev
+# define SharedXaRev 2.0
+# endif
+# ifndef SharedXawRev
+# define SharedXawRev 9.0
+# endif
+# ifndef SharedXaw7Rev
+# define SharedXaw7Rev 8.0
+# endif
+# ifndef SharedXaw6Rev
+# define SharedXaw6Rev 7.1
+# endif
+# ifndef SharedXiRev
+# define SharedXiRev 7.0
+# endif
+# ifndef SharedXtstRev
+# define SharedXtstRev 7.0
+# endif
+# ifndef SharedICERev
+# define SharedICERev 7.1
+# endif
+# ifndef SharedSMRev
+# define SharedSMRev 7.0
+# endif
+# ifndef SharedXkeyRev
+# define SharedXkeyRev 7.0
+# endif
+# ifndef SharedFSRev
+# define SharedFSRev 7.0
+# endif
+# ifndef SharedFontRev
+# define SharedFontRev 2.0
+# endif
+# ifndef SharedFontEncRev
+# define SharedFontEncRev 2.0
+# endif
+# ifndef SharedXpmRev
+# define SharedXpmRev 5.0
+# endif
+# ifndef SharedFreetype2Rev
+# define SharedFreetype2Rev 11.1
+# endif
+# ifndef SharedExpatRev
+# define SharedExpatRev 4.0
+# endif
+# ifndef SharedXft1Rev
+# define SharedXft1Rev 1.2
+# endif
+# ifndef SharedXftRev
+# define SharedXftRev 3.0
+# endif
+# ifndef SharedFontconfigRev
+# define SharedFontconfigRev 1.0
+# endif
+# ifndef SharedXTrapRev
+# define SharedXTrapRev 7.0
+# endif
+# ifndef SharedPSResRev
+# define SharedPSResRev 2.0
+# endif
+# ifndef SharedXfixesRev
+# define SharedXfixesRev 3.0
+# endif
+# ifndef SharedXdamageRev
+# define SharedXdamageRev 1.0
+# endif
+# ifndef SharedXcompositeRev
+# define SharedXcompositeRev 1.0
+# endif
+
+
+# elif OSMajorVersion == 3 && OSMinorVersion >= 6 && OSMinorVersion <= 7
+
+# ifndef SharedX11Rev
+# define SharedX11Rev 8.1
+# endif
+# ifndef SharedXThrStubRev
+# define SharedXThrStubRev 8.0
+# endif
+# ifndef SharedXextRev
+# define SharedXextRev 8.0
+# endif
+# ifndef SharedXssRev
+# define SharedXssRev 3.0
+# endif
+# ifndef SharedXxf86miscRev
+# define SharedXxf86miscRev 3.0
+# endif
+# ifndef SharedXxf86vmRev
+# define SharedXxf86vmRev 3.0
+# endif
+# ifndef SharedXxf86dgaRev
+# define SharedXxf86dgaRev 3.0
+# endif
+# ifndef SharedXxf86rushRev
+# define SharedXxf86rushRev 3.0
+# endif
+# ifndef SharedXvRev
+# define SharedXvRev 3.0
+# endif
+# ifndef SharedXvMCRev
+# define SharedXvMCRev 3.0
+# endif
+# ifndef SharedXineramaRev
+# define SharedXineramaRev 3.0
+# endif
+# ifndef SharedDpsRev
+# define SharedDpsRev 3.0
+# endif
+# ifndef SharedDpsTkRev
+# define SharedDpsTkRev 3.0
+# endif
+# ifndef SharedPSResRev
+# define SharedPSResRev 3.0
+# endif
+# ifndef SharedGluRev
+# if HasGcc && GccMajorVersion >= 3
+ /* Gcc 3 changes the name mangling scheme on OpenBSD */
+# define SharedGluRev 4.0
+# else
+# define SharedGluRev 3.0
+# endif
+# endif
+# ifndef SharedGlxRev
+# define SharedGlxRev 3.1
+# endif
+# ifndef SharedOSMesaRev
+# define SharedOSMesaRev 6.0
+# endif
+# ifndef SharedGLwRev
+# define SharedGLwRev 3.0
+# endif
+# ifndef SharedXrenderRev
+# define SharedXrenderRev 3.1
+# endif
+# ifndef SharedXrandrRev
+# define SharedXrandrRev 4.0
+# endif
+# ifndef SharedXcursorRev
+# define SharedXcursorRev 2.2
+# endif
+# ifndef SharedXfontcacheRev
+# define SharedXfontcacheRev 3.0
+# endif
+# ifndef SharedXauRev
+# define SharedXauRev 8.0
+# endif
+# ifndef SharedXdmcpRev
+# define SharedXdmcpRev 8.0
+# endif
+# ifndef SharedXmuRev
+# define SharedXmuRev 8.0
+# endif
+# ifndef SharedXmuuRev
+# define SharedXmuuRev 3.0
+# endif
+# ifndef SharedOldXRev
+# define SharedOldXRev 8.0
+# endif
+# ifndef SharedXpRev
+# define SharedXpRev 8.0
+# endif
+# ifndef SharedXtRev
+# define SharedXtRev 8.0
+# endif
+# ifndef SharedXaRev
+# define SharedXaRev 3.0
+# endif
+# ifndef SharedXawRev
+# define SharedXawRev 10.0
+# endif
+# ifndef SharedXaw7Rev
+# define SharedXaw7Rev 9.0
+# endif
+# ifndef SharedXaw6Rev
+# define SharedXaw6Rev 8.1
+# endif
+# ifndef SharedXiRev
+# define SharedXiRev 8.0
+# endif
+# ifndef SharedXtstRev
+# define SharedXtstRev 8.0
+# endif
+# ifndef SharedICERev
+# define SharedICERev 8.1
+# endif
+# ifndef SharedSMRev
+# define SharedSMRev 8.0
+# endif
+# ifndef SharedXkeyRev
+# define SharedXkeyRev 8.0
+# endif
+# ifndef SharedFSRev
+# define SharedFSRev 8.0
+# endif
+# ifndef SharedFontRev
+# define SharedFontRev 4.0
+# endif
+# ifndef SharedFontEncRev
+# define SharedFontEncRev 3.0
+# endif
+# ifndef SharedXpmRev
+# define SharedXpmRev 6.0
+# endif
+# ifndef SharedFreetype2Rev
+# define SharedFreetype2Rev 13.1
+# endif
+# ifndef SharedExpatRev
+# define SharedExpatRev 5.0
+# endif
+# ifndef SharedXft1Rev
+# define SharedXft1Rev 3.0
+# endif
+# ifndef SharedXftRev
+# define SharedXftRev 5.0
+# endif
+# ifndef SharedFontconfigRev
+# define SharedFontconfigRev 2.0
+# endif
+# ifndef SharedXTrapRev
+# define SharedXTrapRev 8.0
+# endif
+# ifndef SharedPSResRev
+# define SharedPSResRev 3.0
+# endif
+# ifndef SharedXResRev
+# define SharedXResRev 2.0
+# endif
+# ifndef SharedxkbfileRev
+# define SharedxkbfileRev 2.0
+# endif
+# ifndef SharedxkbuiRev
+# define SharedxkbuiRev 2.0
+# endif
+# ifndef SharedXfixesRev
+# define SharedXfixesRev 3.0
+# endif
+# ifndef SharedXdamageRev
+# define SharedXdamageRev 1.0
+# endif
+# ifndef SharedXcompositeRev
+# define SharedXcompositeRev 1.0
+# endif
+
+#elif OSMajorVersion > 3 || OSMajorVersion == 3 && OSMinorVersion == 8
+
+# ifndef SharedX11Rev
+# define SharedX11Rev 9.0
+# endif
+# ifndef SharedXThrStubRev
+# define SharedXThrStubRev 8.0
+# endif
+# ifndef SharedXextRev
+# define SharedXextRev 9.0
+# endif
+# ifndef SharedXssRev
+# define SharedXssRev 4.0
+# endif
+# ifndef SharedXxf86miscRev
+# define SharedXxf86miscRev 4.0
+# endif
+# ifndef SharedXxf86vmRev
+# define SharedXxf86vmRev 4.0
+# endif
+# ifndef SharedXxf86dgaRev
+# define SharedXxf86dgaRev 4.0
+# endif
+# ifndef SharedXxf86rushRev
+# define SharedXxf86rushRev 4.0
+# endif
+# ifndef SharedXvRev
+# define SharedXvRev 4.0
+# endif
+# ifndef SharedXvMCRev
+# define SharedXvMCRev 4.0
+# endif
+# ifndef SharedXineramaRev
+# define SharedXineramaRev 4.0
+# endif
+# ifndef SharedDpsRev
+# define SharedDpsRev 4.0
+# endif
+# ifndef SharedDpsTkRev
+# define SharedDpsTkRev 4.0
+# endif
+# ifndef SharedPSResRev
+# define SharedPSResRev 3.0
+# endif
+# ifndef SharedGluRev
+# if HasGcc && GccMajorVersion >= 3
+ /* Gcc 3 changes the name mangling scheme on OpenBSD */
+# define SharedGluRev 5.0
+# else
+# define SharedGluRev 4.0
+# endif
+# endif
+# ifndef SharedGlxRev
+# define SharedGlxRev 4.0
+# endif
+# ifndef SharedOSMesaRev
+# define SharedOSMesaRev 7.0
+# endif
+# ifndef SharedGLwRev
+# define SharedGLwRev 4.0
+# endif
+# ifndef SharedXrenderRev
+# define SharedXrenderRev 4.0
+# endif
+# ifndef SharedXrandrRev
+# define SharedXrandrRev 5.0
+# endif
+# ifndef SharedXcursorRev
+# define SharedXcursorRev 3.0
+# endif
+# ifndef SharedXfontcacheRev
+# define SharedXfontcacheRev 4.0
+# endif
+# ifndef SharedXauRev
+# define SharedXauRev 9.0
+# endif
+# ifndef SharedXdmcpRev
+# define SharedXdmcpRev 9.0
+# endif
+# ifndef SharedXmuRev
+# define SharedXmuRev 9.0
+# endif
+# ifndef SharedXmuuRev
+# define SharedXmuuRev 4.0
+# endif
+# ifndef SharedOldXRev
+# define SharedOldXRev 9.0
+# endif
+# ifndef SharedXpRev
+# define SharedXpRev 9.0
+# endif
+# ifndef SharedXtRev
+# define SharedXtRev 9.0
+# endif
+# ifndef SharedXaRev
+# define SharedXaRev 4.0
+# endif
+# ifndef SharedXawRev
+# define SharedXawRev 11.0
+# endif
+# ifndef SharedXaw7Rev
+# define SharedXaw7Rev 10.0
+# endif
+# ifndef SharedXaw6Rev
+# define SharedXaw6Rev 9.0
+# endif
+# ifndef SharedXiRev
+# define SharedXiRev 9.0
+# endif
+# ifndef SharedXtstRev
+# define SharedXtstRev 9.0
+# endif
+# ifndef SharedICERev
+# define SharedICERev 8.0
+# endif
+# ifndef SharedSMRev
+# define SharedSMRev 8.0
+# endif
+# ifndef SharedXkeyRev
+# define SharedXkeyRev 9.0
+# endif
+# ifndef SharedFSRev
+# define SharedFSRev 8.0
+# endif
+# ifndef SharedFontRev
+# define SharedFontRev 4.0
+# endif
+# ifndef SharedFontEncRev
+# define SharedFontEncRev 3.0
+# endif
+# ifndef SharedXpmRev
+# define SharedXpmRev 7.0
+# endif
+# ifndef SharedFreetype2Rev
+# define SharedFreetype2Rev 13.0
+# endif
+# ifndef SharedExpatRev
+# define SharedExpatRev 5.0
+# endif
+# ifndef SharedXft1Rev
+# define SharedXft1Rev 4.0
+# endif
+# ifndef SharedXftRev
+# define SharedXftRev 6.0
+# endif
+# ifndef SharedFontconfigRev
+# define SharedFontconfigRev 2.0
+# endif
+# ifndef SharedXTrapRev
+# define SharedXTrapRev 9.0
+# endif
+# ifndef SharedPSResRev
+# define SharedPSResRev 3.0
+# endif
+# ifndef SharedXResRev
+# define SharedXResRev 3.0
+# endif
+# ifndef SharedxkbfileRev
+# define SharedxkbfileRev 3.0
+# endif
+# ifndef SharedxkbuiRev
+# define SharedxkbuiRev 3.0
+# endif
+# ifndef SharedXfixesRev
+# define SharedXfixesRev 4.0
+# endif
+# ifndef SharedXdamageRev
+# define SharedXdamageRev 2.0
+# endif
+# ifndef SharedXcompositeRev
+# define SharedXcompositeRev 2.0
+# endif
+# ifndef SharedxrxRev
+# define SharedxrxRev 7.0
+# endif
+# ifndef SharedxrxnestRev
+# define SharedxrxnestRev 7.0
+# endif
+
+#endif /* OSMajorVersion .. */
+
+#endif /* OverrideShlibRevs */
+
+#include <bsdLib.tmpl>
diff --git a/nx-X11/config/cf/QNX4.cf b/nx-X11/config/cf/QNX4.cf
new file mode 100644
index 000000000..b38738c46
--- /dev/null
+++ b/nx-X11/config/cf/QNX4.cf
@@ -0,0 +1,98 @@
+XCOMM platform: $XFree86: xc/config/cf/QNX4.cf,v 1.3 2000/07/07 20:06:56 tsi Exp $
+
+#define StripInstalledPrograms NO
+#define BuildServer YES
+#define DoLoadableServer NO /* sorry, are u listenning QSSL? */
+#define BuildLBX YES /* For now */
+#define ExpandManNames YES
+#define ByteOrder X_LITTLE_ENDIAN
+
+#ifndef OSName
+#define OSName QNX4
+#endif
+
+#ifndef OSVendor
+#define OSVendor QNX Corp.
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 25
+#endif
+
+/* Use a non-broken shell ... */
+#define BourneShell /usr/local/bin/pdksh
+#define OSDefines -DQNX4 -DQNX -D__QNX__ -DNO_REGEX -DSTRINGS_ALIGNED -D__i386__
+
+#define SourceDefines -D_POSIX_SOURCE
+#define DoRanlibCmd NO
+#undef ArCmd
+#define ArCmd wlib -b -c -p=256
+#define MkdirHierCmd mkdir -p
+#ifdef UseInstalled
+#define InstallCmd install
+#else
+#define InstallCmd $(SHELL) $(CONFIGSRC)/util/install.sh
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+#define DefaultCCOptions -5s -Otx -Wc,-r -b -j -Wc,-ei -N128000 -zp4 -mf
+#define LibraryCCOptions -5s -Otx -Wc,-r -b -j -Wc,-ei -zp4 -mf
+#define ServerCCOptions -5s -Otx -Wc,-r -T1 -M -N4096000 -j -b -mf -Wc,-ei -Wc,-s -zp4 -llibmalloc
+#define LocalLibraries
+#define ExtraLibraries -lsocket -lunix
+#define CLibrary
+#define PosixLibraries
+#define ConnectionFlags -DUNIXCONN -DTCPCONN
+#define CppCmd /usr/X11R6/bin/cpp
+
+#define HasShadowPasswd YES
+#define HasLibCrypt YES
+#define SharedLibXdmGreet NO
+#define HasShm NO /* For now as well */
+#define HasSockets YES
+#define HasPutenv YES
+#define HasCbrt NO
+#define HasVarDirectory NO
+#define HasSnprintf YES
+#define HasBSD44Sockets YES
+#define HasPerl NO
+#define LogDirectory /usr/adm
+#define XLogFile XFree86
+
+#define BuildHtmlManPages NO /* We don't want HTML manpages */
+#define BuildRman NO
+
+#define AvoidNullMakeCommand YES
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull YES
+#define UseInternalMalloc NO
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+
+#ifndef NeedWidePrototypes
+#define NeedWidePrototypes NO
+#endif
+
+#define LexCmd flex -l
+#define LexLib -lfl
+#define TermcapLibrary -lncurses
+#ifndef UseStaticTermcapLib
+#define UseStaticTermcapLib NO
+#endif
+
+#define StandardCppDefines -traditional StandardDefines
+#define StandardDefines OSDefines SourceDefines
+#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
+#define ServerExtraDefines XFree86ServerDefines
+#define ExtraFilesToClean *.err *.map
+
+#include <QNX4.rules>
+#include <xorg.cf>
+
diff --git a/nx-X11/config/cf/QNX4.rules b/nx-X11/config/cf/QNX4.rules
new file mode 100644
index 000000000..3ae8fe256
--- /dev/null
+++ b/nx-X11/config/cf/QNX4.rules
@@ -0,0 +1,65 @@
+XCOMM platform: $XFree86: xc/config/cf/QNX4.rules,v 1.1 1999/12/27 00:45:43 robin Exp $
+
+XCOMM Rules to work around wlib for QNX...
+
+#define LinkFile(tofile, fromfile) @@\
+tofile:: fromfile @@\
+ $(CP) fromfile tofile @@\
+ @@\
+includes:: tofile @@\
+ @@\
+depend:: tofile @@\
+ @@\
+clean:: @@\
+ RemoveFile(tofile)
+
+#define ObjectFromSpecialSource(dst, src, flags) @@\
+NoConfigRec(dst.c) @@\
+ @@\
+dst.c: src.c @@\
+ RemoveFile($@) @@\
+ $(CP) $? $@ @@\
+ @@\
+SpecialCObjectRule(dst,NullParameter,flags) @@\
+ @@\
+includes:: dst.c @@\
+ @@\
+depend:: dst.c @@\
+ @@\
+clean:: @@\
+ RemoveFile(dst.c)
+
+
+#define ObjectFromSpecialAsmSource(dst, src, flags) @@\
+dst.S: src.S @@\
+ RemoveFile($@) @@\
+ $(CP) $? $@ @@\
+ @@\
+dst.o: dst.S @@\
+ AssembleObject(dst,flags) @@\
+ @@\
+dst.i: dst.S @@\
+ CPPOnlyAsm(dst,flags) @@\
+ @@\
+depend:: dst.S @@\
+ @@\
+clean:: @@\
+ RemoveFile(dst.S)
+
+/* This is the rule to make reloc. OMF objects. We use a little
+ * trick which works only for OMF....
+ * "catomf" can be downloaded from
+ * http://prdownloads.sourceforge.net/openqnx/catomf.tar.gz
+ * or contact Rick Lake <rick@anp.nl>
+ */
+#define NormalRelocatableTarget(objname,objlist) @@\
+AllTarget(objname.Osuf) @@\
+ @@\
+objname.Osuf: objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ /usr/local/bin/catomf -O $@ objlist
+
+
+
+
+
diff --git a/nx-X11/config/cf/README b/nx-X11/config/cf/README
new file mode 100644
index 000000000..c4c5f59ab
--- /dev/null
+++ b/nx-X11/config/cf/README
@@ -0,0 +1,700 @@
+$Xorg: README,v 1.4 2000/08/18 04:03:58 coskrey Exp $
+
+
+
+
+$XFree86: xc/config/cf/README,v 1.20 2003/04/14 20:35:50 herrb Exp $
+
+The easiest way to write an Imakefile is to find another one that does
+something similar and copy/modify it!
+
+To change any of these variables, edit the site.def file.
+
+Imake.tmpl provides defaults for the following variables:
+
+ AlternateIncRoot compiler needs -I to find project includes
+ AlternateUsrLibDir linker needs -L to find project libraries
+ ArCmd command used to create libraries
+ ArCmdBase program name part of ArCmd
+ ArAddCmd flags to have ArCmdBase add files to a library
+ ArExtCmd flags to have ArCmdBase extract files
+ AsCmd command used to run assembler
+ BootstrapCFlags missing cpp symbols needed to get started
+ BourneShell command used to run Bourne Shell
+ CCsuf suffix that C++ source files have
+ CURDIR current directory relative to top of sources
+ CcCmd command to run C compiler
+ CompressCmd command to run compress program
+ ConstructMFLAGS System V option to set MFLAGS make variable
+ CpCmd command to copy one file to another
+ CplusplusCmd command to run C++ compiler
+ CplusplusFilt command to run C++ name demangler
+ CplusplusYaccCmd command to produce C++ source from yacc source
+ CppCmd command to run C preprocessor
+ CrossCompiling cross compiling? (not fully supported)
+ DebuggableCDebugFlags C compiler -I's and -D's to turn on debug info
+ DefaultCCOptions default special C compiler options
+ DefaultCDebugFlags debug/optimize flags for programs
+ DefaultUsrBin program directory used even if PATH not set
+ DependFlags extra makedepend flags
+ DoRanlibCmd boolean for system uses ranlib
+ EqnCmd command used for eqn
+ ExecableScripts boolean for systems that can exec() #!/bin/sh
+ ExpandManNames boolean to expand man pages names to long form
+ ExtraFilesToClean extra files to remove on make clean
+ ExtraLibraries system-specific libraries need to link
+ ExtraLoadFlags system-specific loader flags
+ FileManSuffix man suffix for file format pages
+ FilesToClean files to delete in make clean
+ FortranCmd command to run Fortran compiler
+ FortranDebugFlags flags for Fortran debug info
+ FortranFlags Fortran compiler flags
+ GzipCmd command to run gzip program
+ HasBSD44Sockets boolean for system has BSD4.4 sockets
+ HasBsdMake use the 4.4BSD variant of the make program?
+ HasBsearch boolean for libc has bsearch()
+ HasBrokenCCForLink boolean for brain damaged cc driver
+ HasCenterLineC boolean for system has CenterLine C compiler
+ HasCenterLineCplusplus boolean for system has CenterLine C++ compiler
+ HasClearmake use Clearcase's clearmake make program?
+ HasCodeCenter boolean for system has CodeCenter
+ HasCookieMaker boolean for system has xauth cookie generator
+ HasCplusplus system has a C++ compiler?
+ HasDECnet system has DECnet?
+ HasFortran boolean for system has Fortran compiler
+ HasGcc boolean for system has GNU gcc compiler
+ HasGcc2 boolean for system has GNU gcc 2.x compiler
+ HasGcc2ForCplusplus use gcc 2 for C++ programs?
+ HasGnuMake use the GNU make program?
+ HasGhostPCL boolean for system has GhostPCL
+ HasGhostScript boolean for system has GhostScript
+ HasKrbIV system has Kerberos version IV support?
+ HasKrb5 system has Kerberos version 5 support?
+ HasLargeTmp boolean for system has /tmp space
+ HasLatex system has LaTeX document preparation software
+ HasLibCrypt boolean for system has libcrypt
+ HasMotif boolean for system has Motif
+ HasMotif2 boolean for system has Motif2 or OpenMotif
+ HasNdbm boolean for system has ndbm routines
+ HasPoll use poll() syscall?
+ HasPurify boolean for system has Purify
+ HasPutenv boolean for libc has putenv()
+ HasSecureRPC boolean for Sun Secure RPC
+ HasSetProcTitle boolean for setproctitle()
+ HasSetUserContext boolean for setusercontext()
+ HasSentinel boolean for system has Sentinel available
+ HasSharedLibraries boolean for system has shared libraries
+ HasShm boolean for System V shared memory
+ HasSockets boolean for system has BSD sockets
+ HasStrcasecmp boolean for system implements str[n]casecmp
+ HasStreams use STREAMS I/O interface?
+ HasSymLinks boolean for system has symbolic links
+ HasTestCenter boolean for system has TestCenter
+ HasVarDirectory boolean for system has /var
+ HasVFork boolean for system has vfork()
+ HasVoidSignalReturn boolean for POSIX signal() procs
+ HasZlib boolean for system has libz
+ IncludeSharedObjectInNormalLib define for static libs to include
+ -fPIC objects on relevant archs
+ IncRoot parent of X11 include directory
+ InstBinFlags install flags for binaries
+ InstDatFlags install flags for data files
+ InstIncFlags install flags for header files
+ InstKmemFlags install flags for xload to get at /dev/kmem
+ InstLibFlags install flags for libraries
+ InstManFlags install flags for manual pages
+ InstPgmFlags install flags for normal programs
+ InstUidFlags install flags for xterm to chown /dev/ptys
+ InstallCmd command to install files
+ KrbIVIncludes where to include KerberosIV header files from
+ KrbIVLibraries where to load KerberosIV libraries from
+ Krb5Includes where to include Kerberos header files from
+ Krb5Libraries where to load Kerberos libraries from
+ LdCmd command to run loader
+ LdCombineFlags flags for incremental loading
+ LexCmd command to run lex
+ LexLib library for programs using lex output
+ LintCmd command to run lint
+ LintLibFlag flags to generate lint libraries
+ LintOpts lint options to control strictness
+ LnCmd command to link two files
+ LoaderLibPrefix loader flags before libraries
+ LocalRulesFile site-specific file with additional imake rules
+ LocalTmplFile file with additional imake variables
+ MacroFile name of machine-dependent config params file
+ MacroIncludeFile <MacroFile>
+ MakeCmd command to run make
+ Malloc0ReturnsNull boolean for malloc(0) == NULL
+ Malloc0ReturnsNullDefines -D's to build libX11/libXt
+ MathLibrary library for programs using C math functions
+ MkCookieCmd command to generate an xauth cookie
+ MsMacros macro flag for TroffCmd, normally "-ms"
+ MvCmd command to rename a file
+ NdbmDefines -D's to turn on use of ndbm routines
+ NeedConstPrototoypes whether const is supported
+ NeedFunctionPrototypes whether or not to force function prototypes
+ NeedNestedPrototypes whether nested prototypes are supported
+ NeedVarargsPrototypes whether varargs prototypes are supported
+ NeedWidePrototypes whether or not to widen function prototypes
+ NoOpCDebugFlags C compiler flags to not debug or optimize
+ NoRConst YES if const for structs of funcs is bad
+ OSMajorVersion major version number of operating system
+ OSMinorVersion minor version number of operating system
+ OSName operating system name
+ OSTeenyVersion maintenance version number of operating system
+ OptimizedCDebugFlags C compiler flags to turn on optimization
+ XtPopdownConformance XtPopdown conformans to the specification
+ PreProcessCmd command to run /lib/cpp on scripts
+ RanlibCmd command to clean up libraries
+ RanlibInstFlags flags to ranlib after copying
+ ResourceConfigurationManagement boolean for Xt's Resource Configuration
+ Management
+ RmCmd command to delete files
+ ShLibDir directory in which to install shared libraries
+ StandardCppDefines -D's for running cpp
+ StandardDefines -D's for running C compiler
+ StandardIncludes -I's for running C compiler
+ StripInstalledPrograms boolean for sites that want to install -s
+ SystemV boolean for systems that are at least SVR2
+ SystemV4 boolean for SVR4 systems
+ TOPDIR relative path to top of sources
+ TagsCmd command to run tags
+ TblCmd command to run tbl
+ TroffCmd command to run troff to get PostScript
+ UNCOMPRESSPATH command to run uncompress (obsolete)
+ UnalignedReferencesAllowed boolean for unaligned copies ok
+ UsrLibDir directory in which to install libraries
+ YaccCmd command to run yacc
+
+X11.tmpl provides defaults for the following variables:
+
+ AdmDir directory containing system log files
+ AllocateLocalDefines -D's to turn on alloca() (should be in Imake.tmpl)
+ BDFTOSNFFILT command to run bdftosnf
+ BaseExtensionDefines universal extensions to use
+ BinDir directory in which to install programs
+ BuildAppgroup build AppGroup extension in server
+ BuildCup build Colormap Utilization extension in server
+ BuildDBE build DOUBLE-BUFFER extension
+ BuildDmx build Distributed Multihead X server and extension
+ BuildDPMS build Display Power Management Signaling extension
+ BuildFontServer build font server
+ BuildFonts build pcf fonts
+ BuildIncRoot relative path to location of headers in build
+ BuildIncTop path from build includes directory to top
+ BuildEVI build EVI server extension
+ BuildLBX build LBX (aka X.fast) server extension
+ BuildMultibuffer build Multibuffer extension (obsolete)
+ BuildPlugin build xrx plug-in for web browsers
+ BuildRECORD Build RECORD extension
+ BuildServer build X server
+ BuildXAudio build Audio
+ BuildXAServer build Audio server
+ BuildXCSecurity Build Security Extension
+ BuildXInputExt build X Input extension (requires ddx support,
+ which exists only in Xhp and XFree86)
+ BuildXInputLib build X Input library
+ BuildXKB build X Keyboard Extension?
+ BuildXKBlib build X Keyboard Extension into Xlib?
+ UseXKBInClients Use XKB functions in normal clients?
+ ConfigDir install directory for config files
+ ConnectionFlags -D's for supported transports
+ ContribDir location of user-contributed sources
+ DebugLibFS build libFS_d.a
+ DebugLibICE build libICE_d.a
+ DebugLibSM build libSM_d.a
+ DebugLibX11 build libX11_d.a
+ DebugLibXau build libXau_d.a
+ DebugLibXaw build libXaw_d.a
+ DebugLibXdmcp build libXdmcp_d.a
+ DebugLibXext build libXext_d.a
+ DebugLibXi build libXi_d.a
+ DebugLibXmu build libXmu_d.a
+ DebugLibXt build libXt_d.a
+ DebugLibXtst build libXtst_d.a
+ DebugLibXag build libXag_d.a
+ DebugOldX build liboldX_d.a
+ DefaultCursorTheme name of default cursor theme
+ DefaultFSConfigFile default font server config file
+ DefaultFontPath default server font path
+ DefaultRGBDatabase default server rgb color database
+ DefaultSystemPath default system xdm PATH environment variable
+ DefaultSystemShell default /bin/sh
+ DefaultUserPath default user xdm PATH environment variable
+ DependCmd command to run makedepend
+ DependDir build directory containing makedepend program
+ DriverManDir directory in which to install driver man pages
+ DriverManSuffix man suffix for driver pages
+ ExtensionDefines -D's for universal extensions
+ ExtensionOSDefines -D's for additional extensions
+ FontCompilerFlags flags for bdftosnf
+ FontDefines -D's to turn on font options
+ FontDir directory in which to install fonts
+ FontFilters -D's to specify font conversion filters
+ FontOSDefines -D's for which fonts to support
+ ForceNormalLib force building of .a in addition to shared lib
+ GzipFontCompression boolean for using gzip instead of compress
+ HasXdmAuth boolean for using XDM-AUTHORIZATION-1;
+ needs Wraphelp.c, see Release Notes
+ InstallAppDefFiles install new app defaults files over old?
+ InstallFSConfig install fs config file over old?
+ InstallLibManPages boolean for installing library man pages
+ InstallSecurityConfig install server security policy file over old?
+ InstallXdmConfig install xdm config files over old?
+ InstallXinitConfig install xinit config files over old?
+ KrbIVDefines defines for use with KerberosIV
+ LibDir directory in which to install X11 support files
+ LibManSuffix man suffix for library pages
+ LibmanDir directory in which to install library man pages
+ LintlibDir directory in which to install lint libs
+ ManDir directory in which to install program man pages
+ ManDirectoryRoot parent of man directories relative to root
+ ManPath full path of parent directory
+ ManSourcePath common prefix of man page directories
+ ManSuffix man suffix for programs
+ MiscManSuffix man suffix for miscellaneous pages
+ MiscManDir directory in which to install misc man pages
+ NeedDefaultDepLibs boolean for enabling default DEPLIBS
+ NlsDir directory in which to install nls files
+ NormalLibFS build libFS.a
+ NormalLibICE build libICE.a
+ NormalLibSM build libSM.a
+ NormalLibX11 build libX11.a
+ NormalLibXau build libXau.a
+ NormalLibXaw build libXaw.a
+ NormalLibXdmcp build libXdmcp.a
+ NormalLibXext build libXext.a
+ NormalLibXi build libXi.a
+ NormalLibXmu build libXmu.a
+ NormalLibXt build libXt.a
+ NormalLibXtst build libXtst.a
+ NormalLibXag build libXag.a
+ NormalOldX build liboldX.a
+ OsNameDefines If uname(2) unavailable, set to -DOS_NAME=OSName
+ PrimaryScreenResolution resolution of default server screen
+ ProfileLibFS build libFS_p.a
+ ProfileLibICE build libICE_p.a
+ ProfileLibSM build libSM_p.a
+ ProfileLibX11 build libX11_p.a
+ ProfileLibXau build libXau_p.a
+ ProfileLibXaw build libXaw_p.a
+ ProfileLibXdmcp build libXdmcp_p.a
+ ProfileLibXext build libXext_p.a
+ ProfileLibXi build libXi_p.a
+ ProfileLibXmu build libXmu_p.a
+ ProfileLibXt build libXt_p.a
+ ProfileLibXtst build libXtst_p.a
+ ProfileLibXag build libXag_p.a
+ ProfileOldX build liboldX_p.a
+ ProjectX version indicating this is the X Window System
+ RemoveTargetProgramByMoving boolean for rm -f that doesn't
+ SHELLPATH -D for /bin/sh
+ ServerConfigDir directory for server security config files
+ ServerDefines complete -D's for server
+ ServerExtraDefines special -D's for server
+ ServerOSDefines OS -D's for server
+ ServerAssertDefines -DNDEBUG for no assertions, /**/ for assertions
+ SharedLibFS boolean for making sharable libFS.so
+ SharedLibICE boolean for making sharable libICE.so
+ SharedLibSM boolean for making sharable libSM.so
+ SharedLibX11 boolean for making sharable libX11.so
+ SharedLibXau boolean for making sharable libXau.so
+ SharedLibXaw boolean for making sharable libXaw.so
+ SharedLibXdmcp boolean for making sharable libXdmcp.so
+ SharedLibXext boolean for making sharable libXext.so
+ SharedLibXi boolean for making sharable libXi.so
+ SharedLibXmu boolean for making sharable libXmu.so
+ SharedLibXt boolean for making sharable libXt.so
+ SharedLibXtst boolean for making sharable libXtst.so
+ SharedLibXag boolean for making sharable libXag.so
+ SharedOldX boolean for making sharable liboldX.so
+ ShmDefines MIT-SHM define
+ TwmDir directory in which to install twm config files
+ UseCCMakeDepend boolean for using alternate makedepend script
+ UseRgbTxt use rgb.txt file as is instead of DBM-compiled
+ VarDirectory directory in /var for logs, etc., and config
+ VendorHasX11R6_3libXext don't need Security & AppGroup in xrx plug-in
+ XAppLoadDir directory in which to install app defaults
+ XFileSearchPathBase base file search path
+ XFileSearchPathDefault default path to search for app defaults files
+ XInputDefines XINPUT define
+ XMalloc0ReturnsNullDefines -D's specifically for libX11
+ XawClientDepLibs DEPLIBS for clients that use Xaw
+ XawClientLibs LOCAL_LIBRARIES for clients that use Xaw
+ XdmConfigurationSubdirectory name of default xdm configuration
+ XdmDir directory in which to install xdm files
+ XdmServersType type of xdm Xservers file to install
+ XinitDir directory in which to install xinit files
+ XPrintDir parent of X Print server config directory
+ XprtServer build the X Print server
+ XpRasterDDX include the raster print ddx driver
+ XpColorPclDDX include the color PCL print ddx driver
+ XpMonoPclDDX include the monochrome PCL print ddx driver
+ XpPostScriptDDX include the PostScript print ddx driver
+ XpPdfDDX include the PDF print ddx driver
+ XpSvgDDX include the SVG print ddx driver
+ XmanLocalSearchPath non-standard path for man pages
+ XtErrorPrefix leading text in XtError() msg; eg. 'X Toolkit '
+ XtWarningPrefix leading text in XtWarning()msg, same as above
+ XtMalloc0ReturnsNullDefines -D's specifically for libXt
+ ZBDFTOSNFFILT -D to run uncompress and bdftosnf (obsolete)
+
+
+Library.tmpl provides defaults for the following variables:
+
+ AvoidNullMakeCommand for makes that spout about $(_NULLCMD_)
+ LibraryCCOptions special C compiler options for libraries
+ LibraryCDebugFlags library debug/optimize flags to override defs
+ LibraryCcCmd command to run C compiler in libraries
+ LibraryCplusplusOptions special C++ options for libraries
+ LibraryCplusplusDebugFlags library debug/optimize flags for C++
+ LibraryCplusplusCmd command to run C++ compiler in libraries
+ LibraryDefines -D's for libraries
+ SeparateSharedCompile shared and unshared libs use same binaries?
+
+
+Server.tmpl provides defaults for the following variables:
+
+ ServerCCOptions server C compiler options to override defaults
+ ServerCcCmd command to run C compiler in server
+ ServerCDebugFlags server debug/opt compiler flags
+ ServerDefines server standard -D's
+ InstallServerSetUID does this system need X server suid to root?
+
+
+Threads.tmpl provides defaults for the following variables:
+
+ LocalThreads whether to enable multi-threading support
+ LocalThreadsDefines -D flags needed in this directory
+
+
+An <os>Lib.rules file provides defaults for the following variables:
+
+ HasSharedLibraries boolean for using shared libraries
+ SharedDataSeparation boolean indicating separate data/code
+ SharedCodeDef -D's for compiling shared library files
+ SharedLibraryDef -D's for defining which kind of shared lib
+ ShLibIncludeFile location of the <os>Lib.tmpl file
+ SharedLibraryLoadFlags loader flags when making the library
+ UseExportLists boolean for using an export list
+ PositionIndependentCFlags PIC compiler flags for C
+ PositionIndependentCplusplusFlags PIC compiler flags for C++
+
+ Note: PositionIndependentCplusplusFlags is only required if the
+ C and C++ compilers use different flags to build PIC code. The
+ default configuration will try to use PositionIndependentCFlags
+ for both C and C++ compiles.
+
+An <os>Lib.tmpl file provides defaults for the following variables:
+
+ SharedFSReqs required libs for libFS.so
+ SharedFSRev version number for libFS.so
+ SharedICEReqs required libs for libICE.so
+ SharedICERev version number for libICE.so
+ SharedOldXReqs required libs for liboldX.so
+ SharedOldXRev version number for liboldX.so
+ SharedSMReqs required libs for libSM.so
+ SharedSMRev version number for libSM.so
+ SharedX11Reqs required libs for libX11.so
+ SharedX11Rev version number for libX11.so
+ SharedXauReqs required libs for libXau.so
+ SharedXauRev version number for libXau.so
+ SharedXawReqs required libs for libXaw.so
+ SharedXawRev version number for libXaw.so
+ SharedXdmcpReqs required libs for libXdmcp.so
+ SharedXdmcpRev version number for libXdmcp.so
+ SharedXextReqs required libs for libXext.so
+ SharedXextRev version number for libXext.so
+ SharedXiReqs required libs for libXi.so
+ SharedXiRev version number for libXi.so
+ SharedXmuReqs required libs for libXmu.so
+ SharedXmuRev version number for libXmu.so
+ SharedXtReqs required libs for libXt.so
+ SharedXtRev version number for libXt.so
+ SharedXtstReqs required libs for libXtst.so
+ SharedXtstRev version number for libXtst.so
+ SharedXmReqs required libs for libXm.so
+ SharedXmRev version number for libXm.so
+ SharedMrmReqs required libs for libMrm.so
+ SharedMrmRev version number for libMrm.so
+ SharedUilReqs required libs for libUil.so
+ SharedUilRev version number for libUil.so
+ SharedTtReqs required libs for libtt.so
+ SharedTtRev version number for libtt.so
+ SharedPamReqs required libs for libpam.so
+ SharedPamRev version number for libpam.so
+ SharedDtSvcReqs required libs for libDtSvc.so
+ SharedDtSvcRev version number for libDtSvc.so
+ SharedDtSearchReqs required libs for libDtSearch.so
+ SharedDtSearchRev version number for libDtSearch.so
+ SharedDtWidgetReqs required libs for libDtWidget.so
+ SharedDtWidgetRev version number for libDtWidget.so
+ SharedDtHelpReqs required libs for libDtHelp.so
+ SharedDtHelpRev version number for libDtHelp.so
+ SharedDtPrintReqs required libs for libDtPrint.so
+ SharedDtPrintRev version number for libDtPrint.so
+ SharedDtTermReqs required libs for libDtTerm.so
+ SharedDtTermRev version number for libDtTerm.so
+ SharedDtMrmReqs required libs for libDtMrm.so
+ SharedDtMrmRev version number for libDtMrm.so
+
+Vendor.cf files and/or site/host specific .def files may define the
+following variables:
+
+ ProjectRoot The directory under which the installation
+ will operate. This value will be hard coded
+ into some programs. As a result do not use it
+ to specify the installation directory for a
+ cross compiled system, use DESTDIR to
+ accomplish that task.
+
+The following variables are used by some part of the tree:
+
+ AckToolset programs/Xserver/hw/xfree86
+ BuildChooser build the xdm chooser program?
+ SharedLibXdmGreet use xdm shared dynamic greeter library?
+ LatexCmd command to run LaTeX on a document
+ DvipsCmd command to turn .dvi file into PostScript
+ MotifBC using Motif 1.1.1, 1.1.2, or 1.1.3?
+ GetValuesBC compat GetValues behavior for broken apps?
+ NeedBerklib application needs libXbsd?
+ SvgaConfig default SVGA configuration
+ HasGetReturnAddress util/memleak
+ HasShadowPasswd system has getspnam() function
+ XnestServer build X server with Xlib-based ddx
+ XVirtualFramebufferServer build X server with virtual memory framebuffer
+ WebServer host:port of your Web server (see programs/xrx)
+ HtmlDir path used by Web server for HTML and RX docs
+ CgiBinDir path used by Web server for CGI programs
+ ProxyManager ICE network ID to contact a running proxymngr
+ XdmxServer build Distributed Multihead X server
+
+
+Make Variables
+
+The following make variables are used by imake rules and may be set in
+an individual Imakefile.
+
+DEFINES program-specific -D flags and other arguments
+ to pass to the C compiler, lint, and makedepend.
+DEPEND_DEFINES program-specific flags in addition to
+ $(DEFINES) to pass to lint and makedepend.
+ This is usually used when there are special
+ compilation rules for individual files, and
+ the defines passed to those files affect
+ makedepend results. If they can be passed to
+ all files during the makedepend step without
+ affecting the results for other files,
+ DEPEND_DEFINES is used to do that. Example is
+ the Xlib Imakefile.
+INCLUDES program-specific -I flags.
+HEADERS .h files to install with "make includes" and
+ "make install". If this Imakefile includes
+ Library.tmpl there are no headers, include
+ this line instead of a HEADERS definition:
+ #define LibHeaders NO
+REQUIREDLIBS when building a shared library, other libraries used
+ by this library that should be referenced at
+ link time.
+LINTLIBS program-specific libraries for lint.
+LOCAL_LDFLAGS program-specific flags for the linker.
+LOCAL_LIBRARIES project libraries (usually specified
+ as -lname) needed by this program.
+ For example, "-lXt -lXext -lX11".
+ Used by SimpleProgramTarget and
+ ComplexProgramTarget* rules.
+ Do not include any system-specific libraries here.
+SYS_LIBRARIES system libraries (usually specified
+ as -lname) needed by this program.
+ For example "MathLibrary".
+ Do not include any system-specific libraries
+ such as "-lnsl" here; they are automatically
+ added to the link command by the
+ vendor-specific .cf file.
+SUBDIRS for an Imakefile in a directory containing
+ subdirectories, this names the subdirectories.
+ Such an Imakefile also needs to #define IHaveSubdirs
+ and call MakeSubdirs() and DependSubdirs().
+MANSUFFIX suffix used by InstallManPage* rules.
+ May be set to $(LIBMANSUFFIX), $(FILEMANSUFFIX), or
+ $(MISCMANSUFFIX) in directories for libraries or data
+ files.
+
+
+Rule-specific variables that may be set in an individual Imakefile.
+If you aren't using these rules, you may need variables with a similar
+function, but you need not use these names. However, following these
+conventions may make your Imakefile easier to read and maintain.
+
+DEPLIBS library dependencies for ComplexProgramTarget
+SRCS source files used by ComplexProgramTarget and
+ DependTarget.
+OBJS object files used by ComplexProgramTarget
+PROGRAMS default target used with ComplexProgramTarget_(n)
+SRCS1 source files used by ComplexProgramTarget_1
+OBJS1 object files used by ComplexProgramTarget_1
+DEPLIBS1 library dependencies for ComplexProgramTarget_1
+SRCS2 source files used by ComplexProgramTarget_2
+OBJS2 object files used by ComplexProgramTarget_2
+DEPLIBS2 library dependencies for ComplexProgramTarget_2
+SRCS3 source files used by ComplexProgramTarget_3
+OBJS3 object files used by ComplexProgramTarget_3
+DEPLIBS3 library dependencies for ComplexProgramTarget_3
+
+Variables that can be set on the make command line:
+
+DESTDIR directory under which "make install" should
+ install instead of "/"; used only for testing
+ "make install" rules, binary package building,
+ and specifying alternative installation directories
+ for cross compiles.
+FILE file for "lint1" target to run lint on.
+CDEBUGFLAGS -g and/or -O flag to control C compiler optimization.
+CXXDEBUGFLAGS -g and/or -O flag to control C++ optimization.
+LDSTRIPFLAGS flag to have linker strip objects (typically -x).
+ Typically set to the empty string to prevent
+ the linker from stripping objects; use this
+ way when setting CDEBUGFLAGS to "-g".
+
+These variables are set in project-specific files such as X11.tmpl.
+They should NOT be set in an Imakefile. These variables are sometimes
+misused; they are included here to remind Imakefile writers NOT to use
+them:
+
+EXTRA_DEFINES project-specific -D flags
+EXTRA_INCLUDES project-specific -I flags
+EXTRA_ICONFIGFILES Additional project-specific imake config files
+ to add to ICONFIGFILES.
+ This is a list of files that define variables
+ that might affect compilation of some files.
+
+Many other make variables are set up by the imake config files and can
+be used in an Imakefile. The easiest way to discover them is to look
+at the Makefile generated by an empty Imakefile.
+
+
+Comments
+
+Use C comment syntax in an Imakefile for comments that should not
+appear in the resulting Makefile.
+Use "XCOMM" at the start of each
+line to produce a comment that will appear in the Makefile.
+(The "XCOMM" will
+be translated into the Makefile comment character "#" by imake.)
+Do NOT use "#" as a comment character in Imakefiles; it confuses the C
+preprocessor used by imake on some systems.
+
+
+Imake variables
+
+Don't abuse the variables in X11.tmpl that describe
+particular pieces of X by using them to describe your own subsystems.
+Instead, create new variables that are defaulted using
+Imake.tmpl variables.
+
+
+Examples
+
+Since the easiest way to write an Imakefile is to start with one that
+works, here are some short, easy-to-read Imakefile examples in the X
+distribution:
+
+with subdirs: config/Imakefile
+library: lib/Xau/Imakefile
+simple program: programs/xdpyinfo/Imakefile
+complex progs: programs/xclipboard/Imakefile
+complex prog: programs/xmodmap/Imakefile
+
+Common Rules
+
+Here are some of the common rules for building programs. How to use
+them is described in Imake.rules and in the O'Reilly book "Software
+Portability with imake."
+
+Basic program-building rules
+
+All of these except NormalProgramTarget also generate rules to install
+the program and its manual page, and to generate dependencies.
+
+SimpleProgramTarget Use if there is only one program to be made
+ and it has only one source file.
+
+ComplexProgramTarget Use if there is only one program to be made
+ and it has multiple source files. Set SRCS to
+ the names of the source files, set OBJS to
+ the names of the object files, and set DEPLIBS
+ to the libraries that this program depends on.
+
+ComplexProgramTarget_1 Like ComplexProgramTarget, but uses SRCS1,
+ OBJS1, and DEPLIBS1 and can be used with
+ ComplexProgramTarget_2 and ComplexProgramTarget_3
+ to build up to three programs in the same directory.
+ Set PROGRAMS to the programs built by all of
+ these rules. For more than 3 programs, use
+ NormalProgramTarget for each.
+ComplexProgramTarget_2 Use after ComplexProgramTarget_1 for the
+ second program in a directory. Uses SRCS2,
+ OBJS2, and DEPLIBS2.
+ComplexProgramTarget_3 Use after ComplexProgramTarget_2 for the
+ third program in a directory. Uses SRCS3,
+ OBJS3, and DEPLIBS3.
+
+NormalProgramTarget Build a program. Can be used multiple times
+ with different arguments in the same Imakefile.
+
+Lower level rules, often used with NormalProgramTarget
+
+InstallProgram install a program.
+
+InstallManPage install a manual page.
+
+InstallDirectory install a directory.
+
+DependTarget() include once at end of Imakefile with
+ NormalProgramTarget rules or that uses Library.tmpl.
+ Generates dependencies for files named in SRCS.
+
+Manual page rules, commonly used only in special documentation directories:
+
+InstallManPage
+InstallManPageLong
+InstallManPageAliases
+
+Other rules:
+
+SpecialCObjectRule Compile a C file with special flags.
+AllTarget Declare additional targets to build.
+InstallAppDefaults Install X application defaults file.
+
+Imakefile for directory with subdirectories
+
+XCOMM this is a sample Imakefile for a directory containing subdirectories
+#define IHaveSubdirs
+#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)"
+SUBDIRS = list of subdirs ...
+MakeSubdirs($(SUBDIRS))
+DependSubdirs($(SUBDIRS))
+
+
+Common Targets
+
+These targets are typically NOT defined explicitly by the Imakefile
+writer; rather they are generated automatically by imake rules.
+They are listed here for the convenience of people using the resulting
+Makefile, not people writing the original Imakefile.
+
+all Default rule; builds whatever is in this directory.
+Makefile Remake the Makefile (use after changing Imakefile).
+ Run "make depend" after.
+Makefiles Remake all Makefiles in subdirectories. (Does
+ nothing if no subdirectories.)
+ Run "make depend" after.
+includes Generate and install in the tree any necessary
+ header files.
+depend Update dependencies in the Makefile calculated
+ by examining the source files.
+install Install what "make all" built on the system.
+install.man Install manual pages.
+clean Remove built objects and other derived files.
+lint Run lint.
+tags Create a tags file.
diff --git a/nx-X11/config/cf/Server.tmpl b/nx-X11/config/cf/Server.tmpl
new file mode 100644
index 000000000..bb769c5be
--- /dev/null
+++ b/nx-X11/config/cf/Server.tmpl
@@ -0,0 +1,79 @@
+XCOMM $XFree86: xc/config/cf/Server.tmpl,v 3.20 2002/11/20 04:32:55 dawes Exp $
+/*
+ * Server imakefile info - this contains any special redefinitions, etc.
+ * that Imakefiles in the server subtree will need.
+ */
+
+XCOMM $Xorg: Server.tmpl,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+#define PassCDebugFlags CDEBUGFLAGS="$(CDEBUGFLAGS)" LDSTRIPFLAGS="$(LDSTRIPFLAGS)"
+
+#ifndef ServerCcCmd
+#define ServerCcCmd CcCmd
+#endif
+#ifndef ServerCCOptions
+#define ServerCCOptions DefaultCCOptions
+#endif
+#ifndef ServerDefines
+#define ServerDefines StandardDefines
+#endif
+/* Note: Changing ServerCDebugFlags has no effect because CDEBUGFLAGS is over-
+ ridden by PassCDebugFlags in the parent Makefile or toplevel xmakefile. */
+#ifndef ServerCDebugFlags
+#define ServerCDebugFlags DefaultCDebugFlags
+#endif
+#ifndef DoThreadedServer
+#define DoThreadedServer NO
+#endif
+#ifndef InstallServerSetUID
+#define InstallServerSetUID NO
+#endif
+
+#ifdef CrossCompileDir
+# ifndef StripPath
+# define StripPath(x) `echo x|sed "s%.*/%%"`
+# endif
+# ifndef CrossServerCcCmd
+# define CrossServerCcCmd Concat3(CrossCompileDir,/,StripPath(ServerCcCmd))
+# endif
+#endif
+
+/*
+ * SetUIDServerTarget - compile, link, and relink a setuid server
+ */
+#ifndef SetUIDServerTarget
+#if InstallServerSetUID
+#define SetUIDServerTarget(server,subdirs,objects,libs,syslibs) @@\
+ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,$(INSTUIDFLAGS))
+#else
+#define SetUIDServerTarget ServerTarget
+#endif
+#endif /* SetUIDServerTarget */
+
+#ifdef CrossCompileDir
+ CC = CrossServerCcCmd
+#else
+ CC = ServerCcCmd
+#endif
+ CCOPTIONS = ServerCCOptions
+#if DoThreadedServer
+SERVER_THREAD_DEFINES = XThreadsDefines ThreadTypeDefines
+#endif
+STD_DEFINES = ServerDefines $(SERVER_THREAD_DEFINES)
+CDEBUGFLAGS = ServerCDebugFlags
+EXT_DEFINES = ExtensionDefines
+OS_DEFINES = ServerOSDefines
+
+GLX_DEFINES = GlxDefines
+
+#ifndef GlxUseSGISI
+#define GlxUseSGISI NO
+#endif
+
+#ifdef XFree86Version
+#include <xf86.tmpl>
+#endif
+
+#ifdef XorgVersion
+#include <xorg.tmpl>
+#endif
diff --git a/nx-X11/config/cf/ServerLib.tmpl b/nx-X11/config/cf/ServerLib.tmpl
new file mode 100644
index 000000000..18a76746d
--- /dev/null
+++ b/nx-X11/config/cf/ServerLib.tmpl
@@ -0,0 +1,142 @@
+XCOMM $XFree86: xc/config/cf/ServerLib.tmpl,v 3.0tsi Exp $
+/*
+ * Server Library imakefile info - this contains any special
+ * redefinitions, etc. that Imakefiles in the various server library
+ * subtrees will need.
+ *
+ * Before including this, you must set the following boolean variables:
+ * DoSharedLib, DoNormalLib, DoDebugLib, DoProfileLib
+ *
+ */
+
+#ifndef DoNormalLib
+#define DoNormalLib YES
+#endif
+
+#ifndef LibraryDefines
+#define LibraryDefines StandardDefines
+#endif
+#ifndef LibraryCDebugFlags
+#define LibraryCDebugFlags DefaultCDebugFlags
+#endif
+#ifndef SeparateSharedCompile
+#define SeparateSharedCompile YES
+#endif
+#ifndef SharedServerLibraryDef
+#define SharedServerLibraryDef $(__NOOP__)
+#endif
+
+#ifndef LibraryCcCmd
+#if DoSharedLib && defined(SharedLibraryCcCmd)
+#define LibraryCcCmd SharedLibraryCcCmd
+#else
+#define LibraryCcCmd CcCmd
+#endif
+#endif
+#ifndef LibraryCCOptions
+#if DoSharedLib && defined(SharedLibraryCCOptions)
+#define LibraryCCOptions SharedLibraryCCOptions
+#else
+#define LibraryCCOptions DefaultCCOptions
+#endif
+#endif
+
+#if DoDebugLib
+#define _DebuggedLibMkdir() LibMkdir(debugger)
+#define _DebuggedObjCompile(options) DebuggedLibObjCompile(options)
+#define _DebuggedCleanDir() LibCleanDir(debugger)
+#else
+#define _DebuggedLibMkdir() $(_NULLCMD_)
+#define _DebuggedObjCompile(options) $(_NULLCMD_)
+#define _DebuggedCleanDir() $(_NULLCMD_)
+#endif
+
+#if DoProfileLib
+#define _ProfiledLibMkdir() LibMkdir(profiled)
+#define _ProfiledObjCompile(options) ProfiledLibObjCompile(options)
+#define _ProfiledCleanDir() LibCleanDir(profiled)
+#else
+#define _ProfiledLibMkdir() $(_NULLCMD_)
+#define _ProfiledObjCompile(options) $(_NULLCMD_)
+#define _ProfiledCleanDir() $(_NULLCMD_)
+#endif
+
+#if !DoNormalLib
+#define _NormalLibMkdir() $(_NULLCMD_)
+#define _NormalObjCompile(options) $(_NULLCMD_)
+#define _NormalCleanDir() $(_NULLCMD_)
+#else
+#if DoSharedLib && SeparateSharedCompile
+#define _NormalLibMkdir() LibMkdir(unshared)
+#define _NormalObjCompile(options) UnsharedLibObjCompile(options)
+#define _NormalCleanDir() LibCleanDir(unshared)
+#else
+#define _NormalLibMkdir() $(_NULLCMD_)
+#define _NormalObjCompile(options) NormalLibObjCompile(options)
+#define _NormalCleanDir() $(_NULLCMD_)
+#endif
+#endif
+
+#if !DoSharedLib || (DoNormalLib && !SeparateSharedCompile)
+#define _SharedObjCompile(options) $(_NULLCMD_)
+#else
+#if SeparateSharedCompile
+#define _SharedObjCompile(options) NormalSharedLibObjCompile(options)
+#else
+#define _SharedObjCompile(options) NormalLibObjCompile(options)
+#endif
+#endif
+
+#define SRCsuf c
+#define Isuf i
+
+#ifndef LibraryObjectRule
+#define LibraryObjectRule() @@\
+all:: @@\
+ _DebuggedLibMkdir() @@\
+ _ProfiledLibMkdir() @@\
+ _NormalLibMkdir() @@\
+ @@\
+includes:: @@\
+ _DebuggedLibMkdir() @@\
+ _ProfiledLibMkdir() @@\
+ _NormalLibMkdir() @@\
+ @@\
+.SRCsuf.Osuf: @@\
+ _DebuggedObjCompile($(_NOOP_)) @@\
+ _ProfiledObjCompile($(_NOOP_)) @@\
+ _NormalObjCompile($(_NOOP_)) @@\
+ _SharedObjCompile(SharedServerLibraryDef) @@\
+ @@\
+clean:: @@\
+ _DebuggedCleanDir() @@\
+ _ProfiledCleanDir() @@\
+ _NormalCleanDir() @@\
+
+#endif /* LibraryObjectRule */
+
+#ifndef SpecialLibObjectRule
+#define SpecialLibObjectRule(objs,depends,options) @@\
+objs: depends @@\
+ _DebuggedObjCompile(options) @@\
+ _ProfiledObjCompile(options) @@\
+ _NormalObjCompile(options) @@\
+ _SharedObjCompile(options) @@\
+
+#endif /* SpecialLibObjectRule */
+
+#ifndef SpecialCLibObjectRule
+#define SpecialCLibObjectRule(basename,depends,options) @@\
+SpecialLibObjectRule(basename.Osuf,basename.SRCsuf depends,options) @@\
+ @@\
+basename.Isuf: basename.SRCsuf depends @@\
+ CPPOnlyCompile(basename.SRCsuf,options) @@\
+ @@\
+CenterLoadTarget(debug_src,basename.SRCsuf,NullParameter,$(ALLDEFINES) options)
+#endif /* SpecialCLibObjectRule */
+
+#if DoSharedLib
+LibraryObjectRule()
+#else
+NormalLibraryObjectRule()
+#endif
diff --git a/nx-X11/config/cf/Threads.tmpl b/nx-X11/config/cf/Threads.tmpl
new file mode 100644
index 000000000..bb0a7e805
--- /dev/null
+++ b/nx-X11/config/cf/Threads.tmpl
@@ -0,0 +1,105 @@
+XCOMM $Xorg: Threads.tmpl,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/Threads.tmpl,v 3.3tsi Exp $
+
+/*
+ * For a multi-threaded application or library,
+ * Define LocalThreadsDefines in your Imakefile (unless you like the
+ * project default), then include this file.
+ * Everything else should be automatic.
+ */
+
+#ifndef LocalThreadsDefines
+#ifdef ProjectThreadsDefines
+#define LocalThreadsDefines ProjectThreadsDefines
+#else
+#define LocalThreadsDefines /**/
+#endif
+#endif
+
+#ifndef LocalThreads
+#ifdef ThreadedProject
+#define LocalThreads ThreadedProject
+#else
+#define LocalThreads YES
+#endif
+#endif
+
+#ifndef HasCThreads
+#define HasCThreads NO
+#endif
+
+#ifndef ThreadTypeDefines
+#if HasCThreads
+#define ThreadTypeDefines -DCTHREADS
+#else
+#define ThreadTypeDefines /**/
+#endif
+#endif
+#ifndef SystemMTDefines
+#define SystemMTDefines /**/
+#endif
+#ifndef LibraryMTDefines
+#define LibraryMTDefines /**/
+#endif
+#ifndef HasThreadSafeAPI /* does it have getpwnam_r, etc. */
+#define HasThreadSafeAPI YES
+#endif
+#ifndef MTSafeAPIDefines
+#if HasThreadSafeAPI
+#define MTSafeAPIDefines -DXUSE_MTSAFE_API
+#else
+#define MTSafeAPIDefines /**/
+#endif
+#endif
+#ifndef ThreadPreStdAPIDefines
+#define ThreadPreStdAPIDefines /* nominally for POSIX P1003.4a (Draft 4) API */
+#endif
+#ifndef CplusplusSystemMTDefines
+# ifdef SystemMTDefines
+# define CplusplusSystemMTDefines SystemMTDefines
+# else
+# define CplusplusSystemMTDefines /**/
+# endif
+#endif
+#ifndef ThreadsCompileFlags
+#define ThreadsCompileFlags /**/
+#endif
+#ifndef ThreadsCplusplusCompileFlags
+# ifdef ThreadsCompileFlags
+# define ThreadsCplusplusCompileFlags ThreadsCompileFlags
+# else
+# define ThreadsCplusplusCompileFlags /**/
+# endif
+#endif
+
+#ifndef ThreadsLibraries
+#define ThreadsLibraries /**/
+#endif
+#ifndef ThreadsCplusplusLibraries
+# ifdef ThreadsLibraries
+# define ThreadsCplusplusLibraries ThreadsLibraries
+# else
+# define ThreadsCplusplusLibraries /**/
+# endif
+#endif
+#ifndef ThreadsLoadFlags
+#define ThreadsLoadFlags ThreadsCompileFlags
+#endif
+#ifndef ThreadsCplusplusLoadFlags
+#define ThreadsCplusplusLoadFlags ThreadsCplusplusCompileFlags
+#endif
+
+#if LocalThreads
+ THREADS_CFLAGS = ThreadsCompileFlags
+ THREADS_DEFINES = LocalThreadsDefines ThreadTypeDefines SystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES)
+ THREADS_LDFLAGS = ThreadsLoadFlags
+ THREADS_LIBS = ThreadsLibraries
+
+ THREADS_CXXFLAGS = ThreadsCplusplusCompileFlags
+THREADS_CXXDEFINES = LocalThreadsDefines ThreadTypeDefines CplusplusSystemMTDefines MTSafeAPIDefines ThreadPreStdAPIDefines $(LIB_MT_DEFINES)
+THREADS_CXXLDFLAGS = ThreadsCplusplusLoadFlags
+ THREADS_CXXLIBS = ThreadsCplusplusLibraries
+#endif
diff --git a/nx-X11/config/cf/Win32.cf b/nx-X11/config/cf/Win32.cf
new file mode 100644
index 000000000..af864a93f
--- /dev/null
+++ b/nx-X11/config/cf/Win32.cf
@@ -0,0 +1,133 @@
+XCOMM platform: $Xorg: Win32.cf,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+#ifndef OSName
+#define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName OSMajorVersion./**/OSMinorVersion
+
+#ifndef CompilerMajorVersion
+/* 0 == NT 3.1 Win32 SDK, 2 == MSVC++ 2, 4 == MSVC 4 */
+#define CompilerMajorVersion 4
+#endif
+
+#define BootstrapCFlags -DWIN32
+#ifdef _M_IX86
+#define CpuDefines -D_X86_
+#endif
+/* brain-damaged windows headers will not compile with -Za */
+#define StandardDefines -DWIN32 -DWIN32_LEAN_AND_MEAN -D_DLL -D_MT -D__STDC__ CpuDefines
+#if CompilerMajorVersion < 4
+#define DefaultCCOptions -nologo -batch -G4 -W2
+#else
+#define DefaultCCOptions -nologo -G4 -W2
+#endif
+#if CompilerMajorVersion < 4
+#define DebuggableCDebugFlags -Zi
+#else
+#define DebuggableCDebugFlags -Zi -Od
+#endif
+#define ThreadedX YES
+#define HasThreadSafeAPI NO
+#define CpCmd copy
+#define LnCmd copy
+#define MvCmd ren
+#define RmCmd del
+#ifndef RmTreeCmd
+XCOMM choices here include:
+XCOMM o `del /q /s` and live with pressing the "any" key
+XCOMM o `deltree, copied from MS-DOS 5
+XCOMM o `rm -rfx` from the SDK Subscription (MSTOOLS in your Path)
+XCOMM o `rm -rf` from the GNU file utilities
+XCOMM We're using the GNU file utilities
+#define RmTreeCmd rm -rf
+#endif
+#define CcCmd cl
+#define HasCplusplus YES
+#define CplusplusCmd cl
+#if CompilerMajorVersion < 4
+#define PreProcessCmd CcCmd -nologo -batch -EP
+#define CppCmd CcCmd -nologo -batch -E
+#else
+#define PreProcessCmd CcCmd -nologo -EP
+#define CppCmd CcCmd -nologo -E
+#endif
+#define PatheticCpp YES
+#define ConstructMFLAGS YES
+#if (CompilerMajorVersion == 0)
+#define ArCmdBase lib32
+#else
+#define ArCmdBase lib
+#endif
+#define ArCmd ArCmdBase
+#define CplusplusCmd cl
+#define MkdirHierCmd $(CONFIGSRC:/=\)\util\mkdirhier
+#define InstallCmd copy
+#define InstPgmFlags /**/
+#define InstBinFlags /**/
+#define InstUidFlags /**/
+#define InstLibFlags /**/
+#define InstIncFlags /**/
+#define InstManFlags /**/
+#define InstDatFlags /**/
+#define InstallFlags /**/
+#if (CompilerMajorVersion == 0)
+#define ExtraLibraries crtdll.lib kernel32.lib wsock32.lib
+#elif (CompilerMajorVersion < 4)
+#define ExtraLibraries msvcrt.lib kernel32.lib wsock32.lib
+#else
+#define ExtraLibraries msvcrt.lib kernel32.lib wsock32.lib -link -nodefaultlib:libc
+#endif
+#define MakeCmd nmake -nologo
+#if (CompilerMajorVersion == 0)
+#define LdCmd link32
+#else
+#define LdCmd link
+#endif
+#define MathLibrary
+#define HasSymLinks NO
+#define HasVarDirectory NO
+#define HasPutenv YES
+#define Osuf obj
+#ifndef CCsuf
+#define CCsuf cxx
+#endif
+#define BuildServer NO
+#define ConnectionFlags -DTCPCONN
+
+/* override as necessary in site.def/host.def */
+#ifndef StdIncDir
+#define StdIncDir C:/MSDEVSTD/INCLUDE
+#endif
+#define LdPreLib /**/
+#define LdPostLib /**/
+#ifndef UseInstalled
+#define ImakeCmd $(IMAKESRC:/=\)\imake
+#define DependCmd $(DEPENDSRC:/=\)\makedepend
+#endif
+#define DependFlags -D_WIN32
+#define FilesToClean *.bak *.obj *.lib make.log
+#define ShLibDir $(BINDIR)
+
+#define XFileSearchPathBase Concat4($(LIBDIR)/;L/;T/;N;C,;S:$(LIBDIR)/;l/;T/;N;C,;S:$(LIBDIR)/;T/;N;C,;S:$(LIBDIR)/;L/;T/;N;S:$(LIBDIR)/;l/;T/;N;S:$(LIBDIR)/;T/;N;S)
+
+#define XawI18nDefines -DHAS_WCHAR_H
+#define UseRgbTxt YES
+#define HasCbrt NO
+#define HasFfs NO
+#define HasXdmAuth NO
+
+/* the following components haven't been ported yet */
+#define BuildLBX NO
+#define BuildXprint NO
+#define XprtServer NO
+
+#include <Win32.rules>
diff --git a/nx-X11/config/cf/Win32.rules b/nx-X11/config/cf/Win32.rules
new file mode 100644
index 000000000..f284ad207
--- /dev/null
+++ b/nx-X11/config/cf/Win32.rules
@@ -0,0 +1,531 @@
+XCOMM platform: $Xorg: Win32.rules,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+
+
+
+XCOMM $XFree86$
+
+#define HasSharedLibraries YES
+#define NeedLibInsideFlag YES
+#define SharedLibXaw NO
+#define SharedLibXmu NO
+#define SharedLibXt NO
+#define SharedDataSeparation NO
+#define SharedCodeDef /**/
+#define SharedLibraryDef /**/
+#define ShLibIncludeFile <WinLib.tmpl>
+#define SharedLibraryLoadFlags -dll
+#define PositionIndependentCFlags /**/
+
+.c.obj:
+ $(CC) -c $*.c @<<
+ $(CFLAGS)
+<<
+
+#if HasCplusplus
+.CCsuf.obj:
+ $(CXX) -c $*.CCsuf @<<
+ $(CFLAGS)
+<<
+#endif
+
+#define ProgramTargetName(target) target.exe
+
+#define RunProgram(progvar,options) $(progvar:/=\) options
+
+#define RemoveFile(file) if exist file $(RM) file
+
+#define RemoveFiles(files) @$(MAKE) $(MFLAGS) -f << @@\
+.SUFFIXES: @@\
+ @@\
+all: files @@\
+ !for %%i in ( Avoid.Error $$** ) do if exist %%i $(RM) %%i @@\
+ @@\
+Avoid.Error files: @@\
+<<
+
+#define MakeDir(dir) -$(MKDIRHIER) dir
+
+#define ObjectCompile(options) RemoveFile($@) @@\
+ $(CC) -c $*.c @<< @@\
+ $(CFLAGS) options @@\
+<<
+
+#define LibObjCompile(dir,options) RemoveFiles($@ dir\$@) @@\
+ $(CC) -c $*.c @<< @@\
+ $(CCOPTIONS) $(ALLDEFINES) options @@\
+<< @@\
+ $(MV) $@ dir\$@
+
+#define BuildIncludesTop(srclist,dstsubdir,dstupdir) @@\
+includes:: srclist @@\
+ MakeDir($(BUILDINCDIR:/=\)) @@\
+ @$(MAKE) $(MFLAGS) -f << @@\
+.SUFFIXES: @@\
+ @@\
+all: srclist @@\
+ cd $(BUILDINCDIR:/=\) @@\
+ !RemoveFile($$**) @@\
+ !$(LN) $(BUILDINCTOP:/=\)\$(CURRENT_DIR:/=\)\$$** . @@\
+ @@\
+Avoid.Error srclist: @@\
+<<
+
+#define BuildIncludes(srclist,dstsubdir,dstupdir) @@\
+XVARdef0 = $(BUILDINCDIR)/dstsubdir @@\
+XVARdef1 = $(BUILDINCTOP)/dstupdir/$(CURRENT_DIR) @@\
+ @@\
+includes:: srclist @@\
+ MakeDir($(XVARuse0:/=\)) @@\
+ @$(MAKE) -A $(MFLAGS) -f << @@\
+.SUFFIXES: @@\
+ @@\
+all: srclist @@\
+ cd $(XVARuse0:/=\) @@\
+ !RemoveFile($$**) @@\
+ !$(LN) $(XVARuse1:/=\)\$$** . @@\
+ @@\
+Avoid.Error srclist: @@\
+<<
+
+#define LinkFileList(step,list,dir,sub) @@\
+XVARdef0 = dir @@\
+XVARdef1 = sub @@\
+XVARdef2 = list @@\
+ @@\
+step:: $(XVARuse2:/=\) @@\
+ cd $(XVARuse0:/=\) @@\
+ !RemoveFile($**) @@\
+ !$(LN) $(XVARuse1:/=\)\\$** .
+
+#define LinkRule(program,options,objects,libraries) \
+$(CCLINK) Concat(-Fe,program) options objects libraries $(EXTRA_LOAD_FLAGS)
+
+#define NormalProgramTarget(program,objects,deplibs,locallibs,syslibs) @@\
+XVARdef0 = objects @@\
+ @@\
+ProgramTargetName(program): $(XVARuse0:.o=.obj) deplibs @@\
+ RemoveTargetProgram($@) @@\
+ LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),locallibs $(LDLIBS) syslibs) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+
+#define ProgramTargetHelper(program,srcs,objs,deplib,locallib,syslib) @@\
+ProgramTargetName(program): $(objs:.o=.obj) $(deplib) @@\
+ RemoveTargetProgram($@) @@\
+ LinkRule($@,$(LDOPTIONS),$(objs:.o=.obj),locallib $(LDLIBS) syslib) @@\
+ @@\
+InstallProgram(program,$(BINDIR)) @@\
+InstallManPage(program,$(MANDIR))
+
+#define ComplexProgramTarget(program) @@\
+PROGRAM = ProgramTargetName(program) @@\
+ @@\
+AllTarget(ProgramTargetName(program)) @@\
+ @@\
+ProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile($(PROGRAM))
+
+#define ComplexProgramTarget_1(program,locallib,syslib) @@\
+OBJS = $(OBJS1) $(OBJS2) $(OBJS3) @@\
+SRCS = $(SRCS1) $(SRCS2) $(SRCS3) @@\
+PROGRAM1 = ProgramTargetName(program) @@\
+ @@\
+AllTarget($(PROGRAM1) $(PROGRAM2) $(PROGRAM3)) @@\
+ @@\
+ProgramTargetHelper(program,SRCS1,OBJS1,DEPLIBS1,locallib,syslib) @@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ for %%i in ($(PROGRAMS)) do $(RM) ProgramTargetName(%%i)
+
+#define ComplexProgramTarget_2(program,locallib,syslib) @@\
+PROGRAM2 = ProgramTargetName(program) @@\
+ @@\
+ProgramTargetHelper(program,SRCS2,OBJS2,DEPLIBS2,locallib,syslib)
+
+#define ComplexProgramTarget_3(program,locallib,syslib) @@\
+PROGRAM3 = ProgramTargetName(program) @@\
+ @@\
+ProgramTargetHelper(program,SRCS3,OBJS3,DEPLIBS3,locallib,syslib)
+
+#define MoveToBakFile(file) -@if exist file $(MV) file file.bak
+
+#define RMoveToBakFile(file) -RemoveFile(file.bak) @@\
+ -@if exist file $(MV) file file.bak
+
+#define InstallMultipleDestFlags(step,list,dest,flags) @@\
+XVARdef0 = $(DESTDIR)dest @@\
+ @@\
+step:: list @@\
+ MakeDir($(XVARuse0:/=\)) @@\
+ !$(INSTALL) $(INSTALLFLAGS) flags $** $(XVARuse0:/=\)
+
+#define CleanTarget() @@\
+clean:: @@\
+ RemoveFiles(FilesToClean ExtraFilesToClean)
+
+#define LibraryTargetName(libname)libname.lib
+
+#define LibraryTargetNameSuffix(libname,suffix)Concat(libname,suffix.lib)
+
+#define MakeLibrary(libname,objlist) $(AR) @<< @@\
+-out:libname objlist @@\
+<<
+
+#define LinkSourceFile(src,dir) @@\
+XVARdef0 = dir/src @@\
+ @@\
+src: $(XVARuse0:/=\) @@\
+ RemoveFile($@) @@\
+ $(LN) $? $@ @@\
+ @@\
+includes:: src @@\
+ @@\
+depends:: src @@\
+ @@\
+clean:: @@\
+ RemoveFile(src)
+
+#define LinkFile(tofile,fromfile) @@\
+XVARdef0 = fromfile @@\
+tofile:: $(XVARuse0:/=\) @@\
+ RemoveFile($@) @@\
+ $(LN) $? $@ @@\
+ @@\
+includes:: tofile @@\
+ @@\
+depend:: tofile @@\
+ @@\
+clean:: @@\
+ RemoveFile(tofile)
+
+
+#define NormalLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+XVARdef0 = objlist @@\
+ @@\
+LibraryTargetName(libname): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,$(XVARuse0:.o=.obj)) @@\
+ LinkBuildLibrary($@)
+
+#define NormalLibraryTarget2(libname,objlist1,objlist2) @@\
+NormalLibraryTarget(libname,objlist1 objlist2)
+
+#define NormalLibraryTarget3(libname,objlist1,objlist2,objlist3) @@\
+NormalLibraryTarget(libname,objlist1 objlist2 objlist3)
+
+#define NormalDepLibraryTarget(libname,deplist,objlist) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+XVARdef0 = deplist @@\
+XVARdef1 = objlist @@\
+XVARdef2 = $(XVARuse1:/=\) @@\
+ @@\
+LibraryTargetName(libname): $(XVARuse0:/=\) $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,$(XVARuse2:.o=.obj)) @@\
+ LinkBuildLibrary($@)
+
+#define ProfiledLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_p)) @@\
+ @@\
+XVARdef0 = objlist @@\
+ @@\
+LibraryTargetNameSuffix(libname,_p): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ cd profiled @@\
+ MakeLibrary(..\$@,$(XVARuse0:.o=.obj)) @@\
+ cd ..
+
+#define DebuggedLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_d)) @@\
+ @@\
+XVARdef0 = objlist @@\
+ @@\
+LibraryTargetNameSuffix(libname,_d): $(XVARuse0:.o=.obj) $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ cd debugger @@\
+ MakeLibrary(..\$@,$(XVARuse0:.o=.obj)) @@\
+ cd ..
+
+#ifndef UseInstalled
+#define ImakeDependency(target) @@\
+target:: ProgramTargetName($(IMAKE)) @@\
+ @@\
+ProgramTargetName($(IMAKE)): @@\
+ <<tmp.bat @@\
+ cd $(IMAKESRC:/=\) @@\
+ if exist Makefile $(MAKE) all @@\
+ if not exist Makefile $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)" @@\
+<<
+#endif
+
+#ifndef UseInstalled
+#define DependDependency() @@\
+depend:: ProgramTargetName($(DEPEND)) @@\
+ @@\
+ProgramTargetName($(DEPEND)): @@\
+ <<tmp.bat @@\
+ cd $(DEPENDSRC:/=\) @@\
+ $(MAKE) @@\
+<<
+#endif
+
+#define DependTarget() @@\
+DependDependency() @@\
+ @@\
+depend:: @@\
+ $(DEPEND:/=\) @<< @@\
+$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS) @@\
+<<
+
+#define DependTarget3(srcs1,srcs2,srcs3) @@\
+DependDependency() @@\
+ @@\
+depend:: @@\
+ $(DEPEND:/=\) @<< @@\
+$(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1 srcs2 srcs3 @@\
+<<
+
+#define ForceSubdirs(dirs) @@\
+Avoid.Error dirs: FRC @@\
+ @cd $@ @@\
+ @echo making all in $(CURRENT_DIR)/$@... @@\
+ $(MAKE) $(MFLAGS) PassCDebugFlags all @@\
+ cd .. @@\
+ @@\
+FRC:
+
+#define MakeMakeSubdirs(dirs,target) @@\
+XVARdef0 = dirs @@\
+XVARdef1 = $$ @@\
+ @@\
+target:: @@\
+ @$(MAKE) -A $(MFLAGS) -f << @@\
+.SUFFIXES: @@\
+ @@\
+all: $(XVARuse0:/=\) @@\
+ @@\
+Avoid.Error $(XVARuse0:/=\): @@\
+ cd $(XVARuse1)@ @@\
+ RMoveToBakFile(Makefile) @@\
+ ImakeSubCmdHelper -DTOPDIR=../$(TOP) -DCURDIR=$(CURRENT_DIR)/$(XVARuse1)@ @@\
+ $(MAKE) $(MFLAGS) Makefiles @@\
+ cd .. @@\
+<<
+
+#ifdef UseInstalled
+# define ImakeSubCmdHelper $(IMAKE_CMD)
+#else
+# define ImakeSubCmdHelper ..\$(IMAKE) -I../$(IRULESRC) \
+ $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
+#endif
+
+#define NamedTargetSubdirs(name,dirs,verb,flags,subname) @@\
+XVARdef0 = dirs @@\
+XVARdef1 = $$ @@\
+ @@\
+name:: @@\
+ @$(MAKE) -A $(MFLAGS) -f << @@\
+.SUFFIXES: @@\
+ @@\
+all: $(XVARuse0:/=\) @@\
+ @@\
+Avoid.Error $(XVARuse0:/=\): @@\
+ cd $(XVARuse1)@ @@\
+ @echo verb in $(CURRENT_DIR)/$(XVARuse1)@... @@\
+ $(MAKE) $(MFLAGS) flags subname @@\
+ cd .. @@\
+<<
+
+#define UnsharedLibReferences(varname,libname,libsource) @@\
+Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,libsource/,libname.lib) @@\
+Concat(varname,LIB) = LoaderLibPrefix _Use(libname.lib,$(Concat3(DEP,varname,LIB))) @@\
+LintLibReferences(varname,libname,libsource)
+
+#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
+revname = rev @@\
+UnsharedLibReferences(varname,libname,libsource)
+
+#define SubdirLibraryRule(objlist) @@\
+XVARdef0 = objlist @@\
+ @@\
+all:: DONE @@\
+ @@\
+DONE: $(XVARuse0:.o=.obj) @@\
+ RemoveFile($@) @@\
+ echo - > $@ @@\
+ @@\
+clean:: @@\
+ RemoveFile(DONE)
+
+#define CppScriptTarget(dst,src,defs,deplist) @@\
+dst:: @@\
+ @echo sorry, unable to make $@
+
+#define CppFileTarget(dst,src,defs,deplist) @@\
+XFAKEVAR = X @@\
+dst:: src deplist @@\
+ RemoveFile($@) @@\
+ $(PREPROCESSCMD) -I. <<CppTmpFile.c @<< >$@ @@\
+ XCOMM define $(XFAKEVAR)COMM XCOMM @@\
+ XCOMM include <src> @@\
+<< @@\
+ defs @@\
+<< @@\
+ @@\
+clean:: @@\
+ RemoveFiles(dst)
+
+#define InstallNamedTarget(step,srcname,flags,dest,dstname) @@\
+XVARdef0 = $(DESTDIR)dest @@\
+ @@\
+step:: srcname @@\
+ MakeDir($(XVARuse0:/=\)) @@\
+ $(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
+
+#define InstallNamedTargetNoClobber(step,srcname,flags,dest,dstname) @@\
+XVARdef0 = $(DESTDIR)dest @@\
+ @@\
+step:: srcname @@\
+ MakeDir($(XVARuse0:/=\)) @@\
+ @if exist $(XVARuse0:/=\)\\dstname echo Not overwriting existing $(XVARuse0:/=\)\\dstname @@\
+ if not exist $(XVARuse0:/=\)\\dstname $(INSTALL) $(INSTALLFLAGS) flags srcname $(XVARuse0:/=\)\\dstname
+
+
+#define InstallLibrary(libname,dest) @@\
+InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),dest)
+
+#define InstallScript(program,dest) /**/
+
+#define InstallNamedProg(srcname,dstname,dest) @@\
+install:: srcname @@\
+ @echo sorry, unable to install srcname
+
+#define InstallSharedLibrary(libname,rev,dest) @@\
+InstallTarget(install,LibraryTargetName(libname),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
+InstallTarget(install,libname.dll,$(INSTLIBFLAGS),dest)
+
+#define InstallSharedLibraryData(libname,rev,dest)
+
+#define MakeDLL(libname,solist) $(LD) @<< @@\
+$(SHLIBLDFLAGS) -out:libname.dll libname.exp solist @@\
+<<
+
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(libname.dll) @@\
+ @@\
+CppFileTarget(libname.def,libname-def.cpp,-DLIBRARY_VERSION=rev,$(ICONFIGFILES)) @@\
+ @@\
+XVARdef0 = solist @@\
+ @@\
+LibraryTargetName(libname): $(XVARuse0:.o=.obj) libname.def $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,-def:libname.def $(XVARuse0:.o=.obj)) @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+libname.dll: LibraryTargetName(libname) $(EXTRALIBRARYDEPS) @@\
+ RemoveFile(libname.dll) @@\
+ MakeDLL(libname,$(XVARuse0:.o=.obj) $(REQUIREDLIBS) $(EXTRA_LIBRARIES)) @@\
+ LinkBuildDLL(libname.dll) @@\
+ @@\
+clean:: @@\
+ RemoveFile(LibraryTargetName(libname)) @@\
+ RemoveFile(libname.dll)
+
+#define SharedLibraryDataTarget(libname,rev,salist)
+
+#define ObjectCplusplusCompile(options) RemoveFile($@) @@\
+ $(CXX) -c $*.CCsuf @<< @@\
+ $(CFLAGS) options @@\
+<<
+
+#define CplusplusLinkRule LinkRule
+
+#define CplusplusProgramTargetHelper ProgramTargetHelper
+
+#ifndef ComplexCplusplusProgramTarget
+#define ComplexCplusplusProgramTarget(program) @@\
+ PROGRAM = ProgramTargetName(program) @@\
+ @@\
+AllTarget(ProgramTargetName(program)) @@\
+ @@\
+CplusplusProgramTargetHelper(program,SRCS,OBJS,DEPLIBS,$(LOCAL_LIBRARIES),NullParameter) @@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* ComplexCplusplusProgramTarget */
+
+#ifndef UseInstalled
+# define LinkBuildDLL(binary) MakeDir($(BUILDBINDIR:/=\)) @@\
+ RemoveFile(Concat($(BUILDBINDIR:/=\)\,binary)) @@\
+ cd $(BUILDBINDIR:/=\) && $(LN) Concat($(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\,binary) .
+
+# ifdef LinkBuildBinary
+# undef LinkBuildBinary
+# endif
+# define LinkBuildBinary(binary) @@\
+all:: $(BUILDBINDIR)\ProgramTargetName(binary) ProgramTargetName(binary) @@\
+ @@\
+$(BUILDBINDIR)\ProgramTargetName(binary): ProgramTargetName(binary) @@\
+ MakeDir($(BUILDBINDIR:/=\)) @@\
+ RemoveFile($(BUILDBINDIR:/=\)\ProgramTargetName(binary))) @@\
+ cd $(BUILDBINDIR:/=\) && $(LN) $(BUILDBINTOP:/=\)\$(CURRENT_DIR:/=\)\ProgramTargetName(binary) .
+
+# ifdef LinkBuildLibrary
+# undef LinkBuildLibrary
+# endif
+# define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR:/=\)) @@\
+ RemoveFile(Concat($(BUILDLIBDIR:/=\)\,lib)) @@\
+ cd $(BUILDLIBDIR:/=\) && $(LN) Concat($(BUILDLIBTOP:/=\)\$(CURRENT_DIR:/=\)\,lib) .
+
+#endif
+
+#ifndef ProjectUnsharedLibReferences
+#define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\
+Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/lib,buildlibdir/,libname.lib) @@\
+Concat(varname,LIB) = $(Concat3(DEP,varname,LIB)) @@\
+LintLibReferences(varname,libname,libsource)
+#endif
+
+
+/*
+ * ServerTargetWithFlags - generate rules to compile, link, and relink a server
+ */
+#ifndef ServerTargetWithFlags
+#define ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\
+XVARdef0 = objects @@\
+ @@\
+AllTarget(ProgramTargetName(server)) @@\
+ProgramTargetName(server): subdirs $(XVARuse0:.o=.obj) libs @@\
+ MoveToBakFile($@) @@\
+ LinkRule($@,$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
+ @@\
+Concat(load,server): @@\
+ MoveToBakFile(ProgramTargetName(server)) @@\
+ LinkRule(ProgramTargetName(server),$(LDOPTIONS),$(XVARuse0:.o=.obj),libs $(LDLIBS) syslibs) @@\
+ @@\
+loadX:: Concat(load,server) @@\
+ @@\
+ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
+ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
+ @@\
+InstallProgramWithFlags(server,$(BINDIR),flags) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(server))
+#endif /* ServerTargetWithFlags */
diff --git a/nx-X11/config/cf/WinLib.tmpl b/nx-X11/config/cf/WinLib.tmpl
new file mode 100644
index 000000000..b4c9b8006
--- /dev/null
+++ b/nx-X11/config/cf/WinLib.tmpl
@@ -0,0 +1,16 @@
+XCOMM $Xorg: WinLib.tmpl,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/WinLib.tmpl,v 1.4tsi Exp $
+
+#define SharedOldXReqs $(LDPRELIBS) $(XONLYLIB)
+#define SharedXtReqs $(LDPRELIBS) $(XONLYLIB)
+#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIBS) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIBS) $(XLIB)
+#define SharedXtstReqs $(LDPRELIBS) $(XLIB)
+#define SharedSMReqs $(LDPRELIBS) $(ICELIB)
+#define SharedXpReqs $(LDPRELIBS) $(XAUTHLIB) $(XLIB)
+#define SharedXpmReqs $(LDPRELIBS) $(XLIB)
diff --git a/nx-X11/config/cf/X11.rules b/nx-X11/config/cf/X11.rules
new file mode 100644
index 000000000..8a176c7a3
--- /dev/null
+++ b/nx-X11/config/cf/X11.rules
@@ -0,0 +1,136 @@
+XCOMM $Xorg: X11.rules,v 1.4 2000/08/17 19:41:46 cpqbld Exp $
+
+
+XCOMM $XFree86: xc/config/cf/X11.rules,v 1.6 2001/01/17 16:22:31 dawes Exp $
+
+/* Note whether we are the top level project. */
+#ifndef SeenTopLevelProject
+# define SeenTopLevelProject YES
+# define X11IsTopLevelProject YES
+#else
+# define X11IsTopLevelProject NO
+#endif
+
+/*
+ * If no clues are given assume X11 is in the tree, otherwise
+ * UseInstalled overrides UseImports. Do not do both.
+ */
+#ifndef UseInstalledX11
+# define UseInstalledX11 NO
+#endif
+#ifdef UseInstalled
+# undef UseInstalledX11
+# define UseInstalledX11 YES
+#endif
+
+#ifndef ImportX11
+# ifdef UseImports
+# define ImportX11 YES
+# else
+# define ImportX11 NO
+# endif
+#endif
+#if UseInstalledX11
+# undef ImportX11
+# define ImportX11 NO
+#endif
+
+#if defined(X11ProjectRoot)
+# define XBinDir $(XPROJECTROOT)/bin
+#elif defined(ProjectRoot)
+# define XBinDir $(PROJECTROOT)/bin
+#else
+# define XBinDir $(BINDIR)
+#endif
+
+#ifdef X11ProjectRoot
+# define XUsrLibDirPath $(USRLIBDIR):$(XPROJECTROOT)/lib
+#else
+# define XUsrLibDirPath $(USRLIBDIR)
+#endif
+#ifdef UsrLibDirPath
+# undef UsrLibDirPath
+#endif
+#ifdef ExtraLibDirPath
+#define UsrLibDirPath XUsrLibDirPath:ExtraLibDirPath
+#else
+#define UsrLibDirPath XUsrLibDirPath
+#endif
+
+#if ImportX11
+# define XLdPreLibs -L$(LIBSRC)
+#elif defined(UseInstalledX11) && defined(X11ProjectRoot)
+# define XLdPreLibs -L$(XPROJECTROOT)/lib
+#else
+# define XLdPreLibs /**/
+#endif
+#ifdef LdPreLibs
+# undef LdPreLibs
+#endif
+#define LdPreLibs LdPreLib XLdPreLibs
+
+#ifdef X11ProjectRoot
+# define XLdPostLibs -L$(XPROJECTROOT)/lib
+#else
+# define XLdPostLibs /**/
+#endif
+#ifdef LdPostLibs
+# undef LdPostLibs
+#endif
+#define LdPostLibs LdPostLib XLdPostLibs
+
+#ifndef TopXInclude
+# if ImportX11
+# define TopXInclude -I$(TOP)/imports/x11/include
+# elif !UseInstalledX11
+# define TopXInclude -I$(TOP)/exports/include
+#else
+# ifdef X11ProjectRoot
+# define TopXInclude -I$(XPROJECTROOT)/include
+# else
+# define TopXInclude /**/
+# endif
+# endif
+#endif
+#ifdef TopIncludes
+# undef TopIncludes
+#endif
+#define TopIncludes TopInclude $(TOP_X_INCLUDES)
+
+#if UseInstalledX11 && defined(X11ProjectRoot)
+# define X11BuildLibPath $(XPROJECTROOT)/lib
+#elif UseInstalledX11
+# define X11BuildLibPath $(USRLIBDIR)
+#elif ImportX11
+# define X11BuildLibPath $(XTOP)/lib
+#else
+# define X11BuildLibPath $(TOP)/exports/lib
+#endif
+
+#ifndef BuildLibPath
+#ifdef SystemBuildLibPath
+# define BuildLibPath $(XENVLIBDIR):$(SYSTEMENVLIBDIR)
+#else
+# define BuildLibPath $(XENVLIBDIR)
+#endif
+#endif
+
+#ifndef X11ProjectDefines
+# define X11ProjectDefines /**/
+#endif
+#define ProjectDefines X11ProjectDefines
+
+#ifndef X11CplusplusProjectDefines
+# define X11CplusplusProjectDefines X11ProjectDefines
+#endif
+#define CplusplusProjectDefines X11CplusplusProjectDefines
+
+#ifndef XtransFailSoft
+# define XtransFailSoft NO
+#endif
+
+#if XtransFailSoft
+# define XtransFailDefine /**/
+#else
+# define XtransFailDefine -DFAIL_HARD
+#endif
diff --git a/nx-X11/config/cf/X11.tmpl b/nx-X11/config/cf/X11.tmpl
new file mode 100644
index 000000000..12967d1d5
--- /dev/null
+++ b/nx-X11/config/cf/X11.tmpl
@@ -0,0 +1,4775 @@
+XCOMM ----------------------------------------------------------------------
+XCOMM X Window System Build Parameters and Rules
+XCOMM $XdotOrg: xc/config/cf/X11.tmpl,v 1.54 2005/12/14 23:41:52 alanc Exp $
+XCOMM $Xorg: X11.tmpl,v 1.6 2000/08/17 19:41:46 cpqbld Exp $
+XCOMM
+XCOMM
+XCOMM
+XCOMM
+XCOMM $XFree86: xc/config/cf/X11.tmpl,v 1.248 2004/02/16 04:07:37 dawes Exp $
+
+/***************************************************************************
+ * *
+ * DEFAULT DEFINITIONS *
+ * *
+ * The following section contains defaults for things that can *
+ * overridden in the various *.cf and site.def files. DO NOT EDIT! *
+ * *
+ **************************************************************************/
+
+#define ProjectX 604 /* do *not* change this line */
+
+/* The following project-specific rules are defined at the end of this file:
+ *
+ * InstallAppDefaults (class)
+ * InstallAppDefaultsLong (file,class)
+ * MakeFontsDir (deplist)
+ * MakeFcCache (deplist)
+ * MakeFonts ()
+ * InstallFontObjs (objs,dest)
+ * InstallFonts (dest)
+ * InstallFontAliases (dest)
+ * InstallFcCache (dest)
+ * FontSrc (basename)
+ * FontBaseObj (basename)
+ * InstallFontScale (dest)
+ * UncompressedFontTarget (basename)
+ * CompressedFontTarget (basename)
+ * FontTarget (basename)
+ * FontObj (basename)
+ * MakeXkbDir (basedir,subdir)
+ */
+
+/* X.Org release string */
+#ifndef XOrgReleaseString
+# if defined XorgVersionString
+# define XOrgReleaseString Release XorgVersionString
+# else
+# define XOrgReleaseString Release 6.9
+# endif
+#endif
+
+#ifndef XOrgManNameString
+#define XOrgManNameString X Version 11
+#endif
+#ifndef XOrgNameString
+# define XOrgNameString The X.Org Foundation
+#endif
+#ifndef XOrgNameStringShort
+# define XOrgNameStringShort X.Org
+#endif
+#ifndef XOrgStdFilePrefix
+# define XOrgStdFilePrefix xorg
+#endif
+#ifndef XOrgWebSupportAddress
+# define XOrgWebSupportAddress http://wiki.X.Org
+#endif
+
+XORGRELSTRING = XorgManVersionString
+ XORGMANNAME = XOrgManNameString
+
+#ifndef XOrgManDefs
+#define XOrgManDefs -D__xorgversion__="\"$(XORGRELSTRING)\" \"$(XORGMANNAME)\""
+#endif
+
+#ifndef XVendorManNameString
+#define XVendorManNameString XOrgManNameString
+#endif
+#ifndef XVendorManVersionString
+#define XVendorManVersionString XOrgReleaseString
+#endif
+#ifndef XVendorNameString
+# define XVendorNameString XOrgNameString
+#endif
+#ifndef XVendorNameStringShort
+# define XVendorNameStringShort XOrgNameStringShort
+#endif
+#ifndef XVendorWebSupport
+# define XVendorWebSupport XOrgWebSupportAddress
+#endif
+#ifndef XVendorStdFilePrefix
+# define XVendorStdFilePrefix XOrgStdFilePrefix
+#endif
+
+#ifndef VendorManDefs
+#define VendorManDefs -D__vendorversion__="$(VENDORMANVERSION) $(VENDORMANNAME)"
+#endif
+
+#ifndef VendorDefines
+#define VendorDefines -DXVENDORNAME='"$(VENDORNAME)"' -DXVENDORNAMESHORT='"$(VENDORNAMESHORT)"'
+#endif
+
+#ifndef VendorSupportDefines
+# if defined XVendorWebSupport
+# define VendorSupportDefines -D__VENDORDWEBSUPPORT__='"$(VENDORWEBSUPPORT)"'
+# endif
+#endif
+/*
+ * X-specific things
+ */
+#if CrossCompiling && !defined(UseInstalledOnCrossCompile)
+# if defined(UseInstalled)
+# define UseInstalledOnCrossCompile YES
+# else
+# define UseInstalledOnCrossCompile NO
+# endif
+#endif
+
+#ifndef HasXServer
+#define HasXServer YES
+#endif
+/* xorg.cf sets XorgServer to YES - to build Xorg you must include xorg.cf
+ * from the .cf file for your platform.
+ */
+#ifndef XorgServer
+#define XorgServer NO
+#endif
+#ifndef BuildServer
+#define BuildServer HasXServer
+#endif
+#ifndef BuildServersOnly
+#define BuildServersOnly NO
+#endif
+#ifndef BuildClients
+#define BuildClients !BuildServersOnly
+#endif
+#ifndef BuildDocs
+#define BuildDocs !BuildServersOnly
+#endif
+#ifndef BuildDmx
+#define BuildDmx NO
+#endif
+#ifndef XdmxServer
+#define XdmxServer BuildDmx
+#endif
+#ifndef BuildLibrariesForDmx
+#define BuildLibrariesForDmx XdmxServer
+#endif
+#ifndef BuildLibraries
+#define BuildLibraries (!BuildServersOnly || BuildClients || \
+ BuildLibrariesForDmx)
+#endif
+#ifndef BuildLibrariesForXServers
+#define BuildLibrariesForXServers BuildServer
+#endif
+#ifndef BuildFontServer
+#define BuildFontServer YES
+#endif
+#ifndef XserverStaticFontLib
+#define XserverStaticFontLib YES
+#endif
+#ifndef BuildSpeedo
+#define BuildSpeedo NO
+#endif
+#ifndef BuildType1
+#define BuildType1 NO
+#endif
+#ifndef BuildCID
+#define BuildCID YES
+#endif
+#ifndef BuildFreeType
+#define BuildFreeType NO
+#endif
+#ifndef BuildBuiltinFonts
+#define BuildBuiltinFonts NO
+#endif
+#ifndef BuildFonts
+#define BuildFonts (BuildServer | BuildFontServer)
+#endif
+#ifndef Build75DpiFonts
+#define Build75DpiFonts YES
+#endif
+#ifndef Build100DpiFonts
+#define Build100DpiFonts YES
+#endif
+#ifndef BuildSpeedoFonts
+#define BuildSpeedoFonts NO
+#endif
+#ifndef BuildType1Fonts
+#define BuildType1Fonts YES
+#endif
+#ifndef BuildCIDFonts
+#define BuildCIDFonts YES
+#endif
+#ifndef BuildTrueTypeFonts
+#define BuildTrueTypeFonts YES
+#endif
+#ifndef BuildBethMarduthoFonts
+#define BuildBethMarduthoFonts NO
+#endif
+#ifndef BuildEthiopicFonts
+#define BuildEthiopicFonts NO
+#endif
+#ifndef BuildCyrillicFonts
+#define BuildCyrillicFonts YES
+#endif
+/* Some bdf font generation details. The scripts for this require perl. */
+#ifndef TruncateUCSFonts
+#define TruncateUCSFonts HasPerl5
+#endif
+#ifndef MaxUCSChar
+#define MaxUCSChar 0x3200
+#endif
+#ifndef DerivedUCSFonts
+#define DerivedUCSFonts YES
+#endif
+/* These primarily control generation of derived 8-bit fonts. */
+#ifndef BuildUCSFonts
+#define BuildUCSFonts YES
+#endif
+/* Setting BuildISO8859_1Fonts to NO may result in problems. */
+#ifndef BuildISO8859_1Fonts
+#define BuildISO8859_1Fonts YES
+#endif
+#ifndef BuildISO8859_2Fonts
+#define BuildISO8859_2Fonts YES
+#endif
+#ifndef BuildISO8859_3Fonts
+#define BuildISO8859_3Fonts YES
+#endif
+#ifndef BuildISO8859_4Fonts
+#define BuildISO8859_4Fonts YES
+#endif
+#ifndef BuildISO8859_5Fonts
+#define BuildISO8859_5Fonts BuildCyrillicFonts
+#endif
+#ifndef BuildArabicFonts
+#define BuildArabicFonts YES
+#endif
+#ifndef BuildISO8859_6Fonts
+#define BuildISO8859_6Fonts BuildArabicFonts
+#endif
+#ifndef BuildGreekFonts
+#define BuildGreekFonts YES
+#endif
+#ifndef BuildISO8859_7Fonts
+#define BuildISO8859_7Fonts BuildGreekFonts
+#endif
+#ifndef BuildHebrewFonts
+#define BuildHebrewFonts YES
+#endif
+#ifndef BuildISO8859_8Fonts
+#define BuildISO8859_8Fonts BuildHebrewFonts
+#endif
+#ifndef BuildISO8859_9Fonts
+#define BuildISO8859_9Fonts YES
+#endif
+#ifndef BuildISO8859_10Fonts
+#define BuildISO8859_10Fonts YES
+#endif
+#ifndef BuildThaiFonts
+#define BuildThaiFonts YES
+#endif
+#ifndef BuildISO8859_11Fonts
+#define BuildISO8859_11Fonts BuildThaiFonts
+#endif
+#ifndef BuildISO8859_13Fonts
+#define BuildISO8859_13Fonts YES
+#endif
+#ifndef BuildISO8859_14Fonts
+#define BuildISO8859_14Fonts YES
+#endif
+#ifndef BuildISO8859_15Fonts
+#define BuildISO8859_15Fonts YES
+#endif
+#ifndef BuildISO8859_16Fonts
+#define BuildISO8859_16Fonts YES
+#endif
+#ifndef BuildKOI8_RFonts
+#define BuildKOI8_RFonts BuildCyrillicFonts
+#endif
+#ifndef BuildJapaneseFonts
+#define BuildJapaneseFonts YES
+#endif
+#ifndef BuildJISX0201Fonts
+#define BuildJISX0201Fonts BuildJapaneseFonts
+#endif
+#ifndef BuildKoreanFonts
+#define BuildKoreanFonts YES
+#endif
+#ifndef BuildChineseFonts
+#define BuildChineseFonts YES
+#endif
+#ifndef MakeLocalFontDir
+#define MakeLocalFontDir YES
+#endif
+#ifndef HasXAudio
+#define HasXAudio NO
+#endif
+#ifndef BuildXAudio
+#define BuildXAudio (HasXAudio & HasCplusplus)
+#endif
+#ifndef HasXAServer
+#define HasXAServer NO
+#endif
+#ifndef BuildXAServer
+#define BuildXAServer (HasXAServer & HasCplusplus)
+#endif
+#ifndef BuildX11Lib
+#define BuildX11Lib BuildLibraries
+#endif
+
+#ifndef BuildLoadableXlibI18n
+#define BuildLoadableXlibI18n (HasDlopen && SharedLibX11)
+#endif
+#ifndef InstallXcmsTxt
+#define InstallXcmsTxt YES
+#endif
+/*
+ * This disables XLOCALEDIR. Set it if you're using BuildLoadableXlibI18n,
+ * don't have either issetugid() or getresuid(), and you need to protect
+ * clients that are setgid or setuid to an id other than 0.
+ */
+#ifndef DisableXLocaleDirEnv
+#define DisableXLocaleDirEnv BuildLoadableXlibI18n && \
+ !(HasIssetugid || HasGetresuid)
+#endif
+#ifndef BuildLoadableXlibXcursor
+#define BuildLoadableXlibXcursor (HasDlopen && SharedLibX11)
+#endif
+#ifndef BuildXextLib
+#define BuildXextLib BuildLibraries
+#endif
+#ifndef BuildXauLib
+#define BuildXauLib (BuildLibraries || BuildLibrariesForXServers)
+#endif
+#define UseInstalledXauLib (defined(UseInstalled) || !BuildXauLib)
+#ifndef BuildXdmcpLib
+#define BuildXdmcpLib (BuildLibraries || BuildLibrariesForXServers)
+#endif
+#define UseInstalledXdmcpLib (defined(UseInstalled) || !BuildXdmcpLib)
+#ifndef BuildMITMiscExt
+#define BuildMITMiscExt YES
+#endif
+#ifndef BuildTestExt
+#define BuildTestExt YES
+#endif
+#ifndef BuildSyncExt
+#define BuildSyncExt YES
+#endif
+#ifndef BuildXCMiscExt
+#define BuildXCMiscExt YES
+#endif
+#ifndef BuildShapeExt
+#define BuildShapeExt YES
+#endif
+#ifndef BuildBigReqsExt
+#define BuildBigReqsExt YES
+#endif
+#ifndef BuildXInputExt
+#define BuildXInputExt NO
+#endif
+#ifndef BuildXInputLib
+#define BuildXInputLib (BuildXInputExt && \
+ (!BuildServersOnly || BuildLibrariesForDmx))
+#endif
+#ifndef BuildEVI
+#define BuildEVI YES
+#endif
+#ifndef BuildDBE
+#define BuildDBE YES
+#endif
+#ifndef BuildDBElib
+#define BuildDBElib BuildDBE
+#endif
+#ifndef BuildDIS
+#define BuildDIS NO
+#endif
+#ifndef BuildDPMS
+#define BuildDPMS YES
+#endif
+#ifndef BuildFontLib
+#if (!defined(XF86Server) || !XF86Server) && (!defined (XorgServer) || !XorgServer)
+#define BuildFontLib (BuildLibraries || BuildServer)
+#else
+#define BuildFontLib (BuildLibraries || \
+ (BuildServer && !DoLoadableServer) || \
+ XnestServer || XVirtualFramebufferServer || \
+ XprtServer || XdmxServer)
+#endif
+#endif
+#ifndef BuildFontCache
+#define BuildFontCache NO
+#endif
+#ifndef BuildFontCacheLib
+#define BuildFontCacheLib (BuildFontCache && !BuildServersOnly)
+#endif
+#ifndef BuildFontEncLib
+#define BuildFontEncLib BuildLibraries
+#endif
+/*
+ * This enables binary compatibility with the older (XFree86 <= 4.1) fontenc
+ * entry points in the Xfont library (and X server). If this is turned off,
+ * then SharedFontRev should have it's major revision bumped, and the
+ * XFree86 font module ABI (in xfree86/common/xf86Module.h) should have it's
+ * major revision bumped.
+ *
+ * Note: this does not enable those older functions in the separate libfontenc
+ * library (which didn't exist previously).
+ */
+#ifndef FontencCompatibility
+#define FontencCompatibility YES
+#endif
+#ifndef BuildLBX
+#define BuildLBX YES
+#endif
+#ifndef BuildXKB
+#define BuildXKB YES
+#endif
+#ifndef BuildXKBlib
+#define BuildXKBlib (BuildXKB && (!BuildServersOnly || \
+ XnestServer || XdmxServer || \
+ BuildXkbcomp ))
+#endif
+#ifndef BuildXKBuilib
+#define BuildXKBuilib (BuildXKB && !BuildServersOnly)
+#endif
+#ifndef BuildXKBfilelib
+#define BuildXKBfilelib (BuildXKB && (!BuildServersOnly || \
+ BuildXkbcomp ))
+#endif
+#ifndef BuildXTrap
+#define BuildXTrap YES
+#endif
+#ifndef BuildXTrapLibrary
+#define BuildXTrapLibrary (BuildXTrap && !BuildServersOnly)
+#endif
+
+ /*
+ * WARNING: Setting UseXKBInClients to YES cause incompatibilities
+ * between many clients (such as xterm) and pre-XKB shared
+ * libraries.
+ */
+#ifndef UseXKBInClients
+#define UseXKBInClients NO /* use XKB in "normal" clients? */
+#endif
+#ifndef BuildMultibuffer
+#define BuildMultibuffer NO
+#endif
+#ifndef BuildRECORD
+#define BuildRECORD YES
+#endif
+#ifndef BuildRECORDlib
+#define BuildRECORDlib BuildRECORD
+#endif
+#ifndef BuildXinerama
+#define BuildXinerama NO
+#endif
+#ifndef BuildXineramaLibrary
+#define BuildXineramaLibrary (BuildXinerama && !BuildServersOnly)
+#endif
+#ifndef BuildDmxDevelTools
+#define BuildDmxDevelTools NO
+#endif
+#ifndef BuildDmxLibrary
+#define BuildDmxLibrary (BuildDmx && \
+ (!BuildServersOnly || BuildDmxDevelTools))
+#endif
+#ifndef BuildXCSecurity
+#define BuildXCSecurity YES
+#endif
+#ifndef BuildAppgroup
+#define BuildAppgroup YES
+#endif
+#if BuildAppgroup && !BuildXCSecurity
+#define BuildXCSecurity YES
+#endif
+#ifndef BuildCup
+#define BuildCup YES
+#endif
+#ifndef HasPlugin
+/* Browser plugins are shared libraries - only build them if the OS
+ * supports shared libs.
+ */
+#define HasPlugin HasSharedLibraries
+#endif
+#ifndef BuildPlugin
+#define BuildPlugin HasPlugin
+#endif
+#ifndef XpRasterDDX
+#define XpRasterDDX YES
+#endif
+#ifndef XpColorPclDDX
+#define XpColorPclDDX YES
+#endif
+#ifndef XpMonoPclDDX
+#define XpMonoPclDDX YES
+#endif
+#ifndef XpPostScriptDDX
+#define XpPostScriptDDX YES
+#endif
+#ifndef XpPdfDDX
+#define XpPdfDDX YES
+#endif
+#ifndef XpSvgDDX
+#define XpSvgDDX YES
+#endif
+
+#ifndef BuildXprint
+#define BuildXprint YES
+#endif
+#ifndef XprtServer
+#define XprtServer (BuildServer && BuildXprint)
+#endif
+#ifndef BuildXprintLib
+#define BuildXprintLib (!BuildServersOnly && BuildXprint)
+#endif
+#ifndef BuildXprintClients
+#define BuildXprintClients BuildXprintLib
+#endif
+
+#ifndef BuildScreenSaverExt
+#define BuildScreenSaverExt NO
+#endif
+#ifndef BuildScreenSaverLibrary
+#define BuildScreenSaverLibrary (BuildScreenSaverExt && !BuildServersOnly)
+#endif
+#ifndef BuildXF86VidModeExt
+#define BuildXF86VidModeExt NO
+#endif
+#ifndef BuildXF86VidModeLibrary
+#define BuildXF86VidModeLibrary (BuildXF86VidModeExt && !BuildServersOnly)
+#endif
+#ifndef BuildXF86MiscExt
+#define BuildXF86MiscExt NO
+#endif
+#ifndef BuildXF86MiscLibrary
+#define BuildXF86MiscLibrary (BuildXF86MiscExt && !BuildServersOnly)
+#endif
+#ifndef BuildXF86BigfontExt
+#define BuildXF86BigfontExt NO
+#endif
+#ifndef BuildXF86DGA
+#define BuildXF86DGA NO
+#endif
+#ifndef BuildXF86DGALibrary
+#define BuildXF86DGALibrary (BuildXF86DGA && !BuildServersOnly)
+#endif
+#ifndef BuildXResExt
+#define BuildXResExt NO
+#endif
+#ifndef BuildXResLibrary
+#define BuildXResLibrary (BuildXResExt && \
+ (!BuildServersOnly || BuildDmxDevelTools))
+#endif
+#ifndef BuildXvExt
+#define BuildXvExt NO
+#endif
+#ifndef BuildXvLibrary
+#define BuildXvLibrary (BuildXvExt && !BuildServersOnly)
+#endif
+#ifndef BuildXvMCExt
+#define BuildXvMCExt NO
+#endif
+#ifndef BuildXvMCLibrary
+#define BuildXvMCLibrary (BuildXvMCExt && !BuildServersOnly)
+#endif
+#ifndef BuildGlxExt
+#define BuildGlxExt NO
+#else
+#if BuildGlxExt && !defined(XFree86Version) && !defined(XorgVersion)
+#undef BuildXF86DRI
+#undef BuildXF86DRIDriverSupport
+#define BuildXF86DRI NO
+#define BuildXF86DRIDriverSupport NO
+#endif
+#endif
+#ifndef BuildGLXLibrary
+#define BuildGLXLibrary (BuildGlxExt && !BuildServersOnly)
+#endif
+#ifndef BuildOSMesaLib
+#define BuildOSMesaLib BuildGlxExt
+#endif
+#ifndef BuildGLULibrary
+#define BuildGLULibrary (BuildGLXLibrary && BuildLibraries && \
+ HasCplusplus)
+#endif
+#ifndef BuildGLwLibrary
+#define BuildGLwLibrary (BuildGLXLibrary && BuildLibraries)
+#endif
+#ifndef BuildXDriInfo
+#define BuildXDriInfo (BuildGLXLibrary && !BuildServersOnly)
+#endif
+#ifndef BuildXF86RushExt
+#define BuildXF86RushExt NO
+#endif
+#ifndef BuildXF86RushLibrary
+#define BuildXF86RushLibrary (BuildXF86RushExt && !BuildServersOnly)
+#endif
+#ifndef BuildDPSLibraries
+#define BuildDPSLibraries NO
+#endif
+#ifndef BuildDPSLibrary
+#define BuildDPSLibrary BuildDPSLibraries
+#endif
+#ifndef BuildDPSTkLibrary
+#define BuildDPSTkLibrary BuildDPSLibraries
+#endif
+#ifndef BuildPSResLibrary
+#define BuildPSResLibrary BuildDPSLibraries
+#endif
+#ifndef BuildDPSClients
+#define BuildDPSClients BuildDPSLibraries
+#endif
+#ifndef BuildRender
+#define BuildRender YES
+#endif
+#ifndef BuildRenderLibrary
+#define BuildRenderLibrary (XdmxServer || !BuildServersOnly)
+#endif
+#ifndef BuildXftLibrary
+#define BuildXftLibrary BuildRenderLibrary
+#endif
+#ifndef BuildXft1Library
+#define BuildXft1Library BuildRenderLibrary
+#endif
+#ifndef UseFontconfig
+#define UseFontconfig BuildXftLibrary
+#endif
+#ifndef BuildFontconfigLibrary
+#define BuildFontconfigLibrary (UseFontconfig && !HasFontconfig)
+#endif
+#ifndef UseFreetype2
+#define UseFreetype2 (BuildXftLibrary || BuildXft1Library || \
+ UseFontconfig || BuildFreeType)
+#endif
+#ifndef InstallFontconfigLibrary
+# define InstallFontconfigLibrary YES
+#endif
+#ifndef HasExpat
+#define HasExpat YES
+#endif
+#ifndef UseExpat
+#define UseExpat (UseFontconfig || BuildXF86DRI)
+#endif
+#ifndef BuildExpatLibrary
+#define BuildExpatLibrary (UseExpat && !HasExpat)
+#endif
+#ifndef BuildFreetype2Library
+#define BuildFreetype2Library (UseFreetype2 && !HasFreetype2)
+#endif
+#ifndef Freetype2BuildDefines
+#define Freetype2BuildDefines /**/
+#endif
+
+#ifndef BuildRandR
+#define BuildRandR YES
+#endif
+#ifndef BuildRandRLibrary
+#define BuildRandRLibrary !BuildServersOnly
+#endif
+
+#ifndef BuildXfixes
+#define BuildXfixes YES
+#endif
+#ifndef BuildXfixesLibrary
+#define BuildXfixesLibrary !BuildServersOnly
+#endif
+
+#ifndef BuildDamage
+#define BuildDamage BuildXfixes
+#endif
+#ifndef BuildDamageLibrary
+#define BuildDamageLibrary !BuildServersOnly
+#endif
+
+#ifndef BuildComposite
+#define BuildComposite (BuildXfixes && BuildDamage)
+#endif
+#ifndef BuildCompositeLibrary
+#define BuildCompositeLibrary !BuildServersOnly && (BuildXfixesLibrary && \
+ BuildDamageLibrary)
+#endif
+
+#ifndef BuildXevie
+#define BuildXevie YES
+#endif
+#ifndef BuildXevieLibrary
+#define BuildXevieLibrary !BuildServersOnly
+#endif
+
+#ifndef BuildRootless
+#define BuildRootless NO
+#endif
+
+#ifndef BuildXterm
+#define BuildXterm NO
+#endif
+
+#ifndef BuildXkbcomp
+#define BuildXkbcomp BuildClients
+#endif
+
+#ifndef BuildXcursorLibrary
+#define BuildXcursorLibrary BuildRenderLibrary
+#endif
+
+#ifndef BuildXcursorgen
+#define BuildXcursorgen HasLibpng
+#endif
+
+#ifndef DefaultCursorTheme
+#define DefaultCursorTheme core
+#endif
+
+#ifndef BuildAppleWMLibrary
+#define BuildAppleWMLibrary NO
+#endif
+
+#ifndef BuildWindowsWMLibrary
+#define BuildWindowsWMLibrary NO
+#endif
+
+#ifndef BuildMiscDocs
+#define BuildMiscDocs NO
+#endif
+#ifndef BuildSpecsDocs
+#define BuildSpecsDocs NO
+#endif
+#ifndef BuildAllSpecsDocs
+#define BuildAllSpecsDocs NO
+#endif
+
+#ifndef InstallHardcopyDocs
+#define InstallHardcopyDocs YES
+#endif
+
+#ifndef InstallMiscManPages
+#define InstallMiscManPages YES
+#endif
+
+#ifndef FSUseSyslog
+#define FSUseSyslog NO
+#endif
+
+#ifndef InstallLibManPages
+#define InstallLibManPages YES
+#endif
+#ifndef InstallXtermSetUID
+#define InstallXtermSetUID YES /* xterm needs to be set uid */
+#endif
+#ifndef InstallXloadSetGID
+#define InstallXloadSetGID YES /* xload often needs set gid kmem */
+#endif
+#ifndef InstallXinitConfig
+#define InstallXinitConfig NO /* install sample xinit config */
+#endif
+#ifndef InstallXdmConfig
+#define InstallXdmConfig NO /* install sample xdm config */
+#endif
+#ifndef XdmServersType /* what Xservers files to use */
+#if BuildServer
+#define XdmServersType ws
+#else
+#define XdmServersType fs
+#endif
+#endif
+#ifndef InstallFSConfig
+#define InstallFSConfig NO /* install sample fs config */
+#endif
+#ifndef InstallAppDefFiles
+#define InstallAppDefFiles YES /* install application defaults */
+#endif
+#ifndef UseConfDirForAppDefaults
+#define UseConfDirForAppDefaults YES
+#endif
+#ifndef UseConfDirForXkb
+#define UseConfDirForXkb YES
+#endif
+#ifndef CompressAllFonts
+#define CompressAllFonts NO
+#endif
+#ifndef ThreadedX
+#if HasPosixThreads || HasCThreads
+#define ThreadedX YES /* multi-threaded libraries */
+#else
+#define ThreadedX NO
+#endif
+#endif
+#ifndef ThreadedProject
+#define ThreadedProject ThreadedX
+#endif
+#ifndef NeedUIThrStubs
+#define NeedUIThrStubs NO
+#endif
+#ifndef HasWChar32
+#define HasWChar32 SystemV4
+#endif
+#ifndef HasXdmAuth
+#define HasXdmAuth NO /* if you can not use XDM-AUTH* */
+#endif
+#ifndef PrimaryScreenResolution
+#define PrimaryScreenResolution 72 /* a common resolution */
+#endif
+#ifndef DefaultFontPath
+# if PrimaryScreenResolution < 88 /* (75 + 100) / 2 */
+# define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/TTF/,$(FONTDIR)/Type1/,$(FONTDIR)/CID/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/
+# else
+# define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/TTF/,$(FONTDIR)/Type1/,$(FONTDIR)/CID/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/
+# endif
+#endif
+#ifndef DefaultFSFontPath
+# define DefaultFSFontPath DefaultFontPath
+#endif
+#ifndef DefaultRGBDatabase
+#define DefaultRGBDatabase $(LIBDIR)/rgb
+#endif
+#ifndef UseRgbTxt
+#define UseRgbTxt NO /* default is to compile with dbm */
+#endif
+#ifndef UseMemLeak
+#define UseMemLeak NO
+#endif
+#ifndef SpecialMalloc
+#define SpecialMalloc NO
+#endif
+#ifndef UseInternalMalloc
+#define UseInternalMalloc NO
+#endif
+#ifndef XallocDefines
+#define XallocDefines /**/
+#endif
+#ifndef ServerErrorDefines
+#define ServerErrorDefines /**/
+#endif
+#ifndef FontCompilerFlags
+#define FontCompilerFlags -t
+#endif
+/*
+ * NOTE: IPv6Flags could be tacked on to either ConnectionFlags or
+ * ExtraConnectionDefs. Here, we choose the later in order to
+ * maximise exposure of the IPv6 code (a number of <OS>.def files
+ * contain ConnectionFlags overrides). Mind you, this might not
+ * the right thing to do when HasStreams is asserted.
+ */
+#ifndef BuildIPv6 /* If the OS also #define's AF_INET6 */
+#define BuildIPv6 YES
+#endif
+#ifndef IPv6Flags
+#if BuildIPv6
+#define IPv6Flags -DIPv6
+#else
+#define IPv6Flags /**/
+#endif
+#endif
+/*
+ * Assume by default that IPv6 sockets also listen for IPv4 connections.
+ * XDMCP support currently only works for both IPv4 and IPv6 when this is
+ * true.
+ */
+#ifndef IPv6SocketsAlsoIPv4
+#define IPv6SocketsAlsoIPv4 YES
+#endif
+#ifndef DECnetFlags
+#if HasDECnet
+#define DECnetFlags -DDNETCONN
+#else
+#define DECnetFlags
+#endif
+#endif
+#ifndef ConnectionFlags
+#if HasStreams
+#define ConnectionFlags -DSTREAMSCONN
+#else
+#define ConnectionFlags -DTCPCONN -DUNIXCONN DECnetFlags
+#endif
+#endif
+#if HasStickyDirBit
+STICKY_DEFINES = -DHAS_STICKY_DIR_BIT
+#endif
+#if HasFchown
+FCHOWN_DEFINES = -DHAS_FCHOWN
+#endif
+#ifndef ExtraConnectionDefs
+#define ExtraConnectionDefs $(STICKY_DEFINES) $(FCHOWN_DEFINES) IPv6Flags
+#endif
+#ifndef ProjectThreadsDefines
+#define ProjectThreadsDefines -DXTHREADS
+#endif
+#ifndef FontOSDefines
+#define FontOSDefines /**/
+#endif
+#ifndef FontDefines
+#define FontDefines -DFONT_SNF -DFONT_BDF -DFONT_PCF -DCOMPRESSED_FONTS FontOSDefines
+#endif
+#ifndef XawI18nDefines
+#if SystemV4
+#define XawI18nDefines -DHAS_WCTYPE_H
+#else
+#define XawI18nDefines -DUSE_XWCHAR_STRING
+#endif
+#endif
+#if Malloc0ReturnsNull
+#ifndef XMalloc0ReturnsNullDefines
+#define XMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines
+#endif
+#ifndef XtMalloc0ReturnsNullDefines
+#define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines -DXTMALLOC_BC
+#endif
+#endif
+#ifndef ExtensionOSDefines
+#define ExtensionOSDefines /**/
+#endif
+
+#ifndef ExtensionDefines
+#ifndef MITMiscDefines
+#if BuildMITMiscExt
+#define MITMiscDefines -DMITMISC
+#else
+#define MITMiscDefines /**/
+#endif
+#endif
+#ifndef XTestDefines
+#if BuildTestExt
+#define XTestDefines -DXTEST
+#else
+#define XTestDefines /**/
+#endif
+#endif
+#ifndef XTrapDefines
+#if BuildXTrap
+#define XTrapDefines -DXTRAP
+#else
+#define XTrapDefines /**/
+#endif
+#endif
+#ifndef XSyncDefines
+#if BuildSyncExt
+#define XSyncDefines -DXSYNC
+#else
+#define XSyncDefines /**/
+#endif
+#endif
+#ifndef XCMiscDefines
+#if BuildXCMiscExt
+#define XCMiscDefines -DXCMISC
+#else
+#define XCMiscDefines /**/
+#endif
+#endif
+#ifndef ShapeDefines
+#if BuildShapeExt
+#define ShapeDefines -DSHAPE
+#else
+#define ShapeDefines /**/
+#endif
+#endif
+#ifndef GlxDefines
+#if BuildGlxExt
+#ifdef GlxExtraDefines
+#define GlxDefines -DGLXEXT GlxExtraDefines
+#else
+#define GlxDefines -DGLXEXT
+#endif
+#else
+#define GlxDefines /**/
+#endif
+#endif
+#ifndef DRMSrcDir
+#define DRMSrcDir $(TOP)/extras/drm
+#endif
+#ifndef MesaSrcDir
+#define MesaSrcDir $(TOP)/extras/Mesa
+#endif
+#ifndef OglSampleSrcDir
+#define OglSampleSrcDir $(TOP)/extras/ogl-sample
+#endif
+#ifndef ShmDefines
+#if HasShm
+#define ShmDefines -DMITSHM
+#else
+#define ShmDefines /**/
+#endif
+#endif
+#ifndef XInputDefines
+#if BuildXInputExt
+#define XInputDefines -DXINPUT
+#else
+#define XInputDefines /**/
+#endif
+#endif
+#ifndef XineramaDefines
+#if BuildXinerama
+#define XineramaDefines -DPANORAMIX
+#else
+#define XineramaDefines /**/
+#endif
+#endif
+#ifndef PrintOnlyServer
+#define PrintOnlyServer YES
+#endif
+#ifndef XprintDefines
+#if BuildXprint
+#if PrintOnlyServer
+#define XprintDefines -DXPRINT -DPIXPRIV
+#else
+#define XprintDefines -DXPRINT -DLOADABLEPRINTDDX -DPIXPRIV
+#endif
+#else
+#define XprintDefines /**/
+#endif
+#endif
+#ifndef XkbDefines
+#if BuildXKB
+#define XkbDefines -DXKB
+#else
+#define XkbDefines /**/
+#endif
+#endif
+#ifndef XkbClientDefines
+#if UseXKBInClients
+#define XkbClientDefines -DXKB
+#else
+#define XkbClientDefines /**/
+#endif
+#endif
+#ifndef XkbServerDefines
+#define XkbServerDefines /**/
+#endif
+#ifndef XkbDefRulesDefines
+#define XkbDefRulesDefines -D__XKBDEFRULES__='"$(XKBDEFRULES)"'
+#endif
+# ifndef XkbDefaultRulesFile
+# define XkbDefaultRulesFile XVendorStdFilePrefix
+#endif
+#ifndef LbxDefines
+#if BuildLBX
+#define LbxDefines -DLBX
+#else
+#define LbxDefines /**/
+#endif
+#endif
+#ifndef BigReqDefines
+#if BuildBigReqsExt
+#define BigReqDefines -DBIGREQS
+#else
+#define BigReqDefines /**/
+#endif
+#endif
+
+#ifndef EVIDefines
+#if BuildEVI
+#define EVIDefines -DEVI
+#else
+#define EVIDefines /**/
+#endif
+#endif
+
+#ifndef DBEDefines
+#if BuildDBE
+#define DBEDefines -DDBE
+#else
+#define DBEDefines /**/
+#endif
+#endif
+
+#ifndef PervasiveDBEDefines
+#define PervasiveDBEDefines /* -DNEED_DBE_BUF_BITS -DNEED_DBE_BUF_VALIDATE */
+#endif
+
+#ifndef MultibufferDefines
+#if BuildMultibuffer
+#define MultibufferDefines -DMULTIBUFFER
+#else
+#define MultibufferDefines /**/
+#endif
+#endif
+
+#ifndef ScreenSaverExtensionDefines
+#if BuildScreenSaverExt
+#define ScreenSaverExtensionDefines -DSCREENSAVER
+#else
+#define ScreenSaverExtensionDefines /**/
+#endif
+#endif
+#ifndef VidModeExtensionDefines
+#if BuildXF86VidModeExt
+#define VidModeExtensionDefines -DXF86VIDMODE
+#else
+#define VidModeExtensionDefines /**/
+#endif
+#endif
+#ifndef XF86MiscExtensionDefines
+#if BuildXF86MiscExt
+#define XF86MiscExtensionDefines -DXF86MISC
+#else
+#define XF86MiscExtensionDefines /**/
+#endif
+#endif
+
+#ifndef XF86BigfontExtensionDefines
+#if BuildXF86BigfontExt
+#define XF86BigfontExtensionDefines -DXF86BIGFONT
+#else
+#define XF86BigfontExtensionDefines /**/
+#endif
+#endif
+
+#ifndef XvExtensionDefines
+#if BuildXvExt
+#define XvExtensionDefines -DXV
+#else
+#define XvExtensionDefines /**/
+#endif
+#endif
+
+#ifndef XvMCExtensionDefines
+#if BuildXvMCExt
+#define XvMCExtensionDefines -DXVMC
+#else
+#define XvMCExtensionDefines /**/
+#endif
+#endif
+
+#ifndef XResExtensionDefines
+#if BuildXResExt
+#define XResExtensionDefines -DRES
+#else
+#define XResExtensionDefines /**/
+#endif
+#endif
+
+#ifndef RECORDDefines
+#if BuildRECORD
+#define RECORDDefines -DXRECORD
+#else
+#define RECORDDefines /**/
+#endif
+#endif
+
+#ifndef AppgroupDefines
+#if BuildAppgroup
+#define AppgroupDefines -DXAPPGROUP
+#else
+#define AppgroupDefines /**/
+#endif
+#endif
+
+#ifndef XCSecurityDefines
+#if BuildXCSecurity
+#define XCSecurityDefines -DXCSECURITY
+#else
+#define XCSecurityDefines /**/
+#endif
+#endif
+
+#ifndef CupDefines
+#if BuildCup
+#define CupDefines -DTOGCUP
+#else
+#define CupDefines /**/
+#endif
+#endif
+
+#ifndef DPMSDefines
+#if BuildDPMS
+#define DPMSDefines -DDPMSExtension
+#else
+#define DPMSDefines /**/
+#endif
+#endif
+
+#ifndef RenderDefines
+#if BuildRender
+#define RenderDefines -DRENDER
+#else
+#define RenderDefines /**/
+#endif
+#endif
+
+#ifndef RandRDefines
+#if BuildRandR
+#define RandRDefines -DRANDR
+#else
+#define RandRDefines /**/
+#endif
+#endif
+
+#ifndef FontCacheExtentionDefines
+#if BuildFontCache
+#define FontCacheExtensionDefines -DFONTCACHE
+#else
+#define FontCacheExtensionDefines /**/
+#endif
+#endif
+
+#ifndef XfixesDefines
+#if BuildXfixes
+#define XfixesDefines -DXFIXES
+#else
+#define XfixesDefines /**/
+#endif
+#endif
+
+#ifndef XDamageDefines
+#if BuildDamage
+#define XDamageDefines -DDAMAGE
+#else
+#define XDamageDefines /**/
+#endif
+#endif
+
+#ifndef CompositeDefines
+#if BuildComposite
+#define CompositeDefines -DCOMPOSITE
+#else
+#define CompositeDefines /**/
+#endif
+#endif
+
+#ifndef XevieDefines
+#if BuildXevie
+#define XevieDefines -DXEVIE
+#else
+#define XevieDefines /**/
+#endif
+#endif
+
+#ifndef RootlessDefines
+#if BuildRootless
+#define RootlessDefines -DROOTLESS
+#else
+#define RootlessDefines /**/
+#endif
+#endif
+
+#ifndef SitePervasiveExtensionDefines
+#define SitePervasiveExtensionDefines /**/
+#endif
+#ifndef PervasiveExtensionDefines
+#define PervasiveExtensionDefines \
+ ShapeDefines XInputDefines XkbDefines LbxDefines AppgroupDefines \
+ XCSecurityDefines CupDefines PervasiveDBEDefines \
+ XF86BigfontExtensionDefines DPMSDefines \
+ XprintDefines XineramaDefines \
+ SitePervasiveExtensionDefines RenderDefines RandRDefines \
+ XfixesDefines XDamageDefines CompositeDefines XevieDefines \
+ RootlessDefines
+#endif
+#ifndef SiteExtensionDefines
+#define SiteExtensionDefines /**/
+#endif
+#ifndef BaseExtensionDefines
+#define BaseExtensionDefines \
+ MultibufferDefines MITMiscDefines XTestDefines XTrapDefines \
+ XSyncDefines XCMiscDefines RECORDDefines \
+ ShmDefines BigReqDefines VidModeExtensionDefines \
+ XF86MiscExtensionDefines DBEDefines DPMSDefines EVIDefines \
+ ScreenSaverExtensionDefines XvExtensionDefines XvMCExtensionDefines \
+ GlxDefines FontCacheExtensionDefines SiteExtensionDefines \
+ XResExtensionDefines
+#endif
+#define ExtensionDefines BaseExtensionDefines ExtensionOSDefines
+#endif /* ExtensionDefines */
+
+#ifndef HasStrcasecmp
+#define HasStrcasecmp YES
+#endif
+
+#ifndef StrcasecmpDefines
+# if HasStrcasecmp
+# define StrcasecmpDefines /**/
+# else
+# define StrcasecmpDefines -DNEED_STRCASECMP
+# endif
+#endif
+
+#ifndef HasDevRandom
+#define HasDevRandom NO
+#endif
+
+#ifndef HasArc4Random
+#define HasArc4Random NO
+#endif
+
+#ifndef RandomDefines
+# if HasDevRandom
+# ifndef RandomDeviceFile
+# define RandomDeviceFile /dev/random
+# endif
+# ifndef ExtraRandomDefines
+# ifdef PollDevRandom /* Set if can poll() /dev/random to avoid blocking */
+# define ExtraRandomDefines -DPOLL_DEV_RANDOM
+# else
+# define ExtraRandomDefines /**/
+# endif
+# endif
+# define RandomDefines -DDEV_RANDOM=\"RandomDeviceFile\" ExtraRandomDefines
+# elif HasArc4Random
+# define RandomDefines -DARC4_RANDOM
+# else
+# define RandomDefines /**/
+# endif
+#endif
+
+#ifndef PreferXdmcpIPv6
+#define PreferXdmcpIPv6 NO
+#endif
+#ifndef ServerXdmcpIPv6Defines
+#if BuildIPv6 && !IPv6SocketsAlsoIPv4 && !PreferXdmcpIPv6
+#define ServerXdmcpIPv6Defines -DXDMCP_NO_IPV6
+#else
+#define ServerXdmcpIPv6Defines /**/
+#endif
+#endif
+
+#ifndef ServerXdmcpDefines
+#define ServerXdmcpDefines -DXDMCP ServerXdmcpIPv6Defines
+#endif
+#ifndef ServerOSDefines
+#define ServerOSDefines /**/
+#endif
+#if HasKrbIV
+#ifndef KrbIVDefines
+#define KrbIVDefines -DKERBEROS
+#endif
+#else
+#define KrbIVDefines /**/
+#endif
+#if HasKrb5
+#ifndef Krb5Defines
+#define Krb5Defines -DK5AUTH
+#endif
+#else
+#define Krb5Defines /**/
+#endif
+#ifndef ServerExtraDefines
+#define ServerExtraDefines /* -DPIXPRIV */
+#endif
+#ifndef ServerAssertDefines
+#define ServerAssertDefines -DNDEBUG
+#endif
+#ifndef ServerSnprintfDefines
+#if !HasSnprintf
+#define ServerSnprintfDefines -DNEED_SNPRINTF
+#else
+#define ServerSnprintfDefines /**/
+#endif
+#endif
+#ifndef ServerDefines
+#define ServerDefines StandardDefines PervasiveExtensionDefines ServerExtraDefines ServerAssertDefines ServerSnprintfDefines
+#endif
+
+#ifndef MesaUseX86Asm
+/* The current Mesa X86 ASM code doesn't work well with SVR4 shared libs. */
+# if HasX86Support && !SystemV4
+# define MesaUseX86Asm YES
+# else
+# define MesaUseX86Asm NO
+# endif
+#endif
+
+#ifndef MesaUseMMX
+#ifdef HasMMXSupport
+#define MesaUseMMX HasMMXSupport
+#else
+#define MesaUseMMX NO
+#endif
+#endif
+
+#ifndef MesaUse3DNow
+#ifdef Has3DNowSupport
+#define MesaUse3DNow Has3DNowSupport
+#else
+#define MesaUse3DNow NO
+#endif
+#endif
+
+#ifndef MesaUseSSE
+#ifdef HasSSESupport
+#define MesaUseSSE HasSSESupport
+#else
+#define MesaUseSSE NO
+#endif
+#endif
+
+/* For compatibility */
+#ifdef HasSSESupport
+#undef HasKatmaiSupport
+#define HasKatmaiSupport HasSSESupport
+#endif
+#undef MesaUseKatmai
+#define MesaUseKatmai MesaUseSSE
+
+#ifndef UsbMouseSupport
+# define UsbMouseSupport NO
+#endif
+
+#ifndef DefaultFSConfigFile
+#define DefaultFSConfigFile $(LIBDIR)/fs/config
+#endif
+
+#ifndef BinDir
+#ifdef ProjectRoot
+#define BinDir Concat(ProjectRoot,/bin)
+#else
+#define BinDir /usr/bin/X11
+#endif
+#endif
+#ifndef BuildIncRoot
+#define BuildIncRoot $(TOP)/exports
+#endif
+#ifndef BuildIncDir
+#define BuildIncDir $(BUILDINCROOT)/include
+#endif
+#ifndef BuildIncTop
+#define BuildIncTop ../.. /* relative to BuildIncDir */
+#endif
+#ifndef XTop
+# if ImportX11
+# define XTop $(TOP)/imports/x11
+# else
+# define XTop $(TOP)
+# endif
+#endif
+#ifndef XBuildIncRoot
+# if ImportX11
+# define XBuildIncRoot $(XTOP)
+# else
+# define XBuildIncRoot $(XTOP)/exports
+# endif
+#endif
+#ifndef XBuildIncDir
+# define XBuildIncDir $(XBUILDINCROOT)/include/X11
+#endif
+#ifndef XBuildIncTop
+# define XBuildIncTop ../../..
+#endif
+#ifndef XBuildBinDir
+# define XBuildBinDir $(XBUILDINCROOT)/bin
+#endif
+#ifndef BuildBinDir
+#define BuildBinDir $(TOP)/exports/bin
+#endif
+#ifndef BuildBinTop
+#define BuildBinTop ../.. /* relative to BuildBinDir */
+#endif
+#ifndef BuildLibDir
+#define BuildLibDir $(TOP)/exports/lib
+#endif
+#ifndef BuildLibTop
+#define BuildLibTop ../.. /* relative to BuildLibDir */
+#endif
+#ifndef BuildModuleDir
+#define BuildModuleDir $(BUILDLIBDIR)/modules
+#endif
+#ifndef BuildI18NDir
+# define BuildI18NDir $(BUILDLIBDIR)/locale
+#endif
+#ifndef BuildModuleTop
+#define BuildModuleTop $(BUILDLIBTOP)/..
+#endif
+#ifndef LibDir
+# ifdef ProjectRoot
+# define LibDir Concat(ProjectRoot,/lib/X11)
+# else
+# define LibDir /usr/lib/X11
+# endif
+#endif
+#ifndef ModuleDir
+#define ModuleDir $(USRLIBDIR)/modules
+#endif
+#ifndef InstSrcDir
+#define InstSrcDir Concat(ProjectRoot,/src)
+#endif
+#ifndef LibexecDir
+#ifdef ProjectRoot
+#define LibexecDir Concat(ProjectRoot,/libexec)
+#else
+#define LibexecDir /usr/X11/libexec
+#endif
+#endif
+#ifndef ConfigDir
+#define ConfigDir $(LIBDIR)/config
+#endif
+#ifndef DocDir
+#define DocDir $(LIBDIR)/doc
+#endif
+#ifndef DocHtmlDir
+#define DocHtmlDir $(DOCDIR)/html
+#endif
+#ifndef DocPsDir
+#define DocPsDir $(DOCDIR)/PostScript
+#endif
+#ifndef DocPdfDir
+#define DocPdfDir $(DOCDIR)/PDF
+#endif
+#ifndef FontDir
+#define FontDir $(LIBDIR)/fonts
+#endif
+#ifndef FontEncDir
+#define FontEncDir $(LIBDIR)/fonts/encodings
+#endif
+#ifndef AdmDir
+#define AdmDir /usr/adm
+#endif
+#ifndef XinitDir
+#define XinitDir $(LIBDIR)/xinit
+#endif
+#ifndef XdmDir
+#define XdmDir $(LIBDIR)/xdm
+#endif
+#ifndef XdmVarDir
+#define XdmVarDir $(VARLIBDIR)/xdm
+#endif
+#ifndef XdmAuthDir
+#define XdmAuthDir $(LIBDIR)/xdm
+#endif
+#ifndef XdmConfigurationSubdirectory /* under xdm sources */
+#define XdmConfigurationSubdirectory config
+#endif
+#ifndef TwmDir
+#define TwmDir $(LIBDIR)/twm
+#endif
+#ifndef XsmDir
+#define XsmDir $(LIBDIR)/xsm
+#endif
+#ifndef NlsDir
+#define NlsDir $(LIBDIR)/nls
+#endif
+#ifndef XLocaleDir
+#define XLocaleDir $(LIBDIR)/locale
+#endif
+#ifndef LbxproxyDir
+#define LbxproxyDir $(LIBDIR)/lbxproxy
+#endif
+#ifndef LbxproxyConfigSubdir /* under lbxproxy sources */
+#define LbxproxyConfigSubdir config
+#endif
+#ifndef ProxyManagerDir
+#define ProxyManagerDir $(LIBDIR)/proxymngr
+#endif
+#ifndef ServerConfigDir
+#define ServerConfigDir $(LIBDIR)/xserver
+#endif
+#ifndef XPrintDir
+#define XPrintDir ServerConfigDir
+#endif
+#ifndef EtcX11Directory
+#define EtcX11Directory /etc/X11
+#endif
+#ifndef InstallSecurityConfig
+#define InstallSecurityConfig YES /* Install sample security policy */
+#endif
+#ifndef XFileSearchPathBase
+/* avoid SCCS keyword */
+#define XFileSearchPathBase Concat4($(LIBDIR)/%L/%T/%N%C,%S:$(LIBDIR)/%l/%T/%N%C,%S:$(LIBDIR)/%T/%N%C,%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S)
+#endif
+#ifndef XFileSearchPathDefault
+#ifdef XAppLoadDir
+/* avoid SCCS keyword */
+#define XFileSearchPathDefault XAppLoadDir/Concat(%N%C,%S):XAppLoadDir/%N%S:XFileSearchPathBase
+#else
+#define XFileSearchPathDefault XFileSearchPathBase
+#endif
+#endif
+#ifndef XAppLoadDir
+#define XAppLoadDir $(LIBDIR)/app-defaults
+#endif
+#ifndef XtErrorPrefix
+#define XtErrorPrefix /* as empty string */
+#endif
+#ifndef XtExtraDefines
+#define XtExtraDefines /* as empty string */
+#endif
+#ifndef XtWarningPrefix
+#define XtWarningPrefix /* as empty string */
+#endif
+#ifndef OsNameDefines
+#define OsNameDefines /* as nothing */
+#endif
+#ifndef DefaultUserPath /* for xdm */
+#define DefaultUserPath :/bin:/usr/bin:$(BINDIR):/usr/ucb
+#endif
+#ifndef DefaultSystemPath /* for xdm */
+#define DefaultSystemPath /etc:/bin:/usr/bin:$(BINDIR):/usr/ucb
+#endif
+#ifndef DefaultSystemShell /* for xdm to set in SHELL */
+#define DefaultSystemShell BourneShell
+#endif
+#ifndef ContribDir
+#define ContribDir $(XTOP)/../contrib /* contrib is outside core tree */
+#endif
+#ifndef UnsupportedDir
+#define UnsupportedDir $(XTOP)/unsupported
+#endif
+#ifndef AllocateLocalDefines
+#define AllocateLocalDefines /**/
+#endif
+
+#ifndef ForceNormalLib
+#define ForceNormalLib (HasGcc && !HasGcc2)
+#endif
+
+#ifndef XkbComp
+#define XkbComp xkbcomp
+#endif
+
+#ifndef PsWrap
+# ifndef UseInstalled
+# define PsWrap $(PSWRAPSRC)/pswrap
+# else
+# define PsWrap pswrap
+# endif
+#endif
+
+#ifndef ResourceConfigurationManagement
+#define ResourceConfigurationManagement YES
+#endif
+
+#ifndef XtPopdownConformance
+#define XtPopdownConformance YES
+#endif
+
+XCOMM -----------------------------------------------------------------------
+XCOMM X Window System make variables; these need to be coordinated with rules
+
+/*
+ * This list must be reflected in the DIRS_TO_BUILD list in the top-level
+ * Makefile.
+ */
+ XTOP = XTop
+ BINDIR = BinDir /* programs */
+ BUILDINCROOT = BuildIncRoot /* base of build loc */
+ BUILDINCDIR = BuildIncDir /* built headers */
+ BUILDINCTOP = BuildIncTop /* top relative to BUILDINCDIR */
+ BUILDLIBDIR = BuildLibDir /* built libraries */
+ BUILDLIBTOP = BuildLibTop /* top relative to BUILDLIBDIR */
+ BUILDBINDIR = BuildBinDir /* built binaries */
+ BUILDBINTOP = BuildBinTop /* top relative to BUILDBINDIR */
+ BUILDMODULEDIR = BuildModuleDir /* built server modules */
+ BUILDI18NDIR = BuildI18NDir /* built i81n modules */
+ BUILDMODULETOP = BuildModuleTop /* top relative to BUILDMODULEDIR */
+ XBUILDINCROOT = XBuildIncRoot /* base of X build loc */
+ XBUILDINCDIR = XBuildIncDir
+ XBUILDINCTOP = XBuildIncTop
+ XBUILDBINDIR = XBuildBinDir
+ INCDIR = $(INCROOT) /* header files */
+ ADMDIR = AdmDir /* server log files */
+ LIBDIR = LibDir /* rgb, XErrorDB, etc. */
+ LIBEXECDIR = LibexecDir
+ MODULEDIR = ModuleDir
+ TOP_X_INCLUDES = TopXInclude
+ XBINDIR = XBinDir /* BINDIR for X11ProjectRoot */
+
+ INSTSRCDIR = InstSrcDir /* Installed source (kernel modules). */
+
+#ifdef EtcX11Directory
+ ETCX11DIR = EtcX11Directory
+#endif
+#if UseEtcX11
+ CONFDIR = $(ETCX11DIR)
+#elif HasVarDirectory
+ CONFDIR = $(VARDIR)
+#endif
+ DOCDIR = DocDir
+ DOCHTMLDIR = DocHtmlDir
+ DOCPSDIR = DocPsDir
+ DOCPDFDIR = DocPdfDir
+ FONTDIR = FontDir /* font directories */
+ ENCODINGSDIR = FontEncDir /* font encodings directory */
+ XINITDIR = XinitDir /* xinit config files */
+ XDMDIR = XdmDir /* xdm config files */
+ XDMVARDIR = XdmVarDir /* xdm config files */
+ TWMDIR = TwmDir /* twm config files */
+ XSMDIR = XsmDir /* xsm config files */
+ NLSDIR = NlsDir /* nls files */
+ XLOCALEDIR = XLocaleDir /* locale files */
+ LBXPROXYDIR = LbxproxyDir /* lbxproxy files */
+ PROXYMANAGERDIR = ProxyManagerDir /* proxy manager config files */
+ XPRINTDIR = XPrintDir /* print config file root */
+ XAPPLOADDIR = XAppLoadDir /* application default resource dir */
+ FONTCFLAGS = FontCompilerFlags
+
+ INSTAPPFLAGS = $(INSTDATFLAGS) /* XXX - this should go away - XXX */
+
+#if UseInstalledX11
+ RGB = $(XBINDIR)/rgb
+ FONTC = $(XBINDIR)/bdftopcf
+ MKFONTSCALE = $(XBINDIR)/mkfontscale
+ MKFONTDIR = $(XBINDIR)/mkfontdir
+ MKHTMLINDEX = $(XBINDIR)/mkhtmlindex
+ UCS2ANY = $(XBINDIR)/ProgramTargetName(ucs2any)
+ BDFTRUNCATE = $(XBINDIR)/bdftruncate
+ UCSMAPPREFIX = $(FONTDIR)/util/map-
+ XCURSORGEN = $(XBINDIR)/xcursorgen
+#else
+ RGB = $(CLIENTENVSETUP) $(XBUILDBINDIR)/rgb
+# if !CrossCompiling
+ FONTC = $(CLIENTENVSETUP) $(PRELOADFONTSETUP) $(XBUILDBINDIR)/bdftopcf
+ MKFONTSCALE = $(CLIENTENVSETUP) $(PRELOADFREETYPESETUP) $(XBUILDBINDIR)/mkfontscale
+ MKFONTDIR = $(MKFONTSCALE) -b -s -l
+ XCURSORGEN = $(CLIENTENVSETUP) $(PRELOADSETUP) $(XBUILDBINDIR)/xcursorgen
+ UCS2ANY = $(XBUILDBINDIR)/ProgramTargetName(ucs2any)
+# elif UseInstalledOnCrossCompile
+ MKFONTDIR = $(XBINDIR)/mkfontdir
+ MKFONTSCALE = $(XBINDIR)/mkfontscale
+ FONTC = $(XBINDIR)/bdftopcf
+ XCURSORGEN = $(XBINDIR)/xcursorgen
+ UCS2ANY = $(XBINDIR)/ucs2any
+# endif
+# if HasPerl
+ MKHTMLINDEX = RunPerlScript($(CONFIGSRC)/util/mkhtmlindex.pl,)
+# else
+ MKHTMLINDEX = $(SHELL) $(CONFIGSRC)/util/mkhtmlindex.sh
+# endif
+ BDFTRUNCATE = $(FONTSRC)/util/bdftruncate.pl
+ UCSMAPPREFIX = $(FONTSRC)/util/map-
+#endif
+
+ HTMLINDEXCMD = HtmlIndexCmd
+
+ DOCUTILSRC = $(XTOP)/doc/util
+ CLIENTSRC = $(TOP)/clients
+ DEMOSRC = $(TOP)/demos
+ XDOCMACROS = $(DOCUTILSRC)/macros.t
+ XIDXMACROS = $(DOCUTILSRC)/indexmacros.t
+ PROGRAMSRC = $(TOP)/programs
+ LIBSRC = $(XTOP)/lib
+ FONTSRC = $(XTOP)/fonts
+ ENCODINGSSRC = $(FONTSRC)/encodings
+ INCLUDESRC = BuildIncDir
+ XINCLUDESRC = $(INCLUDESRC)/X11
+ SERVERSRC = $(XTOP)/programs/Xserver
+ CONTRIBSRC = ContribDir
+ UNSUPPORTEDSRC = UnsupportedDir
+ DOCSRC = $(XTOP)/doc
+ RGBSRC = $(XTOP)/programs/rgb
+ BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf
+ MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir
+ FONTSERVERSRC = $(PROGRAMSRC)/xfs
+ FONTINCSRC = $(XTOP)/include/fonts
+ EXTINCSRC = $(XTOP)/include/extensions
+ FTSOURCEDIR = FreeTypeSrcDir
+ DRMSRCDIR = DRMSrcDir
+ MESASRCDIR = MesaSrcDir
+ OGLSAMPLESRCDIR = OglSampleSrcDir
+ PSWRAPSRC = $(XTOP)/config/pswrap
+ TRANSCOMMSRC = $(LIBSRC)/xtrans
+ TRANS_INCLUDES = -I$(TRANSCOMMSRC)
+ CONNECTION_FLAGS = ConnectionFlags ExtraConnectionDefs
+XTRANS_FAILDEFINES = XtransFailDefine
+#ifdef X11ProjectRoot
+ XPROJECTROOT = X11ProjectRoot
+#endif
+ VENDORMANNAME = XVendorManNameString
+ VENDORMANVERSION = XVendorManVersionString
+ XORGMANDEFS = XOrgManDefs
+ VENDORMANDEFS = VendorManDefs
+ VENDORNAME = XVendorNameString
+ VENDORNAMESHORT = XVendorNameStringShort
+
+#if defined (XVendorWebSupport)
+ VENDORWEBSUPPORT = XVendorWebSupport
+#endif
+VENDORSUPPORTDEFS = VendorSupportDefines
+
+ XKBDEFRULES = XkbDefaultRulesFile
+ XKBDEFRULESDEFS = XkbDefRulesDefines
+
+ XCONFIGFILE = XConfigFile
+ XCONFIGDIR = XConfigDir
+ XLOGFILE = XLogFile
+ XSERVERNAME = XServerName
+
+#if HasSharedLibraries
+#ifndef DontUseLibPathVar
+#ifndef BuildLibPathVar
+#define BuildLibPathVar LD_LIBRARY_PATH
+#endif
+#endif
+#endif
+#ifdef BuildLibPathVar
+# ifdef SystemBuildLibPath
+ SYSTEMENVLIBDIR = SystemBuildLibPath
+# endif
+#define XlocaleClientSetup Concat3(XLOCALEDIR,=,BuildI18NDir)
+ XENVLIBDIR = X11BuildLibPath
+ CLIENTENVSETUP = Concat3(BuildLibPathVar,=,BuildLibPath) XlocaleClientSetup
+#else
+ CLIENTENVSETUP =
+#endif
+
+#ifdef PreloadSetup
+ PRELOADSETUP = PreloadSetup
+#endif
+#ifdef PreloadFontSetup
+ PRELOADFONTSETUP = PreloadFontSetup
+#endif
+#ifdef PreloadFreetypeSetup
+ PRELOADFREETYPESETUP = PreloadFreetypeSetup
+#endif
+#ifdef PreloadXFTSetup
+ PRELOADXFTSETUP = PreloadXFTSetup
+#endif
+
+#ifndef ShLibIncludeFile
+/* need this to make ANSI-style preprocessors happy */
+#define ShLibIncludeFile <noop.rules>
+#endif
+
+#include ShLibIncludeFile
+
+#ifndef XBuildLibDir
+# define XBuildLibDir BuildLibDir
+#endif
+
+#ifndef NeedLibInsideFlag
+#define NeedLibInsideFlag NO
+#endif
+
+#ifndef SharedLibX11
+#define SharedLibX11 HasSharedLibraries
+#endif
+#ifndef NormalLibX11
+#define NormalLibX11 (!SharedLibX11 | ForceNormalLib)
+#endif
+#ifndef DebugLibX11
+#define DebugLibX11 NO /* debugged X library */
+#endif
+#ifndef ProfileLibX11
+#define ProfileLibX11 NO /* profiled X library */
+#endif
+ XLIBSRC = $(LIBSRC)/X11
+#if SharedLibX11
+#ifndef SharedX11Rev
+#define SharedX11Rev 6.2
+#endif
+SharedLibReferences(XONLY,X11,$(XLIBSRC),SOXLIBREV,SharedX11Rev)
+#else
+ProjectUnsharedLibReferences(XONLY,X11,$(XLIBSRC),XBuildLibDir)
+#endif
+ /* Common alternate spellings */
+ DEPXLIBONLY = $(DEPXONLYLIB)
+ XLIBONLY = $(XONLYLIB)
+ LINTXONLYLIB = $(LINTXONLY)
+
+#if BuildScreenSaverLibrary
+#ifndef SharedLibXss
+#define SharedLibXss HasSharedLibraries
+#endif
+#ifndef NormalLibXss
+#define NormalLibXss (!SharedLibXss || ForceNormalLib)
+#endif
+#ifndef DebugLibXss
+#define DebugLibXss NO
+#endif
+#ifndef ProfileLibXss
+#define ProfileLibXss NO
+#endif
+#else
+#undef SharedLibXss
+#define SharedLibXss NO
+#undef NormalLibXss
+#define NormalLibXss NO
+#undef DebugLibXss
+#define DebugLibXss NO
+#undef ProfileLibXss
+#define ProfileLibXss NO
+#endif
+
+#if BuildXF86MiscLibrary
+#ifndef SharedLibXxf86misc
+#define SharedLibXxf86misc HasSharedLibraries
+#endif
+#ifndef NormalLibXxf86misc
+#define NormalLibXxf86misc (!SharedLibXxf86misc || ForceNormalLib)
+#endif
+#ifndef DebugLibXxf86misc
+#define DebugLibXxf86misc NO
+#endif
+#ifndef ProfileLibXxf86misc
+#define ProfileLibXxf86misc NO
+#endif
+#else
+#undef SharedLibXxf86misc
+#define SharedLibXxf86misc NO
+#undef NormalLibXxf86misc
+#define NormalLibXxf86misc NO
+#undef DebugLibXxf86misc
+#define DebugLibXxf86misc NO
+#undef ProfileLibXxf86misc
+#define ProfileLibXxf86misc NO
+#endif
+
+#if BuildXF86VidModeLibrary
+#ifndef SharedLibXxf86vm
+#define SharedLibXxf86vm HasSharedLibraries
+#endif
+#ifndef NormalLibXxf86vm
+#define NormalLibXxf86vm (!SharedLibXxf86vm || ForceNormalLib)
+#endif
+#ifndef DebugLibXxf86vm
+#define DebugLibXxf86vm NO
+#endif
+#ifndef ProfileLibXxf86vm
+#define ProfileLibXxf86vm NO
+#endif
+#else
+#undef SharedLibXxf86vm
+#define SharedLibXxf86vm NO
+#undef NormalLibXxf86vm
+#define NormalLibXxf86vm NO
+#undef DebugLibXxf86vm
+#define DebugLibXxf86vm NO
+#undef ProfileLibXxf86vm
+#define ProfileLibXxf86vm NO
+#endif
+
+#if BuildXF86DGALibrary
+#ifndef SharedLibXxf86dga
+#define SharedLibXxf86dga HasSharedLibraries
+#endif
+#ifndef NormalLibXxf86dga
+#define NormalLibXxf86dga (!SharedLibXxf86dga || ForceNormalLib)
+#endif
+#ifndef DebugLibXxf86dga
+#define DebugLibXxf86dga NO
+#endif
+#ifndef ProfileLibXxf86dga
+#define ProfileLibXxf86dga NO
+#endif
+#else
+#undef SharedLibXxf86dga
+#define SharedLibXxf86dga NO
+#undef NormalLibXxf86dga
+#define NormalLibXxf86dga NO
+#undef DebugLibXxf86dga
+#define DebugLibXxf86dga NO
+#undef ProfileLibXxf86dga
+#define ProfileLibXxf86dga NO
+#endif
+
+#if BuildXF86RushLibrary
+#ifndef SharedLibXxf86rush
+#define SharedLibXxf86rush HasSharedLibraries
+#endif
+#ifndef NormalLibXxf86rush
+#define NormalLibXxf86rush (!SharedLibXxf86rush || ForceNormalLib)
+#endif
+#ifndef DebugLibXxf86rush
+#define DebugLibXxf86rush NO
+#endif
+#ifndef ProfileLibXxf86rush
+#define ProfileLibXxf86rush NO
+#endif
+#else
+#undef SharedLibXxf86rush
+#define SharedLibXxf86rush NO
+#undef NormalLibXxf86rush
+#define NormalLibXxf86rush NO
+#undef DebugLibXxf86rush
+#define DebugLibXxf86rush NO
+#undef ProfileLibXxf86rush
+#define ProfileLibXxf86rush NO
+#endif
+
+#if BuildXvLibrary
+#ifndef SharedLibXv
+#define SharedLibXv HasSharedLibraries
+#endif
+#ifndef NormalLibXv
+#define NormalLibXv (!SharedLibXv || ForceNormalLib)
+#endif
+#ifndef DebugLibXv
+#define DebugLibXv NO
+#endif
+#ifndef ProfileLibXv
+#define ProfileLibXv NO
+#endif
+#else
+#undef SharedLibXv
+#define SharedLibXv NO
+#undef NormalLibXv
+#define NormalLibXv NO
+#undef DebugLibXv
+#define DebugLibXv NO
+#undef ProfileLibXv
+#define ProfileLibXv NO
+#endif
+
+#if BuildXvMCLibrary
+#ifndef SharedLibXvMC
+#define SharedLibXvMC HasSharedLibraries
+#endif
+#ifndef NormalLibXvMC
+#define NormalLibXvMC (!SharedLibXvMC || ForceNormalLib)
+#endif
+#ifndef DebugLibXvMC
+#define DebugLibXvMC NO
+#endif
+#ifndef ProfileLibXvMC
+#define ProfileLibXvMC NO
+#endif
+#else
+#undef SharedLibXvMC
+#define SharedLibXvMC NO
+#undef NormalLibXvMC
+#define NormalLibXvMC NO
+#undef DebugLibXvMC
+#define DebugLibXvMC NO
+#undef ProfileLibXvMC
+#define ProfileLibXvMC NO
+#endif
+
+#if BuildXineramaLibrary
+#ifndef SharedLibXinerama
+#define SharedLibXinerama HasSharedLibraries
+#endif
+#ifndef NormalLibXinerama
+#define NormalLibXinerama (!SharedLibXinerama || ForceNormalLib)
+#endif
+#ifndef DebugLibXinerama
+#define DebugLibXinerama NO
+#endif
+#ifndef ProfileLibXinerama
+#define ProfileLibXinerama NO
+#endif
+#else
+#undef SharedLibXinerama
+#define SharedLibXinerama NO
+#undef NormalLibXinerama
+#define NormalLibXinerama NO
+#undef DebugLibXinerama
+#define DebugLibXinerama NO
+#undef ProfileLibXinerama
+#define ProfileLibXinerama NO
+#endif
+
+#if BuildXResLibrary
+#ifndef SharedLibXRes
+#define SharedLibXRes HasSharedLibraries
+#endif
+#ifndef NormalLibXRes
+#define NormalLibXRes (!SharedLibXRes || ForceNormalLib)
+#endif
+#ifndef DebugLibXRes
+#define DebugLibXRes NO
+#endif
+#ifndef ProfileLibXRes
+#define ProfileLibXRes NO
+#endif
+#else
+#undef SharedLibXRes
+#define SharedLibXRes NO
+#undef NormalLibXRes
+#define NormalLibXRes NO
+#undef DebugLibXRes
+#define DebugLibXRes NO
+#undef ProfileLibXRes
+#define ProfileLibXRes NO
+#endif
+
+#if BuildDPSLibrary
+#ifndef SharedLibDps
+#define SharedLibDps HasSharedLibraries
+#endif
+#ifndef NormalLibDps
+#define NormalLibDps (!SharedLibDps || ForceNormalLib)
+#endif
+#ifndef DebugLibDps
+#define DebugLibDps NO
+#endif
+#ifndef ProfileLibDps
+#define ProfileLibDps NO
+#endif
+#else
+#undef SharedLibDps
+#define SharedLibDps NO
+#undef NormalLibDps
+#define NormalLibDps NO
+#undef DebugLibDps
+#define DebugLibDps NO
+#undef ProfileLibDps
+#define ProfileLibDps NO
+#endif
+
+#if BuildDPSTkLibrary
+#ifndef SharedLibDpsTk
+#define SharedLibDpsTk HasSharedLibraries
+#endif
+#ifndef NormalLibDpsTk
+#define NormalLibDpsTk (!SharedLibDpsTk || ForceNormalLib)
+#endif
+#ifndef DebugLibDpsTk
+#define DebugLibDpsTk NO
+#endif
+#ifndef ProfileLibDpsTk
+#define ProfileLibDpsTk NO
+#endif
+#else
+#undef SharedLibDpsTk
+#define SharedLibDpsTk NO
+#undef NormalLibDpsTk
+#define NormalLibDpsTk NO
+#undef DebugLibDpsTk
+#define DebugLibDpsTk NO
+#undef ProfileLibDpsTk
+#define ProfileLibDpsTk NO
+#endif
+
+#if BuildPSResLibrary
+#ifndef SharedLibPSRes
+#define SharedLibPSRes HasSharedLibraries
+#endif
+#ifndef NormalLibPSRes
+#define NormalLibPSRes (!SharedLibPSRes || ForceNormalLib)
+#endif
+#ifndef DebugLibPSRes
+#define DebugLibPSRes NO
+#endif
+#ifndef ProfileLibPSRes
+#define ProfileLibPSRes NO
+#endif
+#else
+#undef SharedLibPSRes
+#define SharedLibPSRes NO
+#undef NormalLibPSRes
+#define NormalLibPSRes NO
+#undef DebugLibPSRes
+#define DebugLibPSRes NO
+#undef ProfileLibPSRes
+#define ProfileLibPSRes NO
+#endif
+
+#if BuildRenderLibrary
+#ifndef SharedLibXrender
+#define SharedLibXrender HasSharedLibraries
+#endif
+#ifndef NormalLibXrender
+#define NormalLibXrender (!SharedLibXrender || ForceNormalLib)
+#endif
+#ifndef DebugLibXrender
+#define DebugLibXrender NO
+#endif
+#ifndef ProfileLibXrender
+#define ProfileLibXrender NO
+#endif
+#else
+#undef SharedLibXrender
+#define SharedLibXrender NO
+#undef NormalLibXrender
+#define NormalLibXrender NO
+#undef DebugLibXrender
+#define DebugLibXrender NO
+#undef ProfileLibXrender
+#define ProfileLibXrender NO
+#endif
+
+#if BuildRandRLibrary
+# ifndef SharedLibXrandr
+# define SharedLibXrandr HasSharedLibraries
+# endif
+# ifndef NormalLibXrandr
+# define NormalLibXrandr (!SharedLibXrandr || ForceNormalLib)
+# endif
+# ifndef DebugLibXrandr
+# define DebugLibXrandr NO
+# endif
+# ifndef ProfileLibXrandr
+# define ProfileLibXrandr NO
+# endif
+#else
+# undef SharedLibXrandr
+# define SharedLibXrandr NO
+# undef NormalLibXrandr
+# define NormalLibXrandr NO
+# undef DebugLibXrandr
+# define DebugLibXrandr NO
+# undef ProfileLibXrandr
+# define ProfileLibXrandr NO
+#endif
+
+#if BuildXfixesLibrary
+#ifndef SharedLibXfixes
+#define SharedLibXfixes HasSharedLibraries
+#endif
+#ifndef NormalLibXfixes
+#define NormalLibXfixes (!SharedLibXfixes || ForceNormalLib)
+#endif
+#ifndef DebugLibXfixes
+#define DebugLibXfixes NO
+#endif
+#ifndef ProfileLibXfixes
+#define ProfileLibXfixes NO
+#endif
+#else
+#undef SharedLibXfixes
+#define SharedLibXfixes NO
+#undef NormalLibXfixes
+#define NormalLibXfixes NO
+#undef DebugLibXfixes
+#define DebugLibXfixes NO
+#undef ProfileLibXfixes
+#define ProfileLibXfixes NO
+#endif
+
+#if BuildDamageLibrary
+#ifndef SharedLibXdamage
+#define SharedLibXdamage HasSharedLibraries
+#endif
+#ifndef NormalLibXdamage
+#define NormalLibXdamage (!SharedLibXdamage || ForceNormalLib)
+#endif
+#ifndef DebugLibXdamage
+#define DebugLibXdamage NO
+#endif
+#ifndef ProfileLibXdamage
+#define ProfileLibXdamage NO
+#endif
+#else
+#undef SharedLibXdamage
+#define SharedLibXdamage NO
+#undef NormalLibXdamage
+#define NormalLibXdamage NO
+#undef DebugLibXdamage
+#define DebugLibXdamage NO
+#undef ProfileLibXdamage
+#define ProfileLibXdamage NO
+#endif
+
+#if BuildCompositeLibrary
+#ifndef SharedLibXcomposite
+#define SharedLibXcomposite HasSharedLibraries
+#endif
+#ifndef NormalLibXcomposite
+#define NormalLibXcomposite (!SharedLibXcomposite || ForceNormalLib)
+#endif
+#ifndef DebugLibXcomposite
+#define DebugLibXcomposite NO
+#endif
+#ifndef ProfileLibXcomposite
+#define ProfileLibXcomposite NO
+#endif
+#else
+#undef SharedLibXcomposite
+#define SharedLibXcomposite NO
+#undef NormalLibXcomposite
+#define NormalLibXcomposite NO
+#undef DebugLibXcomposite
+#define DebugLibXcomposite NO
+#undef ProfileLibXcomposite
+#define ProfileLibXcomposite NO
+#endif
+
+#if BuildXevieLibrary
+#ifndef SharedLibXevie
+#define SharedLibXevie HasSharedLibraries
+#endif
+#ifndef NormalLibXevie
+#define NormalLibXevie (!SharedLibXevie || ForceNormalLib)
+#endif
+#ifndef DebugLibXevie
+#define DebugLibXevie NO
+#endif
+#ifndef ProfileLibXevie
+#define ProfileLibXevie NO
+#endif
+#else
+#undef SharedLibXevie
+#define SharedLibXevie NO
+#undef NormalLibXevie
+#define NormalLibXevie NO
+#undef DebugLibXevie
+#define DebugLibXevie NO
+#undef ProfileLibXevie
+#define ProfileLibXevie NO
+#endif
+
+#if BuildXcursorLibrary
+#ifndef SharedLibXcursor
+#define SharedLibXcursor HasSharedLibraries
+#endif
+#ifndef NormalLibXcursor
+#define NormalLibXcursor (!SharedLibXcursor || ForceNormalLib)
+#endif
+#ifndef DebugLibXcursor
+#define DebugLibXcursor NO
+#endif
+#ifndef ProfileLibXcursor
+#define ProfileLibXcursor NO
+#endif
+#else
+#undef SharedLibXcursor
+#define SharedLibXcursor NO
+#undef NormalLibXcursor
+#define NormalLibXcursor NO
+#undef DebugLibXcursor
+#define DebugLibXcursor NO
+#undef ProfileLibXcursor
+#define ProfileLibXcursor NO
+#endif
+
+#if BuildAppleWMLibrary
+#ifndef SharedLibAppleWM
+#define SharedLibAppleWM HasSharedLibraries
+#endif
+#ifndef NormalLibAppleWM
+#define NormalLibAppleWM (!SharedLibAppleWM || ForceNormalLib)
+#endif
+#ifndef DebugLibAppleWM
+#define DebugLibAppleWM NO
+#endif
+#ifndef ProfileLibAppleWM
+#define ProfileLibAppleWM NO
+#endif
+#else
+#undef SharedLibAppleWM
+#define SharedLibAppleWM NO
+#undef NormalLibAppleWM
+#define NormalLibAppleWM NO
+#undef DebugLibAppleWM
+#define DebugLibAppleWM NO
+#undef ProfileLibAppleWM
+#define ProfileLibAppleWM NO
+#endif
+
+#if BuildWindowsWMLibrary
+#ifndef SharedLibWindowsWM
+#define SharedLibWindowsWM HasSharedLibraries
+#endif
+#ifndef NormalLibWindowsWM
+#define NormalLibWindowsWM (!SharedLibWindowsWM || ForceNormalLib)
+#endif
+#ifndef DebugLibWindowsWM
+#define DebugLibWindowsWM NO
+#endif
+#ifndef ProfileLibWindowsWM
+#define ProfileLibWindowsWM NO
+#endif
+#else
+#undef SharedLibWindowsWM
+#define SharedLibWindowsWM NO
+#undef NormalLibWindowsWM
+#define NormalLibWindowsWM NO
+#undef DebugLibWindowsWM
+#define DebugLibWindowsWM NO
+#undef ProfileLibWindowsWM
+#define ProfileLibWindowsWM NO
+#endif
+
+#if BuildGLULibrary
+#ifndef SharedLibGlu
+#define SharedLibGlu HasSharedLibraries
+#endif
+#ifndef NormalLibGlu
+#define NormalLibGlu (!SharedLibX11 | ForceNormalLib)
+#endif
+#ifndef DebugLibGlu
+#define DebugLibGlu NO
+#endif
+#ifndef ProfileLibGlu
+#define ProfileLibGlu NO
+#endif
+#else
+#undef SharedLibGlu
+#define SharedLibGlu NO
+#undef NormalLibGlu
+#define NormalLibGlu NO
+#undef DebugLibGlu
+#define DebugLibGlu NO
+#undef ProfileLibGlu
+#define ProfileLibGlu NO
+#endif
+
+#if BuildGLXLibrary
+#ifndef SharedLibGlx
+#define SharedLibGlx HasSharedLibraries
+#endif
+#ifndef NormalLibGlx
+#define NormalLibGlx (!SharedLibX11 | ForceNormalLib)
+#endif
+#ifndef DebugLibGlx
+#define DebugLibGlx NO
+#endif
+#ifndef ProfileLibGlx
+#define ProfileLibGlx NO
+#endif
+#ifndef BuildLibGlxWithoutPIC
+#define BuildLibGlxWithoutPIC NO
+#endif
+#if BuildLibGlxWithoutPIC && SharedLibGlx
+#define SharedLibGlxWithoutPIC YES
+#else
+#define SharedLibGlxWithoutPIC NO
+#endif
+#ifndef LinkGLToUsrLib
+#define LinkGLToUsrLib NO
+#endif
+#if NothingOutsideProjectRoot
+#undef LinkGLToUsrLib
+#define LinkGLToUsrLib NO
+#endif
+#ifndef LinkGLToUsrInclude
+#define LinkGLToUsrInclude NO
+#endif
+#if NothingOutsideProjectRoot
+#undef LinkGLToUsrInclude
+#define LinkGLToUsrInclude NO
+#endif
+#else
+#undef SharedLibGlx
+#define SharedLibGlx NO
+#undef NormalLibGlx
+#define NormalLibGlx NO
+#undef DebugLibGlx
+#define DebugLibGlx NO
+#undef ProfileLibGlx
+#define ProfileLibGlx NO
+#endif
+/*
+ * Only make a shared GLw library on systems with Weak symbols
+ * because it depends on Motif. See xc/lib/GLw/README.txt for details
+ */
+#if BuildGLwLibrary
+#ifndef SharedLibGLw
+#define SharedLibGLw HasSharedLibraries && HasWeakSymbols
+#endif
+#ifndef NormalLibGLw
+#define NormalLibGLw (!SharedLibGLw || ForceNormalLib)
+#endif
+#ifndef DebugLibGLw
+#define DebugLibGLw NO /* debugged widget library */
+#endif
+#ifndef ProfileLibGLw
+#define ProfileLibGLw NO /* profiled widget library */
+#endif
+#ifndef GLwUseXmStubs
+ /* create stub (weak) Motif symbols */
+#define GLwUseXmStubs SharedLibGLw && HasWeakSymbols
+#endif
+#else
+#undef SharedLibGLw
+#define SharedLibGLw NO
+#undef NormalLibGLw
+#define NormalLibGLw NO
+#undef DebugLibGLw
+#define DebugLibGLw NO
+#undef ProfileLibGLw
+#define ProfileLibGLw NO
+#endif
+
+#ifndef SharedLibXext
+#define SharedLibXext HasSharedLibraries
+#endif
+#ifndef NormalLibXext
+#define NormalLibXext (!SharedLibXext | ForceNormalLib)
+#endif
+#ifndef DebugLibXext
+#define DebugLibXext NO /* debugged Xext library */
+#endif
+#ifndef ProfileLibXext
+#define ProfileLibXext NO /* profiled Xext library */
+#endif
+ XEXTLIBSRC = $(LIBSRC)/Xext
+#if SharedLibXext
+#ifndef SharedXextRev
+#define SharedXextRev 6.4
+#endif
+SharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),SOXEXTREV,SharedXextRev)
+#else
+ProjectUnsharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),XBuildLibDir)
+#endif
+LINTEXTENSIONLIB = $(LINTEXTENSION)
+ DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB)
+ XLIB = $(EXTENSIONLIB) $(XONLYLIB)
+ LINTXLIB = $(LINTXONLYLIB)
+
+ XSSLIBSRC = $(LIBSRC)/Xss
+#if SharedLibXss
+#ifndef SharedXssRev
+#define SharedXssRev 1.0
+#endif
+SharedLibReferences(XSS,Xss,$(XSSLIBSRC),SOXSSREV,SharedXssRev)
+#else
+ProjectUnsharedLibReferences(XSS,Xss,$(XSSLIBSRC),XBuildLibDir)
+#endif
+
+ XXF86MISCLIBSRC = $(LIBSRC)/Xxf86misc
+#if SharedLibXxf86misc
+#ifndef SharedXxf86miscRev
+#define SharedXxf86miscRev 1.1
+#endif
+SharedLibReferences(XXF86MISC,Xxf86misc,$(XXF86MISCLIBSRC),SOXXF86MISCREV,SharedXxf86miscRev)
+#else
+ProjectUnsharedLibReferences(XXF86MISC,Xxf86misc,$(XXF86MISCLIBSRC),XBuildLibDir)
+#endif
+
+ XXF86VMLIBSRC = $(LIBSRC)/Xxf86vm
+#if SharedLibXxf86vm
+#ifndef SharedXxf86vmRev
+#define SharedXxf86vmRev 1.0
+#endif
+SharedLibReferences(XXF86VM,Xxf86vm,$(XXF86VMLIBSRC),SOXXF86VMREV,SharedXxf86vmRev)
+#else
+ProjectUnsharedLibReferences(XXF86VM,Xxf86vm,$(XXF86VMLIBSRC),XBuildLibDir)
+#endif
+
+ XXF86DGALIBSRC = $(LIBSRC)/Xxf86dga
+#if SharedLibXxf86dga
+#ifndef SharedXxf86dgaRev
+#define SharedXxf86dgaRev 1.0
+#endif
+SharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),SOXXF86DGAREV,SharedXxf86dgaRev)
+#else
+ProjectUnsharedLibReferences(XXF86DGA,Xxf86dga,$(XXF86DGALIBSRC),XBuildLibDir)
+#endif
+
+#if BuildDmxLibrary
+#ifndef SharedLibDmx
+#define SharedLibDmx NO
+#endif
+#ifndef NormalLibDmx
+#define NormalLibDmx YES
+#endif
+#ifndef DebugLibDmx
+#define DebugLibDmx NO
+#endif
+#ifndef ProfileLibDmx
+#define ProfileLibDmx NO
+#endif
+#else /* BuildDmxLibrary */
+#undef SharedLibDmx
+#define SharedLibDmx NO
+#undef NormalLibDmx
+#define NormalLibDmx NO
+#undef DebugLibDmx
+#define DebugLibDmx NO
+#undef ProfileLibDmx
+#define ProfileLibDmx NO
+#endif /* BuildDmxLibrary */
+
+ XXF86RUSHLIBSRC = $(LIBSRC)/Xxf86rush
+#if SharedLibXxf86rush
+#ifndef SharedXxf86rushRev
+#define SharedXxf86rushRev 1.0
+#endif
+SharedLibReferences(XXF86RUSH,Xxf86rush,$(XXF86RUSHLIBSRC),SOXXF86RUSHREV,SharedXxf86rushRev)
+#else
+ProjectUnsharedLibReferences(XXF86RUSH,Xxf86rush,$(XXF86RUSHLIBSRC),XBuildLibDir)
+#endif
+
+
+ XVLIBSRC = $(LIBSRC)/Xv
+#if SharedLibXv
+#ifndef SharedXvRev
+#define SharedXvRev 1.0
+#endif
+SharedLibReferences(XV,Xv,$(XVLIBSRC),SOXVREV,SharedXvRev)
+#else
+ProjectUnsharedLibReferences(XV,Xv,$(XVLIBSRC),XBuildLibDir)
+#endif
+
+
+ XVMCLIBSRC = $(LIBSRC)/XvMC
+#if SharedLibXvMC
+#ifndef SharedXvMCRev
+#define SharedXvMCRev 1.0
+#endif
+SharedLibReferences(XVMC,XvMC,$(XVMCLIBSRC),SOXVMCREV,SharedXvMCRev)
+#else
+ProjectUnsharedLibReferences(XVMC,XvMC,$(XVMCLIBSRC),XBuildLibDir)
+#endif
+
+ XINERAMALIBSRC = $(LIBSRC)/Xinerama
+#if SharedLibXinerama
+#ifndef SharedXineramaRev
+#define SharedXineramaRev 1.0
+#endif
+SharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),SOXINERAMAREV,SharedXineramaRev)
+#else
+ProjectUnsharedLibReferences(XINERAMA,Xinerama,$(XINERAMALIBSRC),XBuildLibDir)
+#endif
+
+ XRESLIBSRC = $(LIBSRC)/XRes
+#if SharedLibXRes
+#ifndef SharedXResRev
+#define SharedXResRev 1.0
+#endif
+SharedLibReferences(XRES,XRes,$(XRESLIBSRC),SOXRESREV,SharedXResRev)
+#else
+ProjectUnsharedLibReferences(XRES,XRes,$(XRESLIBSRC),XBuildLibDir)
+#endif
+
+ DMXLIBSRC = $(LIBSRC)/dmx
+#if SharedLibDmx
+#ifndef SharedDmxRev
+#define SharedDmxRev 1.0
+#endif
+SharedLibReferences(DMX,dmx,$(DMXLIBSRC),SODMXREV,SharedDmxRev)
+#else
+ProjectUnsharedLibReferences(DMX,dmx,$(DMXLIBSRC),XBuildLibDir)
+#endif
+
+ DPSLIBSRC = $(LIBSRC)/dps
+#if SharedLibDps
+#ifndef SharedDpsRev
+#define SharedDpsRev 1.0
+#endif
+SharedLibReferences(DPS,dps,$(DPSLIBSRC),SODPSREV,SharedDpsRev)
+#else
+ProjectUnsharedLibReferences(DPS,dps,$(DPSLIBSRC),XBuildLibDir)
+#endif
+
+ DPSTKLIBSRC = $(LIBSRC)/dpstk
+#if SharedLibDpsTk
+#ifndef SharedDpsTkRev
+#define SharedDpsTkRev 1.0
+#endif
+SharedLibReferences(DPSTK,dpstk,$(DPSTKLIBSRC),SODPSTKREV,SharedDpsTkRev)
+#else
+ProjectUnsharedLibReferences(DPSTK,dpstk,$(DPSTKLIBSRC),XBuildLibDir)
+#endif
+
+ PSRESLIBSRC = $(LIBSRC)/psres
+#if SharedLibPSRes
+#ifndef SharedPSResRev
+#define SharedPSResRev 1.0
+#endif
+SharedLibReferences(PSRES,psres,$(PSRESLIBSRC),SOPSRESREV,SharedPSResRev)
+#else
+ProjectUnsharedLibReferences(PSRES,psres,$(PSRESLIBSRC),XBuildLibDir)
+#endif
+
+ GLULIBSRC = $(LIBSRC)/GLU
+#if SharedLibGlu
+#ifndef SharedGluRev
+#define SharedGluRev 1.3
+#endif
+SharedLibReferences(GLU,GLU,$(GLULIBSRC),SOGLUREV,SharedGluRev)
+#else
+ProjectUnsharedLibReferences(GLU,GLU,$(GLULIBSRC),XBuildLibDir)
+#endif
+
+ GLXLIBSRC = $(LIBSRC)/GL
+#if SharedLibGlx
+#ifndef SharedGlxRev
+#define SharedGlxRev 1.2
+#endif
+SharedLibReferences(GLX,GL,$(GLXLIBSRC),SOGLREV,SharedGlxRev)
+#else
+ProjectUnsharedLibReferences(GLX,GL,$(GLXLIBSRC),XBuildLibDir)
+#endif
+ GLWIDGETSRC = $(LIBSRC)/GLw
+#if SharedLibGLw
+#ifndef SharedGLwRev
+#define SharedGLwRev 1.0 /* used to name the shared library */
+#endif
+SharedDSLibReferences(GLW,GLw,$(GLWIDGETSRC),SOGLWREV,SharedGLwRev)
+#else
+ProjectUnsharedLibReferences(GLW,GLw,$(GLWIDGETSRC),XBuildLibDir)
+#endif
+
+ XRENDERLIBSRC = $(LIBSRC)/Xrender
+#if SharedLibXrender
+#ifndef SharedXrenderRev
+#define SharedXrenderRev 1.2.2
+#endif
+SharedLibReferences(XRENDER,Xrender,$(XRENDERLIBSRC),SOXRENDERREV,SharedXrenderRev)
+#else
+ProjectUnsharedLibReferences(XRENDER,Xrender,$(XRENDERLIBSRC),XBuildLibDir)
+#endif
+
+ XRANDRLIBSRC = $(LIBSRC)/Xrandr
+#if SharedLibXrandr
+#ifndef SharedXrandrRev
+#define SharedXrandrRev 2.0
+#endif
+SharedLibReferences(XRANDR,Xrandr,$(XRANDRLIBSRC),SOXRANDRREV,SharedXrandrRev)
+#else
+ProjectUnsharedLibReferences(XRANDR,Xrandr,$(XRANDRLIBSRC),XBuildLibDir)
+#endif
+
+ XFIXESLIBSRC = $(LIBSRC)/Xfixes
+#if SharedLibXfixes
+#ifndef SharedXfixesRev
+#define SharedXfixesRev 3.0
+#endif
+SharedLibReferences(XFIXES,Xfixes,$(XFIXESLIBSRC),SOXFIXESREV,SharedXfixesRev)
+#else
+ProjectUnsharedLibReferences(XFIXES,Xfixes,$(XFIXESLIBSRC),XBuildLibDir)
+#endif
+
+ XDAMAGELIBSRC = $(LIBSRC)/Xdamage
+#if SharedLibXdamage
+#ifndef SharedXdamageRev
+#define SharedXdamageRev 1.0
+#endif
+SharedLibReferences(XDAMAGE,Xdamage,$(XDAMAGELIBSRC),SOXDAMAGEREV,SharedXdamageRev)
+#else
+ProjectUnsharedLibReferences(XDAMAGE,Xdamage,$(XDAMAGELIBSRC),XBuildLibDir)
+#endif
+
+XCOMPOSITELIBSRC = $(LIBSRC)/Xcomposite
+#if SharedLibXcomposite
+#ifndef SharedXcompositeRev
+#define SharedXcompositeRev 1.0
+#endif
+SharedLibReferences(XCOMPOSITE,Xcomposite,$(XCOMPOSITELIBSRC),SOXCOMPOSITEREV,SharedXcompositeRev)
+#else
+ProjectUnsharedLibReferences(XCOMPOSITE,Xcomposite,$(XCOMPOSITELIBSRC),XBuildLibDir)
+#endif
+
+XEVIELIBSRC = $(LIBSRC)/Xevie
+#if SharedLibXevie
+#ifndef SharedXevieRev
+#define SharedXevieRev 1.0
+#endif
+SharedLibReferences(XEVIE,Xevie,$(XEVIELIBSRC),SOXEVIEREV,SharedXevieRev)
+#else
+ProjectUnsharedLibReferences(XEVIE,Xevie,$(XEVIELIBSRC),XBuildLibDir)
+#endif
+
+ XCURSORLIBSRC = $(LIBSRC)/Xcursor
+#if SharedLibXcursor
+#ifndef SharedXcursorRev
+#define SharedXcursorRev 1.0.2
+#endif
+SharedLibReferences(XCURSOR,Xcursor,$(XCURSORLIBSRC),SOXCURSORREV,SharedXcursorRev)
+#else
+ProjectUnsharedLibReferences(XCURSOR,Xcursor,$(XCURSORLIBSRC),XBuildLibDir)
+#endif
+
+ APPLEWMLIBSRC = $(LIBSRC)/apple
+#if SharedLibAppleWM
+#ifndef SharedAppleWMRev
+#define SharedAppleWMRev 1.0
+#endif
+SharedLibReferences(APPLEWM,AppleWM,$(APPLEWMLIBSRC),SOAPPLEWMREV,SharedAppleWMRev)
+#else
+ProjectUnsharedLibReferences(APPLEWM,AppleWM,$(APPLEWMLIBSRC),XBuildLibDir)
+#endif
+
+ WINDOWSWMLIBSRC = $(LIBSRC)/windows
+#if SharedLibWindowsWM
+#ifndef SharedWindowsWMRev
+#define SharedWindowsWMRev 1.0
+#endif
+SharedLibReferences(WINDOWSWM,WindowsWM,$(WINDOWSWMLIBSRC),SOWINDOWSWMREV,SharedWindowsWMRev)
+#else
+ProjectUnsharedLibReferences(WINDOWSWM,WindowsWM,$(WINDOWSWMLIBSRC),XBuildLibDir)
+#endif
+
+# ifndef SharedLibXfontcache
+# define SharedLibXfontcache HasSharedLibraries
+# endif
+# ifndef NormalLibXfontcache
+# define NormalLibXfontcache (!SharedLibXfontcache || ForceNormalLib)
+# endif
+# ifndef DebugLibXfontcache
+# define DebugLibXfontcache NO
+# endif
+# ifndef ProfileLibXfontcache
+# define ProfileLibXfontcache NO
+# endif
+
+ XFONTCACHELIBSRC = $(LIBSRC)/Xfontcache
+#if SharedLibXfontcache
+#ifndef SharedXfontcacheRev
+#define SharedXfontcacheRev 1.2
+#endif
+SharedLibReferences(XFONTCACHE,Xfontcache,$(XFONTCACHELIBSRC),SOXFONTCACHEREV,SharedXfontcacheRev)
+#else
+ProjectUnsharedLibReferences(XFONTCACHE,Xfontcache,$(XFONTCACHELIBSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibXau
+#define SharedLibXau YES
+#endif
+#ifndef NormalLibXau
+#define NormalLibXau (!SharedLibXau | ForceNormalLib)
+#endif
+#ifndef DebugLibXau
+#define DebugLibXau NO /* debugged auth library */
+#endif
+#ifndef ProfileLibXau
+#define ProfileLibXau NO /* profiled auth library */
+#endif
+ XAUTHSRC = $(LIBSRC)/Xau
+#if SharedLibXau
+#ifndef SharedXauRev
+#define SharedXauRev 6.0
+#endif
+SharedLibReferences(XAUTH,Xau,$(XAUTHSRC),SOXAUTHREV,SharedXauRev)
+#else
+#if !UseInstalledXauLib
+ProjectUnsharedLibReferences(XAUTH,Xau,$(XAUTHSRC),XBuildLibDir)
+#else
+ProjectUnsharedLibReferences(XAUTH,Xau,$(XAUTHSRC),$(USRLIBDIR))
+#endif
+#endif
+
+#ifndef SharedLibXdmcp
+#define SharedLibXdmcp YES
+#endif
+#ifndef NormalLibXdmcp
+#define NormalLibXdmcp (!SharedLibXdmcp | ForceNormalLib)
+#endif
+#ifndef DebugLibXdmcp
+#define DebugLibXdmcp NO /* debugged XDMCP library */
+#endif
+#ifndef ProfileLibXdmcp
+#define ProfileLibXdmcp NO /* profiled XDMCP library */
+#endif
+ XDMCPLIBSRC = $(LIBSRC)/Xdmcp
+#if SharedLibXdmcp
+#ifndef SharedXdmcpRev
+#define SharedXdmcpRev 6.0
+#endif
+SharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),SOXDMCPREV,SharedXdmcpRev)
+#else
+#if !UseInstalledXdmcpLib
+ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),XBuildLibDir)
+#else
+ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),$(USRLIBDIR))
+#endif
+#endif
+
+#ifndef SharedLibXmu
+#define SharedLibXmu HasSharedLibraries
+#endif
+#ifndef NormalLibXmu
+#define NormalLibXmu (!SharedLibXmu | ForceNormalLib)
+#endif
+#ifndef DebugLibXmu
+#define DebugLibXmu NO /* debugged Xmu library */
+#endif
+#ifndef ProfileLibXmu
+#define ProfileLibXmu NO /* profiled Xmu library */
+#endif
+ XMUSRC = $(LIBSRC)/Xmu
+#if SharedLibXmu
+#ifndef SharedXmuRev
+#define SharedXmuRev 6.2
+#endif
+SharedDSLibReferences(XMU,Xmu,$(XMUSRC),SOXMUREV,SharedXmuRev)
+#else
+ProjectUnsharedLibReferences(XMU,Xmu,$(XMUSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibXmuu
+#define SharedLibXmuu HasSharedLibraries
+#endif
+#ifndef NormalLibXmuu
+#define NormalLibXmuu (!SharedLibXmuu | ForceNormalLib)
+#endif
+#ifndef DebugLibXmuu
+#define DebugLibXmuu NO /* debugged Xmuu library */
+#endif
+#ifndef ProfileLibXmuu
+#define ProfileLibXmuu NO /* profiled Xmuu library */
+#endif
+ XMUUSRC = $(LIBSRC)/Xmuu
+#if SharedLibXmuu
+#ifndef SharedXmuuRev
+#define SharedXmuuRev 1.0
+#endif
+SharedLibReferences(XMUU,Xmuu,$(XMUUSRC),SOXMUUREV,SharedXmuuRev)
+#else
+ProjectUnsharedLibReferences(XMUU,Xmuu,$(XMUUSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedOldX
+#define SharedOldX HasSharedLibraries
+#endif
+#ifndef NormalOldX
+#define NormalOldX (!SharedOldX | ForceNormalLib)
+#endif
+#ifndef DebugOldX
+#define DebugOldX NO /* debugged old X library */
+#endif
+#ifndef ProfileOldX
+#define ProfileOldX NO /* profiled old X library */
+#endif
+ OLDXLIBSRC = $(LIBSRC)/oldX
+#if SharedOldX
+#ifndef SharedOldXRev
+#define SharedOldXRev 6.0
+#endif
+SharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),SOOLDXREV,SharedOldXRev)
+#else
+ProjectUnsharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibXp
+#define SharedLibXp HasSharedLibraries
+#endif
+#ifndef NormalLibXp
+#define NormalLibXp (!SharedLibXp | ForceNormalLib)
+#endif
+#ifndef DebugLibXp
+#define DebugLibXp NO /* debugged Xp library */
+#endif
+#ifndef ProfileLibXp
+#define ProfileLibXp NO /* profiled Xp library */
+#endif
+ XPLIBSRC = $(LIBSRC)/Xp
+#if SharedLibXp
+#ifndef SharedXpRev
+#define SharedXpRev 6.2
+#endif
+SharedLibReferences(XP,Xp,$(XPLIBSRC),SOXPREV,SharedXpRev)
+#else
+ProjectUnsharedLibReferences(XP,Xp,$(XPLIBSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibXt
+#define SharedLibXt HasSharedLibraries
+#endif
+#ifndef NormalLibXt
+#define NormalLibXt (!SharedLibXt | ForceNormalLib)
+#endif
+#ifndef DebugLibXt
+#define DebugLibXt NO /* debugged toolkit library */
+#endif
+#ifndef ProfileLibXt
+#define ProfileLibXt NO /* profiled toolkit library */
+#endif
+ TOOLKITSRC = $(LIBSRC)/Xt
+#if SharedLibXt
+#ifndef SharedXtRev
+#define SharedXtRev 6.0
+#endif
+SharedDSLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),SOXTREV,SharedXtRev)
+#else
+ProjectUnsharedLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),XBuildLibDir)
+#endif
+ DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB)
+ XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB)
+ LINTXTOOLLIB = $(LINTXTOOLONLYLIB)
+
+#ifndef SharedLibXa
+#define SharedLibXa (HasSharedLibraries & HasCplusplus)
+#endif
+#ifndef NormalLibXa
+/* #define NormalLibXa ((!SharedLibXa | ForceNormalLib) & HasCplusplus) */
+#define NormalLibXa YES /* needed for current tests, will correct later */
+#endif
+#ifndef DebugLibXa
+#define DebugLibXa NO /* debugged audio library */
+#endif
+#ifndef ProfileLibXa
+#define ProfileLibXa NO /* profiled audio library */
+#endif
+ XALIBSRC = $(LIBSRC)/Xa
+#if SharedLibXa
+#ifndef SharedXaRev
+#define SharedXaRev 1.0
+#endif
+SharedLibReferences(XA,Xa,$(XALIBSRC),SOXAREV,SharedXaRev)
+#else
+UnsharedLibReferences(XA,Xa,$(XALIBSRC))
+#endif
+
+#ifndef BuildXaw
+#define BuildXaw (BuildXprintLib && !BuildServersOnly)
+#endif
+
+ /* AWIDGETSRC is needed by libXaw6 and libXaw7 */
+ AWIDGETSRC = $(LIBSRC)/Xaw
+
+#if BuildXaw
+#ifndef SharedLibXaw
+#define SharedLibXaw HasSharedLibraries
+#endif
+#ifndef NormalLibXaw
+#define NormalLibXaw (!SharedLibXaw | ForceNormalLib)
+#endif
+#ifndef DebugLibXaw
+#define DebugLibXaw NO /* debugged widget library */
+#endif
+#ifndef ProfileLibXaw
+#define ProfileLibXaw NO /* profiled widget library */
+#endif
+#if SharedLibXaw
+#ifndef SharedXawRev
+#define SharedXawRev 8.0
+#endif
+SharedDSLibReferences(XAW,Xaw,$(AWIDGETSRC),SOXAWREV,SharedXawRev)
+#else
+ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGETSRC),XBuildLibDir)
+#endif
+#endif
+
+#ifndef BuildXaw7
+#define BuildXaw7 (HasSharedLibraries && !BuildServersOnly)
+#endif
+
+#if BuildXaw7
+#ifndef SharedLibXaw7
+#define SharedLibXaw7 HasSharedLibraries
+#endif
+#ifndef NormalLibXaw7
+#define NormalLibXaw7 NO
+#endif
+#ifndef DebugLibXaw7
+#define DebugLibXaw7 NO /* debugged widget library */
+#endif
+#ifndef ProfileLibXaw7
+#define ProfileLibXaw7 NO /* profiled widget library */
+#endif
+ AWIDGET7SRC = $(LIBSRC)/Xaw7
+#if SharedLibXaw7
+#ifndef SharedXaw7Rev
+#define SharedXaw7Rev 7.0
+#endif
+SharedDSLibReferences(XAW7,Xaw,$(AWIDGET7SRC),SOXAW7REV,SharedXaw7Rev)
+#if !BuildXaw
+SharedDSLibReferences(XAW,Xaw,$(AWIDGET7SRC),SOXAWREV,SharedXawRev)
+#endif
+#else
+ProjectUnsharedLibReferences(XAW7,Xaw,$(AWIDGET7SRC),XBuildLibDir)
+#if !BuildXaw
+ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGET7SRC),XBuildLibDir)
+#endif
+#endif
+#endif
+
+
+#ifndef BuildXaw6
+#define BuildXaw6 (HasSharedLibraries && !BuildServersOnly)
+#endif
+
+#if BuildXaw6
+#ifndef SharedLibXaw6
+#define SharedLibXaw6 HasSharedLibraries
+#endif
+#ifndef NormalLibXaw6
+#define NormalLibXaw6 NO
+#endif
+#ifndef DebugLibXaw6
+#define DebugLibXaw6 NO /* debugged widget library */
+#endif
+#ifndef ProfileLibXaw6
+#define ProfileLibXaw6 NO /* profiled widget library */
+#endif
+ AWIDGET6SRC = $(LIBSRC)/Xaw6
+#if SharedLibXaw6
+#ifndef SharedXaw6Rev
+#define SharedXaw6Rev 6.1
+#endif
+SharedDSLibReferences(XAW6,Xaw,$(AWIDGET6SRC),SOXAW6REV,SharedXaw6Rev)
+#if !BuildXaw && !BuildXaw7
+SharedDSLibReferences(XAW,Xaw,$(AWIDGET6SRC),SOXAWREV,SharedXawRev)
+#endif
+#else
+ProjectUnsharedLibReferences(XAW6,Xaw,$(AWIDGET6SRC),XBuildLibDir)
+#if !BuildXaw && !BuildXaw7
+ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGET6SRC),XBuildLibDir)
+#endif
+#endif
+#endif
+
+#ifndef SharedLibXi
+#define SharedLibXi HasSharedLibraries
+#endif
+#ifndef NormalLibXi
+#define NormalLibXi (!SharedLibXi | ForceNormalLib)
+#endif
+#ifndef DebugLibXi
+#define DebugLibXi NO /* debugged Xi library */
+#endif
+#ifndef ProfileLibXi
+#define ProfileLibXi NO /* profiled Xi library */
+#endif
+ XILIBSRC = $(LIBSRC)/Xi
+#if SharedLibXi
+#ifndef SharedXiRev
+#define SharedXiRev 6.0
+#endif
+SharedLibReferences(XI,Xi,$(XILIBSRC),SOXINPUTREV,SharedXiRev)
+#else
+ProjectUnsharedLibReferences(XI,Xi,$(XILIBSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibXtst
+#define SharedLibXtst HasSharedLibraries
+#endif
+#ifndef NormalLibXtst
+#define NormalLibXtst (!SharedLibXtst | ForceNormalLib)
+#endif
+#ifndef DebugLibXtst
+#define DebugLibXtst NO /* debugged Xtst library */
+#endif
+#ifndef ProfileLibXtst
+#define ProfileLibXtst NO /* profiled Xtst library */
+#endif
+ XTESTLIBSRC = $(LIBSRC)/Xtst
+#if SharedLibXtst
+#ifndef SharedXtstRev
+#define SharedXtstRev 6.1
+#endif
+SharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev)
+#else
+ProjectUnsharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),XBuildLibDir)
+#endif
+
+ProjectUnsharedLibReferences(XBSD,Xbsd,$(LIBSRC)/Xbsd,XBuildLibDir)
+
+#ifndef SharedLibICE
+#define SharedLibICE HasSharedLibraries
+#endif
+#ifndef NormalLibICE
+#define NormalLibICE (!SharedLibICE | ForceNormalLib)
+#endif
+#ifndef DebugLibICE
+#define DebugLibICE NO /* debugged ICE library */
+#endif
+#ifndef ProfileLibICE
+#define ProfileLibICE NO /* profiled ICE library */
+#endif
+ ICESRC = $(LIBSRC)/ICE
+#if SharedLibICE
+#ifndef SharedICERev
+#define SharedICERev 6.4
+#endif
+SharedLibReferences(ICE,ICE,$(ICESRC),SOICEREV,SharedICERev)
+#else
+ProjectUnsharedLibReferences(ICE,ICE,$(ICESRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibSM
+#define SharedLibSM HasSharedLibraries
+#endif
+#ifndef NormalLibSM
+#define NormalLibSM (!SharedLibSM | ForceNormalLib)
+#endif
+#ifndef DebugLibSM
+#define DebugLibSM NO /* debugged SM library */
+#endif
+#ifndef ProfileLibSM
+#define ProfileLibSM NO /* profiled SM library */
+#endif
+ SMSRC = $(LIBSRC)/SM
+#if SharedLibSM
+#ifndef SharedSMRev
+#define SharedSMRev 6.0
+#endif
+SharedLibReferences(SM,SM,$(SMSRC),SOSMREV,SharedSMRev)
+#else
+ProjectUnsharedLibReferences(SM,SM,$(SMSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibXkey
+#define SharedLibXkey HasSharedLibraries
+#endif
+#ifndef NormalLibXkey
+#define NormalLibXkey (!SharedLibXkey | ForceNormalLib)
+#endif
+#ifndef DebugLibXkey
+#define DebugLibXkey NO /* debugged Xkey library */
+#endif
+#ifndef ProfileLibXkey
+#define ProfileLibXkey NO /* profiled Xkey library */
+#endif
+ XKEYSRC = $(LIBSRC)/Xkey
+#if SharedLibXkey
+#ifndef SharedXkeyRev
+#define SharedXkeyRev 6.0
+#endif
+SharedLibReferences(XKEY,Xkey,$(XKEYSRC),SOXKEYREV,SharedXkeyRev)
+#else
+ProjectUnsharedLibReferences(XKEY,Xkey,$(XKEYSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibFS
+#define SharedLibFS HasSharedLibraries
+#endif
+#ifndef NormalLibFS
+#define NormalLibFS (!SharedLibFS | ForceNormalLib)
+#endif
+#ifndef DebugLibFS
+#define DebugLibFS NO /* debugged FS library */
+#endif
+#ifndef ProfileLibFS
+#define ProfileLibFS NO /* profiled FS library */
+#endif
+ FSLIBSRC = $(LIBSRC)/FS
+#if SharedLibFS
+#ifndef SharedFSRev
+#define SharedFSRev 6.0
+#endif
+SharedLibReferences(FS,FS,$(FSLIBSRC),SOFSREV,SharedFSRev)
+#else
+ProjectUnsharedLibReferences(FS,FS,$(FSLIBSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibFont
+#define SharedLibFont HasSharedLibraries
+#endif
+#ifndef NormalLibFont
+#define NormalLibFont (!SharedLibFont | ForceNormalLib | XserverStaticFontLib)
+#endif
+#ifndef DebugLibFont
+#define DebugLibFont NO /* debugged Font library */
+#endif
+#ifndef ProfileLibFont
+#define ProfileLibFont NO /* profiled Font library */
+#endif
+ FONTLIBSRC = $(LIBSRC)/font
+#if SharedLibFont
+#ifndef SharedFontRev
+#define SharedFontRev 1.5
+#endif
+SharedFontLibReferences()
+XCOMM SharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),SOFONTREV,SharedFontRev)
+#else
+ProjectUnsharedFontLibReferences()
+XCOMM ProjectUnsharedLibReferences(XFONT,Xfont,$(FONTLIBSRC),XBuildLibDir)
+#endif
+
+ FONTSTUBLIBSRC = $(FONTLIBSRC)/stubs
+ProjectUnsharedLibReferences(FONTSTUB,fntstubs,$(FONTSUBLIBSRC),XBuildLibDir)
+ DEPFONTLIB = $(DEPXFONTLIB) $(DEPFONTSTUBLIB)
+ FONTLIB = $(XFONTLIB) $(FONTSTUBLIB) $(FREETYPE2LIB)
+
+
+#ifndef SharedLibFontEnc
+#define SharedLibFontEnc HasSharedLibraries
+#endif
+#ifndef NormalLibFontEnc
+#define NormalLibFontEnc (!SharedLibFontEnc | ForceNormalLib)
+#endif
+#ifndef DebugLibFontEnc
+#define DebugLibFontEnc NO /* debugged fontenc library */
+#endif
+#ifndef ProfileLibFontEnc
+#define ProfileLibFontEnc NO /* profiled fontenc library */
+#endif
+ FONTENCLIBSRC = $(LIBSRC)/fontenc
+#if SharedLibFontEnc
+#ifndef SharedFontEncRev
+#define SharedFontEncRev 1.0
+#endif
+SharedLibReferences(XFONTENC,fontenc,$(FONTENCLIBSRC),SOFONTENCREV,SharedFontEncRev)
+#else
+ProjectUnsharedLibReferences(XFONTENC,fontenc,$(FONTENCLIBSRC),XBuildLibDir)
+#endif
+
+#ifndef SharedLibXpm
+#define SharedLibXpm HasSharedLibraries
+#endif
+#ifndef NormalLibXpm
+#define NormalLibXpm (!SharedLibXpm | ForceNormalLib)
+#endif
+#ifndef DebugLibXpm
+#define DebugLibXpm NO
+#endif
+#ifndef ProfileLibXpm
+#define ProfileLibXpm NO
+#endif
+ XPMLIBSRC = $(LIBSRC)/Xpm
+#if SharedLibXpm
+#ifndef SharedXpmRev
+#define SharedXpmRev 4.11
+#endif
+SharedLibReferences(XPM,Xpm,$(XPMLIBSRC),SOXPMREV,SharedXpmRev)
+#else
+ProjectUnsharedLibReferences(XPM,Xpm,$(XPMLIBSRC),XBuildLibDir)
+#endif
+
+#if UseFreetype2
+
+#if BuildFreetype2Library
+
+#ifndef SharedLibFreetype2
+#define SharedLibFreetype2 HasSharedLibraries
+#endif
+#ifndef NormalLibFreetype2
+#define NormalLibFreetype2 (!SharedLibFreetype2 | ForceNormalLib)
+#endif
+#ifndef DebugLibFreetype2
+#define DebugLibFreetype2 NO
+#endif
+#ifndef ProfileLibFreetype2
+#define ProfileLibFreetype2 NO
+#endif
+ FREETYPE2LIBSRC = $(LIBSRC)/freetype2
+
+/*
+ * FreeType 2.1.9
+ *
+ * Get the library version information from version_info in
+ * in xc/extras/freetype2/builds/unix/configure.ac.
+ *
+ * current:revision:age = 9:7:3
+ *
+ * The LibtoolMinorVersions revision is "(current - age).age".
+ * The !LibtoolMinorVersions revision is "current.0".
+ * Freetype2Version should be set to "current.revision.age"
+ */
+#ifndef Freetype2Version
+#define Freetype2Version 9.7.3
+#endif
+
+#if SharedLibFreetype2
+#ifndef SharedLibtoolFreetype2Rev
+#define SharedLibtoolFreetype2Rev 9:7:3
+#endif
+#ifndef SharedFreetype2Rev
+#if LibtoolMinorVersions
+#define SharedFreetype2Rev 6.3.8
+#else
+#define SharedFreetype2Rev 9.0
+#endif
+#endif
+SharedLibReferences(FREETYPE2,freetype,$(FREETYPE2LIBSRC),SOFREETYPE2REV,SharedFreetype2Rev)
+#else
+ProjectUnsharedLibReferences(FREETYPE2,freetype,$(FREETYPE2LIBSRC),XBuildLibDir)
+#endif
+
+#ifdef UseInstalled
+FREETYPE2INCDIR=$(INCDIR)
+#else
+FREETYPE2INCDIR=$(BUILDINCDIR)
+#endif
+
+#else /* BuildFreetype2Library */
+
+#if HasFreetype2
+
+#ifndef Freetype2Dir
+#define Freetype2Dir /usr
+#ifndef Freetype2DirStandard
+# define Freetype2DirStandard YES
+#endif
+#endif
+#ifndef Freetype2DirStandard
+#define Freetype2DirStandard NO
+#endif
+
+#ifndef Freetype2LibDir
+#define Freetype2LibDir Freetype2Dir/LibDirName
+# if Freetype2DirStandard
+# define Freetype2LibDirStandard YES
+# endif
+#endif
+#ifndef Freetype2LibDirStandard
+# define Freetype2LibDirStandard NO
+#endif
+
+#ifndef Freetype2IncDir
+#define Freetype2IncDir Freetype2Dir/include
+# if Freetype2DirStandard
+# define Freetype2IncDirStandard YES
+# endif
+#endif
+
+FREETYPE2DIR = Freetype2Dir
+FREETYPE2LIBDIR = Freetype2LibDir
+FREETYPE2INCDIR = Freetype2IncDir
+#if Freetype2LibDirStandard
+FREETYPE2LIB = -lfreetype
+#else
+FREETYPE2LIB = -L$(FREETYPE2LIBDIR) LinkerRuntimeLibraryPathFlag($(FREETYPE2LIBDIR)) -lfreetype
+#endif
+
+#endif /* HasFreetype2 */
+
+#endif /* else BuildFreetype2Library */
+
+#ifndef Freetype2IncDirStandard
+# define Freetype2IncDirStandard NO
+#endif
+
+#if BuildFreetype2Library || HasFreetype2
+#if Freetype2IncDirStandard
+FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR)/freetype2 -I$(FREETYPE2INCDIR)/freetype2/config
+#else
+FREETYPE2INCLUDES = -I$(FREETYPE2INCDIR) -I$(FREETYPE2INCDIR)/freetype2 -I$(FREETYPE2INCDIR)/freetype2/config
+#endif
+FREETYPE2DEFINES = -DFREETYPE2
+#endif
+
+#endif /* UseFreetype2 */
+
+#if HasMotif
+
+#ifndef MotifDir
+#define MotifDir /usr/X11R6
+#endif
+#ifndef MotifDirStandard
+#define MotifDirStandard NO
+#endif
+
+#ifndef MotifLibDir
+# define MotifLibDir MotifDir/LibDirName
+# if MotifDirStandard
+# define MotifLibDirStandard YES
+# endif
+#endif
+#ifndef MotifLibDirStandard
+# define MotifLibDirStandard NO
+#endif
+
+#ifndef MotifIncDir
+# define MotifIncDir MotifDir/include
+# if MotifDirStandard
+# define MotifIncDirStandard YES
+# endif
+#endif
+#ifndef MotifIncDirStandard
+# define MotifIncDirStandard NO
+#endif
+
+MOTIFDIR = MotifDir
+MOTIFLIBDIR = MotifLibDir
+MOTIFINCDIR = MotifIncDir
+
+#if MotifLibDirStandard
+MOTIFLIB = -lXm
+#else
+MOTIFLIB = -L$(MOTIFLIBDIR) LinkerRuntimeLibraryPathFlag($(MOTIFLIBDIR)) -lXm
+#endif
+
+#if MotifIncDirStandard
+MOTIFINCLUDES =
+#else
+MOTIFINCLUDES = -I$(MOTIFINCDIR)
+#endif
+
+#endif /* HasMotif */
+
+#ifndef SharedLibExpat
+#define SharedLibExpat HasSharedLibraries
+#endif
+#ifndef NormalLibExpat
+#define NormalLibExpat (!SharedLibExpat | ForceNormalLib)
+#endif
+#ifndef DebugLibExpat
+#define DebugLibExpat NO
+#endif
+#ifndef ProfileLibExpat
+#define ProfileLibExpat NO
+#endif
+ EXPATLIBSRC = $(LIBSRC)/expat
+
+/*
+ * Expat 1.95.6.
+ *
+ * Get the library version information from LIBCURRENT, LIBREVISION and LIBAGE
+ * in xc/extras/expat/configure.
+ *
+ * LIBCURRENT:LIBREVISION:LIBAGE = 4:0:4
+ *
+ * The LibtoolMinorVersions revision is "(LIBCURRENT - LIBAGE).LIBAGE".
+ * The !LibtoolMinorVersions revision is "LIBCURRENT.0".
+ */
+#ifndef ExpatVersion
+#define ExpatVersion 1.95.6
+#endif
+
+#if SharedLibExpat
+#ifndef SharedLibtoolExpatRev
+#define SharedLibtoolExpatRev 4:0:4
+#endif
+#ifndef SharedExpatRev
+#if LibtoolMinorVersions
+#define SharedExpatRev 0.4
+#else
+#define SharedExpatRev 4.0
+#endif
+#endif
+SharedLibReferences(EXPAT,expat,$(EXPATLIBSRC),SOEXPATREV,SharedExpatRev)
+#else
+ProjectUnsharedLibReferences(EXPAT,expat,$(EXPATLIBSRC),XBuildLibDir)
+#endif
+
+#if UseExpat
+
+#if BuildExpatLibrary
+EXPATINCLUDES=$(TOP_X_INCLUDES)
+EXPATDEFINES=-DEXPAT
+#else /* BuildExpatLibrary */
+
+#if HasExpat
+
+#ifndef ExpatDir
+#define ExpatDir /usr
+#define ExpatDirStandard YES
+#endif
+#ifndef ExpatDirStandard
+#define ExpatDirStandard NO
+#endif
+
+#ifndef ExpatLibDir
+#define ExpatLibDir ExpatDir/LibDirName
+# if ExpatDirStandard
+# define ExpatLibDirStandard YES
+# endif
+#endif
+#ifndef ExpatLibDirStandard
+#define ExpatLibDirStandard NO
+#endif
+
+#ifndef ExpatIncDir
+#define ExpatIncDir ExpatDir/include
+# if ExpatDirStandard
+# define ExpatIncDirStandard YES
+# endif
+#endif
+#ifndef ExpatIncDirStandard
+#define ExpatIncDirStandard NO
+#endif
+
+EXPATDIR = ExpatDir
+EXPATLIBDIR = ExpatLibDir
+EXPATINCDIR = ExpatIncDir
+#if ExpatIncDirStandard
+EXPATINCLUDES =
+#else
+EXPATINCLUDES = -I$(EXPATINCDIR)
+#endif
+#if ExpatLibDirStandard
+EXPATLIB = -lexpat
+#else
+EXPATLIB = -L$(EXPATLIBDIR) LinkerRuntimeLibraryPathFlag($(EXPATLIBDIR)) -lexpat
+#endif
+EXPATDEFINES = -DEXPAT
+#endif /* HasExpat */
+
+#endif /* else BuildExpatLibrary */
+
+#define ExpatClientLibs $(EXPATLIB)
+#define ExpatClientDepLibs $(DEPEXPATLIB)
+
+#endif /* UseExpat */
+
+#ifndef SharedLibXft1
+#define SharedLibXft1 HasSharedLibraries
+#endif
+#ifndef NormalLibXft1
+#define NormalLibXft1 NO
+#endif
+#ifndef DebugLibXft1
+#define DebugLibXft1 NO
+#endif
+#ifndef ProfileLibXft1
+#define ProfileLibXft1 NO
+#endif
+ XFT1LIBSRC = $(LIBSRC)/Xft1
+#if SharedLibXft1
+#ifndef SharedXft1Rev
+#define SharedXft1Rev 1.1
+#endif
+SharedLibReferences(XFT1,Xft,$(XFT1LIBSRC),SOXFT1REV,SharedXft1Rev)
+#else
+ProjectUnsharedLibReferences(XFT1,Xft,$(XFT1LIBSRC),XBuildLibDir)
+#endif
+
+#ifndef Xft1ClientDepLibs
+#if UseFreetype2
+#define Xft1ClientDepLibs $(DEPXFT1LIB) $(DEPFREETYPE2LIB) $(DEPXRENDERLIB)
+#else
+#define Xft1ClientDepLibs $(DEPXFT1LIB) $(DEPXRENDERLIB)
+#endif
+#endif
+#ifndef Xft1ClientLibs
+#if UseFreetype2
+#define Xft1ClientLibs $(XFT1LIB) $(FREETYPE2LIB) $(XRENDERLIB)
+#else
+#define Xft1ClientLibs $(XFT1LIB) $(XRENDERLIB)
+#endif
+#endif
+
+#ifndef SharedLibXft
+#define SharedLibXft HasSharedLibraries
+#endif
+#ifndef NormalLibXft
+#define NormalLibXft (!SharedLibXft | ForceNormalLib)
+#endif
+#ifndef DebugLibXft
+#define DebugLibXft NO
+#endif
+#ifndef ProfileLibXft
+#define ProfileLibXft NO
+#endif
+ XFTLIBSRC = $(LIBSRC)/Xft
+#if SharedLibXft
+#ifndef SharedXftRev
+#define SharedXftRev 2.1.2
+#endif
+SharedLibReferences(XFT,Xft,$(XFTLIBSRC),SOXFTREV,SharedXftRev)
+#else
+ProjectUnsharedLibReferences(XFT,Xft,$(XFTLIBSRC),XBuildLibDir)
+#endif
+
+#ifndef XftClientDepLibs
+#define XftClientDepLibs $(DEPXFTLIB) FontconfigClientDepLibs $(DEPXRENDERLIB)
+#endif
+#ifndef XftClientLibs
+#define XftClientLibs $(XFTLIB) FontconfigClientLibs $(XRENDERLIB)
+#endif
+
+#if UseFontconfig
+
+#if BuildFontconfigLibrary
+
+#ifndef SharedLibFontconfig
+#define SharedLibFontconfig HasSharedLibraries
+#endif
+#ifndef NormalLibFontconfig
+#define NormalLibFontconfig (!SharedLibFontconfig | ForceNormalLib)
+#endif
+#ifndef DebugLibFontconfig
+#define DebugLibFontconfig NO
+#endif
+#ifndef ProfileLibFontconfig
+#define ProfileLibFontconfig NO
+#endif
+ FONTCONFIGLIBSRC = $(LIBSRC)/fontconfig
+#if SharedLibFontconfig
+#ifndef SharedFontconfigRev
+#define SharedFontconfigRev 1.0.4
+#endif
+SharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGLIBSRC),SOFONTCONFIGREV,SharedFontconfigRev)
+#else
+ProjectUnsharedLibReferences(FONTCONFIG,fontconfig,$(FONTCONFIGLIBSRC),XBuildLibDir)
+#endif
+
+#ifdef UseInstalled
+FONTCONFIGINCDIR=$(INCDIR)
+#else
+FONTCONFIGINCDIR=$(BUILDINCDIR)
+#endif
+
+FONTCONFIGINCLUDES = -I$(FONTCONFIGINCDIR)
+
+#if UseInstalledX11
+FCCACHE = $(BINDIR)/fc-cache
+#else
+FCCACHE = set -x; $(CLIENTENVSETUP) $(PRELOADXFTSETUP) FONTCONFIG_PATH=$(FONTCONFIGLIBSRC) $(XBUILDBINDIR)/fc-cache
+#endif
+
+#else /* BuildFontconfigLibrary */
+
+#if HasFontconfig
+
+#ifndef FontconfigDir
+# define FontconfigDir /usr
+# ifndef FontconfigDirStandard
+# define FontconfigDirStandard YES
+# endif
+#endif
+
+#ifndef FontconfigDirStandard
+# define FontconfigDirStandard NO
+#endif
+
+#ifndef FontconfigLibDir
+# define FontconfigLibDir FontconfigDir/LibDirName
+# if FontconfigDirStandard
+# define FontconfigLibDirStandard YES
+# endif
+#endif
+#ifndef FontconfigLibDirStandard
+# define FontconfigLibDirStandard NO
+#endif
+
+#ifndef FontconfigBinDir
+# define FontconfigBinDir FontconfigDir/bin
+#endif
+
+#ifndef FontconfigIncDir
+# define FontconfigIncDir FontconfigDir/include
+# if FontconfigDirStandard
+# define FontconfigIncDirStandard YES
+# endif
+#endif
+
+#ifndef FontconfigIncDirStandard
+# define FontconfigIncDirStandard NO
+#endif
+
+FONTCONFIGDIR = FontconfigDir
+FONTCONFIGLIBDIR = FontconfigLibDir
+FONTCONFIGINCDIR = FontconfigIncDir
+FONTCONFIGBINDIR = FontconfigBinDir
+#if FontconfigLibDirStandard
+FONTCONFIGLIB = -lfontconfig
+#else
+FONTCONFIGLIB = -L$(FONTCONFIGLIBDIR) LinkerRuntimeLibraryPathFlag($(FONTCONFIGLIBDIR)) -lfontconfig
+#endif
+
+#if FontconfigIncDirStandard
+FONTCONFIGINCLUDES =
+#else
+FONTCONFIGINCLUDES = -I$(FONTCONFIGINCDIR)
+#endif
+
+FCCACHE = $(FONTCONFIGBINDIR)/fc-cache
+
+#endif /* HasFontconfig */
+
+#endif /* else BuildFontconfigLibrary */
+
+#if BuildFontconfigLibrary || HasFontconfig
+FONTCONFIGDEFINES = -DFONTCONFIG
+#endif
+
+#ifndef FontconfigClientDepLibs
+#define FontconfigClientDepLibs $(DEPFONTCONFIGLIB) $(DEPFREETYPE2LIB) ExpatClientDepLibs
+#endif
+#ifndef FontconfigClientLibs
+#define FontconfigClientLibs $(FONTCONFIGLIB) $(FREETYPE2LIB) ExpatClientLibs
+#endif
+
+#endif /* UseFontconfig */
+
+XFTINCLUDES=$(FONTCONFIGINCLUDES) $(FREETYPE2INCLUDES)
+
+#ifdef HasLibpng
+
+/*
+ * Libpng controls:
+ *
+ * LibpngDir prefix for all libpng files
+ * LibpngDirStandard Boolean - whether png headers/libs are
+ * in default compile/link paths
+ * LibpngLibDir Directory holding png library
+ * LibpngLibDirStandard Boolean - whether png libs are
+ * in default link path
+ * LibpngIncDir Directory holding png includes
+ * LibpngIncDirStandard Boolean - whether png includes are
+ * in default compile path
+ *
+ * Make sure that *Standard is set correctly, if not, the
+ * standard compile/link paths will be added *before* the
+ * local X directorys and installed versions of the standard
+ * X headers will end up getting used.
+ */
+
+#ifndef LibpngDir
+#define LibpngDir /usr
+#define LibpngDirStandard YES
+#endif
+#ifndef LibpngDirStandard
+#define LibpngDirStandard NO
+#endif
+
+#ifndef LibpngLibDir
+#define LibpngLibDir LibpngDir/LibDirName
+#if LibpngDirStandard
+#define LibpngLibDirStandard YES
+#endif
+#endif
+#ifndef LibpngLibDirStandard
+#define LibpngLibDirStandard NO
+#endif
+
+#ifndef LibpngIncDir
+#define LibpngIncDir LibpngDir/include
+#if LibpngDirStandard
+#define LibpngIncDirStandard YES
+#endif
+#endif
+#ifndef LibpngIncDirStandard
+#define LibpngIncDirStandard NO
+#endif
+
+LIBPNGINCDIR = LibpngIncDir
+#if LibpngIncDirStandard
+LIBPNGINC=
+#else
+LIBPNGINC = -I$(LIBPNGINCDIR)
+#endif
+LIBPNGDIR = LibpngDir
+LIBPNGLIBDIR = LibpngLibDir
+LIBPNGINCDIR = LibpngIncDir
+#if LibpngLibDirStandard
+LIBPNGLIB = -lpng
+#else
+LIBPNGLIB = -L$(LIBPNGLIBDIR) LinkerRuntimeLibraryPathFlag($(LIBPNGLIBDIR)) -lpng
+#endif
+
+#endif
+
+#ifndef XmuuClientDepLibs
+#define XmuuClientDepLibs $(DEPXMUULIB) $(DEPXLIB)
+#endif
+#ifndef XmuuClientLibs
+#define XmuuClientLibs $(XMUULIB) $(XLIB)
+#endif
+
+#ifndef LdLibraryPath
+#define LdLibraryPath LD_LIBRARY_PATH
+#endif
+
+#if BuildXKBlib
+# ifndef SharedLibxkbfile
+# define SharedLibxkbfile HasSharedLibraries
+# endif
+# ifndef NormalLibxkbfile
+# define NormalLibxkbfile (!SharedLibxkbfile | ForceNormalLib)
+# endif
+# ifndef DebugLibxkbfile
+# define DebugLibxkbfile NO
+# endif
+# ifndef ProfileLibxkbfile
+# define ProfileLibxkbfile NO
+# endif
+#else
+# ifndef SharedLibxkbfile
+# define SharedLibxkbfile NO
+# endif
+# ifndef NormalLibxkbfile
+# define NormalLibxkbfile NO
+# endif
+# ifndef DebugLibxkbfile
+# define DebugLibxkbfile NO
+# endif
+# ifndef ProfileLibxkbfile
+# define ProfileLibxkbfile NO
+# endif
+#endif
+ XKBFILELIBSRC = $(LIBSRC)/xkbfile
+#if SharedLibxkbfile
+# ifndef SharedxkbfileRev
+# define SharedxkbfileRev 1.0
+# endif
+SharedLibReferences(XKBFILE,xkbfile,$(XKBFILESRC),SOXKBFILEREV, SharedxkbfileRev)
+#else
+ProjectUnsharedLibReferences(XKBFILE,xkbfile,$(XKBFILELIBSRC),XBuildLibDir)
+#endif
+
+#if BuildXKBlib
+# ifndef XkbClientDepLibs
+# if UseXKBInClients
+# define XkbClientDepLibs $(DEPXKBFILELIB)
+# else
+# define XkbClientDepLibs /**/
+# endif
+# endif
+# ifndef XkbClientLibs
+# if UseXKBInClients
+# define XkbClientLibs $(XKBFILELIB)
+# else
+# define XkbClientLibs /**/
+# endif
+# endif
+
+# if defined(UseInstalled) || (CrossCompiling && UseInstalledOnCrossCompile)
+ XKBCOMPCMD = $(XBINDIR)/XkbComp
+# else
+ XKBCOMPSRC = $(PROGRAMSRC)/XkbComp
+# if CrossCompiling
+ XKBCOMPCMD = $(PROGRAMSRC)/XkbComp/cross/XkbComp
+# else
+ XKBCOMPCMD = $(CLIENTENVSETUP) $(PRELOADSETUP) $(XBUILDBINDIR)/XkbComp
+# endif
+# endif
+#else /* !BuildXKBlib */
+# ifndef XkbClientDepLibs
+# define XkbClientDepLibs
+# endif
+# ifndef XkbClientLibs
+# define XkbClientLibs
+# endif
+#endif /* BuildXKBlib */
+
+#if BuildXKBlib
+# ifndef SharedLibxkbui
+# define SharedLibxkbui HasSharedLibraries
+# endif
+# ifndef NormalLibxkbui
+# define NormalLibxkbui (!SharedLibxkbui || ForceNormalLib)
+# endif
+# ifndef DebugLibxkbui
+# define DebugLibxkbui NO
+# endif
+# ifndef ProfileLibxkbui
+# define ProfileLibxkbui NO
+# endif
+#else
+# ifndef SharedLibxkbui
+# define SharedLibxkbui NO
+# endif
+# ifndef NormalLibxkbui
+# define NormalLibxkbui NO
+# endif
+# ifndef DebugLibxkbui
+# define DebugLibxkbui NO
+# endif
+# ifndef ProfileLibxkbui
+# define ProfileLibxkbui NO
+# endif
+#endif
+ XKBUILIBSRC = $(LIBSRC)/xkbui
+#if SharedLibxkbui
+# ifndef SharedxkbuiRev
+# define SharedxkbuiRev 1.0
+# endif
+SharedLibReferences(XKBUI,xkbui,$(XKBUISRC),SOXKBUIREV, SharedxkbuiRev)
+#else
+ProjectUnsharedLibReferences(XKBUI,xkbui,$(XKBUILIBSRC),XBuildLibDir)
+#endif
+
+#ifndef XkbuiLibs
+# define XkbuiLibs $(XKBUILIB)
+#endif
+#ifndef XkbuiDepLibs
+# define XkbuiDepLibs $(DEPXKBFILELIB)
+#endif
+
+#ifndef SharedxrxRev
+# define SharedxrxRev 6.8
+#endif
+
+#ifndef SharedxrxnestRev
+# define SharedxrxnestRev 6.8
+#endif
+
+#ifndef ExtraXawReqs
+# if BuildXaw
+# define ExtraXawReqs $(XPLIB)
+# else
+# define ExtraXawReqs /**/
+# endif
+#endif
+
+EXTRAXAWREQS = ExtraXawReqs
+
+#ifndef ExtraXawClientDepLibs
+# if BuildXaw
+# define ExtraXawClientDepLibs $(DEPXPLIB)
+# else
+# define ExtraXawClientDepLibs /**/
+# endif
+#endif
+
+EXTRAXAWCLIENTDEPLIBS = ExtraXawClientDepLibs
+
+#ifndef XawClientDepLibs
+#define XawClientDepLibs $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXPMLIB) $(EXTRAXAWCLIENTDEPLIBS) $(DEPXLIB)
+#endif
+
+#ifndef ExtraXawClientLibs
+# if BuildXaw
+# define ExtraXawClientLibs $(XPLIB)
+# else
+# define ExtraXawClientLibs /**/
+# endif
+#endif
+
+EXTRAXAWCLIENTLIBS = ExtraXawClientLibs
+
+#ifndef XawClientLibs
+#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+#ifndef SharedLibXTrap
+#define SharedLibXTrap HasSharedLibraries
+#endif
+#ifndef NormalLibXTrap
+#define NormalLibXTrap (!SharedLibXTrap | ForceNormalLib)
+#endif
+#ifndef DebugLibXTrap
+#define DebugLibXTrap NO /* debugged XTrap library */
+#endif
+#ifndef ProfileLibXTrap
+#define ProfileLibXTrap NO /* profiled XTrap library */
+#endif
+ XTRAPLIBSRC = $(LIBSRC)/XTrap
+#if SharedLibXTrap
+#ifndef SharedXTrapRev
+#define SharedXTrapRev 6.4
+#endif
+SharedLibReferences(XTRAP,XTrap,$(XTRAPLIBSRC),SOXTRAPREV,SharedXTrapRev)
+#else
+ProjectUnsharedLibReferences(XTRAP,XTrap,$(XTRAPLIBSRC),XBuildLibDir)
+#endif
+
+#ifndef NeedDefaultDepLibs
+#define NeedDefaultDepLibs YES
+#endif
+
+#if NeedDefaultDepLibs
+/*
+ * Individual libraries should override this
+ */
+#if HasSharedLibraries || defined(UseInstalled)
+ DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
+#else
+ DEPLIBS = $(LOCAL_LIBRARIES)
+#endif
+ DEPLIBS1 = $(DEPLIBS)
+ DEPLIBS2 = $(DEPLIBS)
+ DEPLIBS3 = $(DEPLIBS)
+ DEPLIBS4 = $(DEPLIBS)
+ DEPLIBS5 = $(DEPLIBS)
+ DEPLIBS6 = $(DEPLIBS)
+ DEPLIBS7 = $(DEPLIBS)
+ DEPLIBS8 = $(DEPLIBS)
+ DEPLIBS9 = $(DEPLIBS)
+ DEPLIBS10 = $(DEPLIBS)
+#endif /* NeedDefaultDepLibs */
+
+
+/*
+ * InstallAppDefaults - simple rules to install application default file
+ */
+#ifndef InstallAppDefaults
+#define InstallAppDefaults(class) InstallAppDefaultsLong(class,class)
+#endif /* InstallAppDefaults */
+
+/*
+ * InstallAppDefaultsLong - general rule to install application default file
+ * if the InstallAppDefFiles configuration parameter is set.
+ */
+#ifndef InstallAppDefaultsLong
+#if UseConfDirForAppDefaults
+#if InstallAppDefFiles
+#define InstallAppDefaultsLong(file,class) @@\
+LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
+InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
+#else
+#define InstallAppDefaultsLong(file,class) @@\
+LinkConfDirectory(app-defaults,.,app-defaults,.) @@\
+InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
+#endif /* InstallAppDefFiles */
+#else /* UseConfDirForAppDefaults */
+#if InstallAppDefFiles
+#define InstallAppDefaultsLong(file,class) @@\
+InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
+#else
+#define InstallAppDefaultsLong(file,class) @@\
+InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
+#endif /* InstallAppDefFiles */
+#endif /* UseConfDirForAppDefaults */
+#endif /* InstallAppDefaultsLong */
+
+/*
+ * MakeFcCache - generate rules to build fontconfig cache database
+ */
+
+#if defined UseFreetype2 && !CrossCompiling
+
+# ifndef MakeFcCache
+# define MakeFcCache(deplist) @@\
+all:: fonts.cache @@\
+ @@\
+fonts.cache: deplist @@\
+ RunProgram(FCCACHE, $(FCCACHEOPTS) .) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(fonts.cache*)
+# endif /* MakeFcCache */
+
+# ifndef InstallFcCache
+# define InstallFcCache(dest) @@\
+install:: @@\
+ RunProgram(FCCACHE, $(FCCACHEOPTS) $(DESTDIR)dest)
+# endif /* InstallFcCache */
+
+#else
+
+#ifndef MakeFcCache
+#define MakeFcCache(deplist)
+#endif
+
+#ifndef InstallFcCache
+#define InstallFcCache(dest)
+#endif
+
+#endif
+
+/*
+ * MakeFontsScale - generate rules to build fonts.scale database.
+ */
+#ifndef MakeFontsScale
+# if !CrossCompiling || UseInstalledOnCrossCompile
+# define MakeFontsScale(deplist) @@\
+all:: fonts.scale @@\
+ @@\
+fonts.scale: deplist @@\
+ RemoveFile(fonts.scale) @@\
+ RunProgram(MKFONTSCALE, .) @@\
+ @@\
+clean:: @@\
+ RemoveFile(fonts.scale)
+# else
+# define MakeFontsScale(deplist) @@\
+clean:: @@\
+ RemoveFile(fonts.scale)
+# endif
+#endif /* MakeFontsScale */
+
+/*
+ * MakeFontsDir - generate rules to build fonts.dir database.
+ */
+#ifndef MakeFontsDir
+# if !CrossCompiling || UseInstalledOnCrossCompile
+# define MakeFontsDir(deplist) @@\
+all:: fonts.dir @@\
+ @@\
+fonts.dir: deplist @@\
+ RemoveFile(fonts.dir) @@\
+ RunProgram(MKFONTDIR, $(MKFONTDIROPTS) .) @@\
+ @@\
+clean:: @@\
+ RemoveFile(fonts.dir)
+# else
+# define MakeFontsDir(deplist) @@\
+clean:: @@\
+ RemoveFile(fonts.dir)
+# endif
+#endif /* MakeFontsDir */
+
+
+/*
+ * MakeFonts - generate rules to build font database.
+ */
+#ifndef MakeFonts
+# if !CrossCompiling || UseInstalledOnCrossCompile
+# define MakeFonts() @@\
+all:: $(OBJS) @@\
+ @@\
+MakeFontsDir($(OBJS)) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(*.pcf *.pcf.Z *.pcf.gz)
+# else
+# define MakeFonts() @@\
+MakeFontsDir($(OBJS)) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(*.pcf *.pcf.Z *.pcf.gz)
+# endif
+#endif /* MakeFonts */
+
+#ifndef InstallFontsDir
+# if !CrossCompiling || UseInstalledOnCrossCompile
+# define InstallFontsDir(dest) @@\
+install:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @if [ X$(STATIC_FONTS_SCALE) = X ]; then (set -x; \ @@\
+ RemoveFile($(DESTDIR)dest/fonts.scale); \ @@\
+ RunProgram(MKFONTSCALE, $(DESTDIR)dest)); \ @@\
+ else (set -x; \ @@\
+ InstallInline(fonts.scale,$(INSTDATFLAGS),dest)); \ @@\
+ fi @@\
+ RemoveFile($(DESTDIR)dest/fonts.dir) @@\
+ RunProgram(MKFONTDIR, $(MKFONTDIROPTS) $(DESTDIR)dest)
+# else
+# define InstallFontsDir(dest)
+# endif
+#endif
+
+/*
+ * InstallFontObjs - generate rules to install font files
+ */
+#ifndef InstallFontObjs
+# if !CrossCompiling || UseInstalledOnCrossCompile
+# define InstallFontObjs(objs,dest) @@\
+InstallMultipleFlags(objs,dest,$(INSTDATFLAGS)) @@\
+ @@\
+InstallFontsDir(dest)
+# else
+# define InstallFontObjs(objs,dest)
+# endif
+#endif /* InstallFontObjs */
+
+
+/*
+ * InstallFonts - generate rules to install font files
+ */
+#ifndef InstallFonts
+#define InstallFonts(dest) @@\
+InstallFontObjs($(OBJS),dest)
+#endif /* InstallFonts */
+
+
+/*
+ * InstallFontAliases - generate rules to install font aliases databases.
+ */
+#ifndef InstallFontAliases
+#define InstallFontAliases(dest) @@\
+InstallTarget(install,fonts.alias,$(INSTDATFLAGS),dest)
+#endif /* InstallFontAliases */
+
+#ifndef InstallNamedFontAliases
+#define InstallNamedFontAliases(src,dest) @@\
+InstallNamedTarget(install,src,$(INSTDATFLAGS),dest,fonts.alias)
+#endif /* InstallNamedFontAliases */
+
+#ifndef FontSrc
+#define FontSrc(basename) basename.bdf
+#endif
+
+#ifndef FontBaseObj
+#define FontBaseObj(basename)basename.pcf
+#endif
+
+/*
+ * InstallFontScale - generate rules to install font scale database.
+ */
+#ifndef InstallFontScale
+#define InstallFontScale(dest) @@\
+InstallTarget(install,fonts.scale,$(INSTDATFLAGS),dest)
+#endif /* InstallFontScale */
+
+/*
+ * UncompressedFontTargetLong
+ */
+#if ! CrossCompiling || UseInstalledOnCrossCompile
+# ifndef UncompressedFontTargetLong
+# define UncompressedFontTargetLong(sname,tname) @@\
+FontBaseObj(tname): FontSrc(sname) @@\
+ RunProgram(FONTC,$(FONTCFLAGS) $? -o $@)
+# endif /* UncompressedFontTargetLong */
+#else
+# ifndef UncompressedFontTargetLong
+# define UncompressedFontTargetLong(sname,tname)
+# endif
+#endif
+
+/*
+ * CompressedFontTarget
+ */
+#ifndef GzipFontCompression
+#define GzipFontCompression NO
+#endif
+
+#if ! CrossCompiling || UseInstalledOnCrossCompile
+# ifndef CompressedFontTargetLong
+# if GzipFontCompression
+# define CompressedFontTargetLong(sname,tname) @@\
+FontBaseObj(tname).gz: FontSrc(sname) @@\
+ RunProgram(FONTC,$(FONTCFLAGS) $?) | $(GZIPCMD) > $@
+# else
+# define CompressedFontTargetLong(sname,tname) @@\
+FontBaseObj(tname).Z: FontSrc(sname) @@\
+ RunProgram(FONTC,$(FONTCFLAGS) $?) | $(COMPRESS) > $@
+# endif
+# endif /* CompressedFontTargetLong */
+#else
+# define CompressedFontTargetLong(sname,tname)
+#endif
+
+/*
+ * UncompressedFontTarget
+ */
+#ifndef UncompressedFontTarget
+#define UncompressedFontTarget(basename) UncompressedFontTargetLong(basename,basename)
+#endif /* UncompressedFontTarget */
+
+#ifndef CompressedFontTarget
+#define CompressedFontTarget(basename) CompressedFontTargetLong(basename,basename)
+#endif /* CompressedFontTarget */
+
+#if !defined(FontTarget) && !defined(FontObj)
+#if CompressAllFonts
+#define FontTargetLong(sname,tname) CompressedFontTargetLong(sname,tname)
+#define FontTarget(basename) CompressedFontTarget(basename)
+#if GzipFontCompression
+#define FontObj(basename) FontBaseObj(basename).gz
+#else
+#define FontObj(basename) FontBaseObj(basename).Z
+#endif
+#else
+#define FontTargetLong(sname,tname) UncompressedFontTargetLong(sname,tname)
+#define FontTarget(basename) UncompressedFontTarget(basename)
+#define FontObj(basename) FontBaseObj(basename)
+#endif /* CompressAllFonts */
+#endif
+
+
+#ifndef EncObj
+#define EncObj(basename) basename.enc
+#endif
+#ifndef EncObjComp
+#if GzipFontCompression
+#define EncObjComp(basename) basename.enc.gz
+#else
+#define EncObjComp(basename) basename.enc.Z
+#endif
+#endif
+
+#ifndef EncodingTarget
+#define EncodingTarget(basename) /**/
+#endif
+
+#ifndef CompEncodingTarget
+#if GzipFontCompression
+#define CompEncodingTarget(basename) @@\
+EncObjComp(basename): EncObj(basename) @@\
+ cat $? | $(GZIPCMD) > $@
+#else
+#define CompEncodingTarget(basename) @@\
+EncObjComp(basename): EncObj(basename) @@\
+ cat $? | $(COMPRESS) > $@
+#endif
+#endif
+
+#ifndef MakeEncDir
+# if !CrossCompiling || UseInstalledOnCrossCompile
+# define MakeEncDir(deplist,inst,dirlist ) @@\
+AllTarget(encodings.dir) @@\
+ @@\
+encodings.dir: deplist @@\
+ RemoveFiles(encodings.dir fonts.dir) @@\
+ @(E=; for i in dirlist; do \ @@\
+ E="$$E -e $$i"; done; \ @@\
+ set -x; \ @@\
+ RunProgram(MKFONTDIR, -n -r -p inst/ $$E .)) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(fonts.dir encodings.dir)
+# else
+# define MakeEncDir(deplist,inst,dirlist ) @@\
+clean:: @@\
+ RemoveFiles(fonts.dir encodings.dir)
+# endif
+#endif
+
+#ifndef MakeEncodings
+#define MakeEncodings(deplist,inst,dirlist) @@\
+ @@\
+MakeEncDir(deplist $(OBJS),inst,dirlist) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(*.enc.Z *.enc.gz)
+#endif /* MakeEncodings */
+
+#ifndef InstallEncObjs
+# if !CrossCompiling || UseInstalledOnCrossCompile
+# define InstallEncObjs(objs,dest) @@\
+InstallMultipleFlags(objs,dest,$(INSTDATFLAGS)) @@\
+ @@\
+InstallTarget(install,encodings.dir,$(INSTDATFLAGS),dest)
+# else
+# define InstallEncObjs(objs,dest)
+# endif
+#endif /* InstallEncObjs */
+
+#ifndef InstallEncodings
+#define InstallEncodings(dest) @@\
+InstallEncObjs($(OBJS),dest)
+#endif /* InstallEncodings */
+
+#ifndef InstallEncodingsDir
+# if !CrossCompiling || UseInstalledOnCrossCompile
+# define InstallEncodingsDir(edir,fdir) @@\
+InstallNamedTarget(install,edir/encodings.dir,$(INSTDATFLAGS),fdir,encodings.dir)
+# else
+# define InstallEncodingsDir(edir,fdir)
+# endif
+#endif
+
+
+#ifndef MakeBdfFontFromUCSMaster
+#define MakeBdfFontFromUCSMaster(font,enc) @@\
+font-enc.bdf: font.bdf $(UCS2ANY) @@\
+ RemoveFile($@) @@\
+ $(UCS2ANY) font.bdf $(UCSMAPPREFIX)enc enc @@\
+ @@\
+clean:: @@\
+ RemoveFile(font-enc.bdf)
+#endif
+
+#ifndef MakeTruncatedUCSBdfFont
+#if HasPerl5
+#define MakeTruncatedUCSBdfFont(font,trunc,name) @@\
+name.bdf: font.bdf $(BDFTRUNCATE) @@\
+ RemoveFile($@) @@\
+ RunPerlScript($(BDFTRUNCATE),trunc < font.bdf > name.bdf) @@\
+ @@\
+clean:: @@\
+ RemoveFile(name.bdf)
+#endif
+#endif
+
+/*
+ * InstallXpPMFLink - install link for a Xprint PMF "font" from one
+ * print model to another
+ */
+#ifndef InstallXpPMFLink
+#define InstallXpPMFLink(fontfilename,srcmodelfontdir,destmodelfontdir) @@\
+ InstallLink(install,srcmodelfontdir/fontfilename,fontfilename,destmodelfontdir)
+#endif /* InstallXpPMFLink */
+/*
+ * InstallXpMultiplePMFLinks - install multiple links for PMF fonts
+ * from one print model to another
+ */
+#ifndef InstallXpMultiplePMFLinks
+#define InstallXpMultiplePMFLinks(list,srcmodelfontdir,destmodelfontdir) @@\
+install:: @@\
+ MakeDir($(DESTDIR)destmodelfontdir) @@\
+ for i in list ; do \ @@\
+ $(RM) $(DESTDIR)destmodelfontdir/$$i ; \ @@\
+ $(LN) -s -f srcmodelfontdir/$$i $(DESTDIR)destmodelfontdir/$$i ; \ @@\
+ done
+#endif /* InstallXpPMFLink */
+
+/*
+ * InstallXpPMFFontsDir - make and install a fonts.dir index for model-config fonts
+ */
+#ifndef InstallXpPMFFontsDir
+#if BuildServersOnly
+#define InstallXpPMFFontsDir(destmodelfontdir) /**/
+#else
+#define InstallXpPMFFontsDir(destmodelfontdir) @@\
+install:: @@\
+ ($(MKFONTSCALE) -b -s -l $(DESTDIR)destmodelfontdir)
+#endif
+#endif /* InstallXpPMFFontsDir */
+
+
+/*
+ * MakeXkbDir
+ */
+#ifndef MakeXkbDir
+# if !CrossCompiling || UseInstalledOnCrossCompile
+# define MakeXkbDir(basedir,subdir) @@\
+all:: Concat(subdir,.dir) @@\
+ @@\
+Concat(subdir,.dir): @@\
+ RemoveFile(Concat(subdir,.dir)) @@\
+ $(XKBCOMPCMD) -lfhlpR -o Concat(subdir,.dir) '*' @@\
+ @@\
+InstallTarget(install,Concat(subdir,.dir),$(INSTDATFLAGS),basedir) @@\
+ @@\
+clean:: @@\
+ RemoveFile(Concat(subdir,.dir))
+# else
+# define MakeXkbDir(basedir,subdir) @@\
+clean:: @@\
+ RemoveFile(Concat(subdir,.dir))
+# endif
+#endif
+
+/*
+ * PostProcessTroffPS - by default moves the working output into place,
+ * but can be a hook for more complicated post-processing.
+ */
+#ifndef PostProcessTroffPS
+#define PostProcessTroffPS(temp,real) $(MV) temp real
+#endif
+
+/*
+ * PostProcessTroffHTML - by default moves the working output into place,
+ * but can be a hook for more complicated post-processing.
+ */
+#ifndef PostProcessTroffHTML
+#define PostProcessTroffHTML(temp,real) $(MV) temp real
+#endif
+
+#ifdef HTMLroffCmd
+#define HtmlTarget(file) file.html
+#define HtmlClean(file) file.nhtml file.html file*.png
+#else
+#define HtmlTarget(file) /**/
+#define HtmlClean(file) /**/
+#endif
+
+#ifdef PsToPdfCmd
+#define PdfTarget(file) file.pdf
+#define PdfClean(file) file.pdf
+#else
+#define PdfTarget(file) /**/
+#define PdfClean(file) /**/
+#endif
+
+#ifndef ConvertPsToPdf
+#ifdef PsToPdfCmd
+#define ConvertPsToPdf(file) @@\
+file.pdf: file.ps @@\
+ RemoveFile(file.pdf) @@\
+ $(PSTOPDFCMD) < file.ps > file.pdf
+#else
+#define ConvertPsToPdf(file) /**/
+#endif
+#endif
+
+#if HasPdfLatex
+#define PdfLatexTarget(file) file.pdf
+#define PdfLatexClean(file) file.pdf
+#else
+#define PdfLatexTarget(file) /**/
+#define PdfLatexClean(file) /**/
+#endif
+
+#ifndef LatexToPdf
+#if HasPdfLatex && defined(PdfLatexCmd)
+#define LatexToPdf(file) @@\
+file.pdf: file.tex @@\
+ RemoveFile(file.pdf) @@\
+ $(PDFLATEXCMD) file.tex
+#else
+#define LatexToPdf(file) /**/
+#endif
+#endif
+
+
+#ifndef MakeDepSimpleHtmlDoc
+#ifdef HTMLroffCmd
+#define MakeDepSimpleHtmlDoc(file,deps,srcs) @@\
+HtmlTarget(file): deps @@\
+ $(HTMLROFF) $(MSMACROS) $(XDOCMACROS) Concat(-P-I,file) srcs \ @@\
+ 2> index.raw > file.nhtml \ @@\
+ && PostProcessTroffHTML(file.nhtml,$@)
+#else
+#define MakeDepSimpleHtmlDoc(file,deps,srcs) /**/
+#endif
+#endif
+
+#ifndef MakeTblHtmlDoc
+#ifdef HTMLroffCmd
+#define MakeTblHtmlDoc(file,srcs) @@\
+file.html: srcs @@\
+ $(TBL) $(XDOCMACROS) srcs | $(HTMLROFF) $(MSMACROS) Concat(-P-I,file) \ @@\
+ 2> index.raw > file.nhtml \ @@\
+ && PostProcessTroffHTML(file.nhtml,$@)
+#else
+#define MakeTblHtmlDoc(file,srcs) /**/
+#endif
+#endif
+
+#ifndef MakeEqnHtmlDoc
+#ifdef HTMLroffCmd
+#define MakeEqnHtmlDoc(file,srcs) @@\
+file.html: srcs @@\
+ $(TBL) $(XDOCMACROS) srcs | $(EQN) | $(HTMLROFF) $(MSMACROS) Concat(-P-I,file) \ @@\
+ 2> index.raw > file.nhtml \ @@\
+ && PostProcessTroffHTML(file.nhtml,$@)
+#else
+#define MakeEqnHtmlDoc(file,srcs) /**/
+#endif
+#endif
+
+
+#ifndef MakeDepSimpleDoc
+#define MakeDepSimpleDoc(file,deps,srcs) @@\
+all:: file.ps file.txt HtmlTarget(file) PdfTarget(file) @@\
+.PRECIOUS: file.ps @@\
+ @@\
+file.ps: deps @@\
+ -$(TROFF) $(MSMACROS) $(XDOCMACROS) srcs \ @@\
+ 2> index.raw > file.nps \ @@\
+ && PostProcessTroffPS(file.nps,$@) @@\
+ @if grep '^[^1-9.]' index.raw | grep -v warning; then exit 1; \ @@\
+ else test $$? -le 1; fi @@\
+ @@\
+file.txt: deps @@\
+ $(NROFF) $(MSMACROS) $(XDOCMACROS) srcs 2> index.raw | \ @@\
+ $(COL) $(COLFLAGS) > $@ @@\
+ @@\
+MakeDepSimpleHtmlDoc(file,deps,srcs) @@\
+ @@\
+ConvertPsToPdf(file) @@\
+ @@\
+clean:: @@\
+ $(RM) index.raw file.nps file.ps file.txt HtmlClean(file) PdfClean(file)
+#endif
+
+#ifndef MakeSimpleDoc
+#define MakeSimpleDoc(file,srcs) MakeDepSimpleDoc(file,srcs,srcs)
+#endif
+
+#ifndef MakeTblDoc
+#define MakeTblDoc(file,srcs) @@\
+all:: file.ps file.txt HtmlTarget(file) PdfTarget(file) @@\
+.PRECIOUS: file.ps @@\
+ @@\
+file.ps: srcs @@\
+ -$(TBL) $(XDOCMACROS) srcs | $(TROFF) $(MSMACROS) \ @@\
+ 2> index.raw > file.nps \ @@\
+ && PostProcessTroffPS(file.nps,$@) @@\
+ @if grep '^[^1-9.]' index.raw | grep -v warning; then exit 1; \ @@\
+ else test $$? -le 1; fi @@\
+ @@\
+file.txt: srcs @@\
+ $(TBL) $(XDOCMACROS) srcs | $(NROFF) $(MSMACROS) 2> index.raw \ @@\
+ | $(COL) $(COLFLAGS) > $@ @@\
+ @@\
+MakeTblHtmlDoc(file,srcs) @@\
+ @@\
+ConvertPsToPdf(file) @@\
+ @@\
+clean:: @@\
+ $(RM) index.raw file.nps file.ps file.txt HtmlClean(file) PdfClean(file)
+#endif
+
+#ifndef MakeEqnDoc
+#define MakeEqnDoc(file,srcs) @@\
+all:: file.ps file.txt HtmlTarget(file) PdfTarget(file) @@\
+.PRECIOUS: file.ps @@\
+ @@\
+file.ps: srcs @@\
+ -$(TBL) $(XDOCMACROS) srcs | $(EQN) | $(TROFF) $(MSMACROS) \ @@\
+ 2> index.raw > file.nps \ @@\
+ && PostProcessTroffPS(file.nps,$@) @@\
+ @if grep '^[^1-9.]' index.raw | grep -v warning; then exit 1; \ @@\
+ else test $$? -le 1; fi @@\
+ @@\
+file.txt: srcs @@\
+ $(TBL) $(XDOCMACROS) srcs | $(NEQN) | $(NROFF) $(MSMACROS) \ @@\
+ 2> index.raw | $(COL) $(COLFLAGS) > $@ @@\
+ @@\
+MakeEqnHtmlDoc(file,srcs) @@\
+ @@\
+ConvertPsToPdf(file) @@\
+ @@\
+clean:: @@\
+ $(RM) index.raw file.nps file.ps file.txt HtmlClean(file) PdfClean(file)
+#endif
+
+#ifndef MakeDocIndex
+#define MakeDocIndex(file,srcs) @@\
+all:: file.idx.ps @@\
+ @@\
+file.idx.ps: srcs index.raw @@\
+ sed -n '$$p' index.raw > index.pageno @@\
+ grep '^[1-9]' index.raw | \ @@\
+ (sort -f '-t:' -k2,2 -k1,1n 2>/dev/null || \ @@\
+ sort -f '-t:' +1 -3 +0n -1n) | \ @@\
+ awk -f $(DOCUTILSRC)/fixindex.awk | \ @@\
+ awk -f $(DOCUTILSRC)/block.awk > index.troff @@\
+ cat srcs $(XIDXMACROS) index.troff | \ @@\
+ $(TROFF) -me > file.idx.nps && \ @@\
+ $(MV) file.idx.nps $@ @@\
+ $(RM) index.troff index.pageno @@\
+ @@\
+clean:: @@\
+ $(RM) index.troff index.pageno file.idx.nps file.idx.ps
+#endif
+
+#ifndef MakeLatexDoc
+#if HasLatex
+#define MakeLatexDoc(file,src) @@\
+all:: file.ps PdfLatexTarget(file) @@\
+ @@\
+file.dvi: src @@\
+ $(LATEX) src @@\
+ @@\
+file.ps: file.dvi @@\
+ $(DVIPS) -o file.nps file && $(MV) file.nps $@ @@\
+ @@\
+LatexToPdf(file) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(file.nps file.ps file.dvi file.log) @@\
+ RemoveFiles(file.aux file.toc file.lof file.lot) @@\
+ $(RM) PdfLatexClean(file)
+#else /* HasLatex */
+#define MakeLatexDoc(file,src) @@\
+all:: @@\
+file.ps: src @@\
+ @echo "cannot make file.ps: no latex on this system"; exit 1
+#endif /* HasLatex (else) */
+#endif /* MakeLatexDoc */
+
+#ifndef InstallDoc
+#define InstallDoc(name,deps) @@\
+install:: deps @@\
+ MakeDir($(DESTDIR)$(DOCPSDIR)) @@\
+ @if [ -f name.ps -a X$(NOPS) = X ]; then set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.ps \ @@\
+ $(DESTDIR)$(DOCPSDIR); \ @@\
+ fi ; RemoveOldFile(name.ps,name.PS,$(DOCPSDIR)) @@\
+ MakeDir($(DESTDIR)$(DOCDIR)) @@\
+ @if [ -f name.txt -a X$(NOTXT) = X ]; then set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.txt \ @@\
+ $(DESTDIR)$(DOCDIR); \ @@\
+ fi ; RemoveOldFile(name.txt,name.TXT,$(DOCDIR)) @@\
+ MakeDir($(DESTDIR)$(DOCHTMLDIR)) @@\
+ @if [ -f name.html -a X$(NOHTML) = X ]; then (set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.html \ @@\
+ $(DESTDIR)$(DOCHTMLDIR)); \ @@\
+ for i in name*.png; do \ @@\
+ if [ -f $$i ]; then (set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) $$i \ @@\
+ $(DESTDIR)$(DOCHTMLDIR)); \ @@\
+ fi; \ @@\
+ done; \ @@\
+ fi @@\
+ MakeDir($(DESTDIR)$(DOCPDFDIR)) @@\
+ @if [ -f name.pdf -a X$(NOPDF) = X ]; then set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) name.pdf \ @@\
+ $(DESTDIR)$(DOCPDFDIR); \ @@\
+ fi
+#endif
+
+#ifndef InstallRoffDoc
+#define InstallRoffDoc(name) InstallDoc(name,name.ps name.txt)
+#endif
+
+#ifndef InstallLatexDoc
+#if HasLatex
+#define InstallLatexDoc(name) InstallDoc(name,name.ps)
+#else
+#define InstallLatexDoc(name)
+#endif
+#endif
+
+#ifndef LinkHardcopyPS
+# if CaseSensitiveFileSystem
+# define LinkHardcopyPS(name) \
+ @if [ -f name.PS ]; then set -x; \ @@\
+ RemoveFile(name.ps); \ @@\
+ $(LN) name.PS name.ps; \ @@\
+ fi
+# else
+# define LinkHardcopyPS(name)
+# endif
+#endif
+
+
+#ifndef InstallHardcopyDoc
+#define InstallHardcopyDoc(name,deps) @@\
+all:: name.ps PdfTarget(name) @@\
+ @@\
+name.ps: deps @@\
+ @if [ -f name.PS.gz ]; then set -x; \ @@\
+ RemoveFile(name.ps); \ @@\
+ gzip -d < name.PS.gz > name.ps; \ @@\
+ fi @@\
+ LinkHardcopyPS(name) @@\
+ @@\
+ConvertPsToPdf(name) @@\
+ @@\
+clean:: @@\
+ $(RM) name.ps PdfClean(name) @@\
+ @@\
+InstallDoc(name,deps)
+#endif
+
+/*
+ * Rule for maintainers to use to updated generated copies of fonts in the
+ * source tree. Use with care.
+ */
+
+#ifndef UpdateDerivedFont
+#define UpdateDerivedFont(src,dst) @@\
+update.fonts:: src @@\
+ -@if [ -f dst ]; then \ @@\
+ if [ "$(FORCEUPDATE)" = yes ]; then \ @@\
+ if [ "$(FOLLOWLINK)" = no ]; then \ @@\
+ (set -x; $(RM) dst); \ @@\
+ fi; \ @@\
+ set -x; cp src dst; \ @@\
+ else \ @@\
+ grep -v "XFree86:" src > __tmp1__; \ @@\
+ grep -v "XFree86:" dst > __tmp2__; \ @@\
+ if diff __tmp1__ __tmp2__ > /dev/null 2>&1; then :; \ @@\
+ else \ @@\
+ if [ "$(FOLLOWLINK)" = no ]; then \ @@\
+ (set -x; $(RM) dst); \ @@\
+ fi; \ @@\
+ set -x; cp src dst; \ @@\
+ fi; \ @@\
+ fi; \ @@\
+ fi @@\
+ @$(RM) __tmp1__ __tmp2__
+#endif
+
+#if !HasFreetype2
+ FT2PRELOADPATTERN = libfreetype.so.?
+#endif
+#if !HasFontconfig
+ FCPRELOADPATTERN = libfontconfig.so.?
+#endif
+ XFTPRELOADPATTERN = libXft.so.?
+ XRENDERPRELOADPATTERN = libXrender.so.?
+ XFONTPRELOADPATTERN = libXfont*.so.?
+
diff --git a/nx-X11/config/cf/apollo.cf b/nx-X11/config/cf/apollo.cf
new file mode 100644
index 000000000..8a5196295
--- /dev/null
+++ b/nx-X11/config/cf/apollo.cf
@@ -0,0 +1,38 @@
+XCOMM platform: $Xorg: apollo.cf,v 1.3 2000/08/17 19:41:46 cpqbld Exp $
+
+/*
+ * Minimally tested, and only in the bsd4.3 environment. X_NOT_POSIX is not
+ * in Xosdefs.h, because we suspect someone might want to try building with
+ * POSIX support in the sysv environment (the OS doc seems to imply that
+ * POSIX is supported in sysv).
+ */
+
+#ifndef OSName
+#define OSName Domain/OS SR10.3
+#endif
+XCOMM operating system: OSName
+#ifndef OSMajorVersion
+#define OSMajorVersion 10
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 3
+#endif
+
+#ifndef CCompilerMajorVersion
+#define CCompilerMajorVersion 6
+#endif
+#ifndef CCompilerMinorVersion
+#define CCompilerMinorVersion 8
+#endif
+
+#define StandardDefines -DX_NOT_POSIX
+#define BuildServer NO
+#define HasNdbm YES
+#define ConnectionFlags -DTCPCONN
+
+#define InstallManPageLong(file,destdir,dest) @@\
+install.man:: file.man @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ $(NROFF) $(MANMACROS) file.man > file.mantxt @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.mantxt $(DESTDIR)destdir/dest.$(MANSUFFIX) @@\
+ $(RM) file.mantxt
diff --git a/nx-X11/config/cf/bsd.cf b/nx-X11/config/cf/bsd.cf
new file mode 100644
index 000000000..d47839341
--- /dev/null
+++ b/nx-X11/config/cf/bsd.cf
@@ -0,0 +1,37 @@
+XCOMM platform: $Xorg: bsd.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/bsd.cf,v 1.2 1998/09/06 04:46:50 dawes Exp $
+
+#ifndef OSName
+#define OSName 4.3bsd
+#endif
+XCOMM operating system: OSName
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 3
+#endif
+
+#define BootstrapCFlags -DNOSTDHDRS
+#define StandardDefines -DNOSTDHDRS -DCSRG_BASED
+#define HasVoidSignalReturn NO
+#define HasBsearch NO
+#define DirFailPrefix -
+#define AvoidNullMakeCommand YES
+
+#define BuildServer NO
+
+#ifdef VaxArchitecture
+#define UnalignedReferencesAllowed YES /* if arbitrary deref is okay */
+#endif
+
+#if OSMajorVersion >= 4 && OSMinorVersion >= 3
+#define SetTtyGroup YES
+#endif
+
+#if OSMajorVersion==4 && OSMinorVersion>=2
+#define HasUsableFileMmap YES
+#endif
diff --git a/nx-X11/config/cf/bsdLib.rules b/nx-X11/config/cf/bsdLib.rules
new file mode 100644
index 000000000..b293b3fa2
--- /dev/null
+++ b/nx-X11/config/cf/bsdLib.rules
@@ -0,0 +1,540 @@
+XCOMM $Xorg: bsdLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+
+
+XCOMM $XFree86: xc/config/cf/bsdLib.rules,v 3.27 2003/11/20 00:41:37 dawes Exp $
+/*
+ * NetBSD/FreeBSD shared library rules
+ */
+
+#ifndef UseElfFormat
+#define UseElfFormat NO
+#endif
+
+#if !UseElfFormat
+/* a.out shared libs */
+#ifndef HasSharedLibraries
+# ifndef Arm32Architecture
+# define HasSharedLibraries YES
+# endif
+#endif
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef -DBSDSHLIB
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <bsdLib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -Bshareable
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -fpic
+#endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest
+@@\
+
+#endif /* InstallSharedLibrary */
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedDepLibraryTarget */
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ @@\
+ $(LD) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name
+
+#endif /* SharedDepModuleTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryDataTarget */
+
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+/*
+ * SharedLibReferences - variables for shared libraries
+ */
+#ifndef SharedLibReferences
+#define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
+revname = rev @@\
+Concat3(DEP,varname,LIB) = SharedLibDependencies(libname,libsource,revname) @@\
+Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) @@\
+LintLibReferences(varname,libname,libsource)
+#endif
+
+ /*
+ * SharedFontLibReferences - shared font libraries
+ */
+#ifndef SharedFontLibReferences
+#define SharedFontLibReferences() @@\
+SOFONTREV = SharedFontRev @@\
+DEPFONTLIB = SharedLibDependencies(Xfont,$(FONTLIBSRC),SOFONTREV) @@\
+FONTLIB = -L$(FREETYPELIBDIR) -L$(FONTLIBSRC) LoaderLibPrefix -lXfont @@\
+LintLibReferences(XFONT,Xfont,$(FONTLIBSRC))
+#endif
+
+/*
+ * SharedDSLibReferences - variables for shared libraries
+ */
+#ifndef SharedDSLibReferences
+#define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\
+revname = rev @@\
+Concat3(DEP,varname,LIB) = SharedDSLibDependencies(libname,libsource,revname) @@\
+Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) Concat3(Shared,libname,Reqs) @@\
+LintLibReferences(varname,libname,libsource)
+#endif
+
+#else /* UseElfFormat */
+
+/*
+ * NetBSD/FreeBSD (ELF) shared library rules
+ * Cloned from Linux ELF rules, with the following major change:
+ *
+ * Shared libraries depend on -lc. Since we don't have to worry
+ * about libc vs. libg, etc., this is a good idea. (This is actually
+ * implied by using $(CC) to build the shared libraries.) Adding it
+ * explicitly will break threaded applications on platforms that use
+ * libc_r for thread support.
+ */
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+#ifndef ForceNormalLib
+#define ForceNormalLib YES
+#endif
+
+#ifndef UseRpath
+#define UseRpath YES
+#endif
+
+#ifndef BaseShLibReqs
+#define BaseShLibReqs /* -lc */
+#endif
+
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <bsdLib.tmpl>
+#endif
+#ifndef RpathLoadFlags
+#if UseRpath
+#define RpathLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
+#else
+#define RpathLoadFlags /**/
+#endif
+#endif
+#ifndef LibraryRpathLoadFlags
+#define LibraryRpathLoadFlags RpathLoadFlags
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -shared LibraryRpathLoadFlags
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -fPIC
+#endif
+#ifndef PositionIndependentCplusplusFlags
+#define PositionIndependentCplusplusFlags -fPIC
+#endif
+#ifndef ExtraLoadFlags
+#ifdef UseInstalled
+#define ExtraLoadFlags RpathLoadFlags
+#else
+#define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(BUILDLIBDIR)
+#endif
+#endif
+
+#ifndef HardCodeLibdirFlag
+#define HardCodeLibdirFlag RpathLoadFlags
+#endif
+
+#if !defined(ShlibGlobalsFlags)
+#define ShlibGlobalsFlags -Wl,-Bsymbolic
+#endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ * NOTE: file must be executable, hence "INSTBINFLAGS"
+ */
+#ifndef FreeBSDArchitecture
+INSTALLMINORREV = true
+#else
+INSTALLMINORREV = false
+#endif
+
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @T=`echo Concat(lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`;\ @@\
+ if $(INSTALLMINORREV); then \ @@\
+ INST=Concat(lib,libname.so.rev); \ @@\
+ LINK=$$T; \ @@\
+ else \ @@\
+ INST=$$T; \ @@\
+ fi; \ @@\
+ (set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) $$INST $(DESTDIR)dest); \ @@\
+ if [ X"$$LINK" != X ]; then (set -x; \ @@\
+ $(RM) $(DESTDIR)dest/$$LINK; \ @@\
+ $(LN) $$INST $(DESTDIR)dest/$$LINK); \ @@\
+ fi; \ @@\
+ if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\
+ $(LN) $$T Concat($(DESTDIR)dest/lib,libname.so)); \ @@\
+ fi
+#endif /* InstallSharedLibrary */
+
+#ifndef InstallSharedLibtoolLibrary
+
+#define SetRevisions(rev) V=`expr rev : '\([^:]*\)'`; \ @@\
+ R=`expr rev : '.*:\([^:]*\):'`; \ @@\
+ A=`expr rev : '.*:\([^:]*\)'`; \ @@\
+ REV=$$V; \ @@\
+ REVLIST=""; \ @@\
+ i=$$A; \ @@\
+ while [ $$i -gt 0 ]; do \ @@\
+ REVLIST="$$REVLIST `expr $$REV - $$i`"; \ @@\
+ i=`expr $$i - 1`; \ @@\
+ done
+
+#define InstallSharedLibtoolLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @set +e; SetRevisions(rev); \ @@\
+ set -e; \ @@\
+ T=Concat(lib,libname.so.$$REV); \ @@\
+ if $(INSTALLMINORREV); then \ @@\
+ INST=$$T.0; \ @@\
+ LINK=$$T; \ @@\
+ else \ @@\
+ INST=$$T; \ @@\
+ fi; \ @@\
+ (set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) $$INST $(DESTDIR)dest); \ @@\
+ if [ X"$$LINK" != X ]; then (set -x; \ @@\
+ $(RM) $(DESTDIR)dest/$$LINK; \ @@\
+ $(LN) $$INST $(DESTDIR)dest/$$LINK); \ @@\
+ fi; \ @@\
+ for i in $$REVLIST; do (set -x; \ @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so.$$i); \ @@\
+ $(LN) Concat(lib,libname.so.$$REV) Concat($(DESTDIR)dest/lib,libname.so.$$i)); \ @@\
+ done; \ @@\
+ if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\
+ $(LN) Concat(lib,libname.so.$$REV) Concat($(DESTDIR)dest/lib,libname.so)); \ @@\
+ fi
+#endif /* InstallSharedLibtoolLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ (set -x; cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ (set -x; $(RM) $$SONAME; $(LN) $@ $$SONAME); \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) $$SONAME @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedLibraryTarget */
+
+#ifndef SharedLibtoolLibraryTarget
+#define SharedLibtoolLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so)) @@\
+ @@\
+Concat(lib,libname.so): solist @@\
+ $(RM) $@~ @@\
+ @set +e; SetRevisions(rev); \ @@\
+ SONAME=$@.$$REV; \ @@\
+ set -e; \ @@\
+ (set -x; cd down; $(CC) -o up/$$SONAME~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ (set -x; $(RM) $$SONAME; $(MV) $$SONAME~ $$SONAME); \ @@\
+ LinkBuildSonameLibrary($$SONAME); \ @@\
+ if $(INSTALLMINORREV); then (set -x; \ @@\
+ $(RM) $$SONAME.0; \ @@\
+ $(LN) $$SONAME $$SONAME.0); \ @@\
+ fi; \ @@\
+ if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) $@; \ @@\
+ $(LN) $$SONAME $@); \ @@\
+ LinkBuildLibraryInline($@); \ @@\
+ fi @@\
+ @@\
+clean:: @@\
+ @set +e; SetRevisions(rev); \ @@\
+ set -xe; \ @@\
+ $(RM) Concat(lib,libname.so.$$REV); \ @@\
+ $(RM) Concat(lib,libname.so.$$REV.0) @@\
+ $(RM) Concat(lib,libname.so)
+
+#endif /* SharedLibtoolLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\
+ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) $$SONAME @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedDepCplusplusLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepCplusplusLibraryTarget
+#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\
+ (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) $$SONAME @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedDepCplusplusLibraryTarget */
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ @@\
+ $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name
+
+#endif /* SharedDepModuleTarget */
+
+#ifndef SharedDriModuleTarget
+#define SharedDriModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ $@.map @@\
+ @(echo 'DRI_MODULE { global: __dri*; local: *; };' > $@.map) @@\
+ $(CC) -o $@~ -Wl,--version-script=$@.map $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ $(RM) $@ $@.map @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name @@\
+ $(RM) name.map
+
+#endif /* SharedDriModuleTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
+
+#if defined(FreeBSDArchitecture)
+
+/*
+ * Support for building a.out compatibility libraries on a FreeBSD/ELF system.
+ */
+#ifndef BuildAoutLibraries
+#define BuildAoutLibraries NO
+#endif
+
+#if BuildAoutLibraries
+
+#define ExtraLibRules
+
+#ifndef AoutSharedLibraryDef
+#define AoutSharedLibraryDef -DBSDSHLIB
+#endif
+#ifndef AoutSharedLibraryLoadFlags
+#define AoutSharedLibraryLoadFlags -aout -Bshareable
+#endif
+#ifndef AoutPositionIndependentCFlags
+#define AoutPositionIndependentCFlags -fpic
+#endif
+
+/*
+ * InstallAoutSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallAoutSharedLibrary
+#define InstallAoutSharedLibrary(libname,rev,dest) @@\
+install:: Concat(aout/lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) Concat(aout/lib,libname.so.rev) $(DESTDIR)dest
+@@\
+
+#endif /* InstallAoutSharedLibrary */
+
+/*
+ * AoutSharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef AoutSharedLibraryTarget
+#define AoutSharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(down/lib,libname.so.rev)) @@\
+ @@\
+Concat(down/lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(LD) -o up/$@~ AoutSharedLibraryLoadFlags solist) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(down/lib,libname.so.rev)
+
+#endif /* AoutSharedLibraryTarget */
+
+#define AoutCDebugFlags -aout DefaultCDebugFlags
+#define AoutCplusplusDebugFlags -aout DefaultCplusplusDebugFlags
+
+#define AoutLibObjCompile(options) LibObjCompile(aout,AoutCDebugFlags AoutSharedLibraryDef AoutPositionIndependentCFlags options)
+#define AoutLibObjCplusplusCompile(options) LibObjCompile(aout,AoutCplusplusDebugFlags options)
+
+#define ExtraLibMkdir() _LibMkdir(aout)
+#define ExtraObjCompile(options) AoutLibObjCompile(options)
+#define ExtraObjCplusplusCompile(options) AoutLibObjCplusplusCompile(options)
+#define ExtraCleanDir() LibCleanDir(aout)
+
+#define ExtraLibraryTarget(libname,so,objs) AoutSharedLibraryTarget(libname,so,objs,aout,..)
+#define ExtraInstallLibrary(libname,so) InstallAoutSharedLibrary(libname,so,$(SHLIBDIR)/aout)
+
+#endif
+#endif
+
+
+#endif /* UseElfFormat */
diff --git a/nx-X11/config/cf/bsdLib.tmpl b/nx-X11/config/cf/bsdLib.tmpl
new file mode 100644
index 000000000..8d55581e3
--- /dev/null
+++ b/nx-X11/config/cf/bsdLib.tmpl
@@ -0,0 +1,100 @@
+XCOMM $Xorg: bsdLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+XCOMM $XFree86: xc/config/cf/bsdLib.tmpl,v 3.23 2003/11/04 01:59:31 dawes Exp $
+
+/*
+ * NetBSD/FreeBSD/OpenBSD shared library template
+ */
+
+#if !UseElfFormat
+
+#ifndef SharedXlibi18nReqs
+#define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
+#endif
+
+#ifndef SharedXtReqs
+#define SharedXtReqs /**/
+#endif
+#ifndef SharedXawReqs
+#define SharedXawReqs /**/
+#endif
+#ifndef SharedXmuReqs
+# if !defined(Mc68020Architecture) || !defined(OpenBSDArchitecture)
+# define SharedXmuReqs $(LDPRELIBS) $(XTOOLONLYLIB) $(XONLYLIB)
+# else
+ /* At least the hp300 and the sun3 OpenBSD ports need that */
+# define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB)
+# endif
+#endif
+#ifndef SharedXcursorReqs
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#endif
+
+#else /* UseElfFormat */
+
+/*
+ * NetBSD/FreeBSD/OpenBSD (ELF) shared library template
+ * Cloned from Linux ELF rules, but with a minor number.
+ */
+
+#ifndef FixupLibReferences
+#define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef XawClientLibs
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+/* Allow for libpthread, as overridden by OS definitions */
+#if !defined(SharedX11Reqs)
+#define SharedX11Reqs
+#endif
+
+#define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedOldXReqs $(LDPRELIBS) $(XONLYLIB)
+#ifndef SharedXtReqs
+#define SharedXtReqs $(LDPRELIBS) $(XONLYLIB) $(SMLIB) $(ICELIB)
+#endif
+#ifndef SharedXawReqs
+#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#endif
+#define SharedXaw7Reqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB)
+#define SharedXmuuReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXextReqs $(LDPRELIBS) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIBS) $(XLIB)
+#define SharedXpReqs $(LDPRELIB) $(XLIB)
+#define SharedXpmReqs $(LDPRELIB) $(XLIB)
+#define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+#define SharedXtstReqs $(LDPRELIBS) $(XLIB)
+#define SharedXvReqs $(LDPRELIB) $(XLIB)
+#define SharedSMReqs $(LDPRELIBS) $(ICELIB)
+#ifndef SharedGLReqs
+#define SharedGLReqs $(LDPRELIBS) $(XLIB)
+#endif
+#ifndef SharedGLUReqs
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#endif
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+
+#define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIB)
+#define SharedpsresReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXResReqs $(LDPRELIB) $(XLIB)
+#define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+#define SharedXineramaReqs $(LDPRELIB) $(XLIB)
+#define SharedXssReqs $(LDPRELIB) $(XLIB)
+#define SharedXvMCReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB)
+#define SharedXfixesReqs $(LDPRELIB) $(XLIB)
+#define SharedXdamageReqs $(LDPRELIB) $(XFIXESLIB) $(XLIB)
+#define SharedXcompositeReqs $(LDPRELIB) $(XDAMAGELIB) $(XFIXESLIB) $(XLIB)
+#define SharedXevieReqs $(LDPRELIB) $(XLIB)
+#endif /* UseElfFormat */
diff --git a/nx-X11/config/cf/bsdi.cf b/nx-X11/config/cf/bsdi.cf
new file mode 100644
index 000000000..d0d78ee3d
--- /dev/null
+++ b/nx-X11/config/cf/bsdi.cf
@@ -0,0 +1,364 @@
+XCOMM platform: $Xorg: bsdi.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/bsdi.cf,v 3.37 2003/04/24 22:14:53 herrb Exp $
+#ifndef OSName
+#define OSName DefaultOSName
+#endif
+#ifndef OSVendor
+#define OSVendor BSDI
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+#define HasBSD44Sockets YES
+#define HasBsdMake YES
+#define HasDlopen YES
+#define HasPutenv YES
+#define HasSnprintf YES
+#define HasMkstemp YES
+#define HasUsableFileMmap YES
+#define HasZlib YES
+#define HasSetUseContext YES
+#define HasBSDAuth YES
+#define HasSetProcTitle YES
+#define HasBasename NO
+
+#if 0
+#define HasKrb5 YES
+#define Krb5Include -I/usr/include/krb5
+#define Krb5Libraries -lkrb5 -lk5crypto -lprofile -lcom_err
+#endif
+
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB) -lstdc++
+
+#if (OSMajorVersion == 4 && OSMinorVersion >= 1) || (OSMajorVersion > 4)
+#define HasNCurses YES
+#else
+#define HasNCurses NO
+#endif
+#if (OSMajorVersion == 4 && OSMinorVersion >= 3) || (OSMajorVersion > 4)
+#define HasStrlcat YES
+#else
+#define HasStrlcat NO
+#endif
+
+#define BuildLBX YES
+#define GzipFontCompression YES
+#define BuildXaw6 NO
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+XCOMM BSD/OS 5.1 (intel) comes with gcc 3.2.2 installed as gcc and cc.
+
+XCOMM BSD/OS 5.0 (intel) comes with gcc 2.95.3 installed as gcc and cc.
+
+XCOMM BSD/OS 4.3/4.3.1 (intel) comes with gcc 2.95.3 installed as gcc and cc.
+
+XCOMM BSD/OS 4.2 (intel) comes with gcc 2.95.2 installed as gcc and cc.
+XCOMM BSD/OS 4.2 (sparc) comes with gcc 2.95.2 installed as gcc and cc.
+
+XCOMM BSD/OS 4.1 (intel) comes with gcc 2.91.66 installed as gcc and cc.
+XCOMM BSD/OS 4.1 (sparc) comes with gcc 2.95.2 installed as gcc and cc.
+
+XCOMM BSD/OS 4.0.1 (intel) comes with gcc 2.7.2.1 installed as gcc2, gcc and cc.
+XCOMM BSD/OS 4.0.1 (sparc) comes with gcc 2.7.2.1 installed as gcc2, gcc and cc.
+XCOMM Punt on OS revs earlier than 4.0.1
+
+XCOMM BSDI uses shlicc for compiling C and shlic++ for compiling C++
+XCOMM using static shared libraries. We also build ELF dynamic shared
+XCOMM libraries as well as normal archive libraries.
+
+XCOMM BSD/OS 3.0 comes with gcc 2.7.2 installed as gcc2 and gcc.
+XCOMM gcc 1.42 is installed as cc.
+
+XCOMM BSD/OS 2.1 comes with gcc 2.7.1 installed as gcc2 and gcc.
+XCOMM gcc 1.42 is installed as cc.
+
+XCOMM BSD/OS 2.0 comes with gcc 2.6.3 installed as gcc2 and gcc.
+XCOMM gcc 1.42 is installed as cc.
+
+XCOMM BSD/386 1.1 comes with gcc 2.5.8 installed as gcc2.
+XCOMM BSD/386 1.0 comes with gcc 1.40 as the only compiler.
+XCOMM The default is to use gcc2 on release 2.1, 2.0 and 1.1 and gcc1 on 1.0
+XCOMM The defaults can be altered by defining "HasGcc2" as YES or NO in
+XCOMM xf86site.def
+
+#ifndef HasGcc
+# define HasGcc YES
+#endif
+#if OSMajorVersion > 1 || OSMinorVersion >= 1
+# ifndef HasGcc2
+# define HasGcc2 YES
+# endif
+#endif
+#if HasGcc2
+# ifndef HasGcc2ForCplusplus
+# define HasGcc2ForCplusplus YES
+# endif
+# ifdef i386Architecture
+# define CcCmd gcc /* shlicc */
+# define CplusplusCmd g++ /* shlicc++ */
+# if ((OSMajorVersion == 4 && OSMinorVersion >= 2) || (OSMajorVersion > 4))
+# define OptimizedCDebugFlags -O3 -mcpu=pentiumpro -march=pentium
+# else
+# define OptimizedCDebugFlags -O2 -m486
+# endif
+# endif
+# ifdef PpcArchitecture
+# define CcCmd gcc
+# define CplusplusCmd g++
+# define OptimizedCDebugFlags -O2
+# endif
+# ifdef SparcArchitecture
+# define CcCmd gcc
+# define CplusplusCmd g++
+# define OptimizedCDebugFlags -O2 -cpu=v8 -mtune=v8
+# endif
+#else
+# define CcCmd cc
+# define OptimizedCDebugFlags -O
+#endif
+
+/*
+ * A hack to work around an optimization problem with GCC 2.95.2 - 2.95.4
+ */
+#if ((OSMajorVersion == 4 && OSMinorVersion >= 2) || (OSMajorVersion > 4))
+#define GccOptBug295
+#endif
+
+#define CppCmd /usr/bin/cpp
+#define HasGroff YES
+#define MkdirHierCmd mkdir -p
+#define SetTtyGroup YES
+#define HasNdbm YES
+#define DBMLibrary /**/
+#define HasWChar32 YES
+#define DirFailPrefix -
+#define AvoidNullMakeCommand YES
+#define HasVarRun YES
+#define HasVarDb YES
+
+# ifndef GccUsesGas
+# define GccUsesGas YES
+# endif
+#if HasGcc
+#ifndef DefaultCCOptions
+#if defined(UseInstalled) && (!defined(XF86LinkKit) || !XF86LinkKit)
+#define DefaultCCOptions /**/
+#else
+#define DefaultCCOptions /* -ansi */
+#endif
+#endif
+#endif
+
+#if GccUsesGas
+# define GccGasOption -DGCCUSESGAS
+#else
+# define GccGasOption /**/
+#endif
+
+/*
+ * Build a threaded X server on BSD/OS 4.1 and newer releases
+ */
+#if (OSMajorVersion == 4 && OSMinorVersion >= 1) || (OSMajorVersion > 4)
+#define HasPosixThreads YES /* this will autodefine HasThreadedX */
+#define HasThreadSafeAPI YES
+/*
+ * Heck, build a server that can load modules too...
+ */
+#define DoLoadableServer Yes
+#endif
+
+XCOMM math.h uses _REENTRANT in FreeBSD, so we define it here too
+#if (OSMajorVersion >= 5)
+#define SystemMTDefines -D_REENTRANT -D_THREAD_SAFE -D_POSIX_THREAD_SAFE_FUNCTIONS
+#elif (OSMajorVersion == 4 && OSMinorVersion >= 1)
+#define SystemMTDefines -D_REENTRANT -D_THREAD_SAFE
+#endif
+
+
+#ifdef i386Architecture
+#ifndef BuildXF86DRI
+#define BuildXF86DRI NO
+#endif
+#endif
+
+#ifdef i386Architecture
+# define HasTk YES
+# define TkLibName tk4.2
+# define TkLibDir /usr/contrib/lib
+# define TkIncDir /usr/include
+# define XF86SetupUsesStaticTk NO
+# define HasTcl YES
+# define TclLibName tcl7.6
+# define TclLibDir /usr/contrib/lib
+# define TclIncDir /usr/include
+# define XF86SetupUsesStaticTcl NO
+# define SharedLibXv YES
+# define SharedLibXinerama YES
+# define ServerExtraDefines GccGasOption XFree86ServerDefines -I/sys
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define XFree86ConsoleDefines -DBSDI_VT
+# if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion >= 1)
+# include <bsdiLib.rules>
+# define DontUseLibPathVar
+# define BuildDynamicLoading YES
+# define ServerCcCmd cc
+# define ServerExtraSysLibs DlLibrary
+# endif
+# define XConfigDir /etc/X11
+#endif
+
+#ifdef PpcArchitecture
+# define BuildServer NO
+# define BuildFonts NO
+# define XConfigDir /etc/X11
+# include <bsdiLib.rules>
+# define DontUseLibPathVar
+# define BuildDynamicLoading YES
+# define ServerCcCmd cc
+# define ServerExtraSysLibs DlLibrary
+#endif
+
+#ifdef SparcArchitecture
+# define ServerExtraDefines
+# define ServerOSDefines -DDDXOSINIT
+#endif
+
+#define HasShm YES
+#define AsmDefines -DUSE_GAS
+
+#ifndef LdPreLib
+#define LdPreLib -L$(BUILDLIBDIR) -L$(USRLIBDIR)
+#endif
+
+#if OSMajorVersion >= 4
+#define StandardDefines -D__ELF__ -DCSRG_BASED
+#else
+#define StandardDefines -DCSRG_BASED
+#endif
+
+#define InstallCmd /usr/bin/install
+#define EqnCmd eqn -Tps
+#define NeqnCmd eqn -Tascii
+ COL = col
+ NEQN = NeqnCmd
+ NROFF = nroff
+
+#define DefaultUserPath :/bin:/usr/bin:/usr/local/bin:$(BINDIR)
+#define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
+
+#define StripInstalledPrograms YES
+#define InstPgmFlags -s -m 0555 -o bin -g bin
+#define InstBinFlags -m 0555 -o bin -g bin
+#define InstUidFlags -m 4555 -o root -g bin
+#define InstLibFlags -m 0444 -o bin -g bin
+#define InstIncFlags -m 0444 -o bin -g bin
+#define InstManFlags -m 0444 -o bin -g bin
+#define InstDatFlags -m 0444 -o bin -g bin
+
+XCOMM Man pages need to be formatted when installed, so override the default
+XCOMM imake rules.
+
+#define ManSuffix 1
+#define ManSourcePath $(MANPATH)/cat
+
+#define InstallManPageLong(file,destdir,dest) @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+all:: file.0 @@\
+ @@\
+file.0:: file.$(MANNEWSUFFIX) @@\
+ @if [ -f file.$(MANNEWSUFFIX) ]; \ @@\
+ then \ @@\
+ cat file.$(MANNEWSUFFIX) | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) >/tmp/$$$$.man; \ @@\
+ cp /tmp/$$$$.man file.0; \ @@\
+ $(RM) /tmp/$$$$.man; \ @@\
+ fi @@\
+ @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ -@if [ -f file.0 ]; \ @@\
+ then \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/dest.0; \@@\
+ fi
+
+#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
+ InstallManPageLong(file,destdir,dest)
+
+#define InstallMultipleManSuffix(list,dest,suff) @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (set -x; \ @@\
+ cat $$i.suff | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) >/tmp/$$$$.suff; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/$$$$.suff $(DESTDIR)dest/$$i.0; \ @@\
+ $(RM) /tmp/$$$$.suff); \ @@\
+ done
+
+#define InstallMultipleMan(list,dest) @@\
+ InstallMultipleManSuffix(list,dest,man)
+
+#define InstallManPageAliases(file,destdir,aliases) @@\
+install.man:: @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in aliases; do \ @@\
+ (set -x; \ @@\
+ $(RM) $(DESTDIR)destdir/$$i.0;\ @@\
+ (cd $(DESTDIR)destdir; $(LN) file.0 $$i.0);\ @@\
+ ); \ @@\
+ done
+
+#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
+ InstallManPageAliases(file,destdir,aliases)
+
+/*
+ * These seem redundant, but leave them in for now.
+ */
+#ifdef i386Architecture
+#define i386Bsd 1
+#define i386Bsdi 1
+#include <xorg.cf>
+#endif
+
+#ifdef SparcArchitecture
+#ifndef XsunMonoServer
+#define XsunMonoServer NO /* monochrome only */
+#endif
+#ifndef XsunServer
+#define XsunServer YES /* mono + 8 bit color */
+#endif
+#ifndef Xsun24Server
+#define Xsun24Server NO /* mono + 8 bit color + 24 bit c
+olor */
+#endif
+
+#ifndef NeedConstPrototypes
+#define NeedConstPrototypes YES
+#endif
+#ifndef NeedNestedPrototypes
+#define NeedNestedPrototypes YES
+#endif
+#ifndef NeedVarargsPrototypes
+#define NeedVarargsPrototypes YES
+#endif
+
+#ifndef BuildXKB
+#define BuildXKB YES
+#endif
+
+#endif /* SparcArchitecture */
+
diff --git a/nx-X11/config/cf/bsdiLib.rules b/nx-X11/config/cf/bsdiLib.rules
new file mode 100644
index 000000000..85a99521f
--- /dev/null
+++ b/nx-X11/config/cf/bsdiLib.rules
@@ -0,0 +1,239 @@
+XCOMM $XFree86: xc/config/cf/bsdiLib.rules,v 3.3 2003/10/09 22:43:18 herrb Exp $
+
+/*
+ * BSDI shared library rules (converted from SVr4/Linux rules)
+ */
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+#ifndef ForceNormalLib
+#define ForceNormalLib YES
+#endif
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <bsdiLib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -shared
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -fPIC
+#endif
+#ifndef PositionIndependentCplusplusFlags
+#define PositionIndependentCplusplusFlags -fPIC
+#endif
+#ifndef BaseShLibReqs
+#define BaseShLibReqs -lc
+#endif
+#ifndef RanlibInstFlags
+#define RanlibInstFlags -t
+#endif
+#ifndef SharedCCLdCmd
+/* NOT $(CC), which is probably 'shlicc'. */
+#define SharedCCLdCmd cc
+#endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\
+ $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\
+ (cd down; $(CCENVSETUP) SharedCCLdCmd -o up/$@~ $(SHLIBLDFLAGS) \
+ -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) $$SONAME @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\
+ (cd down; $(CCENVSETUP) SharedCCLdCmd -o up/$@~ $(SHLIBLDFLAGS) \
+ -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ @SONAME=`echo Concat(lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) $$SONAME @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedDepLibraryTarget */
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ @@\
+ $(CCENVSETUP) SharedCCLdCmd -o $@~ $(SHLIBLDFLAGS) \
+ solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name
+
+#endif /* SharedDepModuleTarget */
+
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
+
+/*
+ * Hacks for BSD/OS static shared libraries.
+ * We replace the normal library build and install rules.
+ */
+
+SHLIB_MAP=$${SHLIB_MAP-/etc/shlib.map}
+
+#define BsdiStaticLibraryName(libname)Concat(Concat(lib,libname),_s)
+#define BsdiStaticStubLibraryName(libname)BsdiStaticLibraryName(libname).a
+
+#define MakeBsdiStaticSharedLibrary(libname) \
+ @SHARED=; \
+ eval $$( (echo 'MAP() { [ "X$$1" = "X-l'libname'" ] || return 0;' \
+ 'echo "TADDR=$$2;";' \
+ 'echo "DADDR=$$3;";' \
+ 'echo "SHARED=$$5;";' \
+ 'shift 5; echo "ARGS='"'"'"$$@"'"'"';";' \
+ 'exit 0; }'; cat $(SHLIB_MAP)) | sh); \
+ [ -n "$$SHARED" ] || exit 0; \
+ echo building static shared libname library; \
+ shlib -m $(SHLIB_MAP) -t $$TADDR -d $$DADDR \
+ -n BsdiStaticLibraryName(libname) \
+ -s BsdiStaticStubLibraryName(libname) \
+ $$( [ -f 'loader.lib'libname'.c' ] && \
+ echo -b 'loader.lib'libname'.c') \
+ $$( [ -f 'lib'libname'.const' ] && \
+ echo -c 'lib'libname'.const') \
+ $$( [ -f 'lib'libname'.except' ] && \
+ echo -e 'lib'libname'.except') \
+ $$( [ -f $$SHARED ] && echo -i $$SHARED) \
+ $$ARGS LibraryTargetName(libname)
+
+#define InstallBsdiStaticSharedLibrary(libname) \
+ @SHARED=; \
+ eval $$( (echo 'MAP() { [ "X$$1" = "X-l'libname'" ] || return 0;' \
+ 'echo "SHARED=$$5;";' \
+ 'echo "STUB=$$(dirname $$4)/$$(basename $$5).a;";' \
+ 'exit 0; }'; cat $(SHLIB_MAP)) | sh); \
+ [ -n "$$SHARED" ] || exit 0; \
+ echo installing static shared libname library; \
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) \
+ BsdiStaticLibraryName(libname) $(DESTDIR)$$SHARED; \
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) \
+ BsdiStaticStubLibraryName(libname) $(DESTDIR)$$STUB; \
+ RanLibrary($(RANLIBINSTFLAGS) $(DESTDIR)$$STUB) @@\
+ -@eval $$( (echo 'MAP() { [ "X$$1" = "X-l'libname'" ] || return 0;' \
+ 'echo "LDIR=$$(dirname $$4)"; exit 0; }'; \
+ cat $(SHLIB_MAP)) | sh); \
+ [ -f Concat(loader.lib,libname.c) ] && \
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) \
+ Concat(loader.lib,libname.c) \
+ $(DESTDIR)$$LDIR/Concat(loader.lib,libname.c); \
+ [ -f Concat(lib,libname.const) ] && \
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) \
+ Concat(lib,libname.const) \
+ $(DESTDIR)$$LDIR/Concat(lib,libname.const); \
+ [ -f Concat(lib,libname.except) ] && \
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) \
+ Concat(lib,libname.except) \
+ $(DESTDIR)$$LDIR/Concat(lib,libname.except); exit 0
+
+#ifndef UnsharedLibraryTarget
+#define UnsharedLibraryTarget(libname,objlist,down,up) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+LibraryTargetName(libname): objlist @@\
+ RemoveFile($@) @@\
+ (cd down; MakeLibrary(up/$@,objlist)) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@) @@\
+ MakeBsdiStaticSharedLibrary(libname) @@\
+ @@\
+clean:: @@\
+ $(RM) BsdiStaticLibraryName(libname) BsdiStaticStubLibraryName(libname)
+#endif /* UnsharedLibraryTarget */
+
+#ifndef UnsharedLibraryTarget3
+#define UnsharedLibraryTarget3(libname,objlist1,objlist2,objlist3,down,up) @@\
+ UnsharedLibraryTarget(libname,objlist1 objlist2 objlist3,down,up)
+#endif /* UnsharedLibraryTarget3 */
+
+#ifndef InstallLibrary
+#define InstallLibrary(libname,dest) @@\
+install:: LibraryTargetName(libname) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) \
+ LibraryTargetName(libname) $(DESTDIR)dest @@\
+ RanLibrary($(RANLIBINSTFLAGS) \
+ $(DESTDIR)dest/LibraryTargetName(libname)) @@\
+ InstallBsdiStaticSharedLibrary(libname)
+#endif /* InstallLibrary */
diff --git a/nx-X11/config/cf/bsdiLib.tmpl b/nx-X11/config/cf/bsdiLib.tmpl
new file mode 100644
index 000000000..28087bfb0
--- /dev/null
+++ b/nx-X11/config/cf/bsdiLib.tmpl
@@ -0,0 +1,43 @@
+XCOMM $XFree86: xc/config/cf/bsdiLib.tmpl,v 3.3 2003/05/29 21:56:57 herrb Exp $
+
+/*
+ * BSDI shared library template (converted from Linux template)
+ */
+
+/*
+ * Linux ELF shared libraries (which BSDI uses)
+ * are deficient in link semantics...
+ */
+
+#ifndef FixupLibReferences
+#define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef XawClientLibs
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+#define FrescoSysLibs CplusplusLibC MathLibrary
+
+#define SharedX11Reqs
+#define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIB) $(XLIB)
+#define SharedXtstReqs $(LDPRELIB) $(XLIB)
+#define SharedSMReqs $(LDPRELIB) $(ICELIB)
+#define SharedFrescoReqs $(LDPRELIB) $(XONLYLIB) FrescoSysLibs
+#define SharedXtfReqs $(LDPRELIB) $(FRESCOLIB) $(XTOOLLIB) $(XLIB) FrescoSysLibs
+
+/* Motif lib requirements */
+#define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXmReqs $(LDPRELIB) SharedXReqs
+#define SharedMrmReqs $(LDPRELIB) $(XMLIB) SharedXReqs
+#define SharedUilReqs $(LDPRELIB) $(XMLIB) SharedXReqs
diff --git a/nx-X11/config/cf/cde.rules b/nx-X11/config/cf/cde.rules
new file mode 100644
index 000000000..315047207
--- /dev/null
+++ b/nx-X11/config/cf/cde.rules
@@ -0,0 +1,226 @@
+/*
+ * @OSF_COPYRIGHT@
+ * COPYRIGHT NOTICE
+ * Copyright (c) 1990, 1991, 1992, 1993, 1998 The Open Group , Inc.
+ * ALL RIGHTS RESERVED (MOTIF). See the file named COPYRIGHT.MOTIF for
+ * the full copyright text.
+ *
+ * (c) Copyright 1996 Digital Equipment Corporation.
+ * (c) Copyright 1996 Hewlett-Packard Company.
+ * (c) Copyright 1996 International Business Machines Corp.
+ * (c) Copyright 1996 Sun Microsystems, Inc.
+ * (c) Copyright 1996 Novell, Inc.
+ * (c) Copyright 1996 FUJITSU LIMITED.
+ * (c) Copyright 1996 Hitachi.
+ */
+XCOMM $Xorg: cde.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+/* Note whether we are the top level project. */
+#ifndef SeenTopLevelProject
+# define SeenTopLevelProject YES
+# define CDEIsTopLevelProject YES
+#else
+# define CDEIsTopLevelProject NO
+#endif
+
+/* Include the Motif project rules file. */
+#include <Motif.rules>
+
+
+/* Use the in-tree CDE by default. */
+#ifndef UseInstalledCDE
+# define UseInstalledCDE NO
+#endif
+#ifdef UseInstalled
+# undef UseInstalledCDE
+# define UseInstalledCDE YES
+#endif
+
+#ifndef ImportCDE
+# ifdef UseImports
+# define ImportCDE YES
+# else
+# define ImportCDE NO
+# endif
+#endif
+#if UseInstalledCDE
+# undef ImportCDE
+# define ImportCDE NO
+#endif
+
+/* If CDE has a different ProjectRoot we need to search the regular ones too. */
+#ifdef CDEProjectRoot
+# define CUsrLibDirPath Concat(MUsrLibDirPath,:$(CDEPROJECTROOT)/lib)
+#else
+# define CUsrLibDirPath MUsrLibDirPath
+#endif
+#ifdef UsrLibDirPath
+# undef UsrLibDirPath
+#endif
+#define UsrLibDirPath CUsrLibDirPath
+
+#if ImportCDE
+# define CLdPreLibs -L$(CDELIBSRC)
+#elif defined(UseInstalledCDE) && defined(CDEProjectRoot)
+# define CLdPreLibs -L$(CDEPROJECTROOT)/lib
+#else
+# define CLdPreLibs /**/
+#endif
+#ifdef LdPreLibs
+# undef LdPreLibs
+#endif
+#define LdPreLibs LdPreLib CLdPreLibs MLdPreLibs XLdPreLibs
+
+#ifdef CDEProjectRoot
+# define CLdPostLibs -L$(CDEPROJECTROOT)/lib
+#else
+# define CLdPostLibs /**/
+#endif
+#ifdef LdPostLibs
+# undef LdPostLibs
+#endif
+#define LdPostLibs LdPostLib CLdPostLibs MLdPostLibs XLdPostLibs
+
+#ifdef TopIncludes
+# undef TopIncludes
+#endif
+#define TopIncludes TopInclude $(TOP_CDE_INCLUDES) $(TOP_MOTIF_INCLUDES) $(TOP_X_INCLUDES)
+
+#if UseInstalledCDE && defined(CDEProjectRoot)
+# define CDEBuildLibPath $(CDEPROJECTROOT)/lib
+#elif UseInstalledCDE
+# define CDEBuildLibPath $(USRLIBDIR)
+#elif ImportCDE
+# define CDEBuildLibPath $(CDELIBSRC)
+#else
+# define CDEBuildLibPath $(TOP)/exports/lib
+#endif
+#ifdef BuildLibPath
+# undef BuildLibPath
+#endif
+#ifdef SystemBuildLibPath
+# define BuildLibPath \
+$(DTENVLIBDIR):$(MOTIFENVLIBDIR):$(XENVLIBDIR):$(SYSTEMENVLIBDIR)
+#else
+# define BuildLibPath $(DTENVLIBDIR):$(MOTIFENVLIBDIR):$(XENVLIBDIR)
+#endif
+
+
+#ifndef CdeInstallationTop
+# define CdeInstallationTop /usr/dt
+#endif
+#ifndef CdeConfigurationTop
+# define CdeConfigurationTop /etc/dt
+#endif
+#ifndef CdeLogFilesTop
+# define CdeLogFilesTop /var/dt
+#endif
+#ifndef CdeUserTop
+# define CdeUserTop .dt
+#endif
+
+#ifndef CdeProjectDefines
+# define CdeProjectDefines \
+ -DANSICPP -DMULTIBYTE -DNLS16 \
+ -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
+#endif
+#ifdef ProjectDefines
+# undef ProjectDefines
+#endif
+#define ProjectDefines X11ProjectDefines MotifProjectDefines CdeProjectDefines
+
+#ifndef CdeCplusplusProjectDefines
+# define CdeCplusplusProjectDefines CdeProjectDefines
+#endif
+#ifdef CplusplusProjectDefines
+# undef CplusplusProjectDefines
+#endif
+#define CplusplusProjectDefines \
+ X11CplusplusProjectDefines MotifCplusplusProjectDefines CdeCplusplusProjectDefines
+
+/*
+ * Doc build rules
+ */
+
+/*
+ * MakeSdlVolume - generate rules to create an SDL volume, in the specified
+ * directory, from an SGML source doc.
+ * Note: the volume name must match the directory name.
+ */
+#ifndef MakeSdlVolume
+#define MakeSdlVolume(vol,dir,env,opts,dep) @@\
+all:: dir/vol.sdl @@\
+ @@\
+dir/vol.sdl: dep @@\
+ MakeDir(dir) @@\
+ env $(DTDOCBOOK) $(DTDOCBOOKOPTIONS) opts -o dir/vol.sdl vol/book.sgm @@\
+ @@\
+clean:: @@\
+ $(RM) dir/vol.sdl vol/book.log
+#endif
+
+/*
+ * MakeTocFile - generate rules to create an SGML TOC file.
+ * Note: the volume name must match the directory name.
+ */
+#ifndef MakeTocFile
+#define MakeTocFile(vol,env,opts,ttle,ident,dep) @@\
+all:: vol/TOC.sgm @@\
+ @@\
+vol/TOC.sgm: dep @@\
+ MakeDir($(DTINFOGENTMPDIR)) @@\
+ env $(DTINFOGEN) tocgen -T $(DTINFOGENTMPDIR) $(DTINFOGENOPTIONS) opts -f vol/TOC.sgm -id ident -title ttle vol/book.sgm @@\
+ @@\
+clean:: @@\
+ $(RM) vol/TOC.sgm
+#endif
+
+#ifndef MakeTocFile3
+#define MakeTocFile3(vol,env,opts,ttle,ident,dep1,dep2,dep3) @@\
+all:: vol/TOC.sgm @@\
+ @@\
+vol/TOC.sgm: dep1 @@\
+vol/TOC.sgm: dep2 @@\
+vol/TOC.sgm: dep3 @@\
+ MakeDir($(DTINFOGENTMPDIR)) @@\
+ env $(DTINFOGEN) tocgen -T $(DTINFOGENTMPDIR) $(DTINFOGENOPTIONS) opts -f vol/TOC.sgm -id ident -title ttle vol/book.sgm @@\
+ @@\
+clean:: @@\
+ $(RM) vol/TOC.sgm
+#endif
+
+/*
+ * TocFileDep - generate TOC file dependency rule
+ */
+#ifndef TocFileDep
+#define TocFileDep(vol,dep) @@\
+vol/TOC.sgm: dep
+#endif
+
+/*
+ * MakeInfolib - generate rules to create an infolib.
+ */
+#ifndef MakeInfolib
+#define MakeInfolib(infolib,bkcase,env,opts,dep) @@\
+all:: infolib/bkcase/dtsearch/dtsearch.ocf @@\
+ @@\
+infolib/bkcase/dtsearch/dtsearch.ocf: dep @@\
+ MakeDir($(DTINFOGENTMPDIR)) @@\
+ MakeDir(infolib) @@\
+ env $(DTINFOGEN) build -T $(DTINFOGENTMPDIR) $(DTINFOGENOPTIONS) opts -l infolib bookcase.bc
+#endif
+
+/*
+ * InfolibDep - generate infolib dependency rule - Highly depending on MMDB!
+ */
+#ifndef InfolibDep
+#define InfolibDep(infolib,bkcase,dep) @@\
+infolib/bkcase/dtsearch/dtsearch.ocf: dep
+#endif
+
+#ifndef InfolibDep3
+#define InfolibDep3(infolib,bkcase,dep1,dep2,dep3) @@\
+infolib/bkcase/dtsearch/dtsearch.ocf: dep1 @@\
+infolib/bkcase/dtsearch/dtsearch.ocf: dep2 @@\
+infolib/bkcase/dtsearch/dtsearch.ocf: dep3
+#endif
diff --git a/nx-X11/config/cf/cde.tmpl b/nx-X11/config/cf/cde.tmpl
new file mode 100644
index 000000000..c30a449a8
--- /dev/null
+++ b/nx-X11/config/cf/cde.tmpl
@@ -0,0 +1,439 @@
+XCOMM $Xorg: cde.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+/* Include the Motif project template file. */
+#include <Motif.tmpl>
+
+#ifndef _CUse
+# if UseInstalledCDE
+# define _CUse(a,b) a
+# else
+# define _CUse(a,b) b
+# endif
+#endif
+
+#ifndef _CUseCat
+# if (defined(__STDC__) && !defined(UnixCpp)) || defined(AnsiCpp)
+# if UseInstalledCDE
+# define _CUseCat(a,b,c) a##c
+# else
+# define _CUseCat(a,b,c) b##c
+# endif
+# else
+# if UseInstalledCDE
+# define _CUseCat(a,b,c) a/**/c
+# else
+# define _CUseCat(a,b,c) b/**/c
+# endif
+# endif
+#endif
+
+#ifndef CDETop
+# if ImportCDE
+# define CDETop $(TOP)/imports/cde
+# else
+# define CDETop $(TOP)
+# endif
+#endif
+
+#define CDESharedRev 2.1
+
+#ifndef SharedLibPam
+# define SharedLibPam HasSharedLibraries
+#endif
+#ifndef NormalLibPam
+# define NormalLibPam (!SharedLibPam | ForceNormalLib)
+#endif
+#ifndef DebugLibPam
+# define DebugLibPam NO
+#endif
+#ifndef ProfileLibPam
+# define ProfileLibPam NO
+#endif
+#ifndef SharedPamRev
+# define SharedPamRev CDESharedRev
+#endif
+
+#ifndef SharedLibTt
+# define SharedLibTt HasSharedLibraries
+#endif
+#ifndef NormalLibTt
+# define NormalLibTt (!SharedLibTt | ForceNormalLib)
+#endif
+#ifndef DebugLibTt
+# define DebugLibTt NO
+#endif
+#ifndef ProfileLibTt
+# define ProfileLibTt NO
+#endif
+#ifndef SharedTtRev
+# define SharedTtRev CDESharedRev
+#endif
+
+#ifndef SharedLibDtSvc
+# define SharedLibDtSvc HasSharedLibraries
+#endif
+#ifndef NormalLibDtSvc
+# define NormalLibDtSvc (!SharedLibDtSvc | ForceNormalLib)
+#endif
+#ifndef DebugLibDtSvc
+# define DebugLibDtSvc NO
+#endif
+#ifndef ProfileLibDtSvc
+# define ProfileLibDtSvc NO
+#endif
+#ifndef SharedDtSvcRev
+# define SharedDtSvcRev CDESharedRev
+#endif
+
+#ifndef SharedLibDtSearch
+# define SharedLibDtSearch HasSharedLibraries
+#endif
+#ifndef NormalLibDtSearch
+# define NormalLibDtSearch (!SharedLibDtSearch | ForceNormalLib)
+#endif
+#ifndef DebugLibDtSearch
+# define DebugLibDtSearch NO
+#endif
+#ifndef ProfileLibDtSearch
+# define ProfileLibDtSearch NO
+#endif
+#ifndef SharedDtSearchRev
+# define SharedDtSearchRev CDESharedRev
+#endif
+
+#ifndef SharedLibDtWidget
+# define SharedLibDtWidget HasSharedLibraries
+#endif
+#ifndef NormalLibDtWidget
+# define NormalLibDtWidget (!SharedLibDtWidget | ForceNormalLib)
+#endif
+#ifndef DebugLibDtWidget
+# define DebugLibDtWidget NO
+#endif
+#ifndef ProfileLibDtWidget
+# define ProfileLibDtWidget NO
+#endif
+#ifndef SharedDtWidgetRev
+# define SharedDtWidgetRev CDESharedRev
+#endif
+
+#ifndef SharedLibDtHelp
+# define SharedLibDtHelp HasSharedLibraries
+#endif
+#ifndef NormalLibDtHelp
+# define NormalLibDtHelp (!SharedLibDtHelp | ForceNormalLib)
+#endif
+#ifndef DebugLibDtHelp
+# define DebugLibDtHelp NO
+#endif
+#ifndef ProfileLibDtHelp
+# define ProfileLibDtHelp NO
+#endif
+#ifndef SharedDtHelpRev
+# define SharedDtHelpRev CDESharedRev
+#endif
+
+#ifndef SharedLibDtPrint
+# define SharedLibDtPrint HasSharedLibraries
+#endif
+#ifndef NormalLibDtPrint
+# define NormalLibDtPrint (!SharedLibDtPrint | ForceNormalLib)
+#endif
+#ifndef DebugLibDtPrint
+# define DebugLibDtPrint NO
+#endif
+#ifndef ProfileLibDtPrint
+# define ProfileLibDtPrint NO
+#endif
+#ifndef SharedDtPrintRev
+# define SharedDtPrintRev CDESharedRev
+#endif
+
+#ifndef SharedLibDtTerm
+# define SharedLibDtTerm HasSharedLibraries
+#endif
+#ifndef NormalLibDtTerm
+# define NormalLibDtTerm (!SharedLibDtTerm | ForceNormalLib)
+#endif
+#ifndef DebugLibDtTerm
+# define DebugLibDtTerm NO
+#endif
+#ifndef ProfileLibDtTerm
+# define ProfileLibDtTerm NO
+#endif
+#ifndef SharedDtTermRev
+# define SharedDtTermRev CDESharedRev
+#endif
+
+#ifndef SharedLibDtMrm
+# define SharedLibDtMrm HasSharedLibraries
+#endif
+#ifndef NormalLibDtMrm
+# define NormalLibDtMrm (!SharedLibDtMrm | ForceNormalLib)
+#endif
+#ifndef DebugLibDtMrm
+# define DebugLibDtMrm NO
+#endif
+#ifndef ProfileLibDtMrm
+# define ProfileLibDtMrm NO
+#endif
+#ifndef SharedDtMrmRev
+# define SharedDtMrmRev CDESharedRev
+#endif
+
+#ifndef SharedLibDtMmdb
+# define SharedLibDtMmdb HasSharedLibraries
+#endif
+#ifndef NormalLibDtMmdb
+# define NormalLibDtMmdb (!SharedLibDtMmdb | ForceNormalLib)
+#endif
+#ifndef DebugLibDtMmdb
+# define DebugLibDtMmdb NO
+#endif
+#ifndef ProfileLibDtMmdb
+# define ProfileLibDtMmdb NO
+#endif
+#ifndef SharedDtMmdbRev
+# define SharedDtMmdbRev CDESharedRev
+#endif
+
+#ifndef SharedLibCsa
+# define SharedLibCsa HasSharedLibraries
+#endif
+#ifndef NormalLibCsa
+# define NormalLibCsa (!SharedLibCsa | ForceNormalLib)
+#endif
+#ifndef DebugLibCsa
+# define DebugLibCsa NO
+#endif
+#ifndef ProfileLibCsa
+# define ProfileLibCsa NO
+#endif
+#ifndef SharedCsaRev
+# define SharedCsaRev CDESharedRev
+#endif
+
+#ifndef DtLocalesToBuild
+#define DtLocalesToBuild de_DE.ISO8859-1 es_ES.ISO8859-1 fr_FR.ISO8859-1 it_IT.ISO8859-1 ja_JP.dt-eucJP
+#endif
+
+#ifndef DtCodeGen
+# if UseInstalledCDE
+# define DtCodeGen dtcodegen
+# else
+# define DtCodeGen $(CLIENTENVSETUP) $(CDESRC)/dtappbuilder/src/abmf/dtcodegen
+# endif
+#endif
+
+#ifndef BuildCDEDoc
+# define BuildCDEDoc YES
+#endif
+
+#ifndef UseNSGMLS
+# ifdef SunArchitecture
+# define UseNSGMLS NO
+# else
+# define UseNSGMLS YES
+# endif
+#endif
+#ifndef SGMLParser
+# if UseNSGMLS
+# define SGMLDir $(NSGMLSSRC)
+# define SGMLParser $(NSGMLSSRC)/nsgmls
+# else
+# define SGMLDir $(SGMLSSRC)
+# define SGMLParser $(SGMLSSRC)/sgmls
+# endif
+#endif
+
+#ifndef DtInfoGen
+# if UseInstalledCDE
+# define DtInfoGen dtinfogen
+# else
+# define DtInfoGen $(CLIENTENVSETUP) $(DTLCXENVSETUP) DTINFO_HOME=$(DTINFOGENSRC) DTINFO_BIN=$(DTINFOGENSRC)/install:$(DTINFOGENSRC)/mmdb/StyleSheet:$(DTINFOGENSRC)/mmdb/src:SGMLDir:$(CDESRC)/dtsr $(DTINFOGENSRC)/infolib/etc/dtinfogen
+# endif
+#endif
+#ifndef DtInfoGenTmpDir
+# define DtInfoGenTmpDir $(TOP)/doc/tmp
+#endif
+
+#ifndef DtDocBook
+# if UseInstalledCDE
+# define DtDocBook dtdocbook
+# else
+# define DtDocBook $(CLIENTENVSETUP) $(DTLCXENVSETUP) $(CDESRC)/dtdocbook/doc2sdl/dtdocbook
+# endif
+#endif
+#ifndef DtDocBookOptions
+# if UseInstalledCDE
+# define DtDocBookOptions
+# else
+# define DtDocBookOptions -t $(CDESRC)/dtdocbook/doc2sdl -H $(HELPTAGPASS2DEF) -I $(CDESRC)/dtdocbook/instant/instant -L $(CDESRC)/dtdocbook/xlate_locale/xlate_locale -S SGMLParser
+# endif
+#endif
+
+ CDETOP = CDETop
+#if ImportCDE || UseInstalledCDE
+ CDEINCLUDESRC = $(CDETOP)/include
+#else
+ CDEINCLUDESRC = $(CDETOP)/exports/include
+#endif
+ TOP_CDE_INCLUDES = -I$(CDEINCLUDESRC)
+ CDELIBSRC = $(CDETOP)/lib
+ PAMSRC = $(CDELIBSRC)/pam/libpam
+ TTSRC = $(CDELIBSRC)/tt
+ DTSVCSRC = $(CDELIBSRC)/DtSvc
+ DTSEARCHSRC = $(CDELIBSRC)/DtSearch
+ DTWIDGETSRC = $(CDELIBSRC)/DtWidget
+ DTHELPSRC = $(CDELIBSRC)/DtHelp
+ DTPRINTSRC = $(CDELIBSRC)/DtPrint
+ DTTERMSRC = $(CDELIBSRC)/DtTerm
+ DTMRMSRC = $(CDELIBSRC)/DtMrm
+ DTMMDBSRC = $(CDELIBSRC)/DtMmdb
+ CSASRC = $(CDELIBSRC)/csa
+ CDESRC = $(CDETOP)/programs
+#ifdef BuildLibPathVar
+ DTENVLIBDIR = CDEBuildLibPath
+#endif
+#ifdef CDEProjectRoot
+ CDEPROJECTROOT = CDEProjectRoot
+#endif
+ CDE_INSTALLATION_TOP = CdeInstallationTop
+CDE_CONFIGURATION_TOP = CdeConfigurationTop
+ CDE_LOGFILES_TOP = CdeLogFilesTop
+ CDE_USER_TOP = CdeUserTop
+
+ DTCODEGEN = DtCodeGen
+ HELPPARSERSRC = $(CDESRC)/dthelp/parser
+ HELPTAG = _CUseCat($(BINDIR),$(HELPPARSERSRC)/helptag,/dthelptag)
+ HELPTAGPASS1DEF = _CUseCat($(BINDIR),$(HELPPARSERSRC)/pass1/helptag,/dthelp_htag1)
+ HELPTAGPASS2DEF = _CUseCat($(BINDIR),$(HELPPARSERSRC)/pass2/htag2,/dthelp_htag2)
+ DTDOCBOOK = DtDocBook
+ DTDOCBOOKOPTIONS = DtDocBookOptions
+#if UseNSGMLS
+ NSGMLSSRC = $(CDESRC)/nsgmls
+#else
+ SGMLSSRC = $(CDESRC)/dtdocbook/sgmls
+#endif
+ DTINFOGENSRC = $(CDESRC)/dtinfo/dtinfogen
+ DTINFOGEN = DtInfoGen
+ DTINFOGENTMPDIR = DtInfoGenTmpDir
+#ifdef DtInfoGenOptions
+ DTINFOGENOPTIONS = DtInfoGenOptions
+#endif
+#ifdef ArchitectureDefines
+ ARCHITECTURE_DEFINES = ArchitectureDefines
+#endif
+#if !UseInstalledCDE
+DTLCXENVSETUP = DTLCXSEARCHPATH=$(DTHELPSRC)
+#endif
+
+#ifndef TtClientLibs
+# define TtClientLibs $(TTLIB) $(XLIB)
+#endif
+#ifndef TtClientDepLibs
+# define TtClientDepLibs $(DEPTTLIB) $(DEPXLIB)
+#endif
+
+/* These libraries use UseInstalledCDE instead of UseInstalled. */
+#undef _Use
+#undef _UseCat
+#define _Use _CUse
+#define _UseCat _CUseCat
+
+#ifndef CDEBuildLibDir
+# define CDEBuildLibDir BuildLibDir
+#endif
+
+#if SharedLibPam
+SharedLibReferences(PAM,pam,$(PAMSRC),SOPAMREV,SharedPamRev)
+#else
+ProjectUnsharedLibReferences(PAM,pam,$(PAMSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibTt
+SharedLibReferences(TT,tt,$(TTSRC)/lib,SOTTREV,SharedTtRev)
+#else
+ProjectUnsharedLibReferences(TT,tt,$(TTSRC)/lib,CDEBuildLibDir)
+#endif
+
+#if SharedLibDtSvc
+SharedLibReferences(DTSVC,DtSvc,$(DTSVCSRC),SODTSVCREV,SharedDtSvcRev)
+#else
+ProjectUnsharedLibReferences(DTSVC,DtSvc,$(DTSVCSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibDtSearch
+SharedLibReferences(DTSEARCH,DtSearch,$(DTSEARCHSRC),SODTSEARCHREV,SharedDtSearchRev)
+#else
+ProjectUnsharedLibReferences(DTSEARCH,DtSearch,$(DTSEARCHSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibDtWidget
+SharedLibReferences(DTWIDGET,DtWidget,$(DTWIDGETSRC),SODTWIDGETREV,SharedDtWidgetRev)
+#else
+ProjectUnsharedLibReferences(DTWIDGET,DtWidget,$(DTWIDGETSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibDtHelp
+SharedLibReferences(DTHELP,DtHelp,$(DTHELPSRC),SODTHELPREV,SharedDtHelpRev)
+#else
+ProjectUnsharedLibReferences(DTHELP,DtHelp,$(DTHELPSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibDtPrint
+SharedLibReferences(DTPRINT,DtPrint,$(DTPRINTSRC),SODTPRINTREV,SharedDtPrintRev)
+#else
+ProjectUnsharedLibReferences(DTPRINT,DtPrint,$(DTPRINTSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibDtTerm
+SharedLibReferences(DTTERM,DtTerm,$(DTTERMSRC),SODTTERMREV,SharedDtTermRev)
+#else
+ProjectUnsharedLibReferences(DTTERM,DtTerm,$(DTTERMSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibDtMrm
+SharedLibReferences(DTMRM,DtMrm,$(DTMRMSRC),SODTMRMREV,SharedDtMrmRev)
+#else
+ProjectUnsharedLibReferences(DTMRM,DtMrm,$(DTMRMSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibDtMmdb
+SharedLibReferences(DTMMDB,DtMmdb,$(DTMMDBSRC),SODTMMDBREV,SharedDtMmdbRev)
+#else
+ProjectUnsharedLibReferences(DTMMDB,DtMmdb,$(DTMMDBSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibDtCm
+SharedLibReferences(DTCM,DtCm,$(DTCMSRC),SODTCMREV,SharedDtCmRev)
+#else
+ProjectUnsharedLibReferences(DTCM,DtCm,$(DTCMSRC),CDEBuildLibDir)
+#endif
+
+#if SharedLibCsa
+SharedLibReferences(CSA,csa,$(CSASRC),SOCSAREV,SharedCsaRev)
+#else
+ProjectUnsharedLibReferences(CSA,csa,$(CSASRC),CDEBuildLibDir)
+#endif
+
+
+/* Revert to the normal library rules. */
+#undef _Use
+#undef _UseCat
+#define _Use _XUse
+#define _UseCat _XUseCat
+
+
+#ifndef DtClientLibs
+# define DtClientLibs $(DTPRINTLIB) $(DTHELPLIB) $(DTWIDGETLIB) $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB)
+#endif
+#ifndef DepDtClientLibs
+# define DepDtClientLibs $(DEPDTPRINTLIB) $(DEPDTHELPLIB) $(DEPDTWIDGETLIB) $(DEPDTSVCLIB) $(DEPTTLIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB)
+#endif
+#ifndef DtClientSysLibs
+# define DtClientSysLibs $(DYNLIBSYSLIB) $(ICONVSYSLIB) $(REGEXSYSLIB) -lm
+#endif
+#ifndef DtClientExtraLibs
+# define DtClientExtraLibs /**/
+#endif
diff --git a/nx-X11/config/cf/convex.cf b/nx-X11/config/cf/convex.cf
new file mode 100644
index 000000000..3b522f7a7
--- /dev/null
+++ b/nx-X11/config/cf/convex.cf
@@ -0,0 +1,102 @@
+XCOMM platform: $Xorg: convex.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+#ifndef OSName
+#define OSName ConvexOS V9.0
+#endif
+XCOMM operating system: OSName
+#ifndef OSMajorVersion
+#define OSMajorVersion 9
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef VersionNumber
+#define VersionNumber 0.0.0.0
+#endif
+
+#define BootstrapCFlags -tm c1
+#define SetTtyGroup YES
+#define BuildServer NO
+#define ConnectionFlags -DTCPCONN -DUNIXCONN -DCOVUENETCONN
+#define InstallXdmConfig YES
+#define XdmDir $(LIBDIR)/xdm-sample
+#define XdmServersType fs /* one tab here */
+#define HasXmWidgets NO
+#define InstKmemFlags -g kmem -m 2711 -v $(VERSION)
+#define InstScriptFlags -m 0755 -g bin
+#define InstManFlags -m 0444 -g bin
+#define DefaultCCOptions -fn -tm c1
+#define LibraryCCOptions -fx -tm c1
+#define StripFlags -r -x
+#define HasSecureOS YES
+#define BuildExamples YES
+#define BuildMotif NO
+#define BuildConvexClients YES
+#define MotifBC YES
+#define UilCommand uil
+#define ExampleDir $(LIBDIR)/examples
+#define UnSupDir $(LIBDIR)/unsupported
+#define BuildTestExt YES
+#define DefaultScreenSaverTime 0
+
+#if BuildTestExt
+#define TestDefines -DXTESTEXT1
+#else
+#define TestDefines /**/
+#endif
+
+#define ExtensionOSDefines TestDefines
+
+ VERSION = VersionNumber
+ UIL = UilCommand
+ UNSUPDIR = UnSupDir /* unsupported examples and code */
+
+/*
+ * _Use - makes a choice based on UseInstalled.
+ */
+#ifndef _Use
+#ifdef UseInstalled
+#define _Use(a,b) a
+#else
+#define _Use(a,b) b
+#endif
+#endif
+
+/*
+ * _UseCat - combination of _Use and Concat.
+ * exists to avoid problems with some preprocessors
+ */
+#ifndef _UseCat
+#if (defined(__STDC__) || (defined(__convex__) && defined(__stdc__)))
+&& !defined(UnixCpp)
+#ifdef UseInstalled
+#define _UseCat(a,b,c) a##c
+#else
+#define _UseCat(a,b,c) b##c
+#endif
+#else
+#ifdef UseInstalled
+#define _UseCat(a,b,c) a/**/c
+#else
+#define _UseCat(a,b,c) b/**/c
+#endif
+#endif
+#endif
+
+#if HasXmWidgets
+ MRESOURCESRC = $(LIBSRC)/Mrm
+DEPMRESOURCELIB = _UseCat($(USRLIBDIR),$(MRESOURCESRC),/libMrm.a)
+ MRESOURCELIB = LoaderLibPrefix _Use(-lMrm,$(DEPMRESOURCELIB))
+LINTMRESOURCELIB= _UseCat($(LINTLIBDIR),$(MRESOURCESRC),/llib-lMrm.ln)
+
+ XMLIBSRC = $(LIBSRC)/Xm
+ DEPXMLIB = _UseCat($(USRLIBDIR),$(XMLIBSRC),/libXm.a)
+ XMLIB = LoaderLibPrefix _Use(-lXm,$(DEPXMLIB))
+ LINTXMLIB = _UseCat($(LINTLIBDIR),$(XMLIBSRC),/llib-lXm.ln)
+
+ UILLIBSRC = $(LIBSRC)/uil
+ DEPUILLIB = _UseCat($(USRLIBDIR),$(UILLIBSRC),/libUil.a)
+ UILLIB = LoaderLibPrefix _Use(-lUil,$(DEPUILLIB))
+ LINTUILLIB = _UseCat($(LINTLIBDIR),$(UILLIBSRC),/llib-lUil.ln)
+
+#endif
diff --git a/nx-X11/config/cf/cray.cf b/nx-X11/config/cf/cray.cf
new file mode 100644
index 000000000..2cc570f56
--- /dev/null
+++ b/nx-X11/config/cf/cray.cf
@@ -0,0 +1,49 @@
+XCOMM platform: $Xorg: cray.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+#ifndef OSName
+#define OSName UNICOS 8.0
+#endif
+XCOMM operating system: OSName
+#ifndef OSMajorVersion
+#define OSMajorVersion 8
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+
+#define SystemV YES
+#define Malloc0ReturnsNull YES
+#define RemoveTargetProgramByMoving YES
+#define ArCmd bld cr
+#define StandardDefines -DSYSV -DUSG
+#define ExecableScripts NO
+#define HasPoll NO
+#define HasXServer NO
+#define ConnectionFlags -DTCPCONN
+#define HasShm NO
+#define NativeFPFormat CRAY_Float
+#ifdef UseInstalled
+#define InstallCmd install
+#else
+#define InstallCmd $(SHELL) $(CONFIGSRC)/util/install.sh
+#endif
+
+#ifdef _CRAY2
+#define DefaultCCOptions -hpagelm -hlimitlm
+#endif
+
+#if OSMajorVersion >= 6
+#define PreProcessCmd /lib/pcpp
+#define CppCmd /lib/pcpp
+#else
+# if OSMajorVersion == 5
+# define PreProcessCmd /lib/cpp
+# define CppCmd /lib/cpp
+# define ExtraLoadFlags -lnet
+# endif
+#endif
+
+/* XKB library code does not work here yet */
+#define BuildXKBlib NO
+
+#define MotifDefines -DNO_REGEX -DNO_REGCOMP
diff --git a/nx-X11/config/cf/cross.def b/nx-X11/config/cf/cross.def
new file mode 100644
index 000000000..9f71091f5
--- /dev/null
+++ b/nx-X11/config/cf/cross.def
@@ -0,0 +1,45 @@
+/* $XFree86: xc/config/cf/cross.def,v 1.1 2000/12/08 22:09:34 keithp Exp $ */
+/*
+ * This file contains redefinitions of some symbols to enable
+ * cross compilation: e.g. paths for include files and paths to
+ * compiler images. It will have to be edited to reflect these
+ * given your local configuration.
+ */
+#if 0
+#undef i386Architecture
+#define Arm32Architecture
+
+#undef OptimizedCDebugFlags
+#define OptimizedCDebugFlags -O2
+#define ServerCDebugFlags -O2
+#undef StandardDefines
+#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE \
+ -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
+#undef CcCmd
+#define StdIncDir /opt/Embedix/tools/arm-linux/include
+#define PreIncDir
+#undef PostIncDir
+#define PostIncDir /opt/Embedix/tools/lib/gcc-lib/arm-linux/2.95.2/include
+#define CcCmd /opt/Embedix/tools/bin/arm-linux-gcc
+#undef CplusplusCmd
+#define HasCplusplus YES
+#define CplusplusCmd /opt/Embedix/tools/bin/arm-linux-g++
+#define DoRanlibCmd YES
+#define RanlibCmd /opt/Embedix/tools/bin/arm-linux-ranlib
+#undef ExtraLoadFlags
+#define ExtraLoadFlags
+#define FbNoPixelAddrCode
+#undef TermcapLibrary
+#define TermcapLibrary -ltermcap
+
+#undef LdPostLib
+#define LdPostLib -L/opt/Embedix/tools/arm-linux/lib
+
+#undef ExtensionOSDefines
+#define ExtensionOSDefines
+
+#define ServerXdmcpDefines /**/
+
+#define HostCcCmd cc
+#endif
+#include <cross.rules>
diff --git a/nx-X11/config/cf/cross.def.NX.original b/nx-X11/config/cf/cross.def.NX.original
new file mode 100644
index 000000000..9f71091f5
--- /dev/null
+++ b/nx-X11/config/cf/cross.def.NX.original
@@ -0,0 +1,45 @@
+/* $XFree86: xc/config/cf/cross.def,v 1.1 2000/12/08 22:09:34 keithp Exp $ */
+/*
+ * This file contains redefinitions of some symbols to enable
+ * cross compilation: e.g. paths for include files and paths to
+ * compiler images. It will have to be edited to reflect these
+ * given your local configuration.
+ */
+#if 0
+#undef i386Architecture
+#define Arm32Architecture
+
+#undef OptimizedCDebugFlags
+#define OptimizedCDebugFlags -O2
+#define ServerCDebugFlags -O2
+#undef StandardDefines
+#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE \
+ -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
+#undef CcCmd
+#define StdIncDir /opt/Embedix/tools/arm-linux/include
+#define PreIncDir
+#undef PostIncDir
+#define PostIncDir /opt/Embedix/tools/lib/gcc-lib/arm-linux/2.95.2/include
+#define CcCmd /opt/Embedix/tools/bin/arm-linux-gcc
+#undef CplusplusCmd
+#define HasCplusplus YES
+#define CplusplusCmd /opt/Embedix/tools/bin/arm-linux-g++
+#define DoRanlibCmd YES
+#define RanlibCmd /opt/Embedix/tools/bin/arm-linux-ranlib
+#undef ExtraLoadFlags
+#define ExtraLoadFlags
+#define FbNoPixelAddrCode
+#undef TermcapLibrary
+#define TermcapLibrary -ltermcap
+
+#undef LdPostLib
+#define LdPostLib -L/opt/Embedix/tools/arm-linux/lib
+
+#undef ExtensionOSDefines
+#define ExtensionOSDefines
+
+#define ServerXdmcpDefines /**/
+
+#define HostCcCmd cc
+#endif
+#include <cross.rules>
diff --git a/nx-X11/config/cf/cross.def.X.original b/nx-X11/config/cf/cross.def.X.original
new file mode 100644
index 000000000..958c746ce
--- /dev/null
+++ b/nx-X11/config/cf/cross.def.X.original
@@ -0,0 +1,45 @@
+/* $XFree86: xc/config/cf/cross.def,v 1.1 2000/12/08 22:09:34 keithp Exp $ */
+/*
+ * This file contains redefinitions of some symbols to enable
+ * cross compilation: e.g. paths for include files and paths to
+ * compiler images. It will have to be edited to reflect these
+ * given your local configuration.
+ */
+#if 0
+#undef i386Architecture
+#define Arm32Architecture
+
+#undef OptimizedCDebugFlags
+#define OptimizedCDebugFlags -O2
+#define ServerCDebugFlags -O2
+#undef StandardDefines
+#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE \
+ -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
+#undef CcCmd
+#define StdIncDir /skiff/local/arm-linux/include
+#define PreIncDir
+#undef PostIncDir
+#define PostIncDir /skiff/local/lib/gcc-lib/arm-linux/2.95.2/include
+#define CcCmd /skiff/local/bin/arm-linux-gcc
+#undef CplusplusCmd
+#define HasCplusplus YES
+#define CplusplusCmd /skiff/local/bin/arm-linux-g++
+#define DoRanlibCmd YES
+#define RanlibCmd /skiff/local/bin/arm-linux-ranlib
+#undef ExtraLoadFlags
+#define ExtraLoadFlags
+#define FbNoPixelAddrCode
+#undef TermcapLibrary
+#define TermcapLibrary -ltermcap
+
+#undef LdPostLib
+#define LdPostLib -L/skiff/local/arm-linux/lib
+
+#undef ExtensionOSDefines
+#define ExtensionOSDefines
+
+#define ServerXdmcpDefines /**/
+
+#define HostCcCmd cc
+#endif
+#include <cross.rules>
diff --git a/nx-X11/config/cf/cross.rules b/nx-X11/config/cf/cross.rules
new file mode 100644
index 000000000..da02643af
--- /dev/null
+++ b/nx-X11/config/cf/cross.rules
@@ -0,0 +1,147 @@
+XCOMM $XFree86: xc/config/cf/cross.rules,v 1.7 2002/04/04 14:05:33 eich Exp $
+
+#ifndef HostCcCmd
+#define HostCcCmd cc
+#endif
+
+#define HostLinkRule(target,flags,objs,libs) HostCcCmd -I$(BUILDINCDIR) -o target flags objs libs
+
+/* ComplexHostProgramTarget - Compile a program such that we can run
+ * it on this host, i.e., don't use the default cross compiler.
+ */
+#ifndef ComplexHostProgramTarget
+#define ComplexHostProgramTarget(program) @@\
+ CC=HostCcCmd @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\
+ $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(HostProgramTargetName(program)) @@\
+ @@\
+HostProgramTargetName(program): $(OBJS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+DependTarget() @@\
+ @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(HostProgramTargetName(program))
+#endif /* ComplexHostProgramTarget */
+
+
+#ifndef SimpleHostProgramTarget
+#define SimpleHostProgramTarget(program) @@\
+ SRCS = program.c @@\
+ @@\
+ CC=HostCcCmd @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\
+ $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(HostProgramTargetName(program)) @@\
+ @@\
+HostProgramTargetName(program): program.o $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+DependTarget() @@\
+ @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(HostProgramTargetName(program))
+#endif /* SimpleHostProgramTarget */
+
+#ifndef SimpleHostProgramTarget_1
+#define SimpleHostProgramTarget_1(program) @@\
+ SRCS = program.c @@\
+ @@\
+ CC=HostCcCmd @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\
+ $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(HostProgramTargetName(program)) @@\
+ @@\
+HostProgramTargetName(program): program.o $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+DependTarget() @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(HostProgramTargetName(program))
+#endif /* SimpleHostProgramTarget_1 */
+
+
+#ifndef SimpleHostProgramTarget_2
+#define SimpleHostProgramTarget_2(program) @@\
+ SRCS = program.c @@\
+ @@\
+ CC=HostCcCmd @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\
+ $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(HostProgramTargetName(program)) @@\
+ @@\
+HostProgramTargetName(program): program.o $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(HostProgramTargetName(program))
+#endif /* SimpleHostProgramTarget_2 */
+
+#ifndef SimpleHostProgramTarget_3
+#define SimpleHostProgramTarget_3(program) @@\
+ SRCS = program.c @@\
+ @@\
+ CC=HostCcCmd @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\
+ $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(HostProgramTargetName(program)) @@\
+ @@\
+HostProgramTargetName(program): program.o $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(HostProgramTargetName(program))
+#endif /* SimpleHostProgramTarget_3 */
+
+#ifndef SimpleHostProgramTarget_4
+#define SimpleHostProgramTarget_4(program) @@\
+ SRCS = program.c @@\
+ @@\
+ CC=HostCcCmd @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS)\ @@\
+ $(CROSSCOMPILEDEFINES) $(CROSSCOMPILEBOOTSTRAPDEFINES) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(HostProgramTargetName(program)) @@\
+ @@\
+HostProgramTargetName(program): program.o $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(HostProgramTargetName(program))
+#endif /* SimpleHostProgramTarget_4 */
diff --git a/nx-X11/config/cf/cygwin.cf b/nx-X11/config/cf/cygwin.cf
new file mode 100644
index 000000000..73ed8cec5
--- /dev/null
+++ b/nx-X11/config/cf/cygwin.cf
@@ -0,0 +1,469 @@
+/* Cygwin/X vendor strings and version */
+#include "xorgversion.def"
+
+#ifndef CygxVersionMajor
+# define CygxVersionMajor XORG_VERSION_MAJOR
+#endif
+#ifndef CygxVersionMinor
+# define CygxVersionMinor XORG_VERSION_MINOR
+#endif
+#ifndef CygxVersionPatch
+# define CygxVersionPatch XORG_VERSION_PATCH
+#endif
+#ifndef CygxVersionSnap
+# define CygxVersionSnap XORG_VERSION_SNAP
+#endif
+#ifndef CygxVersionServer
+# define CygxVersionServer 0
+#endif
+
+#ifndef CygxVersion
+# define CygxVersion (10000000 * CygxVersionMajor + 100000 * CygxVersionMinor + 1000 * CygxVersionPatch + CygxVersionSnap)
+#endif
+
+#ifndef CygxVersionString
+# define CygxVersionString `echo CygxVersionMajor CygxVersionMinor CygxVersionPatch CygxVersionSnap%CygxVersionServer| sed -e 's/ /./g' -e 's/%/-/g'`
+#endif
+
+#ifndef CygxManVersionString
+# define CygxManVersionString `echo CygxVersionMajor CygxVersionMinor CygxVersionPatch CygxVersionSnap| sed -e 's/ /./g' -e 's/^/Version\\\ /'`
+#endif
+
+#ifndef XVendorString
+# define XVendorString "The Cygwin/X Project"
+#endif
+#ifndef XVendorRelease
+# define XVendorRelease CygxVersion
+#endif
+#ifndef XVendorManVersionString
+# define XVendorManVersionString CygxManVersionString
+#endif
+#ifndef XVendorManNameString
+# define XVendorManNameString "Cygwin/X"
+#endif
+#ifndef XVendorContact
+# define XVendorContact "cygwin-xfree@cygwin.com"
+#endif
+
+/* Operating system strings and version */
+#ifndef OSName
+# define OSName Cygwin
+#endif
+#ifndef OSVendor
+# define OSVendor Red Hat Inc.
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+
+#ifndef ProjectRoot
+# define ProjectRoot /usr/X11R6
+#endif
+
+#if !CrossCompiling
+# define HasGcc2 YES
+#endif /* !CrossCompiling */
+#define HasGcc2ForCplusplus YES
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#define UnixCpp /* Just a flag that affects Concat macros in Imake.rules */
+
+#define ExtraLoadFlags -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc
+
+#define HasShadowPasswd NO
+#define HasLibCrypt YES
+#define HasPutenv YES
+#define HasPoll NO
+#if (OSMajorVersion > 1) || (OSMajorVersion == 1 && OSMinorVersion >= 5)
+# define HasStrlcat YES
+#endif
+#define HasShm YES
+
+#define HasSnprintf YES
+#ifndef HasMakefileSafeInclude
+# define HasMakefileSafeInclude YES
+#endif
+
+/*
+ * Cygwin has Tcl/Tk, but you need to keep the version numbers
+ * of the libs in sync. These version numbers may change
+ * occassionally.
+ */
+#define Hastcl YES
+#define Hastk YES
+#define TclLibName tcl80
+#define TkLibName tk80
+
+#define HasSockets YES
+#define GzipFontCompression YES
+#define HasZlib YES
+#ifndef GzipLibrary
+# define GzipLibrary -lz.dll
+#endif
+
+/* We don't need -lm */
+#define MathLibrary /**/
+
+/*
+ * /lib/libtermcap.a doesn't have tgetent, which is needed for
+ * xc/programs/xterm/resize.exe
+ */
+#define TermcapLibrary -lncurses.dll
+
+#define AvoidNullMakeCommand YES
+#define StripInstalledPrograms YES
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull NO
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedWidePrototypes NO
+#define SetTtyGroup YES
+#define ExpandManNames YES
+#define HasDlopen NO
+#define HasGnuMake YES
+#define UseGccMakeDepend NO
+#define ThreadedX YES
+#define HasThreadSafeAPI YES
+#if !CrossCompiling
+#define CaseSensitiveFileSystem NO
+#endif
+#define HasWChar32 YES
+#define HasBasename NO /* basename() in libc */
+
+#define LnCmd ln -s
+#ifndef CcCmd
+# define CcCmd gcc
+#endif /* CcCmd */
+#ifndef CplusplusCmd
+# define CplusplusCmd g++
+#endif /* CplusplusCmd */
+#ifndef AsCmd
+# define AsCmd as
+#endif /* AsCmd */
+
+#define GccGasOption -DGCCUSESGAS
+#define AsmDefines -DUSE_GAS -DGCCUSESGAS
+
+#ifndef LdCmd
+# define LdCmd gcc -lautomode
+#endif /* LdCmd */
+
+#define MkdirHierCmd mkdir -p
+
+#ifndef CppCmd
+# define CppCmd cpp
+#endif /* CppCmd */
+#ifndef YaccCmd
+# define YaccCmd bison -y
+#endif /* YaccCmd */
+
+#define LexCmd flex -l
+#define LexLib -lfl
+#define HasFlex YES
+#ifndef CrossCompileDir
+# ifndef HasExpat
+# define HasExpat YES
+# endif
+# ifndef HasFreetype2
+# define HasFreetype2 YES
+# endif
+# ifndef HasFontconfig
+# define HasFontconfig YES
+# endif
+#endif
+
+/* Cygwin-specific Windows resource compiler command */
+#ifdef CrossCompileDir
+# ifndef WindresCmd
+# define WindresCmd Concat3(CrossCompileDir,/,windres)
+# endif
+#else
+# ifndef WindresCmd
+# define WindresCmd windres
+# endif
+#endif
+
+#define PreProcessCmd CcCmd -E
+
+#ifndef PostIncDir
+# ifdef CrossCompileDir
+# define PostIncDir `CrossCompileDir/CcCmd --print-libgcc-file-name | sed 's,\\\\,/,g' | sed 's,libgcc.a,include,'`
+# else
+# define PostIncDir `CcCmd --print-libgcc-file-name | sed 's,\\\\,/,g' | sed 's,libgcc.a,include,'`
+# endif
+#endif
+#ifndef ExtraIncDir
+# ifdef CrossCompileDir
+# define ExtraIncDir CrossCompileDir/../include/w32api
+# else
+# define ExtraIncDir /usr/include/w32api
+# endif
+#endif
+
+#ifndef BourneShell
+/*
+ * This will cause builds/installs to terminate on errors, as on other
+ * platforms.
+ */
+#define BourneShell /bin/sh -e
+#endif
+
+#define LdCombineFlags -r
+
+#ifndef DefaultCCOptions
+# define DefaultCCOptions -Wall -Wpointer-arith
+#endif
+
+/* Cygwin 1.5.x now includes alloca */
+#if OSMinorVersion >= 5
+# define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+#else
+# define AllocateLocalDefines -DNO_ALLOCA
+#endif
+
+#ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 -fno-strength-reduce
+#endif
+
+/*
+ * -DFD_SETSIZE=256 is needed for xfs and the xserver. cygwin defines the
+ * FD_SETSIZE as 64 but some code expects it to be larger.
+ */
+#define StandardDefines -D__i386__ -DWIN32_LEAN_AND_MEAN -DX_LOCALE \
+ -D_X86_ -D__CYGWIN__ -D_XOPEN_SOURCE \
+ -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE \
+ -D_SVID_SOURCE -D_GNU_SOURCE -DFD_SETSIZE=256 \
+ -DXResExtension
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H \
+ -DHAS_ISW_FUNCS -DNO_WIDEC_H
+#define StandardCppOptions -traditional
+
+/* Cygwin shared memory requires cygipc package or cygserver. */
+#if UseCygIPC
+# if ThreadedX
+# define StandardCppDefines -DHAS_THREADS -DHAS_SHM StandardDefines
+# else
+# define StandardCppDefines -DHAS_SHM StandardDefines
+# endif
+#else
+# if ThreadedX
+# define StandardCppDefines -DHAS_THREADS StandardDefines
+# else
+# define StandardCppDefines StandardDefines
+# endif
+#endif
+
+/* IPv6 not yet supported */
+#ifndef BuildIPv6
+# define BuildIPv6 NO
+#endif
+
+#if 0
+/* 2004/02/29 - Harold - This doesn't do anything yet. Stay tuned. */
+/* Support for accelerating OpenGL with Win32's OpenGL layer. */
+#ifndef BuildXWinDRI
+# define BuildXWinDRI NO
+#endif
+#if BuildXWinDRI
+# define GlxExtraDefines -DGLX_DIRECT_RENDERING GlxArchDefines
+#endif
+#endif
+
+/* XWin Server specific build flags */
+#ifndef GlxUseWindows
+# define GlxUseWindows YES
+#endif
+#ifndef BuildXWinClipboard
+# define BuildXWinClipboard YES
+#endif
+#ifndef BuildXWinEmulatePseudo
+# define BuildXWinEmulatePseudo NO
+#endif
+#ifndef BuildXWinMultiWindow
+# define BuildXWinMultiWindow YES
+#endif
+#ifndef BuildXWinMultiWindowExtWM
+# define BuildXWinMultiWindowExtWM YES
+#endif
+#ifndef BuildXWinNativeGDI
+# define BuildXWinNativeGDI NO
+#endif
+#ifndef BuildXWinPrimaryFB
+# define BuildXWinPrimaryFB NO
+#endif
+#ifndef BuildXWinUpdateStats
+# define BuildXWinUpdateStats NO
+#endif
+#ifndef BuildXWinXF86Config
+# define BuildXWinXF86Config NO
+#endif
+
+/* XWin specific build flags - 1st order dependency */
+#if BuildXWinMultiWindowExtWM && !defined(BuildWindowsWMLibrary)
+# define BuildWindowsWMLibrary YES
+#elif !defined(BuildWindowsWMLibrary)
+# define BuildWindowsWMLibrary NO
+#endif /* BuildXWinMultiWindowExtWM && BuildWindowsWMLibrary */
+
+/* XWin Server specific defines */
+#if BuildXWinClipboard
+# define XWinClipboardDefines -DXWIN_CLIPBOARD
+#else
+# define XWinClipboardDefines
+#endif /* BuildXWinClipboard */
+#if BuildXWinEmulatePseudo
+# define XWinEmulatePseudoDefines -DXWIN_EMULATEPSEUDO
+#else
+# define XWinEmulatePseudoDefines
+#endif /* BuildXWinEmulatePseudo */
+#if BuildXWinMultiWindow
+# define XWinMultiWindowDefines -DXWIN_MULTIWINDOW
+#else
+# define XWinMultiWindowDefines
+#endif /* BuildXWinMultiWindow */
+#if BuildXWinMultiWindowExtWM
+# define BuildRootless YES
+# define XWinMultiWindowExtWMDefines -DXWIN_MULTIWINDOWEXTWM
+#else /* BuildXWinMultiWindowExtWM */
+# define XWinMultiWindowExtWMDefines
+#endif /* BuildXWinMultiWindowExtWM */
+#if BuildXWinNativeGDI
+# define XWinNativeGDIDefines -DXWIN_NATIVEGDI
+#else
+# define XWinNativeGDIDefines
+#endif /* BuildXWinNativeGDI */
+#if BuildXWinPrimaryFB
+# define XWinPrimaryFBDefines -DXWIN_PRIMARYFB
+#else
+# define XWinPrimaryFBDefines
+#endif /* BuildXWinPrimaryFB */
+#if BuildXWinUpdateStats
+# define XWinUpdateStatsDefines -DXWIN_UPDATESTATS
+#else
+# define XWinUpdateStatsDefines
+#endif /* BuildXWinUpdateStats */
+#if BuildXWinXF86Config
+# define XWinXF86ConfigDefines -DXWIN_XF86CONFIG
+#else
+# define XWinXF86ConfigDefines
+#endif /* BuildXWinXF86Config */
+
+/*
+ * XFree86Server is defined for the w32api headers, which protects some
+ * colliding names with #ifdef XFree86Server.
+ */
+#define XWinServerDefines -DPIXPRIV \
+ -DXFree86Server \
+ -DX_BYTE_ORDER=ByteOrder \
+ XvExtensionDefines \
+ XWinXF86ConfigDefines XWinNativeGDIDefines \
+ XWinPrimaryFBDefines \
+ XWinEmulatePseudoDefines \
+ XWinUpdateStatsDefines \
+ XWinClipboardDefines XWinMultiWindowDefines \
+ XWinMultiWindowExtWMDefines \
+ -DDDXBEFORERESET
+#define ServerOSDefines -DDDXTIME -DDDXOSINIT \
+ -DDDXOSVERRORF -DDDXOSFATALERROR
+#define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+#define ServerExtraDefines -DGCCUSESGAS XWinServerDefines \
+ AllocateLocalDefines
+#define ConnectionFlags -DTCPCONN -DUNIXCONN
+#define ExtraLibraries
+#define InstUidFlags -m 4711
+#define UseRgbTxt YES
+#define ExtraFilesToClean *.obj *.orig *.rej junk.c *.exe *.dll *.lib *~
+
+/* Flags for which the default in X11.tmpl is not what we want. */
+#ifndef BuildXinerama
+# define BuildXinerama NO /* Not supported by XWin Server */
+#endif
+#ifndef BuildXIE
+# define BuildXIE NO /* Deprecated */
+#endif
+#ifndef BuildDPMS
+# define BuildDPMS NO /* Not supported by XWin Server */
+#endif
+#ifndef BuildXInputExt
+# define BuildXInputExt YES /* Not enabled by default */
+#endif
+#ifndef BuildRandR
+# define BuildRandR YES /* Not supported by XWin Server */
+#endif
+#ifndef BuildXF86BigfontExt
+# define BuildXF86BigfontExt YES /* Not enabled by default */
+#endif
+#ifndef BuildGlxExt
+# define BuildGlxExt YES /* Not enabled by default */
+#endif
+#ifndef BuildXprintLib
+# define BuildXprintLib YES /* Not enabled when Xprt disabled */
+#endif
+#ifndef BuildXterm
+# define BuildXterm NO /* Built separately on Cygwin */
+#endif
+#ifndef BuildXResExt
+# define BuildXResExt YES /* Not enabled by default */
+#endif
+#ifndef BuildFreeType
+# define BuildFreeType YES /* Not enabled by default */
+#endif
+#ifndef BuildXTrueType
+# define BuildXTrueType YES /* Not enabled by default */
+#endif
+
+/* Server build rules */
+#ifndef XnestServer
+# define XnestServer YES
+#endif
+#ifndef XprtServer
+# define XprtServer NO
+#endif
+#ifndef XVirtualFramebufferServer
+# define XVirtualFramebufferServer YES
+#endif
+#ifndef XWinServer
+# define XWinServer YES
+#endif
+
+/* We need libX11 and libXext for the XWin Server */
+#if XWinServer
+# define BuildX11Lib YES
+#endif
+
+/*
+ * --unix option of Cygwin make fools the standard MakeFlagsToShellFlags macro
+ */
+#define MakeFlagsToShellFlags(makeflags,shellcmd) \
+ for flag in ${MAKEFLAGS} ''; do \ @@\
+ case "$$flag" in *=*) ;;--*) ;; *[makeflags]*) shellcmd;; esac; done
+
+#define MakeNamedTargetSubdir(dir,flags,subname)\
+ $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname
+
+#ifndef ManSuffix
+# define ManSuffix 1
+#endif
+
+#ifndef XtransFailSoft
+#define XtransFailSoft YES
+#endif
+
+#ifndef HasDevWindows
+# define HasDevWindows YES
+#endif
+
+#include <cygwin.rules>
+
+#if CrossCompiling
+#include <cross.def>
+#endif
diff --git a/nx-X11/config/cf/cygwin.rules b/nx-X11/config/cf/cygwin.rules
new file mode 100644
index 000000000..d144755af
--- /dev/null
+++ b/nx-X11/config/cf/cygwin.rules
@@ -0,0 +1,454 @@
+/*
+ * Cygwin shared library rules (DLL versions)
+ */
+
+#define HasSharedLibraries YES
+#define NeedLibInsideFlag NO
+#define ForceNormalLib NO
+#ifndef SharedLibX11
+# define SharedLibX11 YES
+#endif
+#ifndef NormalLibX11
+# define NormalLibX11 NO
+#endif
+#define SharedLibXaw YES
+#define SharedLibXmu YES
+#define SharedLibXt YES
+#define SharedLibFont NO
+#define SharedLibXaw7 YES
+#define SharedLibXaw6 YES
+#define SharedLibSM YES
+#define SharedLibICE YES
+#define SharedLibXext YES
+#define SharedLibXi YES
+#define SharedLibXtst YES
+#define SharedOldX YES
+#define SharedLibXp YES
+#define SharedLibGlx YES
+#define SharedLibDps YES
+#define SharedLibDpsTk YES
+#define SharedLibGlu YES
+#define SharedLibWindowsWM NO
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <cygwin.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -dll /**/
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -D_DLL
+#endif
+#ifndef PositionIndependentCplusplusFlags
+#define PositionIndependentCplusplusFlags -D_DLL
+#endif
+#ifndef UseExportLists
+#define UseExportLists YES
+#endif
+
+#define SharedLibraryName(libname, rev) \
+Concat3(cyg,libname,-$(shell echo rev|sed s=\\..*==).dll)
+
+#define ImportLibraryName(libname, rev) \
+Concat3(lib,libname,-$(shell echo rev|sed s=\\..*==).dll.a)
+
+#define ShortImportLibraryName(libname, rev) \
+Concat3(lib,libname,.dll.a)
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+
+#ifndef SharedDepLibraryTarget
+# ifdef UseInstalled
+# ifndef LinkBuildSonameLibrary
+# define LinkBuildSonameLibrary(lib)
+# endif
+# else /* !UseInstalled */
+# ifndef LinkBuildSonameLibrary
+# define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); @@\
+ cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
+# endif
+# endif /* UseInstalled */
+
+
+/*
+ * SharedDepLibraryTarget
+ */
+
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(SharedLibraryName(libname,rev)) @@\
+ @@\
+SharedLibraryName(libname,rev): deplist @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+ MakeDLL(libname,solist,rev) @@\
+ LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
+ LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
+ LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedDepCplusplusLibraryTarget - generate rules to create a shared library.
+ */
+
+#ifndef SharedDepCplusplusLibraryTarget
+# ifdef UseInstalled
+# ifndef LinkBuildSonameLibrary
+# define LinkBuildSonameLibrary(lib)
+# endif
+# else /* !UseInstalled */
+# ifndef LinkBuildSonameLibrary
+# define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); @@\
+ cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
+# endif
+# endif /* UseInstalled */
+
+
+/*
+ * SharedDepCplusplusLibraryTarget
+ */
+
+#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(SharedLibraryName(libname,rev)) @@\
+ @@\
+SharedLibraryName(libname,rev): deplist @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+ MakeCplusplusDLL(libname,solist,rev) @@\
+ LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
+ LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
+ LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+
+#endif /* SharedDepCplusplusLibraryTarget */
+
+
+/*
+ * SharedDepModuleTarget
+ */
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(CC) -o $@ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ @@\
+clean:: @@\
+ RemoveFile(name)
+#endif /* SharedDepModuleTarget */
+
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shared data file
+ */
+
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif
+
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+/*
+ * MakeDllProg
+ */
+
+#define MakeDLLProg(libname,solist,prog,rev) @@\
+ prog -shared -Wl,--out-implib=ImportLibraryName(libname,rev) -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc -Wl,--exclude-libs,ALL -o SharedLibraryName(libname,rev) solist $(REQUIREDLIBS)
+
+/*
+ * MakeDll
+ */
+
+#define MakeDLL(libname,solist,rev) @@\
+ MakeDLLProg(libname,solist,$(CC),rev)
+
+/*
+ * MakeCplusplusDll
+ */
+
+#define MakeCplusplusDLL(libname,solist,rev) @@\
+ MakeDLLProg(libname,solist,$(CXX),rev)
+
+
+
+/*
+ * SharedLibraryTarget
+ */
+
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(SharedLibraryName(libname,rev)) @@\
+ @@\
+SharedLibraryName(libname,rev): solist @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+ MakeDLL(libname,solist,rev) @@\
+ LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
+ LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
+ LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
+clean:: @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+
+
+/*
+ * InstallLink
+ */
+
+#ifndef InstallLink
+#define InstallLink(step, file, link, dest) @@\
+step:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(LN) -sf file $(DESTDIR)dest/link
+#endif
+
+/*
+ * InstallSharedLibrary
+ */
+
+#define InstallSharedLibrary(libname,rev,dest) @@\
+InstallTarget(install,ImportLibraryName(libname,rev),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
+InstallTarget(install,SharedLibraryName(libname,rev),$(INSTBINFLAGS),$(BINDIR)) @@\
+InstallLink(install,ImportLibraryName(libname,rev),ShortImportLibraryName(libname,rev),$(USRLIBDIR))
+
+
+/*
+ * ProgramTargetName - This can be simply 'target' or 'target.exe' when
+ * building on Cygwin proper, as Cygwin automatically appends .exe to compiled
+ * executables and make, rm, ln, etc. will automatically search for a file
+ * with .exe appended if the raw file name cannot be found. However,
+ * building with a cross compiler requires 'target.exe', as the cross
+ * compiler doesn't know to append .exe, nor do the cross compiler tools
+ * know to search for files with .exe appended if the raw file name cannot
+ * be found.
+ */
+
+#define ProgramTargetName(target) Concat(target,.exe)
+
+
+/*
+ * HostProgramTargetName - Don't add .exe if cross-compiling.
+ */
+
+#ifndef HostProgramTargetName
+# if CrossCompiling
+# define HostProgramTargetName(target) target
+# else
+# define HostProgramTargetName(target) ProgramTargetName(target)
+# endif
+#endif
+
+
+/*
+ * LinkBuildDLL - Cygwin only rule, similar to LinkBuildModule.
+ * Unfortunately, we have to create a copy of each DLL in xc/exports/bin;
+ * linking doesn't work, the executables (e.g. xkbcomp) will report
+ * that they cannot find DLLs (e.g. libX11.dll).
+ */
+
+#ifdef UseInstalled
+#define LinkBuildDLL(lib) $(_NULLCMD_)
+#else
+#define LinkBuildDLL(lib) MakeDir($(BUILDBINDIR)) @@\
+ RemoveFile($(BUILDBINDIR)/lib) @@\
+ cd $(BUILDBINDIR) && $(CP) $(BUILDBINTOP)/$(CURRENT_DIR)/lib .
+#endif
+
+#ifndef LinkImportLibrary
+#ifdef UseInstalled
+#define LinkImportLibrary(lib, importlib) $(_NULLCMD_)
+#else
+#define LinkImportLibrary(lib, importlib) MakeDir($(BUILDLIBDIR)) @@\
+ RemoveFile($(BUILDLIBDIR)/importlib) @@\
+ cd $(BUILDLIBDIR) && $(LN) lib importlib
+#endif
+#endif /* LinkImportLibrary */
+
+
+/*
+ * LinkBuildBinary - This rule normally creates a link in xc/exports/bin
+ * to a binary, but we create an actual copy of the binary.
+ * Creating a link causes the DLLs that the binary depend on, such as
+ * libX11.dll, not to be found. Copying the binary causes the runtime
+ * directory to be xc/exports/bin, which is the location of the DLLs, thus,
+ * the DLLs can now be found by the binary. Phew...
+ *
+ * Note that sometimes the binary is not an executable. One example
+ * is the rgb binary file.
+ *
+ * Passing -p preserves the attributes as the date and prevents useless
+ * rebuilds.
+ *
+ * ProgramTargetName is passed to LinkBuildBinary if the binary
+ * is actually an executable; thus, we do not wrap the binary name
+ * with ProgramTargetName here.
+ */
+
+#ifndef LinkBuildBinary
+#define LinkBuildBinary(binary) @@\
+all:: binary @@\
+ MakeDir($(BUILDBINDIR)) @@\
+ RemoveFile($(BUILDBINDIR)/binary) @@\
+ cd $(BUILDBINDIR) && $(CP) -p $(BUILDBINTOP)/$(CURRENT_DIR)/binary .
+#endif /* LinkBuildBinary */
+
+/*
+ * ProfiledRelocatableTarget - generate rules to produce a profiled
+ * relocatable object file instead of a library. Differs from Imake.rules
+ * by passing '--oformat pe-i386' to ld.
+ */
+
+#ifndef ProfiledRelocatableTarget
+#define ProfiledRelocatableTarget(objname,objlist) @@\
+AllTarget(Concat(objname,_p.Osuf)) @@\
+ @@\
+Concat(objname,_p.Osuf): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(LD) -X -r --oformat pe-i386 objlist -o $@
+
+#endif /* ProfiledRelocatableTarget */
+
+
+/*
+ * DebuggedRelocatableTarget - generate rules to produce a debuggable
+ * relocatable object file instead of a library. Differs from Imake.rules
+ * by passing '--oformat pe-i386' to ld.
+ */
+
+#ifndef DebuggedRelocatableTarget
+#define DebuggedRelocatableTarget(objname,objlist) @@\
+AllTarget(Concat(objname,_d.Osuf)) @@\
+ @@\
+Concat(objname,_d.Osuf): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(LD) -X -r --oformat pe-i386 objlist -o $@
+
+#endif /* DebuggedRelocatableTarget */
+
+
+/*
+ * DependDependencyStatement - Imake.rules wraps $(DEPEND) in
+ * ProgramTargetName(), which causes cross compiling to think that
+ * $(DEPEND) hasn't been built, as $(DEPEND) is a host tool, and should
+ * not be wrapped with ProgramTargetName(). Perhaps there should be
+ * a HostProgramTargetName()...
+ */
+
+#ifndef DependDependencyStatement
+#if HasMakefileSafeInclude
+#define DependDependencyStatement() @@\
+DependFileName:: $(DEPEND)
+#else
+#define DependDependencyStatement() @@\
+depend:: $(DEPEND)
+#endif
+#endif
+
+
+/*
+ * DependDependency - Imake.rules wraps $(DEPEND) in ProgramTargetName().
+ * This doesn't work when cross compiling, see the locally defined
+ * DependDependencyStatement comment (above) for more information.
+ */
+
+#ifndef DependDependency
+#ifdef UseInstalled
+#define DependDependency() /**/
+#else
+#define DependDependency() @@\
+DependDependencyStatement() @@\
+ @@\
+NoCmpScript($(DEPEND)) @@\
+ @@\
+$(DEPEND): @@\
+ @echo "checking $@ over in $(DEPENDSRC) first..."; \ @@\
+ cd $(DEPENDSRC) && $(MAKE) makedependonly; \ @@\
+ echo "okay, continuing in $(CURRENT_DIR)"
+
+#endif /* UseInstalled */
+#endif /* DependDependency */
+
+
+/*
+ * ImakeDependency - Imake.rules wraps $(IMAKE) in ProgramTargetName(),
+ * which doesn't work when cross compiling, as imake is supposed to be a
+ * host program. See the locally defined DependDependencyStatement
+ * comment (above) for more information.
+ */
+
+#ifndef ImakeDependency
+#ifdef UseInstalled
+#define ImakeDependency(target) /**/
+#else
+#define ImakeDependency(target) @@\
+target:: $(IMAKE) @@\
+ @@\
+NoCmpScript($(IMAKE) $(IMAKE).Osuf) @@\
+ @@\
+$(IMAKE) $(IMAKE).Osuf: @@\
+ -@(cd $(IMAKESRC) && if [ -f Makefile ]; then \ @@\
+ echo "checking $@ in $(IMAKESRC) first..."; $(MAKE) imakeonly; else \ @@\
+ echo "bootstrapping $@ from Makefile.ini in $(IMAKESRC) first..."; \ @@\
+ $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; fi; \ @@\
+ echo "okay, continuing in $(CURRENT_DIR)")
+#endif /* UseInstalled */
+#endif /* ImakeDependency */
+
+
+/*
+ * ResourceObjectRule - Build a Windows resouce file (.res) into
+ * an object file (.o) that can be linked in with the executable
+ * or library being built.
+ */
+
+#ifndef ResourceObjectRule
+#define ResourceObjectRule(basename,depends,options) @@\
+AllTarget(basename.RESsuf) @@\
+basename.RESsuf: basename.RCsuf depends @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \ @@\
+ WindresCmd basename.RCsuf options -O coff -o basename.RESsuf @@\
+clean:: @@\
+ RemoveFiles(basename.RESsuf)
+
+#endif /* ResourceObjectRule */
+
+/* The arglist can get quite long. Make sure we can delete it though */
+#ifndef MakeFonts
+# define MakeFonts() @@\
+all:: $(OBJS) @@\
+ @@\
+MakeFontsDir($(OBJS)) @@\
+ @@\
+clean:: @@\
+ find -name "*.pcf" -o -name "*.pcf.Z" -o -name "*.pcf.gz" | xargs -r rm
+#endif /* MakeFonts */
+
+#ifndef IncludeMakefile
+#define IncludeMakefile(file) @@sinclude file
+#endif
diff --git a/nx-X11/config/cf/cygwin.tmpl b/nx-X11/config/cf/cygwin.tmpl
new file mode 100644
index 000000000..404b62845
--- /dev/null
+++ b/nx-X11/config/cf/cygwin.tmpl
@@ -0,0 +1,77 @@
+XCOMM $XFree86: xc/config/cf/cygwin.tmpl,v 3.18 2003/10/19 08:27:05 herrb Exp $
+
+#define SharedX11Reqs
+#define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS)
+#define SharedXtReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XONLYLIB)
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIB) $(XLIB)
+#define SharedXtstReqs $(LDPRELIB) $(XLIB)
+#define SharedSMReqs $(LDPRELIB) $(ICELIB)
+#define SharedXpReqs $(LDPRELIB) $(XAUTHLIB) $(XLIB)
+#define SharedXvReqs $(LDPRELIB) $(XLIB)
+#define SharedGLReqs $(LDPRELIB) $(XLIB)
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedXfontReqs $(LDPRELIB) $(FONTSTUBLIB) GzipLibrary $(FREETYPE2LIB)
+#define SharedFontencReqs $(LDPRELIB) GzipLibrary
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXpmReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB)
+#define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIB)
+#define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+#define SharedpsresReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB
+#define SharedXResReqs $(LDPRELIB) $(XLIB)
+#define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+#define SharedXineramaReqs $(LDPRELIB) $(XLIB)
+/*
+ * We don't build Xss
+ * #define SharedXssReqs $(LDPRELIB) $(XLIB)
+ */
+#define SharedXvMCReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB)
+#define SharedXmuuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXfixesReqs $(LDPRELIB) $(XLIB)
+#define SharedXdamageReqs $(LDPRELIB) $(XFIXESLIB) $(XLIB)
+#define SharedXcompositeReqs $(LDPRELIB) $(XDAMAGELIB) $(XFIXESLIB) $(XLIB)
+#define SharedXevieReqs $(LDPRELIB) $(XLIB)
+
+#ifndef FixupLibReferences
+# define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef XawClientLibs
+# define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+
+/*
+ * Suffix for Windows resource source files
+ */
+
+#ifndef RCsuf
+# define RCsuf rc
+#endif
+
+
+/*
+ * Suffix for Windows resource compiled files
+ */
+
+#ifndef RESsuf
+# define RESsuf res
+#endif
diff --git a/nx-X11/config/cf/darwin.cf b/nx-X11/config/cf/darwin.cf
new file mode 100644
index 000000000..d0b067c89
--- /dev/null
+++ b/nx-X11/config/cf/darwin.cf
@@ -0,0 +1,330 @@
+XCOMM $XdotOrg: xc/config/cf/darwin.cf,v 1.8 2005/04/01 01:22:07 torrey Exp $
+XCOMM platform: $XFree86: xc/config/cf/darwin.cf,v 1.50 2004/01/20 23:54:50 torrey Exp $
+
+/* Darwin / Mac OS X configuration by John Carmack <johnc@idsoftware.com> */
+
+/* imake determines the default values by parsing uname */
+#ifndef OSName
+#define OSName DefaultOSName
+#endif
+#ifndef OSVendor
+#define OSVendor Apple Computer, Inc.
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+/*
+ * Define the operating system's capabilities
+ */
+#define HasSnprintf YES
+#define HasPutenv YES
+#define HasBSD44Sockets YES
+#define Malloc0ReturnsNull NO
+#define HasShadowPasswd NO
+#define HasUsableFileMmap YES
+#define HasZlib YES
+#ifndef HasShm
+# define HasShm YES
+#endif
+#define HasNdbm YES
+#if OSMajorVersion >= 6
+# define HasNCurses YES
+# define HasArc4Random YES
+# define HasGetIfAddrs YES
+# define HasStrlcat YES
+#else
+# define HasBasename NO
+# define HasNCurses NO
+#endif
+#ifndef HasGroff
+# define HasGroff YES
+#endif
+#ifndef HasGcc3
+# define HasGcc3 NO
+#endif
+#ifndef HasFreetype2
+# define HasFreetype2 NO
+#endif
+#ifndef HasExpat
+# define HasExpat NO
+#endif
+#ifndef HasLibpng
+# define HasLibpng NO
+#endif
+
+/* Older versions don't really support IPv6, but #define AF_INET6. */
+#if OSMajorVersion < 6
+# define BuildIPv6 NO
+#endif
+
+/* Thread support */
+#define HasPosixThreads YES
+#define SystemMTDefines -D_REENTRANT
+#if OSMajorVersion >= 6
+# define HasThreadSafeAPI YES
+# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_UNISTDAPI
+#else
+# define HasThreadSafeAPI NO
+# define MTSafeAPIDefines -DXOS_USE_MTSAFE_NETDBAPI
+#endif
+
+/* Libtool on Darwin always uses minor numbers */
+#define LibtoolMinorVersions YES
+
+/* The most common file system, HFS+, is not case sensitive. */
+#ifndef CaseSensitiveFileSystem
+# define CaseSensitiveFileSystem NO
+#endif
+
+/*
+ * This enables some settings for developers.
+ */
+#ifndef XFree86Devel
+# define XFree86Devel NO
+#endif
+
+/*
+ * This enables Quartz compatibility.
+ * Turn off to build on raw Darwin systems.
+ */
+#ifndef DarwinQuartzSupport
+# define DarwinQuartzSupport YES
+#endif
+
+#if DarwinQuartzSupport
+
+# if OSMajorVersion >= 7
+ PROJ_BUILD = xcodebuild
+# else
+ PROJ_BUILD = pbxbuild
+# endif
+
+# ifndef HasXplugin
+# if OSMajorVersion >= 7
+# define HasXplugin YES
+# else
+# define HasXplugin NO
+# endif
+# endif
+
+# if HasXplugin
+# ifndef XpLibDir
+# define XpLibDir /usr/lib
+# endif
+# ifndef XpIncDir
+# define XpIncDir $(SERVERSRC)/hw/darwin/quartz/xpr
+# endif
+ XPLIBDIR = XpLibDir
+ XPINCDIR = XpIncDir
+# define XpluginLibrary Concat(-L,$(XPLIBDIR)) -lXplugin
+# else
+# define XpluginLibrary /**/
+# endif
+
+# ifndef BuildAppleDRI
+# if HasXplugin
+# define BuildAppleDRI YES
+# else
+# define BuildAppleDRI NO
+# endif
+# endif
+
+# if BuildAppleDRI
+# define GlxExtraDefines -DGLX_DIRECT_RENDERING -DGLX_USE_APPLEGL GlxArchDefines
+# endif
+
+# define BuildRootless YES
+# define BuildAppleWMLibrary YES
+
+#endif /* DarwinQuartzSupport */
+
+/* we don't need -lm */
+#define MathLibrary /**/
+
+#define TermcapLibrary -lcurses
+#define SetTtyGroup YES /* for xterm */
+
+/* we don't have a dbm library */
+#define DBMLibrary /**/
+
+#define MkdirHierCmd mkdir -p
+
+/* Use flex -l for compatibility with various versions of flex. */
+#ifndef LexCmd
+# define LexCmd flex -l
+#endif
+#define HasFlex YES
+
+/*
+ * Our cpp isn't in /lib/cpp and early versions don't like -undef.
+ * The gcc 3.3 cpp that Apple ships inserts spurious #pragmas,
+ * so we use the 3.1-based version in this case.
+ */
+#if (GccMajorVersion == 3) && (GccMinorVersion == 3)
+# define CppCmd /usr/bin/cpp3
+#else
+# define CppCmd /usr/bin/cpp
+#endif
+#if (GccMajorVersion == 3) && (GccMinorVersion == 3) || (GccMajorVersion > 3)
+# define StandardCppOptions -traditional -D__GNUC__
+#endif
+#if HasGcc3
+# define RawCppCmd CppCmd -undef
+#else
+# define RawCppCmd CppCmd
+#endif
+
+/* we have a gcc compatible compiler, but its not called gcc */
+#define CcCmd /usr/bin/cc
+#define CplusplusCmd /usr/bin/c++
+
+/* default flags to pass to cc */
+#ifndef DefaultCCOptions
+#if XFree86Devel
+# define DefaultCCOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wredundant-decls -Wnested-externs \
+ -no-cpp-precomp
+#else
+# define DefaultCCOptions -Wall -Wpointer-arith -no-cpp-precomp
+#endif
+#endif
+
+/* flags to pass to cc when building libraries */
+#ifndef LibraryCCOptions
+# define LibraryCCOptions DefaultCCOptions -fno-common
+#endif
+
+/* The cr implementation does not build with NEED_SCREEN_REGIONS,
+ so play it safe. */
+#ifndef ServerCCOptions
+# define ServerCCOptions DefaultCCOptions -UNEED_SCREEN_REGIONS
+#endif
+
+#ifdef PpcDarwinArchitecture
+# define DarwinMachineDefines -D__powerpc__
+# if HasGcc3
+# define OptimizedCDebugFlags -Os
+# else
+# define OptimizedCDebugFlags -O2
+# endif
+# define ByteOrder X_BIG_ENDIAN
+#endif /* PpcDarwinArchitecture */
+
+#ifdef i386DarwinArchitecture
+# define DarwinMachineDefines -D__i386__
+# if HasGcc3
+# define OptimizedCDebugFlags -Os
+# else
+# define OptimizedCDebugFlags -O2 -fno-strength-reduce
+# endif
+# define ByteOrder X_LITTLE_ENDIAN
+#endif /* i386DarwinArchitecture */
+
+#if OSMajorVersion < 7
+# define DarwinLocaleDefines -DX_LOCALE
+#else
+# define DarwinLocaleDefines /**/
+# define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H
+#endif
+
+/*
+ * __DARWIN__ will be used for platform specific #ifdefs that can't
+ * be handled by existing X defines.
+ *
+ * Darwin's alloca() seg faults (rather than returning NULL) on failed
+ * allocations, so we can't use it.
+ */
+#define StandardDefines DarwinMachineDefines -D__DARWIN__ \
+ -DNO_ALLOCA -DCSRG_BASED DarwinLocaleDefines
+
+/*
+ * Set this to NO to just build the client libs, which should work without
+ * having to write any platform specific code.
+ */
+#ifndef BuildServer
+# define BuildServer YES
+
+/* our custom X server */
+# define XDarwinServer YES
+#endif
+
+/* Thanks to the IOKit, the X server does not have to be SetUID. */
+#ifndef InstallXserverSetUID
+# define InstallXserverSetUID NO
+#endif
+
+/* Allow Xtrans to work with non-SetUID server. */
+#ifndef XtransFailSoft
+# define XtransFailSoft YES
+#endif
+
+/* disable XKB by default as it can cause problems */
+#define DfltDisableXKB YES
+
+/* no direct graphics extension */
+#define BuildXF86DGA NO
+
+/* Support for tablets and other non-standard input devices */
+#ifndef BuildXInputExt
+# define BuildXInputExt YES
+#endif
+#define BuildXInputLib YES
+
+/* no Display Power Management extension */
+#define BuildDPMS NO
+
+/* no XFree86-Misc extension */
+#define BuildXF86MiscExt NO
+
+/* no XFree86-VidMode extension */
+#define BuildXF86VidModeExt NO
+
+#ifndef BuildXterm
+# define BuildXterm BuildClients /* Not enabled by default */
+#endif
+
+#define BuildLibPathVar DYLD_LIBRARY_PATH
+
+/* include rules to build shared libraries */
+#include <darwinLib.rules>
+
+/*
+ * BundleProgramTarget - Generate rules for compiling, linking and
+ * installing a bundle executable.
+ */
+#ifndef BundleProgramTarget
+#define BundleProgramTarget(program,loader,subdirs,objs,deplib,syslib,dstdir) @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+program: loader subdirs objs deplib @@\
+ RemoveTargetProgram($@) @@\
+ LinkRule($@,-bundle $(LDOPTIONS),objs,deplib $(LDLIBS) syslib -bundle_loader loader) @@\
+ @@\
+InstallProgram(program,dstdir/program.bundle/Contents/MacOS) @@\
+ @@\
+clean:: @@\
+ RemoveFile(program)
+#endif /* BundleProgramTarget */
+
+/*
+ * Darwin specific Imake Config files
+ */
+#ifndef LocalConfigFiles
+#define LocalConfigFiles \
+ darwinLib.rules \
+ darwinLib.tmpl
+#endif
+
+/* include all the X.Org rules */
+#include <xorg.cf>
diff --git a/nx-X11/config/cf/darwinLib.rules b/nx-X11/config/cf/darwinLib.rules
new file mode 100644
index 000000000..01f69d3e3
--- /dev/null
+++ b/nx-X11/config/cf/darwinLib.rules
@@ -0,0 +1,167 @@
+XCOMM $XFree86: xc/config/cf/darwinLib.rules,v 1.8 2003/10/09 22:43:18 herrb Exp $
+/*
+ * Darwin/Mac OS X shared library rules
+ */
+
+#ifndef UseElfFormat
+#define UseElfFormat NO
+#endif
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+#ifndef ForceNormalLib
+#define ForceNormalLib YES
+#endif
+
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <darwinLib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -dynamiclib
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -dynamic
+#endif
+#ifndef ExtraLoadFlags
+#define ExtraLoadFlags /**/
+#endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.rev.dylib) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.rev.dylib) $(DESTDIR)dest @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) Concat($(DESTDIR)dest/lib,libname.$$MAJREV.dylib) && \ @@\
+ $(LN) Concat(lib,libname.rev.dylib) Concat($(DESTDIR)dest/lib,libname.$$MAJREV.dylib) @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.dylib); \ @@\
+ $(LN) Concat(lib,libname.rev.dylib) Concat($(DESTDIR)dest/lib,libname.dylib)); fi
+#endif /* InstallSharedLibrary */
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+# define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.rev.dylib)) @@\
+ @@\
+Concat(lib,libname.rev.dylib): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ INSTALLNAME=Concat(lib,libname.$$MAJREV.dylib); \ @@\
+ set -x; (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -install_name $(USRLIBDIR)/$$INSTALLNAME -current_version rev -compatibility_version rev solist $(REQUIREDLIBS)); \ @@\
+ $(RM) $$INSTALLNAME; $(LN) $@ $$INSTALLNAME; \ @@\
+ LinkBuildSonameLibrary($$INSTALLNAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.dylib); \ @@\
+ $(LN) $@ Concat(lib,libname.dylib)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.dylib),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.$$MAJREV.dylib) @@\
+ $(RM) Concat(lib,libname.rev.dylib) Concat(lib,libname.dylib)
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+# define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.rev.dylib)) @@\
+ @@\
+Concat(lib,libname.rev.dylib): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ INSTALLNAME=Concat(lib,libname.$$MAJREV.dylib); \ @@\
+ set -x; (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -install_name $(USRLIBDIR)/$$INSTALLNAME -current_version rev -compatibility_version rev solist $(REQUIREDLIBS)); \ @@\
+ $(RM) $$INSTALLNAME; $(LN) $@ $$INSTALLNAME; \ @@\
+ LinkBuildSonameLibrary($$INSTALLNAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.dylib); \ @@\
+ $(LN) $@ Concat(lib,libname.dylib)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.dylib),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.$$MAJREV.dylib) @@\
+ $(RM) Concat(lib,libname.rev.dylib) Concat(lib,libname.dylib)
+
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedDepCplusplusLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepCplusplusLibraryTarget
+# define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.rev.dylib)) @@\
+ @@\
+Concat(lib,libname.rev.dylib): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ INSTALLNAME=Concat(lib,libname.$$MAJREV.dylib); \ @@\
+ set -x; (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -install_name $(USRLIBDIR)/$$INSTALLNAME -current_version rev -compatibility_version rev solist $(REQUIREDLIBS)); \ @@\
+ $(RM) $$INSTALLNAME; $(LN) $@ $$INSTALLNAME; \ @@\
+ LinkBuildSonameLibrary($$INSTALLNAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.dylib); \ @@\
+ $(LN) $@ Concat(lib,libname.dylib)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.dylib),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.$$MAJREV.dylib) @@\
+ $(RM) Concat(lib,libname.rev.dylib) Concat(lib,libname.dylib)
+
+#endif /* SharedDepCplusplusLibraryTarget */
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ @@\
+ $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name
+
+#endif /* SharedDepModuleTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryDataTarget */
+
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
diff --git a/nx-X11/config/cf/darwinLib.tmpl b/nx-X11/config/cf/darwinLib.tmpl
new file mode 100644
index 000000000..0d3c4368f
--- /dev/null
+++ b/nx-X11/config/cf/darwinLib.tmpl
@@ -0,0 +1,61 @@
+XCOMM $XFree86: xc/config/cf/darwinLib.tmpl,v 1.19 2003/11/04 00:24:36 torrey Exp $
+/*
+ * Darwin/Mac OS X shared library template
+ */
+
+#ifndef FixupLibReferences
+#define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef XawClientLibs
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+/* Allow for libpthread, as overridden by OS definitions */
+#if !defined(SharedX11Reqs)
+#define SharedX11Reqs
+#endif
+#define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY)
+
+#define SharedXfontReqs $(LDPRELIB) $(FONTSTUBLIB) GzipLibrary $(FREETYPE2LIB) -flat_namespace
+
+#define SharedAppleWMReqs $(LDPRELIB) $(XLIB)
+#define SharedFontencReqs $(LDPRELIB) GzipLibrary
+#define SharedGLReqs $(LDPRELIB) $(XLIB)
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedOSMesaReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedSMReqs $(LDPRELIB) $(ICELIB)
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIB) $(XLIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXmuuReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXpReqs $(LDPRELIB) $(XLIB)
+#define SharedXpmReqs $(LDPRELIB) $(XLIB)
+#define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+#define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB) -flat_namespace
+#define SharedXtstReqs $(LDPRELIB) $(XLIB)
+#define SharedXvReqs $(LDPRELIB) $(XLIB)
+#define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIB)
+#define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedpsresReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXResReqs $(LDPRELIB) $(XLIB)
+#define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+#define SharedXineramaReqs $(LDPRELIB) $(XLIB)
+#define SharedXssReqs $(LDPRELIB) $(XLIB)
+#define SharedXvMCReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB)
+#define SharedXfixesReqs $(LDPRELIB) $(XLIB)
+#define SharedXdamageReqs $(LDPRELIB) $(XFIXESLIB) $(XLIB)
+#define SharedXcompositeReqs $(LDPRELIB) $(XDAMAGELIB) $(XFIXESLIB) $(XLIB)
+#define SharedXevieReqs $(LDPRELIB) $(XLIB)
diff --git a/nx-X11/config/cf/dmx.cf b/nx-X11/config/cf/dmx.cf
new file mode 100644
index 000000000..f5e25f313
--- /dev/null
+++ b/nx-X11/config/cf/dmx.cf
@@ -0,0 +1,65 @@
+/* $XFree86$ */
+
+/*
+ * This file contains DMX server specific defines
+ */
+
+#undef XVendorString
+#define XVendorString "DMX Project"
+
+/*
+ * Note 1: This is a signed int that is printed as a decimal number.
+ * Since we want to make it human-interpretable, the fields are
+ * defined as:
+ * 2147483648
+ * AAbbyymmdd
+ * AA: major version 01-20
+ * bb: minor version 00-99
+ * yy: year 00-99 [See Note 2]
+ * mm: month 01-12
+ * dd: day 01-31
+ *
+ * Note 2: The default epoch for the year is 2000.
+ * To change the default epoch, change the DMX_VENDOR_RELEASE
+ * macro below, bumb the minor version number, and change
+ * xdpyinfo to key off the major/minor version to determine the
+ * new epoch. Remember to do this on January 1, 2100 and every
+ * 100 years thereafter.
+ */
+#define DMX_VENDOR_RELEASE(major,minor,year,month,day) \
+ ((major) * 100000000) + \
+ ((minor) * 1000000) + \
+ ((year-2000) * 10000) + \
+ ((month) * 100) + \
+ ((day) * 1)
+#undef XVendorRelease
+#define XVendorRelease DMX_VENDOR_RELEASE(1,2,2004,6,30)
+
+EXTENSIONS_NOT_SUPPORTED = \
+ -UMULTIBUFFER \
+ -UXV \
+ -UDBE \
+ -UXF86VIDMODE \
+ -UXF86MISC \
+ -UXFreeXDGA \
+ -UXF86DRI \
+ -UMITSHM \
+ -UTOGCUP \
+ -UDPSEXT \
+ -UMITMISC \
+ -USCREENSAVER \
+ -URANDR \
+ -UXFIXES \
+ -UDAMAGE
+
+EXT_TEMP_NOT_SUPPORTED = \
+ -UFONTCACHE
+
+DMX_DEFINES = \
+ $(EXTENSIONS_NOT_SUPPORTED) \
+ $(EXT_TEMP_NOT_SUPPORTED) \
+ -UXFree86LOADER
+
+XCOMM MITSHM -- works but doesn't quite do what people think it should
+XCOMM DPMSExtension -- compiled in but is non-functional
+XCOMM MITMISC provides legacy support for X11R1,2 applications. Disable.
diff --git a/nx-X11/config/cf/fujitsu.cf b/nx-X11/config/cf/fujitsu.cf
new file mode 100644
index 000000000..3615d3074
--- /dev/null
+++ b/nx-X11/config/cf/fujitsu.cf
@@ -0,0 +1,95 @@
+XCOMM platform: $Xorg: fujitsu.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion)
+
+#define PatheticCpp YES
+
+#ifdef SparcArchitecture
+
+#define BootstrapCFlags -D__uxp__
+#define StandardDefines -D__uxp__ -DSVR4 -DANSICPP
+#define StandardCppDefines -D__uxp__ -DSVR4 -DANSICPP
+
+#define CppCmd /usr/ccs/lib/cpp
+
+#ifndef ArCmdBase
+# define ArCmdBase /usr/ccs/bin/ar
+#endif
+#ifndef AsCmd
+# define AsCmd /usr/ccs/bin/as
+#endif
+#ifndef CcCmd
+# define CcCmd /usr/ccs/bin/cc
+#endif
+#ifndef CplusplusCmd
+# define CplusplusCmd /opt/uxpcplus/bin/CC
+#endif
+#ifndef CplusplusFilt
+# define CplusplusFilt /opt/uxpcplus/bin/c++filt
+#endif
+#ifndef CplusplusDependIncludes
+# define CplusplusDependIncludes -I/opt/uxpcplus/include/CC
+#endif
+#ifndef LdCmd
+# define LdCmd /usr/ccs/bin/ld
+#endif
+#ifndef LexCmd
+# define LexCmd /usr/ccs/bin/lex
+#endif
+#ifndef YaccCmd
+# define YaccCmd /usr/ccs/bin/yacc
+#endif
+
+#define BuildLibPathVar LD_LIBRARY_PATH
+#define SystemV4 YES
+#define HasSockets YES
+#define DBMLibrary /* ndbm modules are in -lc */
+#define HasNdbm YES
+#ifndef HasLdRunPath
+#define HasLdRunPath YES
+#endif
+#define BuildServer NO
+
+#include <sv4Lib.rules>
+
+#endif
+
+#ifdef mc68000Architecture
+
+#define BootstrapCFlags -D__sxg__
+#define StandardDefines -D__sxg__ -DSYSV -DUSG -DNOSTDHDRS -I/usr/xwin/include
+#define StandardCppDefines -D__sxg__ -DSYSV -DUSG -DNOSTDHDRS -I/usr/xwin/include
+
+#define LnCmd ln
+
+#define DoRanlibCmd NO
+#define DefaultCCOptions +Z384
+#define ExtraLibraries -lXbsd -lsocket -lu
+#define TermcapLibrary -lcurses
+#define BuildServer NO
+#define HasSymLinks NO
+#define HasVFork NO
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+
+#endif
+
+#define GencatFlags -m
+
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP -DHAVE_PTMS
+#define DtSearchDefines -DI18N_MSG DtSvcDefines -DNEED_STRCASECMP
+#define DtWidgetDefines DtSearchDefines
+
+#define ArchitectureDefines -DUXP_ARCHITECTURE
+
+#define CdeProjectDefines \
+ -DMULTIBYTE -DNLS16 \
+ -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
diff --git a/nx-X11/config/cf/generic.cf b/nx-X11/config/cf/generic.cf
new file mode 100644
index 000000000..dd1cd10a7
--- /dev/null
+++ b/nx-X11/config/cf/generic.cf
@@ -0,0 +1,21 @@
+XCOMM platform: $Xorg: generic.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+#ifndef OSName
+#define OSName Unknown Operating System
+#endif
+XCOMM operating system: OSName
+#ifndef OSMajorVersion
+#define OSMajorVersion 0
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+
+#ifdef SYSV
+#define SystemV YES
+#endif
+#ifdef SVR4
+#define SystemV4 YES
+#endif
+
+#define BuildServer NO
diff --git a/nx-X11/config/cf/gnu.cf b/nx-X11/config/cf/gnu.cf
new file mode 100644
index 000000000..632c3a7fa
--- /dev/null
+++ b/nx-X11/config/cf/gnu.cf
@@ -0,0 +1,187 @@
+XCOMM platform: $XFree86: xc/config/cf/gnu.cf,v 1.12 2003/11/24 02:02:26 dawes Exp $
+XCOMM $XdotOrg: xc/config/cf/gnu.cf,v 1.3 2005/02/09 04:09:54 gisburn Exp $
+
+#ifndef OSName
+#define OSName DefaultOSName
+#endif
+
+#ifndef OSVendor
+#define OSVendor /**/
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+#define GNUSourceDefines -D_POSIX_C_SOURCE=199309L \
+ -D_POSIX_SOURCE -D_XOPEN_SOURCE \
+ -D_BSD_SOURCE -D_SVID_SOURCE
+
+XCOMM XXXMB: What about _GNU_SOURCE, see Linux/UseInstalled?
+
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H
+
+#define HasPosixThreads YES
+#define ThreadedX YES
+#define HasThreadSafeAPI YES
+#define ThreadsLibraries -lpthread
+#define SystemMTDefines -D_REENTRANT
+
+#ifndef HasLibCrypt
+#define HasLibCrypt YES
+#endif
+
+#ifndef BuildXF86RushExt
+# define BuildXF86RushExt YES
+#endif
+
+#define BuildLibPathVar LD_LIBRARY_PATH
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#define HasDlopen YES
+#ifndef HasShadowPasswd
+# define HasShadowPasswd YES
+#endif
+#define HasPutenv YES
+
+XCOMM Not implemented and will always fail.
+#ifndef HasShm
+# define HasShm YES
+#endif
+
+#define HasBSD44Sockets YES
+#define HasSockets YES
+#define HasSnprintf YES
+#define HasMkstemp YES
+#define HasUsableFileMmap YES
+#ifndef HasNCurses
+#define HasNCurses YES
+#endif
+
+#define AvoidNullMakeCommand YES
+#ifndef DebuggableLibraries
+#define DebuggableLibraries NO
+#endif
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull YES
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#ifndef NeedWidePrototypes
+#define NeedWidePrototypes NO
+#endif
+#define SetTtyGroup YES
+
+#ifndef UseStaticTermcapLib
+#define UseStaticTermcapLib NO
+#endif
+
+#define MkdirHierCmd mkdir -p
+#ifndef CcCmd
+#define CcCmd gcc
+#endif
+#ifndef AsCmd
+#define AsCmd as
+#endif
+#ifndef LdCmd
+#define LdCmd ld
+#endif
+
+#define AsmDefines -D__ELF__
+#define CplusplusCmd c++
+#ifndef TermcapLibrary
+#if UseStaticTermcapLib
+#define TermcapLibrary StaticLibrary(/usr/lib,ncurses)
+#else
+#define TermcapLibrary -lncurses
+#endif
+#endif
+#ifndef DoLoadableServer
+#define DoLoadableServer YES
+#endif
+#ifndef CppCmd
+#define CppCmd /lib/cpp
+#endif
+#define YaccCmd bison -y
+#define LexCmd flex -l
+#define HasFlex YES
+#define LexLib -lfl
+#define PreProcessCmd CcCmd -E
+#define PostIncDir DefaultGccIncludeDir
+#define LdCombineFlags -r
+#ifndef LdPostLib
+#define LdPostLib /* Never needed */
+#endif
+#define HasWChar32 YES
+#define StandardCppOptions -traditional
+#define StandardCppDefines StandardDefines
+
+#define HasVarRun YES
+#define VarDbDirectory $(VARDIR)/lib
+
+XCOMM i386Architecture
+#define OptimizedCDebugFlags DefaultGcc2i386Opt
+#define GNUMachineDefines -D__i386__
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#define HasPlugin YES
+#define VendorHasX11R6_3libXext YES
+
+#ifndef StandardDefines
+#define StandardDefines GNUMachineDefines GNUSourceDefines
+#endif
+
+#define DlLibrary -rdynamic -ldl
+
+#define ServerExtraSysLibs /**/
+
+#define ConnectionFlags -DUNIXCONN -DTCPCONN
+
+/* Some of these man page defaults are overriden in the above OS sections */
+#ifndef ManSuffix
+# define ManSuffix 1x
+#endif
+#ifndef ManDir
+# define ManDir $(MANSOURCEPATH)1
+#endif
+#ifndef LibManSuffix
+# define LibManSuffix 3x
+#endif
+#ifndef LibmanDir
+# define LibmanDir $(MANSOURCEPATH)3
+#endif
+#ifndef FileManSuffix
+# define FileManSuffix 5x
+#endif
+#ifndef FileManDir
+# define FileManDir $(MANSOURCEPATH)5
+#endif
+
+#ifndef StaticLibrary
+#define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic
+#endif
+
+#define HasGnuMake YES
+
+#define MakeNamedTargetSubdir(dir,flags,subname)\
+ $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname
+
+#define ArchitectureDefines -DGNU_ARCHITECTURE
+
+#define XserverNeedsSetUID YES
+
+#include <gnuLib.rules>
+
+XCOMM XXX Might need this if they are not careful with slashes.
+XCOMM #define DirFailPrefix -
+
+#include <xorg.cf>
+
diff --git a/nx-X11/config/cf/gnuLib.rules b/nx-X11/config/cf/gnuLib.rules
new file mode 100644
index 000000000..10045500e
--- /dev/null
+++ b/nx-X11/config/cf/gnuLib.rules
@@ -0,0 +1,176 @@
+/*
+ * GNU/Hurd shared library rules
+ *
+ * $XFree86: xc/config/cf/gnuLib.rules,v 1.9 2003/10/11 09:40:13 herrb Exp $
+ */
+
+/*
+ * GNU/Hurd shared library rules
+ * Cloned from Linux (ELF) shared library rules
+ *
+ */
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+#ifndef ForceNormalLib
+#define ForceNormalLib NO
+#endif
+
+XCOMM XXX To rpath or not to rpath...
+#ifndef UseRpath
+#define UseRpath NO
+#endif
+
+#ifndef SharedOldX
+#define SharedOldX NO
+#endif
+
+#undef SpecialMalloc
+#define SpecialMalloc NO
+
+#define BaseShLibReqs -lc
+
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <gnuLib.tmpl>
+#endif
+#ifndef RpathLoadFlags
+#if UseRpath
+#define RpathLoadFlags -Wl,-rpath=$(USRLIBDIRPATH)
+#else
+#define RpathLoadFlags /**/
+#endif
+#endif
+#ifndef LibraryRpathLoadFlags
+#define LibraryRpathLoadFlags RpathLoadFlags
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -shared LibraryRpathLoadFlags
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -fPIC
+#endif
+#ifndef PositionIndependentCplusplusFlags
+#define PositionIndependentCplusplusFlags -fPIC
+#endif
+#ifndef ExtraLoadFlags
+#ifdef UseInstalled
+XCOMM XXX Maybe superfluous.
+#define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link=$(USRLIBDIRPATH)
+#else
+#define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link=$(BUILDLIBDIR)
+#endif
+#endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ * NOTE: file must be executable, hence "INSTBINFLAGS"
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`;\
+ set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\
+ @if $(SOSYMLINK); then (set -x; \
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\
+ $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\
+ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\
+ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedDepLibraryTarget */
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ @@\
+ $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name
+
+#endif /* SharedDepModuleTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
diff --git a/nx-X11/config/cf/gnuLib.tmpl b/nx-X11/config/cf/gnuLib.tmpl
new file mode 100644
index 000000000..012277c1d
--- /dev/null
+++ b/nx-X11/config/cf/gnuLib.tmpl
@@ -0,0 +1,28 @@
+XCOMM
+XCOMM GNU Hurd shared library template
+XCOMM
+XCOMM $XFree86: xc/config/cf/gnuLib.tmpl,v 1.5 2003/05/29 21:56:57 herrb Exp $
+XCOMM
+
+#ifndef FixupLibReferences
+#define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef XawClientLibs
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+#define SharedX11Reqs
+#define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIB) $(XLIB)
+#define SharedXtstReqs $(LDPRELIB) $(XLIB)
+#define SharedSMReqs $(LDPRELIB) $(ICELIB)
diff --git a/nx-X11/config/cf/host.def b/nx-X11/config/cf/host.def
new file mode 100644
index 000000000..e9f53c2a9
--- /dev/null
+++ b/nx-X11/config/cf/host.def
@@ -0,0 +1,1020 @@
+XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
+/******************************************************************************/
+/*
+ * This file is to provide a quick method for most people to change the
+ * behaviour of their Xorg installation without having to fully
+ * understand the workings of site.def and all the various '.cf' files.
+ *
+ * In the vast majority of cases, it should not be necessary to use this
+ * file at all or change it in any way.
+ *
+ * This file is divided into two sections. The first contains settings
+ * that end-users might reasonably change. The second contains settings
+ * that developers might want to change.
+ *
+ * IMPORTANT NOTE: In all cases changing the defaults may cause problems
+ * and/or unexpected side-effects. If you don't understand what a setting
+ * does, then it's best to not change it. If you make changes and have
+ * problems, verify that those problems are also present when using an
+ * empty host.def file and unchanged version of this file before reporting
+ * them.
+ *
+ * A good way to use this file is to copy it to host.def, and make the
+ * changes there. That way, future patches to this file won't fail.
+ * The host.def file will never be patched.
+ *
+ * The distributed version of this file MUST contain no uncommented
+ * definitions. Default definitions belong in xorg.cf, or <vendor>.cf
+ * files.
+ */
+/******************************************************************************/
+
+/**************************************************************************/
+/* */
+/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
+/* */
+/* NX-X11, NX protocol compression and NX extensions to this software */
+/* are copyright of NoMachine. Redistribution and use of the present */
+/* software is allowed according to terms specified in the file LICENSE */
+/* which comes in the source distribution. */
+/* */
+/* Check http://www.nomachine.com/licensing.html for applicability. */
+/* */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
+/* */
+/* All rights reserved. */
+/* */
+/**************************************************************************/
+
+#if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture)
+
+#if defined(SunArchitecture)
+#define ProjectRoot /usr/openwin
+#endif
+
+/*
+ * Enable use the Cygwin IPC libraries to get MIT-SHM support.
+ */
+#if defined(cygwinArchitecture)
+#define UseCygIPC YES
+#endif
+
+/*
+ * If you have build-specific modifications in your host.def file, but
+ * want an empty host.def file installed when doing 'make install',
+ * uncomment the following
+ *
+#define InstallEmptyHostDef
+ */
+
+/*
+ * Which servers to build. There is only Xorg server.
+ * It can be disabled by the following.
+ *
+#define XorgServer NO
+ */
+#define XorgServer NO
+
+/*
+ * To disable building the Xnest server, uncomment this.
+ *
+#define XnestServer NO
+ */
+#define XnestServer NO
+
+/*
+ * To disable building Xvfb, uncomment this.
+ *
+#define XVirtualFramebufferServer NO
+ */
+#define XVirtualFramebufferServer NO
+
+/*
+ * To enable building Xdmx, uncomment this.
+ *
+#define XdmxServer YES
+ */
+#define XdmxServer NO
+
+/*
+ * To disable building Xprt, uncomment this.
+ *
+#define XprtServer NO
+ */
+#define XprtServer NO
+
+/*
+ * Xprint is needed by Xprt. You can disable it if
+ * you are not going to build Xprt.
+ *
+#define BuildXprint NO
+ */
+#define BuildXprint NO
+
+/*
+ * Building libraries with NX enhancements is disabled
+ * by default. You should enable this in your host.def.
+ *
+#define NXLibraries YES
+ */
+#define NXLibraries YES
+
+/*
+ * Building the NX agent nested server is disabled
+ * by default. Enable this in your host.def.
+ *
+#define NXAgentServer YES
+ */
+#define NXAgentServer YES
+
+/*
+ * Assume the new build tree.
+ *
+#define NXUpgradeAgentServer NO
+ */
+#define NXUpgradeAgentServer YES
+
+#ifdef NXAgentServer
+#define BuildRenderLibrary YES
+#define SharedLibFreetype2 YES
+#define NormalLibFreetype2 YES
+#define FontLibSharedFreeType NO
+#endif
+
+/*
+ * Define this symbol to build the NX enhanced MS Windows
+ * X server for Cygnus environment.
+ *
+#define NXWinServer YES
+ */
+#if defined(cygwinArchitecture)
+#define NXWinServer NO
+#define XWinServer NO
+#endif
+
+/*
+ * Set the default server (ie the one that gets the sym-link to "X")
+ *
+#define ServerToInstall Xorg
+ */
+
+/*
+ * Force build of X libraries if any nested server is to be built.
+ *
+#define BuildLibraries YES
+ *
+ * If you just want libraries for NXAgentServer, this should be
+ * enough (never tested, although).
+ *
+#define BuildLibrariesForXServers YES
+ */
+#if XnestServer || NXAgentServer
+#define BuildLibraries YES
+#endif
+
+#define BuildDamageLibrary YES
+
+#define BuildXfixesLibrary YES
+
+#define BuildCompositeLibrary YES
+
+#define BuildRandRLibrary YES
+
+#define BuildDocs NO
+
+#define BuildComposite YES
+
+/*
+ * If you only run the X server under xdm the X servers don't need to be
+ * installed SetUID, and you may comment out the lines below. If you run
+ * the servers by hand (with xinit or startx), then they do need to be
+ * installed SetUID on most platforms.
+ *
+ * Consult your system administrator before making the X server setuid.
+ *
+#define InstallXserverSetUID NO
+ */
+
+
+/*
+ * Server configuration parameters. The defaults are shown here:
+ */
+
+/*
+ * Which drivers to build. When building a static server, each of these
+ * will be included in it. When building the loadable server each of these
+ * modules will be built.
+ *
+#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
+ neomagic i740 tdfx savage \
+ cirrus vmware tseng trident chips apm \
+ GlideDriver fbdev i128 \
+ ati DevelDrivers ark cyrix \
+ siliconmotion \
+ vesa vga XF86OSCardDrivers XF86ExtraCardDrivers
+ */
+
+/*
+ * To add third party drivers to the standard driver list, set the
+ * following.
+ *
+#define XF86ExtraCardDrivers extradriver1 extradriver2 ...
+ */
+
+/*
+ * Select the XInput devices you want by uncommenting this.
+ *
+#define XInputDrivers mouse keyboard acecad calcomp citron \
+ digitaledge dmc dynapro elographics \
+ microtouch mutouch penmount spaceorb summa \
+ wacom void magictouch aiptek
+ */
+
+/* To enable building of development DRI drivers (insecure, or not
+ * useful on the chosen architecture, uncomment this define.
+#define BuildDevelDRIDrivers YES
+ */
+
+/*
+ * To use the deprecated, old keyboard driver, uncomment this. But
+ * even better, make the new keyboard driver (hw/xfree86/input/keyboard)
+ * work for your architechture. The old driver will be removed in the
+ * next release.
+ *
+#define UseDeprecatedKeyboardDriver YES
+ */
+
+/*
+ * There are three parameters that determine where and how the Matrox HAL
+ * library is used:
+ *
+ * HaveMatroxHal -- You have the HALlib.a binary library installed
+ * in xfree86/drivers/mga/HALlib, and you want it to
+ * be used.
+ * Default: NO
+ *
+ * BuildMatroxHal -- You have the source for the HALlib library (installed
+ * in xfree86/drivers/mga/hallib), and want to build and
+ * use it.
+ * Default: NO
+ *
+ * UseMatroxHal -- You want to build support for loading/using the HAL
+ * library into the mga driver. For module server builds
+ * you don't need to have the HALlib library to do this.
+ * but you want to build support for loading it and using
+ * it into the mga driver module.
+ * Default: YES for loadable server build
+ * (HaveMatroxHal || BuildMatroxHal) for static
+ */
+
+/*
+ * To disable use of the Matrox HAL library, uncomment this:
+ *
+#define UseMatroxHal NO
+ */
+
+/*
+ * If you have the HALlib.a binary installed in xfree86/drivers/mga/HALlib,
+ * uncomment this:
+ *
+#define HaveMatroxHal YES
+ */
+
+/*
+ * If you have the HALlib source code installed in xfree86/drivers/mga/hallib,
+ * uncomment this:
+#define BuildMatroxHal YES
+ */
+
+/*
+ * To disable building the font server, uncomment this.
+ *
+#define BuildFontServer NO
+ */
+#define BuildFontServer NO
+
+/*
+ * Speedo fonts have been disabled by default in this release.
+ * To re-enable support for Speedo fonts, uncomment this.
+ *
+#define BuildSpeedo YES
+ */
+
+/*
+ * To disable support for CID fonts, uncomment this.
+ *
+#define BuildCID NO
+ */
+
+/*
+ * To disable support for TrueType fonts, uncomment these.
+ *
+#define BuildFreeType NO
+ */
+
+/*
+ * To set non-default build options for the underlying FreeType libraries,
+ * add them here and uncomment.
+ *
+#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES
+ */
+
+/*
+ * To build the FreeType libraries with the TrueType byte code interpreter
+ * enabled, uncomment this. Note that there are patent issues related to the
+ * TrueType byte code interpreter, and we only recommend you enabling this
+ * if you are sure that there are no legal impediments to you doing so. See
+ * <http://www.freetype.org/patents.html> for further information.
+ *
+#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
+ */
+
+/*
+ * Do you want to Build Fonts (Usually you only want to build and install
+ * fonts once, if this is a first time install you will want to build the
+ * fonts)
+ *
+#define BuildFonts NO
+ */
+#define BuildFonts NO
+
+/*
+ * To not build/install the 75dpi fonts, uncomment the following
+ *
+#define Build75DpiFonts NO
+ */
+
+/*
+ * To not build/install the 100dpi fonts, uncomment the following
+ *
+#define Build100DpiFonts NO
+ */
+
+/*
+ * To build/install the Speedo fonts, uncomment the following
+ * (see setting above about Speedo support as well)
+ *
+#define BuildSpeedoFonts YES
+ */
+
+/*
+ * To not build/install the Type1 fonts, uncomment the following
+ *
+#define BuildType1Fonts NO
+ */
+
+/*
+ * To not build/install the CID fonts, uncomment the following
+ *
+#define BuildCIDFonts NO
+ */
+
+/*
+ * To not build/install the True Type fonts, uncomment the following
+ *
+#define BuildTrueTypeFonts NO
+ */
+
+/*
+ * To not build/install the Cyrillic fonts, uncomment the following
+ *
+#define BuildCyrillicFonts NO
+ */
+
+/*
+ * To not install the local font directory, uncomment the following
+ *
+#define MakeLocalFontDir NO
+ */
+
+/*
+ * Include True Type Fonts to default font path. It is safe to do
+ * this by default as NX intaller carries only misc and TTF in the
+ * basic set of fonts installed under Windows.
+ *
+#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/
+ */
+
+#if defined(LinuxArchitecture) || defined(SunArchitecture) || defined(FreeBSDArchitecture)
+#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/,$(FONTDIR)/TTF/
+#endif /* #if defined(LinuxArchitecture) || defined(SunArchitecture) */
+
+#if defined(cygwinArchitecture)
+#define DefaultFontPath /mnt/NX/fonts/base/,/mnt/NX/fonts/misc/,/mnt/NX/fonts/Speedo/,/mnt/NX/fonts/Type1/,/mnt/NX/fonts/75dpi/,/mnt/NX/fonts/100dpi/,/mnt/NX/fonts/TTF/
+#define DefaultRGBDatabase /mnt/NX/fonts/rgb
+#endif /* #if defined(cygwinArchitecture) */
+
+/*
+ * To build only the servers with a cut-down source tree, uncomment
+ * this.
+ *
+#define BuildServersOnly YES
+ */
+#define BuildServersOnly YES
+
+/*
+ * By default, the sample config files for xinit, xdm and xfs are installed
+ * only when there is no pre-existing version installed. Uncommenting the
+ * following lines will force the sample versions to be installed even if
+ * it means over-writing existing versions.
+ *
+#define InstallXinitConfig YES
+#define InstallXdmConfig YES
+#define InstallFSConfig YES
+ */
+
+/*
+ * By default the application defaults files are always installed.
+ * Uncommenting the the following will prevent exising application
+ * defaults files from being over-written.
+ *
+#define InstallAppDefFiles NO
+ */
+
+/*
+ * Undefine the following if you don't want to have config files and
+ * app-defaults installed in a separate directory (i.e. /etc/X11).
+ *
+#define UseSeparateConfDir NO
+ */
+
+/*
+ * To enable building the glide driver, you need to define
+ * HasGlide2 to YES and set the Glide2IncDir variable.
+ * HasGlide2 is per default NO.
+ *
+#define HasGlide2 YES
+ */
+
+/*
+ * Set the path to your Glide include files.
+ *
+#define Glide2IncDir /usr/include/glide
+ */
+
+/*
+ * Have glide 3?
+ *
+#define HasGlide3 YES
+ */
+
+/*
+ * Set the path to your Glide 3 include files.
+ *
+#define Glide3IncDir /usr/include/glide3
+ */
+
+
+
+/*
+ * Unless you're a developer you shouldn't need to change anything
+ * beyond this point.
+ */
+
+/*
+ * If you want to enable some developer settings, like more verbose
+ * compiler warnings, uncomment this.
+ *
+#define XFree86Devel YES
+*/
+
+/*
+ * If using GCC 2.x on a system where it isn't the default, uncomment
+ * the following
+ *
+ */
+#if defined(SunArchitecture)
+#define HasGcc2 YES
+#define HasGcc YES
+#endif
+
+/*
+ * The default optimisation flags for GCC 2.x. -fno-strength-reduce is
+ * here to work around a bug in -O2 for GCC 2.x on i386 platforms.
+ * If you are using a version that doesn't have this bug, you can
+ * uncomment the following line, and remove '-fno-strength-reduce'
+ * If you are building binaries for a 486, it may be beneficial to add
+ * -m486
+ *
+#define DefaultGcc2i386Opt -O2 -fno-strength-reduce
+ */
+
+#if defined (LinuxArchitecture)
+#define DefaultGcc2i386Opt -g -O3
+#endif
+
+/*
+ * Enable all the optimizations on AMD64.
+ */
+
+#define DefaultGcc2AMD64Opt -g -O3 GccAliasingArgs
+
+/*
+ * This allows the GCC warning flags to be set. The default is shown here.
+ *
+#define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wredundant-decls -Wnested-externs
+ */
+
+/*
+ * Sun Compiler stuff..
+ *
+#define HasSunC YES
+#define HasSunCplusplus YES
+#define CplusplusCompilerMajorVersion 5
+#define CplusplusCompilerMinorVersion 0
+#define CCompilerMajorVersion 5
+#define CCompilerMinorVersion 0
+ */
+
+/*
+ * Optimized Sun Compiler Build.
+ *
+#define DefaultCDebugFlags -xO4 -xtarget=pentium_pro
+#define OptimizedCDebugFlags -xO4 -xtarget=pentium_pro
+ */
+
+/*
+ * Debuggable Sun Compiler Build.
+ * Note: This builds _EVERYTHING_ as debuggable
+ *
+#define DefaultCDebugFlags -g -xs
+#define OptimizedCDebugFlags -g -xs
+ */
+
+/*
+ * For Linux, this should match the Binutils version you have. This example
+ * is for 2.6.0.7. See linux.cf for the default setting.
+ *
+ * This should automatically get set correctly by imake.
+ *
+#define LinuxBinUtilsMajorVersion 26
+ */
+
+/*
+ * For Linux, these should match the libc version you have. This example
+ * is for libc.5.4.x. See linux.cf for the default setting.
+ *
+ * This should automatically get set correctly by imake.
+ *
+#define LinuxCLibMajorVersion 5
+#define LinuxClibMinorVersion 4
+ */
+
+/*
+ * If you want to use the GNU malloc library, uncomment this
+ *
+#define UseGnuMalloc YES
+ */
+
+/*
+ * Set this to whatever is required to access the GNU malloc library.
+ * The default is '-lgmalloc' unless is specified in the OS's .cf file.
+ *
+#define GnuMallocLibrary -L/usr/local/lib -lgmalloc
+ */
+
+/*
+ * To enable the internal Xserver malloc, uncomment this
+ *
+#define UseInternalMalloc YES
+ */
+
+/*
+ * Some Linux releases don't have a libtermcap. In this case you may need
+ * to uncomment the following
+ *
+#define TermcapLibrary -lncurses
+ */
+
+/*
+ * Build a server that dynamically loads the modules by setting
+ * this to YES. This defaults to YES on most platforms. A static server
+ * can be built by setting this to NO.
+ *
+#define DoLoadableServer NO
+ */
+
+/*
+ * This release defaults to building dlopen() style modules instead of the
+ * previously standard loader modules.
+ *
+ * Uncomment the following to return to the XFree86 custom loader modules.
+ *
+#define MakeDllModules NO
+ */
+
+/*
+ * Build XAA. This can be disabled with:
+ *
+#define XF86XAA NO
+ */
+
+/*
+ * Build vgahw. This can be disabled with:
+ *
+#define XF86VgaHw NO
+ */
+
+/*
+ * Build xf1bpp. This can be disabled with:
+ *
+#define XF1Bpp NO
+ */
+
+/*
+ * Build xf4bpp. This can be disabled with:
+ *
+#define XF4Bpp NO
+ */
+
+
+/*
+ * BSD Console driver support (for FreeBSD and NetBSD).
+ *
+ * By default, support is included for pccons and pcvt for NetBSD, and
+ * pccons, syscons and pcvt for FreeBSD.
+ *
+ * To change the list of supported drivers, set the following parameter.
+ * Possible values are -DPCCONS_SUPPORT, -DSYSCONS_SUPPORT, -DPCVT_SUPPORT.
+ * The following example includes support for syscons and pcvt only.
+ *
+#define XFree86ConsoleDefines -DSYSCONS_SUPPORT -DPCVT_SUPPORT
+ */
+
+/*
+ * To link the X server with a dynamic version of the Xfont library,
+ * uncomment this.
+ *
+#define XserverStaticFontLib NO
+ */
+
+/*
+ * To enable binary compatibility with previous versions of the font
+ * encoding support, uncomment this.
+ *
+#define FontencCompatibility YES
+ */
+
+/*
+ * To disable building XInput support, uncomment this
+ *
+#define BuildXInputExt NO
+ */
+#if defined(SunArchitecture)
+#define BuildXInputExt YES
+#endif
+
+/*
+ * Uncomment this for joystick support.
+ *
+ * Note: Joystick support is broken, so don't enable this.
+ *
+#define JoystickSupport YES
+ */
+
+/*
+ * To disable the ScreenSaver Extension, uncomment this line.
+ *
+#define BuildScreenSaverExt NO
+ */
+#define BuildScreenSaverExt NO
+
+/*
+ * If you don't want to build Xinerama support, uncomment this.
+ *
+#define BuildXinerama NO
+ */
+#define BuildXinerama NO
+
+/*
+ * If you don't want to build support for the GLX extension, uncomment this.
+ *
+#define BuildGlxExt NO
+ */
+#define BuildGlxExt YES
+
+/*
+ * Taken from xorg.cf.
+ */
+
+#if defined(SparcArchitecture) \
+ || defined (Sparc64Architecture) \
+ || defined(ia64Architecture) \
+ || defined(s390xArchitecture) \
+ || defined(AMD64Architecture)
+#define GlxExtraDefines -D__GLX_ALIGN64
+#endif
+
+/*
+ * If you want to build the xf86rush extension, uncomment this line.
+ * This isn't recommended.
+ *
+#define BuildXF86RushExt YES
+ */
+#define BuildXF86RushExt NO
+
+/*
+ * If you want to build the client library for the xf86rush extension,
+ * uncomment this line. This isn't recommended.
+ *
+#define BuildXF86RushLibrary NO
+ */
+#define BuildXF86RushLibrary NO
+
+/*
+ * We should never need LBX in a NX enabled environment...
+ *
+#define BuildLBX NO
+ */
+#define BuildLBX NO
+
+#define BuildXKB YES
+#define BuildXKBlib YES
+
+#define SharedLibXau NO
+
+/*
+ * If you are running NetBSD 0.9C or later, and have the aperture driver
+ * installed, uncomment this.
+ *
+#define HasNetBSDApertureDriver YES
+ */
+
+/*
+ * If you are running SVR3 and have the mmap driver installed (for linear
+ * framebuffer access) uncomment this.
+ *
+#define HasSVR3mmapDrv YES
+ */
+
+/*
+ * If you are using an SVR3 (like ISC 4.x) which supports long file names,
+ * you can uncomment this to have manual pages installed under their
+ * full names
+ *
+#define ExpandManNames YES
+ */
+
+/*
+ * For a POSIXized build on Interactive uncomment this
+ * Could be used with gcc 'till Version 2.6.3
+ * Should be used with gcc 2.7.2.
+ *
+#define UsePosix YES
+ */
+
+/*
+ * If you don't want XDMAUTH support (if you don't have Wraphelp.c),
+ * comment this out.
+ *
+ */
+#if defined(LinuxArchitecture)
+#define HasXdmAuth YES
+#endif /* #if defined(LinuxArchitecture) */
+
+/*
+ * If you have Linux DECnet support, and want to build XFree86 with support
+ * for connections over DECnet, uncomment this.
+ *
+#define HasDECnet YES
+ */
+
+/*
+ * To build static and shared libraries with debugging information, uncomment
+ * this. Assumes you have Gcc2.
+ * (If you don't have Gcc2, you can use the DebugLib{X11,Xt,Xaw,...} variables
+ * to build debugging versions of the libraries separately.)
+ *
+#define DebuggableLibraries YES
+*/
+#if defined(LinuxArchitecture)
+#define DebuggableLibraries YES
+#endif /* #if defined(LinuxArchitecture) */
+/*
+ * To forceably build static libraries in addition to shared libraries,
+ * uncomment this.
+ *
+#define ForceNormalLib YES
+ */
+
+/*
+ * Uncomment this if your default tools (eg, gcc, ld, as, etc) are
+ * not the Linux ELF versions.
+ *
+#define LinuxElfDefault NO
+ */
+
+/*
+ * To use ELF format shared libraries for supported OSs, uncomment this.
+ *
+ * For Linux the default setting of this is the same as the setting of
+ * LinuxElfDefault.
+ *
+ * For FreeBSD this should automatically be set correctly by imake. Only
+ * change it here if you need to override the automatic setting.
+ *
+#define UseElfFormat YES
+ */
+
+/*
+ * For FreeBSD/ELF (FreeBSD 3.0) it is possible to also build and install
+ * a.out compatibility libraries. To enable that, uncomment this.
+ *
+#define BuildAoutLibraries YES
+ */
+
+/*
+ * If you have trouble with make bombing out in Xlib, try uncommenting this.
+ * You will not get dependencies as a result, but better than nothing.
+ *
+#define MakeHashTableBug YES
+ */
+
+/*
+ * If you do not want your man pages compress under SVR3 systems that
+ * support it, uncomment this.
+ *
+#define CompressManPages NO
+ */
+
+/*
+ * If you have sgmlfmt (the XFree86 doctools package) and want to build
+ * formatted docs from the SGML source, uncomment this.
+ *
+#define HasSgmlFmt YES
+ */
+
+/*
+ * To disable building some document formats, uncomment some of these.
+ *
+#define BuildLinuxDocText NO
+#define BuildLinuxDocHtml NO
+#define BuildLinuxDocPS NO
+ */
+
+/*
+ * To install Japanese versions of the documentation uncomment this.
+ * Note: The Japanese documentation consists of a subset of the
+ * XFree86 3.1 docs.
+ *
+#define InstallJapaneseDocs YES
+ */
+
+/*
+ * To build/install X specs docs, uncomment the following.
+ * The SpecsDocDirs setting here is recommended because it covers
+ * the docs that XFree86 has changed or added.
+ *
+#define BuildSpecsDocs YES
+#define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xmu Xv XvMC i18n
+ */
+
+/*
+ * To build all specs docs, not just those listed in SpecsDocDirs, uncomment
+ * the following.
+ *
+#define BuildAllSpecsDocs YES
+ */
+
+/*
+ * If your system doesn't support vm86() mode and you have
+ * libx86emu set library path here
+ *
+#define X86EMU_LIBPATH /usr/local/lib
+ */
+
+/*
+ * Most platforms default to using an already installed FreeType 2 library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasFreetype2 NO
+ */
+#define HasFreetype2 NO
+
+/*
+ * To use a FreeType library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+ *
+#define HasFreetype2 YES
+#define Freetype2Dir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed Fontconfig library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasFontconfig NO
+ */
+#define HasFontconfig NO
+
+/*
+ * To use a Fontconfig library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+#define HasFontconfig YES
+#define FontconfigDir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed Expat library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasExpat NO
+ */
+#define HasExpat NO
+
+/*
+ * To use a Expat library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+#define HasExpat YES
+#define ExpatDir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed PNG library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasLibpng NO
+ */
+
+/*
+ * To use a PNG library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+#define HasLibpng YES
+#define LibpngDir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed xterm program.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define BuildXterm YES
+ */
+
+#define SharedLibXau NO
+
+#define SharedLibXdmcp NO
+
+#define BuildXaw7 YES
+
+#else /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */
+
+#if defined(DarwinArchitecture) && !defined(NXZaurusXServer) && !defined(NXiPAQXServer)
+#define NXDarwinServer NO
+#define BuildServersOnly YES
+#define DefaultFontPath /usr/NX/share/fonts/misc/,/usr/NX/share/fonts/TTF/
+#define DefaultRGBDatabase /usr/NX/share/rgb
+#define XprtServer NO
+#define BuildXprint NO
+#define XnestServer NO
+#define XVirtualFramebufferServer NO
+#define BuildFontServer NO
+#define BuildFreeType NO
+#define BuildXTrueType NO
+#define FontLibSharedFreeType NO
+#endif
+
+#if !defined(NXZaurusXServer) && defined(NXiPAQXServer)
+#define KDriveXServer YES
+#define XiPAQH3500Server YES
+#define BuildServersOnly YES
+#define NXEmbeddedXServer YES
+#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1
+#define TinyXServer YES
+#define CrossCompiling YES
+#define TouchScreen YES
+#define ItsyCompilerBug YES
+#undef BuildRandR
+#define BuildRandR YES
+#define BuildXInputLib YES
+#define BuildXTrueType YES
+#define ServerXdmcpDefines
+#define XipaqServer YES
+#endif
+
+#if !defined(NXiPAQXServer) && defined(NXZaurusXServer)
+#define KDriveXServer YES
+#define XiPAQH3500Server YES
+#define BuildServersOnly YES
+#define ZaurusXServer YES
+#define NXEmbeddedXServer YES
+#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1
+#define TinyXServer YES
+#define CrossCompiling YES
+#define TouchScreen YES
+#define ItsyCompilerBug YES
+#undef BuildRandR
+#define BuildRandR YES
+#define BuildXInputLib YES
+#define BuildXTrueType YES
+#define ServerXdmcpDefines
+#define XipaqServer YES
+#define XfbdevServer YES
+#endif
+
+#endif /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */
diff --git a/nx-X11/config/cf/host.def.NX.original b/nx-X11/config/cf/host.def.NX.original
new file mode 100644
index 000000000..e9f53c2a9
--- /dev/null
+++ b/nx-X11/config/cf/host.def.NX.original
@@ -0,0 +1,1020 @@
+XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
+/******************************************************************************/
+/*
+ * This file is to provide a quick method for most people to change the
+ * behaviour of their Xorg installation without having to fully
+ * understand the workings of site.def and all the various '.cf' files.
+ *
+ * In the vast majority of cases, it should not be necessary to use this
+ * file at all or change it in any way.
+ *
+ * This file is divided into two sections. The first contains settings
+ * that end-users might reasonably change. The second contains settings
+ * that developers might want to change.
+ *
+ * IMPORTANT NOTE: In all cases changing the defaults may cause problems
+ * and/or unexpected side-effects. If you don't understand what a setting
+ * does, then it's best to not change it. If you make changes and have
+ * problems, verify that those problems are also present when using an
+ * empty host.def file and unchanged version of this file before reporting
+ * them.
+ *
+ * A good way to use this file is to copy it to host.def, and make the
+ * changes there. That way, future patches to this file won't fail.
+ * The host.def file will never be patched.
+ *
+ * The distributed version of this file MUST contain no uncommented
+ * definitions. Default definitions belong in xorg.cf, or <vendor>.cf
+ * files.
+ */
+/******************************************************************************/
+
+/**************************************************************************/
+/* */
+/* Copyright (c) 2001, 2011 NoMachine, http://www.nomachine.com/. */
+/* */
+/* NX-X11, NX protocol compression and NX extensions to this software */
+/* are copyright of NoMachine. Redistribution and use of the present */
+/* software is allowed according to terms specified in the file LICENSE */
+/* which comes in the source distribution. */
+/* */
+/* Check http://www.nomachine.com/licensing.html for applicability. */
+/* */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
+/* */
+/* All rights reserved. */
+/* */
+/**************************************************************************/
+
+#if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture)
+
+#if defined(SunArchitecture)
+#define ProjectRoot /usr/openwin
+#endif
+
+/*
+ * Enable use the Cygwin IPC libraries to get MIT-SHM support.
+ */
+#if defined(cygwinArchitecture)
+#define UseCygIPC YES
+#endif
+
+/*
+ * If you have build-specific modifications in your host.def file, but
+ * want an empty host.def file installed when doing 'make install',
+ * uncomment the following
+ *
+#define InstallEmptyHostDef
+ */
+
+/*
+ * Which servers to build. There is only Xorg server.
+ * It can be disabled by the following.
+ *
+#define XorgServer NO
+ */
+#define XorgServer NO
+
+/*
+ * To disable building the Xnest server, uncomment this.
+ *
+#define XnestServer NO
+ */
+#define XnestServer NO
+
+/*
+ * To disable building Xvfb, uncomment this.
+ *
+#define XVirtualFramebufferServer NO
+ */
+#define XVirtualFramebufferServer NO
+
+/*
+ * To enable building Xdmx, uncomment this.
+ *
+#define XdmxServer YES
+ */
+#define XdmxServer NO
+
+/*
+ * To disable building Xprt, uncomment this.
+ *
+#define XprtServer NO
+ */
+#define XprtServer NO
+
+/*
+ * Xprint is needed by Xprt. You can disable it if
+ * you are not going to build Xprt.
+ *
+#define BuildXprint NO
+ */
+#define BuildXprint NO
+
+/*
+ * Building libraries with NX enhancements is disabled
+ * by default. You should enable this in your host.def.
+ *
+#define NXLibraries YES
+ */
+#define NXLibraries YES
+
+/*
+ * Building the NX agent nested server is disabled
+ * by default. Enable this in your host.def.
+ *
+#define NXAgentServer YES
+ */
+#define NXAgentServer YES
+
+/*
+ * Assume the new build tree.
+ *
+#define NXUpgradeAgentServer NO
+ */
+#define NXUpgradeAgentServer YES
+
+#ifdef NXAgentServer
+#define BuildRenderLibrary YES
+#define SharedLibFreetype2 YES
+#define NormalLibFreetype2 YES
+#define FontLibSharedFreeType NO
+#endif
+
+/*
+ * Define this symbol to build the NX enhanced MS Windows
+ * X server for Cygnus environment.
+ *
+#define NXWinServer YES
+ */
+#if defined(cygwinArchitecture)
+#define NXWinServer NO
+#define XWinServer NO
+#endif
+
+/*
+ * Set the default server (ie the one that gets the sym-link to "X")
+ *
+#define ServerToInstall Xorg
+ */
+
+/*
+ * Force build of X libraries if any nested server is to be built.
+ *
+#define BuildLibraries YES
+ *
+ * If you just want libraries for NXAgentServer, this should be
+ * enough (never tested, although).
+ *
+#define BuildLibrariesForXServers YES
+ */
+#if XnestServer || NXAgentServer
+#define BuildLibraries YES
+#endif
+
+#define BuildDamageLibrary YES
+
+#define BuildXfixesLibrary YES
+
+#define BuildCompositeLibrary YES
+
+#define BuildRandRLibrary YES
+
+#define BuildDocs NO
+
+#define BuildComposite YES
+
+/*
+ * If you only run the X server under xdm the X servers don't need to be
+ * installed SetUID, and you may comment out the lines below. If you run
+ * the servers by hand (with xinit or startx), then they do need to be
+ * installed SetUID on most platforms.
+ *
+ * Consult your system administrator before making the X server setuid.
+ *
+#define InstallXserverSetUID NO
+ */
+
+
+/*
+ * Server configuration parameters. The defaults are shown here:
+ */
+
+/*
+ * Which drivers to build. When building a static server, each of these
+ * will be included in it. When building the loadable server each of these
+ * modules will be built.
+ *
+#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
+ neomagic i740 tdfx savage \
+ cirrus vmware tseng trident chips apm \
+ GlideDriver fbdev i128 \
+ ati DevelDrivers ark cyrix \
+ siliconmotion \
+ vesa vga XF86OSCardDrivers XF86ExtraCardDrivers
+ */
+
+/*
+ * To add third party drivers to the standard driver list, set the
+ * following.
+ *
+#define XF86ExtraCardDrivers extradriver1 extradriver2 ...
+ */
+
+/*
+ * Select the XInput devices you want by uncommenting this.
+ *
+#define XInputDrivers mouse keyboard acecad calcomp citron \
+ digitaledge dmc dynapro elographics \
+ microtouch mutouch penmount spaceorb summa \
+ wacom void magictouch aiptek
+ */
+
+/* To enable building of development DRI drivers (insecure, or not
+ * useful on the chosen architecture, uncomment this define.
+#define BuildDevelDRIDrivers YES
+ */
+
+/*
+ * To use the deprecated, old keyboard driver, uncomment this. But
+ * even better, make the new keyboard driver (hw/xfree86/input/keyboard)
+ * work for your architechture. The old driver will be removed in the
+ * next release.
+ *
+#define UseDeprecatedKeyboardDriver YES
+ */
+
+/*
+ * There are three parameters that determine where and how the Matrox HAL
+ * library is used:
+ *
+ * HaveMatroxHal -- You have the HALlib.a binary library installed
+ * in xfree86/drivers/mga/HALlib, and you want it to
+ * be used.
+ * Default: NO
+ *
+ * BuildMatroxHal -- You have the source for the HALlib library (installed
+ * in xfree86/drivers/mga/hallib), and want to build and
+ * use it.
+ * Default: NO
+ *
+ * UseMatroxHal -- You want to build support for loading/using the HAL
+ * library into the mga driver. For module server builds
+ * you don't need to have the HALlib library to do this.
+ * but you want to build support for loading it and using
+ * it into the mga driver module.
+ * Default: YES for loadable server build
+ * (HaveMatroxHal || BuildMatroxHal) for static
+ */
+
+/*
+ * To disable use of the Matrox HAL library, uncomment this:
+ *
+#define UseMatroxHal NO
+ */
+
+/*
+ * If you have the HALlib.a binary installed in xfree86/drivers/mga/HALlib,
+ * uncomment this:
+ *
+#define HaveMatroxHal YES
+ */
+
+/*
+ * If you have the HALlib source code installed in xfree86/drivers/mga/hallib,
+ * uncomment this:
+#define BuildMatroxHal YES
+ */
+
+/*
+ * To disable building the font server, uncomment this.
+ *
+#define BuildFontServer NO
+ */
+#define BuildFontServer NO
+
+/*
+ * Speedo fonts have been disabled by default in this release.
+ * To re-enable support for Speedo fonts, uncomment this.
+ *
+#define BuildSpeedo YES
+ */
+
+/*
+ * To disable support for CID fonts, uncomment this.
+ *
+#define BuildCID NO
+ */
+
+/*
+ * To disable support for TrueType fonts, uncomment these.
+ *
+#define BuildFreeType NO
+ */
+
+/*
+ * To set non-default build options for the underlying FreeType libraries,
+ * add them here and uncomment.
+ *
+#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES
+ */
+
+/*
+ * To build the FreeType libraries with the TrueType byte code interpreter
+ * enabled, uncomment this. Note that there are patent issues related to the
+ * TrueType byte code interpreter, and we only recommend you enabling this
+ * if you are sure that there are no legal impediments to you doing so. See
+ * <http://www.freetype.org/patents.html> for further information.
+ *
+#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
+ */
+
+/*
+ * Do you want to Build Fonts (Usually you only want to build and install
+ * fonts once, if this is a first time install you will want to build the
+ * fonts)
+ *
+#define BuildFonts NO
+ */
+#define BuildFonts NO
+
+/*
+ * To not build/install the 75dpi fonts, uncomment the following
+ *
+#define Build75DpiFonts NO
+ */
+
+/*
+ * To not build/install the 100dpi fonts, uncomment the following
+ *
+#define Build100DpiFonts NO
+ */
+
+/*
+ * To build/install the Speedo fonts, uncomment the following
+ * (see setting above about Speedo support as well)
+ *
+#define BuildSpeedoFonts YES
+ */
+
+/*
+ * To not build/install the Type1 fonts, uncomment the following
+ *
+#define BuildType1Fonts NO
+ */
+
+/*
+ * To not build/install the CID fonts, uncomment the following
+ *
+#define BuildCIDFonts NO
+ */
+
+/*
+ * To not build/install the True Type fonts, uncomment the following
+ *
+#define BuildTrueTypeFonts NO
+ */
+
+/*
+ * To not build/install the Cyrillic fonts, uncomment the following
+ *
+#define BuildCyrillicFonts NO
+ */
+
+/*
+ * To not install the local font directory, uncomment the following
+ *
+#define MakeLocalFontDir NO
+ */
+
+/*
+ * Include True Type Fonts to default font path. It is safe to do
+ * this by default as NX intaller carries only misc and TTF in the
+ * basic set of fonts installed under Windows.
+ *
+#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/
+ */
+
+#if defined(LinuxArchitecture) || defined(SunArchitecture) || defined(FreeBSDArchitecture)
+#define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/,$(FONTDIR)/TTF/
+#endif /* #if defined(LinuxArchitecture) || defined(SunArchitecture) */
+
+#if defined(cygwinArchitecture)
+#define DefaultFontPath /mnt/NX/fonts/base/,/mnt/NX/fonts/misc/,/mnt/NX/fonts/Speedo/,/mnt/NX/fonts/Type1/,/mnt/NX/fonts/75dpi/,/mnt/NX/fonts/100dpi/,/mnt/NX/fonts/TTF/
+#define DefaultRGBDatabase /mnt/NX/fonts/rgb
+#endif /* #if defined(cygwinArchitecture) */
+
+/*
+ * To build only the servers with a cut-down source tree, uncomment
+ * this.
+ *
+#define BuildServersOnly YES
+ */
+#define BuildServersOnly YES
+
+/*
+ * By default, the sample config files for xinit, xdm and xfs are installed
+ * only when there is no pre-existing version installed. Uncommenting the
+ * following lines will force the sample versions to be installed even if
+ * it means over-writing existing versions.
+ *
+#define InstallXinitConfig YES
+#define InstallXdmConfig YES
+#define InstallFSConfig YES
+ */
+
+/*
+ * By default the application defaults files are always installed.
+ * Uncommenting the the following will prevent exising application
+ * defaults files from being over-written.
+ *
+#define InstallAppDefFiles NO
+ */
+
+/*
+ * Undefine the following if you don't want to have config files and
+ * app-defaults installed in a separate directory (i.e. /etc/X11).
+ *
+#define UseSeparateConfDir NO
+ */
+
+/*
+ * To enable building the glide driver, you need to define
+ * HasGlide2 to YES and set the Glide2IncDir variable.
+ * HasGlide2 is per default NO.
+ *
+#define HasGlide2 YES
+ */
+
+/*
+ * Set the path to your Glide include files.
+ *
+#define Glide2IncDir /usr/include/glide
+ */
+
+/*
+ * Have glide 3?
+ *
+#define HasGlide3 YES
+ */
+
+/*
+ * Set the path to your Glide 3 include files.
+ *
+#define Glide3IncDir /usr/include/glide3
+ */
+
+
+
+/*
+ * Unless you're a developer you shouldn't need to change anything
+ * beyond this point.
+ */
+
+/*
+ * If you want to enable some developer settings, like more verbose
+ * compiler warnings, uncomment this.
+ *
+#define XFree86Devel YES
+*/
+
+/*
+ * If using GCC 2.x on a system where it isn't the default, uncomment
+ * the following
+ *
+ */
+#if defined(SunArchitecture)
+#define HasGcc2 YES
+#define HasGcc YES
+#endif
+
+/*
+ * The default optimisation flags for GCC 2.x. -fno-strength-reduce is
+ * here to work around a bug in -O2 for GCC 2.x on i386 platforms.
+ * If you are using a version that doesn't have this bug, you can
+ * uncomment the following line, and remove '-fno-strength-reduce'
+ * If you are building binaries for a 486, it may be beneficial to add
+ * -m486
+ *
+#define DefaultGcc2i386Opt -O2 -fno-strength-reduce
+ */
+
+#if defined (LinuxArchitecture)
+#define DefaultGcc2i386Opt -g -O3
+#endif
+
+/*
+ * Enable all the optimizations on AMD64.
+ */
+
+#define DefaultGcc2AMD64Opt -g -O3 GccAliasingArgs
+
+/*
+ * This allows the GCC warning flags to be set. The default is shown here.
+ *
+#define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wredundant-decls -Wnested-externs
+ */
+
+/*
+ * Sun Compiler stuff..
+ *
+#define HasSunC YES
+#define HasSunCplusplus YES
+#define CplusplusCompilerMajorVersion 5
+#define CplusplusCompilerMinorVersion 0
+#define CCompilerMajorVersion 5
+#define CCompilerMinorVersion 0
+ */
+
+/*
+ * Optimized Sun Compiler Build.
+ *
+#define DefaultCDebugFlags -xO4 -xtarget=pentium_pro
+#define OptimizedCDebugFlags -xO4 -xtarget=pentium_pro
+ */
+
+/*
+ * Debuggable Sun Compiler Build.
+ * Note: This builds _EVERYTHING_ as debuggable
+ *
+#define DefaultCDebugFlags -g -xs
+#define OptimizedCDebugFlags -g -xs
+ */
+
+/*
+ * For Linux, this should match the Binutils version you have. This example
+ * is for 2.6.0.7. See linux.cf for the default setting.
+ *
+ * This should automatically get set correctly by imake.
+ *
+#define LinuxBinUtilsMajorVersion 26
+ */
+
+/*
+ * For Linux, these should match the libc version you have. This example
+ * is for libc.5.4.x. See linux.cf for the default setting.
+ *
+ * This should automatically get set correctly by imake.
+ *
+#define LinuxCLibMajorVersion 5
+#define LinuxClibMinorVersion 4
+ */
+
+/*
+ * If you want to use the GNU malloc library, uncomment this
+ *
+#define UseGnuMalloc YES
+ */
+
+/*
+ * Set this to whatever is required to access the GNU malloc library.
+ * The default is '-lgmalloc' unless is specified in the OS's .cf file.
+ *
+#define GnuMallocLibrary -L/usr/local/lib -lgmalloc
+ */
+
+/*
+ * To enable the internal Xserver malloc, uncomment this
+ *
+#define UseInternalMalloc YES
+ */
+
+/*
+ * Some Linux releases don't have a libtermcap. In this case you may need
+ * to uncomment the following
+ *
+#define TermcapLibrary -lncurses
+ */
+
+/*
+ * Build a server that dynamically loads the modules by setting
+ * this to YES. This defaults to YES on most platforms. A static server
+ * can be built by setting this to NO.
+ *
+#define DoLoadableServer NO
+ */
+
+/*
+ * This release defaults to building dlopen() style modules instead of the
+ * previously standard loader modules.
+ *
+ * Uncomment the following to return to the XFree86 custom loader modules.
+ *
+#define MakeDllModules NO
+ */
+
+/*
+ * Build XAA. This can be disabled with:
+ *
+#define XF86XAA NO
+ */
+
+/*
+ * Build vgahw. This can be disabled with:
+ *
+#define XF86VgaHw NO
+ */
+
+/*
+ * Build xf1bpp. This can be disabled with:
+ *
+#define XF1Bpp NO
+ */
+
+/*
+ * Build xf4bpp. This can be disabled with:
+ *
+#define XF4Bpp NO
+ */
+
+
+/*
+ * BSD Console driver support (for FreeBSD and NetBSD).
+ *
+ * By default, support is included for pccons and pcvt for NetBSD, and
+ * pccons, syscons and pcvt for FreeBSD.
+ *
+ * To change the list of supported drivers, set the following parameter.
+ * Possible values are -DPCCONS_SUPPORT, -DSYSCONS_SUPPORT, -DPCVT_SUPPORT.
+ * The following example includes support for syscons and pcvt only.
+ *
+#define XFree86ConsoleDefines -DSYSCONS_SUPPORT -DPCVT_SUPPORT
+ */
+
+/*
+ * To link the X server with a dynamic version of the Xfont library,
+ * uncomment this.
+ *
+#define XserverStaticFontLib NO
+ */
+
+/*
+ * To enable binary compatibility with previous versions of the font
+ * encoding support, uncomment this.
+ *
+#define FontencCompatibility YES
+ */
+
+/*
+ * To disable building XInput support, uncomment this
+ *
+#define BuildXInputExt NO
+ */
+#if defined(SunArchitecture)
+#define BuildXInputExt YES
+#endif
+
+/*
+ * Uncomment this for joystick support.
+ *
+ * Note: Joystick support is broken, so don't enable this.
+ *
+#define JoystickSupport YES
+ */
+
+/*
+ * To disable the ScreenSaver Extension, uncomment this line.
+ *
+#define BuildScreenSaverExt NO
+ */
+#define BuildScreenSaverExt NO
+
+/*
+ * If you don't want to build Xinerama support, uncomment this.
+ *
+#define BuildXinerama NO
+ */
+#define BuildXinerama NO
+
+/*
+ * If you don't want to build support for the GLX extension, uncomment this.
+ *
+#define BuildGlxExt NO
+ */
+#define BuildGlxExt YES
+
+/*
+ * Taken from xorg.cf.
+ */
+
+#if defined(SparcArchitecture) \
+ || defined (Sparc64Architecture) \
+ || defined(ia64Architecture) \
+ || defined(s390xArchitecture) \
+ || defined(AMD64Architecture)
+#define GlxExtraDefines -D__GLX_ALIGN64
+#endif
+
+/*
+ * If you want to build the xf86rush extension, uncomment this line.
+ * This isn't recommended.
+ *
+#define BuildXF86RushExt YES
+ */
+#define BuildXF86RushExt NO
+
+/*
+ * If you want to build the client library for the xf86rush extension,
+ * uncomment this line. This isn't recommended.
+ *
+#define BuildXF86RushLibrary NO
+ */
+#define BuildXF86RushLibrary NO
+
+/*
+ * We should never need LBX in a NX enabled environment...
+ *
+#define BuildLBX NO
+ */
+#define BuildLBX NO
+
+#define BuildXKB YES
+#define BuildXKBlib YES
+
+#define SharedLibXau NO
+
+/*
+ * If you are running NetBSD 0.9C or later, and have the aperture driver
+ * installed, uncomment this.
+ *
+#define HasNetBSDApertureDriver YES
+ */
+
+/*
+ * If you are running SVR3 and have the mmap driver installed (for linear
+ * framebuffer access) uncomment this.
+ *
+#define HasSVR3mmapDrv YES
+ */
+
+/*
+ * If you are using an SVR3 (like ISC 4.x) which supports long file names,
+ * you can uncomment this to have manual pages installed under their
+ * full names
+ *
+#define ExpandManNames YES
+ */
+
+/*
+ * For a POSIXized build on Interactive uncomment this
+ * Could be used with gcc 'till Version 2.6.3
+ * Should be used with gcc 2.7.2.
+ *
+#define UsePosix YES
+ */
+
+/*
+ * If you don't want XDMAUTH support (if you don't have Wraphelp.c),
+ * comment this out.
+ *
+ */
+#if defined(LinuxArchitecture)
+#define HasXdmAuth YES
+#endif /* #if defined(LinuxArchitecture) */
+
+/*
+ * If you have Linux DECnet support, and want to build XFree86 with support
+ * for connections over DECnet, uncomment this.
+ *
+#define HasDECnet YES
+ */
+
+/*
+ * To build static and shared libraries with debugging information, uncomment
+ * this. Assumes you have Gcc2.
+ * (If you don't have Gcc2, you can use the DebugLib{X11,Xt,Xaw,...} variables
+ * to build debugging versions of the libraries separately.)
+ *
+#define DebuggableLibraries YES
+*/
+#if defined(LinuxArchitecture)
+#define DebuggableLibraries YES
+#endif /* #if defined(LinuxArchitecture) */
+/*
+ * To forceably build static libraries in addition to shared libraries,
+ * uncomment this.
+ *
+#define ForceNormalLib YES
+ */
+
+/*
+ * Uncomment this if your default tools (eg, gcc, ld, as, etc) are
+ * not the Linux ELF versions.
+ *
+#define LinuxElfDefault NO
+ */
+
+/*
+ * To use ELF format shared libraries for supported OSs, uncomment this.
+ *
+ * For Linux the default setting of this is the same as the setting of
+ * LinuxElfDefault.
+ *
+ * For FreeBSD this should automatically be set correctly by imake. Only
+ * change it here if you need to override the automatic setting.
+ *
+#define UseElfFormat YES
+ */
+
+/*
+ * For FreeBSD/ELF (FreeBSD 3.0) it is possible to also build and install
+ * a.out compatibility libraries. To enable that, uncomment this.
+ *
+#define BuildAoutLibraries YES
+ */
+
+/*
+ * If you have trouble with make bombing out in Xlib, try uncommenting this.
+ * You will not get dependencies as a result, but better than nothing.
+ *
+#define MakeHashTableBug YES
+ */
+
+/*
+ * If you do not want your man pages compress under SVR3 systems that
+ * support it, uncomment this.
+ *
+#define CompressManPages NO
+ */
+
+/*
+ * If you have sgmlfmt (the XFree86 doctools package) and want to build
+ * formatted docs from the SGML source, uncomment this.
+ *
+#define HasSgmlFmt YES
+ */
+
+/*
+ * To disable building some document formats, uncomment some of these.
+ *
+#define BuildLinuxDocText NO
+#define BuildLinuxDocHtml NO
+#define BuildLinuxDocPS NO
+ */
+
+/*
+ * To install Japanese versions of the documentation uncomment this.
+ * Note: The Japanese documentation consists of a subset of the
+ * XFree86 3.1 docs.
+ *
+#define InstallJapaneseDocs YES
+ */
+
+/*
+ * To build/install X specs docs, uncomment the following.
+ * The SpecsDocDirs setting here is recommended because it covers
+ * the docs that XFree86 has changed or added.
+ *
+#define BuildSpecsDocs YES
+#define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xmu Xv XvMC i18n
+ */
+
+/*
+ * To build all specs docs, not just those listed in SpecsDocDirs, uncomment
+ * the following.
+ *
+#define BuildAllSpecsDocs YES
+ */
+
+/*
+ * If your system doesn't support vm86() mode and you have
+ * libx86emu set library path here
+ *
+#define X86EMU_LIBPATH /usr/local/lib
+ */
+
+/*
+ * Most platforms default to using an already installed FreeType 2 library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasFreetype2 NO
+ */
+#define HasFreetype2 NO
+
+/*
+ * To use a FreeType library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+ *
+#define HasFreetype2 YES
+#define Freetype2Dir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed Fontconfig library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasFontconfig NO
+ */
+#define HasFontconfig NO
+
+/*
+ * To use a Fontconfig library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+#define HasFontconfig YES
+#define FontconfigDir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed Expat library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasExpat NO
+ */
+#define HasExpat NO
+
+/*
+ * To use a Expat library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+#define HasExpat YES
+#define ExpatDir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed PNG library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasLibpng NO
+ */
+
+/*
+ * To use a PNG library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+#define HasLibpng YES
+#define LibpngDir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed xterm program.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define BuildXterm YES
+ */
+
+#define SharedLibXau NO
+
+#define SharedLibXdmcp NO
+
+#define BuildXaw7 YES
+
+#else /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */
+
+#if defined(DarwinArchitecture) && !defined(NXZaurusXServer) && !defined(NXiPAQXServer)
+#define NXDarwinServer NO
+#define BuildServersOnly YES
+#define DefaultFontPath /usr/NX/share/fonts/misc/,/usr/NX/share/fonts/TTF/
+#define DefaultRGBDatabase /usr/NX/share/rgb
+#define XprtServer NO
+#define BuildXprint NO
+#define XnestServer NO
+#define XVirtualFramebufferServer NO
+#define BuildFontServer NO
+#define BuildFreeType NO
+#define BuildXTrueType NO
+#define FontLibSharedFreeType NO
+#endif
+
+#if !defined(NXZaurusXServer) && defined(NXiPAQXServer)
+#define KDriveXServer YES
+#define XiPAQH3500Server YES
+#define BuildServersOnly YES
+#define NXEmbeddedXServer YES
+#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1
+#define TinyXServer YES
+#define CrossCompiling YES
+#define TouchScreen YES
+#define ItsyCompilerBug YES
+#undef BuildRandR
+#define BuildRandR YES
+#define BuildXInputLib YES
+#define BuildXTrueType YES
+#define ServerXdmcpDefines
+#define XipaqServer YES
+#endif
+
+#if !defined(NXiPAQXServer) && defined(NXZaurusXServer)
+#define KDriveXServer YES
+#define XiPAQH3500Server YES
+#define BuildServersOnly YES
+#define ZaurusXServer YES
+#define NXEmbeddedXServer YES
+#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1
+#define TinyXServer YES
+#define CrossCompiling YES
+#define TouchScreen YES
+#define ItsyCompilerBug YES
+#undef BuildRandR
+#define BuildRandR YES
+#define BuildXInputLib YES
+#define BuildXTrueType YES
+#define ServerXdmcpDefines
+#define XipaqServer YES
+#define XfbdevServer YES
+#endif
+
+#endif /* #if !defined(NXZaurusXServer) && !defined(NXiPAQXServer) && !defined(DarwinArchitecture) */
diff --git a/nx-X11/config/cf/host.def.X.original b/nx-X11/config/cf/host.def.X.original
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/nx-X11/config/cf/host.def.X.original
diff --git a/nx-X11/config/cf/hp.cf b/nx-X11/config/cf/hp.cf
new file mode 100644
index 000000000..370476bd1
--- /dev/null
+++ b/nx-X11/config/cf/hp.cf
@@ -0,0 +1,210 @@
+XCOMM platform: $Xorg: hp.cf,v 1.5 2000/08/17 19:41:47 cpqbld Exp $
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion.OSMinorVersion.OSTeenyVersion)
+
+
+/* The default yacc options are too small for Uil.y. */
+#define YaccFlags -Nm15000
+
+/*
+ * C++ compiler setup. This file knows what options to use with
+ * certain compilers, including HP C++ and CenterLine C++.
+ *
+ * For HP C++, define HasHPCplusplus to YES in site.def.
+ * For CenterLine C++, define HasCenterLineCplusplus to YES in site.def.
+ * For other compilers, define HasCplusplus to YES in site.def, and
+ * check to see if you need to provide values for CplusplusOptions
+ * and/or DefaultCplusplusOptions.
+ *
+ * In any case, you may also need to set CplusplusDependIncludes.
+ */
+
+#if HasHPCplusplus
+# ifndef HasCplusplus
+# define HasCplusplus YES
+# endif
+# ifndef DefaultCplusplusOptions
+# define DefaultCplusplusOptions -Aa
+# endif
+# ifndef CplusplusOptions
+# define CplusplusOptions -Aa
+# endif
+# ifndef CplusplusCmd
+# define CplusplusCmd /opt/CC/bin/CC
+# endif
+# ifndef CplusplusDependIncludes
+# define CplusplusDependIncludes -I/opt/CC/include/CC
+# endif
+#endif
+
+#ifndef CcCmd
+# define CcCmd /opt/ansic/bin/cc
+#endif
+#ifndef YaccCmd
+# define YaccCmd /opt/langtools/bin/yacc
+#endif
+#ifndef LexCmd
+# define LexCmd /opt/langtools/bin/lex
+#endif
+#ifndef LintCmd
+# define LintCmd /opt/ansic/bin/lint
+#endif
+
+#if HasCenterLineCplusplus
+# ifndef HasCplusplus
+# define HasCplusplus YES
+# endif
+# ifndef OptimizedCplusplusDebugFlags
+# define OptimizedCplusplusDebugFlags -O
+# endif
+# ifndef CplusplusDependIncludes
+# define CplusplusDependIncludes -I/usr/local/CenterLine/clc++/pa-hpux8/incl
+# endif
+#endif
+
+
+#define SystemV YES
+#define Malloc0ReturnsNull YES
+#if OSMajorVersion > 9
+# define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+#else
+# define AllocateLocalDefines -DNO_ALLOCA
+#endif
+
+#ifdef __hp9000s800
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags +O1
+# endif
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -Ae +ESlit
+# endif
+# ifndef SharedLibraryCCOptions
+# define SharedLibraryCCOptions -Ae
+# endif
+# define StandardDefines -Dhpux -DSYSV
+# define ServerExtraDefines -DXOS -DBSTORE -DSOFTWARE_CURSOR -DSCREEN_PIXMAPS -DMERGE_SAVE_UNDERS -DHAS_IFREQ -DFORCE_SEPARATE_PRIVATE AllocateLocalDefines
+
+# if OSMajorVersion > 9
+# include <hpLib.rules>
+# endif
+
+#else /* __hp9000s800 */
+# define StandardDefines -Dhpux -DSYSV
+# if OSMajorVersion < 8
+# define DefaultCCOptions -Wc,-Nd4000,-Ns4100,-Ne700,-Np200,-Nw300
+# else
+# define OptimizedCDebugFlags +O1
+# endif
+# define LintOpts -ax -Nd4000 -Ns8000 -Ne700 -Np200 -Na25000
+#endif
+#define MvCmd mv -f
+#define LdCombineFlags -r
+#define ExecableScripts YES
+#define HasVFork YES
+#define HasPoll YES
+#define RemoveTargetProgramByMoving YES
+#define ExpandManNames YES
+#define HasPutenv YES
+#define HasNdbm YES
+#define DBMLibrary /usr/lib/libdbm.a
+#define PrimaryScreenResolution 91
+#define ExtensionOSDefines -DHPINPUT -DXTESTEXT1
+#define XhpServer YES
+#define ServerExtraSysLibs -ldld
+#ifndef BuildXInputExt
+# define BuildXInputExt YES
+#endif
+#define HPFastScrolling YES
+#ifndef BuildServer
+# define BuildServer __hp9000s700
+#endif
+#if OSMajorVersion < 10
+#define NeedBerklib (BuildServer|BuildFontServer)
+#endif
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
+
+#if OSMajorVersion < 6 || (OSMajorVersion == 6 && OSMinorVersion < 2)
+# define ConnectionFlags -DTCPCONN /* no unix sockets */
+#endif
+
+#if OSMajorVersion > 8
+#define HasWChar32 YES
+#define HasPlugin YES
+#endif
+
+#ifdef __hp9000s300
+# ifndef CompatabilityDefines
+# define CompatabilityDefines -D__hp9000s300 -Dhp9000s300
+# endif
+#elif defined(__hp9000s700)
+# ifndef CompatabilityDefines
+# define CompatabilityDefines -D__hp9000s800 -Dhp9000s800 -D__hp9000s700
+# endif
+#else
+# ifndef CompatabilityDefines
+# define CompatabilityDefines -D__hp9000s800 -Dhp9000s800
+# endif
+#endif
+
+#ifndef OsDefines
+# if OSMajorVersion > 9
+# define OsDefines -DhpV4 -DHPUX
+# else
+# define OsDefines -DHPUX
+# endif
+#endif
+
+#if OSMajorVersion > 9
+# if ThreadedX
+# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
+# endif
+# ifndef CppCmd
+# define CppCmd /usr/ccs/lbin/cpp
+# endif
+#endif
+
+/* CC does not recognize -Ae, and has a different meaning for +e. */
+/* +e also confuses cpp. */
+#define AnsiDefines -Ae -D_HPUX_SOURCE
+#define CplusplusAnsiDefines -Aa -D_HPUX_SOURCE
+
+#define BuildLibPathVar SHLIB_PATH
+
+#define CdeBaseProjectDefines \
+ -DNLS16 -DMALLOC_0_RETURNS_NULL -DMERGE -D__hpux \
+ -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion \
+ CompatabilityDefines OsDefines
+
+#define CdeProjectDefines CdeBaseProjectDefines AnsiDefines
+#define CdeCplusplusProjectDefines \
+ CdeBaseProjectDefines CplusplusAnsiDefines
+
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DMESSAGE_CAT
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#define DtWidgetDefines DtSearchDefines
+#define DtPrintDefines DtSearchDefines
+#if OSMajorVersion > 9
+#define DtMailDefines \
+ -DBIG_ENDIAN -DDO_ANONYMOUS_MAP -DNEED_MMAP_WRAPPER -DSENDMAIL_LOCKS \
+ -DMAILGROUP_REQUIRED -DMAIL_SPOOL_PATH=\"/var/mail/%s\"
+#else
+#define DtMailDefines \
+ -DBIG_ENDIAN -DDO_ANONYMOUS_MAP -DNEED_MMAP_WRAPPER -DSENDMAIL_LOCKS \
+ -DMAILGROUP_REQUIRED -DMAIL_SPOOL_PATH=\"/usr/mail/%s\"
+#endif
+
+#define ArchitectureDefines -DHP_ARCHITECTURE
+
+#define ExportListGenSource elistgen.hp
diff --git a/nx-X11/config/cf/hpLib.rules b/nx-X11/config/cf/hpLib.rules
new file mode 100644
index 000000000..4d68f13eb
--- /dev/null
+++ b/nx-X11/config/cf/hpLib.rules
@@ -0,0 +1,144 @@
+XCOMM $Xorg: hpLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+/*
+ * HP shared library rules
+ */
+
+XCOMM $XFree86: xc/config/cf/hpLib.rules,v 3.3 1999/01/11 05:13:06 dawes Exp $
+
+#ifndef HasSharedLibraries
+# define HasSharedLibraries YES
+#endif
+#ifndef SharedDataSeparation
+# define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+# define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+# define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+# define ShLibIncludeFile <hpLib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+# define SharedLibraryLoadFlags -b
+#endif
+#ifndef PositionIndependentCFlags
+# define PositionIndependentCFlags +z
+#endif
+#ifndef LargePositionIndependentCFlags
+# define LargePositionIndependentCFlags +Z
+#endif
+#ifndef InstLibFlags
+# define InstLibFlags -m 0555
+#endif
+#ifndef UseInstalled
+/* assert: LdPostLib pulls in -L$(USRLIBDIR), so it doesn't need to be here */
+# define ExtraLoadFlags -Wl,+s -Wl,+b$(USRLIBDIRPATH)
+#endif
+#ifndef UseExportLists
+# define UseExportLists YES
+#endif
+
+/* Pre-linking shared libraries is supported in HP/UX 10. */
+#if OSMajorVersion > 9
+# define HPRequiredLibs $(LDPRELIBS) $(REQUIREDLIBS) +s +b $(USRLIBDIRPATH)
+#else
+# define HPRequiredLibs $(REQUIREDLIBS)
+#endif
+
+#ifndef LinkWithExports
+# if UseExportLists
+# define LinkWithExports(libname,rev,solist,down,up) \
+ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) +h $@ solist HPRequiredLibs) @@\
+ if [ -f Concat(lib,libname.elist) ]; then \ @@\
+ RemoveFiles($@.exports $@.list); \ @@\
+ $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic >$@.list; \ @@\
+ $(EXPORTLISTGEN) $@~ $@.list > $@.exports; \ @@\
+ (cd down; $(LD) -c up/$@.exports -o up/$@~ $(SHLIBLDFLAGS) +h $@ solist HPRequiredLibs); \ @@\
+ RemoveFiles($@.exports $@.list); \ @@\
+ fi
+# else
+# define LinkWithExports(libname,rev,solist,down,up) \
+ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) +h $@ solist HPRequiredLibs)
+# endif
+#endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+# define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.sl.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ RMoveToBakFile(Concat($(DESTDIR)dest/lib,libname.sl.rev)) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.sl.rev) $(DESTDIR)dest @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.sl) @@\
+ cd $(DESTDIR)dest; $(LN) Concat(lib,libname.sl.rev) Concat(lib,libname.sl) @@\
+ -RemoveFile(Concat(lib,libname.sl.rev.bak))
+
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+# define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+# define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.sl.rev)) @@\
+ @@\
+Concat(lib,libname.sl.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ LinkWithExports(libname,rev,solist,down,up) @@\
+ -RemoveFiles($@ $@.bak) @@\
+ MoveToBakFile($@) @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.sl) @@\
+ $(LN) $@ Concat(lib,libname.sl) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.sl)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.sl.rev) Concat(lib,libname.sl)
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+# define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.sl.rev)) @@\
+ @@\
+Concat(lib,libname.sl.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ LinkWithExports(libname,rev,solist,down,up) @@\
+ -RemoveFiles($@ $@.bak) @@\
+ MoveToBakFile($@) @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.sl) @@\
+ $(LN) $@ Concat(lib,libname.sl) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.sl)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.sl.rev) Concat(lib,libname.sl)
+
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+# define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
diff --git a/nx-X11/config/cf/hpLib.tmpl b/nx-X11/config/cf/hpLib.tmpl
new file mode 100644
index 000000000..c955aaaab
--- /dev/null
+++ b/nx-X11/config/cf/hpLib.tmpl
@@ -0,0 +1,39 @@
+XCOMM $Xorg: hpLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+XCOMM $XFree86$
+
+/*
+ * HP shared library template
+ */
+
+#define SharedThreadReqs /**/
+#define SharedOldXReqs $(XONLYLIB)
+#define SharedX11Reqs SharedThreadReqs
+#define SharedXtReqs $(XONLYLIB) $(SMLIB) $(ICELIB) SharedThreadReqs
+#define SharedXawReqs $(XMULIB) $(XTOOLLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXmuReqs $(XTOOLLIB) $(XLIB)
+#define SharedXextReqs $(XONLYLIB)
+#define SharedXiReqs $(XLIB)
+#define SharedXtstReqs $(XLIB)
+#define SharedSMReqs $(ICELIB)
+#define SharedXpReqs $(XLIB)
+
+#define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB) SharedThreadReqs
+#define SharedXmReqs SharedXReqs
+#define SharedMrmReqs $(XMLIB) SharedXReqs
+#define SharedUilReqs $(MRESOURCELIB) $(XMLIB) SharedXReqs
+
+/* #define SharedPamReqs */
+#define SharedTtReqs $(XTOOLLIB) $(XLIB) SharedThreadReqs $(CXXLIB)
+#define SharedDtSvcReqs $(TTLIB) $(XMLIB) SharedXReqs -lm $(CXXLIB)
+#define SharedDtMmdbReqs $(DTSVCLIB) $(TTLIB) $(XMLIB) SharedXReqs -lm $(CXXLIB)
+#define SharedDtSearchReqs -lm
+#define SharedDtWidgetReqs $(DTSVCLIB) $(XMLIB) SharedXReqs -lm $(CXXLIB)
+#define SharedDtHelpReqs $(DTSVCLIB) $(XMLIB) SharedXReqs -lm
+#define SharedDtPrintReqs $(DTSVCLIB) $(DTHELPLIB) $(XMLIB) SharedXReqs -lm $(CXXLIB)
+#define SharedDtTermReqs $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) SharedXReqs -lm
+#define SharedDtMrmReqs $(DTTERMLIB) $(DTPRINTLIB) $(DTHELPLIB) $(DTWIDGETLIB) $(MRESOURCELIB) $(XMLIB) SharedXReqs -lm
+#define SharedDtMailReqs $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) SharedXReqs -lm $(CXXLIB)
+#define SharedCsaReqs $(DTSVCLIB) $(XMLIB) SharedXReqs -lm
diff --git a/nx-X11/config/cf/iPAQH3600.cf b/nx-X11/config/cf/iPAQH3600.cf
new file mode 100644
index 000000000..34e14c16d
--- /dev/null
+++ b/nx-X11/config/cf/iPAQH3600.cf
@@ -0,0 +1,109 @@
+/* $XFree86: xc/config/cf/iPAQH3600.cf,v 1.2 2000/10/10 14:05:48 tsi Exp $ */
+/*
+ * This configuration file contains additional configuration needed
+ * to cross compile X for the Compaq iPAQ H3600 PocketPC.
+ * To use this, add the following to host.def:
+ #define KDriveXServer YES
+ #define XiPAQH3500Server YES
+ */
+
+#define CrossCompiling YES
+
+#undef i386Architecture
+#define Arm32Architecture
+
+#undef OptimizedCDebugFlags
+#define OptimizedCDebugFlags -O2
+#define ServerCDebugFlags -O2
+#undef StandardDefines
+#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE \
+ -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
+#undef CcCmd
+#define StdIncDir /opt/Embedix/tools/arm-linux/include
+#define PreIncDir
+#undef PostIncDir
+#define PostIncDir /opt/Embedix/tools/lib/gcc-lib/arm-linux/2.95.2/include
+#define CcCmd /opt/Embedix/tools/bin/arm-linux-gcc
+#define DoRanlibCmd YES
+#define RanlibCmd /opt/Embedix/tools/bin/arm-linux-ranlib
+#undef ExtraLoadFlags
+#define ExtraLoadFlags
+#define FbNoPixelAddrCode
+#undef TermcapLibrary
+#define TermcapLibrary -ltermcap
+
+#undef LdPostLib
+#define LdPostLib -L/opt/Embedix/tools/arm-linux/lib
+
+#undef XfbdevServer
+#define XfbdevServer YES
+#undef BuildXprint
+#define BuildLBX NO
+#define BuildFonts NO
+#define BuildAppgroup NO
+#define BuildRECORD NO
+#define BuildDBE NO
+#define BuildXCSecurity NO
+#define ItsyCompilerBug YES
+#define FontServerAccess NO
+#define ServerXdmcpDefines /**/
+
+#undef ExtensionOSDefines
+#define ExtensionOSDefines
+
+#define ProjectRoot /usr/X11R6
+
+#define GzipFontCompression YES
+
+#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1
+
+#define HostLinkRule(target, flags, src, libs) cc -I$(BUILDINCDIR) -o target src
+
+/* ComplexHostProgramTarget - Compile a program such that we can run
+ * it on this host, i.e., don't use the default cross compiler.
+ */
+#ifndef ComplexHostProgramTarget
+#define ComplexHostProgramTarget(program) @@\
+ CC=cc @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+program: $(OBJS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+DependTarget() @@\
+ @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* ComplexHostProgramTarget */
+
+#ifndef SimpleHostProgramTarget
+#define SimpleHostProgramTarget(program) @@\
+ SRCS = program.c @@\
+ @@\
+ CC=cc @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+program: program.o $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+DependTarget() @@\
+ @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* SimpleHostProgramTarget */
diff --git a/nx-X11/config/cf/iPAQH3600.cf.NX.original b/nx-X11/config/cf/iPAQH3600.cf.NX.original
new file mode 100644
index 000000000..34e14c16d
--- /dev/null
+++ b/nx-X11/config/cf/iPAQH3600.cf.NX.original
@@ -0,0 +1,109 @@
+/* $XFree86: xc/config/cf/iPAQH3600.cf,v 1.2 2000/10/10 14:05:48 tsi Exp $ */
+/*
+ * This configuration file contains additional configuration needed
+ * to cross compile X for the Compaq iPAQ H3600 PocketPC.
+ * To use this, add the following to host.def:
+ #define KDriveXServer YES
+ #define XiPAQH3500Server YES
+ */
+
+#define CrossCompiling YES
+
+#undef i386Architecture
+#define Arm32Architecture
+
+#undef OptimizedCDebugFlags
+#define OptimizedCDebugFlags -O2
+#define ServerCDebugFlags -O2
+#undef StandardDefines
+#define StandardDefines -Dlinux -D__arm__ -D_POSIX_SOURCE \
+ -D_BSD_SOURCE -D_GNU_SOURCE -DX_LOCALE
+#undef CcCmd
+#define StdIncDir /opt/Embedix/tools/arm-linux/include
+#define PreIncDir
+#undef PostIncDir
+#define PostIncDir /opt/Embedix/tools/lib/gcc-lib/arm-linux/2.95.2/include
+#define CcCmd /opt/Embedix/tools/bin/arm-linux-gcc
+#define DoRanlibCmd YES
+#define RanlibCmd /opt/Embedix/tools/bin/arm-linux-ranlib
+#undef ExtraLoadFlags
+#define ExtraLoadFlags
+#define FbNoPixelAddrCode
+#undef TermcapLibrary
+#define TermcapLibrary -ltermcap
+
+#undef LdPostLib
+#define LdPostLib -L/opt/Embedix/tools/arm-linux/lib
+
+#undef XfbdevServer
+#define XfbdevServer YES
+#undef BuildXprint
+#define BuildLBX NO
+#define BuildFonts NO
+#define BuildAppgroup NO
+#define BuildRECORD NO
+#define BuildDBE NO
+#define BuildXCSecurity NO
+#define ItsyCompilerBug YES
+#define FontServerAccess NO
+#define ServerXdmcpDefines /**/
+
+#undef ExtensionOSDefines
+#define ExtensionOSDefines
+
+#define ProjectRoot /usr/X11R6
+
+#define GzipFontCompression YES
+
+#define KdriveServerExtraDefines -DITSY -DMAXSCREENS=1
+
+#define HostLinkRule(target, flags, src, libs) cc -I$(BUILDINCDIR) -o target src
+
+/* ComplexHostProgramTarget - Compile a program such that we can run
+ * it on this host, i.e., don't use the default cross compiler.
+ */
+#ifndef ComplexHostProgramTarget
+#define ComplexHostProgramTarget(program) @@\
+ CC=cc @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+program: $(OBJS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+DependTarget() @@\
+ @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* ComplexHostProgramTarget */
+
+#ifndef SimpleHostProgramTarget
+#define SimpleHostProgramTarget(program) @@\
+ SRCS = program.c @@\
+ @@\
+ CC=cc @@\
+ STD_INCLUDES= @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\
+EXTRA_LOAD_FLAGS= @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+program: program.o $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),program.o,$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+DependTarget() @@\
+ @@\
+LintTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+#endif /* SimpleHostProgramTarget */
diff --git a/nx-X11/config/cf/iPAQH3600.cf.X.original b/nx-X11/config/cf/iPAQH3600.cf.X.original
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/nx-X11/config/cf/iPAQH3600.cf.X.original
diff --git a/nx-X11/config/cf/ibm.cf b/nx-X11/config/cf/ibm.cf
new file mode 100644
index 000000000..decbc2223
--- /dev/null
+++ b/nx-X11/config/cf/ibm.cf
@@ -0,0 +1,198 @@
+XCOMM platform: $XdotOrg: xc/config/cf/ibm.cf,v 1.3 2004/08/30 13:32:51 kem Exp $
+XCOMM platform: $Xorg: ibm.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# ifdef DefaultOSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+# elif (OSMajorVersion == 4) && (OSMinorVersion == 1)
+# define OSTeenyVersion 3
+# else
+# define OSTeenyVersion 0
+# endif
+#endif
+XCOMM operating system: OSName (OSMajorVersion.OSMinorVersion.OSTeenyVersion)
+
+#define RemoveFiles(files) for f in files; do RemoveFile($$f); done
+
+#if (OSMajorVersion > 4)
+# define HasSnprintf YES
+# define HasStrcasecmp YES
+#endif
+#if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion >= 2)
+#define HasBSD44Sockets YES
+#define HasPutenv YES
+#define HasPlugin YES
+/*
+ * If you do not have threads support installed, put
+ * #define HasPosixThreads NO
+ * in the BeforeVendorCF section of your site.def.
+ */
+#if !defined(HasPosixThreads) && ((OSMajorVersion == 3 && (OSMinorVersion > 2 || (OSMinorVersion == 2 && OSTeenyVersion > 4))) || (OSMajorVersion == 4 && (OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1))) || (OSMajorVersion >= 5))
+#define HasPosixThreads YES
+#endif
+#if HasPosixThreads
+#ifndef ThreadedX
+#define ThreadedX YES
+#define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
+#endif
+#endif
+#endif /* OS > 3.2 */
+
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+
+#ifndef XVirtualFramebufferServer
+#define XVirtualFramebufferServer YES
+#endif
+
+#if !defined(TermcapLibrary)
+#define TermcapLibrary -lcurses
+#endif
+
+#if !defined(HasPam) && ((OSMajorVersion == 5) && (OSMinorVersion >= 2) || OSMajorVersion > 5)
+#define HasPam YES
+#ifndef PamLibraries
+#define PamLibraries -lpam
+#endif
+#endif
+
+/*
+ * For IBM platforms, we must define both the location of the compiler
+ * and the location of its standard C++ library. The library location
+ * is needed to resolve dependent library symbols if we build our own
+ * C++ shared libraries.
+ */
+
+#if !HasGcc2ForCplusplus
+# ifndef CplusplusCmd
+# if ThreadedX
+# define CplusplusCmd xlC_r
+# else
+# define CplusplusCmd xlC
+# endif
+# endif
+#endif
+
+#ifndef CplusplusFilt
+# define CplusplusFilt /usr/lpp/xlC/bin/c++filt
+#endif
+#ifndef CplusplusLibC
+# if ThreadedX
+# define CplusplusLibC /usr/lpp/xlC/lib/libC.a
+# else
+# define CplusplusLibC /usr/lpp/xlC/lib/libC_r.a
+# endif
+#endif
+#if !HasGcc2ForCplusplus
+# ifndef CplusplusDependIncludes
+# define CplusplusDependIncludes -I/usr/lpp/xlC/include
+# endif
+#endif
+
+/*
+ * IBM's xlC refuses to compile files unless their names end in ".C".
+ * As an alternative to this fix, one could edit /etc/xlC.cfg
+ * to change the suffix accepted by the compiler, but we prefer not
+ * requiring users to reconfigure their C++ compilers to make them work.
+ * We also have to override the default SUFFIXES to defeat the use of
+ * the builtin .C -> .o file, which doesn't use the right flags.
+ */
+
+.SUFFIXES:
+.SUFFIXES: .o .c .y .l .s .sh .h .f .Y .L .cxx
+
+#define NormalLibObjCplusplusCompile(options) test -r $*.C || $(LN) $*.CCsuf $*.C @@\
+ $(CXX) -c $(CXXFLAGS) options $*.C
+
+#define SpecialCplusplusObjectRule(baseobj,basedep,options) @@\
+baseobj.Osuf: basedep.CCsuf @@\
+ test -r basedep.C || $(LN) basedep.CCsuf basedep.C @@\
+ $(CXX) -c $(CXXFLAGS) options basedep.C
+
+
+#define BuildLibPathVar LIBPATH
+#define SystemV YES
+#define LdCombineFlags -r
+#define ExecableScripts YES
+#define Malloc0ReturnsNull YES
+#define CppCmd /usr/ccs/lib/cpp
+#define ExpandManNames YES
+#define ExtensionOSDefines -DXTESTEXT1
+
+/* IBM cpp has slightly non-standard line directives, but supports -P */
+#define CppNoLineInfoOption -P
+
+#if OSMajorVersion > 3
+#if OSMajorVersion > 4
+#define StandardDefines -DSYSV -DAIXV3 -DAIXV4 -DAIXV5 -D_ALL_SOURCE
+#else
+#define StandardDefines -DSYSV -DAIXV3 -DAIXV4 -D_ALL_SOURCE
+#endif
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
+#define ServerExtraDefines -D_IBM_LFT
+#if ThreadedX
+#define CcCmd xlc_r
+#else
+#define CcCmd xlc
+#endif
+#define SystemMTDefines /* xlc_r defines -D_THREAD_SAFE */
+#define ThreadsLibraries -lpthreads /* xlc_r does -lc_r */
+#define ThreadsCplusplusLibraries -lpthreads
+#define AvoidNullMakeCommand YES
+#define NullMakeCommand @ echo
+/* AIX 4 appends all MAKEFLAGS (even dups), so cannot pass on command line. */
+#define ConstructMFLAGS NO
+#define LdPreLib _Use(-L$(USRLIBDIR),-L$(BUILDLIBDIR))
+#define ExtraFilesToClean *.inp
+#else /* OSMajorVersion < 4 */
+#define StandardDefines -DSYSV -DAIXV3 -D_ALL_SOURCE
+#define ServerExtraDefines -D_IBM_HFT
+#define CcCmd xlc
+#define ThreadPreStdAPIDefines -DXPRE_STANDARD_API
+#define SystemMTDefines -D_THREAD_SAFE
+#define ThreadsLibraries -lpthreads -lc_r
+#endif /* OSMajorVersion */
+
+#define OPERATING_SYSTEM AIX /* directory name under server/ddx/ibm/ */
+#define InstallCmd /usr/ucb/install
+#include <ibmLib.rules>
+
+#ifndef ManKeywordsTarget
+#define ManKeywordsTarget(manpath) @@\
+man_keywords:: @@\
+ /usr/lib/makewhatis $(DESTDIR)manpath
+#endif
+
+#define DtMailDefines \
+ -DI_HAVE_NO_BOOL -DI_HAVE_SELECT_H \
+ -DBIG_ENDIAN -DSTRCASECMP_NOT_DEFINED -DDO_ANONYMOUS_MAP -DSENDMAIL_LOCKS \
+ -DMAILGROUP_REQUIRED -DMAIL_SPOOL_PATH=\"/var/spool/mail/%s\"
+
+#define ArchitectureDefines -DIBM_ARCHITECTURE
+
+#define ExportListGenSource elistgen.ibm
+
+#define CdeProjectDefines \
+ -D_AIX -D__AIX -D__aix -D_aix -Daix -DMULTIBYTE -DNLS16 -DMESSAGE_CAT \
+ -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion -DAIX
+
+/*
+ * -D__STR31__ disables inlining of memcpy to work around optimization bug
+ * in XLC v1.2.0.7. Bug report filed as PMR 8X196, branch 060.
+ */
+#ifndef OptimizedCDebugFlags
+#define OptimizedCDebugFlags -O -D__STR31__ -DNDEBUG
+#endif
+
+#define CdeTicDefines -DHAS_KNL -DHAS_KTAB
diff --git a/nx-X11/config/cf/ibmLib.rules b/nx-X11/config/cf/ibmLib.rules
new file mode 100644
index 000000000..eb6071330
--- /dev/null
+++ b/nx-X11/config/cf/ibmLib.rules
@@ -0,0 +1,349 @@
+XCOMM $Xorg: ibmLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+XCOMM $XdotOrg: xc/config/cf/ibmLib.rules,v 1.2 2004/04/23 18:41:58 eich Exp $
+
+/*
+ * AIX shared library rules
+ */
+
+XCOMM $XFree86: xc/config/cf/ibmLib.rules,v 3.5 2000/02/13 06:15:18 dawes Exp $
+#ifndef HasSharedLibraries
+# define HasSharedLibraries YES
+#endif
+#ifndef ForceNormalLib
+# define ForceNormalLib NO
+#endif
+#ifndef SharedDataSeparation
+# define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+# define SharedCodeDef -DSHAREDCODE
+#endif
+#if OSMajorVersion < 5
+# ifndef SharedLibraryDef
+# define SharedLibraryDef -DAIXSHLIB
+# endif
+#else
+# define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+# define ShLibIncludeFile <ibmLib.tmpl>
+#endif
+#ifndef PositionIndependentCFlags
+# define PositionIndependentCFlags -bM\:SRE
+#endif
+#ifndef ExtraLoadFlags
+# define ExtraLoadFlags -bnodelcsect
+#endif
+#if !defined(LdPostLib) && !defined(UseInstalled) && OSMajorVersion > 3
+# if ThreadedX
+# define LdPostLib -bnoipath -blibpath:$(USRLIBDIRPATH):/usr/lib/threads:/usr/lib:/lib
+# else
+# define LdPostLib -bnoipath -blibpath:$(USRLIBDIRPATH):/usr/lib:/lib
+# endif
+# define SharedLibPostRef $(LDPOSTLIBS)
+#endif
+#ifndef SharedLibPostRef
+# define SharedLibPostRef $(LDPOSTLIBS)
+#endif
+#if ThreadedX
+# define BaseShLibReqs -lc_r -lm
+#else
+# define BaseShLibReqs -lc -lm
+#endif
+#ifndef UseExportLists
+# define UseExportLists YES
+#endif
+
+/*
+ * MakeExportList - generate an export list file for linking libraries.
+ */
+#ifndef MakeExportList
+# if UseExportLists
+# define MakeExportList(libname,result) \
+ @-RemoveFile(result) @@\
+ case ,$(SHR4OBJLIBS), in *,libname,*) shr4obj=shr4.o;; esac &&\ @@\
+ echo "#! $@ ($${shr4obj:-shr.o})" > result @@\
+ if [ -f Concat(lib,libname.elist) ]; then \ @@\
+ $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic > $@.list; \ @@\
+ $(EXPORTLISTGEN) $@~ $@.list >> result; \ @@\
+ RemoveFile($@.list); \ @@\
+ else \ @@\
+ dump -g $@~ | sed -n -e 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$$/\1/p' >> result; \ @@\
+ fi;
+# else
+# define MakeExportList(libname,result) \
+ @-RemoveFile(result) @@\
+ case ,$(SHR4OBJLIBS), in *,libname,*) shr4obj=shr4.o;; esac &&\ @@\
+ echo "#! $@ ($${shr4obj:-shr.o})" > result @@\
+ dump -g $@~ | sed -n -e 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$$/\1/p' >> result;
+# endif
+#endif /* MakeExportList */
+
+
+#if !defined(UseInstalled) && !defined(UseInstalledX11) \
+ && !defined(UseImports) && !defined(ImportX11)
+ /* we want this to be defined only when building X */
+
+# if OSMajorVersion < 5
+# if OSMajorVersion < 4
+/*
+ * SharedLibReferences - variables for shared libraries
+ */
+
+# ifndef SharedLibReferences
+# define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
+Concat3(DEP,varname,LIB) = /**/ @@\
+Concat(varname,LIB) = _Use(Concat(-l,libname),Concat(libsource/lib,libname.a)) @@\
+LintLibReferences(varname,libname,libsource)
+# endif
+
+# else /* OSMajorVersion < 4 */
+
+# ifndef SharedLibReferences
+# define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
+Concat3(DEP,varname,LIB) = /**/ @@\
+Concat(varname,LIB) = _Use(Concat(-l,libname),Concat($(BUILDLIBDIR),/libname.imp) Concat3($(BUILDLIBDIR),/lib,libname.a)) @@\
+LintLibReferences(varname,libname,libsource)
+# endif
+
+# endif
+# else /* OSMajorVersion < 5 */
+
+# ifndef SharedLibReferences
+# define SharedLibReferences(varname,libname,libsource,revname,rev) @@\
+Concat3(DEP,varname,LIB) = /**/ @@\
+Concat(varname,LIB) = _Use(Concat(-l,libname), Concat3($(BUILDLIBDIR),/lib,libname.so)) @@\
+LintLibReferences(varname,libname,libsource)
+# endif
+
+# endif
+
+# if OSMajorVersion < 5
+# if OSMajorVersion < 4
+/*
+ * SharedFontLibReferences - shared font libraries
+ */
+
+# ifndef SharedFontLibReferences
+# define SharedFontLibReferences() @@\
+DEPFONTLIB = /**/ @@\
+FONTLIB = -L$(FREETYPELIBDIR) _Use(-lXfont,$(FONTLIBSRC)/libXfont.a) @@\
+LintLibReferences(XFONT,Xfont,$(FONTLIBSRC))
+# endif
+# else
+# ifndef SharedFontLibReferences
+# define SharedFontLibReferences() @@\
+DEPFONTLIB = /**/ @@\
+FONTLIB = -L$(FREETYPELIBDIR) _Use(-lXfont,$(BUILDLIBDIR)/font.imp) $(BUILDLIBDI)/libXfont.a)) @@\
+LintLibReferences(XFONT,Xfont,$(FONTLIBSRC))
+# endif
+# endif
+# else /* OSMajorVersion < 5 */
+# ifndef SharedFontLibReferences
+# define SharedFontLibReferences() @@\
+DEPFONTLIB = /**/ @@\
+FONTLIB = -L$(FREETYPELIBDIR) _Use(-lXfont,$(BUILDLIBDI)/libXfont.so)) @@\
+LintLibReferences(XFONT,Xfont,$(FONTLIBSRC))
+# endif
+
+# endif
+
+/*
+ * SharedDSLibReferences - variables for shared libraries
+ */
+# ifndef SharedDSLibReferences
+# define SharedDSLibReferences(varname,libname,libsource,revname,rev) @@\
+SharedLibReferences(varname,libname,libsource,revname,rev)
+# endif
+
+# if OSMajorVersion == 4
+/*
+ * UnsharedLibReferences - variables for unshared libraries
+ */
+# ifndef UnsharedLibReferences
+# define UnsharedLibReferences(varname,libname,libsource) @@\
+Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/lib,$(BUILDLIBDIR)/lib,libname.a) @@\
+Concat(varname,LIB) = _Use(Concat(-l,libname),Concat($(BUILDLIBDIR)/lib,libname.a)) @@\
+LintLibReferences(varname,libname,libsource)
+# endif
+# endif
+
+#endif /* !defined(UseInstalled) && !defined(UseInstalledX11) ... */
+
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+# if OSMajorVersion < 5
+# define InstallSharedLibrary(libname,rev,dest) @@\
+InstallLibrary(libname,dest)
+# else /* OSMajorVersion < 5 */
+# define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so) $(DESTDIR)dest
+# endif /* OSMajorVersion < 5 */
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+# define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that the we do not hose people by having
+ * the library gone for long periods.
+ *
+ * IBM uses an unusual shared object file name (shr4.o) in some libraries.
+ * Duplicate this behavior to preserve compatibility with IBM's libraries.
+ */
+#if OSMajorVersion < 5
+# if OSMajorVersion < 4
+
+# ifndef SharedLibraryTarget
+# define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.a)) @@\
+ @@\
+Concat(lib,libname.a): solist $(UNSHAREDOBJS) $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ shr.o shr4.o @@\
+ (cd down; $(AR) up/$@~ solist) @@\
+ dump -g $@~ | sed -n -e 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$$/\1/p' > $@.syms @@\
+ $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms $(REQUIREDLIBS) BaseShLibReqs SharedLibPostRef @@\
+ $(LN) shr.o shr4.o @@\
+ $(RM) $@~ @@\
+ case ,$(SHR4OBJLIBS), in *,libname,*) shr4obj=shr4.o;; esac &&\ @@\
+ $(AR) $@~ $${shr4obj} shr.o $(UNSHAREDOBJS) @@\
+ $(RM) $@.syms $@ shr.o shr4.o @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.a)
+# endif /* SharedLibraryTarget */
+
+# else /* OSMajorVersion < 4 */
+
+# ifndef SharedLibraryTarget
+# define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.a)) @@\
+ @@\
+Concat(lib,libname.a): solist $(UNSHAREDOBJS) $(EXTRALIBRARYDEPS) @@\
+ RemoveFiles($@~ shr.o shr4.o) @@\
+ (cd down; $(AR) up/$@~ solist) @@\
+ MakeExportList(libname,libname.imp) @@\
+ $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:libname.imp -bnoentry $(REQUIREDLIBS) BaseShLibReqs $(LDPOSTLIBS) @@\
+ $(LN) shr.o shr4.o @@\
+ RemoveFile($@~) @@\
+ case ,$(SHR4OBJLIBS), in *,libname,*) shr4obj=shr4.o;; esac &&\ @@\
+ $(AR) $@~ $${shr4obj} shr.o $(UNSHAREDOBJS) @@\
+ RemoveFile($@) @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(libname.imp) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.a)
+# endif /* SharedLibraryTarget */
+# endif /* OSMajorVersion < 4 */
+#else /* OSMajorVersion < 5 */
+# ifndef SharedLibraryTarget
+# define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so)) @@\
+ @@\
+Concat(lib,libname.so): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ $(AR) $*.a solist @@\
+ dump -g $*.a | sed -n -e 's/^[ ]*[0-9][0-9]*[[:space:]]*\([_[:alpha:]][[:alnum:]]*\)/\1/p' | egrep -v \\\. | sort | uniq > $*.syms @@\
+ $(LD) -bnoipath -bnoentry -bM\:SRE -bE\:$*.syms -o $@~ solist $(REQUIREDLIBS) BaseShLibReqs -lc @@\
+ $(RM) $@ $*.a $*.syms @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+# endif /* SharedLibraryTarget */
+#endif /* OSMajorVersion < 5 */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#if OSMajorVersion < 5
+# if OSMajorVersion < 4
+
+# ifndef SharedDepLibraryTarget
+# define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.a)) @@\
+ @@\
+Concat(lib,libname.a): deplist $(UNSHAREDOBJS) $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ shr.o shr4.o @@\
+ (cd down; $(AR) up/$@~ solist) @@\
+ dump -g $@~ | sed -n -e 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$$/\1/p' > $@.syms @@\
+ $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms $(REQUIREDLIBS) BaseShLibReqs SharedLibPostRef @@\
+ $(LN) shr.o shr4.o @@\
+ $(RM) $@~ @@\
+ case ,$(SHR4OBJLIBS), in *,libname,*) shr4obj=shr4.o;; esac &&\ @@\
+ $(AR) $@~ $${shr4obj} shr.o $(UNSHAREDOBJS) @@\
+ $(RM) $@.syms $@ shr.o shr4.o @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.a)
+# endif /* SharedDepLibraryTarget */
+
+# else /* OSMajorVersion < 4 */
+
+# ifndef SharedDepLibraryTarget
+# define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.a)) @@\
+ @@\
+Concat(lib,libname.a): deplist $(UNSHAREDOBJS) $(EXTRALIBRARYDEPS) @@\
+ RemoveFiles($@~ shr.o shr4.o) @@\
+ (cd down; $(AR) up/$@~ solist) @@\
+ MakeExportList(libname,libname.imp) @@\
+ $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:libname.imp -bnoentry $(REQUIREDLIBS) BaseShLibReqs $(LDPOSTLIBS) @@\
+ $(LN) shr.o shr4.o @@\
+ RemoveFile($@~) @@\
+ case ,$(SHR4OBJLIBS), in *,libname,*) shr4obj=shr4.o;; esac &&\ @@\
+ $(AR) $@~ $${shr4obj} shr.o $(UNSHAREDOBJS) @@\
+ RemoveFile($@) @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(libname.imp) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.a)
+# endif /* SharedDepLibraryTarget */
+
+# endif /* OSMajorVersion < 4 */
+#else /* OSMajorVersion < 5 */
+# ifndef SharedDepLibraryTarget
+# define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so)) @@\
+ @@\
+Concat(lib,libname.so): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ $(AR) $*.a solist @@\
+ dump -g $*.a | sed -n -e 's/^[ ]*[0-9][0-9]*[[:space:]]*\([_[:alpha:]][[:alnum:]]*\)/\1/p' | egrep -v \\\. | sort | uniq > $*.syms @@\
+ $(LD) -bnoipath -bnoentry -bsymbolic -bM\:SRE -bE\:$*.syms -o $@~ solist $(REQUIREDLIBS) BaseShLibReqs -lc @@\
+ $(RM) $@ $*.a $*.syms @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so) Concat(lib,libname.so)
+
+# endif /* SharedDepLibraryTarget */
+#endif /* OSMajorVersion < 5 */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+# define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
diff --git a/nx-X11/config/cf/ibmLib.tmpl b/nx-X11/config/cf/ibmLib.tmpl
new file mode 100644
index 000000000..ff196aa5d
--- /dev/null
+++ b/nx-X11/config/cf/ibmLib.tmpl
@@ -0,0 +1,96 @@
+XCOMM $Xorg: ibmLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+XCOMM $XdotOrg: xc/config/cf/ibmLib.tmpl,v 1.6 2005/05/19 18:53:42 ajax Exp $
+
+/*
+ * AIX shared library template
+ */
+
+XCOMM $XFree86: xc/config/cf/ibmLib.tmpl,v 1.3tsi Exp $
+
+/*
+ * IBM used an unusual shared object file name in some libraries.
+ * Mimic this behavior to preserve compatibility with IBM's libraries.
+ */
+#ifndef IBMShr4Compatibility
+#define IBMShr4Compatibility YES
+#endif
+
+/*
+ * Imake thinks lines with colons are the result of a broken cpp
+ * inserting extra leading whitespace, so use ',' as a separator.
+ */
+#if IBMShr4Compatibility
+ SHR4OBJLIBS = X11,Xt,oldX,Xm,Mrm,Uil
+#endif
+
+#if ThreadedX
+#define SharedThreadReqs -lpthreads
+#define SharedX11Reqs -lpthreads
+#else
+#define SharedThreadReqs /**/
+#endif
+
+#define SharedXextReqs $(XONLYLIB)
+#define SharedXmuReqs $(XTOOLLIB) $(XLIB)
+#define SharedXmuuReqs $(XLIBONLY)
+#define SharedOldXReqs $(XLIBONLY)
+#define SharedXtReqs $(XLIBONLY) $(SMLIB) $(ICELIB) SharedThreadReqs
+#define SharedXawReqs $(XMULIB) $(XTOOLLIB) $(EXTRAXAWREQS) $(XLIB) $(XPMLIB)
+#define SharedXaw7Reqs $(XMULIB) $(XTOOLLIB) $(XLIB) $(XPMLIB)
+#define SharedXaw6Reqs $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXiReqs $(XLIB)
+#define SharedXtstReqs $(XLIB)
+#define SharedXieReqs $(XONLYLIB)
+#define SharedSMReqs $(ICELIB)
+#define SharedXpReqs $(XLIB)
+#define SharedXpmReqs $(XLIB)
+#define SharedDPSReqs $(XTOOLLIB) $(XLIB)
+#define SharedDPSTKReqs $(DPSLIB) $(XTOOLLIB) $(XLIB)
+#define SharedXrenderReqs $(XLIB)
+#define SharedXrandrReqs $(XRENDERLIB) $(XLIB)
+#define SharedXcursorReqs $(XRENDERLIB) $(XLIB)
+#define SharedxkbfileReqs $(XLIBONLY)
+#define SharedxkbuiReqs $(XLIBONLY) $(XKBFILELIB)
+#define SharedFontencReqs $(BUILDLIBDIR)/libz.a
+#define SharedXfontcacheReqs $(XLIB)
+#define SharedXfontReqs stubs/libfntstubs.a $(FREETYPE2LIB)
+#define SharedXfixesReqs $(XONLYLIB)
+#define SharedXdamageReqs $(XONLYLIB)
+#define SharedXcompositeReqs $(XONLYLIB)
+#define SharedXevieReqs $(XONLYLIB) $(EXTENSIONLIB)
+
+#define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB) SharedThreadReqs
+#define SharedXmReqs $(LDPRELIBS) SharedXReqs
+#define SharedMrmReqs $(LDPRELIBS) $(XMLIB) SharedXReqs
+#define SharedUilReqs $(LDPRELIBS) $(MRESOURCELIB) $(XMLIB) SharedXReqs
+
+/* #define SharedPamReqs */
+#define SharedTtReqs $(LDPRELIBS) SharedXReqs $(CXXLIB)
+#define SharedDtSvcReqs $(LDPRELIBS) $(TTLIB) $(XMLIB) SharedXReqs $(CXXLIB)
+#define SharedDtMmdbReqs $(LDPRELIBS) $(DTSVCLIB) $(TTLIB) $(XMLIB) SharedXReqs $(CXXLIB)
+#define SharedDtSearchReqs $(LDPRELIBS) -lisode
+#define SharedDtWidgetReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXReqs
+#define SharedDtHelpReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXReqs -liconv
+#define SharedDtPrintReqs $(LDPRELIBS) $(DTSVCLIB) $(DTHELPLIB) $(XMLIB) SharedXReqs
+#define SharedDtTermReqs $(LDPRELIBS) $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) SharedXReqs -liconv -lm
+#define SharedDtMrmReqs $(LDPRELIBS) $(DTTERMLIB) $(DTPRINTLIB) $(DTHELPLIB) $(DTWIDGETLIB) $(MRESOURCELIB) $(XMLIB) SharedXReqs
+#define SharedCsaReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXReqs
+
+#if !defined(UseInstalled) && !defined(UseInstalledX11) \
+ && !defined(UseImports) && !defined(ImportX11)
+ /* we want this to be defined only when building X */
+# ifndef FixupLibReferences
+# define FixupLibReferences() @@\
+DEPXTOOLLIB = _UseCat($(USRLIBDIR),$(TOOLKITSRC),/libXt.a)
+# endif
+#endif
+
+/* The inbuf paramter to iconv(3) is "const char**", not "char **" */
+ICONV_INBUF_DEFINE = -DICONV_INBUF_CONST
+
+ICONVSYSLIB = -liconv
+
+#if (OSMajorVersion > 4) || ((OSMajorVersion == 4) && (OSMinorVersion >= 2))
+DYNLIBSYSLIB = -ldl
+#endif
+
diff --git a/nx-X11/config/cf/isc.cf b/nx-X11/config/cf/isc.cf
new file mode 100644
index 000000000..b4078e4d1
--- /dev/null
+++ b/nx-X11/config/cf/isc.cf
@@ -0,0 +1,284 @@
+XCOMM $Xorg: isc.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/isc.cf,v 3.15 1999/07/10 12:17:09 dawes Exp $
+
+#ifndef HasGcc2
+#define HasGcc2 YES
+#endif
+
+/* INTERACTIVE UNIX SYSTEM (IUS) Version 3.x 4.x */
+
+#if IscVersion > 300
+# define ISCVerDef -DISC40 -DISC30
+# define OSVendor (IUS Version 4.x)
+#else
+# if IscVersion == 300
+# define ISCVerDef -DISC30
+# define OSVendor (ISC Version 3.0)
+# else
+# if IscVersion == 202
+# define OSVendor (ISC Version 2.0.2)
+# define ISCVerDef -DISC202
+# else
+# define OSVendor (ISC Version 2.2.1)
+# define ISCVerDef -DISC22
+# endif
+# endif
+#endif
+
+/* Disable the use of /var/X11 */
+#ifndef HasVarDirectory
+#define HasVarDirectory NO
+#endif
+
+/* Use mmap Driver */
+#ifndef HasSVR3mmapDrv
+# define HasSVR3mmapDrv YES
+#endif
+
+#ifndef BuildXF86DRI
+# define BuildXF86DRI NO
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+/*
+ * disable building DRI support into video drivers, which can be done
+ * even on platforms that don't have functional DRI support.
+ * maybe not on ISC ? (mr 28.06.1999)
+ */
+#ifndef BuildXF86DRIDriverSupport
+#define BuildXF86DRIDriverSupport NO
+#endif
+
+/* to use inline Math from linux ;-) package inline-math-2.6.tar.gz */
+/* you should first install the package, available on your favorite linux ftp */
+/* and define UseInlineMath YES inside host.def */
+#ifndef UseInlineMath
+# define UseInlineMath NO
+#endif
+
+/* You could use cbrt from liboptm.a (Interactive icc Compiler) */
+/* define to YES inside host.def */
+#ifndef HasCbrt
+# define HasCbrt NO
+#endif
+
+/* Use GNUs MallocLibrary */
+#ifndef UseGnuMalloc
+# define UseGnuMalloc NO
+#endif
+
+/* Install Zlib Headers - used in lib/zlib/Imakefile */
+#ifndef OsNeedZlibHeaders
+# define OsNeedZlibHeaders YES
+#endif
+
+/* Expand Manual Pages (needs S5L) */
+#ifndef ExpandManNames
+# define ExpandManNames NO
+#endif
+
+/* if you haven't groff or the TextProcessingWorkbench - do preformat*/
+#ifndef FormattedManPages
+# define FormattedManPages YES
+#endif
+
+#ifndef HasPosixRegex /* Need extra/regex since 3.9Ns */
+#define HasPosixRegex NO
+#endif
+
+#ifndef DoLoadableServer
+#define DoLoadableServer YES
+#endif
+
+#ifndef CpuOption
+#define CpuOption -m486
+#endif
+
+/* gcc 2.7.2/2.8.1 tested Optimization Flags */
+#ifndef DefaultGcc2i386Opt
+#define DefaultGcc2i386Opt -O2 CpuOption -fno-strength-reduce GccWarningOptions
+#endif
+
+/* For a POSIXized build on Interactive maybe needed to use gcc2.7.2 */
+#ifndef UsePosix
+# define UsePosix YES
+#endif
+
+/* ISC 4.1Mu
+#define IscCompileVersion 410
+*/
+
+#if !defined(IscCompileVersion) && IscVersion < 410
+/* ISC 4.0 compatible */
+#define IscCompileVersion 400
+#endif
+
+#if IscCompileVersion == 400
+
+/* binaries which should run on ISC 4.0 or for the build on a real 4.0 System */
+# define UseChmod YES
+
+/* for compatibility with ISC 4.0 - reported by Ami Fischmann */
+/* troubles when linking with libX11.a build on ISC4.1 and used with 4.0 */
+# define HasSnprintf NO
+# define UseXwctomb YES
+
+#endif
+
+#if defined(UseXwctomb)
+# define XwctombDefine -DUSE_XMBTOWC
+#else
+# define XwctombDefine
+#endif
+
+#if defined(UseChmod)
+# define IscCompatDefines XwctombDefine -DUSE_CHMOD
+#else
+# define IscCompatDefines XwctombDefine
+#endif
+
+#ifdef UsePosix
+# define PosixDefines -posix -D_SYSV3 -D_POSIX_SOURCE
+#else
+# define PosixDefines
+#endif
+
+#define OSDefines -DISC ISCVerDef IscCompatDefines
+
+/*
+#define OSName Unix System V/386 Release 3.2
+#define OSMajorVersion 3
+#define OSMinorVersion 2
+*/
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+
+#ifndef OSName
+#define OSName INTERACTIVE UNIX System V/386 Release 3.2
+#endif
+
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+/* Note, cpp already does -Di386 */
+#define BootstrapCFlags OSDefines -DSYSV
+
+#if IscVersion > 202
+# define LocalLibraries -lpt
+# define PosixLibraries -lcposix
+#else
+# define LocalLibraries MallocLibrary -lpt
+# define PosixLibraries
+#endif
+
+#define SocketLibraries -linet
+
+#ifndef GnuMallocLibrary
+#ifndef UseIscLd
+# define GnuMallocLibrary -L/usr/local/lib -lgnumalloc
+#else
+# define GnuMallocLibrary /usr/local/lib/libgmalloc.a
+#endif
+#endif
+
+#ifndef MallocLibrary
+# if UseGnuMalloc
+# define MallocLibrary GnuMallocLibrary
+# else
+# define MallocLibrary -lmalloc
+# endif
+#endif
+
+#ifndef ExtraLibraries
+# if UseGnuMalloc
+# define ExtraLibraries SocketLibraries LocalLibraries MallocLibrary PosixLibraries
+# else
+# define ExtraLibraries SocketLibraries LocalLibraries PosixLibraries
+# endif
+#endif
+
+#if UseXwctomb
+#define XawI18nDefines -DUSE_XWCHAR_STRING
+#else
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#endif
+
+#if HasCbrt
+#define MathLibrary -loptm
+#endif
+
+#ifdef UseInlineMath
+#define InlineMathDefines -DUseInlineMath
+#if !HasCbrt
+#define ServerExtraSysLibs $(CBRT) MathLibrary
+#endif
+#else
+#define InlineMathDefines
+#endif
+
+#ifndef ServerExtraSysLibs
+#define ServerExtraSysLibs $(CBRT)
+#endif
+
+#define ServerExtraDefines SVR3mmapFlags XFree86ServerDefines
+
+#if IscVersion > 300
+# ifndef HasSymLinks
+# define HasSymLinks YES
+# endif
+#endif
+
+#define HasShm YES
+
+#ifndef HasSnprintf
+#define HasSnprintf YES
+#endif
+
+#ifndef HasLibCrypt
+#define HasLibCrypt YES
+#define SpecialLibCrypt -lcrypt
+#endif
+
+#ifndef DefaultCDebugFlags
+# if HasGcc2
+# define DefaultCDebugFlags DefaultGcc2i386Opt PosixDefines InlineMathDefines
+# else
+# define DefaultCDebugFlags -O PosixDefines InlineMathDefines
+# endif
+#endif
+
+#if HasGcc2
+# define CcCmd gcc
+#endif
+
+#ifndef DefaultCplusplusOptions
+#define DefaultCplusplusOptions -fno-implicit-templates
+#endif
+
+#ifndef ConnectionFlags
+#define ConnectionFlags -DLOCALCONN -DTCPCONN
+/* -DSTREAMSCONN -DUNIXCONN -- does not work on ISC SVR3 */
+#endif
+
+#define CompressManCmd $(COMPRESS) -v
+
+#define XmanSearchPath /usr/catman
+
+#ifndef RemoveDSDENroffMacros
+#define RemoveDSDENroffMacros YES
+#endif
+
+#include <svr3.cf>
+
diff --git a/nx-X11/config/cf/linux.cf b/nx-X11/config/cf/linux.cf
new file mode 100644
index 000000000..98981d7a7
--- /dev/null
+++ b/nx-X11/config/cf/linux.cf
@@ -0,0 +1,1076 @@
+XCOMM $XdotOrg: xc/config/cf/linux.cf,v 1.31 2005/10/21 19:10:27 ajax Exp $
+XCOMM platform: $Xorg: linux.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/linux.cf,v 3.220 2003/12/30 22:38:33 tsi Exp $
+
+#ifndef LinuxElfDefault
+# define LinuxElfDefault YES
+#endif
+
+#ifndef UseElfFormat
+# define UseElfFormat LinuxElfDefault
+#endif
+
+#ifndef OSBinaryType
+# if UseElfFormat
+# define OSBinaryType [ELF]
+# else
+# ifdef AlphaArchitecture
+# define OSBinaryType [ECOFF]
+# else
+# define OSBinaryType [a.out]
+# endif
+# endif
+#endif
+
+#ifndef OSName
+# define OSName DefaultOSName OSBinaryType
+#endif
+
+#ifndef OSVendor
+# define OSVendor /**/
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+
+#ifndef LinuxDistribution
+# define LinuxDistribution DefaultLinuxDistribution
+/*
+ Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
+ Currently only LinuxSuSE, LinuxRedHat and LinuxDebian will be figured out
+ automatically.
+ Valid values are (from the list at www.linux.org in Oct. '97):
+ LinuxUnknown (0)
+ LinuxSuSE (1)
+ LinuxCaldera (2)
+ LinuxCraftworks (3)
+ LinuxDebian (4)
+ LinuxInfoMagic (5)
+ LinuxKheops (6)
+ LinuxPro (7)
+ LinuxRedHat (8)
+ LinuxSlackware (9)
+ LinuxTurbo (10)
+ LinuxWare (11)
+ LinuxYggdrasil (12)
+*/
+#endif
+#ifndef LinuxDistName
+# define LinuxDistName DefaultLinuxDistName
+#endif
+#ifndef LinuxCLibMajorVersion
+# define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion
+#endif
+#ifndef LinuxCLibMinorVersion
+# define LinuxCLibMinorVersion DefaultLinuxCLibMinorVersion
+#endif
+#ifndef LinuxCLibTeenyVersion
+# define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion
+#endif
+
+#ifndef HasGhostScript
+# define HasGhostScript YES
+#endif
+#ifndef BuildPDFdocs
+# define BuildPDFdocs NO
+#endif
+
+#ifndef LinuxBinUtilsMajorVersion
+# define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion
+#endif
+
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+XCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
+XCOMM binutils: (LinuxBinUtilsMajorVersion)
+
+#if LinuxDistribution == LinuxDebian
+# if !defined(NothingOutsideProjectRoot) || !NothingOutsideProjectRoot
+# define SystemManDirectory /usr/share/man
+# endif
+# define HasPam YES
+/* un-comment this when it is un-broken */
+/* # define JoystickSupport YES */
+# if !defined(NothingOutsideProjectRoot) || !NothingOutsideProjectRoot
+# define XAppLoadDir EtcX11Directory/app-defaults
+# define XFileSearchPathDefault Concat4(EtcX11Directory/%L/%T/%N%C,%S:EtcX11Directory/%l/%T/%N%C,%S:EtcX11Directory/%T/%N%C,%S:EtcX11Directory/%L/%T/%N%S:EtcX11Directory/%l/%T/%N%S:EtcX11Directory/%T/%N%S):Concat4($(LIBDIR)/%L/%T/%N%C,%S:$(LIBDIR)/%l/%T/%N%C,%S:$(LIBDIR)/%T/%N%C,%S:$(LIBDIR)/%L/%T/%N%S:$(LIBDIR)/%l/%T/%N%S:$(LIBDIR)/%T/%N%S)
+/* the relative symlink created by this rule causes problems for us */
+# if defined(InstallAppDefFiles) && InstallAppDefFiles
+# define InstallAppDefaultsLong(file,class) @@\
+InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
+# else
+# define InstallAppDefaultsLong(file,class) @@\
+InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
+# endif /* InstallAppDefFiles */
+# endif /* !defined(NothingOutsideProjectRoot) || !NothingOutsideProjectRoot */
+# define SharedLibXdmGreet NO
+# define LinkGLToUsrInclude NO
+# define LinkGLToUsrLib NO
+# define SharedLibFont NO
+# define SharedLibGlu YES
+# define NormalLibGlu YES
+# define FSUseSyslog YES
+
+# define BuildLibGlxWithoutPIC NO
+
+# define DriverManSuffix 4x
+# define DriverManDir $(MANSOURCEPATH)4
+
+# define MiscManSuffix 7x
+# define MiscManDir $(MANSOURCEPATH)7
+
+/*
+ *
+ *
+# define DebianMaintainer YES
+ *
+ *
+ */
+
+# ifdef DebianMaintainer
+# ifndef XorgCustomVersion
+# define XorgCustomVersion "Debian"
+# endif
+# ifndef BuilderEMailAddr
+# define BuilderEMailAddr "debian-x@lists.debian.org"
+# endif
+# define XFree86Devel YES
+# define BuildAllSpecsDocs YES
+# define InstallXinitConfig YES
+# define InstallXdmConfig YES
+# define InstallFSConfig YES
+# define DebuggableLibraries YES
+# define ForceNormalLib YES
+# define BuildSpecsDocs YES
+# define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xv i18n xterm
+# define BuildRman NO
+# define BuildHtmlManPages NO
+
+/* we build-depend on libfreetype6-dev (FreeType 2.x) */
+# define BuildFreetype2Library NO
+# define HasFreetype2 YES
+/* m68k has no 2.4 kernel yet */
+# ifndef Mc68020Architecture
+# define HasLinuxInput YES
+# endif
+# define HasXdmAuth YES
+# define HasLatex YES
+/* at present, glide2 only works on i386 */
+# if defined(__linux__) && defined(i386Architecture)
+# define HasGlide2 YES
+# define Glide2IncDir /usr/include/glide
+# endif /* __linux__ && i386Architecture */
+/* at present, glide3 only works on alpha, amd64, i386 and ia64 */
+# if defined(__linux__) && (defined(i386Architecture) || \
+ defined(AlphaArchitecture) || defined(ia64Architecture) || \
+ defined(AMD64Architecture))
+# define HasGlide3 YES
+# define Glide3IncDir /usr/include/glide3
+# endif /* __linux__ && (i386Architecture || AlphaArchitecture || \
+ ia64Architecture || AMD64Architecture) */
+/* extended instruction set support */
+# ifdef i386Architecture
+# define HasX86Support YES
+# define HasMMXSupport YES
+# define Has3DNowSupport YES
+/* 2.4 is not yet the official (or predominant) kernel in unstable */
+# define HasSSESupport NO
+# endif /* i386Architecture */
+# endif /* DebianMaintainer */
+#endif /* LinuxDebian */
+
+#if LinuxDistribution == LinuxRedHat
+#define FSUseSyslog YES
+#endif
+
+#ifndef HasDevRandom
+# define HasDevRandom YES
+# ifndef RandomDeviceName
+# define RandomDeviceName /dev/urandom
+# endif
+#endif
+
+/*
+ * The Linux BinUtils major version. 25 => 2.5.x, which is what is included
+ * with Slackware 3.0
+ *
+ * This remains for compatibility only.
+ *
+ */
+#ifndef BinUtilsMajorVersion
+# define BinUtilsMajorVersion LinuxBinUtilsMajorVersion
+#endif
+
+#if (LinuxCLibMajorVersion >= 6 || LinuxDistribution == LinuxSuSE)
+# define LinuxLocaleDefines /**/
+#else
+# define LinuxLocaleDefines -DX_LOCALE
+#endif
+
+#ifndef LinuxAdditionalIncludes
+# define LinuxAdditionalIncludes /**/
+#endif
+
+#ifndef LinuxGnuSourceDefines
+# ifdef UseInstalled
+# define LinuxGnuSourceDefines /**/
+# else
+# define LinuxGnuSourceDefines -D_GNU_SOURCE
+# endif
+#endif
+
+#if LinuxCLibMajorVersion >= 6
+# define LinuxSourceDefines -D_POSIX_C_SOURCE=199309L \
+ -D_POSIX_SOURCE -D_XOPEN_SOURCE \
+ -D_BSD_SOURCE -D_SVID_SOURCE \
+ -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 \
+ LinuxAdditionalIncludes LinuxGnuSourceDefines \
+ LinuxLocaleDefines
+# define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DNO_WIDEC_H
+# define HasPosixThreads YES
+# define ThreadedX YES
+# define HasThreadSafeAPI YES
+# define ThreadsLibraries -lpthread
+# define SystemMTDefines -D_REENTRANT
+# ifndef HasLibCrypt
+# define HasLibCrypt YES
+# endif
+/* netscape wraps select but not poll as of communicator 4.72 */
+# ifndef HasPoll
+# define HasPoll NO
+# endif
+#else
+# define LinuxSourceDefines -D_POSIX_SOURCE -D_POSIX_C_SOURCE=2 \
+ -D_BSD_SOURCE -D_SVID_SOURCE \
+ LinuxGnuSourceDefines LinuxLocaleDefines
+# define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+# ifndef HasLibCrypt
+# define HasLibCrypt NO
+# endif
+# ifndef HasBasename
+# define HasBasename NO
+# endif
+ /* Proliferation of C99isms makes -ansi unpalatable... */
+# if !defined(DefaultCCOptions) && !defined(UseInstalled) && HasGcc
+# define DefaultCCOptions GccWarningOptions
+# endif
+#endif
+
+#ifndef InstallXloadSetGID
+#define InstallXloadSetGID NO
+#endif
+
+/*
+ * XXX Check which versions of Linux really have IPv6. glibc 2.0 on
+ * Red Hat 5.2 doesn't.
+ */
+#if LinuxCLibMajorVersion < 6 || \
+ (LinuxCLibMajorVersion == 6 && LinuxCLibMinorVersion == 0)
+#define BuildIPv6 NO
+#endif
+
+/* <linux/input.h> support mainly for USB support */
+#ifndef HasLinuxInput
+# if defined(__linux__) && (OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 4))
+# define HasLinuxInput YES
+# else
+# define HasLinuxInput NO
+# endif
+#endif
+
+#ifndef JoystickSupport
+# define JoystickSupport NO /* joystick driver is broken */
+#endif
+
+/* <linux/joystick.h> appeared in 2.1.45 (officially) */
+#ifndef HasLinuxSupport
+# if defined(__linux__) && (JoystickSupport || \
+ (OSMajorVersion > 2) || \
+ ((OSMajorVersion == 2) && (OSMinorVersion > 1)) || \
+ ((OSMajorVersion == 2) && (OSMinorVersion == 1) && (OSTeenyVersion >= 45)))
+# define HasLinuxJoystick YES
+# else
+# define HasLinuxJoystick NO
+# endif
+#endif
+
+/* Libtool on linux always uses minor numbers */
+#define LibtoolMinorVersions YES
+
+/* On x86, determine whether to build with MTRR support */
+#ifndef HasMTRRSupport
+# if defined (i386Architecture) || defined (AMD64Architecture)
+# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || \
+ (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 99)
+# define HasMTRRSupport YES
+# else
+# define HasMTRRSupport NO
+# endif
+# else
+# define HasMTRRSupport NO /* no for non-ix86 */
+# endif
+#endif
+
+#ifndef XF86INT10_BUILD
+# if defined(__linux__) && defined(i386Architecture)
+# define XF86INT10_BUILD X86VM
+# elif defined(__linux__) && defined(AMD64Architecture)
+# define XF86INT10_BUILD X86EMU_OS
+# else
+# define XF86INT10_BUILD X86EMU_GENERIC
+# endif
+#endif
+
+/*
+ * Let the OS restore console fonts instead of the generic VGA
+ * layer. This exists for Linux only at the moment so put it
+ * here.
+ */
+#ifndef DoOSFontRestore
+# define DoOSFontRestore YES
+#endif
+
+/* Should we check the OS version to determine if the kernel supports it? */
+#if DoOSFontRestore
+# ifndef FontRestoreCheckOsVersion
+# define FontRestoreCheckOsVersion YES
+# endif
+#endif
+
+/* The DRM module requires kernel services that appeared in late 2.1.x
+ kernels and are known to be present in 2.2.x kernels. */
+#ifndef BuildXF86DRI
+# if defined(AlphaArchitecture)
+# define BuildXF86DRI YES
+# elif defined(Arm32Architecture)
+# define BuildXF86DRI NO
+# elif defined(HPArchitecture)
+# define BuildXF86DRI YES
+# elif defined(i386Architecture)
+# if (defined(__linux__) && (OSMajorVersion > 2 || (OSMajorVersion == 2 && \
+ OSMinorVersion >= 2))) || \
+ defined(__FreeBSD_kernel__)
+# define BuildXF86DRI YES
+# else
+# define BuildXF86DRI NO
+# endif
+# elif defined(ia64Architecture)
+# define BuildXF86DRI YES
+# elif defined(Mc68020Architecture)
+# define BuildXF86DRI NO
+# elif defined(MipsArchitecture)
+# define BuildXF86DRI NO
+# elif defined(PpcArchitecture)
+# define BuildXF86DRI YES
+# elif defined(Ppc64Architecture)
+# define BuildXF86DRI NO
+# elif defined(s390Architecture) || defined(s390xArchitecture)
+# define BuildXF86DRI NO
+# elif defined(SparcArchitecture)
+# define BuildXF86DRI YES
+# elif defined(SuperHArchitecture)
+# define BuildXF86DRI NO
+# elif defined(AMD64Architecture)
+# define BuildXF86DRI YES
+# else
+# define BuildXF86DRI NO
+# endif
+#endif
+
+/*
+ * Build shared libGL and the DRI modules without -fPIC on some architectures.
+ * This improves performance.
+ */
+#ifndef BuildLibGlxWithoutPIC
+# if BuildXF86DRI
+# if defined(i386Architecture)
+# define BuildLibGlxWithoutPIC YES
+# endif
+# endif
+#endif
+
+#ifndef HasAgpGart
+# if defined(i386Architecture) || defined(ia64Architecture) || defined(AMD64Architecture)
+ /* The AGPGART header file is included in os-support/linux, which
+ allows all drivers that depend on AGP to build properly. */
+# define HasAgpGart YES
+# else
+# define HasAgpGart NO
+# endif
+#endif
+
+/*
+ * Support for Intel's SSE Native Instructions, also known as the
+ * Streaming SIMD Extensions, was introduced in the 2.4.x kernels.
+ */
+#ifndef HasSSESupport
+# if defined(i386Architecture)
+# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 4)
+# define HasSSESupport YES
+# else
+# define HasSSESupport NO
+# endif
+# else
+# define HasSSESupport NO
+# endif
+#endif
+
+/*
+ * Support for MMX isn't present in the Assembler used in Red Hat 4.2, so
+ * don't enable it for libc5 as a reasonable default.
+ */
+#ifndef HasMMXSupport
+# if defined(i386Architecture)
+# if (LinuxCLibMajorVersion > 5)
+# define HasMMXSupport YES
+# else
+# define HasMMXSupport NO
+# endif
+# else
+# define HasMMXSupport NO
+# endif
+#endif
+
+/*
+ * Support for 3DNow isn't present in the Assembler used in Red Hat 4.2, so
+ * don't enable it for libc5 as a reasonable default.
+ *
+ * XXX This is preliminary.
+ */
+#ifndef Has3DNowSupport
+# if defined(i386Architecture)
+# if (LinuxCLibMajorVersion > 5)
+# define Has3DNowSupport YES
+# else
+# define Has3DNowSupport NO
+# endif
+# else
+# define Has3DNowSupport NO
+# endif
+#endif
+
+/*
+ * The Rush extension support.
+ */
+#ifndef BuildXF86RushExt
+# define BuildXF86RushExt YES
+#endif
+
+#if defined(__linux__) && !defined(LinuxFBDevSupport)
+# define LinuxFBDevSupport YES
+#endif
+
+/* For compatibility */
+#define SourceDefines LinuxSourceDefines
+
+#define BuildLibPathVar LD_LIBRARY_PATH
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#if UseElfFormat
+# ifndef HasDlopen
+# define HasDlopen YES
+# endif
+#endif
+#define HasWeakSymbols UseElfFormat
+#ifndef HasShadowPasswd
+# if UseElfFormat
+# define HasShadowPasswd YES
+# else
+# define HasShadowPasswd NO
+# endif
+#endif
+#define HasPutenv YES
+#ifndef HasShm
+# define HasShm YES
+#endif
+
+/* Use SecureRPC (used for SUN-DES-1 auth. and other goodies) when
+ * glibc has support for it */
+#ifndef HasSecureRPC
+# if !(LinuxCLibMajorVersion < 6 || \
+ (LinuxCLibMajorVersion == 6 && LinuxCLibMinorVersion < 3))
+# define HasSecureRPC YES
+# endif
+#endif
+
+#define HasSockets YES
+#if UseElfFormat || defined(AlphaArchitecture)
+#ifndef HasSnprintf
+#define HasSnprintf YES
+#endif
+#define HasMkstemp YES
+#endif
+/* getresuid() appeared in 2.1.4, and getresgid in 2.1.44 */
+#if !defined(HasGetresuid) && \
+ (((OSMajorVersion*100000) + (OSMinorVersion*1000) + OSTeenyVersion) >= 201044)
+#define HasGetresuid YES
+#endif
+#if OSMajorVersion >= 2
+#define HasUsableFileMmap YES
+#endif
+#ifndef HasNCurses
+#define HasNCurses YES
+#endif
+
+#ifndef HasGroff
+#define HasGroff YES
+#endif
+
+#ifndef HasZlib
+#define HasZlib YES
+#endif
+
+#ifndef HasLibpng
+#define HasLibpng YES
+#endif
+
+#ifndef HasExpat
+# define HasExpat YES
+#endif
+
+#ifndef HasFreetype2
+# define HasFreetype2 YES
+#endif
+
+#define AvoidNullMakeCommand YES
+#ifndef DebuggableLibraries
+#define DebuggableLibraries NO
+#endif
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull YES
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#ifndef NeedWidePrototypes
+#define NeedWidePrototypes NO
+#endif
+#define SetTtyGroup YES
+
+#ifndef UseStaticTermcapLib
+#define UseStaticTermcapLib NO
+#endif
+
+#ifndef HasCookieMaker
+#define HasCookieMaker YES
+#define MkCookieCmd mcookie
+#endif
+
+#ifndef BourneShell
+/*
+ * This will cause builds/installs to terminate on errors, as on other
+ * platforms.
+ */
+#define BourneShell /bin/sh -e
+#endif
+
+#define MkdirHierCmd mkdir -p
+
+#ifndef HaveLib64
+# if defined (AMD64Architecture) || defined (s390xArchitecture) || defined (Ppc64Architecture)
+# define HaveLib64 YES
+# else
+# define HaveLib64 NO
+# endif
+#endif
+
+#if UseElfFormat
+# ifndef DoLoadableServer
+# if defined(MipsArchitecture) || defined(SuperHArchitecture)
+# define DoLoadableServer NO
+# else
+# define DoLoadableServer YES
+# endif
+# endif
+#endif
+
+
+#if LinuxElfDefault
+# if UseElfFormat
+# ifdef MipsArchitecture
+# ifndef AsCmd
+# define AsCmd gcc -c -x assembler-with-cpp
+# endif
+# ifndef MakeDllModules
+# define MakeDllModules YES
+# endif
+# endif /* MipsArchitecure */
+# if defined (i386Architecture) && ((GccMajorVersion >3) \
+ || ((GccMajorVersion == 3) && (GccMinorVersion >= 1)))
+# ifndef CcCmd
+# define CcCmd gcc -m32
+# endif
+# ifndef CplusplusCmd
+# define CplusplusCmd c++ -m32
+# endif
+# endif
+# if defined (Ppc64Architecture)
+# ifndef CcCmd
+# define CcCmd gcc -m64
+# endif
+# ifndef CplusplusCmd
+# define CplusplusCmd c++ -m64
+# endif
+# endif
+# ifndef CcCmd
+# define CcCmd gcc
+# define CplusplusCmd c++
+# endif
+# ifndef AsCmd
+# define AsCmd CcCmd -c -x assembler
+# endif
+# define AsmDefines -D__ELF__
+# ifndef LdCmd
+# define LdCmd CcCmd -nostdlib
+# endif
+# ifndef LinuxUsesNcurses
+# if LinuxCLibMajorVersion >= 6 || (LinuxDistribution == LinuxSuSE)
+# define LinuxUsesNcurses YES
+# else
+# define LinuxUsesNcurses NO
+# endif
+# endif
+# ifndef TermcapLibrary
+# if UseStaticTermcapLib
+# if LinuxUsesNcurses
+# if !HaveLib64
+# define TermcapLibrary StaticLibrary(/usr/lib,ncurses)
+# else
+# define TermcapLibrary StaticLibrary(/usr/lib64,ncurses)
+# endif
+# else
+# if !HaveLib64
+# define TermcapLibrary StaticLibrary(/usr/lib/termcap,termcap)
+# else
+# define TermcapLibrary StaticLibrary(/usr/lib64/termcap,termcap)
+# endif
+# endif
+# else
+# if LinuxUsesNcurses
+# define TermcapLibrary -lncurses
+# else
+# define TermcapLibrary -ltermcap
+# endif
+# endif
+# endif
+# else /* UseElfFormat */
+# ifdef AlphaArchitecture
+# define CcCmd gcc -b alpha-linuxecoff
+# define CplusplusCmd g++ -b alpha-linuxecoff
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib -Wl,"-m alpha"
+# define AsmDefines -DUSE_GAS -U__ELF__
+# endif /* AlphaArchitecture */
+# ifdef HPArchitecture
+# define CcCmd gcc
+# define CplusplusCmd g++
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib
+# define AsmDefines -DUSE_GAS -U__ELF__
+# endif /* HPArchitecture */
+# ifdef i386Architecture
+# define CcCmd gcc -b i486-linuxaout
+# define CplusplusCmd g++ -b i486-linuxaout
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib -Wl,"-m i386linux"
+# define AsmDefines -DUSE_GAS -U__ELF__
+# endif /* i386Architecture */
+# ifdef ia64Architecture
+# define CcCmd gcc
+# define CplusplusCmd g++
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib
+# define AsmDefines -DUSE_GAS -U__ELF__
+# endif /* ia64Architecture */
+# ifdef Mc68020Architecture
+# define CcCmd gcc -b m68k-linuxaout
+# define CplusplusCmd g++ -b m68k-linuxaout
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib -Wl,"-m m68klinux"
+# define AsmDefines -DUSE_GAS -U__ELF__
+# endif /* Mc68020Architecture */
+# ifdef AMD64Architecture
+# define CcCmd gcc
+# define CplusplusCmd g++
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib
+# define AsmDefines -DUSE_GAS -U__ELF__
+# endif /* AMD64Architecture */
+# endif /* UseElfFormat */
+#else
+# if UseElfFormat
+# ifdef AlphaArchitecture
+# define CcCmd gcc -b alpha-linux
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib -Wl,"-m elf64alpha"
+# define AsmDefines -D__ELF__
+# define CplusplusCmd c++ -b alpha-linux
+# endif /* AlphaArchitecture */
+# ifdef HPArchitecture
+# define CcCmd gcc
+# define CplusplusCmd g++
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib
+# define AsmDefines -D__ELF__
+# define SharedLibXau YES
+# endif /* HPArchitecture */
+# ifdef i386Architecture
+# define CcCmd gcc -b i486-linux
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nosdlib -Wl,"-m elf_i386"
+# define AsmDefines -D__ELF__
+# define CplusplusCmd c++ -b i486-linux
+# endif /* i386Architecture */
+# ifdef ia64Architecture
+# define CcCmd gcc
+# define CplusplusCmd g++
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib
+# define AsmDefines -D__ELF__
+# endif /* ia64Architecture */
+# ifdef Mc68020Architecture
+# define CcCmd gcc -b m68k-linux
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib -W,l"-m m68kelf"
+# define AsmDefines -D__ELF__
+# define CplusplusCmd c++ -b m68k-linux
+# endif /* Mc68020Architecture */
+# ifdef AMD64Architecture
+# define CcCmd gcc
+# define CplusplusCmd g++
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib
+# define AsmDefines -D__ELF__
+# endif /* AMD64Architecture */
+# else
+# define CcCmd gcc
+# define AsCmd CcCmd -c -x assembler
+# define LdCmd CcCmd -nostdlib
+# define AsmDefines -DUSE_GAS
+# endif
+#endif
+
+/*
+ * Some older distros still need /lib/cpp. There's probably a better
+ * test, but this handles the older Red Hat releases at least.
+ */
+#ifndef CppCmd
+# if (LinuxDistribution == LinuxRedHat) && \
+ ((LinuxCLibMajorVersion < 6) || \
+ (LinuxCLibMajorVersion == 6 && LinuxCLibMinorVersion < 1))
+# define CppCmd /lib/cpp
+# else
+# define CppCmd cpp
+# endif
+#endif
+
+/* Some Linux distributions have yacc, some don't. All have bison. */
+#define YaccCmd bison -y
+#define LexCmd flex -l
+#define HasFlex YES
+#define LexLib -lfl
+#define PreProcessCmd CcCmd -E
+#define PostIncDir DefaultGccIncludeDir
+#define LdCombineFlags -r
+#ifndef LdPostLib
+# define LdPostLib /* Never needed */
+#endif
+#define HasWChar32 YES
+#define StandardCppOptions -traditional
+#define StandardCppDefines StandardDefines
+
+#define HasVarRun YES
+#ifndef VarDbDirectory
+# define VarDbDirectory $(VARDIR)/lib
+#endif
+
+#ifndef XF86OSCardDrivers
+# ifdef __linux__
+# define XF86OSCardDrivers fbdev v4l sisusb
+# else
+# define XF86OSCardDrivers /**/
+# endif
+#endif
+
+#ifndef OSXInputDrivers
+# if HasLinuxJoystick
+# define OSXInputDrivers1 ur98
+# else
+# define OSXInputDrivers1 /**/
+# endif
+# if HasLinuxInput
+# define OSXInputDrivers2 aiptek evdev
+# else
+# define OSXInputDrivers2 /**/
+# endif
+# define OSXInputDrivers OSXInputDrivers1 OSXInputDrivers2
+#endif
+
+#if UseElfFormat
+# define HasPlugin YES
+# define VendorHasX11R6_3libXext YES /* XC or XFree86 >= 3.3.1 */
+#endif
+
+#ifdef AlphaArchitecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2AxpOpt
+# endif
+# define LinuxMachineDefines -D__alpha__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 -DJENSEN_SUPPORT
+# ifdef UseCompaqMathLibrary
+# define MathLibrary -lcpml -lm
+# endif
+#endif /* AlphaArchitecture */
+
+#ifdef Arm32Architecture
+# define DefaultCCOptions
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O3
+# endif
+# define LinuxMachineDefines -D__arm__ -D__arm32__ -U__arm -Uarm
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#endif /* Arm32Achitecture */
+
+#ifdef HPArchitecture
+# define OptimizedCDebugFlags -O2 GccAliasingArgs
+# define LinuxMachineDefines -D__hppa__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#endif
+
+#ifdef i386Architecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# endif
+# define LinuxMachineDefines -D__i386__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#endif /* i386Architecture */
+
+#ifdef ia64Architecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 GccAliasingArgs
+# endif
+# define LinuxMachineDefines -D__ia64__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
+#endif /* ia64Architecture */
+
+#ifdef Mc68020Architecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 GccAliasingArgs
+# endif
+# define LinuxMachineDefines -D__mc68000__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#endif /* Mc68020Architecture */
+
+#ifdef MipsArchitecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2MipsOpt
+# endif
+# define LinuxMachineDefines -D__mips__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#endif
+
+#ifdef Ppc64Architecture
+# define DefaultCCOptions -mminimal-toc
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2Ppc64Opt
+# endif
+# define LinuxMachineDefines -D__powerpc64__ -D__powerpc__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
+#endif /* Ppc64Architecture */
+
+#ifdef PpcArchitecture
+# define DefaultCCOptions
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2PpcOpt
+# endif
+# define LinuxMachineDefines -D__powerpc__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#endif /* PpcArchitecture */
+
+#ifdef s390Architecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 -fomit-frame-pointer GccAliasingArgs
+# endif
+# define LinuxMachineDefines -D__s390__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#endif /* s390Architecture */
+
+#ifdef s390xArchitecture
+/*#define DefaultCCOptions -fsigned-char */
+#define OptimizedCDebugFlags -O3 -fomit-frame-pointer
+#define LinuxMachineDefines -D__s390x__
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
+#endif /* s390xArchitecture */
+
+#ifdef SparcArchitecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 GccAliasingArgs
+# endif
+# define LinuxMachineDefines -D__sparc__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+# define AsVISOption -Av9a
+# ifdef Sparc64Architecture
+# define AsOutputArchSize 64
+# else
+# define AsOutputArchSize 32
+# endif
+#endif
+
+#ifdef SuperHArchitecture
+# ifndef SuperHArchOptFlags
+# ifdef SuperH4Architecture
+# define SuperHArchOptFlags -m4
+# elif defined(SuperH4NOFPUArchitecture)
+# define SuperHArchOptFlags -m4-nofpu
+# else
+# define SuperHArchOptFlags -m3
+# endif
+# endif
+# ifndef SuperHebArchitecture
+# ifdef SuperHebArchitecture
+# define SuperHEndianFlags -mb
+# else
+# define SuperHEndianFlags -ml
+# endif
+# endif
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 SuperHArchOptFlags SuperHEndianFlags GccAliasingArgs
+# endif
+# define LinuxMachineDefines -D__sh__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+# ifndef DoLoadableServer
+# define DoLoadableServer NO
+# endif
+#endif
+
+#ifdef AMD64Architecture
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags DefaultGcc2AMD64Opt
+# endif
+# define LinuxMachineDefines -D__amd64__
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
+#endif /* AMD64Architecture */
+
+#ifndef StandardDefines
+# ifdef __linux__
+# define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
+# else
+# define StandardDefines LinuxMachineDefines LinuxSourceDefines
+# endif
+#endif
+
+#if UseElfFormat
+# define DlLibrary -rdynamic -ldl
+#else
+# define DlLibrary /**/
+#endif
+
+#define ServerExtraSysLibs /**/
+
+#ifndef PamLibraries
+#define PamLibraries -lpam DlLibrary
+#endif
+
+#ifndef PamMiscLibraries
+#define PamMiscLibraries -lpam_misc
+#endif
+
+#ifndef HasDECnet
+#define HasDECnet NO
+#endif
+#if HasDECnet
+# define ConnectionFlags -DUNIXCONN -DTCPCONN -DDNETCONN
+# define ExtraLibraries -ldnet
+#else
+# define ConnectionFlags -DUNIXCONN -DTCPCONN
+#endif
+
+/* Some of these man page defaults are overriden in the above OS sections */
+#ifndef ManSuffix
+# define ManSuffix 1x
+#endif
+#ifndef ManDir
+# define ManDir $(MANSOURCEPATH)1
+#endif
+#ifndef LibManSuffix
+# define LibManSuffix 3x
+#endif
+#ifndef LibmanDir
+# define LibmanDir $(MANSOURCEPATH)3
+#endif
+#ifndef FileManSuffix
+# define FileManSuffix 5x
+#endif
+#ifndef FileManDir
+# define FileManDir $(MANSOURCEPATH)5
+#endif
+
+#ifndef StaticLibrary
+# define StaticLibrary(libpath,libname) -Wl,-Bstatic Concat(-L,libpath) Concat(-l,libname) -Wl,-Bdynamic
+#endif
+
+#ifndef LinkGLToUsrLib
+# define LinkGLToUsrLib YES
+#endif
+# ifndef LinkGLToUsrInclude
+# define LinkGLToUsrInclude YES
+#endif
+
+
+#define HasGnuMake YES
+
+#define MakeNamedTargetSubdir(dir,flags,subname)\
+ $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname
+
+#define ArchitectureDefines -DLINUX_ARCHITECTURE
+
+#define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
+#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
+
+#if HaveLib64
+# ifndef LibDirName
+# define LibDirName lib64
+# endif
+# ifndef SystemUsrLibDir
+# define SystemUsrLibDir /usr/lib64
+# endif
+# ifndef TkLibDir
+# define TkLibDir /usr/lib64
+# endif
+#endif
+
+#ifndef BuildDmx
+#define BuildDmx YES
+#endif
+
+#include <lnxLib.rules>
+# include <xorg.cf>
+
+#ifndef XFree86ServerOSDefines
+# define XFree86ServerOSDefines
+#endif
diff --git a/nx-X11/config/cf/lnxLib.rules b/nx-X11/config/cf/lnxLib.rules
new file mode 100644
index 000000000..0cc71d325
--- /dev/null
+++ b/nx-X11/config/cf/lnxLib.rules
@@ -0,0 +1,680 @@
+XCOMM $Xorg: lnxLib.rules,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+XCOMM $XFree86: xc/config/cf/lnxLib.rules,v 3.52 2003/10/31 20:49:03 herrb Exp $
+
+/*
+ * Linux shared library rules (DLL & ELF versions)
+ */
+#ifndef HasSharedLibraries
+# define HasSharedLibraries YES
+#endif
+#ifndef ForceNormalLib
+# define ForceNormalLib NO
+#endif
+
+#ifndef UseRpath
+#define UseRpath NO
+#endif
+
+#ifndef SharedOldX
+# define SharedOldX NO
+#endif
+
+#if UseElfFormat
+
+# if (LinuxCLibMajorVersion >= 5 && LinuxCLibMinorVersion >= 4) || LinuxCLibMajorVersion >= 6
+# ifndef SpecialMalloc
+# define SpecialMalloc NO
+# endif
+#if 0
+# ifndef UseInternalMalloc
+# define UseInternalMalloc NO
+# endif
+#endif
+# endif
+
+# if LinuxCLibMajorVersion <= 5
+/*
+ * #define BaseShLibReqs -lc
+ *
+ * I don't want to use this since the normal ELF executables should
+ * be linked with libc.so. If it is not, i.e., static, the variables in
+ * libc.so which is loaded in because of the other shared libraries
+ * may have different values than the ones in the static ELF
+ * executables. That happens if the binaries are linked with libg.a
+ * or libc_p.a.
+ *
+ * If an ELF executable linked with libg.a or libc_p.a loads a shared
+ * object which needs libc.so via dlopen (), I think it should fail.
+ * It is a very bad idea. The moral story is DON'T USE dlopen () IN
+ * ELF EXECUTABLES LINKED WITH libg.a OR libc_p.a. H.J.
+ *
+ */
+# define BaseShLibReqs
+# else
+/* With GNU libc 2 this works fine. */
+# define BaseShLibReqs -lc
+# endif
+
+# ifndef SharedDataSeparation
+# define SharedDataSeparation NO
+# endif
+# ifndef SharedCodeDef
+# define SharedCodeDef /**/
+# endif
+# ifndef SharedLibraryDef
+# define SharedLibraryDef /**/
+# endif
+# ifndef ShLibIncludeFile
+# define ShLibIncludeFile <lnxLib.tmpl>
+# endif
+#ifndef RpathLoadFlags
+#if UseRpath
+#define RpathLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
+#else
+#define RpathLoadFlags /**/
+#endif
+#endif
+#ifndef LibraryRpathLoadFlags
+#define LibraryRpathLoadFlags RpathLoadFlags
+#endif
+# ifndef SharedLibraryLoadFlags
+# define SharedLibraryLoadFlags -shared
+# endif
+# ifndef PositionIndependentCFlags
+# define PositionIndependentCFlags -fPIC
+# endif
+# ifndef PositionIndependentCplusplusFlags
+# define PositionIndependentCplusplusFlags -fPIC
+# endif
+# ifndef ExtraLoadFlags
+# if LinuxBinUtilsMajorVersion >= 26
+# ifdef UseInstalled
+# if LinuxBinUtilsMajorVersion < 27
+# define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(USRLIBDIRPATH)
+# endif
+# else
+# define ExtraLoadFlags RpathLoadFlags -Wl,-rpath-link,$(BUILDLIBDIR)
+# endif
+# else
+# define ExtraLoadFlags RpathLoadFlags
+# endif
+# endif
+# ifndef HardCodeLibdirFlag
+# define HardCodeLibdirFlag RpathLoadFlags
+# endif
+# if !defined(ShlibGlobalsFlags)
+# define ShlibGlobalsFlags -Wl,-Bsymbolic
+# endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ * NOTE: file must be executable, hence "INSTBINFLAGS"
+ */
+# ifndef InstallSharedLibrary
+# define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`;\
+ set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\
+ @if $(SOSYMLINK); then (set -x; \
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\
+ $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi
+# endif /* InstallSharedLibrary */
+
+# ifndef InstallSharedLibtoolLibrary
+
+# define SetRevisions(rev) V=`expr rev : '\([^:]*\)'`; \ @@\
+ R=`expr rev : '.*:\([^:]*\):'`; \ @@\
+ A=`expr rev : '.*:\([^:]*\)'`; \ @@\
+ MAJ=`expr $$V - $$A`; \ @@\
+ MIN=$$A.$$R
+
+# define InstallSharedLibtoolLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @set +e; SetRevisions(rev); \ @@\
+ set -xe; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.$$MAJ.$$MIN) $(DESTDIR)dest; \ @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so.$$MAJ); \ @@\
+ $(LN) Concat(lib,libname.so.$$MAJ.$$MIN) Concat($(DESTDIR)dest/lib,libname.so.$$MAJ); \ @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\
+ $(LN) Concat(lib,libname.so.$$MAJ.$$MIN) Concat($(DESTDIR)dest/lib,libname.so)
+# endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+# ifndef InstallSharedLibraryData
+# define InstallSharedLibraryData(libname,rev,dest)
+# endif /* InstallSharedLibraryData */
+
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+# ifndef SharedLibraryTarget
+# define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; (set -x; \ @@\
+ cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs) || exit 1; \ @@\
+ (set -x; $(RM) $$SONAME; $(LN) $@ $$SONAME); \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+# endif /* SharedLibraryTarget */
+
+
+# ifndef SharedLibtoolLibraryTarget
+# define SharedLibtoolLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so)) @@\
+ @@\
+Concat(lib,libname.so): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @set +e; SetRevisions(rev); set -e; \ @@\
+ SONAME=$@.$$MAJ; \ @@\
+ (set -x; \ @@\
+ $(RM) $@.$$MAJ.$$MIN~; \ @@\
+ cd down; $(CC) -o up/$@.$$MAJ.$$MIN~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs) || exit 1; \ @@\
+ (set -x; \ @@\
+ $(RM) $$SONAME; $(LN) $@.$$MAJ.$$MIN $$SONAME); \ @@\
+ LinkBuildSonameLibrary($$SONAME); \ @@\
+ (set -x; \ @@\
+ $(RM) $@.$$MAJ.$$MIN; \ @@\
+ $(MV) $@.$$MAJ.$$MIN~ $@.$$MAJ.$$MIN; \ @@\
+ $(RM) $@; \ @@\
+ $(LN) $@.$$MAJ.$$MIN $@); \ @@\
+ LinkBuildLibraryInline($@.$$MAJ.$$MIN); \ @@\
+ LinkBuildLibraryInline($@) @@\
+ @@\
+clean:: @@\
+ @set +e; SetRevisions(rev); \ @@\
+ set -xe; \ @@\
+ $(RM) Concat(lib,libname.so.$$MAJ); \ @@\
+ $(RM) Concat(lib,libname.so.$$MAJ.$$MIN) @@\
+ $(RM) Concat(lib,libname.so)
+
+# endif /* SharedLibtoolLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+# ifndef SharedDepLibraryTarget
+# define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\
+ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedDepCplusplusLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepCplusplusLibraryTarget
+#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; set -x; \ @@\
+ (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\([0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedDepCplusplusLibraryTarget */
+
+# ifndef SharedDepModuleTarget
+# define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ @@\
+ $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name
+
+# endif /* SharedDepModuleTarget */
+
+# ifndef SharedDriModuleTarget
+# define SharedDriModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ $@.map @@\
+ @(echo 'DRI_MODULE { global: __dri*; local: *; };' > $@.map) @@\
+ $(CC) -o $@~ -Wl,--version-script=$@.map $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ $(RM) $@ $@.map @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name @@\
+ $(RM) name.map
+
+# endif /* SharedDriModuleTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+# ifndef SharedLibraryDataTarget
+# define SharedLibraryDataTarget(libname,rev,salist)
+# endif /* SharedLibraryTarget */
+
+#else /* UseElfFormat */
+
+# ifndef SharedDataSeparation
+# define SharedDataSeparation NO
+# endif
+# ifndef SharedCodeDef
+# define SharedCodeDef /**/
+# endif
+# ifndef SharedLibraryDef
+# define SharedLibraryDef /**/
+# endif
+# ifndef ShLibIncludeFile
+# define ShLibIncludeFile <lnxLib.tmpl>
+# endif
+# ifndef SharedLibraryLoadFlags
+# define SharedLibraryLoadFlags /**/
+# endif
+# ifndef PositionIndependentCFlags
+# define PositionIndependentCFlags -B/usr/bin/jump
+# endif
+
+/*
+ * These definitions are now extended to work with the X sources and
+ * external sources wishing to build shared libs.
+ *
+ * A library can create it's own shlibs (.so) or can be incorporated into
+ * another "host" lib. All libraries generate stub (.sa) files.
+ * A "host" lib does all the work to generate the stubs for itself and its
+ * "guests", invoking the "guest" Makefiles to create the objects for
+ * inclusion into the "host" shlib. A "guest" lib will ask the "host" to
+ * create the stubfiles, then copy its own into its directory.
+ * Most external libs are "host" libs; the concept of "guest" is a holdover
+ * from older libs during the days of scarce shared library address space.
+ *
+ * To create a simple "host" shared lib, Xfoo, define:
+ *
+ * JUMP_ROOT_Xfoo = <source directory>
+ * JUMP_IS_HOST_Xfoo = YES
+ * JUMP_STUBLIBS_Xfoo = libXfoo.sa
+ * JUMP_DIR_Xfoo = $(JUMP_ROOT_Xfoo)/shared <work directory>
+ * JUMP_DEFS_Xfoo = -DFOO <defs for jump files>
+ * JUMP_VARS_Xfoo = $(JUMP_ROOT_Xfoo)/jump_vars <see DLL docs>
+ * JUMP_FUNCS_Xfoo = $(JUMP_ROOT_Xfoo)/jump_funcs <see DLL docs>
+ * JUMP_IGNORE_Xfoo = $(JUMP_ROOT_Xfoo)/jump_ignore <see DLL docs>
+ * JUMP_EXPORT_Xfoo = $(JUMP_DIR_Xfoo)/jump.vars <exported symbols>
+ * JUMP_IMPORT_Xfoo = $(JUMP_EXPORT_Xbar) <imported symbols>
+ * JUMP_ADDRESS_Xfoo = 0xXXXXXXXX <fill in with address>
+ * JUMP_JUMPTABLESIZE_Xfoo = 0x4000 <adjust if necessary>
+ * JUMP_GOTSIZE_Xfoo = 4096 <adjust if necessary>
+ * JUMP_STUBNAMES_Xfoo = libXfoo <and others>
+ * JUMP_STUBS_IMPORT_Xfoo = /usr/lib/libc.sa <and others>
+ * JUMP_LDLIBS_Xfoo = `$(CC) --print-libgcc-file-name` -lc <and others>
+ *
+ * To create a complex "host", you need to add
+ * JUMP_SIBARS_Xt = jump/libXbar.a~ <and others>
+ * These are the archives of the shared objects of the "guest" libs. They
+ * need to be added to the JUMP_LDLIBS_Xfoo lines.
+ *
+ * For further clarification, study the definitions of libXaw, a simple "host"
+ * lib, libXt, a complex "host" lib, and libXmu, one of libXts "guests".
+ *
+ * As a hint of how to start (with the DLL docs), touch jump_vars, jump_funcs
+ * and jump_ignore, then compile. Then massage the jump.vars and jump.funcs
+ * files in the shared subdirectory into jump_xxx files.
+ */
+
+# ifndef UseInstalled
+XCOMM These are only needed to build the server
+
+# if LinuxElfDefault
+LIBC_SA = /usr/i486-linuxaout/lib/libc.sa
+LIBM_SA = /usr/i486-linuxaout/lib/libm.sa
+# else
+LIBC_SA = /usr/lib/libc.sa
+LIBM_SA = /usr/lib/libm.sa
+# endif
+
+JUMP_LDLIBS_libc = `$(CC) --print-libgcc-file-name` -lc
+
+XCOMM libX11.so (X11, SM, ICE)
+JUMP_ROOT_X11 = $(XLIBSRC)
+JUMP_IS_HOST_X11 = YES
+JUMP_STUBLIBS_X11 = libX11.sa libSM.sa libICE.sa
+JUMP_SIBDIRS_X11 = $(JUMP_ROOT_SM) $(JUMP_ROOT_ICE)
+JUMP_DIR_X11 = $(JUMP_ROOT_X11)/shared
+JUMP_DEFS_X11 = $(XDMAUTHDEFS) $(XKB_DEFINES)
+JUMP_VARS_X11 = $(JUMP_ROOT_X11)/jump_vars
+JUMP_FUNCS_X11 = $(JUMP_ROOT_X11)/jump_funcs
+JUMP_IGNORE_X11 = $(JUMP_ROOT_X11)/jump_ignore
+JUMP_EXPORT_X11 = $(JUMP_DIR_X11)/jump.vars
+JUMP_ADDRESS_X11 = 0x60200000
+JUMP_JUMPTABLESIZE_X11 = 0x4000
+JUMP_GOTSIZE_X11 = 4096
+JUMP_STUBNAMES_X11 = libX11 libSM libICE
+JUMP_STUBS_IMPORT_X11 = $(LIBC_SA)
+JUMP_SIBARS_X11 = jump/libSM.a~ jump/libICE.a~
+JUMP_LDLIBS_X11 = $(JUMP_SIBARS_X11) $(JUMP_LDLIBS_libc)
+
+XCOMM libSM (part of libX11.so)
+JUMP_ROOT_SM = $(SMSRC)
+JUMP_IS_HOST_SM = NO
+JUMP_HOST_SM = $(JUMP_ROOT_X11)
+JUMP_DIR_SM = $(JUMP_DIR_X11)
+
+XCOMM libICE (part of libX11.so)
+JUMP_ROOT_ICE = $(ICESRC)
+JUMP_IS_HOST_ICE = NO
+JUMP_HOST_ICE = $(JUMP_ROOT_X11)
+JUMP_DIR_ICE = $(JUMP_DIR_X11)
+
+XCOMM libXt.so (Xt, Xmu, Xext, Xi, Xtst, Xp)
+JUMP_ROOT_Xt = $(TOOLKITSRC)
+JUMP_IS_HOST_Xt = YES
+JUMP_STUBLIBS_Xt = libXt.sa libXmu.sa libXext.sa libXi.sa libXtst.sa libXp.sa
+JUMP_SUBDIRS_Xt = $(JUMP_ROOT_X11)
+JUMP_SIBDIRS_Xt = $(JUMP_ROOT_Xmu) $(JUMP_ROOT_Xext) \
+ $(JUMP_ROOT_Xi) $(JUMP_ROOT_Xtst) $(JUMP_ROOT_Xp)
+JUMP_DIR_Xt = $(JUMP_ROOT_Xt)/shared
+JUMP_VARS_Xt = $(JUMP_ROOT_Xt)/jump_vars
+JUMP_FUNCS_Xt = $(JUMP_ROOT_Xt)/jump_funcs
+JUMP_IGNORE_Xt = $(JUMP_ROOT_Xt)/jump_ignore
+JUMP_EXPORT_Xt = $(JUMP_DIR_Xt)/jump.vars
+JUMP_IMPORT_Xt = $(JUMP_EXPORT_X11)
+JUMP_ADDRESS_Xt = 0x602a0000
+JUMP_JUMPTABLESIZE_Xt = 0x4000
+JUMP_GOTSIZE_Xt = 4096
+JUMP_STUBNAMES_Xt = libXt libXmu libXext libXi libXtst libXp
+JUMP_STUBS_IMPORT_Xt = $(JUMP_STUBS_IMPORT_X11)
+JUMP_SIBARS_Xt = jump/libXmu.a~ jump/libXext.a~ jump/libXi.a~ jump/libXtst.a~ jump/libXp.a~
+JUMP_LDLIBS_Xt = $(JUMP_SIBARS_Xt) $(JUMP_ROOT_ICE)/libICE.sa \
+ $(JUMP_ROOT_SM)/libSM.sa $(JUMP_ROOT_X11)/libX11.sa $(JUMP_LDLIBS_libc)
+
+XCOMM libXmu (part of libXt.so)
+JUMP_ROOT_Xmu = $(XMUSRC)
+JUMP_IS_HOST_Xmu = NO
+JUMP_HOST_Xmu = $(JUMP_ROOT_Xt)
+JUMP_DIR_Xmu = $(JUMP_DIR_Xt)
+
+XCOMM libXext (part of libXt.so)
+JUMP_ROOT_Xext = $(XEXTLIBSRC)
+JUMP_IS_HOST_Xext = NO
+JUMP_HOST_Xext = $(JUMP_ROOT_Xt)
+JUMP_DIR_Xext = $(JUMP_DIR_Xt)
+
+XCOMM libXi (part of libXt.so)
+JUMP_ROOT_Xi = $(XILIBSRC)
+JUMP_IS_HOST_Xi = NO
+JUMP_HOST_Xi = $(JUMP_ROOT_Xt)
+JUMP_DIR_Xi = $(JUMP_DIR_Xt)
+
+XCOMM libXtst (part of libXt.so)
+JUMP_ROOT_Xtst = $(XTESTLIBSRC)
+JUMP_IS_HOST_Xtst = NO
+JUMP_HOST_Xtst = $(JUMP_ROOT_Xt)
+JUMP_DIR_Xtst = $(JUMP_DIR_Xt)
+
+XCOMM libXp (part of libXt.so)
+JUMP_ROOT_Xp = $(XPLIBSRC)
+JUMP_IS_HOST_Xp = NO
+JUMP_HOST_Xp = $(JUMP_ROOT_Xt)
+JUMP_DIR_Xp = $(JUMP_DIR_Xt)
+
+XCOMM libXaw.so (Xaw)
+JUMP_ROOT_Xaw = $(AWIDGETSRC)
+JUMP_IS_HOST_Xaw = YES
+JUMP_STUBLIBS_Xaw = libXaw.sa
+JUMP_SUBDIRS_Xaw = $(JUMP_ROOT_Xt)
+JUMP_DIR_Xaw = $(JUMP_ROOT_Xaw)/shared
+JUMP_VARS_Xaw = $(JUMP_ROOT_Xaw)/jump_vars
+JUMP_FUNCS_Xaw = $(JUMP_ROOT_Xaw)/jump_funcs
+JUMP_IGNORE_Xaw = $(JUMP_ROOT_Xaw)/jump_ignore
+JUMP_EXPORT_Xaw = $(JUMP_DIR_Xaw)/jump.vars
+JUMP_IMPORT_Xaw = $(JUMP_EXPORT_Xt) $(JUMP_EXPORT_X11)
+JUMP_ADDRESS_Xaw = 0x60300000
+JUMP_JUMPTABLESIZE_Xaw = 0x4000
+JUMP_GOTSIZE_Xaw = 4096
+JUMP_STUBNAMES_Xaw = libXaw
+JUMP_STUBS_IMPORT_Xaw = $(JUMP_STUBS_IMPORT_X11)
+JUMP_LDLIBS_Xaw = $(JUMP_ROOT_Xt)/libXt.sa $(JUMP_ROOT_Xt)/libXmu.sa \
+ $(JUMP_ROOT_Xt)/libXext.sa $(JUMP_ROOT_X11)/libX11.sa \
+ $(JUMP_LDLIBS_libc)
+
+# endif /* !UseInstalled */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shared data file
+ */
+# ifndef SharedLibraryDataTarget
+# define SharedLibraryDataTarget(libname,rev,salist)
+# endif
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * There are two basic flavors of libs: self-generating, which create
+ * their own (and possibly other) libs, and hosted, which rely on another
+ * lib for all the work.
+ */
+# ifndef SharedLibraryTarget
+# define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+XCOMM This logic is such to compile the libs in their proper order, @@\
+XCOMM remain dependent on subsidiary libs, and yet minimize local work @@\
+ @@\
+JUMP_DIR=./jump @@\
+JUMP_LIB=Concat(lib,libname) @@\
+ @@\
+XCOMM this is needed for newer gnumake versions @@\
+export JUMP_DIR JUMP_LIB @@\
+ @@\
+JUMP_IS_HOST=$(Concat(JUMP_IS_HOST_,libname)) @@\
+JUMP_AR=$(JUMP_DIR)/Concat(lib,libname.a~) @@\
+JUMP_SA=Concat(lib,libname.sa) @@\
+JUMP_SO=Concat(lib,libname.so.rev) @@\
+ @@\
+JUMP_HOST=$(Concat(JUMP_HOST_,libname)) @@\
+ @@\
+INSTSOLIBFLAGS=-m 0555 @@\
+ @@\
+AllTarget($(BUILDLIBDIR)/$(JUMP_SA)) @@\
+ @@\
+$(BUILDLIBDIR)/$(JUMP_SA): $(JUMP_SA) @@\
+ LinkBuildLibrary($(JUMP_SA)) @@\
+ @@\
+$(JUMP_SA) $(Concat(JUMP_STUBLIBS_,libname)) do_JUMP_SA: \
+ down/mk_JUMP_SA_$(JUMP_IS_HOST) @@\
+ @@\
+down/mk_JUMP_SA_0:: mk_JUMP_HOST @@\
+ @@\
+down/mk_JUMP_SA_0:: $(JUMP_HOST)/$(JUMP_SA) @@\
+ $(RM) $(JUMP_SA) @@\
+ $(LN) $(JUMP_HOST)/$(JUMP_SA) $(JUMP_SA) @@\
+ touch $@ @@\
+ @@\
+down/mk_JUMP_SA_1:: $(JUMP_SO) @@\
+ @@\
+down/mk_JUMP_SA_1:: down/mk_JUMP_SO_2 @@\
+ $(RM) $(Concat(JUMP_STUBLIBS_,libname)) @@\
+ mkstubs -v rev -l $(JUMP_LIB) \
+ -a $(Concat(JUMP_ADDRESS_,libname)) \
+ -j $(Concat(JUMP_JUMPTABLESIZE_,libname)) \
+ -g $(Concat(JUMP_GOTSIZE_,libname)) \
+ -- $(Concat(JUMP_STUBNAMES_,libname)) @@\
+ verify-shlib -l $(JUMP_SO) \
+ $(Concat(JUMP_STUBLIBS_,libname)) @@\
+ $(MV) verify.out $(JUMP_DIR) @@\
+ touch $@ @@\
+ @@\
+mk_JUMP_HOST: @@\
+ @echo checking stub library $(JUMP_SA) in $(JUMP_HOST)... @@\
+ @(cd $(JUMP_HOST); $(MAKE) $(MFLAGS) $(JUMP_SA)) || exit 1 @@\
+ @echo ok. continuing in $(Concat(JUMP_ROOT_,libname))... @@\
+ @@\
+$(JUMP_SO): down/mk_JUMP_SO_$(JUMP_IS_HOST) @@\
+ @@\
+down/mk_JUMP_SO_0: @@\
+ @@\
+down/mk_JUMP_SO_1:: $(JUMP_AR) mk_JUMP_SIBDIRS down/mk_JUMP_SO_2 @@\
+ @@\
+down/mk_JUMP_SO_2: down/mk_JUMP_AR $(Concat(JUMP_SIBARS_,libname)) @@\
+ $(RM) $(JUMP_SO) @@\
+ mkimage -f -v rev -l $(JUMP_LIB) \
+ -a $(Concat(JUMP_ADDRESS_,libname)) \
+ -j $(Concat(JUMP_JUMPTABLESIZE_,libname)) \
+ -g $(Concat(JUMP_GOTSIZE_,libname)) \
+ -- $(JUMP_AR) $(Concat(JUMP_LDLIBS_,libname)) @@\
+ $(RM) $(JUMP_DIR)/__jump.s $(JUMP_DIR)/__jump.o @@\
+ LinkBuildLibrary($(JUMP_SO)) @@\
+ touch $@ @@\
+ @@\
+mk_JUMP_SIBDIRS: @@\
+ @for d in $(Concat(JUMP_SIBDIRS_,libname)); do \
+ echo checking ar library in $$d...; \
+ (cd $$d ; $(MAKE) $(MFLAGS) fastdo_JUMP_AR) || exit 1; \
+ echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...;done@@\
+ @@\
+fastdo_JUMP_AR: $(JUMP_DIR) down/mk_JUMP_AR @@\
+ @@\
+$(JUMP_AR) do_JUMP_AR:: jumpsetup down/mk_JUMP_AR @@\
+ @@\
+jumpsetup: $(JUMP_DIR) jumpsetup_$(JUMP_IS_HOST) @@\
+ @@\
+$(JUMP_DIR): @@\
+ $(RM) jump @@\
+ LibMkdir($(Concat(JUMP_DIR_,libname))) @@\
+ $(LN) $(Concat(JUMP_DIR_,libname)) jump @@\
+ @@\
+jumpsetup_0: @@\
+ @echo doing jump setup in host $(JUMP_HOST)... @@\
+ @(cd $(JUMP_HOST); $(MAKE) $(MFLAGS) jumpsetup) || exit 1 @@\
+ @echo ok. continuing in $(Concat(JUMP_ROOT_,libname))... @@\
+ @@\
+jumpsetup_1:: @@\
+ @for d in $(Concat(JUMP_SUBDIRS_,libname)); do \
+ echo checking stub library in $$d...; \
+ (cd $$d ; $(MAKE) $(MFLAGS) do_JUMP_SA) || exit 1; \
+ echo ok. continuing in $(Concat(JUMP_ROOT_,libname))...;done@@\
+ @@\
+jumpsetup_1:: $(JUMP_DIR)/jump.funcs $(JUMP_DIR)/jump.vars \
+ $(JUMP_DIR)/jump.ignore $(JUMP_DIR)/jump.import @@\
+ @@\
+$(JUMP_DIR)/jump.funcs: $(Concat(JUMP_FUNCS_,libname)) @@\
+ $(RM) $(JUMP_DIR)/jump.funcs @@\
+ cat $(Concat(JUMP_FUNCS_,libname)) | \
+ $(CPP) $(ALLDEFINES) $(Concat(JUMP_DEFS_,libname)) > $@ @@\
+ @@\
+$(JUMP_DIR)/jump.vars: $(Concat(JUMP_VARS_,libname)) @@\
+ $(RM) $(JUMP_DIR)/jump.vars @@\
+ cat $(Concat(JUMP_VARS_,libname)) | \
+ $(CPP) $(ALLDEFINES) $(Concat(JUMP_DEFS_,libname)) > $@ @@\
+ @@\
+$(JUMP_DIR)/jump.ignore: $(Concat(JUMP_IGNORE_,libname)) @@\
+ $(RM) $(JUMP_DIR)/jump.ignore @@\
+ cat $(Concat(JUMP_IGNORE_,libname)) | \
+ $(CPP) $(ALLDEFINES) $(Concat(JUMP_DEFS_,libname)) > $@ @@\
+ @@\
+$(JUMP_DIR)/jump.import: $(JUMP_DIR)/stubs.import \
+ $(Concat(JUMP_IMPORT_,libname)) @@\
+ $(RM) $(JUMP_DIR)/jump.import @@\
+ cat $(JUMP_DIR)/stubs.import $(Concat(JUMP_IMPORT_,libname)) > $@ @@\
+ @@\
+$(JUMP_DIR)/stubs.import: $(Concat(JUMP_STUBS_IMPORT_,libname)) @@\
+ $(RM) $(JUMP_DIR)/stubs.import @@\
+ nm --no-cplus $(Concat(JUMP_STUBS_IMPORT_,libname)) | grep '__GOT__' | \
+ sed 's/__GOT__/_/' > $@ @@\
+ @@\
+down/mk_JUMP_AR: solist @@\
+ $(RM) $(JUMP_AR) @@\
+ @if [ -s $(JUMP_DIR)/jump.log ]; then \
+ echo "Error: Leftover globals for shared lib"; \
+ exit 1; fi @@\
+ (cd down; $(AR) up/$(JUMP_AR) solist) || exit 1 @@\
+ $(RANLIB) $(JUMP_AR) @@\
+ touch $@ @@\
+ @@\
+clean:: jumpclean @@\
+ @@\
+jumpclean: jumpclean_$(JUMP_IS_HOST) @@\
+ $(RM) $(JUMP_SA) down/mk_JUMP_AR @@\
+ $(RM) -r $(JUMP_DIR) @@\
+ @@\
+jumpclean_0: @@\
+ $(RM) down/mk_JUMP_SA_0 @@\
+ $(RM) $(JUMP_HOST)/$(JUMP_SA) @@\
+ @@\
+jumpclean_1: @@\
+ $(RM) -r $(JUMP_SO) $(Concat(JUMP_DIR_,libname)) \ @@\
+ down/mk_JUMP_SA_1 down/mk_JUMP_SO_1 down/mk_JUMP_SO_2
+# endif /* SharedLibraryTarget */
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+# ifndef InstallSharedLibrary
+# define InstallSharedLibrary(libname,rev,dest) @@\
+install:: $(JUMP_SA) $(JUMP_SO) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @if [ "$(JUMP_IS_HOST)" = YES ]; then \
+ (T=$(DESTDIR)dest/`echo $(JUMP_SO)|sed '/\(lib[^\.]*\.so\.[0-9]*\)\(\.[0-9]*\)\{1,2\}/\1/`;\
+ set -x; \
+ $(INSTALL) -s -c $(INSTSOLIBFLAGS) $(JUMP_SO) $(DESTDIR)dest; \
+ $(RM) $$T && $(LN) $(JUMP_SO) $$T); fi @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) $(JUMP_SA) $(DESTDIR)dest
+# endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+# ifndef InstallSharedLibraryData
+# define InstallSharedLibraryData(libname,rev,dest)
+# endif /* InstallSharedLibraryData */
+
+#endif /* UseElfFormat */
diff --git a/nx-X11/config/cf/lnxLib.tmpl b/nx-X11/config/cf/lnxLib.tmpl
new file mode 100644
index 000000000..f1eb5ac4b
--- /dev/null
+++ b/nx-X11/config/cf/lnxLib.tmpl
@@ -0,0 +1,86 @@
+XCOMM $Xorg: lnxLib.tmpl,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+XCOMM $XFree86: xc/config/cf/lnxLib.tmpl,v 3.19 2003/10/15 22:47:48 herrb Exp $
+
+/*
+ * Linux shared library template
+ */
+
+#if UseElfFormat
+
+#ifndef FixupLibReferences
+#define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef XawClientLibs
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+#define SharedX11Reqs
+#define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXmuuReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIB) $(XLIB)
+#define SharedXpReqs $(LDPRELIB) $(XLIB)
+#define SharedXpmReqs $(LDPRELIB) $(XLIB)
+#define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+#define SharedXtstReqs $(LDPRELIB) $(XLIB)
+#define SharedXvReqs $(LDPRELIB) $(XLIB)
+#define SharedSMReqs $(LDPRELIB) $(ICELIB)
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedFontencReqs $(LDPRELIB) GzipLibrary
+
+#if GlxUseBuiltInDRIDriver
+#define ExtraSharedGLReqs /**/
+#else
+#define ExtraSharedGLReqs -ldl
+#endif
+#define SharedGLReqs $(LDPRELIB) $(XLIB) ExtraSharedGLReqs
+#ifndef SharedGLUReqs
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#endif
+#define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIB)
+#define SharedpsresReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+
+#define SharedXResReqs $(LDPRELIB) $(XLIB)
+#define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+#define SharedXineramaReqs $(LDPRELIB) $(XLIB)
+#define SharedXssReqs $(LDPRELIB) $(XLIB)
+#define SharedXvMCReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB)
+
+#else /* UseElfFormat */
+
+#ifndef FixupLibReferences
+#define FixupLibReferences() @@\
+XMULIB = -lXmu $(XLIB)
+#endif
+
+#endif /* UseElfFormat */
+
+#ifndef SharedXReqs
+# define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS)
+#endif
+
+#ifndef SharedXmReqs
+# define SharedXmReqs $(LDPRELIBS) SharedXReqs -lc
+#endif
+
+#ifndef SharedTtReqs
+# define SharedTtReqs $(LDPRELIBS) SharedXReqs $(CXXLIB)
+#endif
+
+#define NoMessageCatalog
diff --git a/nx-X11/config/cf/lnxdoc.rules b/nx-X11/config/cf/lnxdoc.rules
new file mode 100644
index 000000000..a538920df
--- /dev/null
+++ b/nx-X11/config/cf/lnxdoc.rules
@@ -0,0 +1,145 @@
+XCOMM $XFree86: xc/config/cf/lnxdoc.rules,v 3.27 2003/01/15 03:17:29 dawes Exp $
+XCOMM
+XCOMM Rules for formatting Linuxdoc-SGML documentation
+XCOMM
+
+#include <lnxdoc.tmpl>
+
+#ifdef DontInstallLinuxDoc
+#define LinuxDocInstall(file,dest) /* do nothing */
+#define LinuxDocInstallMultiple(files,dest) /* do nothing */
+#define LinuxDocInstallIfExists(file,dest) /* do nothing */
+#else
+#define LinuxDocInstall(file,dest) InstallNonExecFile(file,dest)
+#define LinuxDocInstallMultiple(files,dest) @@\
+InstallMultipleDest(install,files,dest)
+
+#define LinuxDocInstallIfExists(file,dir) @@\
+install:: @@\
+ MakeDir($(DESTDIR)dir) @@\
+ @if [ -f file ]; then set -x; \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) \ @@\
+ file $(DESTDIR)dir; \ @@\
+ fi
+#endif
+
+/* Version for sgmlfmt */
+
+#if BuildLinuxDocPS
+#define LinuxDocSgmlToPs(sgmlfile,base) @@\
+all:: base.ps PdfTarget(base) @@\
+ @@\
+base.ps: sgmlfile $(SGMLDEPENDS) @@\
+ RemoveFile(_$@ $@) @@\
+ @(BASE=`basename sgmlfile .sgml`;\ @@\
+ set -x;\ @@\
+ RemoveFile($$BASE.ps);\ @@\
+ $(SGMLFMTCMD) -f ps sgmlfile && \ @@\
+ $(MV) $$BASE.ps _$@ && $(MV) _$@ $@) @@\
+ @@\
+LinuxDocInstall(base.ps,$(XFREE86PSDOCDIR)) @@\
+ @@\
+ConvertPsToPdf(base) @@\
+ @@\
+LinuxDocInstallIfExists(base.pdf,$(XFREE86PDFDOCDIR)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(Concat(_,base.ps) base.ps)
+#else
+#define LinuxDocSgmlToPs(sgmlfile,base) /**/
+#endif
+
+#if BuildLinuxDocText
+#define LinuxDocSgmlToText(sgmlfile,textfile) @@\
+AllTarget(textfile) @@\
+ @@\
+textfile: sgmlfile $(SGMLDEPENDS) @@\
+ RemoveFiles(_$@ $@) @@\
+ @(BASE=`basename sgmlfile .sgml`;\ @@\
+ set -x;\ @@\
+ RemoveFile($$BASE.latin1);\ @@\
+ $(SGMLFMTCMD) -f latin1 -b -n sgmlfile && \ @@\
+ $(CVSIDENTFIX) < $$BASE.latin1 | $(XORGIDENTFIX) | $(XFREE86IDENTFIX) > _$@ && $(MV) _$@ $@ && \ @@\
+ RemoveFile($$BASE.latin1)) @@\
+ @@\
+LinuxDocInstall(textfile,$(XFREE86DOCDIR)) @@\
+ @@\
+clean:: @@\
+ @(file=textfile; set -x; RemoveFiles(_$$file $$file))
+#else
+#define LinuxDocSgmlToText(sgmlfile,textfile) /**/
+#endif
+
+#if BuildLinuxDocHtml
+#define LinuxDocSgmlToHtml(sgmlfile,base) @@\
+AllTarget(base.html) @@\
+ @@\
+base.html: sgmlfile $(SGMLDEPENDS) @@\
+ @if [ sgmlfile != base.sgml ]; then $(LN) sgmlfile base.sgml; fi @@\
+ RemoveFiles(base*.html) @@\
+ $(SGMLFMTCMD) -f html base.sgml || RemoveFile($@) @@\
+ @if [ sgmlfile != base.sgml ]; then RemoveFile(base.sgml); fi @@\
+ @@\
+LinuxDocInstallMultiple(base*.html,$(XFREE86HTMLDOCDIR)) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(base*.html)
+#else
+#define LinuxDocSgmlToHtml(sgmlfile,base) /**/
+#endif
+
+/*
+ * Rule for maintainers to use to updated formatted copies of docs in the
+ * source tree. Use with care.
+ */
+
+#ifndef UpdateFormattedDocLong
+#define UpdateFormattedDocLong(textfile,dstdir,dstfile) @@\
+update.docs:: textfile @@\
+ -@if [ -f dstdir/dstfile ]; then \ @@\
+ if [ "$(FORCEUPDATE)" = yes ]; then set -x; \ @@\
+ if [ "$(FOLLOWLINK)" = no ]; then \ @@\
+ $(RM) dstdir/dstfile; \ @@\
+ fi; \ @@\
+ cp textfile dstdir/dstfile; \ @@\
+ echo "" >> dstdir/dstfile; \ @@\
+ echo "\$$XdotOrg\$$" >> dstdir/dstfile; \ @@\
+ else \ @@\
+ $(RM) __tmp1__ __tmp2__; \ @@\
+ fgrep -v "\$$XdotOrg:" textfile > __tmp1__; \ @@\
+ fgrep -v "\$$XdotOrg:" dstdir/dstfile > __tmp2__; \ @@\
+ if diff -B __tmp1__ __tmp2__ > /dev/null 2>&1; then :; \ @@\
+ else set -x; \ @@\
+ if [ "$(FOLLOWLINK)" = no ]; then \ @@\
+ $(RM) dstdir/dstfile; \ @@\
+ fi; \ @@\
+ cp textfile dstdir/dstfile ; \ @@\
+ echo "" >> dstdir/dstfile; \ @@\
+ echo "\$$XdotOrg"": \$$" >> dstdir/dstfile; \ @@\
+ fi; \ @@\
+ fi; \ @@\
+ fi @@\
+ @$(RM) __tmp1__ __tmp2__
+#endif
+
+#ifndef UpdateFormattedDoc
+#define UpdateFormattedDoc(textfile,dstdir) @@\
+UpdateFormattedDocLong(textfile,dstdir,textfile)
+#endif
+
+/*
+ * Avoid using LinuxDocTargetLong with base != sgmlfile because HTML
+ * index generation assumes that base == sgmlfile.
+ */
+#define LinuxDocTargetLong(sgmlfile,textfile,base) @@\
+LinuxDocSgmlToText(sgmlfile,textfile) @@\
+LinuxDocSgmlToHtml(sgmlfile,base) @@\
+LinuxDocSgmlToPs(sgmlfile,base) @@\
+UpdateFormattedDoc(textfile,$(FORMATTEDDIR))
+
+#define LinuxDocReadmeTarget(base) @@\
+LinuxDocTargetLong(base.sgml,ReadmeFile(base),base)
+
+#define LinuxDocTarget(base) @@\
+LinuxDocTargetLong(base.sgml,base,base)
+
diff --git a/nx-X11/config/cf/lnxdoc.tmpl b/nx-X11/config/cf/lnxdoc.tmpl
new file mode 100644
index 000000000..af5faf385
--- /dev/null
+++ b/nx-X11/config/cf/lnxdoc.tmpl
@@ -0,0 +1,85 @@
+XCOMM $XFree86: xc/config/cf/lnxdoc.tmpl,v 3.11tsi Exp $
+XCOMM
+
+#ifndef HasSgmlFmt
+#define HasSgmlFmt NO
+#endif
+
+#ifndef HasLinuxDoc
+#define HasLinuxDoc NO
+#endif
+
+#ifndef DoSgmlDocs
+#define DoSgmlDocs (HasLinuxDoc || HasSgmlFmt)
+#endif
+
+#ifndef XFree86IdentFix
+#define XFree86IdentFix sed -e '/\$$\XFree86:/s/....\/..\/.. ..:..:.. *//' \
+ -e '/\$$\XFree86:/s/\$$/Generated from /'
+#endif
+
+#ifndef XorgIdentFix
+#define XorgIdentFix sed -e '/\$$\XdotOrg:/s/....\/..\/.. ..:..:.. *//' \
+ -e '/\$$\XdotOrg:/s/\$$/Generated from /'
+#endif
+
+#ifndef CVSIdentFix
+#define CVSIdentFix sed -e '/\$$\Id:/s/....\/..\/.. ..:..:.. *//' \
+ -e '/\$$\Id:/s/\$$/Generated from /'
+#endif
+
+#ifndef HasLatex
+#define HasLatex NO
+#endif
+
+#ifndef SgmlFmtCmd
+#define SgmlFmtCmd sgmlfmt
+#endif
+
+#ifndef HasDvips
+#define HasDvips NO
+#endif
+
+#ifndef DvipsOptions
+#define DvipsOptions /**/
+#endif
+
+#ifndef DvipsCmd
+#define DvipsCmd dvips
+#endif
+
+#ifndef BuildLinuxDocText
+#define BuildLinuxDocText DoSgmlDocs
+#endif
+
+#ifndef BuildLinuxDocHtml
+#define BuildLinuxDocHtml DoSgmlDocs
+#endif
+
+#ifndef BuildLinuxDocPS
+#define BuildLinuxDocPS DoSgmlDocs
+#endif
+
+#ifndef BuildSgmlDocs
+#define BuildSgmlDocs DoSgmlDocs
+#endif
+
+#ifndef ReadmeFile
+#define ReadmeFile(base) README.base
+#endif
+
+
+ XFREE86IDENTFIX = XFree86IdentFix
+ XORGIDENTFIX = XorgIdentFix
+ CVSIDENTFIX = CVSIdentFix
+ DVIPS = DvipsCmd
+ DVIPSOPTIONS = DvipsOptions
+ SGMLFMTCMD = SgmlFmtCmd
+
+XCOMM Some extra things to clean
+
+#ifdef ExtraFilesToClean
+#undef ExtraFilesToClean
+#endif
+#define ExtraFilesToClean *.aux *.dvi *.log *.tex *.toc *.html *.ps *.latin1
+
diff --git a/nx-X11/config/cf/luna.cf b/nx-X11/config/cf/luna.cf
new file mode 100644
index 000000000..8ca01b2b7
--- /dev/null
+++ b/nx-X11/config/cf/luna.cf
@@ -0,0 +1,115 @@
+XCOMM platform: $Xorg: luna.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+/*
+ * Please set the values for OSMajorVerion and OSMinorVersion
+ * before making makefiles.
+ *
+ * The Luna version of the make program doesn't define the standard
+ * macro MAKE, so you must run it as "make MAKE=make" at top level,
+ * e.g., "make MAKE=make World"
+ */
+
+#ifdef Mc68000Architecture
+# ifdef luna2
+#ifndef OSName
+#define OSName Mach 2.5 Vers 1.40
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 1
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 40
+#endif
+# else
+#ifndef OSName
+#define OSName UNIOS-B 4.3BSD UNIX: 2.00
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 2
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#define DirFailPrefix -
+# endif
+#else /* Mc88000Architecture */
+#ifndef OSName
+#define OSName Mach 2.5 Vers 2.00.1
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 2
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 1
+#endif
+#endif
+XCOMM operating system: OSName
+
+#define HasBsearch NO
+#define HasVoidSignalReturn NO
+#define HasGcc YES
+#define HasCThreads YES
+#define HasThreadSafeAPI NO
+#define Malloc0ReturnsNull HasCThreads /* -lthreads fails, -lc works */
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
+#define BootstrapCFlags -DUSE_CC_E -DNFS_STDOUT_BUG
+
+#define ThreadsLibraries -lthreads -lmach
+#define ThreadsCplusplusLibraries -lthreads -lmach
+
+#define PrimaryScreenResolution 100
+#define BuildXKB YES
+
+#ifdef Mc68000Architecture
+#ifdef luna2
+#if ((OSMajorVersion <= 1) && (OSMinorVersion < 40))
+#define ServerExtraDefines -DUNUSE_DRV_TIME -DUNUSE_SIGIO_SIGNAL
+#endif
+#else /* luna1 */
+#if ((OSMajorVersion <= 1) && (OSMinorVersion <= 60))
+#define StandardDefines -Dluna -Duniosb
+#endif
+#if ((OSMajorVersion < 2) || ((OSMajorVersion == 2) && (OSMinorVersion < 1)))
+#define ServerExtraDefines -DUNUSE_DRV_TIME -DUNUSE_SIGIO_SIGNAL
+#endif
+#endif /* luna2 */
+#if HasGcc
+#define OptimizedCDebugFlags -O -traditional
+#define ServerCDebugFlags -Dmc68020 -O -traditional
+#else /* cc */
+#define OptimizedCDebugFlags -O -Z18
+#define ServerCDebugFlags -Dmc68020 -O -Z18
+#endif /* HasGcc */
+#endif /* Mc68000Architecture */
+
+
+#ifdef Mc88000Architecture
+#if ((OSMajorVersion <= 1) && (OSMinorVersion <= 12))
+#define ServerExtraDefines -DUNUSE_DRV_TIME -DUNUSE_SIGIO_SIGNAL
+#endif
+#define HasNdbm YES
+#define ExtraLibraries -li18n
+#if HasGcc
+#define CcCmd gcc -fstrength-reduce
+#define PreIncDir /usr/local/lib/gcc/gcc-include
+#define OptimizedCDebugFlags -O2 /* -traditional */
+#else
+#define PreIncDir /usr/lib/ccom/include
+#endif
+#define PostIncDir /usr/mach/include
+#endif
+
+#ifdef Mc68000Architecture
+#define UnalignedReferencesAllowed YES /* if arbitrary deref is okay */
+#define XlunaServer YES
+#endif
+
+#ifdef Mc88000Architecture
+#define XlunaServer YES
+#endif
+
+#if ((OSMajorVersion >= 2) && (OSMinorVersion >= 0) && (OSTeenyVersion >= 1))
+#define HasWChar32 YES
+#endif
diff --git a/nx-X11/config/cf/lynx.cf b/nx-X11/config/cf/lynx.cf
new file mode 100644
index 000000000..2668a362e
--- /dev/null
+++ b/nx-X11/config/cf/lynx.cf
@@ -0,0 +1,421 @@
+XCOMM $Xorg: lynx.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/lynx.cf,v 3.47 2003/04/24 22:14:53 herrb Exp $
+
+
+#ifndef OSName
+#define OSName DefaultOSName
+#endif
+#ifndef OSVendor
+#define OSVendor (LynuxWorks Inc.)
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+#ifndef HasSetenv
+#define HasSetenv NO
+#endif
+
+#if OSMajorVersion > 2
+#define HasGcc2 YES
+#endif
+
+#ifndef HasGcc2
+#define HasGcc2 NO
+#endif
+
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 2)
+# ifndef HasGcc2ForCplusplus
+# define HasGcc2ForCplusplus YES
+# endif
+#endif
+#ifndef HasGcc2ForCplusplus
+# define HasGcc2ForCplusplus YES
+#endif
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#define HasShadowPasswd NO
+#ifndef HasLibCrypt
+# define HasLibCrypt NO
+#endif
+#define HasPutenv YES
+#define HasSutenv NO
+#define HasSnprintf NO
+#define HasShm YES
+#define HasSockets YES
+#define HasVFork NO
+#define HasVarDirectory NO
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 4)
+# define HasBSD44Sockets YES
+#endif
+#define HasStickyDirBit NO
+#ifndef HasPosixRegex
+# define HasPosixRegex NO
+#endif
+#ifndef HasPerl
+# define HasPerl NO
+#endif
+#ifndef HasFreetype2
+# define HasFreetype2 NO
+#endif
+
+#if OSMajorVersion <= 2
+# define USE_MACHINE_ABSOLUTE
+#endif
+
+/* At least on x86 we're seeing spurious server crashes when
+ * using signals (SmartScheduler, SilkenMouse) starting with
+ * LynxOS 3.1.0.
+ */
+#if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion == 1)
+# ifndef UseSmartScheduler
+# define UseSmartScheduler NO
+# endif
+#endif
+
+#ifdef UseSmartScheduler
+/* pull in real sigio in os-support instead of sigiostubs */
+# define AllowSIGIO YES
+#endif
+
+#define HasPosixThreads YES
+#define ThreadedX YES
+#define HasThreadSafeAPI YES
+#if HasGcc2
+# if OSMajorVersion == 2 && OSMinorVersion == 3
+# define ThreadsCompileFlags -mposix -mthreads
+# define ThreadsCplusplusCompileFlags -mposix -mthreads
+# else
+# define ThreadsCompileFlags -mthreads
+# define ThreadsCplusplusCompileFlags -mthreads
+# endif
+#else
+# define ThreadsCompileFlags -m
+# define ThreadsCplusplusCompileFlags -m
+#endif
+#if OSMajorVersion == 2 && OSMinorVersion < 3
+# define ThreadsLibraries /lib/thread/libc.a /lib/thread/libc_p.a
+#endif
+#if (OSMajorVersion == 3 && OSMinorVersion == 0) || (OSMajorVersion == 2 && OSMinorVersion <= 5)
+# define ThreadPreStdAPIDefines -DXPRE_STANDARD_API
+#endif
+#define AvoidNullMakeCommand YES
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 2)
+#define StripInstalledPrograms YES
+#else
+/* under LynxOS AT V2.x /bin/strip will leave file.unstripped around
+ * and fail if installing across different file systems
+ */
+#define StripInstalledPrograms NO
+#endif
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull NO
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedWidePrototypes NO
+#define MkdirHierCmd mkdir -p
+#define DirFailPrefix -
+
+#if HasGcc2
+# if OSMajorVersion == 2 && OSMinorVersion == 3
+# define CplusplusCmd g++ -mposix
+# define CcCmd gcc -mposix
+# else
+# define CplusplusCmd g++
+# define CcCmd gcc
+# endif
+# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion == 5)
+# if defined(UseInstalled)
+# define DefaultCCOptions -fcommon -D__NO_INCLUDE_WARN__
+# else
+# define DefaultCCOptions -ansi -pedantic -fcommon -D__NO_INCLUDE_WARN__ GccWarningOptions
+# endif
+# endif
+#else
+# define CplusplusCmd g++
+# define CcCmd gcc
+# define DefaultCCOptions -ansi GccWarningOptions
+# define GccGasOption -DGCCUSESGAS /* For SuperProbe */
+#endif
+#define AsCmd as
+#define LdCmd ld
+#define AsmDefines -DUSE_GAS
+#if OSMajorVersion < 4
+# define CppCmd /lib/cpp
+#else
+# define CppCmd /bin/cpp
+#endif
+#define RawCppCmd CppCmd
+#if !CrossCompiling
+#define YaccCmd bison -y
+/* make sure we take the right flex on 2.3.0 and 2.4.0 */
+#define LexCmd /bin/flex
+#endif
+#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 5)
+# define LexLib -lfl
+#else
+# define LexLib /**/
+#endif
+#define HasFlex YES
+/* On LynxOS AT 2.3.0 /lib/libm.a is a symbolic link to /lib/libc.a, so we
+ * screw up some POSIX functionality when -lm comes before -lc_p in our
+ * ld argument list. For LynxOS-AT we don't need -lm but for others we
+ * do (e.g. SPARC)
+ */
+#if OSMajorVersion == 2 && OSMinorVersion == 3
+# define MathLibrary -lc_p -lm
+# define TermcapLibrary -lc_p -ltermcap
+#else
+# define MathLibrary -lm
+# define TermcapLibrary -ltermcap
+#endif
+#define PreProcessCmd CcCmd -E
+#if HasGcc2
+# define PostIncDir DefaultGccIncludeDir
+#endif
+#define LdCombineFlags -r
+#if HasGcc2
+# ifdef i386Architecture
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# else
+# define OptimizedCDebugFlags -O2
+# endif
+#else
+# define OptimizedCDebugFlags -O
+#endif
+#if OSMajorVersion == 2 && OSMinorVersion <= 2
+# define StandardDefines -DLynx -DLynx_22 -DX_NOT_POSIX
+#else
+# if defined(i386Architecture)
+/* need __i386__ for 2.5.0 AT and higher */
+# if OSMajorVersion <= 3
+# define StandardDefines -DLynx -DX_LOCALE -D__i386__ -DNO_MMAP
+# else
+# define StandardDefines -DLynx -DX_LOCALE -D__i386__
+# endif
+# else
+# if OSMajorVersion <= 3
+# define StandardDefines -DLynx -DX_LOCALE -DNO_MMAP
+# else
+# define StandardDefines -DLynx -DX_LOCALE
+# endif
+# endif
+#endif
+
+#define StandardCppOptions -traditional
+#define StandardCppDefines StandardDefines
+#if defined(i386Architecture) || defined(PpcArchitecture)
+# define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+# define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+# if OSMajorVersion == 2 && OSMinorVersion < 5
+# define XkbServerDefines -DNEED_POPEN_WORKAROUND
+# endif
+#else
+# if defined(SparcArchitecture)
+# define SparcConsoleDefines /* -DPATCHED_CONSOLE */
+# define ServerOSDefines -DDDXOSINIT
+# define ServerExtraDefines -DGCCUSESGAS SparcConsoleDefines
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+# else
+# define ServerOSDefines /**/
+# define ServerExtraDefines -DGCCUSESGAS
+# endif
+#endif
+#define ServerExtraSysLibs $(CBRT) MathLibrary
+#define ConnectionFlags -DUNIXCONN -DTCPCONN
+#if OSMajorVersion <= 2 && OSMinorVersion < 5
+# define ExtraLibraries -lbsd
+#else
+# define ExtraLibraries -lbsd -llynx
+#endif
+#if !HasGcc2
+# define ExtraLoadFlags -k
+#endif
+#if OSMajorVersion == 2 && OSMinorVersion <= 2
+# define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#endif
+
+/* If you have the mtrr driver installed you might want to enable this */
+#ifndef HasMTRRSupport
+#define HasMTRRSupport NO
+#endif
+
+#if (defined(i386Architecture) || defined(PpcArchitecture)) && (OSMajorVersion > 2 || OSMinorVersion > 2)
+# ifndef DoLoadableServer
+# define DoLoadableServer YES
+# endif
+#endif
+
+
+/* define HasMotif to YES for LynxOS with Motif
+ * installed according to the notes in README.LynxOS.
+ */
+#ifndef HasMotif
+# define HasMotif NO
+#endif
+#ifndef MetroLink
+/* We handle the Motif stuff elsewhere */
+#if HasMotif
+# ifndef UseInstalledMotif
+# define UseInstalledMotif YES
+# endif
+# ifndef SaberProgramTarget
+# define SaberProgramTarget(program,srclist,objlist,locallibs,syslibs) /**/
+# endif
+# define LocalTmplFile <Motif.tmpl>
+# define LocalRulesFile <Motif.rules>
+#endif
+#endif
+
+#define ManSourcePath $(MANPATH)/cat
+
+#ifndef ManSuffix
+# define ManSuffix 1
+#endif
+#ifndef ManDir
+# define ManDir $(MANSOURCEPATH)1
+#endif
+#ifndef LibManSuffix
+# define LibManSuffix 3
+#endif
+#ifndef LibmanDir
+# define LibmanDir $(MANSOURCEPATH)3
+#endif
+#ifndef FileManSuffix
+# define FileManSuffix 5
+#endif
+#ifndef FileManDir
+# define FileManDir $(MANSOURCEPATH)5
+#endif
+
+#define HasGroff YES
+
+/* groff 1.09 compiles right out of the box with LynxOS 2.3,
+ * so if you want to have manual pages you should install groff 1.09
+ * before you run 'make install.man'
+ */
+#ifndef InstallManPageLong
+#define InstallManPageLong(file,destdir,dest) @@\
+BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\
+ @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+install.man:: file.$(MANNEWSUFFIX) @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ $(RM) $(DESTDIR)destdir/dest.$(MANSUFFIX)* @@\
+ groff -e -t -man -Tascii file.$(MANNEWSUFFIX) >/tmp/file.man @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/file.man $(DESTDIR)destdir/dest.$(MANSUFFIX) @@\
+ echo dest dest $(MANSUFFIX) >> $(DESTDIR)destdir/LIST$(MANSUFFIX) @@\
+ gawk ' \ @@\
+ /^\.SH[ ]*NAME/ { \ @@\
+ getline; sub("\\\\", "(" p ") "); print; exit \ @@\
+ }' p=$(MANSUFFIX) file.$(MANNEWSUFFIX) >> $(DESTDIR)destdir/../whatis @@\
+ $(RM) /tmp/file.man
+#endif
+
+#ifndef InstallManPageAliases
+#define InstallManPageAliases(file,destdir,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\
+ @@\
+install.man:: @@\
+ @(SUFFIX=`echo $(DESTDIR)destdir/file.* | cut -f2,3 -d.`; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ $(RM) $(DESTDIR)destdir/$$i.*; \ @@\
+ (cd $(DESTDIR)destdir; $(LN) file.$${SUFFIX} \ @@\
+ $$i.$${SUFFIX})); \ @@\
+ echo $$i dest $(MANSUFFIX) >> $(DESTDIR)destdir/LIST$(MANSUFFIX); \ @@\
+ done)
+#endif
+
+#ifndef InstallGenManPageLong
+#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
+BuildInstallHtmlManPage(file,dest,suffix) @@\
+ @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+install.man:: file.$(MANNEWSUFFIX) @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ $(RM) $(DESTDIR)destdir/dest.suffix* @@\
+ groff -e -t -man -Tascii file.$(MANNEWSUFFIX) >/tmp/file.man @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/file.man $(DESTDIR)destdir/dest.suffix @@\
+ echo dest dest suffix >> $(DESTDIR)destdir/Concat(LIST,suffix) @@\
+ gawk ' \ @@\
+ /^\.SH[ ]*NAME/ { \ @@\
+ getline; sub("\\\\", "(" p ") "); print; exit \ @@\
+ }' p=suffix file.$(MANNEWSUFFIX) >> $(DESTDIR)destdir/../whatis @@\
+ $(RM) /tmp/file.man
+#endif
+
+#ifndef InstallMultipleMan
+#define InstallMultipleMan(list,dest) @@\
+install.man:: list @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (MNAME=`echo $$i | cut -f1 -d.`; \ @@\
+ set -x; \ @@\
+ $(RM) $(DESTDIR)dest/$${MNAME}*; \ @@\
+ groff -e -t -man -Tascii $$i >/tmp/$$i; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/$$i $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX); \ @@\
+ echo $${MNAME} $${MNAME} $(MANSUFFIX) >> $(DESTDIR)dest/LIST$(MANSUFFIX)\ @@\
+ gawk ' \ @@\
+ /^\.SH[ ]*NAME/ { \ @@\
+ getline; sub("\\\\", "(" p ") "); print; exit \ @@\
+ }' p=$(MANSUFFIX) $$i >> $(DESTDIR)dest/../whatis \ @@\
+ $(RM) /tmp/$$i); \ @@\
+ done
+#endif
+
+/*
+ * Definitions for the SUN server on LynxOS SPARC
+ */
+#ifdef SparcArchitecture
+# define XsunLynxServer YES
+# define XsunLynxMonoServer NO
+# ifndef BuildScreenSaverLibrary
+# define BuildScreenSaverLibrary YES
+# endif
+# if BuildXInputExt
+# undef BuildXInputExt
+# endif
+# define BuildXInputExt NO
+# define BuildXF86MiscExt NO
+# define BuildXF86VidModeExt NO
+/*
+ * XFree86 uses its own (more portable) database routines to speed up
+ * the RGB database lookups
+ * However, if you want to use ndbm anyway, you can set that to NO in
+ * site.def
+ */
+# ifndef UseRgbTxt
+# define UseRgbTxt YES
+# endif
+#endif
+
+#if !defined(i386Architecture) && !defined(PpcArchitecture)
+# define BuildXF86DGA NO
+#endif
+
+#if 0
+#include <lynxLib.rules>
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+#include <xorg.cf>
diff --git a/nx-X11/config/cf/macII.cf b/nx-X11/config/cf/macII.cf
new file mode 100644
index 000000000..8b0ce689b
--- /dev/null
+++ b/nx-X11/config/cf/macII.cf
@@ -0,0 +1,51 @@
+XCOMM platform: $Xorg: macII.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+#ifndef OSName
+#define OSName A/UX 3.0.1
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 3
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 1
+#endif
+XCOMM operating system: OSName
+
+#if HasGcc
+#define BootstrapCFlags -DmacII
+#endif
+#define SystemV YES
+#define HasPoll NO
+#define NeedBerklib YES
+#define ExtraLibraries $(XBSDLIB) -lposix -lm -lmr
+#define Malloc0ReturnsNull YES
+#define StandardDefines -DmacII -DSYSV
+#define ExecableScripts NO
+#define RemoveTargetProgramByMoving YES
+#define ExpandManNames YES
+#define XmacIIServer YES
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#if MacHasc89
+#define CcCmd c89 -D_POSIX_SOURCE
+#else
+#define HasVoidSignalReturn NO
+#endif
+#if OSMajorVersion <= 2
+#define ServerExtraDefines -DSUPPORT_2_0
+#endif
+#define InstKmemFlags -g sys -m 2711
+#define ExtensionOSDefines -DXTESTEXT1
+
+#if !HasGcc
+#define DefaultCCOptions -A 3
+#endif
+
+/*
+ * If you wish to override the man page directories, do so here using just
+ * one tab between the parameter name (e.g. ManDirectoryRoot) and the
+ * value so that cpp doesn't get confused.
+ */
+#define ManDirectoryRoot /usr/catman/u_man
diff --git a/nx-X11/config/cf/mach.cf b/nx-X11/config/cf/mach.cf
new file mode 100644
index 000000000..1347e7da9
--- /dev/null
+++ b/nx-X11/config/cf/mach.cf
@@ -0,0 +1,76 @@
+XCOMM $Xorg: mach.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/mach.cf,v 3.12 2001/01/17 16:22:32 dawes Exp $
+
+#define OSName Mach 2.5/3.0
+#define OSVendor /**/
+XCOMM operating system: OSName
+#define OSMajorVersion 1
+#define OSMinorVersion 1
+
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#define UseGccMakeDepend YES
+
+#define CcCmd gcc
+#define CppCmd /usr/mach3/lib/gcc-lib/i386-mach/2.3.3/cpp
+#define PreProcessCmd /usr/mach3/lib/gcc-lib/i386-mach/2.3.3/cpp
+#define DefaultCCOptions /**/
+#define GccGasOption -DGCCUSESGAS
+
+#define AsmDefines -DUSE_GAS
+#define BootstrapCFlags -DNOSTDHDRS
+#define ExtensionOSDefines /* -DXTESTEXT1 */
+#define ServerExtraSysLibs /usr/lib/libmach.a
+#ifdef i386Architecture
+#define ServerExtraDefines GccGasOption XFree86ServerDefines
+#else
+#define ServerExtraDefines GccGasOption
+#endif
+#define StandardCppOptions -traditional
+#define StandardCppDefines /**/
+#define StandardDefines -DNOSTDHDRS -DMACH386
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
+
+#define AvoidNullMakeCommand YES
+#define CompressAllFonts YES
+#define DirFailPrefix -
+#define HasNdbm YES
+#define HasPutenv YES
+#define Malloc0ReturnsNull YES
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedWidePrototypes NO
+#define StripInstalledPrograms YES
+
+#ifndef GnuMallocLibrary
+#define GnuMallocLibrary /* -lgnumalloc */
+#endif
+
+#ifdef InstallCmd
+#undef InstallCmd
+#endif
+#define InstallCmd /usr/bin/install
+
+#ifndef PreIncDir
+# define PreIncDir /usr/include
+#endif
+
+#define HasGroff YES
+
+#ifndef ExtraFilesToClean
+# define ExtraFilesToClean *.core
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+#ifdef i386Architecture
+# include <xorg.cf>
+#endif
diff --git a/nx-X11/config/cf/mingw.cf b/nx-X11/config/cf/mingw.cf
new file mode 100644
index 000000000..a9cdedc53
--- /dev/null
+++ b/nx-X11/config/cf/mingw.cf
@@ -0,0 +1,551 @@
+/* MingGW vendor strings and version */
+#include "xorgversion.def"
+
+#ifndef CygxVersionMajor
+# define CygxVersionMajor XORG_VERSION_MAJOR
+#endif
+#ifndef CygxVersionMinor
+# define CygxVersionMinor XORG_VERSION_MINOR
+#endif
+#ifndef CygxVersionPatch
+# define CygxVersionPatch XORG_VERSION_PATCH
+#endif
+#ifndef CygxVersionSnap
+# define CygxVersionSnap XORG_VERSION_SNAP
+#endif
+#ifndef CygxVersionServer
+# define CygxVersionServer 0
+#endif
+
+#ifndef CygxVersion
+# define CygxVersion (10000000 * CygxVersionMajor + 100000 * CygxVersionMinor + 1000 * CygxVersionPatch + CygxVersionSnap)
+#endif
+
+#ifndef CygxVersionString
+# define CygxVersionString `echo CygxVersionMajor CygxVersionMinor CygxVersionPatch CygxVersionSnap%CygxVersionServer| sed -e 's/ /./g' -e 's/%/-/g'`
+#endif
+
+#ifndef CygxManVersionString
+# define CygxManVersionString `echo CygxVersionMajor CygxVersionMinor CygxVersionPatch CygxVersionSnap| sed -e 's/ /./g' -e 's/^/Version\\\ /'`
+#endif
+
+#ifndef XVendorString
+# define XVendorString "The Cygwin/X Project"
+#endif
+#ifndef XVendorRelease
+# define XVendorRelease CygxVersion
+#endif
+#ifndef XVendorManVersionString
+# define XVendorManVersionString CygxManVersionString
+#endif
+#ifndef XVendorManNameString
+# define XVendorManNameString "Xming"
+#endif
+#ifndef XVendorContact
+# define XVendorContact "win32-x11@sources.redhat.com"
+#endif
+
+/* Operating system strings and version */
+#ifndef OSName
+# define OSName Windows
+#endif
+#ifndef OSVendor
+# define OSVendor Microsoft
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+
+#ifndef ProjectRoot
+# define ProjectRoot /usr/X11R6
+#endif
+
+/*
+ * GNU Compiler stuff
+ */
+#ifndef HasGcc3
+# define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+# define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+# define HasGcc HasGcc2
+#endif
+#ifndef HasGcc2ForCplusplus
+# define HasGcc2ForCplusplus HasGcc2
+#endif
+
+#if HasGcc
+# ifndef Gcc28Warnings
+# if (GccMajorVersion > 2) || \
+ ((GccMajorVersion == 2) && (GccMinorVersion >= 8))
+# define Gcc28Warnings -Wundef
+# else
+# define Gcc28Warnings /* */
+# endif
+# ifndef HasGcc33
+# if (((GccMajorVersion == 3) && (GccMinorVersion >= 3)) || \
+ (GccMajorVersion > 3))
+# define HasGcc33 YES
+# else
+# define HasGcc33 NO
+# endif
+# endif
+# ifndef HasGcc34
+# if (((GccMajorVersion == 3) && (GccMinorVersion >= 4)) || \
+ (GccMajorVersion > 3))
+# define HasGcc34 YES
+# else
+# define HasGcc34 NO
+# endif
+# endif
+# endif
+# ifndef GccWarningOptions
+# if XFree86Devel
+# define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wredundant-decls -Wnested-externs Gcc28Warnings
+# else
+# define GccWarningOptions -Wall -Wpointer-arith Gcc28Warnings
+# endif
+# endif
+# ifndef DefaultCCOptions
+# if defined(UseInstalled)
+# define DefaultCCOptions
+# else
+# define DefaultCCOptions GccWarningOptions
+# endif
+# endif
+# if defined(UseInstalled)
+# ifndef UseGccMakeDepend
+# define UseGccMakeDepend YES
+# endif
+# endif
+#endif
+
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#define UnixCpp /* Just a flag that affects Concat macros in Imake.rules */
+#define HasShadowPasswd NO
+#define HasLibCrypt YES
+#define HasPutenv YES
+#define HasFchown NO
+#define HasPoll NO
+#if (OSMajorVersion > 1) || (OSMajorVersion == 1 && OSMinorVersion >= 5)
+# define HasStrlcat YES
+#endif
+#define HasShm NO
+
+/* snprintf from windows runtime does return -1 if the buffer is to small */
+#define HasSnprintf NO
+
+#define HasFfs NO
+
+#ifndef HasMakefileSafeInclude
+# define HasMakefileSafeInclude YES
+#endif
+
+#define Hastcl NO
+#define Hastk NO
+
+#define HasSockets NO
+#define GzipFontCompression YES
+#define HasZlib NO
+#define HasFreetype2 NO
+
+/* We don't need -lm */
+#define MathLibrary /**/
+
+/*
+ * /lib/libtermcap.a doesn't have tgetent, which is needed for
+ * xc/programs/xterm/resize.exe
+ */
+#define TermcapLibrary -lncurses.dll
+
+#define AvoidNullMakeCommand YES
+#define StripInstalledPrograms YES
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull NO
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedWidePrototypes NO
+#define SetTtyGroup YES
+#define ExpandManNames YES
+#define HasDlopen NO
+#define HasGnuMake YES
+#define UseGccMakeDepend NO
+#define ThreadedX YES
+#define HasThreadSafeAPI YES
+#if !CrossCompiling
+#define CaseSensitiveFileSystem NO
+#endif
+#define HasWChar32 YES
+#define HasBasename NO /* basename() in libc */
+
+#define LnCmd ln -s
+#ifndef CcCmd
+# define CcCmd gcc
+#endif /* CcCmd */
+#ifndef CplusplusCmd
+# define CplusplusCmd g++
+#endif /* CplusplusCmd */
+#ifndef AsCmd
+# define AsCmd as
+#endif /* AsCmd */
+
+#define GccGasOption -DGCCUSESGAS
+#define AsmDefines -DUSE_GAS -DGCCUSESGAS
+
+#ifndef LdCmd
+# define LdCmd gcc -lautomode
+#endif /* LdCmd */
+
+#define MkdirHierCmd mkdir -p
+
+#ifndef CppCmd
+# define CppCmd cpp
+#endif /* CppCmd */
+#ifndef YaccCmd
+# define YaccCmd bison -y
+#endif /* YaccCmd */
+
+#define LexCmd flex -l
+#define LexLib -lfl
+#define HasFlex YES
+#ifndef CrossCompileDir
+# ifndef HasExpat
+# define HasExpat YES
+# endif
+# ifndef HasFreetype2
+# define HasFreetype2 YES
+# endif
+# ifndef HasFontconfig
+# define HasFontconfig YES
+# endif
+#endif
+
+/* Cygwin-specific Windows resource compiler command */
+#ifdef CrossCompileDir
+# ifndef WindresCmd
+# define WindresCmd Concat3(CrossCompileDir,/,windres)
+# endif
+#else
+# ifndef WindresCmd
+# define WindresCmd windres
+# endif
+#endif
+
+#define PreProcessCmd CcCmd -E
+
+#ifndef PostIncDir
+# ifdef CrossCompileDir
+# define PostIncDir `CrossCompileDir/CcCmd --print-libgcc-file-name | sed 's,\\\\,/,g' | sed 's,libgcc.a,include,'`
+# else
+# define PostIncDir `CcCmd --print-libgcc-file-name | sed 's,\\\\,/,g' | sed 's,libgcc.a,include,'`
+# endif
+#endif
+#ifndef ExtraIncDir
+# ifdef CrossCompileDir
+# define ExtraIncDir CrossCompileDir/../include/w32api
+# else
+# define ExtraIncDir /usr/include/w32api
+# endif
+#endif
+
+#ifndef BourneShell
+/*
+ * This will cause builds/installs to terminate on errors, as on other
+ * platforms.
+ */
+#define BourneShell /bin/sh -e
+#endif
+
+#define LdCombineFlags -r
+
+#ifndef DefaultCCOptions
+# define DefaultCCOptions -Wall -Wpointer-arith
+#endif
+
+/* Cygwin 1.5.x now includes alloca */
+#if OSMinorVersion >= 5
+# define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+#else
+# define AllocateLocalDefines -DNO_ALLOCA
+#endif
+
+#ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2 -fno-strength-reduce
+#endif
+
+/*
+ * -DFD_SETSIZE=256 is needed for xfs and the xserver. cygwin defines the
+ * FD_SETSIZE as 64 but some code expects it to be larger.
+ */
+#define StandardDefines -D__i386__ -DWIN32_LEAN_AND_MEAN -DX_LOCALE \
+ -D_X86_ -DWIN32 -D_XOPEN_SOURCE \
+ -D_POSIX_C_SOURCE=199309L -D_BSD_SOURCE \
+ -D_SVID_SOURCE -D_GNU_SOURCE -DFD_SETSIZE=1024 \
+ -DXResExtension
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H \
+ -DHAS_ISW_FUNCS -DNO_WIDEC_H
+#define StandardCppOptions -traditional
+
+/* Cygwin shared memory requires cygipc package or cygserver. */
+#if UseCygIPC
+# if ThreadedX
+# define StandardCppDefines -DHAS_THREADS -DHAS_SHM StandardDefines
+# else
+# define StandardCppDefines -DHAS_SHM StandardDefines
+# endif
+#else
+# if ThreadedX
+# define StandardCppDefines -DHAS_THREADS StandardDefines
+# else
+# define StandardCppDefines StandardDefines
+# endif
+#endif
+
+#define BuildIPv6 NO
+#define BuildLBX NO
+
+/*
+ * This requires the pthreads-win32 library
+ * It is available from http://www.sourceware.org/pthreads-win32
+ */
+#ifndef HasPThreads
+# define HasPThreads YES
+#endif
+
+/* Most libraries do not compile with mingw. Build only the servers. */
+#ifndef BuildServersOnly
+# define BuildServersOnly YES
+#endif
+
+/* Enable those parts that do work and are required for running Xming */
+#ifndef BuildXextLib
+# define BuildXextLib YES
+#endif
+#ifndef BuildXkbcomp
+# define BuildXkbcomp YES
+#endif
+
+/* XWin Server specific build flags */
+#ifndef GlxUseWindows
+# define GlxUseWindows YES
+#endif
+#if !GlxUseWindows
+# define GlxExtraDefines -DAPIENTRY=GLAPIENTRY
+#endif
+
+#ifndef BuildXWinClipboard
+# define BuildXWinClipboard HasPThreads
+#endif
+#ifndef BuildXWinEmulatePseudo
+# define BuildXWinEmulatePseudo NO
+#endif
+#ifndef BuildXWinMultiWindow
+# define BuildXWinMultiWindow HasPThreads
+#endif
+#ifndef BuildXWinMultiWindowExtWM
+# define BuildXWinMultiWindowExtWM HasPThreads
+#endif
+#ifndef BuildXWinNativeGDI
+# define BuildXWinNativeGDI NO
+#endif
+#ifndef BuildXWinPrimaryFB
+# define BuildXWinPrimaryFB NO
+#endif
+#ifndef BuildXWinUpdateStats
+# define BuildXWinUpdateStats NO
+#endif
+#ifndef BuildXWinXF86Config
+# define BuildXWinXF86Config NO
+#endif
+
+/* XWin specific build flags - 1st order dependency */
+#if BuildXWinMultiWindowExtWM && !defined(BuildWindowsWMLibrary)
+# define BuildWindowsWMLibrary YES
+#elif !defined(BuildWindowsWMLibrary)
+# define BuildWindowsWMLibrary NO
+#endif /* BuildXWinMultiWindowExtWM && BuildWindowsWMLibrary */
+
+#if (BuildXWinClipboard || BuildXWinMultiWindow || BuildXWinMultiWindowExtWM) && !defined(BuildX11Lib)
+# define BuildX11Lib YES
+#endif
+
+/* XWin Server specific defines */
+#if BuildXWinClipboard
+# define XWinClipboardDefines -DXWIN_CLIPBOARD
+#else
+# define XWinClipboardDefines
+#endif /* BuildXWinClipboard */
+#if BuildXWinEmulatePseudo
+# define XWinEmulatePseudoDefines -DXWIN_EMULATEPSEUDO
+#else
+# define XWinEmulatePseudoDefines
+#endif /* BuildXWinEmulatePseudo */
+#if BuildXWinMultiWindow
+# define XWinMultiWindowDefines -DXWIN_MULTIWINDOW
+#else
+# define XWinMultiWindowDefines
+#endif /* BuildXWinMultiWindow */
+#if BuildXWinMultiWindowExtWM
+# define BuildRootless YES
+# define XWinMultiWindowExtWMDefines -DXWIN_MULTIWINDOWEXTWM
+#else /* BuildXWinMultiWindowExtWM */
+# define XWinMultiWindowExtWMDefines
+#endif /* BuildXWinMultiWindowExtWM */
+#if BuildXWinNativeGDI
+# define XWinNativeGDIDefines -DXWIN_NATIVEGDI
+#else
+# define XWinNativeGDIDefines
+#endif /* BuildXWinNativeGDI */
+#if BuildXWinPrimaryFB
+# define XWinPrimaryFBDefines -DXWIN_PRIMARYFB
+#else
+# define XWinPrimaryFBDefines
+#endif /* BuildXWinPrimaryFB */
+#if BuildXWinUpdateStats
+# define XWinUpdateStatsDefines -DXWIN_UPDATESTATS
+#else
+# define XWinUpdateStatsDefines
+#endif /* BuildXWinUpdateStats */
+#if BuildXWinXF86Config
+# define XWinXF86ConfigDefines -DXWIN_XF86CONFIG
+#else
+# define XWinXF86ConfigDefines
+#endif /* BuildXWinXF86Config */
+
+#if HasPThreads
+# define XWinPThreadsDefines -DPTW32_DLLPORT=
+#else
+# define XWinPThreadsDefines
+#endif /* HasPThreads */
+
+/*
+ * XFree86Server is defined for the w32api headers, which protects some
+ * colliding names with #ifdef XFree86Server.
+ */
+#define XWinServerDefines -DPIXPRIV \
+ -DXFree86Server \
+ -DX_BYTE_ORDER=ByteOrder \
+ XvExtensionDefines \
+ XWinXF86ConfigDefines XWinNativeGDIDefines \
+ XWinPrimaryFBDefines \
+ XWinEmulatePseudoDefines \
+ XWinUpdateStatsDefines \
+ XWinClipboardDefines XWinMultiWindowDefines \
+ XWinMultiWindowExtWMDefines \
+ XWinPThreadsDefines \
+ -DDDXBEFORERESET
+#define ServerOSDefines -DDDXTIME -DDDXOSINIT \
+ -DDDXOSVERRORF -DDDXOSFATALERROR
+#define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+#define ServerExtraDefines -DGCCUSESGAS XWinServerDefines \
+ AllocateLocalDefines
+#define ConnectionFlags -DTCPCONN
+#define ExtraLibraries
+#define InstUidFlags -m 4711
+#define UseRgbTxt YES
+#define ExtraFilesToClean *.obj *.orig *.rej junk.c *.exe *.dll *.lib *~
+
+/* Flags for which the default in X11.tmpl is not what we want. */
+#ifndef BuildXinerama
+# define BuildXinerama NO /* Not supported by XWin Server */
+#endif
+#ifndef BuildXIE
+# define BuildXIE NO /* Deprecated */
+#endif
+#ifndef BuildDPMS
+# define BuildDPMS NO /* Not supported by XWin Server */
+#endif
+#ifndef BuildXInputExt
+# define BuildXInputExt YES /* Not enabled by default */
+#endif
+#ifndef BuildRandR
+# define BuildRandR YES /* Not supported by XWin Server */
+#endif
+#ifndef BuildXF86BigfontExt
+# define BuildXF86BigfontExt NO
+#endif
+#ifndef BuildGlxExt
+# define BuildGlxExt YES
+#endif
+#ifndef BuildXprintLib
+# define BuildXprintLib NO
+#endif
+#ifndef BuildXprint
+# define BuildXprint NO
+#endif
+#ifndef BuildXterm
+# define BuildXterm NO /* Built separately on Cygwin */
+#endif
+#ifndef BuildXResExt
+# define BuildXResExt YES /* Not enabled by default */
+#endif
+#ifndef BuildFreeType
+# define BuildFreeType YES /* Not enabled by default */
+#endif
+#ifndef BuildXTrueType
+# define BuildXTrueType YES /* Not enabled by default */
+#endif
+
+/* Server build rules */
+#ifndef XnestServer
+# define XnestServer NO
+#endif
+#ifndef XprtServer
+# define XprtServer NO
+#endif
+#ifndef XVirtualFramebufferServer
+# define XVirtualFramebufferServer NO
+#endif
+#ifndef XWinServer
+# define XWinServer YES
+#endif
+
+/*
+ * --unix option of Cygwin make fools the standard MakeFlagsToShellFlags macro
+ */
+#define MakeFlagsToShellFlags(makeflags,shellcmd) \
+ for flag in ${MAKEFLAGS} ''; do \ @@\
+ case "$$flag" in *=*) ;;--*) ;; *[makeflags]*) shellcmd;; esac; done
+
+#define MakeNamedTargetSubdir(dir,flags,subname)\
+ $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname
+
+#ifndef ManSuffix
+# define ManSuffix 1
+#endif
+
+#ifndef XtransFailSoft
+#define XtransFailSoft YES
+#endif
+
+#ifndef HasDevWindows
+# define HasDevWindows NO
+#endif
+
+#ifndef RelocateProjectRoot
+# define RelocateProjectRoot YES
+#endif
+
+#ifndef UseInstalledOnCrossCompile
+# define UseInstalledOnCrossCompile YES
+#endif
+
+#include <mingw.rules>
+
+#if CrossCompiling
+#include <cross.def>
+#endif
diff --git a/nx-X11/config/cf/mingw.rules b/nx-X11/config/cf/mingw.rules
new file mode 100644
index 000000000..505b0685c
--- /dev/null
+++ b/nx-X11/config/cf/mingw.rules
@@ -0,0 +1,445 @@
+/*
+ * Cygwin shared library rules (DLL versions)
+ */
+
+#define HasSharedLibraries YES
+#define NeedLibInsideFlag NO
+#define ForceNormalLib NO
+#define NormalLibX11 NO
+# define SharedLibFont NO
+# define SharedLibFontEnc NO
+# define SharedLibWindowsWM NO
+# define SharedLibxkbfile YES
+
+#ifndef SharedDataSeparation
+# define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <mingw.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -dll /**/
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -D_DLL
+#endif
+#ifndef PositionIndependentCplusplusFlags
+#define PositionIndependentCplusplusFlags -D_DLL
+#endif
+#ifndef UseExportLists
+#define UseExportLists YES
+#endif
+
+#define SharedLibraryName(libname, rev) \
+Concat3(lib,libname,-$(shell echo rev|sed s=\\..*==).dll)
+
+#define ImportLibraryName(libname, rev) \
+Concat3(lib,libname,-$(shell echo rev|sed s=\\..*==).dll.a)
+
+#define ShortImportLibraryName(libname, rev) \
+Concat3(lib,libname,.dll.a)
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+
+#ifndef SharedDepLibraryTarget
+# ifdef UseInstalled
+# ifndef LinkBuildSonameLibrary
+# define LinkBuildSonameLibrary(lib)
+# endif
+# else /* !UseInstalled */
+# ifndef LinkBuildSonameLibrary
+# define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); @@\
+ cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
+# endif
+# endif /* UseInstalled */
+
+
+/*
+ * SharedDepLibraryTarget
+ */
+
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(SharedLibraryName(libname,rev)) @@\
+ @@\
+SharedLibraryName(libname,rev): deplist @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+ MakeDLL(libname,solist,rev) @@\
+ LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
+ LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
+ LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedDepCplusplusLibraryTarget - generate rules to create a shared library.
+ */
+
+#ifndef SharedDepCplusplusLibraryTarget
+# ifdef UseInstalled
+# ifndef LinkBuildSonameLibrary
+# define LinkBuildSonameLibrary(lib)
+# endif
+# else /* !UseInstalled */
+# ifndef LinkBuildSonameLibrary
+# define LinkBuildSonameLibrary(lib) (RemoveFile($(BUILDLIBDIR)/lib); @@\
+ cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/lib .)
+# endif
+# endif /* UseInstalled */
+
+
+/*
+ * SharedDepCplusplusLibraryTarget
+ */
+
+#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(SharedLibraryName(libname,rev)) @@\
+ @@\
+SharedLibraryName(libname,rev): deplist @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+ MakeCplusplusDLL(libname,solist,rev) @@\
+ LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
+ LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
+ LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+
+#endif /* SharedDepCplusplusLibraryTarget */
+
+
+/*
+ * SharedDepModuleTarget
+ */
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(CC) -o $@ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ @@\
+clean:: @@\
+ RemoveFile(name)
+#endif /* SharedDepModuleTarget */
+
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shared data file
+ */
+
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif
+
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+/*
+ * MakeDllProg
+ */
+
+#define MakeDLLProg(libname,solist,prog,rev) @@\
+ prog -shared -Wl,--out-implib=ImportLibraryName(libname,rev) -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc -Wl,--exclude-libs,ALL -o SharedLibraryName(libname,rev) solist $(REQUIREDLIBS) -lws2_32
+
+/*
+ * MakeDll
+ */
+
+#define MakeDLL(libname,solist,rev) @@\
+ MakeDLLProg(libname,solist,$(CC),rev)
+
+/*
+ * MakeCplusplusDll
+ */
+
+#define MakeCplusplusDLL(libname,solist,rev) @@\
+ MakeDLLProg(libname,solist,$(CXX),rev)
+
+
+
+/*
+ * SharedLibraryTarget
+ */
+
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(SharedLibraryName(libname,rev)) @@\
+ @@\
+SharedLibraryName(libname,rev): solist @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+ MakeDLL(libname,solist,rev) @@\
+ LinkBuildLibrary(ImportLibraryName(libname,rev)) @@\
+ LinkImportLibrary(ImportLibraryName(libname,rev),LibraryTargetName(libname)) @@\
+ LinkBuildDLL(SharedLibraryName(libname,rev)) @@\
+clean:: @@\
+ RemoveFile(ImportLibraryName(libname,rev)) @@\
+ RemoveFile(SharedLibraryName(libname,rev)) @@\
+
+
+/*
+ * InstallLink
+ */
+
+#ifndef InstallLink
+#define InstallLink(step, file, link, dest) @@\
+step:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(LN) -sf file $(DESTDIR)dest/link
+#endif
+
+/*
+ * InstallSharedLibrary
+ */
+
+#define InstallSharedLibrary(libname,rev,dest) @@\
+InstallTarget(install,ImportLibraryName(libname,rev),$(INSTLIBFLAGS),$(USRLIBDIR)) @@\
+InstallTarget(install,SharedLibraryName(libname,rev),$(INSTBINFLAGS),$(BINDIR)) @@\
+InstallLink(install,ImportLibraryName(libname,rev),ShortImportLibraryName(libname,rev),$(USRLIBDIR))
+
+
+/*
+ * ProgramTargetName - This can be simply 'target' or 'target.exe' when
+ * building on Cygwin proper, as Cygwin automatically appends .exe to compiled
+ * executables and make, rm, ln, etc. will automatically search for a file
+ * with .exe appended if the raw file name cannot be found. However,
+ * building with a cross compiler requires 'target.exe', as the cross
+ * compiler doesn't know to append .exe, nor do the cross compiler tools
+ * know to search for files with .exe appended if the raw file name cannot
+ * be found.
+ */
+
+#define ProgramTargetName(target) Concat(target,.exe)
+
+
+/*
+ * HostProgramTargetName - Don't add .exe if cross-compiling.
+ */
+
+#ifndef HostProgramTargetName
+# if CrossCompiling
+# define HostProgramTargetName(target) target
+# else
+# define HostProgramTargetName(target) ProgramTargetName(target)
+# endif
+#endif
+
+
+/*
+ * LinkBuildDLL - Cygwin only rule, similar to LinkBuildModule.
+ * Unfortunately, we have to create a copy of each DLL in xc/exports/bin;
+ * linking doesn't work, the executables (e.g. xkbcomp) will report
+ * that they cannot find DLLs (e.g. libX11.dll).
+ */
+
+#ifdef UseInstalled
+#define LinkBuildDLL(lib) $(_NULLCMD_)
+#else
+#define LinkBuildDLL(lib) MakeDir($(BUILDBINDIR)) @@\
+ RemoveFile($(BUILDBINDIR)/lib) @@\
+ cd $(BUILDBINDIR) && $(CP) $(BUILDBINTOP)/$(CURRENT_DIR)/lib .
+#endif
+
+#ifndef LinkImportLibrary
+#ifdef UseInstalled
+#define LinkImportLibrary(lib, importlib) $(_NULLCMD_)
+#else
+#define LinkImportLibrary(lib, importlib) MakeDir($(BUILDLIBDIR)) @@\
+ RemoveFile($(BUILDLIBDIR)/importlib) @@\
+ cd $(BUILDLIBDIR) && $(LN) lib importlib
+#endif
+#endif /* LinkImportLibrary */
+
+
+/*
+ * LinkBuildBinary - This rule normally creates a link in xc/exports/bin
+ * to a binary, but we create an actual copy of the binary.
+ * Creating a link causes the DLLs that the binary depend on, such as
+ * libX11.dll, not to be found. Copying the binary causes the runtime
+ * directory to be xc/exports/bin, which is the location of the DLLs, thus,
+ * the DLLs can now be found by the binary. Phew...
+ *
+ * Note that sometimes the binary is not an executable. One example
+ * is the rgb binary file.
+ *
+ * Passing -p preserves the attributes as the date and prevents useless
+ * rebuilds.
+ *
+ * ProgramTargetName is passed to LinkBuildBinary if the binary
+ * is actually an executable; thus, we do not wrap the binary name
+ * with ProgramTargetName here.
+ */
+
+#ifndef LinkBuildBinary
+#define LinkBuildBinary(binary) @@\
+all:: binary @@\
+ MakeDir($(BUILDBINDIR)) @@\
+ RemoveFile($(BUILDBINDIR)/binary) @@\
+ cd $(BUILDBINDIR) && $(CP) -p $(BUILDBINTOP)/$(CURRENT_DIR)/binary .
+#endif /* LinkBuildBinary */
+
+/*
+ * ProfiledRelocatableTarget - generate rules to produce a profiled
+ * relocatable object file instead of a library. Differs from Imake.rules
+ * by passing '--oformat pe-i386' to ld.
+ */
+
+#ifndef ProfiledRelocatableTarget
+#define ProfiledRelocatableTarget(objname,objlist) @@\
+AllTarget(Concat(objname,_p.Osuf)) @@\
+ @@\
+Concat(objname,_p.Osuf): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(LD) -X -r --oformat pe-i386 objlist -o $@
+
+#endif /* ProfiledRelocatableTarget */
+
+
+/*
+ * DebuggedRelocatableTarget - generate rules to produce a debuggable
+ * relocatable object file instead of a library. Differs from Imake.rules
+ * by passing '--oformat pe-i386' to ld.
+ */
+
+#ifndef DebuggedRelocatableTarget
+#define DebuggedRelocatableTarget(objname,objlist) @@\
+AllTarget(Concat(objname,_d.Osuf)) @@\
+ @@\
+Concat(objname,_d.Osuf): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(LD) -X -r --oformat pe-i386 objlist -o $@
+
+#endif /* DebuggedRelocatableTarget */
+
+
+/*
+ * DependDependencyStatement - Imake.rules wraps $(DEPEND) in
+ * ProgramTargetName(), which causes cross compiling to think that
+ * $(DEPEND) hasn't been built, as $(DEPEND) is a host tool, and should
+ * not be wrapped with ProgramTargetName(). Perhaps there should be
+ * a HostProgramTargetName()...
+ */
+
+#ifndef DependDependencyStatement
+#if HasMakefileSafeInclude
+#define DependDependencyStatement() @@\
+DependFileName:: $(DEPEND)
+#else
+#define DependDependencyStatement() @@\
+depend:: $(DEPEND)
+#endif
+#endif
+
+
+/*
+ * DependDependency - Imake.rules wraps $(DEPEND) in ProgramTargetName().
+ * This doesn't work when cross compiling, see the locally defined
+ * DependDependencyStatement comment (above) for more information.
+ */
+
+#ifndef DependDependency
+#ifdef UseInstalled
+#define DependDependency() /**/
+#else
+#define DependDependency() @@\
+DependDependencyStatement() @@\
+ @@\
+NoCmpScript($(DEPEND)) @@\
+ @@\
+$(DEPEND): @@\
+ @echo "checking $@ over in $(DEPENDSRC) first..."; \ @@\
+ cd $(DEPENDSRC) && $(MAKE) makedependonly; \ @@\
+ echo "okay, continuing in $(CURRENT_DIR)"
+
+#endif /* UseInstalled */
+#endif /* DependDependency */
+
+
+/*
+ * ImakeDependency - Imake.rules wraps $(IMAKE) in ProgramTargetName(),
+ * which doesn't work when cross compiling, as imake is supposed to be a
+ * host program. See the locally defined DependDependencyStatement
+ * comment (above) for more information.
+ */
+
+#ifndef ImakeDependency
+#ifdef UseInstalled
+#define ImakeDependency(target) /**/
+#else
+#define ImakeDependency(target) @@\
+target:: $(IMAKE) @@\
+ @@\
+NoCmpScript($(IMAKE) $(IMAKE).Osuf) @@\
+ @@\
+$(IMAKE) $(IMAKE).Osuf: @@\
+ -@(cd $(IMAKESRC) && if [ -f Makefile ]; then \ @@\
+ echo "checking $@ in $(IMAKESRC) first..."; $(MAKE) imakeonly; else \ @@\
+ echo "bootstrapping $@ from Makefile.ini in $(IMAKESRC) first..."; \ @@\
+ $(MAKE) -f Makefile.ini BOOTSTRAPCFLAGS="$(BOOTSTRAPCFLAGS)"; fi; \ @@\
+ echo "okay, continuing in $(CURRENT_DIR)")
+#endif /* UseInstalled */
+#endif /* ImakeDependency */
+
+
+/*
+ * ResourceObjectRule - Build a Windows resouce file (.res) into
+ * an object file (.o) that can be linked in with the executable
+ * or library being built.
+ */
+
+#ifndef ResourceObjectRule
+#define ResourceObjectRule(basename,depends,options) @@\
+AllTarget(basename.RESsuf) @@\
+basename.RESsuf: basename.RCsuf depends @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \ @@\
+ WindresCmd basename.RCsuf options -O coff -o basename.RESsuf @@\
+clean:: @@\
+ RemoveFiles(basename.RESsuf)
+
+#endif /* ResourceObjectRule */
+
+/* The arglist can get quite long. Make sure we can delete it though */
+#ifndef MakeFonts
+# define MakeFonts() @@\
+all:: $(OBJS) @@\
+ @@\
+MakeFontsDir($(OBJS)) @@\
+ @@\
+clean:: @@\
+ find -name "*.pcf" -o -name "*.pcf.Z" -o -name "*.pcf.gz" | xargs -r rm
+#endif /* MakeFonts */
+
+#ifndef IncludeMakefile
+#define IncludeMakefile(file) @@sinclude file
+#endif
+
+
+#ifndef ProjectUnsharedLibReferences
+#define ProjectUnsharedLibReferences(varname,libname,libsource,buildlibdir) @@\
+Concat3(DEP,varname,LIB) = _UseCat($(USRLIBDIR)/,buildlibdir/,LibraryTargetName(libname)) @@\
+Concat(varname,LIB) = LoaderLibPrefix Concat(-l,libname) $(Concat(varname,EXTLIB)) @@\
+LintLibReferences(varname,libname,libsource)
+#endif
+
+XONLYEXTLIB = -lwsock32
diff --git a/nx-X11/config/cf/mingw.tmpl b/nx-X11/config/cf/mingw.tmpl
new file mode 100644
index 000000000..6be56d117
--- /dev/null
+++ b/nx-X11/config/cf/mingw.tmpl
@@ -0,0 +1,77 @@
+XCOMM $XFree86: xc/config/cf/cygwin.tmpl,v 3.18 2003/10/19 08:27:05 herrb Exp $
+
+#define SharedX11Reqs -lwsock32
+#define SharedXlibi18nReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS)
+#define SharedXtReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XONLYLIB)
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIB) $(XLIB)
+#define SharedXtstReqs $(LDPRELIB) $(XLIB)
+#define SharedSMReqs $(LDPRELIB) $(ICELIB)
+#define SharedXpReqs $(LDPRELIB) $(XAUTHLIB) $(XLIB)
+#define SharedXvReqs $(LDPRELIB) $(XLIB)
+#define SharedGLReqs $(LDPRELIB) $(XLIB)
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedXfontReqs $(LDPRELIB) $(FONTSTUBLIB) GzipLibrary $(FREETYPE2LIB)
+#define SharedFontencReqs $(LDPRELIB) GzipLibrary
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXpmReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB)
+#define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIB)
+#define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+#define SharedpsresReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB
+#define SharedXResReqs $(LDPRELIB) $(XLIB)
+#define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+#define SharedXineramaReqs $(LDPRELIB) $(XLIB)
+/*
+ * We don't build Xss
+ * #define SharedXssReqs $(LDPRELIB) $(XLIB)
+ */
+#define SharedXvMCReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB)
+#define SharedXmuuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXfixesReqs $(LDPRELIB) $(XLIB)
+#define SharedXdamageReqs $(LDPRELIB) $(XFIXESLIB) $(XLIB)
+#define SharedXcompositeReqs $(LDPRELIB) $(XDAMAGELIB) $(XFIXESLIB) $(XLIB)
+#define SharedXevieReqs $(LDPRELIB) $(XLIB)
+
+#ifndef FixupLibReferences
+# define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef XawClientLibs
+# define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+
+/*
+ * Suffix for Windows resource source files
+ */
+
+#ifndef RCsuf
+# define RCsuf rc
+#endif
+
+
+/*
+ * Suffix for Windows resource compiled files
+ */
+
+#ifndef RESsuf
+# define RESsuf res
+#endif
diff --git a/nx-X11/config/cf/minix.cf b/nx-X11/config/cf/minix.cf
new file mode 100644
index 000000000..ba101dc48
--- /dev/null
+++ b/nx-X11/config/cf/minix.cf
@@ -0,0 +1,64 @@
+XCOMM $Xorg: minix.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/minix.cf,v 3.5 1999/07/10 07:24:33 dawes Exp $
+
+
+/*
+ * If you want to change any of these, do it in the BeforeVendorCF part
+ * of site.def
+ */
+#define OSName Minix-386vm
+#define OSVendor /* philip@cs.vu.nl */
+#define OSMajorVersion 1
+#define OSMinorVersion 6
+#define OSTeenyVersion 25.1.0
+
+#define AcdGcc
+
+#ifdef AcdGcc
+#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
+#define AsmDefines -DUSE_GAS
+#define GccGasOption -DGCCUSESGAS /* For SuperProbe */
+#endif
+
+/* Defaults for Minix */
+
+#define ConnectionFlags -DMNX_TCPCONN
+#define StandardDefines -D_MINIX -DMINIX -D_POSIX_SOURCE
+#define StandardIncludes
+
+#define DoRanlibCmd NO
+#define AvoidNullMakeCommand YES
+#define HasSockets NO
+#define HasStreams NO
+#define HasVFork NO
+#define HasNdbm YES
+#define ExtraLibraries -lnbio
+#define NeedConstPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedNestedPrototypes YES
+/* #define UseCCMakeDepend YES */
+#define DefaultCCOptions -wo -fsoft
+#define ArCmd CcCmd -c.a -o
+#define ArAddCmd ArCmd
+#define CcCmd acd -descr gcc -name cc
+#define AsCmd CcCmd -c
+#define CppCmd /usr/lib/cpp
+#define LdCmd CcCmd
+#define LdCombineFlags -r
+#define LexLib /* */
+
+#define SetTtyGroup YES /* for xterm */
+#define HasPutenv YES /* for xsm */
+
+#ifndef AssembleObject
+#define AssembleObject(basename,flags) $(RM) $@ @@\
+ $(CPP) AsmDefines $(DEFINES) $(INCLUDES) flags basename.S | \ @@\
+ grep -v '^\#' > basename.i.s @@\
+ $(AS) -o $*.o basename.i.s @@\
+ $(RM) basename.i.s
+#endif
+
+#include <xorg.cf>
diff --git a/nx-X11/config/cf/moto.cf b/nx-X11/config/cf/moto.cf
new file mode 100644
index 000000000..b43295932
--- /dev/null
+++ b/nx-X11/config/cf/moto.cf
@@ -0,0 +1,58 @@
+XCOMM platform: $Xorg: moto.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+#if defined(MotoR3Architecture)
+
+#ifndef OSName
+#define OSName Motorola R32V2/R3V6.2
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 3
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 2
+#endif
+
+#define SystemV YES
+#define BootstrapCFlags -DSYSV -DMOTOROLA
+#define StandardDefines -DSYSV -DUSG -DMOTOROLA
+#define Malloc0ReturnsNull YES
+#define BuildServer NO
+#define UseCCMakeDepend YES
+#define OptimizedCDebugFlags /* -O */
+
+#define DefaultUserPath :/bin:/usr/bin:$(BINDIR)
+#define DefaultSystemPath /etc:/bin:/usr/bin:$(BINDIR)
+
+#endif /* MotoR3Architecture */
+
+
+#if defined(MotoR4Architecture)
+
+#ifndef OSName
+#define OSName Motorola R40V4
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 4
+#endif
+
+#define SystemV4 YES
+#define BootstrapCFlags -DSVR4 -DMOTOROLA
+#define StandardDefines -DSVR4 -DMOTOROLA
+#define BuildServer NO
+
+#define CppCmd /usr/ccs/lib/cpp
+#define LdCmd /usr/ccs/bin/ld
+#define LexCmd /usr/ccs/bin/lex
+#define MakeCmd /usr/ccs/bin/make
+#define YaccCmd /usr/ccs/bin/yacc
+#define CcCmd /bin/cc /* a front-end to gcc/CI5 */
+#define DefaultCCOptions /* -Xc no longer needed */
+
+#include <sv4Lib.rules>
+
+#endif /* MotoR4Architecture */
+
+XCOMM operating system: OSName
diff --git a/nx-X11/config/cf/ncr.cf b/nx-X11/config/cf/ncr.cf
new file mode 100644
index 000000000..64dfdb038
--- /dev/null
+++ b/nx-X11/config/cf/ncr.cf
@@ -0,0 +1,131 @@
+XCOMM platform: $Xorg: ncr.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/ncr.cf,v 3.20 2001/01/17 16:22:32 dawes Exp $
+
+#ifndef OSName
+#define OSName Unix System V Release 4/MP-RAS
+#endif
+#ifndef OSVendor
+#define OSVendor NCR
+#endif
+XCOMM operating system: OSName
+
+#define BootstrapCFlags -DNCR
+#define HasStreams YES
+#define XawI18nDefines -DUSE_XWCHAR_STRING
+
+/* Build Flags */
+
+XCOMM
+XCOMM These flags build correctly on SVR4/MP-RAS 3.0. If building on
+XCOMM SVR4/MP-RAS 2.X, you must add -DWINTCP to StandardDefines
+XCOMM
+#define StandardDefines -DSVR4 -DNCR -Di386
+#ifndef DefaultCCOptions
+#define DefaultCCOptions -Xa -Hnocopyr -W0,-asm
+#endif
+#define DefaultCDebugFlags -O3
+#define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+#define ServerExtraDefines -DNO_SECONDARY AllocateLocalDefines XFree86ServerDefines
+#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
+#define ToolkitStringsABIOptions -intelabi
+
+XCOMM This has not been tested, don't turn it on yet.
+XCOMM #define ExtensionOSDefines -DXTESTEXT1
+
+#define ExtraLoadFlags -lc -L/usr/ucblib -lucb -lm -lgen -lcmd
+
+/* Setup proper ownership of installed files */
+
+#define StripInstalledPrograms YES
+#define InstPgmFlags -s -m 0711 -o bin -g bin
+#define InstBinFlags -m 0755 -o bin -g bin
+#define InstUidFlags -m 4711 -o root -g bin
+#define InstLibFlags -m 0644 -o bin -g bin
+#define InstIncFlags -m 0444 -o bin -g bin
+#define InstManFlags -m 0444 -o bin -g bin
+#define InstDatFlags -m 0444 -o bin -g bin
+
+/* Various Configuration settings */
+
+#define DefaultUserPath /bin:/sbin:/usr/bin:/usr/sbin:$(BINDIR):/usr/ucb
+#define DefaultSystemPath /etc:/bin:/usr/bin:/sbin:/usr/sbin:$(BINDIR):/usr/ucb
+#define ExtraFilesToClean *.z
+
+/* Create man pages properly */
+
+#define BookFormatManPages YES
+#define ManDirectoryRoot /usr/catman/X115
+#define ManSuffix 1X
+#define LibManSuffix 3X
+#define FileManSuffix 4X
+#define ManSourcePath $(MANPATH)/g
+#define XmanSearchPath /usr/catman
+
+#define TblCmd /usr/ucb/tbl
+#define EqnCmd /usr/ucb/eqn
+#define ColCmd /usr/bin/col
+#define NeqnCmd /usr/ucb/neqn
+#define NroffCmd /usr/ucb/nroff -Tlp
+
+/*
+ * Man pages need to be formatted when installed, so override the default
+ * imake rules.
+ */
+#define InstallManPageLong(file,destdir,dest) @@\
+CppManTarget(file, $(EXTRAMANDEFS)) @@\
+ @@\
+all:: file.z @@\
+ @@\
+file.z:: file.$(MANNEWSUFFIX) @@\
+ @if [ -f file.$(MANNEWSUFFIX) ]; \ @@\
+ then \ @@\
+ cat file.$(MANNEWSUFFIX) | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) >/tmp/$$$$.man; \ @@\
+ $(RM) /tmp/$$$$.man.z; \ @@\
+ pack -f /tmp/$$$$.man; \ @@\
+ cp /tmp/$$$$.man.z file.z; \ @@\
+ $(RM) /tmp/$$$$.man.z; \ @@\
+ fi @@\
+ @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ -@if [ -f file.z ]; \ @@\
+ then \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.z $(DESTDIR)destdir/dest.z; \@@\
+ fi
+
+#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
+ InstallManPageLong(file,destdir,dest)
+
+#define InstallMultipleManSuffix(list,dest,suff) @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ MakeFlagsToShellFlags(i,set +e); \ @@\
+ for i in list; do \ @@\
+ (set -x; \ @@\
+ cat $$i.suff | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) | $(COL) >/tmp/$$$$.suff; \ @@\
+ pack -f /tmp/$$$$.suff; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/$$$$.suff.z $(DESTDIR)dest/$$i.z; \ @@\
+ $(RM) /tmp/$$$$.suff.z); \ @@\
+ done
+
+#define InstallMultipleMan(list,dest) @@\
+ InstallMultipleManSuffix(list,dest,man)
+
+#define InstallManPageAliases(file,destdir,aliases) @@\
+install.man:: @@\
+ @MakeFlagsToShellFlags(i,set +e); \ @@\
+ for i in aliases; do \ @@\
+ (set -x; \ @@\
+ $(RM) $(DESTDIR)destdir/$$i.z;\ @@\
+ (cd $(DESTDIR)destdir; $(LN) file.z $$i.z);\ @@\
+ ); \ @@\
+ done
+
+#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
+ InstallManPageAliases(file,destdir,aliases)
+
+#include <svr4.cf>
diff --git a/nx-X11/config/cf/nec.cf b/nx-X11/config/cf/nec.cf
new file mode 100644
index 000000000..8fb072ff7
--- /dev/null
+++ b/nx-X11/config/cf/nec.cf
@@ -0,0 +1,131 @@
+XCOMM platform: $Xorg: nec.cf,v 1.3 2000/08/17 19:41:47 cpqbld Exp $
+
+#ifdef nec_ews_svr2
+# define NecCISCArchitecture
+#else /* !defined(nec_ews_svr2) */
+# if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up)
+# define NecRISCArchitecture
+# else /* !(defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up)) */
+# ifdef SX
+# define NecSX3Architecture
+# else /* !defined(SX) */
+# ifdef _nec_ft
+# define NecFaultTolerantArchitecture
+# else /* !defined(_nec_ft) */
+# ifdef PC_UX
+# define NecPCArchitecture
+# endif /* PC_UX */
+# endif /* !defined(_nec_ft) */
+# endif /* !defined(SX) */
+# endif /* !(defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up)) */
+#endif /* !defined(nec_ews_svr2) */
+
+#ifdef NecCISCArchitecture
+#ifndef OSName
+#define OSName EWS-UX/V
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 10
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 1
+#endif
+#define HasSharedLibraries NO
+#define HasVoidSignalReturn NO
+#define HasSockets YES
+#define SystemV YES
+#define StandardDefines -Dnec_ews -Dnec_ews_svr2 -DUSG -DSYSV
+#define StandardCppDefines -Dnec_ews -Dnec_ews_svr2 -DUSG -DSYSV
+#define LnCmd ln -s
+ LEXOPTION = -j
+#endif
+
+#ifdef NecRISCArchitecture
+# ifdef _nec_up
+#ifndef OSName
+#define OSName UP-UX/V
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 5
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 1
+#endif
+# else
+#ifndef OSName
+#define OSName EWS-UX/V\(Rel4.2\)
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 9
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 1
+#endif
+# endif
+#define HasSharedLibraries YES
+#define HasVoidSignalReturn YES
+#define SystemV4 YES
+#define HasSockets YES
+#endif
+
+#ifdef NecSX3Architecture
+#ifndef OSName
+#define OSName SUPER-UX
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 3
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 1
+#endif
+#define SystemV YES
+#define HasSharedLibraries NO
+#define HasVoidSignalReturn YES
+#endif
+
+#ifdef NecFaultTolerantArchitecture
+#ifndef OSName
+#define OSName FT-UX/V
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 5
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 1
+#endif
+#define HasSharedLibraries YES
+#define HasVoidSignalReturn YES
+#define SystemV4 YES
+#define HasSockets YES
+#endif
+
+#ifdef NecPCArchitecture
+#ifndef OSName
+#define OSName PC-UX/V
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 3
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 1
+#endif
+#define HasSharedLibraries NO
+#define HasVoidSignalReturn NO
+#define SystemV YES
+#endif
+
+#define HasSaberC NO /* for machines that have it */
+#define HasGcc NO
+#define HasBsearch YES
+
+#define DefaultCCOptions -Wf,-XNp9000,-XNd6000
+#define ExtraLibraries -lsocket -lnsl -lw
+
+#define BuildServer NO
+/* #define InstallCmd $(INS) */
+#define RemoveTargetProgramByMoving YES
+
+#include <necLib.rules>
+
+#define LibraryCCOptions DefaultCCOptions
+#define LibraryDefines StandardDefines
diff --git a/nx-X11/config/cf/necLib.rules b/nx-X11/config/cf/necLib.rules
new file mode 100644
index 000000000..713ebdd80
--- /dev/null
+++ b/nx-X11/config/cf/necLib.rules
@@ -0,0 +1,131 @@
+XCOMM $Xorg: necLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*
+ * NECOS shared library rules
+ */
+
+XCOMM $XFree86: xc/config/cf/necLib.rules,v 1.2 1999/01/11 05:13:07 dawes Exp $
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+#ifndef SharedDataSeparation
+#define SharedDataSeparation YES
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <necLib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags
+#endif
+
+
+#ifndef SeparateSharedCompile
+#define SeparateSharedCompile NO
+#endif
+
+#define SharedLibObjCompile(options) $(_NULLCMD_)
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ cd $(DESTDIR)/dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so) @@\
+
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest) @@\
+install:: Concat(lib,libname.sa.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.sa.rev) $(DESTDIR)dest @@\
+ RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.sa.rev))
+
+#endif /* InstallSharedLibraryData */
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ $(CC) -G -o $@~ $(SHLIBLDFLAGS) solist @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+AllTarget(Concat(lib,libname.so)) @@\
+ @@\
+Concat(lib,libname.so): Concat(lib,libname.so.rev) @@\
+ $(RM) $@ @@\
+ $(LN) $? $@ @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ $(CC) -G -o $@~ $(SHLIBLDFLAGS) solist @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+AllTarget(Concat(lib,libname.so)) @@\
+ @@\
+Concat(lib,libname.so): Concat(lib,libname.so.rev) @@\
+ $(RM) $@ @@\
+ $(LN) $? $@ @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev)
+
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist) @@\
+AllTarget(Concat(lib,libname.sa.rev)) @@\
+ @@\
+Concat(lib,libname.sa.rev): salist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@ @@\
+ $(AR) $@ salist @@\
+ RanLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.sa.rev)
+
+#endif /* SharedLibraryDataTarget */
diff --git a/nx-X11/config/cf/necLib.tmpl b/nx-X11/config/cf/necLib.tmpl
new file mode 100644
index 000000000..e586af01b
--- /dev/null
+++ b/nx-X11/config/cf/necLib.tmpl
@@ -0,0 +1,29 @@
+XCOMM $Xorg: necLib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*
+ * NEC shared library template
+ */
+
+#ifndef SharedXlibRev
+#define SharedXlibRev 4.10
+#endif
+#ifndef SharedOldXRev
+#define SharedOldXRev 4.10
+#endif
+#ifndef SharedXtRev
+#define SharedXtRev 4.10
+#endif
+#ifndef SharedXawRev
+#define SharedXawRev 5.0
+#endif
+#ifndef SharedXmuRev
+#define SharedXmuRev 4.10
+#endif
+#ifndef SharedXextRev
+#define SharedXextRev 4.10
+#endif
+#ifndef SharedXinputRev
+#define SharedXinputRev 4.10
+#endif
+
+#include <sv4Lib.tmpl>
diff --git a/nx-X11/config/cf/noop.rules b/nx-X11/config/cf/noop.rules
new file mode 100644
index 000000000..8b1378917
--- /dev/null
+++ b/nx-X11/config/cf/noop.rules
@@ -0,0 +1 @@
+
diff --git a/nx-X11/config/cf/nto.cf b/nx-X11/config/cf/nto.cf
new file mode 100644
index 000000000..e3b94fec1
--- /dev/null
+++ b/nx-X11/config/cf/nto.cf
@@ -0,0 +1,152 @@
+/* $XFree86: xc/config/cf/nto.cf,v 1.3 2000/07/07 20:06:56 tsi Exp $ */
+/* Get X to build using the gcc toolchain, self hosted RTP x86 */
+/* Let us try to separate the x86 stuff out of here as well... */
+
+/* don't want to conflict with QSSL's Xphoton in /usr/X11R6 */
+#define ProjectRoot /opt/X11R6
+
+
+#ifndef OSName
+#define OSName QNX6/Neutrino
+#endif
+
+#ifndef OSVendor
+#define OSVendor QNX Corp.
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 6
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 1
+#endif
+
+#if defined(i386Architecture)
+#define BuildServer YES
+#else
+#define BuildServer NO
+#endif
+
+#define DoLoadableServer YES
+
+#define BourneShell /bin/sh
+#define OSDefines -DNO_REGEX -DSTRINGS_ALIGNED
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#define StripInstalledPrograms NO
+#define BuildLBX YES
+#define ForceNormalLib YES
+
+#define SourceDefines -D_POSIX_SOURCE -D_QNX_SOURCE
+#define CrossCompiling NO
+#define DoRanlibCmd YES
+#define GccUsesGas YES
+#define MkdirHierCmd mkdir -p
+
+#ifdef UseInstalled
+#define InstallCmd install
+#else
+#define InstallCmd $(SHELL) $(CONFIGSRC)/util/install.sh
+#endif
+#define DefaultCCOptions
+#define LibraryCCOptions
+#define ServerCCOptions
+#define LocalLibraries
+#define CLibrary
+#define PosixLibraries
+#define ConnectionFlags -DTCPCONN
+
+#define StandardCppDefines -traditional StandardDefines
+#define PreProcessCmd CppCmd
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+#define HasShm NO /* For now as well */
+#define HasSockets YES
+#define HasPutenv YES
+#define HasCbrt NO
+#define HasShadowPasswd YES
+#define HasSnprintf YES
+#define HasBSD44Sockets YES
+
+#define BuildHtmlManPages NO /* We don't want HTML manpages */
+
+#define AvoidNullMakeCommand YES
+#define CompressAllFonts YES
+#define Malloc0ReturnsNull YES
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define OptimizedCDebugFlags -O2
+#define DefaultCDebugFlags -O2
+
+#ifndef NeedWidePrototypes
+#define NeedWidePrototypes NO
+#endif
+
+#define YaccCmd bison -y
+#define LexCmd flex -l
+#define LexLib -lfl
+#define TermcapLibrary -lncurses
+#ifndef UseStaticTermcapLib
+#define UseStaticTermcapLib NO
+#endif
+
+/* Here, we put in the #defines which are CPU-specific */
+/* Note that the full paths to the tools will go away when self-hosted */
+
+#ifdef i386Architecture
+#define BootstrapCFlags -D__QNXNTO__ -Di386
+#define OSDefines -DNO_REGEX -DSTRINGS_ALIGNED
+#define NTODefines -D__i386__ -D__ELF__ -D__QNXNTO__ -D_i386
+#define CcCmd gcc
+#define CplusplusCmd g++ -fhonor-std -fno-builtin
+#define ArCmd ar cq
+#define LdCmd ld
+#define AsCmd as
+#define RanlibCmd ranlib
+#define CppCmd /usr/bin/cpp
+/* do this until NTO's cpp can support -undef in the future */
+#define RawCppCmd CppCmd -Uunix -Ui386
+#define AsmDefines -DUSE_GAS -D__ELF__ -D__QNXNTO__
+#define ExtraLibraries -lsocket
+#endif
+
+/* MIPS architecture */
+#ifdef mipsArchitecture
+#define BootstrapCFlags -D__QNXNTO__ -DMIPS
+#define OSDefines -DNO_REGEX -DSTRINGS_ALIGNED
+#define NTODefines -D__MIPS__ -D__ELF__ -D__QNXNTO__
+#define CcCmd /usr/gcc/ntomips/bin/gcc -bntomips -EL
+#define ArCmd /usr/gcc/bin/ar cq
+#define LdCmd /usr/gcc/bin/ld
+#define AsCmd /usr/gcc/ntomips/bin/as
+#define RanlibCmd /usr/gcc/bin/ranlib
+#define AsmDefines -DUSE_GAS -D__ELF__ -D__QNXNTO__
+#define ExtraLibraries -lsocket
+#endif
+
+/* Power PC support */
+#ifdef PPCArchitecture
+#define BootstrapCFlags -D__QNXNTO__ -DPPC
+#define OSDefines -DNO_REGEX -DSTRINGS_ALIGNED
+#define NTODefines -D__PPC__ -D__ELF__ -D__QNXNTO__
+#define CcCmd /usr/gcc/ntoppc/bin/gcc -bntoppc
+#define ArCmd /usr/gcc/bin/ar cq
+#define LdCmd /usr/gcc/bin/ld
+#define AsCmd /usr/gcc/ntoppc/bin/as
+#define RanlibCmd /usr/gcc/bin/ranlib
+#define AsmDefines -DUSE_GAS -D__ELF__ -D__QNXNTO__
+#define ExtraLibraries -lsocket
+#endif
+
+
+#define StandardDefines OSDefines SourceDefines NTODefines
+#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
+#define ServerExtraDefines XFree86ServerDefines
+#define ExtraFilesToClean *.err *.map
+
+#include <nto.rules>
+#include <xorg.cf>
+
diff --git a/nx-X11/config/cf/nto.rules b/nx-X11/config/cf/nto.rules
new file mode 100644
index 000000000..e5023e26f
--- /dev/null
+++ b/nx-X11/config/cf/nto.rules
@@ -0,0 +1,240 @@
+XCOMM $XFree86: xc/config/cf/nto.rules,v 1.7 2003/10/09 22:43:18 herrb Exp $
+XCOMM Rules for QNX/Neutrino
+XCOMM Note that some of these will disappear when we stop cross-compiling
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -shared
+#endif
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -fPIC
+#endif
+#ifndef PositionIndependentCplusplusFlags
+#define PositionIndependentCplusplusFlags -fPIC
+#endif
+
+#define LinkFile(tofile, fromfile) @@\
+tofile:: fromfile @@\
+ $(CP) fromfile tofile @@\
+ @@\
+includes:: tofile @@\
+ @@\
+depend:: tofile @@\
+ @@\
+clean:: @@\
+ RemoveFile(tofile)
+
+#define ObjectFromSpecialSource(dst, src, flags) @@\
+NoConfigRec(dst.c) @@\
+ @@\
+dst.c: src.c @@\
+ RemoveFile($@) @@\
+ $(CP) $? $@ @@\
+ @@\
+SpecialCObjectRule(dst,NullParameter,flags) @@\
+ @@\
+includes:: dst.c @@\
+ @@\
+depend:: dst.c @@\
+ @@\
+clean:: @@\
+ RemoveFile(dst.c)
+
+
+#define ObjectFromSpecialAsmSource(dst, src, flags) @@\
+dst.S: src.S @@\
+ RemoveFile($@) @@\
+ $(CP) $? $@ @@\
+ @@\
+dst.o: dst.S @@\
+ AssembleObject(dst,flags) @@\
+ @@\
+dst.i: dst.S @@\
+ CPPOnlyAsm(dst,flags) @@\
+ @@\
+depend:: dst.S @@\
+ @@\
+clean:: @@\
+ RemoveFile(dst.S)
+
+XCOMM Special rule ComplexHostProgramTarget needed to compile
+XCOMM our utilities locally because we are cross-compiling...
+XCOMM
+
+#define ComplexHostProgramTarget(program) @@\
+ CC=cc @@\
+ STD_INCLUDES = @@\
+ CFLAGS=$(TOP_INCLUDES) $(INCLUDES) $(BOOTSTRAPCFLAGS) @@\
+ CCOPTIONS = @@\
+ EXTRA_LOAD_FLAGS = @@\
+ PROGRAM = program @@\
+ @@\
+AllTarget(program) @@\
+ @@\
+program: $(OBJS) $(DEPLIBS) @@\
+ RemoveTargetProgram($@) @@\
+ HostLinkRule($@,$(_NOOP_),$(OBJS),$(DEPLIBS) $(LOCAL_LIBRARIES)) @@\
+ @@\
+DependTarget() @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(program))
+
+XCOMM And this rule is again for a host simple host program when cross-compiling.
+XCOMM
+
+#define SimpleHostProgramTarget(program) @@\
+ OBJS = program.o @@\
+ SRCS = program.c @@\
+ @@\
+ComplexHostProgramTarget(program)
+
+
+#ifndef FixupLibReferences
+#define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef SharedLibraryTarget
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\
+ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+#endif
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ * NOTE: file must be executable, hence "INSTBINFLAGS"
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ @T=`echo Concat($(DESTDIR)dest/lib,libname.so.rev) | sed 's/\.[^\.]*$$//'`;\
+ set -x; $(RM) $$T && $(LN) Concat(lib,libname.so.rev) $$T @@\
+ @if $(SOSYMLINK); then (set -x; \
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\
+ $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)); fi
+#endif /* InstallSharedLibrary */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+#define BaseShLibReqs
+
+
+
+/*
+ * ServerTargetWithFlags - generate rules to compile, link, and relink a server
+ */
+#ifndef ServerTargetWithFlags
+#define ServerTargetWithFlags(server,subdirs,objects,libs,syslibs,flags) @@\
+AllTarget(ProgramTargetName(server)) @@\
+ProgramTargetName(server): subdirs objects libs @@\
+ MoveToBakFile($@) @@\
+ LinkRule($@,$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\
+ @@\
+Concat(load,server): @@\
+ MoveToBakFile(ProgramTargetName(server)) @@\
+ LinkRule(ProgramTargetName(server),$(LDOPTIONS),objects,libs $(LDLIBS) syslibs) @@\
+ @@\
+loadX:: Concat(load,server) @@\
+ @@\
+SentinelProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
+SentinelLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
+PurifyProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
+PurifyLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
+ProofProgramTarget(server,subdirs objects libs,objects libs $(LDLIBS) syslibs) @@\
+ProofLinkTarget(Concat(load,server),server,objects libs $(LDLIBS) syslibs) @@\
+ @@\
+InstallProgramWithFlags(server,$(BINDIR),flags) @@\
+ @@\
+clean:: @@\
+ RemoveFile(ProgramTargetName(server))
+#endif /* ServerTargetWithFlags */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ @SONAME=`echo $@ | sed 's/\.[^\.]*$$//'`; set -x; \ @@\
+ (cd down; $(CC) -o up/$@~ $(SHLIBLDFLAGS) -Wl,-soname,$$SONAME solist $(REQUIREDLIBS) BaseShLibReqs); \ @@\
+ $(RM) $$SONAME; $(LN) $@ $$SONAME; \ @@\
+ LinkBuildSonameLibrary($$SONAME) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ @MAJREV=`echo rev | sed 's/\.[^\.]*$$//'`; \ @@\
+ set -x; $(RM) Concat(lib,libname.so.$$MAJREV) @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedDepLibraryTarget */
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+
+ @@\
+name: deps @@\
+ $(RM) $@~ @@\
+ $(CC) -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name
+
+#endif /* SharedDepModuleTarget */
+
diff --git a/nx-X11/config/cf/oldlib.rules b/nx-X11/config/cf/oldlib.rules
new file mode 100644
index 000000000..3ee19eb79
--- /dev/null
+++ b/nx-X11/config/cf/oldlib.rules
@@ -0,0 +1,109 @@
+/* You should not use these any more, use new Library.tmpl insead */
+
+XCOMM $Xorg: oldlib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*
+ * ProfiledLibraryObjectRule - generate make rules to build both profiled
+ * and "normal" objects.
+ */
+#ifndef ProfiledLibraryObjectRule
+#define ProfiledLibraryObjectRule() @@\
+all:: @@\
+ LibMkdir(profiled) @@\
+ @@\
+.c.o: @@\
+ ProfiledLibObjCompile(NullParameter) @@\
+ NormalLibObjCompile(NullParameter) @@\
+ @@\
+clean:: @@\
+ LibCleanDir(profiled) @@\
+
+#endif /* ProfiledLibraryObjectRule */
+
+
+/*
+ * DebuggedLibraryObjectRule - generate make rules to build both debuggable
+ * and "normal" objects.
+ */
+#ifndef DebuggedLibraryObjectRule
+#define DebuggedLibraryObjectRule() @@\
+all:: @@\
+ LibMkdir(debugger) @@\
+ @@\
+.c.o: @@\
+ DebuggedLibObjCompile(NullParameter) @@\
+ NormalLibObjCompile(NullParameter) @@\
+ @@\
+clean:: @@\
+ LibCleanDir(debugger) @@\
+
+#endif /* DebuggedLibraryObjectRule */
+
+
+/*
+ * DebuggedAndProfiledLibraryOjbectRule - generate make rules to build
+ * debuggable, profiled, and "normal" objects.
+ */
+#ifndef DebuggedAndProfiledLibraryObjectRule
+#define DebuggedAndProfiledLibraryObjectRule() @@\
+all:: @@\
+ LibMkdir(profiled) @@\
+ LibMkdir(debugger) @@\
+ @@\
+.c.o: @@\
+ ProfiledLibObjCompile(NullParameter) @@\
+ DebuggedLibObjCompile(NullParameter) @@\
+ NormalLibObjCompile(NullParameter) @@\
+ @@\
+clean:: @@\
+ LibCleanDir(profiled) @@\
+ LibCleanDir(debugger) @@\
+
+#endif /* DebuggedAndProfiledLibraryObjectRule */
+
+
+/*
+ * SpecialProfiledObjectRule - generate rules to compile a file with special
+ * flags and to make a profiled version.
+ */
+#ifndef SpecialProfiledObjectRule
+#define SpecialProfiledObjectRule(objs,depends,options) @@\
+all:: @@\
+ LibMkdir(profiled) @@\
+ @@\
+objs: depends @@\
+ ProfiledLibObjCompile(options) @@\
+ NormalLibObjCompile(options)
+#endif /* SpecialProfiledObjectRule */
+
+
+/*
+ * SpecialDebuggedObjectRule - generate rules to compile a file with special
+ * flags and to make a debuggable version.
+ */
+#ifndef SpecialDebuggedObjectRule
+#define SpecialDebuggedObjectRule(objs,depends,options) @@\
+all:: @@\
+ LibMkdir(debugger) @@\
+ @@\
+objs: depends @@\
+ DebuggedLibObjCompile(options) @@\
+ NormalLibObjCompile(options)
+#endif /* SpecialDebuggedObjectRule */
+
+
+/*
+ * SpecialDebuggedAndProfiledObjectRule - generate rules to compile a file
+ * with special flags and to make debuggable and profiled versions.
+ */
+#ifndef SpecialDebuggedAndProfiledObjectRule
+#define SpecialDebuggedAndProfiledObjectRule(objs,depends,options) @@\
+all:: @@\
+ LibMkdir(profiled) @@\
+ LibMkdir(debugger) @@\
+ @@\
+objs: depends @@\
+ ProfiledLibObjCompile(options) @@\
+ DebuggedLibObjCompile(options) @@\
+ NormalLibObjCompile(options)
+#endif /* SpecialDebuggedAndProfiledObjectRule */
diff --git a/nx-X11/config/cf/os2.cf b/nx-X11/config/cf/os2.cf
new file mode 100644
index 000000000..5e5905ce5
--- /dev/null
+++ b/nx-X11/config/cf/os2.cf
@@ -0,0 +1,212 @@
+XCOMM $Xorg: os2.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/os2.cf,v 3.40 2003/06/10 17:03:50 dawes Exp $
+
+XCOMM hv: This file will now require a compiler that defines
+XCOMM hv: the symbol __UNIXOS2__ (currently a modified EMX gcc,
+XCOMM hv: but in future a separate system)
+
+#define OSName OS/2
+#define OSVendor IBM
+#define OSMajorVersion 4
+#define OSMinorVersion 5
+#define OSTeenyVersion 1
+
+#define BootstrapCFlags -DBSD43
+
+#define StandardDefines -DX_LOCALE -DX_WCHAR
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+
+/* for the man pages */
+#define BookFormatManPages YES
+#define ManSuffix 1
+#define FileManSuffix 4
+#define DontUseLibPathVar YES
+
+/* you must have installed groff! */
+#define TblCmd tbl
+#define ColCmd cat
+#define NeqnCmd eqn
+#define NroffCmd groff -Tascii
+#define EqnCmd eqn -Tascii
+#define HasGroff YES
+ NEQN = NeqnCmd
+ NROFF = NroffCmd
+
+/* A set of standard defines: */
+#define OSDefines -D_POSIX_SOURCE -D_BSD_SOURCE -D_GNU_SOURCE
+
+#ifndef BuildXKB
+#define BuildXKB YES
+#endif
+#ifndef BuildLBX
+#define BuildLBX YES
+#endif
+#ifndef DoLoadableServer
+#define DoLoadableServer YES
+#endif
+#undef MakeDLLModules
+#define MakeDLLModules NO
+#ifndef BuildModuleInSubdir
+#define BuildModuleInSubdir YES
+#endif
+
+
+/* some more properties of the OS/2 implementation */
+#define HasNdbm YES
+#define HasPutenv YES
+#define HasSockets YES
+#define HasSnprintf YES
+#define HasWChar32 NO
+#define HasUsableFileMap NO
+#define HasNCurses YES
+#define HasVarRun NO
+#define HasLibPthread NO
+#define HasPosixThreads NO
+#define HasVarDb NO
+#define HasDlopen NO
+#define HasBsearch NO
+#define HasFchown NO
+#define HasLargeTmp NO
+#define HasPoll NO
+#define HasBSD44Sockets NO
+#define HasSecureRPC NO
+#define HasSymLinks NO
+#define HasVFork NO
+#define HasVarDirectory NO
+#define HasStrcasecmp YES
+#define StrcasecmpDefines -DNEED_STRCASECMP -Dstrcasecmp=stricmp -Dstrncasecmp=strnicmp
+#define Malloc0ReturnsNull YES
+#define SetTtyGroup NO
+#ifndef HasLibCrypt
+# define HasLibCrypt NO
+#endif
+#ifndef HasShm
+# define HasShm YES
+#endif
+#define ConnectionFlags -DTCPCONN -DOS2PIPECONN
+#define StdIncDir /usr/include
+#define HasStickyDirBit NO
+#define HasMkstemp NO
+#define HasBasename NO /* C-function, not shell utility!! */
+
+
+/*
+ * Compiler Features
+ */
+#define DefaultGcc2i386Opt -O2 -fstrength-reduce -fpcc-struct-return
+#define UseGccMakeDepend YES
+#define HasCplusplus YES
+#define HasGnuMake YES
+#define GccUsesGas YES
+#define UseGas YES
+#define GnuCpp YES
+#define DoRanlibCmd YES
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define NeedWidePrototypes NO
+
+#define HasPlugin NO
+#define VendorHasX11R6_3libExt YES
+
+#define CppCmd cpp
+#define YaccCmd bison -y
+#define StandardCppOptions -traditional
+#define StandardCppDefines /**/
+#define PreProcessCmd CppCmd
+
+#define CcCmd gcc -D__UNIXOS2__
+#define DefaultCCOptions -D__ST_MT_ERRNO -Zmtd -Zsysv-signals
+#define LibraryCCOptions -D__ST_MT_ERRNO -Zmtd -Zsysv-signals
+#define ServerCCOptions -D__ST_MT_ERRNO -Zmtd -Zsysv-signals
+
+#define ModuleCcCmd gcc_elf
+#define ModuleCppCmd cpp_elf
+#define ModuleCFlags -D__UNIXOS2__ $(CDEBUGFLAGS) $(THREADS_CFLAGS) $(ALLDEFINES)
+#define ModuleAsCmd as_elf
+#define ModuleLdCmd ld_elf
+#define ModuleLdCombineFlags -X -r
+#define ModuleArCmd ar_elf cq
+#define NeedModuleRanlib YES
+#define ModuleRanlibCmd ranlib_elf
+#define HasPerl5 YES
+
+#define CplusplusCmd g++
+#define CplusplusOptions -Zmtd -Zsysv-signals -D__UNIXOS2__
+
+#define AsCmd as
+#define GccGasOption -DGCCUSESGAS
+#define AsmDefines -DUSE_GAS
+
+#define InstallCmd install
+
+#define LdCmd ld
+#define ExtraLoadFlags -Zbin-files
+#define ExtraLibraries -lshm -lemxfix -lsocket -lbsd -lgcc
+#define ServerExtraSysLibs -lregex -lshm -lemxfix -lsocket
+
+/* quite a number of programs you need, most of them the same as
+ * with Unix, but listed here for completeness
+ */
+#define ArCmd ar cq
+#define RanlibCmd ar s
+#define BourneShell /bin/sh
+#define LexCmd flex -l
+#define HasFlex YES
+#define LexLib -lfl
+#define LintCmd /**/
+#define MvCmd mv
+#define CompressCmd compress
+#define GzipCmd gzip
+#define LnCmd cp
+#define CpCmd cp
+#define RmCmd rm -f
+
+/* "shell scripts" in OS/2 have this extension */
+#define SHsuf sh
+
+#define InstPgmFlags /**/
+#define InstBinFlags /**/
+#define InstUidFlags /**/
+#define InstLibFlags /**/
+#define InstIncFlags /**/
+#define InstManFlags /**/
+#define InstDatFlags /**/
+#define InstallFlags /**/
+
+#define OptimizedCDebugFlags DefaultGcc2i386Opt
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
+#define ServerExtraDefines GccGasOption XFree86ServerDefines
+
+/*
+ * Make & install Features
+ */
+
+#define AvoidNullMakeCommand YES
+_NULLCMD_ =
+#define NullMakeCommand
+#define StripInstalledPrograms NO
+#define CompressAllFonts YES
+#define CompressManPages YES
+#define GzipFontCompression YES
+#define DefaultUserPath $(BINDIR)
+#define DefaultSystemPath $(BINDIR)
+#define CaseSensitiveFileSystem NO
+
+#ifndef ExtraFilesToClean
+# define ExtraFilesToClean *.~* *.exe *.dll *.obj *.lib *.map *raw_os2.def MISSING_ORDINALS
+#endif
+
+#define ProgramTargetName(target) Concat(target,.exe)
+#define HostProgramTargetName(target) ProgramTargetName(target)
+
+#include <os2.rules>
+#include <os2Lib.rules>
+
+# include <xorg.cf>
+
+
diff --git a/nx-X11/config/cf/os2.rules b/nx-X11/config/cf/os2.rules
new file mode 100644
index 000000000..a5f26aca0
--- /dev/null
+++ b/nx-X11/config/cf/os2.rules
@@ -0,0 +1,112 @@
+XCOMM $Xorg: os2.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/os2.rules,v 3.23tsi Exp $
+
+.SUFFIXES: .Osuf .c .CCsuf
+
+.c.Osuf:
+ $(CC) $(CFLAGS) -c $*.c
+
+#if HasCplusplus
+.CCsuf.Osuf:
+ $(CXX) $(CFLAGS) -c $*.CCsuf
+#endif
+
+#ifndef UseInstalled
+#define XkbComp /xkbcomp
+#else
+#define XkbComp xkbcomp
+#endif
+
+/*
+ * same problem as with cygwin...
+ * DependDependencyStatement - Imake.rules wraps $(DEPEND) in
+ * ProgramTargetName(), which causes cross compiling to think that
+ * $(DEPEND) hasn't been built, as $(DEPEND) is a host tool, and should
+ * not be wrapped with ProgramTargetName(). Perhaps there should be
+ * a HostProgramTargetName()...
+ */
+#ifndef DependDependencyStatement
+#define DependDependencyStatement() @@\
+depend:: $(DEPEND)
+#endif
+ DEPEND2 = $(SHELL) $(DEPEND)
+
+/*
+ * DependDependency - Imake.rules wraps $(DEPEND) in ProgramTargetName().
+ * This doesn't work when cross compiling, see the locally defined
+ * DependDependencyStatement comment (above) for more information.
+ */
+
+#ifndef DependDependency
+#ifdef UseInstalled
+#define DependDependency() /**/
+#else
+#define DependDependency() @@\
+DependDependencyStatement() @@\
+ @@\
+NoCmpScript($(DEPEND)) @@\
+ @@\
+$(DEPEND): @@\
+ @echo "checking $@ over in $(DEPENDSRC) first..."; \ @@\
+ cd $(DEPENDSRC) && $(MAKE) makedependonly; \ @@\
+ echo "okay, continuing in $(CURRENT_DIR)"
+
+#endif /* UseInstalled */
+#endif /* DependDependency */
+
+/*
+ * HostLinkRule - link a utility to be used on the build host
+ * (differs from LinkRule if cross compiling)
+ */
+#ifndef HostLinkRule
+#define HostLinkRule(program,options,objects,libraries) \
+$(CCLINK) -Zmtd -o program options objects libraries $(EXTRA_LOAD_FLAGS)
+#endif
+
+#ifndef DependTarget
+#define DependTarget() @@\
+DependDependency() @@\
+ @@\
+depend:: @@\
+ $(SHELL) $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- $(SRCS)
+#endif /* DependTarget */
+
+/*
+ * DependTarget3 - generate rules to compute dependencies for all files given.
+ */
+#ifndef DependTarget3
+#define DependTarget3(srcs1,srcs2,srcs3) @@\
+DependDependency() @@\
+ @@\
+depend:: @@\
+ $(SHELL) $(DEPEND) $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs1 @@\
+ $(SHELL) $(DEPEND) -a $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs2 @@\
+ $(SHELL) $(DEPEND) -a $(DEPENDFLAGS) -- $(ALLDEFINES) $(DEPEND_DEFINES) -- srcs3
+#endif /* DependTarget3 */
+
+#ifdef UseInstalled
+#define RmanDependency() /**/
+#else
+#define RmanDependency() @@\
+NoCmpScript(ProgramTargetName($(RMAN))) @@\
+ @@\
+ProgramTargetName($(RMAN)): @@\
+ @echo "checking $@ over in $(TOP)/config/util first..."; \ @@\
+ echo "okay, continuing in $(CURRENT_DIR)"
+
+#endif /* UseInstalled */
+
+#define MakeXkbDir(basedir,subdir) @@\
+all:: Concat(subdir,.dir) @@\
+ @@\
+Concat(subdir,.dir): @@\
+ RemoveFile(Concat(subdir,.dir)) @@\
+ XkbComp -lfhlpR -o Concat(subdir,.dir) * @@\
+ @@\
+InstallTarget(install,Concat(subdir,.dir),$(INSTDATFLAGS),basedir) @@\
+ @@\
+clean:: @@\
+ RemoveFile(Concat(subdir,.dir))
diff --git a/nx-X11/config/cf/os2Lib.rules b/nx-X11/config/cf/os2Lib.rules
new file mode 100644
index 000000000..decbd72ed
--- /dev/null
+++ b/nx-X11/config/cf/os2Lib.rules
@@ -0,0 +1,210 @@
+XCOMM $Xorg: os2Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/os2Lib.rules,v 3.19 2003/10/11 09:40:15 herrb Exp $
+
+/*
+ * OS2/EMX shared library rules (DLL version)
+ *
+#ifndef __UNIXOS2__
+#error You must edit os2Lib.rules for your OS/2 dev system
+#endif */
+
+#define HasSharedLibraries YES
+#define ForceNormalLib NO
+#define SharedOldX NO
+#define SharedDataSeparation NO
+#define SharedCodeDef /**/
+#define SharedLibraryDef /**/
+#define ShLibIncludeFile <os2Lib.tmpl>
+#define SharedLibraryLoadFlags /**/
+#define PositionIndependentCFlags -Zmtd
+
+#define NormalSharedLibObjCompile(options) RemoveFile($@) @@\
+ $(CC) -c $(CFLAGS) options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $*.c
+
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: libname.dll LibraryTargetName(libname) libname.lib @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) $(DLLNAME) $(DESTDIR)dest @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) libname.a $(DESTDIR)dest @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) libname.lib $(DESTDIR)dest
+
+#define LinkBuildLibrary2(slib,ext) MakeDir($(BUILDLIBDIR)) @@\
+ RemoveFile($(BUILDLIBDIR)/slib.ext) @@\
+ (cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/slib.ext .)
+
+#define LinkBuildLibrary3(slib,rev,ext) MakeDir($(BUILDLIBDIR)) @@\
+ RemoveFile($(BUILDLIBDIR)/Concat3(slib,rev,ext)) @@\
+ (cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/Concat3(slib,rev,ext) .)
+
+#define LinkBuildLibrary4(pre,slib,rev,ext) MakeDir($(BUILDLIBDIR)) @@\
+ RemoveFile($(BUILDLIBDIR)/Concat4(pre,slib,rev,ext)) @@\
+ (cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/Concat4(pre,slib,rev,ext) .)
+
+#define LinkBuildLibrary5(slib,rev,ext) MakeDir($(BUILDLIBDIR)) @@\
+ RemoveFile($(BUILDLIBDIR)/$(DLLNAME)) @@\
+ (cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/$(INSTDLLNAME) .)
+
+ EMXIMP = emximp
+ EMXOMF = emxomf -p 32
+ SHLD = gcc -Zdll -Zmtd -Zmap -Zbin-files
+ SHXXLD = g++ -Zdll -Zmtd -Zmap -Zbin-files
+ SHADDLIBS = ExtraLibraries -lc_import
+ DLLNAME = `cat $(TOP)/$(CURRENT_DIR)/dll.name`
+ INSTDLLNAME = `cat $(BUILDINCTOP)/$(CURRENT_DIR)/dll.name`
+
+#define BuildDllSupportLibs3(slib,rev) @@\
+ $(EMXIMP) -o Concat3(slib,rev,.imp) Concat3(slib,os2,.def) @@\
+ $(EMXIMP) -o Concat4(lib,slib,rev,.a) Concat3(slib,rev,.imp) @@\
+ $(EMXIMP) -o Concat3(slib,rev,_o.imp) Concat3(slib,o_os2,.def) @@\
+ $(EMXIMP) -o Concat3(slib,rev,.a) Concat3(slib,rev,_o.imp) @@\
+ $(EMXOMF) -s -l -o Concat3(slib,rev,.lib) Concat3(slib,rev,.a) @@\
+ LinkBuildLibrary4(lib,slib,rev,.a) @@\
+
+#define BuildLibSupportLibs(slib) @@\
+ $(EMXOMF) -s -l -o Concat(slib,.lib) Concat(slib,.a) @@\
+ LinkBuildLibrary3(lib,slib,.a) @@\
+
+#define BuildLibSupportLibs2(slib) @@\
+ $(EMXOMF) -s -l -o Concat(slib,.lib) Concat3(lib,slib,.a) @@\
+ LinkBuildLibrary3(lib,slib,.a) @@\
+
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat3(libname,rev,.dll)) @@\
+.SUFFIXES: .def @@\
+ @@\
+Concat(libname,os2.def): Concat(libname,-def.cpp) @@\
+ cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) $(CONFIGSRC)/cf/os2def.db libname @@\
+ cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) -O1 $(CONFIGSRC)/cf/os2def.db libname @@\
+ @@\
+Concat3(libname,rev,.dll): solist Concat(libname,os2.def) @@\
+ RemoveFile($@) @@\
+ $(SHLD) -o $(DLLNAME) solist $(REQUIREDLIBS) $(SHADDLIBS) Concat(libname,o_os2.def) @@\
+ touch $@ @@\
+ BuildDllSupportLibs3(libname,rev) @@\
+ LinkBuildLibrary5(libname,rev,.dll) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(Concat3(libname,rev,.imp) Concat3(libname,rev,_o.imp)) @@\
+ RemoveFiles(Concat(libname,os2.def) Concat(libname,o_os2.def)) @@\
+ RemoveFile(dll.name)
+
+#define NormalLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetName(libname)) @@\
+ @@\
+LibraryTargetName(libname): objlist @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,objlist) @@\
+ BuildLibSupportLibs2(libname)
+
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat3(libname,rev,.dll)) @@\
+ @@\
+Concat(libname,os2.def): deplist $(EXTRALIBRARYDEPS) Concat(libname,-def.cpp) @@\
+ cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) $(CONFIGSRC)/cf/os2def.db libname @@\
+ cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) -O1 $(CONFIGSRC)/cf/os2def.db libname @@\
+ @@\
+Concat3(libname,rev,.dll): Concat(libname,os2.def) @@\
+ RemoveFile($@) @@\
+ (cd down; $(SHLD) -o up/$(DLLNAME) solist $(REQUIREDLIBS) $(SHADDLIBS) Concat(libname,o_os2.def)) @@\
+ touch $@ @@\
+ BuildDllSupportLibs3(libname,rev) @@\
+ LinkBuildLibrary5(libname,rev,.dll) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(Concat3(libname,rev,.imp) Concat3(libname,rev,_o.imp)) @@\
+ RemoveFiles(Concat(libname,os2.def) Concat(libname,o_os2.def)) @@\
+ RemoveFile(dll.name)
+
+#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat3(libname,rev,.dll)) @@\
+ @@\
+Concat(libname,os2.def): deplist $(EXTRALIBRARYDEPS) Concat(libname,-def.cpp) @@\
+ cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) $(CONFIGSRC)/cf/os2def.db libname @@\
+ cmd /c $(subst /,\\,$(CONFIGSRC)/util/makedef.cmd) -O1 $(CONFIGSRC)/cf/os2def.db libname @@\
+ @@\
+Concat3(libname,rev,.dll): Concat(libname,os2.def) @@\
+ RemoveFile($@) @@\
+ (cd down; $(SHXXLD) -o up/$(DLLNAME) solist $(REQUIREDLIBS) $(SHADDLIBS) Concat(libname,o_os2.def)) @@\
+ touch $@ @@\
+ BuildDllSupportLibs3(libname,rev) @@\
+ LinkBuildLibrary5(libname,rev,.dll) @@\
+ @@\
+clean:: @@\
+ RemoveFiles(Concat3(libname,rev,.imp) Concat3(libname,rev,_o.imp)) @@\
+ RemoveFiles(Concat(libname,os2.def) Concat(libname,o_os2.def)) @@\
+ RemoveFile(dll.name)
+
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(CC) -o $@ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) BaseShLibReqs @@\
+ @@\
+clean:: @@\
+ RemoveFile(name)
+
+#define SharedLibraryDataTarget(libname,rev,salist)
+
+#define InstallSharedLibraryData(libname,rev,dest)
+
+#define InstallLibrary(libname,dest) @@\
+install:: LibraryTargetName(libname) Concat(libname,.lib) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(libname,.lib) $(DESTDIR)dest @@\
+ RanLibrary($(RANLIBINSTFLAGS) $(DESTDIR)dest/LibraryTargetName(libname))
+
+#define MakeStaticLibrary(libname) $(AR) libname *.o
+
+#define UnsharedLibraryTarget(libname,objlist,down,up) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_s)) @@\
+ @@\
+LibraryTargetNameSuffix(libname,_s): objlist @@\
+ RemoveFile($@) @@\
+ (cd down; MakeStaticLibrary(up/$@)) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@) @@\
+ @@\
+install:: LibraryTargetNameSuffix(libname,_s) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetNameSuffix(libname,_s) $(DESTDIR)$(SHLIBDIR)
+
+#define UnsharedLibraryTarget3(libname,objlist1,objlist2,objlist3,down,up) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_s)) @@\
+ @@\
+LibraryTargetNameSuffix(libname,_s): objlist1 objlist2 objlist3 @@\
+ RemoveFile($@) @@\
+ (cd down; MakeStaticLibrary(up/$@)) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@) @@\
+ @@\
+install:: LibraryTargetNameSuffix(libname,_s) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetNameSuffix(libname,_s) $(DESTDIR)$(SHLIBDIR)
+
+#define DebuggedLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_d)) @@\
+ @@\
+LibraryTargetNameSuffix(libname,_d): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ (cd debugger; MakeStaticLibrary(../$@)) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@)
+
+#define ProfiledLibraryTarget(libname,objlist) @@\
+AllTarget(LibraryTargetNameSuffix(libname,_p)) @@\
+ @@\
+LibraryTargetNameSuffix(libname,_p): objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ (cd profiled; MakeStaticLibrary(../$@)) @@\
+ RanLibrary($@) @@\
+ _LinkBuildLibrary($@)
+
+#define LibraryModuleTarget(module,objlist) @@\
+AllTarget(LibraryTargetName(module)) @@\
+ @@\
+LibraryTargetName(module): objlist @@\
+ RemoveFile($@) @@\
+ MakeLibrary($@,objlist)
diff --git a/nx-X11/config/cf/os2Lib.tmpl b/nx-X11/config/cf/os2Lib.tmpl
new file mode 100644
index 000000000..522993031
--- /dev/null
+++ b/nx-X11/config/cf/os2Lib.tmpl
@@ -0,0 +1,208 @@
+XCOMM $XdotOrg: xc/config/cf/os2Lib.tmpl,v 1.5 2004/09/02 01:10:28 kem Exp $
+XCOMM $Xorg: os2Lib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/os2Lib.tmpl,v 3.18 2003/11/12 00:10:23 dawes Exp $
+
+/*
+ * OS2/EMX shared library template
+ *
+#ifndef __UNIXOS2__
+#error You must edit os2Lib.tmpl for your (non-EMX) OS/2 dev system
+#endif */
+
+#define SharedLibFont NO
+
+#define SharedX11Reqs $(LDPRELIB) -lshm
+#define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXmuuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIB) $(XLIB)
+#define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+#define SharedXtstReqs $(LDPRELIB) $(XLIB)
+#define SharedSMReqs $(LDPRELIB) $(ICELIB)
+#define SharedXpReqs $(LDPRELIB) $(XLIB)
+#define SharedXvReqs $(LDPRELIB) $(XLIB)
+#define SharedGLReqs $(LDPRELIB) $(XLIB)
+#define SharedXfontReqs $(LDPRELIB) $(XLIB)
+#define SharedXpmReqs $(LDPRELIB) $(XLIB)
+#define SharedDPSReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedDPSTKReqs $(LDPRELIB) $(DPSLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXssReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB)
+#define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB)
+#define SharedXineramaReqs $(LDPRELIB) $(XLIB)
+#define SharedXvMCReqs $(LDPRELIB) $(XLIB)
+#define SharedXResReqs $(LDPRELIB) $(XLIB)
+#define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+#define SharedFontencReqs $(LDPRELIB) GzipLibrary
+
+/* library revisions, these are typically empty! */
+#define SharedX11Rev /**/
+#define SharedXextRev /**/
+#define SharedXssRev /**/
+#define SharedXxf86miscRev /**/
+#define SharedXxf86vmRev /**/
+#define SharedXxf86dgaRev /**/
+#define SharedXxf86rushRev /**/
+#define SharedXvRev /**/
+#define SharedXineramaRev /**/
+#define SharedDpsRev /**/
+#define SharedDpsTkRev /**/
+#define SharedPSResRev /**/
+#define SharedGlxRev /**/
+#define SharedXfontcacheRev /**/
+#define SharedXauRev /**/
+#define SharedXdmcpRev /**/
+#define SharedXmuRev /**/
+#define SharedXmuuRev /**/
+#define SharedOldXRev /**/
+#define SharedXpRev /**/
+#define SharedXtRev /**/
+#define SharedXaRev /**/
+#define SharedXawRev /**/
+#define SharedXaw7Rev 7
+#define SharedXaw6Rev 6
+#define SharedXiRev /**/
+#define SharedXtstRev /**/
+#define SharedICERev /**/
+#define SharedSMRev /**/
+#define SharedXkeyRev /**/
+#define SharedFSRev /**/
+#define SharedFontRev /**/
+#define SharedXpmRev /**/
+#define SharedGluRev /**/
+#define SharedXrenderRev /**/
+#define SharedXrandrRev /**/
+#define SharedXftRev /**/
+#define SharedXft1Rev 1
+#define SharedFreetype2Rev /**/
+#define SharedXTrapRev /**/
+#define SharedExpatRev /**/
+#define SharedFontconfigRev /**/
+#define SharedXcursorRev /**/
+#define SharedxkbfileRev /**/
+#define SharedXvMCRev /**/
+#define SharedXResRev /**/
+#define SharedFontEncRev /**/
+
+/*
+ * By setting this in your Imakefile, you can force using static libraries
+ * to be linked with you app, rather than DLLs
+ */
+#ifndef LinkStatically
+#define LinkStatically NO
+#endif
+
+#if LinkStatically
+#define SDlibX11 -lX11_s
+#define SDlibXExt -lXExt_s
+#define SDlibXmu -lXmu_s
+#define SDlibXt -lXt_s
+#define SDlibXaw -lXaw_s
+#define SDlibXaw7 -lXaw_s
+#define SDlibXaw6 -lXaw_s
+#define SDlibXi -lXi_s
+#define SDlibXtst -lXtst_s
+#define SDlibXp -lXp_s
+#define SDlibXv -lXv_s
+#define SDlibGL -lGL_s
+#define SDlibDPS -lDPS_s
+#define SDlibDPSTK -lDPSTK_s
+#else
+#define SDlibX11 -lX11
+#define SDlibXExt -lXExt
+#define SDlibXmu -lXmu
+#define SDlibXt -lXt
+#define SDlibXaw -lXaw
+#define SDlibXaw7 -lXaw
+#define SDlibXaw6 -lXaw
+#define SDlibXi -lXi
+#define SDlibXtst -lXtst
+#define SDlibXp -lXp
+#define SDlibXv -lXv
+#define SDlibGL -lGL
+#define SDlibDPS -lDPS
+#define SDlibDPSTK -lDPSTK
+#endif
+
+/*
+ * and now a little bit of magic for using imake without source tree; if we
+ * are using shared libraries, we really do not need to depend on anything
+ */
+#if SharedLibXext
+ DEPEXTENSIONLIB =
+ EXTENSIONLIB = _Use(SDlibXExt,-L$(EXTENSIONSRC)/lib SDlibXExt)
+#endif
+#if SharedLibX11
+ DEPXLIB =
+ XLIB = $(EXTENSIONLIB) _Use(SDlibX11,-L$(XLIBSRC) SDlibX11)
+#endif
+#if SharedLibXmu
+ DEPXMULIB =
+ XMULIB = _Use(SDlibXmu,-L$(XMUSRC) SDlibXmu) $(XLIB)
+#ifndef XawClientLibs
+#define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+#endif
+#if SharedOldX
+ DEPOLDXLIB =
+ OLDXLIB = _Use(-loldX,-L$(OLDXLIBSRC) -loldX)
+#endif
+#if SharedLibXt
+ DEPXTOOLLIB =
+ XTOOLLIB = _Use(SDlibXt,-L$(TOOLKITSRC) SDlibXt)
+#endif
+#if SharedLibXaw
+ DEPXAWLIB =
+ XAWLIB = _Use(SDlibXaw,-L$(AWIDGETSRC) SDlibXaw)
+#endif
+#if SharedLibXaw7
+ DEPXAW7LIB =
+ XAW7LIB = _Use(SDlibXaw7,-L$(AWIDGETSRC) SDlibXaw7)
+#endif
+#if SharedLibXaw6
+ DEPXAW6LIB =
+ XAW6LIB = _Use(SDlibXaw6,-L$(AWIDGETSRC) SDlibXaw6)
+#endif
+#if SharedLibXi
+ DEPXILIB =
+ XILIB = _Use(SDlibXi,-L$(XILIBSRC) SDlibXi)
+#endif
+#if SharedLibXTest
+ DEPXTESTLIB =
+ XTESTLIB = _Use(SDlibXtst,-L$(EXTENSIONSRC)/lib/xtest SDlibXtst)
+#endif
+#if SharedLibXp
+ DEPXPLIB =
+ XPLIB = _Use(SDlibXp,-L$(EXTENSIONSRC)/lib SDlibXp)
+#endif
+#if SharedLibXv
+ DEPXVLIB =
+ XVLIB = _Use(SDlibXv,-L$(EXTENSIONSRC)/lib SDlibXv)
+#endif
+#if SharedLibGL
+ DEPGLLIB =
+ GLLIB = _Use(SDlibGL,-L$(EXTENSIONSRC)/lib SDlibGL)
+#endif
+#if SharedLibDPS
+ DEPDPSLIB =
+ DPSLIB = _Use(SDlibDPS,-L$(EXTENSIONSRC)/lib SDlibDPS)
+#endif
+#if SharedLibDPSTK
+ DEPDPSTKLIB =
+ DPSTKLIB = _Use(SDlibDPSTK,-L$(EXTENSIONSRC)/lib SDlibDPSTK)
+#endif
+
diff --git a/nx-X11/config/cf/os2def.db b/nx-X11/config/cf/os2def.db
new file mode 100644
index 000000000..095b3e548
--- /dev/null
+++ b/nx-X11/config/cf/os2def.db
@@ -0,0 +1,5095 @@
+; This table is the central conversion table for symbols exported
+; by OS/2 DLLs. It replaces the old *os2.def files. It requires a
+; WinNT *-def.cpp file, though, and the script xc/config/util/makedef.cmd.
+; If you want to add a new symbol use a new ordinal number,
+; don't replace existing ones, because this would introduce incompatibilities
+; with existing code.
+;
+; ATTENTION! When adding new items, the field delimiter is expected to
+; be TAB, not a nice looking number of spaces! Don't try to beautify this
+; file!!!!
+;
+; $XFree86: xc/config/cf/os2def.db,v 1.7 2003/11/12 00:10:23 dawes Exp $
+;
+LIBRARY X11 X11
+X11 XSaveContext 1
+X11 XFindContext 2
+X11 XDeleteContext 3
+X11 XListDepths 4
+X11 XrmParseCommand 5
+X11 Xpermalloc 6
+X11 _XrmInternalStringToQuark 7
+X11 XrmStringToQuark 8
+X11 XrmPermStringToQuark 9
+X11 XrmUniqueQuark 10
+X11 XrmQuarkToString 11
+X11 XAllocColorCells 12
+X11 XAllocColorPlanes 13
+X11 XAllowEvents 14
+X11 XAutoRepeatOn 15
+X11 XAutoRepeatOff 16
+X11 XSetWindowBackground 17
+X11 XSetWindowBorderWidth 18
+X11 XBell 19
+X11 XSetWindowBorder 20
+X11 XEnableAccessControl 21
+X11 XDisableAccessControl 22
+X11 XSetAccessControl 23
+X11 XSetCloseDownMode 24
+X11 XChangeActivePointerGrab 25
+X11 XSetWindowColormap 26
+X11 XChangeGC 27
+X11 XChangeKeyboardControl 28
+X11 XChangePointerControl 29
+X11 XChangeProperty 30
+X11 XChangeSaveSet 31
+X11 XAddToSaveSet 32
+X11 XRemoveFromSaveSet 33
+X11 XChangeWindowAttributes 34
+X11 XResizeWindow 35
+X11 XCheckIfEvent 36
+X11 XCheckMaskEvent 37
+X11 XCheckWindowEvent 38
+X11 XCheckTypedEvent 39
+X11 XCheckTypedWindowEvent 40
+X11 XCirculateSubwindows 41
+X11 XCirculateSubwindowsDown 42
+X11 XCirculateSubwindowsUp 43
+X11 XCloseDisplay 44
+X11 XClearWindow 45
+X11 XClearArea 46
+X11 XMoveResizeWindow 47
+X11 _XConnectDisplay 48
+X11 _XDisconnectDisplay 49
+X11 _XSendClientPrefix 50
+X11 XSetAuthorization 51
+X11 XConvertSelection 52
+X11 XCopyArea 53
+X11 XCopyColormapAndFree 54
+X11 XCopyGC 55
+X11 XCopyPlane 56
+X11 XCreateBitmapFromData 57
+X11 XCreateColormap 58
+X11 XCreatePixmapCursor 59
+X11 XCreateGC 60
+X11 _XUpdateGCCache 61
+X11 _XFlushGCCache 62
+X11 XFlushGC 63
+X11 XGContextFromGC 64
+X11 XCreateGlyphCursor 65
+X11 XCreatePixmapFromBitmapData 66
+X11 XCreatePixmap 67
+X11 XCreateSimpleWindow 68
+X11 XCreateFontCursor 69
+X11 XDefineCursor 70
+X11 XDeleteProperty 71
+X11 XDestroySubwindows 72
+X11 XDestroyWindow 73
+X11 XDisplayName 74
+X11 XDrawArc 75
+X11 XDrawArcs 76
+X11 XDrawLine 77
+X11 XDrawLines 78
+X11 XDrawPoint 79
+X11 XDrawPoints 80
+X11 XDrawRectangle 81
+X11 XDrawRectangles 82
+X11 XDrawSegments 83
+X11 XGetErrorText 84
+X11 XGetErrorDatabaseText 85
+X11 XSetErrorHandler 86
+X11 XSetIOErrorHandler 87
+X11 _XEventToWire 88
+X11 XFetchName 89
+X11 XGetIconName 90
+X11 XFillArc 91
+X11 XFillArcs 92
+X11 XFillPolygon 93
+X11 XFillRectangle 94
+X11 XFillRectangles 95
+X11 XFlush 96
+X11 XLoadQueryFont 97
+X11 XFreeFont 98
+X11 XQueryFont 99
+X11 XListFonts 100
+X11 XFreeFontNames 101
+X11 XListFontsWithInfo 102
+X11 XFreeFontInfo 103
+X11 XFreeColormap 104
+X11 XFreeColors 105
+X11 XFreeCursor 106
+X11 _XFreeExtData 107
+X11 XFreeGC 108
+X11 XFreePixmap 109
+X11 XActivateScreenSaver 110
+X11 XResetScreenSaver 111
+X11 XForceScreenSaver 112
+X11 XSetArcMode 113
+X11 XSetFillRule 114
+X11 XSetFillStyle 115
+X11 XSetGraphicsExposures 116
+X11 XSetSubwindowMode 117
+X11 XGeometry 118
+X11 XGetAtomName 119
+X11 XAllocNamedColor 120
+X11 XGetDefault 121
+X11 XGetFontPath 122
+X11 XFreeFontPath 123
+X11 XGetFontProperty 124
+X11 XGetGeometry 125
+X11 XAllocColor 126
+X11 XGetSizeHints 127
+X11 XGetWMHints 128
+X11 XGetZoomHints 129
+X11 XGetNormalHints 130
+X11 XGetIconSizes 131
+X11 XGetCommand 132
+X11 XGetTransientForHint 133
+X11 XGetClassHint 134
+X11 XGetInputFocus 135
+X11 XGetImage 136
+X11 XGetSubImage 137
+X11 XGetKeyboardControl 138
+X11 XGetMotionEvents 139
+X11 XGetPointerControl 140
+X11 XGetPointerMapping 141
+X11 XGetKeyboardMapping 142
+X11 XGetWindowProperty 143
+X11 XGetSelectionOwner 144
+X11 XGetScreenSaver 145
+X11 XGetStandardColormap 146
+X11 XGetWindowAttributes 147
+X11 XGrabButton 148
+X11 XGrabKey 149
+X11 XGrabKeyboard 150
+X11 XGrabPointer 151
+X11 XGrabServer 152
+X11 XAddHost 153
+X11 XRemoveHost 154
+X11 XAddHosts 155
+X11 XRemoveHosts 156
+X11 XIfEvent 157
+X11 _XGetScanlinePad 158
+X11 _XGetBitsPerPixel 159
+X11 XCreateImage 160
+X11 _XSetImage 161
+X11 _XInitImageFuncPtrs 162
+X11 XDrawImageString 163
+X11 XDrawImageString16 164
+X11 XInitExtension 165
+X11 XAddExtension 166
+X11 XEHeadOfExtensionList 167
+X11 XAddToExtensionList 168
+X11 XFindOnExtensionList 169
+X11 XESetCreateGC 170
+X11 XESetCopyGC 171
+X11 XESetFlushGC 172
+X11 XESetFreeGC 173
+X11 XESetCreateFont 174
+X11 XESetFreeFont 175
+X11 XESetCloseDisplay 176
+X11 XESetWireToEvent 177
+X11 XESetEventToWire 178
+X11 XESetWireToError 179
+X11 XESetError 180
+X11 XESetErrorString 181
+X11 XESetPrintErrorValues 182
+X11 XInstallColormap 183
+X11 XInternAtom 184
+X11 XKeycodeToKeysym 185
+X11 XKeysymToKeycode 186
+X11 XLookupKeysym 187
+X11 XRefreshKeyboardMapping 188
+X11 XLookupString 189
+X11 XRebindKeysym 190
+X11 XKeysymToString 191
+X11 XKillClient 192
+X11 XListHosts 193
+X11 XListInstalledColormaps 194
+X11 XListProperties 195
+X11 XListExtensions 196
+X11 XFreeExtensionList 197
+X11 XLoadFont 198
+X11 XLookupColor 199
+X11 XLowerWindow 200
+X11 XConnectionNumber 942
+X11 XRootWindow 943
+X11 XDefaultScreen 201
+X11 XDefaultRootWindow 202
+X11 XDefaultVisual 203
+X11 XDefaultGC 204
+X11 XBlackPixel 205
+X11 XWhitePixel 206
+X11 XAllPlanes 207
+X11 XQLength 208
+X11 XDisplayWidth 209
+X11 XDisplayHeight 210
+X11 XDisplayWidthMM 211
+X11 XDisplayHeightMM 212
+X11 XDisplayPlanes 213
+X11 XDisplayCells 214
+X11 XScreenCount 215
+X11 XServerVendor 216
+X11 XProtocolVersion 217
+X11 XProtocolRevision 218
+X11 XVendorRelease 219
+X11 XDisplayString 220
+X11 XDefaultDepth 221
+X11 XDefaultColormap 222
+X11 XBitmapUnit 223
+X11 XBitmapBitOrder 224
+X11 XBitmapPad 225
+X11 XImageByteOrder 226
+X11 XNextRequest 227
+X11 XLastKnownRequestProcessed 228
+X11 XScreenOfDisplay 229
+X11 XDefaultScreenOfDisplay 230
+X11 XDisplayOfScreen 231
+X11 XRootWindowOfScreen 232
+X11 XBlackPixelOfScreen 233
+X11 XWhitePixelOfScreen 234
+X11 XDefaultColormapOfScreen 235
+X11 XDefaultDepthOfScreen 236
+X11 XDefaultGCOfScreen 237
+X11 XDefaultVisualOfScreen 238
+X11 XWidthOfScreen 239
+X11 XHeightOfScreen 240
+X11 XWidthMMOfScreen 241
+X11 XHeightMMOfScreen 242
+X11 XPlanesOfScreen 243
+X11 XCellsOfScreen 244
+X11 XMinCmapsOfScreen 245
+X11 XMaxCmapsOfScreen 246
+X11 XDoesSaveUnders 247
+X11 XDoesBackingStore 248
+X11 XEventMaskOfScreen 249
+X11 XScreenNumberOfScreen 250
+X11 XDestroyImage 251
+X11 XGetPixel 252
+X11 XPutPixel 253
+X11 XSubImage 254
+X11 XAddPixel 255
+X11 XNoOp 256
+X11 XMapRaised 257
+X11 XMapSubwindows 258
+X11 XMapWindow 259
+X11 XMaskEvent 260
+X11 XMaxRequestSize 261
+X11 XResourceManagerString 262
+X11 XDisplayMotionBufferSize 263
+X11 XDisplayKeycodes 264
+X11 XVisualIDFromVisual 265
+X11 XGetModifierMapping 266
+X11 XSetModifierMapping 267
+X11 XNewModifiermap 268
+X11 XFreeModifiermap 269
+X11 XInsertModifiermapEntry 270
+X11 XDeleteModifiermapEntry 271
+X11 XMoveWindow 272
+X11 XNextEvent 273
+X11 XOpenDisplay 274
+X11 _XFreeDisplayStructure 275
+X11 XParseColor 276
+X11 XParseGeometry 277
+X11 XPeekEvent 278
+X11 XPeekIfEvent 279
+X11 XEventsQueued 280
+X11 XPending 281
+X11 XSetWindowBackgroundPixmap 282
+X11 XSetWindowBorderPixmap 283
+X11 XPolygonRegion 284
+X11 XDrawText 285
+X11 XDrawText16 286
+X11 XPutBackEvent 287
+X11 _XReverse_Bytes 288
+X11 XPutImage 289
+X11 XQueryBestSize 290
+X11 XQueryColor 291
+X11 XQueryColors 292
+X11 XQueryBestCursor 293
+X11 XQueryExtension 294
+X11 XQueryKeymap 295
+X11 XQueryPointer 296
+X11 XQueryBestStipple 297
+X11 XQueryTextExtents16 298
+X11 XQueryTextExtents 299
+X11 XQueryBestTile 300
+X11 XQueryTree 301
+X11 XRaiseWindow 302
+X11 XReadBitmapFile 303
+X11 XRecolorCursor 304
+X11 XConfigureWindow 305
+X11 XCreateRegion 306
+X11 XClipBox 307
+X11 XUnionRectWithRegion 308
+X11 XSetRegion 309
+X11 XDestroyRegion 310
+X11 XOffsetRegion 311
+X11 XShrinkRegion 312
+X11 XIntersectRegion 313
+X11 XUnionRegion 314
+X11 XSubtractRegion 315
+X11 XXorRegion 316
+X11 XEmptyRegion 317
+X11 XEqualRegion 318
+X11 XPointInRegion 319
+X11 XRectInRegion 320
+X11 XReparentWindow 321
+X11 XRestackWindows 322
+X11 XRotateWindowProperties 323
+X11 XScreenResourceString 324
+X11 XSelectInput 325
+X11 XSendEvent 326
+X11 XSetBackground 327
+X11 XSetClipRectangles 328
+X11 _XSetClipRectangles 329
+X11 XSetClipMask 330
+X11 XSetClipOrigin 331
+X11 XSetDashes 332
+X11 XSetFontPath 333
+X11 XSetFont 334
+X11 XSetForeground 335
+X11 XSetFunction 336
+X11 XSetSizeHints 337
+X11 XSetWMHints 338
+X11 XSetZoomHints 339
+X11 XSetNormalHints 340
+X11 XSetIconSizes 341
+X11 XSetCommand 342
+X11 XSetStandardProperties 343
+X11 XSetTransientForHint 344
+X11 XSetClassHint 345
+X11 XSetInputFocus 346
+X11 XSetLineAttributes 347
+X11 XSetPlaneMask 348
+X11 XSetPointerMapping 349
+X11 XChangeKeyboardMapping 350
+X11 XSetSelectionOwner 351
+X11 XSetScreenSaver 352
+X11 XSetState 353
+X11 XSetStipple 354
+X11 XSetStandardColormap 355
+X11 XSetTile 356
+X11 XSetTSOrigin 357
+X11 XRotateBuffers 358
+X11 XFetchBuffer 359
+X11 XFetchBytes 360
+X11 XStoreBuffer 361
+X11 XStoreBytes 362
+X11 XStoreColor 363
+X11 XStoreColors 364
+X11 XStoreNamedColor 365
+X11 XStoreName 366
+X11 XSetIconName 367
+X11 _XInitKeysymDB 368
+X11 XStringToKeysym 369
+X11 XSync 370
+X11 _XSyncFunction 371
+X11 XSynchronize 372
+X11 XSetAfterFunction 373
+X11 XDrawString 374
+X11 XDrawString16 375
+X11 XTextExtents 376
+X11 XTextWidth 377
+X11 XTextExtents16 378
+X11 XTextWidth16 379
+X11 XTranslateCoordinates 380
+X11 XUndefineCursor 381
+X11 XUngrabButton 382
+X11 XUngrabKeyboard 383
+X11 XUngrabKey 384
+X11 XUngrabPointer 385
+X11 XUngrabServer 386
+X11 XUninstallColormap 387
+X11 XUnloadFont 388
+X11 XUnmapSubwindows 389
+X11 XUnmapWindow 390
+X11 XGetVisualInfo 391
+X11 XMatchVisualInfo 392
+X11 XWarpPointer 393
+X11 XWindowEvent 394
+X11 XCreateWindow 395
+X11 _XProcessWindowAttributes 396
+X11 XWriteBitmapFile 397
+X11 _XFlush 398
+X11 _XEventsQueued 399
+X11 _XReadEvents 400
+X11 _XRead 401
+X11 _XReadPad 402
+X11 _XSend 403
+X11 _XAllocID 404
+X11 _XSetLastRequestRead 405
+X11 _XReply 406
+X11 _XEatData 407
+X11 _XEnq 408
+X11 _XUnknownWireEvent 409
+X11 _XUnknownNativeEvent 410
+X11 _XWireToEvent 411
+X11 _XDefaultIOError 412
+X11 _XDefaultError 413
+X11 _XDefaultWireError 414
+X11 _XError 415
+X11 _XIOError 416
+X11 _XAllocScratch 417
+X11 _XVIDtoVisual 418
+X11 XFree 419
+X11 _XGetHostname 420
+X11 _XScreenOfWindow 421
+X11 _XAllocIDs 423
+X11 _XAllocTemp 424
+X11 _XFreeTemp 425
+X11 XrmInitialize 426
+X11 XrmGetDatabase 427
+X11 XrmSetDatabase 428
+X11 XrmStringToQuarkList 429
+X11 XrmStringToBindingQuarkList 430
+X11 XrmCombineDatabase 431
+X11 XrmMergeDatabases 432
+X11 XrmQPutResource 433
+X11 XrmPutResource 434
+X11 XrmQPutStringResource 435
+X11 XrmPutStringResource 436
+X11 XrmPutLineResource 437
+X11 XrmGetStringDatabase 438
+X11 XrmGetFileDatabase 439
+X11 XrmCombineFileDatabase 440
+X11 XrmEnumerateDatabase 441
+X11 XrmPutFileDatabase 442
+X11 XrmQGetSearchList 443
+X11 XrmQGetSearchResource 444
+X11 XrmQGetResource 445
+X11 XrmGetResource 446
+X11 XrmLocaleOfDatabase 447
+X11 XrmDestroyDatabase 448
+X11 XGetGCValues 449
+X11 XGetWMSizeHints 450
+X11 XGetWMNormalHints 451
+X11 XGetRGBColormaps 452
+X11 XGetTextProperty 453
+X11 XGetWMName 454
+X11 XGetWMIconName 455
+X11 XGetWMClientMachine 456
+X11 XGetWMColormapWindows 457
+X11 XGetWMProtocols 458
+X11 XIconifyWindow 459
+X11 XListPixmapFormats 460
+X11 XAllocSizeHints 461
+X11 XAllocStandardColormap 462
+X11 XAllocWMHints 463
+X11 XAllocClassHint 464
+X11 XAllocIconSize 465
+X11 XReconfigureWMWindow 466
+X11 XSetWMSizeHints 467
+X11 XSetWMNormalHints 468
+X11 XSetRGBColormaps 469
+X11 XSetTextProperty 470
+X11 XSetWMName 471
+X11 XSetWMIconName 472
+X11 XSetWMClientMachine 473
+X11 XSetWMColormapWindows 474
+X11 XSetWMProperties 475
+X11 XSetWMProtocols 476
+X11 XStringListToTextProperty 477
+X11 XTextPropertyToStringList 478
+X11 XFreeStringList 479
+X11 XWMGeometry 480
+X11 XWithdrawWindow 481
+X11 XauDisposeAuth 482
+X11 XauGetBestAuthByAddr 483
+X11 XauFileName 484
+X11 XauReadAuth 485
+X11 XcmsCIELabToCIEXYZ 486
+X11 XcmsCIEXYZToCIELab 487
+X11 XcmsCIELabClipab 488
+X11 XcmsCIELabClipL 489
+X11 XcmsCIELabClipLab 490
+X11 XcmsCIELabQueryMinL 491
+X11 XcmsCIELabQueryMaxC 492
+X11 XcmsCIELabQueryMaxL 493
+X11 _XcmsCIELabQueryMaxLCRGB 494
+X11 XcmsCIELabQueryMaxLC 495
+X11 XcmsCIELabWhiteShiftColors 496
+X11 XcmsCIELuvToCIEuvY 497
+X11 XcmsCIEuvYToCIELuv 498
+X11 XcmsCIELuvClipuv 499
+X11 XcmsCIELuvClipL 500
+X11 XcmsCIELuvClipLuv 501
+X11 XcmsCIELuvQueryMinL 502
+X11 XcmsCIELuvQueryMaxC 503
+X11 XcmsCIELuvQueryMaxL 504
+X11 _XcmsCIELuvQueryMaxLCRGB 505
+X11 XcmsCIELuvQueryMaxLC 506
+X11 XcmsCIELuvWhiteShiftColors 507
+X11 XcmsCIEuvYToCIEXYZ 508
+X11 XcmsCIEXYZToCIEuvY 509
+X11 XcmsCIExyYToCIEXYZ 510
+X11 XcmsCIEXYZToCIExyY 511
+X11 XcmsTekHVCToCIEuvY 512
+X11 XcmsCIEuvYToTekHVC 513
+X11 _XcmsTekHVC_CheckModify 514
+X11 XcmsTekHVCClipC 515
+X11 XcmsTekHVCClipV 516
+X11 XcmsTekHVCClipVC 517
+X11 XcmsTekHVCQueryMinV 518
+X11 XcmsTekHVCQueryMaxC 519
+X11 XcmsTekHVCQueryMaxV 520
+X11 _XcmsTekHVCQueryMaxVCRGB 521
+X11 XcmsTekHVCQueryMaxVC 522
+X11 XcmsTekHVCQueryMaxVSamples 523
+X11 XcmsTekHVCWhiteShiftColors 524
+X11 XcmsAddColorSpace 525
+X11 XcmsAddFunctionSet 526
+X11 XcmsAllocNamedColor 527
+X11 XcmsAllocColor 528
+X11 XcmsCreateCCC 529
+X11 XcmsDefaultCCC 530
+X11 XcmsFreeCCC 531
+X11 _XcmsAddCmapRec 532
+X11 _XcmsCopyCmapRecAndFree 533
+X11 _XcmsDeleteCmapRec 534
+X11 XcmsCCCOfColormap 535
+X11 _XcmsCopyISOLatin1Lowered 536
+X11 _XcmsResolveColorString 537
+X11 _XcmsConvertColorsWithWhitePt 538
+X11 _XcmsEqualWhitePts 539
+X11 _XcmsDIConvertColors 540
+X11 _XcmsDDConvertColors 541
+X11 XcmsConvertColors 542
+X11 _XcmsRegFormatOfPrefix 543
+X11 XcmsFormatOfPrefix 544
+X11 _XcmsCopyPointerArray 545
+X11 _XcmsFreePointerArray 546
+X11 _XcmsPushPointerArray 547
+X11 _XcmsInitDefaultCCCs 548
+X11 _XcmsInitScrnInfo 549
+X11 _XcmsFreeIntensityMaps 550
+X11 _XcmsGetIntensityMap 551
+X11 _XcmsGetTableType0 552
+X11 _XcmsGetTableType1 553
+X11 _XcmsValueCmp 554
+X11 _XcmsIntensityCmp 555
+X11 _XcmsValueInterpolation 556
+X11 _XcmsIntensityInterpolation 557
+X11 _XcmsTableSearch 558
+X11 _XcmsMatVec 559
+X11 XcmsCIEXYZToRGBi 560
+X11 XcmsRGBiToCIEXYZ 561
+X11 XcmsRGBiToRGB 562
+X11 XcmsRGBToRGBi 563
+X11 _XcmsLRGB_InitScrnDefault 564
+X11 XcmsLookupColor 565
+X11 _XcmsCubeRoot 566
+X11 _XcmsSquareRoot 567
+X11 XcmsDisplayOfCCC 568
+X11 XcmsVisualOfCCC 569
+X11 XcmsScreenNumberOfCCC 570
+X11 XcmsScreenWhitePointOfCCC 571
+X11 XcmsClientWhitePointOfCCC 572
+X11 XcmsPrefixOfFormat 573
+X11 _XcmsGetElement 574
+X11 _XcmsGetProperty 575
+X11 XcmsQueryBlack 576
+X11 XcmsQueryBlue 577
+X11 XcmsQueryGreen 578
+X11 XcmsQueryRed 579
+X11 XcmsQueryWhite 580
+X11 XcmsQueryColor 581
+X11 XcmsQueryColors 582
+X11 XcmsSetWhitePoint 583
+X11 XcmsSetCompressionProc 584
+X11 XcmsSetWhiteAdjustProc 585
+X11 _XcmsSetGetColors 586
+X11 XcmsStoreColor 587
+X11 XcmsStoreColors 588
+X11 _XcmsCosine 589
+X11 _XcmsSine 590
+X11 _XcmsArcTangent 591
+X11 _XcmsRGB_to_XColor 592
+X11 _XColor_to_XcmsRGB 593
+X11 _XcmsResolveColor 594
+X11 _XcmsUnresolveColor 595
+X11 _XUnresolveColor 596
+X11 _XParseBaseFontNameList 597
+X11 XCreateFontSet 598
+X11 XFontsOfFontSet 599
+X11 XBaseFontNameListOfFontSet 941
+X11 XLocaleOfFontSet 600
+X11 XContextDependentDrawing 601
+X11 XExtentsOfFontSet 602
+X11 XFreeFontSet 603
+X11 XVaCreateNestedList 604
+X11 XGetIMValues 605
+X11 XCreateIC 606
+X11 XDestroyIC 607
+X11 XGetICValues 608
+X11 XSetICValues 609
+X11 XSetICFocus 610
+X11 XUnsetICFocus 611
+X11 XIMOfIC 612
+X11 XmbResetIC 613
+X11 XwcResetIC 614
+X11 XmbLookupString 615
+X11 XwcLookupString 616
+X11 _XIMCompileResourceList 617
+X11 _XCopyToArg 618
+X11 XOpenIM 619
+X11 XCloseIM 620
+X11 XDisplayOfIM 621
+X11 XLocaleOfIM 622
+X11 XSetLocaleModifiers 623
+X11 XSupportsLocale 624
+X11 _XlcValidModSyntax 625
+X11 _XlcDefaultMapModifiers 626
+X11 _XlcAddLoader 627
+X11 _XlcCurrentLC 628
+X11 XmbSetWMProperties 629
+X11 XmbDrawText 630
+X11 XmbDrawString 631
+X11 XmbDrawImageString 632
+X11 XmbTextEscapement 633
+X11 XmbTextExtents 634
+X11 XmbTextPerCharExtents 635
+X11 XwcDrawText 636
+X11 XwcDrawString 637
+X11 XwcDrawImageString 638
+X11 XwcTextEscapement 639
+X11 XwcTextExtents 640
+X11 XwcTextPerCharExtents 641
+X11 XFilterEvent 642
+X11 _XRegisterFilterByMask 643
+X11 _XRegisterFilterByType 644
+X11 _XUnregisterFilter 645
+X11 _Xsetlocale 646
+X11 XDefaultString 647
+X11 _XlcDefaultLoader 648
+X11 _XrmInitParseInfo 649
+X11 XmbTextPropertyToTextList 650
+X11 XmbTextListToTextProperty 651
+X11 XwcTextPropertyToTextList 652
+X11 XwcFreeStringList 653
+X11 XwcTextListToTextProperty 654
+X11 _X11TransConnectDisplay 655
+X11 XGetAtomNames 656
+X11 XInitImage 657
+X11 XESetBeforeFlush 658
+X11 _XFreeAtomTable 659
+X11 _XUpdateAtomCache 660
+X11 XInternAtoms 661
+X11 _XKeyInitialize 662
+X11 XConvertCase 663
+X11 _XTranslateKey 664
+X11 _XTranslateKeySym 665
+X11 _XKeysymToModifiers 666
+X11 XExtendedMaxRequestSize 667
+X11 XReadBitmapFileData 668
+X11 _XAsyncErrorHandler 669
+X11 _XDeqAsyncHandler 670
+X11 _XGetAsyncReply 671
+X11 _XGetAsyncData 672
+X11 _XPollfdCacheInit 673
+X11 _XPollfdCacheAdd 674
+X11 _XPollfdCacheDel 675
+X11 _XRegisterInternalConnection 676
+X11 _XUnregisterInternalConnection 677
+X11 XInternalConnectionNumbers 678
+X11 XProcessInternalConnection 679
+X11 XAddConnectionWatch 680
+X11 XRemoveConnectionWatch 681
+X11 _XDeq 682
+X11 _XcmsCIEXYZ_ValidSpec 683
+X11 _XcmsCIEuvY_ValidSpec 684
+X11 XcmsSetCCCOfColormap 685
+X11 XDirectionalDependentDrawing 686
+X11 XContextualDrawing 687
+X11 XSetIMValues 688
+X11 XRegisterIMInstantiateCallback 689
+X11 XUnregisterIMInstantiateCallback 690
+X11 XCreateOC 691
+X11 XDestroyOC 692
+X11 XOMOfOC 693
+X11 XSetOCValues 694
+X11 XGetOCValues 695
+X11 XOpenOM 696
+X11 XCloseOM 697
+X11 XSetOMValues 698
+X11 XGetOMValues 699
+X11 XDisplayOfOM 700
+X11 XLocaleOfOM 701
+X11 _XlcRemoveLoader 702
+X11 _XOpenLC 703
+X11 _XCloseLC 704
+X11 _XlcCopyFromArg 705
+X11 _XlcCopyToArg 706
+X11 _XlcCountVaList 707
+X11 _XlcVaToArgList 708
+X11 _XlcCompileResourceList 709
+X11 _XlcGetValues 710
+X11 _XlcSetValues 711
+X11 XInitThreads 712
+X11 XLockDisplay 713
+X11 XUnlockDisplay 714
+X11 _X11TransFreeConnInfo 715
+X11 _X11TransOpenCOTSClient 716
+X11 _X11TransOpenCLTSClient 717
+X11 _X11TransSetOption 718
+X11 _X11TransConnect 719
+X11 _X11TransBytesReadable 720
+X11 _X11TransRead 721
+X11 _X11TransWrite 722
+X11 _X11TransReadv 723
+X11 _X11TransWritev 724
+X11 _X11TransDisconnect 725
+X11 _X11TransClose 726
+X11 _X11TransCloseForCloning 727
+X11 _X11TransIsLocal 728
+X11 _X11TransGetMyAddr 729
+X11 _X11TransGetPeerAddr 730
+X11 _X11TransGetConnectionNumber 731
+X11 _X11TransGetHostname 732
+X11 _X11TransConvertAddress 733
+X11 _XimCbDispatch 734
+X11 _XimLookupMBText 735
+X11 _XimLookupWCText 736
+X11 _XimRegisterFilter 737
+X11 _XimUnregisterFilter 738
+X11 _XimReregisterFilter 739
+X11 _XimRegisterServerFilter 740
+X11 _XimUnregisterServerFilter 741
+X11 _XimProtoCreateIC 742
+X11 _XimCheckDataSize 743
+X11 _XimSetHeader 744
+X11 _XimProtoIMFree 745
+X11 _XimProtoOpenIM 746
+X11 _XimICOfXICID 747
+X11 _XimSetEventMaskCallback 748
+X11 _XimSync 749
+X11 _XimProcSyncReply 750
+X11 _XimRespSyncReply 751
+X11 _XimSyncCallback 752
+X11 _XimForwardEvent 753
+X11 _XimForwardEventCallback 754
+X11 _XimRegisterTriggerKeysCallback 755
+X11 _XimGetWindowEventmask 756
+X11 _XimTriggerNotify 757
+X11 _XimFreeCommitInfo 758
+X11 _XimCommitCallback 759
+X11 _XimProcError 760
+X11 _XimErrorCallback 761
+X11 _XimError 762
+X11 _Ximctstombs 763
+X11 _Ximctstowcs 764
+X11 _XimProtoMbLookupString 765
+X11 _XimProtoWcLookupString 766
+X11 _XimRegProtoIntrCallback 767
+X11 _XimFreeProtoIntrCallback 768
+X11 _XimDispatchInit 769
+X11 _XimProtoEventToWire 770
+X11 _XimProtoWireToEvent 771
+X11 _XimExtension 772
+X11 _XimRegisterIMInstantiateCallback 773
+X11 _XimUnRegisterIMInstantiateCallback 774
+X11 _XimResetIMInstantiateCallback 775
+X11 _XimDestroyIMStructureList 776
+X11 _XimServerDestroy 777
+X11 _XInitIM 779
+X11 _XimLocalFilter 780
+X11 _XimLocalGetICValues 781
+X11 _XimLocalCreateIC 782
+X11 _XimCheckIfLocalProcessing 783
+X11 _XimLocalIMFree 784
+X11 _XimLocalGetIMValues 785
+X11 _XimLocalSetIMValues 786
+X11 _XimLocalOpenIM 787
+X11 _XimLocalMbLookupString 788
+X11 _XimLocalWcLookupString 789
+X11 _XimParseStringFile 790
+X11 _XimSetICValueData 791
+X11 _XimLocalSetICValues 792
+X11 _XimSetIMResourceList 793
+X11 _XimSetICResourceList 794
+X11 _XimSetInnerIMResourceList 795
+X11 _XimSetInnerICResourceList 796
+X11 _XimCheckCreateICValues 797
+X11 _XimGetResourceListRec 798
+X11 _XimSetIMMode 799
+X11 _XimCheckIMMode 800
+X11 _XimSetICMode 801
+X11 _XimCheckICMode 802
+X11 _XimSetLocalIMDefaults 944
+X11 _XimSetICDefaults 803
+X11 _XimDecodeLocalIMAttr 804
+X11 _XimDecodeLocalICAttr 805
+X11 _XimCheckLocalInputStyle 806
+X11 _XimEncodeLocalIMAttr 807
+X11 _XimEncodeLocalICAttr 808
+X11 _XimGetCurrentIMValues 809
+X11 _XimSetCurrentIMValues 810
+X11 _XimGetCurrentICValues 811
+X11 _XimSetCurrentICValues 812
+X11 _XimInitialResourceInfo 813
+X11 _XimDecodeIMATTRIBUTE 814
+X11 _XimDecodeICATTRIBUTE 815
+X11 _XimEncodeIMATTRIBUTE 816
+X11 _XimEncodeICATTRIBUTE 817
+X11 _XimGetAttributeID 818
+X11 _XimThaiFilter 819
+X11 _XimThaiCreateIC 820
+X11 _XimCheckIfThaiProcessing 821
+X11 _XimThaiOpenIM 822
+X11 _XimThaiIMFree 823
+X11 _XimThaiCloseIM 824
+X11 _XimXConf 825
+X11 _XimConnect 826
+X11 _XimShutdown 827
+X11 _XimFlush 828
+X11 _XimFilterWaitEvent 829
+X11 _XimFreeTransIntrCallback 830
+X11 _XimTransFilterWaitEvent 831
+X11 _XimTransInternalConnection 832
+X11 _XimTransFlush 833
+X11 _XimTransConf 834
+X11 _XlcParseCharSet 835
+X11 _XlcInitCTInfo 836
+X11 _XlcGetCSValues 837
+X11 _XlcGetCharSet 838
+X11 _XlcAddCharSet 839
+X11 _XlcCreateDefaultCharSet 840
+X11 _XlcSetConverter 841
+X11 _XlcOpenConverter 842
+X11 _XlcCloseConverter 843
+X11 _XlcConvert 844
+X11 _XlcResetConverter 845
+X11 _XlcGetResource 846
+X11 _XlcGetLocaleDataBase 847
+X11 _XlcDestroyLocaleDataBase 848
+X11 _XlcCreateLocaleDataBase 849
+X11 _XlcEucLoader 850
+X11 _XlcFileName 851
+X11 _XlcResolveLocaleName 852
+X11 _XlcResolveDBName 853
+X11 _XlcResolveI18NPath 854
+X11 _XlcGenericLoader 855
+X11 _XlcInitLoader 856
+X11 _XmbTextPropertyToTextList 857
+X11 _XwcTextPropertyToTextList 858
+X11 _XwcFreeStringList 859
+X11 _XGetLCValues 860
+X11 _XlcDestroyLC 861
+X11 _XlcCreateLC 862
+X11 _XrmDefaultInitParseInfo 863
+X11 _XlcSjisLoader 864
+X11 _Xlcmbtowc 865
+X11 _Xlcwctomb 866
+X11 _Xlcmbstowcs 867
+X11 _Xlcwcstombs 868
+X11 _Xmbtowc 869
+X11 _Xwctomb 870
+X11 _Xmbstowcs 871
+X11 _Xwcstombs 872
+X11 _Xwcscpy 873
+X11 _Xwcsncpy 874
+X11 _Xwcslen 875
+X11 _Xwcscmp 876
+X11 _Xwcsncmp 877
+X11 _XmbTextListToTextProperty 878
+X11 _XwcTextListToTextProperty 879
+X11 _XlcUtfLoader 880
+X11 _XlcCompareISOLatin1 881
+X11 _XlcNCompareISOLatin1 882
+X11 _XmbDefaultTextEscapement 883
+X11 _XwcDefaultTextEscapement 884
+X11 _XmbDefaultTextExtents 885
+X11 _XwcDefaultTextExtents 886
+X11 _XmbDefaultTextPerCharExtents 887
+X11 _XwcDefaultTextPerCharExtents 888
+X11 _XmbDefaultDrawString 889
+X11 _XwcDefaultDrawString 890
+X11 _XmbDefaultDrawImageString 891
+X11 _XwcDefaultDrawImageString 892
+X11 _XomGenericOpenOM 893
+X11 _XInitOM 894
+X11 _XmbGenericDrawImageString 895
+X11 _XwcGenericDrawImageString 896
+X11 _XomGenericDrawString 897
+X11 _XmbGenericDrawString 898
+X11 _XwcGenericDrawString 899
+X11 _XmbGenericTextEscapement 900
+X11 _XwcGenericTextEscapement 901
+X11 _XomGenericTextExtents 902
+X11 _XmbGenericTextExtents 903
+X11 _XwcGenericTextExtents 904
+X11 _XmbGenericTextPerCharExtents 905
+X11 _XwcGenericTextPerCharExtents 906
+X11 _XomConvert 907
+X11 _XomInitConverter 908
+X11 _Xmblen 909
+X11 _XimGetResourceName 910
+X11 _XimGetResourceListRecByQuark 911
+X11 _XimSetIMValueData 912
+X11 _XimGetIMValueData 913
+X11 _XimGetICValueData 914
+X11 _XimMakeIMAttrIDList 915
+X11 _XimMakeICAttrIDList 916
+X11 _XimWrite 917
+X11 _XimRead 918
+X11 _XimRegisterDispatcher 919
+X11 _XimTransRegisterDispatcher 920
+X11 _XimTransCallDispatcher 921
+X11 _XimTransWrite 922
+X11 _XimTransRead 923
+X11 _XimXTransFreeConnInfo 924
+X11 _XimXTransOpenCOTSClient 925
+X11 _XimXTransOpenCLTSClient 926
+X11 _XimXTransSetOption 927
+X11 _XimXTransConnect 928
+X11 _XimXTransBytesReadable 929
+X11 _XimXTransRead 930
+X11 _XimXTransWrite 931
+X11 _XimXTransReadv 932
+X11 _XimXTransWritev 933
+X11 _XimXTransDisconnect 934
+X11 _XimXTransClose 935
+X11 _XimXTransCloseForCloning 936
+X11 _XimXTransIsLocal 937
+X11 _XimXTransGetMyAddr 938
+X11 _XimXTransGetPeerAddr 939
+X11 _XimXTransGetConnectionNumber 940
+X11 _XimXTransGetHostname 945
+X11 _Xdebug 946
+X11 __XOS2RedirRoot 950
+X11 __XOS2RedirRoot1 951
+X11 XkbIgnoreExtension 1000
+X11 XkbOpenDisplay 1001
+X11 XkbQueryExtension 1002
+X11 XkbUseExtension 1003
+X11 XkbLibraryVersion 1004
+X11 XkbSetXlibControls 1005
+X11 XkbGetXlibControls 1006
+X11 XkbSetAtomFuncs 1007
+X11 XkbKeycodeToKeysym 1008
+X11 XkbKeysymToModifiers 1009
+X11 XkbLookupKeySym 1010
+X11 XkbLookupKeyBinding 1011
+X11 XkbTranslateKeyCode 1012
+X11 XkbTranslateKeySym 1013
+X11 XkbSetAutoRepeatRate 1014
+X11 XkbGetAutoRepeatRate 1015
+X11 XkbChangeEnabledControls 1016
+X11 XkbDeviceBell 1017
+X11 XkbForceDeviceBell 1018
+X11 XkbDeviceBellEvent 1019
+X11 XkbBell 1020
+X11 XkbForceBell 1021
+X11 XkbBellEvent 1022
+X11 XkbSelectEvents 1023
+X11 XkbSelectEventDetails 1024
+X11 XkbNoteMapChanges 1025
+X11 XkbNoteNameChanges 1026
+X11 XkbGetIndicatorState 1027
+X11 XkbGetIndicatorMap 1029
+X11 XkbSetIndicatorMap 1030
+X11 XkbGetNamedIndicator 1031
+X11 XkbGetNamedDeviceIndicator 1032
+X11 XkbSetNamedIndicator 1033
+X11 XkbSetNamedDeviceIndicator 1034
+X11 XkbLockModifiers 1035
+X11 XkbLatchModifiers 1036
+X11 XkbLockGroup 1037
+X11 XkbLatchGroup 1038
+X11 XkbSetServerInternalMods 1039
+X11 XkbSetIgnoreLockMods 1040
+X11 XkbVirtualModsToReal 1041
+X11 XkbComputeEffectiveMap 1042
+X11 XkbInitCanonicalKeyTypes 1043
+X11 XkbAllocKeyboard 1044
+X11 XkbFreeKeyboard 1045
+X11 XkbAllocClientMap 1046
+X11 XkbAllocServerMap 1047
+X11 XkbFreeClientMap 1048
+X11 XkbFreeServerMap 1049
+X11 XkbAddKeyType 1050
+X11 XkbAllocIndicatorMaps 1051
+X11 XkbFreeIndicatorMaps 1052
+X11 XkbGetMap 1053
+X11 XkbGetUpdatedMap 1054
+X11 XkbGetMapChanges 1055
+X11 XkbRefreshKeyboardMapping 1056
+X11 XkbGetKeyTypes 1057
+X11 XkbGetKeySyms 1058
+X11 XkbGetKeyActions 1059
+X11 XkbGetKeyBehaviors 1060
+X11 XkbGetVirtualMods 1061
+X11 XkbGetKeyExplicitComponents 1062
+X11 XkbGetKeyModifierMap 1063
+X11 XkbAllocControls 1064
+X11 XkbFreeControls 1065
+X11 XkbGetControls 1066
+X11 XkbSetControls 1067
+X11 XkbAllocCompatMap 1069
+X11 XkbFreeCompatMap 1070
+X11 XkbGetCompatMap 1071
+X11 XkbSetCompatMap 1072
+X11 XkbAllocNames 1073
+X11 XkbGetNames 1074
+X11 XkbSetNames 1075
+X11 XkbChangeNames 1076
+X11 XkbFreeNames 1077
+X11 XkbGetState 1078
+X11 XkbSetMap 1079
+X11 XkbChangeMap 1080
+X11 XkbSetDetectableAutoRepeat 1081
+X11 XkbGetDetectableAutoRepeat 1082
+X11 XkbSetAutoResetControls 1083
+X11 XkbGetAutoResetControls 1084
+X11 XkbCopyKeyType 1085
+X11 XkbCopyKeyTypes 1086
+X11 XkbResizeKeyType 1087
+X11 XkbResizeKeySyms 1088
+X11 XkbResizeKeyActions 1089
+X11 XkbChangeTypesOfKey 1090
+X11 XkbListComponents 1091
+X11 XkbFreeComponentList 1092
+X11 XkbGetKeyboard 1093
+X11 XkbGetKeyboardByName 1094
+X11 XkbAddDeviceLedInfo 1098
+X11 XkbResizeDeviceButtonActions 1099
+X11 XkbAllocDeviceInfo 1100
+X11 XkbFreeDeviceInfo 1101
+X11 XkbNoteDeviceChanges 1102
+X11 XkbGetDeviceInfo 1103
+X11 XkbGetDeviceInfoChanges 1104
+X11 XkbGetDeviceButtonActions 1105
+X11 XkbGetDeviceLedInfo 1106
+X11 XkbSetDeviceInfo 1107
+X11 XkbChangeDeviceInfo 1108
+X11 XkbSetDeviceLedInfo 1109
+X11 XkbSetDeviceButtonActions 1110
+X11 XkbToControl 1111
+X11 XkbSetDebuggingFlags 1112
+X11 _XkbInternAtomFunc 1113
+X11 _XkbGetAtomNameFunc 1114
+X11 _XkbReloadDpy 1115
+X11 _XKeycodeToKeysym 1116
+X11 _XKeysymToKeycode 1117
+X11 _XLookupKeysym 1118
+X11 _XRefreshKeyboardMapping 1119
+X11 _XLookupString 1120
+X11 _XkbNoteCoreMapChanges 1121
+X11 _XkbInitReadBuffer 1122
+X11 _XkbSkipReadBufferData 1123
+X11 _XkbCopyFromReadBuffer 1124
+X11 _XkbReadCopyKeySyms 1125
+X11 _XkbWriteCopyKeySyms 1126
+X11 _XkbReadBufferCopyKeySyms 1127
+X11 _XkbPeekAtReadBuffer 1128
+X11 _XkbGetReadBufferPtr 1129
+X11 _XkbFreeReadBuffer 1130
+X11 _XkbGetReadBufferCountedString 1131
+X11 _XkbGetCharset 1132
+X11 _XkbGetConverters 1133
+X11 XkbGetGeometry 1134
+X11 XkbAddGeomShape 1135
+X11 XkbAddGeomOutline 1136
+X11 XkbComputeShapeBounds 1137
+X11 XkbAddGeomDoodad 1138
+X11 XkbAddGeomColor 1139
+X11 XkbAddGeomOverlayRow 1140
+X11 XkbAddGeomSection 1141
+X11 XkbAddGeomRow 1142
+X11 XkbAddGeomKey 1143
+X11 XkbComputeSectionBounds 1144
+X11 XkbAllocGeometry 1145
+X11 XkbAddGeomProperty 1146
+X11 XkbAddGeomOverlay 1147
+X11 XkbComputeShapeTop 1148
+X11 XkbFindOverlayForKey 1149
+X11 XkbAllocGeomKeyAliases 1150
+X11 XkbSetGeometry 1151
+X11 XkbXlibControlsImplemented 1152
+X11 XkbTranslateKey 1153
+X11 XkbAddGeomOverlayKey 1154
+X11 XkbNoteControlsChanges 1155
+X11 XkbGetKeyVirtualModMap 1156
+X11 XkbComputeRowBounds 1157
+X11 XkbGetNamedGeometry 1158
+X11 XkbKeyTypesForCoreSymbols 1159
+X11 XkbApplyCompatMapToKey 1160
+X11 XkbUpdateMapFromCore 1161
+X11 XkbUpdateActionVirtualMods 1162
+X11 XkbUpdateKeyTypeVirtualMods 1163
+X11 XkbApplyVirtualModChanges 1164
+X11 XkbFreeGeomProperties 1165
+X11 XkbFreeGeomKeyAliases 1166
+X11 XkbFreeGeomColors 1167
+X11 XkbFreeGeomPoints 1168
+X11 XkbFreeGeomOutlines 1169
+X11 XkbFreeGeomShapes 1170
+X11 XkbFreeGeomOverlayKeys 1171
+X11 XkbFreeGeomOverlayRows 1172
+X11 XkbFreeGeomOverlays 1173
+X11 XkbFreeGeomKeys 1174
+X11 XkbFreeGeomRows 1175
+X11 XkbFreeGeomSections 1176
+X11 XkbFreeGeomDoodads 1177
+X11 XkbFreeGeometry 1178
+X11 XkbAllocGeomProps 1179
+X11 XkbAllocGeomColors 1180
+X11 XkbAllocGeomShapes 1181
+X11 XkbAllocGeomSections 1182
+X11 XkbAllocGeomOverlays 1183
+X11 XkbAllocGeomOverlayRows 1184
+X11 XkbAllocGeomOverlayKeys 1185
+X11 XkbAllocGeomDoodads 1186
+X11 XkbAllocGeomSectionDoodads 1187
+X11 XkbAllocGeomOutlines 1188
+X11 XkbAllocGeomRows 1189
+X11 XkbAllocGeomPoints 1190
+X11 XkbAllocGeomKeys 1191
+X11 XkbAddGeomKeyAlias 1192
+X11 _XkeyTable 1200
+X11 _Xevent_to_mask 1201
+X11 _qfree 1202
+X11 _XIOErrorFunction 1203
+X11 _XErrorFunction 1204
+X11 _XHeadOfDisplayList 1205
+X11 XcmsCIELabColorSpace 1206
+X11 XcmsCIELuvColorSpace 1207
+X11 XcmsCIEXYZColorSpace 1208
+X11 XcmsCIEuvYColorSpace 1209
+X11 XcmsCIExyYColorSpace 1210
+X11 XcmsTekHVCColorSpace 1211
+X11 XcmsUNDEFINEDColorSpace 1212
+X11 _XcmsDIColorSpacesInit 1213
+X11 _XcmsDIColorSpaces 1214
+X11 _XcmsDDColorSpacesInit 1215
+X11 _XcmsDDColorSpaces 1216
+X11 _XcmsSCCFuncSetsInit 1217
+X11 _XcmsSCCFuncSets 1218
+X11 _XcmsCIEXYZ_prefix 1219
+X11 _XcmsCIEuvY_prefix 1220
+X11 _XcmsCIExyY_prefix 1221
+X11 _XcmsCIELab_prefix 1222
+X11 _XcmsCIELuv_prefix 1223
+X11 _XcmsTekHVC_prefix 1224
+X11 _XcmsRGBi_prefix 1225
+X11 _XcmsRGB_prefix 1226
+X11 _XcmsRegColorSpaces 1227
+X11 XcmsRGBiColorSpace 1228
+X11 XcmsRGBColorSpace 1229
+X11 XcmsLinearRGBFunctionSet 1230
+X11 _X11TransSocketINETFuncs 1231
+X11 _X11TransSocketTCPFuncs 1232
+X11 _XimXTransSocketINETFuncs 1233
+X11 _XimXTransSocketTCPFuncs 1234
+X11 _XimImSportRec 1235
+X11 _XimTransportRec 1236
+X11 _XlcGenericMethods 1237
+X11 _XlcPublicMethods 1238
+; 4.x exports starting from 1300
+X11 _XFlushIt 1300
+X11 _Xthread_init 1301
+X11 _Xthread_waiter 1302
+X11 XkbGetPerClientControls 1303
+X11 XkbSetPerClientControls 1304
+X11 Xutf8TextPropertyToTextList 1305
+X11 Xutf8TextListToTextProperty 1306
+X11 _XCreateMutex_fn 1307
+X11 _XFreeMutex_fn 1308
+X11 _XLockMutex_fn 1309
+X11 _XUnlockMutex_fn 1310
+X11 _Xglobal_lock 1311
+X11 Xutf8LookupString 1312
+X11 Xutf8DrawString 1313
+X11 Xutf8TextExtents 1314
+LIBRARY Xaw Xaw INITINSTANCE TERMINSTANCE
+Xaw XawAsciiSourceFreeString 1
+Xaw XawAsciiSave 2
+Xaw XawAsciiSaveAsFile 3
+Xaw XawAsciiSourceChanged 4
+Xaw XawDialogAddButton 5
+Xaw XawDialogGetValueString 6
+Xaw XawFormDoLayout 7
+Xaw XawListChange 8
+Xaw XawListUnhighlight 9
+Xaw XawListHighlight 10
+Xaw XawListShowCurrent 11
+Xaw XawPanedSetMinMax 13
+Xaw XawPanedGetMinMax 14
+Xaw XawPanedSetRefigureMode 15
+Xaw XawPanedGetNumSub 16
+Xaw XawScrollbarSetThumb 18
+Xaw XawSimpleMenuAddGlobalActions 19
+Xaw XawSimpleMenuGetActiveEntry 20
+Xaw XawSimpleMenuClearActiveEntry 21
+Xaw XawTextDisplay 22
+Xaw XawTextEnableRedisplay 23
+Xaw XawTextDisableRedisplay 24
+Xaw XawTextSetSelectionArray 25
+Xaw XawTextGetSelectionPos 26
+Xaw XawTextSetSource 27
+Xaw XawTextReplace 28
+Xaw XawTextTopPosition 29
+Xaw XawTextSetInsertionPoint 30
+Xaw XawTextGetInsertionPoint 31
+Xaw XawTextUnsetSelection 32
+Xaw XawTextSetSelection 33
+Xaw XawTextInvalidate 34
+Xaw XawTextGetSource 35
+Xaw XawTextSearch 36
+Xaw XawTextDisplayCaret 37
+Xaw XawTextSinkDisplayText 38
+Xaw XawTextSinkInsertCursor 39
+Xaw XawTextSinkClearToBackground 40
+Xaw XawTextSinkFindPosition 41
+Xaw XawTextSinkFindDistance 42
+Xaw XawTextSinkResolve 43
+Xaw XawTextSinkMaxLines 44
+Xaw XawTextSinkMaxHeight 45
+Xaw XawTextSinkSetTabs 46
+Xaw XawTextSinkGetCursorBounds 47
+Xaw XawTextSourceRead 48
+Xaw XawTextSourceReplace 49
+Xaw XawTextSourceScan 50
+Xaw XawTextSourceSearch 51
+Xaw XawTextSourceConvertSelection 52
+Xaw XawTextSourceSetSelection 53
+Xaw XawToggleChangeRadioGroup 54
+Xaw XawToggleGetCurrent 55
+Xaw XawToggleSetCurrent 56
+Xaw XawToggleUnsetCurrent 57
+Xaw XawTreeForceLayout 58
+Xaw XawViewportSetLocation 59
+Xaw XawViewportSetCoordinates 60
+Xaw _XawMultiSinkPosToXY 61
+Xaw _XawMultiSave 62
+Xaw _XawMultiSaveAsFile 63
+Xaw _XawMultiSourceFreeString 64
+Xaw _XawTextFormat 65
+Xaw _XawTextBuildLineTable 66
+Xaw _XawTextGetSTRING 67
+Xaw _XawTextSaltAwaySelection 68
+Xaw _XawTextPosToXY 69
+Xaw _XawTextWCToMB 70
+Xaw _XawTextMBToWC 71
+Xaw _Xaw_atowc 72
+Xaw _XawImResizeVendorShell 73
+Xaw _XawImGetShellHeight 74
+Xaw _XawImRealize 75
+Xaw _XawImInitialize 76
+Xaw _XawImReconnect 77
+Xaw _XawImRegister 78
+Xaw _XawImUnregister 79
+Xaw _XawImSetValues 80
+Xaw _XawImSetFocusValues 82
+Xaw _XawImUnsetFocus 84
+Xaw _XawImWcLookupString 85
+Xaw _XawImGetImAreaHeight 86
+Xaw _XawImCallVendorShellExtResize 87
+Xaw _XawImDestroy 88
+Xaw _XawTextZapSelection 89
+Xaw _XawTextInsertFileAction 90
+Xaw _XawTextInsertFile 91
+Xaw _XawTextDoSearchAction 92
+Xaw _XawTextPopdownSearchAction 93
+Xaw _XawTextSearch 94
+Xaw _XawTextDoReplaceAction 95
+Xaw _XawTextSetField 96
+Xaw asciiSrcObjectClass 100
+Xaw asciiSrcClassRec 101
+Xaw dialogWidgetClass 102
+Xaw dialogClassRec 103
+Xaw formWidgetClass 104
+Xaw formClassRec 105
+Xaw listWidgetClass 106
+Xaw listClassRec 107
+Xaw multiSinkObjectClass 108
+Xaw multiSinkClassRec 109
+Xaw multiSrcObjectClass 110
+Xaw multiSrcClassRec 111
+Xaw panedWidgetClass 112
+Xaw panedClassRec 113
+Xaw scrollbarWidgetClass 114
+Xaw scrollbarClassRec 115
+Xaw simpleMenuWidgetClass 116
+Xaw simpleMenuClassRec 117
+Xaw FMT8BIT 118
+Xaw XawFmt8Bit 119
+Xaw XawFmtWide 120
+Xaw _XawTextActionsTable 121
+Xaw _XawTextActionsTableCount 122
+Xaw textWidgetClass 123
+Xaw textClassRec 124
+Xaw textSinkObjectClass 125
+Xaw textSinkClassRec 126
+Xaw toggleWidgetClass 127
+Xaw toggleClassRec 128
+Xaw treeWidgetClass 129
+Xaw treeClassRec 130
+Xaw viewportWidgetClass 131
+Xaw viewportClassRec 132
+Xaw menuButtonClassRec 133
+Xaw menuButtonWidgetClass 134
+Xaw smeBSBClassRec 135
+Xaw smeBSBObjectClass 136
+Xaw smeLineClassRec 137
+Xaw smeLineObjectClass 138
+Xaw labelClassRec 139
+Xaw labelWidgetClass 140
+Xaw commandClassRec 141
+Xaw commandWidgetClass 142
+Xaw boxClassRec 143
+Xaw boxWidgetClass 144
+Xaw simpleClassRec 145
+Xaw simpleWidgetClass 146
+Xaw XawInitializeWidgetSet 147
+Xaw asciiTextClassRec 148
+Xaw asciiTextWidgetClass 149
+Xaw portholeClassRec 150
+Xaw portholeWidgetClass 151
+Xaw pannerClassRec 152
+Xaw pannerWidgetClass 153
+Xaw textSrcClassRec 154
+Xaw textSrcObjectClass 155
+Xaw gripWidgetClass 156
+Xaw XawWidgetArray 157
+Xaw XawWidgetCount 158
+Xaw XawPanedAllowResize 159
+Xaw _XawTextNeedsUpdating 160
+Xaw _XawTextGetText 161
+Xaw _XawTextSetScrollBars 162
+Xaw _XawTextVScroll 163
+Xaw _XawTextReplace 164
+Xaw _XawTextClearAndCenterDisplay 165
+Xaw _XawTextCheckResize 166
+Xaw _XawTextSelectionList 167
+Xaw _XawTextSetSelection 168
+Xaw _XawTextAlterSelection 169
+Xaw _XawTextPrepareToUpdate 170
+Xaw _XawTextShowPosition 171
+Xaw _XawTextExecuteUpdate 172
+Xaw XawVendorShellExtResize 173
+Xaw asciiSinkClassRec 174
+Xaw asciiSinkObjectClass 175
+Xaw gripClassRec 176
+Xaw vPanedWidgetClass 177
+Xaw repeaterClassRec 178
+Xaw repeaterWidgetClass 179
+Xaw smeClassRec 180
+Xaw smeObjectClass 181
+Xaw stripChartClassRec 182
+Xaw stripChartWidgetClass 183
+Xaw _XawDefaultTextTranslations1 184
+Xaw _XawDefaultTextTranslations2 185
+Xaw _XawDefaultTextTranslations3 186
+Xaw vendorShellClassRec 187
+Xaw _XawVendorShellClassRec 187
+Xaw vendorShellWidgetClass 188
+Xaw _XawDefaultTextTranslations4 189
+Xaw _XawDefaultTextTranslations 190
+Xaw _XawTextSrcUndo 191
+Xaw tipClassRec 192
+Xaw tipWidgetClass 193
+Xaw XawTipEnable 194
+Xaw XawTipDisable 195
+Xaw XawTextSinkConvertPropertyList 196
+Xaw XawTextGetSink 197
+Xaw XawTextSourceClearEntities 198
+Xaw XawTextSourceFindAnchor 199
+Xaw XawTextSourcePrevAnchor 200
+Xaw XawTextSourceNextAnchor 201
+Xaw XawTextSourceAnchorAndEntity 202
+Xaw XawTextSourceAddEntity 203
+;4.x export starting from 250
+Xaw xawvendorShellExtClassRec 250
+Xaw xawvendorShellExtWidgetClass 251
+Xaw XawTextSinkCopyProperty 252
+Xaw XawTextSinkGetProperty 253
+Xaw XawTextSinkCombineProperty 254
+Xaw XawTextSinkAddProperty 255
+Xaw XawTextLastPosition 256
+LIBRARY Xext Xext
+Xext XMITMiscGetBugMode 1
+Xext XMITMiscQueryExtension 2
+Xext XMITMiscSetBugMode 3
+Xext XMissingExtension 4
+Xext XSetExtensionErrorHandler 5
+Xext XShapeCombineMask 6
+Xext XShapeCombineRectangles 7
+Xext XShapeCombineRegion 8
+Xext XShapeCombineShape 9
+Xext XShapeGetRectangles 10
+Xext XShapeInputSelected 11
+Xext XShapeOffsetShape 12
+Xext XShapeQueryExtension 13
+Xext XShapeQueryExtents 14
+Xext XShapeQueryVersion 15
+Xext XShapeSelectInput 16
+Xext XSyncAwait 17
+Xext XSyncChangeAlarm 18
+Xext XSyncChangeCounter 19
+Xext XSyncCreateAlarm 20
+Xext XSyncCreateCounter 21
+Xext XSyncDestroyAlarm 22
+Xext XSyncDestroyCounter 23
+Xext XSyncFreeSystemCounterList 24
+Xext XSyncGetPriority 25
+Xext XSyncInitialize 26
+Xext XSyncIntToValue 27
+Xext XSyncIntsToValue 28
+Xext XSyncListSystemCounters 29
+Xext XSyncMaxValue 30
+Xext XSyncMinValue 31
+Xext XSyncQueryAlarm 32
+Xext XSyncQueryCounter 33
+Xext XSyncQueryExtension 34
+Xext XSyncSetCounter 35
+Xext XSyncSetPriority 36
+Xext XSyncValueAdd 37
+Xext XSyncValueEqual 38
+Xext XSyncValueGreaterOrEqual 39
+Xext XSyncValueGreaterThan 40
+Xext XSyncValueHigh32 41
+Xext XSyncValueIsNegative 42
+Xext XSyncValueIsPositive 43
+Xext XSyncValueIsZero 44
+Xext XSyncValueLessOrEqual 45
+Xext XSyncValueLessThan 46
+Xext XSyncValueLow32 47
+Xext XSyncValueSubtract 48
+Xext XTestFakeInput 49
+Xext XTestFlush 50
+Xext XTestGetInput 51
+Xext XTestMovePointer 52
+Xext XTestPressButton 53
+Xext XTestPressKey 54
+Xext XTestQueryInputSize 55
+Xext XTestReset 56
+Xext XTestStopInput 57
+Xext XextAddDisplay 58
+Xext XextCreateExtension 59
+Xext XextDestroyExtension 60
+Xext XextFindDisplay 61
+Xext XextRemoveDisplay 62
+Xext XmbufChangeBufferAttributes 63
+Xext XmbufChangeWindowAttributes 64
+Xext XmbufClearBufferArea 65
+Xext XmbufCreateBuffers 66
+Xext XmbufCreateStereoWindow 67
+Xext XmbufDestroyBuffers 68
+Xext XmbufDisplayBuffers 69
+Xext XmbufGetBufferAttributes 70
+Xext XmbufGetScreenInfo 71
+Xext XmbufGetVersion 72
+Xext XmbufGetWindowAttributes 73
+Xext XmbufQueryExtension 74
+Xext XdbeQueryExtension 75
+Xext XdbeAllocateBackBufferName 76
+Xext XdbeDeallocateBackBufferName 77
+Xext XdbeSwapBuffers 78
+Xext XdbeBeginIdiom 79
+Xext XdbeEndIdiom 80
+Xext XdbeGetVisualInfo 81
+Xext XdbeFreeVisualInfo 82
+Xext XdbeGetBackBufferAttributes 83
+Xext XSecurityQueryExtension 84
+Xext XSecurityAllocXauth 85
+Xext XSecurityFreeXauth 86
+Xext XSecurityGenerateAuthorization 87
+Xext XSecurityRevokeAuthorization 88
+Xext XagQueryVersion 89
+Xext XagCreateEmbeddedApplicationGroup 90
+Xext XagCreateNonembeddedApplicationGroup 91
+Xext XagDestroyApplicationGroup 92
+Xext XagGetApplicationGroupAttributes 93
+Xext XagQueryApplicationGroup 94
+Xext XagCreateAssociation 95
+Xext XagDestroyAssociation 96
+Xext XLbxQueryExtension 97
+Xext XLbxGetEventBase 98
+Xext XLbxQueryVersion 99
+Xext XShmQueryExtension 100
+Xext XShmGetEventBase 101
+Xext XShmQueryVersion 102
+Xext XShmPixmapFormat 103
+Xext XShmAttach 104
+Xext XShmDetach 105
+Xext XShmCreateImage 106
+Xext XShmPutImage 107
+Xext XShmGetImage 108
+Xext XShmCreatePixmap 109
+Xext XcupGetReservedColormapEntries 110
+Xext XcupQueryVersion 111
+Xext XcupStoreColors 112
+Xext XPanoramiXQueryVersion 113
+Xext XPanoramiXAllocInfo 114
+Xext XPanoramiXGetScreenCount 115
+Xext XPanoramiXGetScreenSize 116
+Xext XPanoramiXGetState 117
+Xext XPanoramiXQueryExtension 118
+Xext DPMSQueryExtension 119
+Xext DPMSGetVersion 120
+Xext DPMSCapable 121
+Xext DPMSSetTimeouts 122
+Xext DPMSGetTimeouts 123
+Xext DPMSEnable 124
+Xext DPMSDisable 125
+Xext DPMSForceLevel 126
+Xext DPMSInfo 127
+Xext XeviQueryExtension 128
+Xext XeviQueryVersion 129
+Xext XeviGetVisualInfo 130
+LIBRARY Xi Xi
+Xi XAllowDeviceEvents 1
+Xi XChangeDeviceControl 2
+Xi XChangeDeviceDontPropagateList 3
+Xi XChangeDeviceKeyMapping 4
+Xi XChangeFeedbackControl 5
+Xi XChangeKeyboardDevice 6
+Xi XChangePointerDevice 7
+Xi XCloseDevice 8
+Xi XDeviceBell 9
+Xi XFreeDeviceControl 10
+Xi XFreeDeviceList 11
+Xi XFreeDeviceMotionEvents 12
+Xi XFreeDeviceState 13
+Xi XFreeFeedbackList 14
+Xi XGetDeviceButtonMapping 15
+Xi XGetDeviceControl 16
+Xi XGetDeviceDontPropagateList 17
+Xi XGetDeviceFocus 18
+Xi XGetDeviceKeyMapping 19
+Xi XGetDeviceModifierMapping 20
+Xi XGetDeviceMotionEvents 21
+Xi XGetExtensionVersion 22
+Xi XGetFeedbackControl 23
+Xi XGetSelectedExtensionEvents 24
+Xi XGrabDevice 25
+Xi XGrabDeviceButton 26
+Xi XGrabDeviceKey 27
+Xi XListInputDevices 28
+Xi XOpenDevice 29
+Xi XQueryDeviceState 30
+Xi XSelectExtensionEvent 31
+Xi XSendExtensionEvent 32
+Xi XSetDeviceButtonMapping 33
+Xi XSetDeviceFocus 34
+Xi XSetDeviceMode 35
+Xi XSetDeviceModifierMapping 36
+Xi XSetDeviceValuators 37
+Xi XUngrabDevice 38
+Xi XUngrabDeviceButton 39
+Xi XUngrabDeviceKey 40
+Xi _xibadclass 41
+Xi _xibaddevice 42
+Xi _xibadevent 43
+Xi _xibadmode 44
+Xi _xidevicebusy 45
+LIBRARY Xmu Xmu
+Xmu XmuGetAtomName 1
+Xmu XmuInternAtom 2
+Xmu XmuInternStrings 3
+Xmu XmuMakeAtom 4
+Xmu XmuNameOfAtom 5
+Xmu XmuCopyISOLatin1Lowered 6
+Xmu XmuCopyISOLatin1Uppered 7
+Xmu XmuCompareISOLatin1 8
+Xmu XmuAddCloseDisplayHook 9
+Xmu XmuLookupCloseDisplayHook 10
+Xmu XmuRemoveCloseDisplayHook 11
+Xmu XmuCvtFunctionToCallback 12
+Xmu XmuCvtStringToBackingStore 13
+Xmu XmuCvtStringToCursor 14
+Xmu XmuCvtStringToColorCursor 15
+Xmu XmuCvtStringToGravity 16
+Xmu XmuCvtStringToJustify 17
+Xmu XmuCvtStringToLong 18
+Xmu XmuCvtStringToOrientation 19
+Xmu XmuCvtStringToBitmap 20
+Xmu XmuCvtStringToShapeStyle 21
+Xmu XmuReshapeWidget 22
+Xmu XmuCvtStringToWidget 23
+Xmu XmuNewCvtStringToWidget 24
+Xmu XmuCursorNameToIndex 25
+Xmu XmuDQCreate 26
+Xmu XmuDQDestroy 27
+Xmu XmuDQLookupDisplay 28
+Xmu XmuDQAddDisplay 29
+Xmu XmuDQRemoveDisplay 30
+Xmu XmuDrawRoundedRectangle 31
+Xmu XmuFillRoundedRectangle 32
+Xmu XmuDrawLogo 33
+Xmu XmuCreatePixmapFromBitmap 34
+Xmu XmuCreateStippledPixmap 35
+Xmu XmuReleaseStippledPixmap 36
+Xmu XmuLocateBitmapFile 37
+Xmu XmuLocatePixmapFile 38
+Xmu XmuReadBitmapData 39
+Xmu XmuReadBitmapDataFromFile 40
+Xmu XmuPrintDefaultErrorMessage 41
+Xmu XmuSimpleErrorHandler 42
+Xmu XmuRegisterExternalAgent 43
+Xmu XmuCallInitializers 44
+Xmu XmuAddInitializer 45
+Xmu XmuAllStandardColormaps 46
+Xmu XmuCreateColormap 47
+Xmu XmuDeleteStandardColormap 48
+Xmu XmuGetColormapAllocation 49
+Xmu XmuLookupStandardColormap 50
+Xmu XmuStandardColormap 51
+Xmu XmuVisualStandardColormaps 52
+Xmu XmuConvertStandardSelection 53
+Xmu XmuGetHostname 54
+Xmu XmuWnInitializeNodes 55
+Xmu XmuWnFetchResources 56
+Xmu XmuWnCountOwnedResources 57
+Xmu XmuWnNameToNode 58
+Xmu XmuClientWindow 59
+Xmu XmuUpdateMapHints 60
+Xmu XmuScreenOfWindow 61
+Xmu XctCreate 62
+Xmu XctNextItem 63
+Xmu XctFree 64
+Xmu XctReset 65
+Xmu _XmuCCLookupDisplay 66
+Xmu _XEditResCheckMessages 67
+Xmu _XEditResPutString8 68
+Xmu _XEditResPut8 69
+Xmu _XEditResPut16 70
+Xmu _XEditResPut32 71
+Xmu _XEditResPutWidgetInfo 72
+Xmu _XEditResResetStream 74
+Xmu _XEditResGet8 75
+Xmu _XEditResGet16 76
+Xmu _XEditResGetSigned16 77
+Xmu _XEditResGet32 78
+Xmu _XEditResGetString8 79
+Xmu _XEditResGetWidgetInfo 80
+Xmu _XA_ATOM_PAIR 81
+Xmu _XA_CHARACTER_POSITION 82
+Xmu _XA_CLASS 83
+Xmu _XA_CLIENT_WINDOW 84
+Xmu _XA_CLIPBOARD 85
+Xmu _XA_COMPOUND_TEXT 86
+Xmu _XA_DECNET_ADDRESS 87
+Xmu _XA_DELETE 88
+Xmu _XA_FILENAME 89
+Xmu _XA_HOSTNAME 90
+Xmu _XA_IP_ADDRESS 91
+Xmu _XA_LENGTH 92
+Xmu _XA_LIST_LENGTH 93
+Xmu _XA_NAME 94
+Xmu _XA_NET_ADDRESS 95
+Xmu _XA_NULL 96
+Xmu _XA_OWNER_OS 97
+Xmu _XA_SPAN 98
+Xmu _XA_TARGETS 99
+Xmu _XA_TEXT 100
+Xmu _XA_TIMESTAMP 101
+Xmu _XA_USER 102
+Xmu XmuDistinguishableColors 103
+Xmu XmuDistinguishablePixels 104
+Xmu XmuCvtWidgetToString 105
+Xmu XmuCvtGravityToString 106
+Xmu XmuDestroySegmentList 107
+Xmu XmuCvtJustifyToString 108
+Xmu XmuSnprintf 109
+Xmu XmuAreaOrXor 110
+Xmu XmuDestroyScanlineList 111
+Xmu XmuScanlineXor 112
+Xmu XmuNewScanline 113
+Xmu XmuNCopyISOLatin1Lowered 114
+Xmu XmuNCopyISOLatin1Uppered 115
+Xmu XmuCvtShapeStyleToString 116
+Xmu XmuCvtOrientationToString 117
+Xmu XmuCvtBackingStoreToString 118
+Xmu XmuNewArea 119
+Xmu XmuScanlineOrSegment 120
+Xmu XmuOptimizeScanline 121
+; 4.x export starting from 150
+Xmu _XmuStringToBitmapFreeCache 150
+Xmu _XmuStringToBitmapInitCache 151
+Xmu XmuLookupAPL 152
+Xmu XmuLookupArabic 153
+Xmu XmuLookupCyrillic 154
+Xmu XmuLookupGreek 155
+Xmu XmuLookupHebrew 156
+Xmu XmuLookupJISX0201 157
+Xmu XmuLookupKana 158
+Xmu XmuLookupLatin1 159
+Xmu XmuLookupLatin2 160
+Xmu XmuLookupLatin3 161
+Xmu XmuLookupLatin4 162
+Xmu XmuLookupString 163
+Xmu _XA_UTF8_STRING 164
+Xmu XmuScanlineNot 165
+Xmu XmuScanlineAnd 166
+Xmu XmuScanlineOr 167
+LIBRARY Xp Xp
+Xp XpCancelDoc 1
+Xp XpCancelJob 2
+Xp XpCancelPage 3
+Xp XpCreateContext 4
+Xp XpDestroyContext 5
+Xp XpEndDoc 6
+Xp XpEndJob 7
+Xp XpEndPage 8
+Xp XpFreePrinterList 9
+Xp XpGetAttributes 10
+Xp XpGetAuthParams 11
+Xp XpGetContext 12
+Xp XpGetDocumentData 13
+Xp XpGetLocaleHinter 14
+Xp XpGetLocaleNetString 15
+Xp XpGetOneAttribute 16
+Xp XpGetPageDimensions 17
+Xp XpGetPdmStartParams 18
+Xp XpGetPrinterList 19
+Xp XpGetScreenOfContext 20
+Xp XpInputSelected 21
+Xp XpNotifyPdm 22
+Xp XpPutDocumentData 23
+Xp XpQueryExtension 24
+Xp XpQueryScreens 25
+Xp XpQueryVersion 26
+Xp XpRehashPrinterList 27
+Xp XpSelectInput 28
+Xp XpSendAuth 29
+Xp XpSendOneTicket 30
+Xp XpSetAttributes 31
+Xp XpSetContext 32
+Xp XpSetLocaleHinter 33
+Xp XpStartDoc 34
+Xp XpStartJob 35
+Xp XpStartPage 36
+; 4.x exports starting from 40
+Xp XpSetImageResolution 40
+LIBRARY Xpm Xpm
+Xpm XpmCreatePixmapFromData 1
+Xpm XpmCreateDataFromPixmap 2
+Xpm XpmReadFileToPixmap 3
+Xpm XpmWriteFileFromPixmap 4
+Xpm XpmCreateImageFromData 5
+Xpm XpmCreateDataFromImage 6
+Xpm XpmReadFileToImage 7
+Xpm XpmWriteFileFromImage 8
+Xpm XpmCreateImageFromBuffer 9
+Xpm XpmCreatePixmapFromBuffer 10
+Xpm XpmCreateBufferFromImage 11
+Xpm XpmCreateBufferFromPixmap 12
+Xpm XpmReadFileToBuffer 13
+Xpm XpmWriteFileFromBuffer 14
+Xpm XpmReadFileToData 15
+Xpm XpmWriteFileFromData 16
+Xpm XpmAttributesSize 17
+Xpm XpmFreeAttributes 18
+Xpm XpmFreeExtensions 19
+Xpm XpmFreeXpmImage 20
+Xpm XpmFreeXpmInfo 21
+Xpm XpmGetErrorString 22
+Xpm XpmLibraryVersion 23
+Xpm XpmReadFileToXpmImage 24
+Xpm XpmWriteFileFromXpmImage 25
+Xpm XpmCreatePixmapFromXpmImage 26
+Xpm XpmCreateImageFromXpmImage 27
+Xpm XpmCreateXpmImageFromImage 28
+Xpm XpmCreateXpmImageFromPixmap 29
+Xpm XpmCreateDataFromXpmImage 30
+Xpm XpmCreateXpmImageFromData 31
+Xpm XpmCreateXpmImageFromBuffer 32
+Xpm XpmCreateBufferFromXpmImage 33
+; 4.x exports starting from 40
+Xpm XpmFree 40
+LIBRARY Xss Xss
+Xss XScreenSaverQueryExtension 1
+Xss XScreenSaverQueryVersion 2
+Xss XScreenSaverAllocInfo 3
+Xss XScreenSaverQueryInfo 4
+Xss XScreenSaverSelectInput 5
+Xss XScreenSaverSetAttributes 6
+Xss XScreenSaverUnsetAttributes 7
+Xss XScreenSaverRegister 8
+Xss XScreenSaverUnregister 9
+Xss XScreenSaverGetRegistered 10
+LIBRARY Xt Xt INITINSTANCE TERMINSTANCE
+Xt XtAppAddActionHook 1
+Xt XtRemoveActionHook 2
+Xt XtMalloc 3
+Xt XtRealloc 4
+Xt XtCalloc 5
+Xt XtFree 6
+Xt XtMergeArgLists 7
+Xt XtAddCallback 8
+Xt XtAddCallbacks 9
+Xt XtRemoveCallback 10
+Xt XtRemoveCallbacks 11
+Xt XtRemoveAllCallbacks 12
+Xt XtCallCallbacks 13
+Xt XtHasCallbacks 14
+Xt XtCallCallbackList 15
+Xt XtSetMultiClickTime 16
+Xt XtGetMultiClickTime 17
+Xt XtSetTypeConverter 18
+Xt XtAppSetTypeConverter 19
+Xt XtAddConverter 20
+Xt XtAppAddConverter 21
+Xt XtCallConverter 22
+Xt XtConvert 23
+Xt XtConvertAndStore 24
+Xt XtAppReleaseCacheRefs 25
+Xt XtCallbackReleaseCacheRefList 26
+Xt XtCallbackReleaseCacheRef 27
+Xt XtDisplayStringConversionWarning 28
+Xt XtStringConversionWarning 29
+Xt XtCvtIntToBoolean 30
+Xt XtCvtIntToShort 31
+Xt XtCvtStringToBoolean 32
+Xt XtCvtIntToBool 33
+Xt XtCvtStringToBool 34
+Xt XtCvtIntToColor 35
+Xt XtCvtStringToPixel 36
+Xt XtCvtStringToCursor 37
+Xt XtCvtStringToDisplay 38
+Xt XtCvtStringToFile 39
+Xt XtCvtIntToFloat 40
+Xt XtCvtStringToFloat 41
+Xt XtCvtStringToFont 42
+Xt XtCvtIntToFont 43
+Xt XtCvtStringToFontSet 44
+Xt XtCvtStringToFontStruct 45
+Xt XtCvtStringToInt 46
+Xt XtCvtStringToShort 47
+Xt XtCvtStringToDimension 48
+Xt XtCvtIntToUnsignedChar 49
+Xt XtCvtStringToUnsignedChar 50
+Xt XtCvtColorToPixel 51
+Xt XtCvtIntToPixel 52
+Xt XtCvtIntToPixmap 53
+Xt XtCvtStringToInitialState 54
+Xt XtCvtStringToVisual 55
+Xt XtCvtStringToAtom 56
+Xt XtCvtStringToDirectoryString 57
+Xt XtCvtStringToCommandArgArray 58
+Xt XtInitializeWidgetClass 59
+Xt XtCreateWidget 60
+Xt XtCreateManagedWidget 61
+Xt XtCreatePopupShell 62
+Xt XtAppCreateShell 63
+Xt XtCreateApplicationShell 64
+Xt XtDestroyWidget 65
+Xt XtOpenDisplay 66
+Xt XtDisplayInitialize 67
+Xt XtCreateApplicationContext 68
+Xt XtDestroyApplicationContext 69
+Xt XtDatabase 70
+Xt XtDisplayToApplicationContext 71
+Xt XtCloseDisplay 72
+Xt XtWidgetToApplicationContext 73
+Xt XtGetApplicationNameAndClass 74
+Xt XtGetErrorDatabase 75
+Xt XtAppGetErrorDatabase 76
+Xt XtGetErrorDatabaseText 77
+Xt XtAppGetErrorDatabaseText 78
+Xt XtErrorMsg 79
+Xt XtAppErrorMsg 80
+Xt XtWarningMsg 81
+Xt XtAppWarningMsg 82
+Xt XtSetErrorMsgHandler 83
+Xt XtAppSetErrorMsgHandler 84
+Xt XtSetWarningMsgHandler 85
+Xt XtAppSetWarningMsgHandler 86
+Xt XtError 87
+Xt XtAppError 88
+Xt XtWarning 89
+Xt XtAppWarning 90
+Xt XtSetErrorHandler 91
+Xt XtAppSetErrorHandler 92
+Xt XtSetWarningHandler 93
+Xt XtAppSetWarningHandler 94
+Xt XtBuildEventMask 95
+Xt XtRemoveEventHandler 96
+Xt XtAddEventHandler 97
+Xt XtInsertEventHandler 98
+Xt XtRemoveRawEventHandler 99
+Xt XtInsertRawEventHandler 100
+Xt XtAddRawEventHandler 101
+Xt XtWindowToWidget 102
+Xt XtDispatchEvent 103
+Xt XtAddGrab 104
+Xt XtRemoveGrab 105
+Xt XtMainLoop 106
+Xt XtAppMainLoop 107
+Xt XtAddExposureToRegion 108
+Xt XtLastTimestampProcessed 109
+Xt XtIsRectObj 110
+Xt XtIsWidget 111
+Xt XtIsComposite 112
+Xt XtIsConstraint 113
+Xt XtIsShell 114
+Xt XtIsOverrideShell 115
+Xt XtIsWMShell 116
+Xt XtIsVendorShell 117
+Xt XtIsTransientShell 118
+Xt XtIsTopLevelShell 119
+Xt XtIsApplicationShell 120
+Xt XtMapWidget 121
+Xt XtUnmapWidget 122
+Xt XtNewString 123
+Xt XtIsSessionShell 124
+Xt XtAllocateGC 125
+Xt XtGetGC 126
+Xt XtReleaseGC 127
+Xt XtDestroyGC 128
+Xt XtMakeGeometryRequest 129
+Xt XtMakeResizeRequest 130
+Xt XtResizeWindow 131
+Xt XtResizeWidget 132
+Xt XtConfigureWidget 133
+Xt XtMoveWidget 134
+Xt XtTranslateCoords 135
+Xt XtQueryGeometry 136
+Xt XtGetActionKeysym 137
+Xt XtGetResourceList 138
+Xt XtGetConstraintResourceList 139
+Xt XtGetValues 140
+Xt XtGetSubvalues 141
+Xt XtToolkitInitialize 142
+Xt XtSetLanguageProc 143
+Xt XtScreenDatabase 144
+Xt XtAppSetFallbackResources 145
+Xt XtAppInitialize 146
+Xt XtInitialize 147
+Xt XtOpenApplication 148
+Xt XtIsSubclass 149
+Xt XtRealizeWidget 150
+Xt XtUnrealizeWidget 151
+Xt XtCreateWindow 152
+Xt XtNameToWidget 153
+Xt XtDisplayOfObject 154
+Xt XtDisplay 155
+Xt XtScreenOfObject 156
+Xt XtScreen 157
+Xt XtWindowOfObject 158
+Xt XtWindow 159
+Xt XtSuperclass 160
+Xt XtClass 161
+Xt XtIsManaged 162
+Xt XtIsRealized 163
+Xt XtIsSensitive 164
+Xt XtParent 165
+Xt XtName 166
+Xt XtIsObject 167
+Xt XtFindFile 168
+Xt XtResolvePathname 169
+Xt XtCallAcceptFocus 170
+Xt XtSetKeyboardFocus 171
+Xt XtUnmanageChildren 172
+Xt XtUnmanageChild 173
+Xt XtManageChildren 174
+Xt XtManageChild 175
+Xt XtSetMappedWhenManaged 176
+Xt XtAddTimeOut 177
+Xt XtAppAddTimeOut 178
+Xt XtRemoveTimeOut 179
+Xt XtAddWorkProc 180
+Xt XtAppAddWorkProc 181
+Xt XtRemoveWorkProc 182
+Xt XtAddInput 183
+Xt XtAppAddInput 184
+Xt XtRemoveInput 185
+Xt XtNextEvent 186
+Xt XtAppNextEvent 187
+Xt XtProcessEvent 188
+Xt XtAppProcessEvent 189
+Xt XtPending 190
+Xt XtAppPending 191
+Xt XtPeekEvent 192
+Xt XtAppPeekEvent 193
+Xt XtGrabKey 194
+Xt XtGrabButton 195
+Xt XtUngrabKey 196
+Xt XtUngrabButton 197
+Xt XtGrabKeyboard 198
+Xt XtUngrabKeyboard 199
+Xt XtGrabPointer 200
+Xt XtUngrabPointer 201
+Xt XtPopup 202
+Xt XtPopupSpringLoaded 203
+Xt XtPopdown 204
+Xt XtCallbackPopdown 205
+Xt XtCallbackNone 206
+Xt XtCallbackNonexclusive 207
+Xt XtCallbackExclusive 208
+Xt XtGetSubresources 209
+Xt XtGetApplicationResources 210
+Xt XtSetSelectionTimeout 211
+Xt XtAppSetSelectionTimeout 212
+Xt XtGetSelectionTimeout 213
+Xt XtAppGetSelectionTimeout 214
+Xt XtOwnSelection 215
+Xt XtOwnSelectionIncremental 216
+Xt XtDisownSelection 217
+Xt XtGetSelectionValue 218
+Xt XtGetSelectionValueIncremental 219
+Xt XtGetSelectionValues 220
+Xt XtGetSelectionValuesIncremental 221
+Xt XtGetSelectionRequest 222
+Xt XtSetSensitive 223
+Xt XtSetSubvalues 224
+Xt XtSetValues 225
+Xt XtSetWMColormapWindows 226
+Xt XtAddActions 227
+Xt XtAppAddActions 228
+Xt XtGetActionList 229
+Xt XtMenuPopupAction 230
+Xt XtCallActionProc 231
+Xt XtRegisterGrabAction 232
+Xt XtConvertCase 233
+Xt XtTranslateKeycode 234
+Xt XtTranslateKey 235
+Xt XtSetKeyTranslator 236
+Xt XtRegisterCaseConverter 237
+Xt XtGetKeysymTable 238
+Xt XtKeysymToKeycodeList 239
+Xt XtCvtStringToAcceleratorTable 240
+Xt XtCvtStringToTranslationTable 241
+Xt XtParseAcceleratorTable 242
+Xt XtParseTranslationTable 243
+Xt XtUninstallTranslations 244
+Xt XtInstallAccelerators 245
+Xt XtInstallAllAccelerators 246
+Xt XtAugmentTranslations 247
+Xt XtOverrideTranslations 248
+Xt XtVaCreateWidget 249
+Xt XtVaCreateManagedWidget 250
+Xt XtVaAppCreateShell 251
+Xt XtVaCreatePopupShell 252
+Xt XtVaSetValues 253
+Xt XtVaSetSubvalues 254
+Xt XtVaAppInitialize 255
+Xt XtVaOpenApplication 256
+Xt XtVaGetSubresources 257
+Xt XtVaGetApplicationResources 258
+Xt XtVaGetValues 259
+Xt XtVaGetSubvalues 260
+Xt XtVaCreateArgsList 261
+Xt XtCvtStringToRestartStyle 262
+Xt XtCvtStringToGravity 263
+Xt XtAppSetExitFlag 264
+Xt XtAppGetExitFlag 265
+Xt XtGetDisplays 266
+Xt XtRemoveEventTypeHandler 267
+Xt XtInsertEventTypeHandler 268
+Xt XtRegisterDrawable 269
+Xt XtUnregisterDrawable 270
+Xt XtDispatchEventToWidget 271
+Xt XtLastEventProcessed 272
+Xt XtSetEventDispatcher 273
+Xt XtRegisterExtensionSelector 274
+Xt XtAppAddBlockHook 275
+Xt XtRemoveBlockHook 276
+Xt XtHooksOfDisplay 277
+Xt XtGetClassExtension 278
+Xt XtGetKeyboardFocusWidget 279
+Xt XtChangeManagedSet 280
+Xt XtAddSignal 281
+Xt XtAppAddSignal 282
+Xt XtRemoveSignal 283
+Xt XtNoticeSignal 284
+Xt XtReservePropertyAtom 285
+Xt XtReleasePropertyAtom 286
+Xt XtCreateSelectionRequest 287
+Xt XtSendSelectionRequest 288
+Xt XtCancelSelectionRequest 289
+Xt XtSetSelectionParameters 290
+Xt XtGetSelectionParameters 291
+Xt XtSessionGetToken 292
+Xt XtSessionReturnToken 293
+Xt XtAppLock 294
+Xt XtAppUnlock 295
+Xt XtProcessLock 296
+Xt XtProcessUnlock 297
+Xt XtToolkitThreadInitialize 298
+Xt _XtDoFreeBindings 299
+Xt _XtAllocError 300
+Xt _XtHeapInit 301
+Xt _XtHeapAlloc 302
+Xt _XtHeapFree 303
+Xt _XtAddCallback 304
+Xt _XtAddCallbackOnce 305
+Xt _XtRemoveCallback 306
+Xt _XtRemoveAllCallbacks 307
+Xt _XtCompileCallbackList 308
+Xt _XtGetCallbackList 309
+Xt _XtCallConditionalCallbackList 310
+Xt _XtSetDefaultConverterTable 311
+Xt _XtFreeConverterTable 312
+Xt _XtTableAddConverter 313
+Xt _XtCacheFlushTag 314
+Xt _XtConvert 315
+Xt _XtConvertInitialize 316
+Xt _XtAddDefaultConverters 317
+Xt _XtCreateWidget 318
+Xt _XtCreatePopupShell 319
+Xt _XtAppCreateShell 320
+Xt _XtDoPhase2Destroy 321
+Xt _XtGetProcessContext 322
+Xt _XtDefaultAppContext 323
+Xt _XtAppInit 324
+Xt _XtDestroyAppContexts 325
+Xt _XtSortPerDisplayList 326
+Xt _XtCloseDisplays 327
+Xt _XtDefaultErrorMsg 328
+Xt _XtDefaultWarningMsg 329
+Xt _XtDefaultError 330
+Xt _XtDefaultWarning 331
+Xt _XtSetDefaultErrorHandlers 332
+Xt _XtAllocWWTable 333
+Xt _XtFreeWWTable 334
+Xt _XtConvertTypeToMask 335
+Xt _XtOnGrabList 336
+Xt _XtEventInitialize 337
+Xt _XtFreeEventTable 338
+Xt _XtSendFocusEvent 339
+Xt _XtFreePerWidgetInput 340
+Xt _XtGetPerWidgetInput 341
+Xt _XtFillAncestorList 342
+Xt _XtFindRemapWidget 343
+Xt _XtUngrabBadGrabs 344
+Xt _XtGClistFree 345
+Xt _XtMakeGeometryRequest 346
+Xt _XtInherit 347
+Xt _XtPreparseCommandLine 348
+Xt _XtDisplayInitialize 349
+Xt _XtCheckSubclassFlag 350
+Xt _XtIsSubclassOf 351
+Xt _XtWindowedAncestor 352
+Xt _XtProcessKeyboardEvent 353
+Xt _XtHandleFocus 354
+Xt _XtRemoveAllInputs 355
+Xt _XtRefreshMapping 356
+Xt _XtDestroyServerGrabs 357
+Xt _XtCheckServerGrabsOnWidget 358
+Xt _XtProcessPointerEvent 359
+Xt _XtPopup 360
+Xt _XtCopyFromParent 361
+Xt _XtCopyFromArg 362
+Xt _XtCopyToArg 363
+Xt _XtCompileResourceList 364
+Xt _XtDependencies 365
+Xt _XtResourceDependencies 366
+Xt _XtConstraintResDependencies 367
+Xt _XtCreateIndirectionTable 368
+Xt _XtGetResources 369
+Xt _XtResourceListInitialize 370
+Xt _XtSetDefaultSelectionTimeout 371
+Xt _XtShellGetCoordinates 372
+Xt _XtInitializeActionData 373
+Xt _XtBindActions 374
+Xt _XtUnbindActions 375
+Xt _XtFreeActions 376
+Xt _XtRegisterGrabs 377
+Xt _XtGrabInitialize 378
+Xt _XtComputeLateBindings 379
+Xt _XtAllocTMContext 380
+Xt _XtMatchUsingDontCareMods 381
+Xt _XtMatchUsingStandardMods 382
+Xt _XtBuildKeysymTables 383
+Xt _XtTranslateInitialize 384
+Xt _XtAddTMConverters 385
+Xt _XtPrintXlations 386
+Xt _XtDisplayTranslations 387
+Xt _XtDisplayAccelerators 388
+Xt _XtDisplayInstalledAccelerators 389
+Xt _XtPrintActions 390
+Xt _XtPrintState 391
+Xt _XtPrintEventSeq 392
+Xt _XtGetQuarkIndex 393
+Xt _XtGetTypeIndex 394
+Xt _XtGetModifierIndex 395
+Xt _XtRegularMatch 396
+Xt _XtMatchAtom 397
+Xt _XtTranslateEvent 398
+Xt _XtTraverseStateTree 399
+Xt _XtInstallTranslations 400
+Xt _XtRemoveTranslations 401
+Xt _XtDestroyTMData 402
+Xt _XtCreateXlations 403
+Xt _XtParseTreeToStateTree 404
+Xt _XtAddEventSeqToStateTree 405
+Xt _XtCvtMergeTranslations 406
+Xt _XtGetTranslationValue 407
+Xt _XtRemoveStateTreeByIndex 408
+Xt _XtFreeTranslations 409
+Xt _XtMergeTranslations 410
+Xt _XtUnmergeTranslations 411
+Xt _XtPopupInitialize 412
+Xt _XtVaAppInitialize 413
+Xt _XtVaOpenApplication 414
+Xt _XtCountVaList 415
+Xt _XtVaCreateTypedArgList 416
+Xt _XtVaToArgList 417
+Xt _XtVaToTypedArgList 418
+Xt _XtPeekCallback 419
+Xt _XtCreateHookObj 420
+Xt _XtGetPerDisplay 421
+Xt _XtGetPerDisplayInput 422
+Xt _XtExtensionSelect 423
+Xt _XtAddShellToHookObj 424
+Xt _XtIsHookObject 425
+Xt _XtGetUserName 426
+Xt _XtWaitForSomething 427
+Xt XtDirectConvert 433
+Xt colorConvertArgs 435
+Xt screenConvertArg 436
+Xt XtCXtToolkitError 437
+Xt _XtQString 438
+Xt _XtAppDestroyCount 439
+Xt _XtperDisplayList 440
+Xt _XtGlobalTM 444
+Xt XtStrings 445
+Xt overrideShellClassRec 446
+Xt overrideShellWidgetClass 447
+Xt constraintClassRec 448
+Xt constraintWidgetClass 449
+Xt objectClassRec 450
+Xt objectClass 451
+Xt widgetClassRec 452
+Xt widgetClass 453
+Xt rectObjClassRec 454
+Xt rectObjClass 455
+Xt coreWidgetClass 457
+Xt wmShellClassRec 458
+Xt wmShellWidgetClass 459
+Xt XtShellStrings 460
+Xt topLevelShellClassRec 461
+Xt topLevelShellWidgetClass 462
+Xt transientShellClassRec 463
+Xt transientShellWidgetClass 464
+Xt shellClassRec 465
+Xt shellWidgetClass 466
+Xt compositeClassRec 467
+Xt compositeWidgetClass 468
+Xt applicationShellClassRec 469
+Xt applicationShellWidgetClass 470
+Xt _XtInheritTranslations 471
+Xt sessionShellClassRec 472
+Xt sessionShellWidgetClass 473
+Xt vendorShellClassRec 474
+Xt vendorShellWidgetClass 475
+Xt hookObjClassRec 476
+Xt hookObjectClass 477
+LIBRARY Xtst Xtst
+Xtst XTestCompareCurrentCursorWithWindow 1
+Xtst XTestCompareCursorWithWindow 2
+Xtst XTestDiscard 3
+Xtst XTestFakeButtonEvent 4
+Xtst XTestFakeDeviceButtonEvent 5
+Xtst XTestFakeDeviceKeyEvent 6
+Xtst XTestFakeDeviceMotionEvent 7
+Xtst XTestFakeKeyEvent 8
+Xtst XTestFakeMotionEvent 9
+Xtst XTestFakeProximityEvent 10
+Xtst XTestFakeRelativeMotionEvent 11
+Xtst XTestGrabControl 12
+Xtst XTestQueryExtension 13
+Xtst XTestSetGContextOfGC 14
+Xtst XTestSetVisualIDOfVisual 15
+Xtst XRecordIdBaseMask 16
+Xtst XRecordQueryVersion 17
+Xtst XRecordCreateContext 18
+Xtst XRecordAllocRange 19
+Xtst XRecordRegisterClients 20
+Xtst XRecordUnregisterClients 21
+Xtst XRecordGetContext 22
+Xtst XRecordFreeState 23
+Xtst XRecordFreeData 24
+Xtst XRecordEnableContext 25
+Xtst XRecordEnableContextAsync 26
+Xtst XRecordProcessReplies 27
+Xtst XRecordDisableContext 28
+Xtst XRecordFreeContext 29
+LIBRARY Xxf86dga Xxf86dga
+Xxf86dga XF86DGAQueryExtension 1
+Xxf86dga XF86DGAQueryVersion 2
+Xxf86dga XF86DGAGetVideoLL 3
+Xxf86dga XF86DGADirectVideoLL 4
+Xxf86dga XF86DGAGetViewPort 5
+Xxf86dga XF86DGASetViewPort 6
+Xxf86dga XF86DGAGetVidPage 7
+Xxf86dga XF86DGASetVidPage 8
+Xxf86dga XF86DGADirectVideo 9
+Xxf86dga XF86DGAGetVideo 10
+; 4.x exports starting from 20
+Xxf86dga XF86DGAQueryDirectVideo 20
+Xxf86dga XF86DGAInstallColormap 21
+LIBRARY Xxf86misc X86misc
+Xxf86misc XF86MiscQueryExtension 1
+Xxf86misc XF86MiscQueryVersion 2
+Xxf86misc XF86MiscSetSaver 3
+Xxf86misc XF86MiscGetSaver 4
+Xxf86misc XF86MiscSetKbdSettings 5
+Xxf86misc XF86MiscGetKbdSettings 6
+Xxf86misc XF86MiscSetMouseSettings 7
+Xxf86misc XF86MiscGetMouseSettings 8
+Xxf86misc XF86MiscGetFilePaths 9
+LIBRARY Xxf86vm Xxf86vm
+Xxf86vm XF86VidModeQueryExtension 1
+Xxf86vm XF86VidModeQueryVersion 2
+Xxf86vm XF86VidModeGetModeLine 3
+Xxf86vm XF86VidModeModModeLine 4
+Xxf86vm XF86VidModeSwitchMode 5
+Xxf86vm XF86VidModeLockModeSwitch 6
+Xxf86vm XF86VidModeGetMonitor 7
+Xxf86vm XF86VidModeGetAllModeLines 8
+Xxf86vm XF86VidModeGetGamma 9
+Xxf86vm XF86VidModeSetGamma 10
+Xxf86vm XF86VidModeSwitchToMode 11
+Xxf86vm XF86VidModeAddModeLine 12
+LIBRARY dps dps
+dps CSDPSInit 1
+dps CSDPSHeadOfDpyExt 2
+dps DPSCAPChangeGC 3
+dps DPSCAPCreate 4
+dps DPSCAPDestroy 5
+dps DPSCAPOpenAgent 6
+dps DPSCAPStartUp 8
+dps DPSCAPWrite 9
+dps DPSCAPCloseDisplayProc 10
+dps DPSCAPCloseAgent 13
+dps DPSclientsync 14
+dps DPScurrentXgcdrawable 15
+dps DPScurrentXgcdrawablecolor 16
+dps DPScurrentXoffset 17
+dps DPSsetXgcdrawable 18
+dps DPSsetXgcdrawablecolor 19
+dps DPSsetXoffset 20
+dps DPSsetXrgbactual 21
+dps DPSclientXready 22
+dps DPSsetXdrawingfunction 23
+dps DPScurrentXdrawingfunction 24
+dps DPSWarnProc 25
+dps DPSFatalProc 26
+dps DPSCantHappen 27
+dps DPScolorimage 28
+dps DPScurrentblackgeneration 29
+dps DPScurrentcmykcolor 30
+dps DPScurrentcolorscreen 31
+dps DPScurrentcolortransfer 32
+dps DPScurrentundercolorremoval 33
+dps DPSsetblackgeneration 34
+dps DPSsetcmykcolor 35
+dps DPSsetcolorscreen 36
+dps DPSsetcolortransfer 37
+dps DPSsetundercolorremoval 38
+dps DPSeq 39
+dps DPSexit 40
+dps DPSfalse 41
+dps DPSfor 42
+dps DPSforall 43
+dps DPSge 44
+dps DPSgt 45
+dps DPSif 46
+dps DPSifelse 47
+dps DPSle 48
+dps DPSloop 49
+dps DPSlt 50
+dps DPSne 51
+dps DPSnot 52
+dps DPSor 53
+dps DPSrepeat 54
+dps DPSstop 55
+dps DPSstopped 56
+dps DPStrue 57
+dps DPSUserObjects 58
+dps DPScondition 59
+dps DPScurrentcontext 60
+dps DPScurrentobjectformat 61
+dps DPSdefineusername 62
+dps DPSdefineuserobject 63
+dps DPSdetach 64
+dps DPSexecuserobject 65
+dps DPSfork 66
+dps DPSjoin 67
+dps DPSlock 68
+dps DPSmonitor 69
+dps DPSnotify 70
+dps DPSsetobjectformat 71
+dps DPSsetvmthreshold 72
+dps DPSundefineuserobject 73
+dps DPSwait 74
+dps DPSyield 75
+dps DPSaload 76
+dps DPSanchorsearch 77
+dps DPSarray 78
+dps DPSastore 79
+dps DPSbegin 80
+dps DPSclear 81
+dps DPScleartomark 82
+dps DPScopy 83
+dps DPScount 84
+dps DPScounttomark 85
+dps DPScvi 86
+dps DPScvlit 87
+dps DPScvn 88
+dps DPScvr 89
+dps DPScvrs 90
+dps DPScvs 91
+dps DPScvx 92
+dps DPSdef 93
+dps DPSdict 94
+dps DPSdictstack 95
+dps DPSdup 96
+dps DPSend 97
+dps DPSexch 98
+dps DPSexecstack 99
+dps DPSexecuteonly 100
+dps DPSget 101
+dps DPSgetinterval 102
+dps DPSindex 103
+dps DPSknown 104
+dps DPSlength 105
+dps DPSload 106
+dps DPSmark 107
+dps DPSmatrix 108
+dps DPSmaxlength 109
+dps DPSnoaccess 110
+dps DPSnull 111
+dps DPSpackedarray 112
+dps DPSpop 113
+dps DPSput 114
+dps DPSputinterval 115
+dps DPSrcheck 116
+dps DPSreadonly 117
+dps DPSroll 118
+dps DPSscheck 119
+dps DPSsearch 120
+dps DPSshareddict 121
+dps DPSstatusdict 122
+dps DPSstore 123
+dps DPSstring 124
+dps DPSstringwidth 125
+dps DPSsystemdict 126
+dps DPSuserdict 127
+dps DPSwcheck 128
+dps DPSwhere 129
+dps DPSxcheck 130
+dps DPSCreatePSWDict 131
+dps DPSDestroyPSWDict 132
+dps DPSWDictLookup 133
+dps DPSWDictEnter 134
+dps DPSWDictRemove 135
+dps DPSMakeAtom 136
+dps DPSFontDirectory 137
+dps DPSISOLatin1Encoding 138
+dps DPSSharedFontDirectory 139
+dps DPSStandardEncoding 140
+dps DPScachestatus 141
+dps DPScurrentcacheparams 142
+dps DPScurrentfont 143
+dps DPSdefinefont 144
+dps DPSfindfont 145
+dps DPSmakefont 146
+dps DPSscalefont 147
+dps DPSselectfont 148
+dps DPSsetcachedevice 149
+dps DPSsetcachelimit 150
+dps DPSsetcacheparams 151
+dps DPSsetcharwidth 152
+dps DPSsetfont 153
+dps DPSundefinefont 154
+dps DPSconcat 155
+dps DPScurrentdash 156
+dps DPScurrentflat 157
+dps DPScurrentgray 158
+dps DPScurrentgstate 159
+dps DPScurrenthalftone 160
+dps DPScurrenthalftonephase 161
+dps DPScurrenthsbcolor 162
+dps DPScurrentlinecap 163
+dps DPScurrentlinejoin 164
+dps DPScurrentlinewidth 165
+dps DPScurrentmatrix 166
+dps DPScurrentmiterlimit 167
+dps DPScurrentpoint 168
+dps DPScurrentrgbcolor 169
+dps DPScurrentscreen 170
+dps DPScurrentstrokeadjust 171
+dps DPScurrenttransfer 172
+dps DPSdefaultmatrix 173
+dps DPSgrestore 174
+dps DPSgrestoreall 175
+dps DPSgsave 176
+dps DPSgstate 177
+dps DPSinitgraphics 178
+dps DPSinitmatrix 179
+dps DPSrotate 180
+dps DPSscale 181
+dps DPSsetdash 182
+dps DPSsetflat 183
+dps DPSsetgray 184
+dps DPSsetgstate 185
+dps DPSsethalftone 186
+dps DPSsethalftonephase 187
+dps DPSsethsbcolor 188
+dps DPSsetlinecap 189
+dps DPSsetlinejoin 190
+dps DPSsetlinewidth 191
+dps DPSsetmatrix 192
+dps DPSsetmiterlimit 193
+dps DPSsetrgbcolor 194
+dps DPSsetscreen 195
+dps DPSsetstrokeadjust 196
+dps DPSsettransfer 197
+dps DPStranslate 198
+dps DPSclientPrintProc 199
+dps DPSinnerProcWriteData 200
+dps DPSSafeSetLastNameIndex 201
+dps DPSCheckInitClientGlobals 202
+dps DPSPrivateCheckWait 203
+dps DPSPrivateDestroyContext 204
+dps DPSPrivateDestroySpace 205
+dps DPSCheckShared 206
+dps DPSDefaultPrivateHandler 207
+dps DPSCreateContext 208
+dps DPSInitCommonTextContextProcs 209
+dps DPSInitCommonContextProcs 210
+dps DPSInitPrivateContextProcs 211
+dps DPSInitPrivateContextFields 212
+dps DPSInitPrivateTextContextFields 213
+dps DPSInitCommonSpaceProcs 214
+dps DPSInitPrivateSpaceFields 215
+dps DPSequals 216
+dps DPSequalsequals 217
+dps DPSbytesavailable 218
+dps DPSclosefile 219
+dps DPScurrentfile 220
+dps DPSdeletefile 221
+dps DPSecho 222
+dps DPSfile 223
+dps DPSfilenameforall 224
+dps DPSfileposition 225
+dps DPSflush 226
+dps DPSflushfile 227
+dps DPSprint 228
+dps DPSprintobject 229
+dps DPSpstack 230
+dps DPSread 231
+dps DPSreadhexstring 232
+dps DPSreadline 233
+dps DPSreadstring 234
+dps DPSrenamefile 235
+dps DPSresetfile 236
+dps DPSsetfileposition 237
+dps DPSstack 238
+dps DPSstatus 239
+dps DPStoken 240
+dps DPSwrite 241
+dps DPSwritehexstring 242
+dps DPSwriteobject 243
+dps DPSwritestring 244
+dps DPSleftbracket 245
+dps DPSrightbracket 246
+dps DPSleftleft 247
+dps DPSrightright 248
+dps DPScshow 249
+dps DPScurrentcolor 250
+dps DPScurrentcolorrendering 251
+dps DPScurrentcolorspace 252
+dps DPScurrentdevparams 253
+dps DPScurrentglobal 254
+dps DPScurrentoverprint 255
+dps DPScurrentpagedevice 256
+dps DPScurrentsystemparams 257
+dps DPScurrentuserparams 258
+dps DPSdefineresource 259
+dps DPSexecform 260
+dps DPSfilter 261
+dps DPSfindencoding 262
+dps DPSfindresource 263
+dps DPSgcheck 264
+dps DPSglobaldict 265
+dps DPSGlobalFontDirectory 266
+dps DPSglyphshow 267
+dps DPSlanguagelevel 268
+dps DPSmakepattern 269
+dps DPSproduct 270
+dps DPSresourceforall 271
+dps DPSresourcestatus 272
+dps DPSrevision 273
+dps DPSrootfont 274
+dps DPSserialnumber 275
+dps DPSsetcolor 276
+dps DPSsetcolorrendering 277
+dps DPSsetcolorspace 278
+dps DPSsetdevparams 279
+dps DPSsetglobal 280
+dps DPSsetoverprint 281
+dps DPSsetpagedevice 282
+dps DPSsetpattern 283
+dps DPSsetsystemparams 284
+dps DPSsetuserparams 285
+dps DPSstartjob 286
+dps DPSundefineresource 287
+dps DPSabs 288
+dps DPSadd 289
+dps DPSand 290
+dps DPSatan 291
+dps DPSbitshift 292
+dps DPSceiling 293
+dps DPScos 294
+dps DPSdiv 295
+dps DPSexp 296
+dps DPSfloor 297
+dps DPSidiv 298
+dps DPSln 299
+dps DPSlog 300
+dps DPSmod 301
+dps DPSmul 302
+dps DPSneg 303
+dps DPSround 304
+dps DPSsin 305
+dps DPSsqrt 306
+dps DPSsub 307
+dps DPStruncate 308
+dps DPSxor 309
+dps DPSbanddevice 310
+dps DPSframedevice 311
+dps DPSnulldevice 312
+dps DPSrenderbands 313
+dps DPSconcatmatrix 314
+dps DPSdtransform 315
+dps DPSidentmatrix 316
+dps DPSidtransform 317
+dps DPSinvertmatrix 318
+dps DPSitransform 319
+dps DPStransform 320
+dps DPSgetboolean 321
+dps DPSgetchararray 322
+dps DPSgetfloat 323
+dps DPSgetfloatarray 324
+dps DPSgetint 325
+dps DPSgetintarray 326
+dps DPSgetstring 327
+dps DPSsendboolean 328
+dps DPSsendchararray 329
+dps DPSsendfloat 330
+dps DPSsendfloatarray 331
+dps DPSsendint 332
+dps DPSsendintarray 333
+dps DPSsendstring 334
+dps DPSarc 335
+dps DPSarcn 336
+dps DPSarct 337
+dps DPSarcto 338
+dps DPScharpath 339
+dps DPSclip 340
+dps DPSclippath 341
+dps DPSclosepath 342
+dps DPScurveto 343
+dps DPSeoclip 344
+dps DPSeoviewclip 345
+dps DPSflattenpath 346
+dps DPSinitclip 347
+dps DPSinitviewclip 348
+dps DPSlineto 349
+dps DPSmoveto 350
+dps DPSnewpath 351
+dps DPSpathbbox 352
+dps DPSpathforall 353
+dps DPSrcurveto 354
+dps DPSrectclip 355
+dps DPSrectviewclip 356
+dps DPSreversepath 357
+dps DPSrlineto 358
+dps DPSrmoveto 359
+dps DPSsetbbox 360
+dps DPSsetucacheparams 361
+dps DPSuappend 362
+dps DPSucache 363
+dps DPSucachestatus 364
+dps DPSupath 365
+dps DPSviewclip 366
+dps DPSviewclippath 367
+dps DPSashow 368
+dps DPSawidthshow 369
+dps DPScopypage 370
+dps DPSeofill 371
+dps DPSerasepage 372
+dps DPSfill 373
+dps DPSimage 374
+dps DPSimagemask 375
+dps DPSkshow 376
+dps DPSrectfill 377
+dps DPSrectstroke 378
+dps DPSshow 379
+dps DPSshowpage 380
+dps DPSstroke 381
+dps DPSstrokepath 382
+dps DPSueofill 383
+dps DPSufill 384
+dps DPSustroke 385
+dps DPSustrokepath 386
+dps DPSwidthshow 387
+dps DPSxshow 388
+dps DPSxyshow 389
+dps DPSyshow 390
+dps DPSInitClient 391
+dps DPSIncludePrivContext 392
+dps DPSSendPostScript 393
+dps DPSSendInterrupt 394
+dps DPSSendEOF 395
+dps DPSSendTerminate 396
+dps DPSSendDestroySpace 397
+dps DPSCheckRaiseError 399
+dps DPSInitSysNames 400
+dps DPSSetWh 401
+dps DPSOutOfMemory 402
+dps DPSbind 403
+dps DPScleardictstack 404
+dps DPScountdictstack 405
+dps DPScountexecstack 406
+dps DPScurrentdict 407
+dps DPScurrentpacking 408
+dps DPScurrentshared 409
+dps DPSdeviceinfo 410
+dps DPSerrordict 411
+dps DPSexec 412
+dps DPSprompt 413
+dps DPSquit 414
+dps DPSrand 415
+dps DPSrealtime 416
+dps DPSrestore 417
+dps DPSrrand 418
+dps DPSrun 419
+dps DPSsave 420
+dps DPSsetpacking 421
+dps DPSsetshared 422
+dps DPSsrand 423
+dps DPSstart 424
+dps DPStype 425
+dps DPSundef 426
+dps DPSusertime 427
+dps DPSversion 428
+dps DPSvmreclaim 429
+dps DPSvmstatus 430
+dps DPSineofill 431
+dps DPSinfill 432
+dps DPSinstroke 433
+dps DPSinueofill 434
+dps DPSinufill 435
+dps DPSinustroke 436
+dps DPSwtranslation 437
+dps PSclientsync 438
+dps PScurrentXgcdrawable 439
+dps PScurrentXgcdrawablecolor 440
+dps PScurrentXoffset 441
+dps PSsetXgcdrawable 442
+dps PSsetXgcdrawablecolor 443
+dps PSsetXoffset 444
+dps PSsetXrgbactual 445
+dps PSclientXready 446
+dps PSsetXdrawingfunction 447
+dps PScurrentXdrawingfunction 448
+dps PScolorimage 449
+dps PScurrentblackgeneration 450
+dps PScurrentcmykcolor 451
+dps PScurrentcolorscreen 452
+dps PScurrentcolortransfer 453
+dps PScurrentundercolorremoval 454
+dps PSsetblackgeneration 455
+dps PSsetcmykcolor 456
+dps PSsetcolorscreen 457
+dps PSsetcolortransfer 458
+dps PSsetundercolorremoval 459
+dps PSeq 460
+dps PSexit 461
+dps PSfalse 462
+dps PSfor 463
+dps PSforall 464
+dps PSge 465
+dps PSgt 466
+dps PSif 467
+dps PSifelse 468
+dps PSle 469
+dps PSloop 470
+dps PSlt 471
+dps PSne 472
+dps PSnot 473
+dps PSor 474
+dps PSrepeat 475
+dps PSstop 476
+dps PSstopped 477
+dps PStrue 478
+dps PSUserObjects 479
+dps PScondition 480
+dps PScurrentcontext 481
+dps PScurrentobjectformat 482
+dps PSdefineusername 483
+dps PSdefineuserobject 484
+dps PSdetach 485
+dps PSexecuserobject 486
+dps PSfork 487
+dps PSjoin 488
+dps PSlock 489
+dps PSmonitor 490
+dps PSnotify 491
+dps PSsetobjectformat 492
+dps PSsetvmthreshold 493
+dps PSundefineuserobject 494
+dps PSwait 495
+dps PSyield 496
+dps PSaload 497
+dps PSanchorsearch 498
+dps PSarray 499
+dps PSastore 500
+dps PSbegin 501
+dps PSclear 502
+dps PScleartomark 503
+dps PScopy 504
+dps PScount 505
+dps PScounttomark 506
+dps PScvi 507
+dps PScvlit 508
+dps PScvn 509
+dps PScvr 510
+dps PScvrs 511
+dps PScvs 512
+dps PScvx 513
+dps PSdef 514
+dps PSdict 515
+dps PSdictstack 516
+dps PSdup 517
+dps PSend 518
+dps PSexch 519
+dps PSexecstack 520
+dps PSexecuteonly 521
+dps PSget 522
+dps PSgetinterval 523
+dps PSindex 524
+dps PSknown 525
+dps PSlength 526
+dps PSload 527
+dps PSmark 528
+dps PSmatrix 529
+dps PSmaxlength 530
+dps PSnoaccess 531
+dps PSnull 532
+dps PSpackedarray 533
+dps PSpop 534
+dps PSput 535
+dps PSputinterval 536
+dps PSrcheck 537
+dps PSreadonly 538
+dps PSroll 539
+dps PSscheck 540
+dps PSsearch 541
+dps PSshareddict 542
+dps PSstatusdict 543
+dps PSstore 544
+dps PSstring 545
+dps PSstringwidth 546
+dps PSsystemdict 547
+dps PSuserdict 548
+dps PSwcheck 549
+dps PSwhere 550
+dps PSxcheck 551
+dps PSFontDirectory 552
+dps PSISOLatin1Encoding 553
+dps PSSharedFontDirectory 554
+dps PSStandardEncoding 555
+dps PScachestatus 556
+dps PScurrentcacheparams 557
+dps PScurrentfont 558
+dps PSdefinefont 559
+dps PSfindfont 560
+dps PSmakefont 561
+dps PSscalefont 562
+dps PSselectfont 563
+dps PSsetcachedevice 564
+dps PSsetcachelimit 565
+dps PSsetcacheparams 566
+dps PSsetcharwidth 567
+dps PSsetfont 568
+dps PSundefinefont 569
+dps PSconcat 570
+dps PScurrentdash 571
+dps PScurrentflat 572
+dps PScurrentgray 573
+dps PScurrentgstate 574
+dps PScurrenthalftone 575
+dps PScurrenthalftonephase 576
+dps PScurrenthsbcolor 577
+dps PScurrentlinecap 578
+dps PScurrentlinejoin 579
+dps PScurrentlinewidth 580
+dps PScurrentmatrix 581
+dps PScurrentmiterlimit 582
+dps PScurrentpoint 583
+dps PScurrentrgbcolor 584
+dps PScurrentscreen 585
+dps PScurrentstrokeadjust 586
+dps PScurrenttransfer 587
+dps PSdefaultmatrix 588
+dps PSgrestore 589
+dps PSgrestoreall 590
+dps PSgsave 591
+dps PSgstate 592
+dps PSinitgraphics 593
+dps PSinitmatrix 594
+dps PSrotate 595
+dps PSscale 596
+dps PSsetdash 597
+dps PSsetflat 598
+dps PSsetgray 599
+dps PSsetgstate 600
+dps PSsethalftone 601
+dps PSsethalftonephase 602
+dps PSsethsbcolor 603
+dps PSsetlinecap 604
+dps PSsetlinejoin 605
+dps PSsetlinewidth 606
+dps PSsetmatrix 607
+dps PSsetmiterlimit 608
+dps PSsetrgbcolor 609
+dps PSsetscreen 610
+dps PSsetstrokeadjust 611
+dps PSsettransfer 612
+dps PStranslate 613
+dps PSequals 614
+dps PSequalsequals 615
+dps PSbytesavailable 616
+dps PSclosefile 617
+dps PScurrentfile 618
+dps PSdeletefile 619
+dps PSecho 620
+dps PSfile 621
+dps PSfilenameforall 622
+dps PSfileposition 623
+dps PSflush 624
+dps PSflushfile 625
+dps PSprint 626
+dps PSprintobject 627
+dps PSpstack 628
+dps PSread 629
+dps PSreadhexstring 630
+dps PSreadline 631
+dps PSreadstring 632
+dps PSrenamefile 633
+dps PSresetfile 634
+dps PSsetfileposition 635
+dps PSstack 636
+dps PSstatus 637
+dps PStoken 638
+dps PSwrite 639
+dps PSwritehexstring 640
+dps PSwriteobject 641
+dps PSwritestring 642
+dps PSleftbracket 643
+dps PSrightbracket 644
+dps PSleftleft 645
+dps PSrightright 646
+dps PScshow 647
+dps PScurrentcolor 648
+dps PScurrentcolorrendering 649
+dps PScurrentcolorspace 650
+dps PScurrentdevparams 651
+dps PScurrentglobal 652
+dps PScurrentoverprint 653
+dps PScurrentpagedevice 654
+dps PScurrentsystemparams 655
+dps PScurrentuserparams 656
+dps PSdefineresource 657
+dps PSexecform 658
+dps PSfilter 659
+dps PSfindencoding 660
+dps PSfindresource 661
+dps PSgcheck 662
+dps PSglobaldict 663
+dps PSGlobalFontDirectory 664
+dps PSglyphshow 665
+dps PSlanguagelevel 666
+dps PSmakepattern 667
+dps PSproduct 668
+dps PSresourceforall 669
+dps PSresourcestatus 670
+dps PSrevision 671
+dps PSrootfont 672
+dps PSserialnumber 673
+dps PSsetcolor 674
+dps PSsetcolorrendering 675
+dps PSsetcolorspace 676
+dps PSsetdevparams 677
+dps PSsetglobal 678
+dps PSsetoverprint 679
+dps PSsetpagedevice 680
+dps PSsetpattern 681
+dps PSsetsystemparams 682
+dps PSsetuserparams 683
+dps PSstartjob 684
+dps PSundefineresource 685
+dps PSabs 686
+dps PSadd 687
+dps PSand 688
+dps PSatan 689
+dps PSbitshift 690
+dps PSceiling 691
+dps PScos 692
+dps PSdiv 693
+dps PSexp 694
+dps PSfloor 695
+dps PSidiv 696
+dps PSln 697
+dps PSlog 698
+dps PSmod 699
+dps PSmul 700
+dps PSneg 701
+dps PSround 702
+dps PSsin 703
+dps PSsqrt 704
+dps PSsub 705
+dps PStruncate 706
+dps PSxor 707
+dps PSbanddevice 708
+dps PSframedevice 709
+dps PSnulldevice 710
+dps PSrenderbands 711
+dps PSconcatmatrix 712
+dps PSdtransform 713
+dps PSidentmatrix 714
+dps PSidtransform 715
+dps PSinvertmatrix 716
+dps PSitransform 717
+dps PStransform 718
+dps PSgetboolean 719
+dps PSgetchararray 720
+dps PSgetfloat 721
+dps PSgetfloatarray 722
+dps PSgetint 723
+dps PSgetintarray 724
+dps PSgetstring 725
+dps PSsendboolean 726
+dps PSsendchararray 727
+dps PSsendfloat 728
+dps PSsendfloatarray 729
+dps PSsendint 730
+dps PSsendintarray 731
+dps PSsendstring 732
+dps PSarc 733
+dps PSarcn 734
+dps PSarct 735
+dps PSarcto 736
+dps PScharpath 737
+dps PSclip 738
+dps PSclippath 739
+dps PSclosepath 740
+dps PScurveto 741
+dps PSeoclip 742
+dps PSeoviewclip 743
+dps PSflattenpath 744
+dps PSinitclip 745
+dps PSinitviewclip 746
+dps PSlineto 747
+dps PSmoveto 748
+dps PSnewpath 749
+dps PSpathbbox 750
+dps PSpathforall 751
+dps PSrcurveto 752
+dps PSrectclip 753
+dps PSrectviewclip 754
+dps PSreversepath 755
+dps PSrlineto 756
+dps PSrmoveto 757
+dps PSsetbbox 758
+dps PSsetucacheparams 759
+dps PSuappend 760
+dps PSucache 761
+dps PSucachestatus 762
+dps PSupath 763
+dps PSviewclip 764
+dps PSviewclippath 765
+dps PSashow 766
+dps PSawidthshow 767
+dps PScopypage 768
+dps PSeofill 769
+dps PSerasepage 770
+dps PSfill 771
+dps PSimage 772
+dps PSimagemask 773
+dps PSkshow 774
+dps PSrectfill 775
+dps PSrectstroke 776
+dps PSshow 777
+dps PSshowpage 778
+dps PSstroke 779
+dps PSstrokepath 780
+dps PSueofill 781
+dps PSufill 782
+dps PSustroke 783
+dps PSustrokepath 784
+dps PSwidthshow 785
+dps PSxshow 786
+dps PSxyshow 787
+dps PSyshow 788
+dps PSbind 789
+dps PScleardictstack 790
+dps PScountdictstack 791
+dps PScountexecstack 792
+dps PScurrentdict 793
+dps PScurrentpacking 794
+dps PScurrentshared 795
+dps PSdeviceinfo 796
+dps PSerrordict 797
+dps PSexec 798
+dps PSprompt 799
+dps PSquit 800
+dps PSrand 801
+dps PSrealtime 802
+dps PSrestore 803
+dps PSrrand 804
+dps PSrun 805
+dps PSsave 806
+dps PSsetpacking 807
+dps PSsetshared 808
+dps PSsrand 809
+dps PSstart 810
+dps PStype 811
+dps PSundef 812
+dps PSusertime 813
+dps PSversion 814
+dps PSvmreclaim 815
+dps PSvmstatus 816
+dps PSineofill 817
+dps PSinfill 818
+dps PSinstroke 819
+dps PSinueofill 820
+dps PSinufill 821
+dps PSinustroke 822
+dps PSwtranslation 823
+dps XDPSLInit 824
+dps DPSWriteStringChars 825
+dps XDPSUnfreezeContext 826
+dps DPSGetCurrentContext 827
+dps DPSAwaitReturnValues 828
+dps DPSNewUserObjectIndex 829
+dps XDPSGetContextStatus 830
+dps XDPSRegisterStatusProc 831
+dps DPSDefaultTextBackstop 832
+dps DPSMapNames 833
+dps XDPSGetDefaultColorMaps 834
+dps XDPSCreateSimpleContext 835
+dps DPSGenerateExtensionRecID 836
+dps DPSWaitContext 837
+dps DPSAddContextExtensionRec 838
+dps DPSGetContextExtensionRec 839
+dps DPSChainContext 840
+dps DPSDestroySpace 841
+dps DPSUnchainContext 842
+dps DPSBinObjSeqWrite 843
+dps DPSSetResultTable 844
+dps XDPSSetStatusMask 845
+dps XDPSXIDFromContext 846
+dps DPSWritePostScript 847
+dps DPSRemoveContextExtensionRec 848
+dps DPSDefaultErrorProc 849
+dps DPSCreateTextContext 850
+;4.x exports from 900
+dps DPSDestroyContext 900
+dps DPSFlushContext 901
+dps DPSGetContextType 902
+dps DPSGetCurrentErrorBackstop 903
+dps DPSGetCurrentTextBackstop 904
+dps DPSInitialize 905
+dps DPSInterruptContext 906
+dps DPSKnownContext 907
+dps DPSKnownSpace 908
+dps DPSNameFromIndex 909
+dps DPSPrivCurrentContext 910
+dps DPSResetContext 911
+dps DPSSetAbbrevMode 912
+dps DPSSetContext 913
+dps DPSSetErrorBackstop 914
+dps DPSSetNumStringConversion 915
+dps DPSSetTextBackstop 916
+dps DPSSetWrapSynchronization 917
+dps DPSSuppressBinaryConversion 918
+dps DPSUpdateNameMap 919
+dps DPSWriteData 920
+dps DPSWriteNumString 921
+dps DPSWriteTypedObjectArray 922
+dps DPScalloc 923
+dps DPSPrintf 924
+dps DPSRaise 925
+dps DPSFetchAbbrevList 926
+dps DPSGetOperatorAbbrev 927
+dps DPSGetSysnameAbbrev 928
+dps DPSChangeEncoding 929
+dps DPSContextFromContextID 930
+dps DPSHandleBogusError 931
+dps DPSServicePostScript 932
+dps XDPSContextFromSharedID 933
+dps XDPSContextFromXID 934
+dps XDPSCreateContext 935
+dps XDPSCreateSecureContext 936
+dps XDPSDispatchEvent 937
+dps XDPSFindContext 938
+dps XDPSGetProtocolVersion 939
+dps XDPSIsDPSEvent 940
+dps XDPSIsOutputEvent 941
+dps XDPSIsReadyEvent 942
+dps XDPSIsStatusEvent 943
+dps XDPSNotifyWhenReady 944
+dps XDPSReadyEventHandler 945
+dps XDPSRegisterReadyProc 946
+dps XDPSSetEventDelivery 947
+dps XDPSSetProcs 948
+dps XDPSSpaceFromSharedID 949
+dps XDPSSpaceFromXID 950
+dps XDPSStatusEventHandler 951
+dps XDPSXIDFromSpace 952
+dps DPSCreatePrivContext 953
+dps XDPSCreatePrivContextRec 954
+dps XDPSForceEvents 955
+dps XDPSNumFormat 956
+dps XDPSPrivZapDpy 957
+dps XDPSSendUnfreeze 958
+dps XDPSSetContextEncoding 959
+dps XDPSLCAPNotify 960
+dps XDPSLCallOutputEventHandler 961
+dps XDPSLCallReadyEventHandler 962
+dps XDPSLCallStatusEventHandler 963
+dps XDPSLCleanAll 964
+dps XDPSLCleanContext 965
+dps XDPSLContextFromXID 966
+dps XDPSLCreateContext 967
+dps XDPSLCreateContextAndSpace 968
+dps XDPSLCreateContextFromID 969
+dps XDPSLCreateSpace 970
+dps XDPSLDestroySpace 971
+dps XDPSLDispatchCSDPSFakeEvent 972
+dps XDPSLFlush 973
+dps XDPSLFlushGC 974
+dps XDPSLGetCSDPSFakeEventType 975
+dps XDPSLGetCSDPSReady 976
+dps XDPSLGetCSDPSStatus 977
+dps XDPSLGetCodes 978
+dps XDPSLGetGCFlushMode 979
+dps XDPSLGetPassEventsFlag 980
+dps XDPSLGetShunt 981
+dps XDPSLGetStatus 982
+dps XDPSLGetSyncMask 983
+dps XDPSLGetVersion 984
+dps XDPSLGetWrapWaitingFlag 985
+dps XDPSLGiveInput 986
+dps XDPSLIDFromContext 987
+dps XDPSLInitDisplayFlags 988
+dps XDPSLNotifyContext 989
+dps XDPSLNotifyWhenReady 990
+dps XDPSLReconcileRequests 991
+dps XDPSLReset 992
+dps XDPSLSetAfterProc 993
+dps XDPSLSetAgentArg 994
+dps XDPSLSetAgentName 995
+dps XDPSLSetClientMessageHandler 996
+dps XDPSLSetCodes 997
+dps XDPSLSetGCFlushMode 998
+dps XDPSLSetPassEventsFlag 999
+dps XDPSLSetReadyEventHandler 1000
+dps XDPSLSetShunt 1001
+dps XDPSLSetStatusEventHandler 1002
+dps XDPSLSetStatusMask 1003
+dps XDPSLSetSyncMask 1004
+dps XDPSLSetTextEventHandler 1005
+dps XDPSLSetVersion 1006
+dps XDPSLSetWrapWaitingFlag 1007
+dps XDPSLSync 1008
+dps XDPSLSyncGCClip 1009
+dps XDPSLTestErrorCode 1010
+dps XDPSLUpdateAgentArgs 1011
+dps XDPSSetXtEventDispatching 1012
+dps DPSCAPCopyGCProc 1013
+dps DPSCAPFlushGCProc 1014
+dps DPSCAPFreeGCProc 1015
+dps XDPSFlushGC 1016
+dps XDPSNXSetAgentArg 1017
+dps XDPSReconcileRequests 1018
+dps XDPSSyncGCClip 1019
+dps DPSCAPConnect 1020
+dps N_XDisconnectDisplay 1021
+dps N_XWaitForReadable 1022
+dps N_XWaitForWritable 1023
+dps StartXDPSNX 1024
+dps XDPSNXRecommendPort 1025
+dps XDPSGetNXArg 1026
+dps XDPSNXFindNX 1027
+dps XDPSNXSetClientArg 1028
+dps NXProcData 1029
+dps N_XANYSET 1030
+dps N_XFlush 1031
+dps N_XGetHostname 1032
+dps N_XRead 1033
+dps N_XReadPad 1034
+dps N_XReply 1035
+dps N_XSend 1036
+dps N_XUnknownNativeEvent 1037
+dps N_XUnknownWireEvent 1038
+LIBRARY dpstk dpstk
+dpstk XDPSSetFileFunctions 1
+dpstk XDPSFileRewindFunc 2
+dpstk XDPSFileGetsFunc 3
+dpstk XDPSEmbeddedEPSFRewindFunc 4
+dpstk XDPSEmbeddedGetsFunc 5
+dpstk XDPSCreatePixmapForEPSF 6
+dpstk XDPSPixelsPerPoint 7
+dpstk XDPSSetImagingTimeout 8
+dpstk XDPSCheckImagingResults 9
+dpstk XDPSImageFileIntoDrawable 10
+dpstk _DPSPSetMatrix 11
+dpstk _DPSPClearArea 12
+dpstk _DPSPSetMaskTransfer 13
+dpstk _DPSPDefineExecFunction 14
+dpstk _DPSPSaveBeforeExec 15
+dpstk _DPSPCheckForError 16
+dpstk _XDPSSetComponentInitialized 17
+dpstk _XDPSTestComponentInitialized 18
+dpstk XDPSSetContextDepth 19
+dpstk XDPSSetContextDrawable 20
+dpstk XDPSSetContextRGBMap 21
+dpstk XDPSSetContextGrayMap 22
+dpstk XDPSSetContextParameters 23
+dpstk XDPSPushContextParameters 24
+dpstk XDPSPopContextParameters 25
+dpstk XDPSCaptureContextGState 26
+dpstk XDPSUpdateContextGState 27
+dpstk XDPSFreeContextGState 28
+dpstk XDPSSetContextGState 29
+dpstk XDPSPushContextGState 30
+dpstk XDPSPopContextGState 31
+dpstk XDPSRegisterContext 32
+dpstk XDPSGetSharedContext 33
+dpstk XDPSDestroySharedContext 34
+dpstk XDPSUnregisterContext 35
+dpstk XDPSFreeDisplayInfo 36
+dpstk XDPSChainTextContext 37
+dpstk XDPSExtensionPresent 38
+dpstk PSDefineAsUserObj 39
+dpstk PSRedefineUserObj 40
+dpstk PSUndefineUserObj 41
+dpstk DPSDefineAsUserObj 42
+dpstk DPSRedefineUserObj 43
+dpstk DPSUndefineUserObj 44
+dpstk PSReserveUserObjIndices 45
+dpstk DPSReserveUserObjIndices 46
+dpstk PSReturnUserObjIndices 47
+dpstk DPSReturnUserObjIndices 48
+dpstk _DPSSSetContextParameters 49
+dpstk _DPSSSetContextDrawable 50
+dpstk _DPSSInstallDPSlibDict 51
+dpstk _DPSSCaptureGState 52
+dpstk _DPSSUpdateGState 53
+dpstk _DPSSRestoreGState 54
+dpstk _DPSSDefineUserObject 55
+dpstk _DPSSUndefineUserObject 56
+dpstk PSDoUserPath 57
+dpstk DPSDoUserPath 58
+dpstk PSHitUserPath 59
+dpstk DPSHitUserPath 60
+LIBRARY psres psres
+psres CheckPSResourceTime 1
+psres EnumeratePSResourceFiles 2
+psres FreePSResourceStorage 3
+psres InSavedList 4
+psres ListPSResourceFiles 5
+psres ListPSResourceTypes 6
+psres PSResEncoding 7
+psres PSResFileWarningHandler 8
+psres PSResFontAFM 9
+psres PSResFontBDF 10
+psres PSResFontBDFSizes 11
+psres PSResFontFamily 12
+psres PSResFontOutline 13
+psres PSResFontPrebuilt 14
+psres PSResForm 15
+psres PSResFree 16
+psres PSResMalloc 17
+psres PSResPattern 18
+psres PSResProcSet 19
+psres PSResRealloc 20
+psres SetPSResourcePolicy 21
+LIBRARY Xrender Xrender
+Xrender XRenderComposite 1
+Xrender XRenderFillRectangle 2
+Xrender XRenderFillRectangles 3
+Xrender XRenderAddGlyphs 4
+Xrender XRenderCompositeString16 5
+Xrender XRenderCompositeString32 6
+Xrender XRenderCompositeString8 7
+Xrender XRenderCreateGlyphSet 8
+Xrender XRenderFreeGlyphSet 9
+Xrender XRenderFreeGlyphs 10
+Xrender XRenderReferenceGlyphSet 11
+Xrender XRenderChangePicture 12
+Xrender XRenderCreatePicture 13
+Xrender XRenderFreePicture 14
+Xrender XRenderFindDisplay 15
+Xrender XRenderFindFormat 16
+Xrender XRenderFindVisualFormat 17
+Xrender XRenderQueryExtension 18
+Xrender XRenderQueryFormats 19
+Xrender XRenderQueryVersion 20
+Xrender XRenderSetPictureClipRegion 21
+Xrender XRenderCompositeText8 22
+Xrender XRenderCompositeText16 23
+Xrender XRenderCompositeText32 24
+Xrender XRenderCompositeTrapezoids 25
+Xrender XRenderParseColor 26
+Xrender XRenderCompositeDoublePoly 27
+Xrender XRenderFindStandardFormat 28
+Xrender XRenderCreateCursor 29
+Xrender XRenderSetPictureClipRectangles 30
+Xrender XRenderQueryFilters 31
+Xrender XRenderSetPictureFilter 32
+Xrender XRenderSetPictureTransform 33
+Xrender XRenderCompositeTriFan 34
+Xrender XRenderCompositeTriStrip 35
+Xrender XRenderCompositeTriangles 36
+Xrender XRenderQuerySubpixelOrder 37
+Xrender XRenderSetSubpixelOrder 38
+Xrender XRenderCreateAnimCursor 39
+LIBRARY GL GL
+GL glClearIndex 1
+GL glClearColor 2
+GL glClear 3
+GL glIndexMask 4
+GL glColorMask 5
+GL glAlphaFunc 6
+GL glBlendFunc 7
+GL glLogicOp 8
+GL glCullFace 9
+GL glFrontFace 10
+GL glPointSize 11
+GL glLineWidth 12
+GL glLineStipple 13
+GL glPolygonMode 14
+GL glPolygonStipple 15
+GL glGetPolygonStipple 16
+GL glEdgeFlag 17
+GL glEdgeFlagv 18
+GL glScissor 19
+GL glClipPlane 20
+GL glGetClipPlane 21
+GL glDrawBuffer 22
+GL glReadBuffer 23
+GL glEnable 24
+GL glDisable 25
+GL glIsEnabled 26
+GL glGetBooleanv 27
+GL glGetDoublev 28
+GL glGetFloatv 29
+GL glGetIntegerv 30
+GL glPushAttrib 31
+GL glPopAttrib 32
+GL glRenderMode 33
+GL glGetError 34
+GL glGetString 35
+GL glFinish 36
+GL glFlush 37
+GL glHint 38
+GL glClearDepth 39
+GL glDepthFunc 40
+GL glDepthMask 41
+GL glDepthRange 42
+GL glClearAccum 43
+GL glAccum 44
+GL glMatrixMode 45
+GL glOrtho 46
+GL glFrustum 47
+GL glViewport 48
+GL glPushMatrix 49
+GL glPopMatrix 50
+GL glLoadIdentity 51
+GL glLoadMatrixd 52
+GL glLoadMatrixf 53
+GL glMultMatrixd 54
+GL glMultMatrixf 55
+GL glRotated 56
+GL glRotatef 57
+GL glScaled 58
+GL glScalef 59
+GL glTranslated 60
+GL glTranslatef 61
+GL glIsList 62
+GL glDeleteLists 63
+GL glGenLists 64
+GL glNewList 65
+GL glEndList 66
+GL glCallList 67
+GL glCallLists 68
+GL glListBase 69
+GL glBegin 70
+GL glEnd 71
+GL glVertex2d 72
+GL glVertex2f 73
+GL glVertex2i 74
+GL glVertex2s 75
+GL glVertex3d 76
+GL glVertex3f 77
+GL glVertex3i 78
+GL glVertex3s 79
+GL glVertex4d 80
+GL glVertex4f 81
+GL glVertex4i 82
+GL glVertex4s 83
+GL glVertex2dv 84
+GL glVertex2fv 85
+GL glVertex2iv 86
+GL glVertex2sv 87
+GL glVertex3dv 88
+GL glVertex3fv 89
+GL glVertex3iv 90
+GL glVertex3sv 91
+GL glVertex4dv 92
+GL glVertex4fv 93
+GL glVertex4iv 94
+GL glVertex4sv 95
+GL glNormal3b 96
+GL glNormal3d 97
+GL glNormal3f 98
+GL glNormal3i 99
+GL glNormal3s 100
+GL glNormal3bv 101
+GL glNormal3dv 102
+GL glNormal3fv 103
+GL glNormal3iv 104
+GL glNormal3sv 105
+GL glIndexd 106
+GL glIndexf 107
+GL glIndexi 108
+GL glIndexs 109
+GL glIndexdv 110
+GL glIndexfv 111
+GL glIndexiv 112
+GL glIndexsv 113
+GL glColor3b 114
+GL glColor3d 115
+GL glColor3f 116
+GL glColor3i 117
+GL glColor3s 118
+GL glColor3ub 119
+GL glColor3ui 120
+GL glColor3us 121
+GL glColor4b 122
+GL glColor4d 123
+GL glColor4f 124
+GL glColor4i 125
+GL glColor4s 126
+GL glColor4ub 127
+GL glColor4ui 128
+GL glColor4us 129
+GL glColor3bv 130
+GL glColor3dv 131
+GL glColor3fv 132
+GL glColor3iv 133
+GL glColor3sv 134
+GL glColor3ubv 135
+GL glColor3uiv 136
+GL glColor3usv 137
+GL glColor4bv 138
+GL glColor4dv 139
+GL glColor4fv 140
+GL glColor4iv 141
+GL glColor4sv 142
+GL glColor4ubv 143
+GL glColor4uiv 144
+GL glColor4usv 145
+GL glTexCoord1d 146
+GL glTexCoord1f 147
+GL glTexCoord1i 148
+GL glTexCoord1s 149
+GL glTexCoord2d 150
+GL glTexCoord2f 151
+GL glTexCoord2i 152
+GL glTexCoord2s 153
+GL glTexCoord3d 154
+GL glTexCoord3f 155
+GL glTexCoord3i 156
+GL glTexCoord3s 157
+GL glTexCoord4d 158
+GL glTexCoord4f 159
+GL glTexCoord4i 160
+GL glTexCoord4s 161
+GL glTexCoord1dv 162
+GL glTexCoord1fv 163
+GL glTexCoord1iv 164
+GL glTexCoord1sv 165
+GL glTexCoord2dv 166
+GL glTexCoord2fv 167
+GL glTexCoord2iv 168
+GL glTexCoord2sv 169
+GL glTexCoord3dv 170
+GL glTexCoord3fv 171
+GL glTexCoord3iv 172
+GL glTexCoord3sv 173
+GL glTexCoord4dv 174
+GL glTexCoord4fv 175
+GL glTexCoord4iv 176
+GL glTexCoord4sv 177
+GL glRasterPos2d 178
+GL glRasterPos2f 179
+GL glRasterPos2i 180
+GL glRasterPos2s 181
+GL glRasterPos3d 182
+GL glRasterPos3f 183
+GL glRasterPos3i 184
+GL glRasterPos3s 185
+GL glRasterPos4d 186
+GL glRasterPos4f 187
+GL glRasterPos4i 188
+GL glRasterPos4s 189
+GL glRasterPos2dv 190
+GL glRasterPos2fv 191
+GL glRasterPos2iv 192
+GL glRasterPos2sv 193
+GL glRasterPos3dv 194
+GL glRasterPos3fv 195
+GL glRasterPos3iv 196
+GL glRasterPos3sv 197
+GL glRasterPos4dv 198
+GL glRasterPos4fv 199
+GL glRasterPos4iv 200
+GL glRasterPos4sv 201
+GL glRectd 202
+GL glRectf 203
+GL glRecti 204
+GL glRects 205
+GL glRectdv 206
+GL glRectfv 207
+GL glRectiv 208
+GL glRectsv 209
+GL glShadeModel 210
+GL glLightf 211
+GL glLighti 212
+GL glLightfv 213
+GL glLightiv 214
+GL glGetLightfv 215
+GL glGetLightiv 216
+GL glLightModelf 217
+GL glLightModeli 218
+GL glLightModelfv 219
+GL glLightModeliv 220
+GL glMaterialf 221
+GL glMateriali 222
+GL glMaterialfv 223
+GL glMaterialiv 224
+GL glGetMaterialfv 225
+GL glGetMaterialiv 226
+GL glColorMaterial 227
+GL glPixelZoom 228
+GL glPixelStoref 229
+GL glPixelStorei 230
+GL glPixelTransferf 231
+GL glPixelTransferi 232
+GL glPixelMapfv 233
+GL glPixelMapuiv 234
+GL glPixelMapusv 235
+GL glGetPixelMapfv 236
+GL glGetPixelMapuiv 237
+GL glGetPixelMapusv 238
+GL glBitmap 239
+GL glReadPixels 240
+GL glDrawPixels 241
+GL glCopyPixels 242
+GL glStencilFunc 243
+GL glStencilMask 244
+GL glStencilOp 245
+GL glClearStencil 246
+GL glTexGend 247
+GL glTexGenf 248
+GL glTexGeni 249
+GL glTexGendv 250
+GL glTexGenfv 251
+GL glTexGeniv 252
+GL glGetTexGendv 253
+GL glGetTexGenfv 254
+GL glGetTexGeniv 255
+GL glTexEnvf 256
+GL glTexEnvi 257
+GL glTexEnvfv 258
+GL glTexEnviv 259
+GL glGetTexEnvfv 260
+GL glGetTexEnviv 261
+GL glTexParameterf 262
+GL glTexParameteri 263
+GL glTexParameterfv 264
+GL glTexParameteriv 265
+GL glGetTexParameterfv 266
+GL glGetTexParameteriv 267
+GL glGetTexLevelParameterfv 268
+GL glGetTexLevelParameteriv 269
+GL glTexImage1D 270
+GL glTexImage2D 271
+GL glGetTexImage 272
+GL glMap1d 273
+GL glMap1f 274
+GL glMap2d 275
+GL glMap2f 276
+GL glGetMapdv 277
+GL glGetMapfv 278
+GL glGetMapiv 279
+GL glEvalCoord1d 280
+GL glEvalCoord1f 281
+GL glEvalCoord1dv 282
+GL glEvalCoord1fv 283
+GL glEvalCoord2d 284
+GL glEvalCoord2f 285
+GL glEvalCoord2dv 286
+GL glEvalCoord2fv 287
+GL glMapGrid1d 288
+GL glMapGrid1f 289
+GL glMapGrid2d 290
+GL glMapGrid2f 291
+GL glEvalPoint1 292
+GL glEvalPoint2 293
+GL glEvalMesh1 294
+GL glEvalMesh2 295
+GL glFogf 296
+GL glFogi 297
+GL glFogfv 298
+GL glFogiv 299
+GL glFeedbackBuffer 300
+GL glPassThrough 301
+GL glSelectBuffer 302
+GL glInitNames 303
+GL glLoadName 304
+GL glPushName 305
+GL glPopName 306
+; glBlendEquationEXT 307
+; glBlendColorEXT 308
+GL glPolygonOffset 309
+GL glVertexPointerEXT 310
+GL glNormalPointerEXT 311
+; glColorPointerEXT 312
+; glIndexPointerEXT 313
+; glTexCoordPointerEXT 314
+; glEdgeFlagPointerEXT 315
+; glGetPointervEXT 316
+; glArrayElementEXT 317
+GL glDrawArraysEXT 318
+; OSMesaCreateContext 319
+; OSMesaDestroyContext 320
+; OSMesaMakeCurrent 321
+GL XMesaCreateContext 322
+; XMesaDestroyContext 323
+GL XMesaMakeCurrent 326
+; XMesaGetCurrentContext 327
+; XMesaSwapBuffers 328
+; XMesaGetBackBuffer 329
+GL glXChooseVisual 330
+GL glXCreateContext 331
+GL glXDestroyContext 332
+GL glXMakeCurrent 333
+GL glXCopyContext 334
+GL glXSwapBuffers 335
+GL glXCreateGLXPixmap 336
+GL glXDestroyGLXPixmap 337
+GL glXQueryExtension 338
+GL glXQueryVersion 339
+GL glXIsDirect 340
+GL glXGetConfig 341
+GL glXGetCurrentContext 342
+GL glXGetCurrentDrawable 343
+GL glXWaitGL 344
+GL glXWaitX 345
+GL glXUseXFont 346
+GL glXQueryExtensionsString 347
+GL glXQueryServerString 348
+GL glXGetClientString 349
+GL glPushClientAttrib 350
+GL glPopClientAttrib 351
+GL glIndexub 352
+GL glIndexubv 353
+GL glVertexPointer 354
+GL glNormalPointer 355
+GL glColorPointer 356
+GL glIndexPointer 357
+GL glTexCoordPointer 358
+GL glEdgeFlagPointer 359
+GL glGetPointerv 360
+GL glArrayElement 361
+GL glDrawArrays 362
+GL glDrawElements 363
+GL glInterleavedArrays 364
+GL glGenTextures 365
+GL glDeleteTextures 366
+GL glBindTexture 367
+GL glPrioritizeTextures 368
+GL glAreTexturesResident 369
+GL glIsTexture 370
+GL glTexSubImage1D 371
+GL glTexSubImage2D 372
+GL glCopyTexImage1D 373
+GL glCopyTexImage2D 374
+GL glCopyTexSubImage1D 375
+GL glCopyTexSubImage2D 376
+; glWindowPos2iMESA 377
+; glWindowPos2sMESA 378
+GL glWindowPos2fMESA 379
+; glWindowPos2dMESA 380
+; glWindowPos2ivMESA 381
+; glWindowPos2svMESA 382
+; glWindowPos2fvMESA 383
+; glWindowPos2dvMESA 384
+; glWindowPos3iMESA 385
+; glWindowPos3sMESA 386
+; glWindowPos3fMESA 387
+; glWindowPos3dMESA 388
+; glWindowPos3ivMESA 389
+; glWindowPos3svMESA 390
+; glWindowPos3fvMESA 391
+; glWindowPos3dvMESA 392
+; glWindowPos4iMESA 393
+; glWindowPos4sMESA 394
+; glWindowPos4fMESA 395
+; glWindowPos4dMESA 396
+; glWindowPos4ivMESA 397
+; glWindowPos4svMESA 398
+; glWindowPos4fvMESA 399
+; glWindowPos4dvMESA 400
+GL glXCreateGLXPixmapMESA 401
+; glXReleaseBuffersMESA 402
+; OSMesaGetCurrentContext 403
+; OSMesaPixelStore 404
+; OSMesaGetIntegerv 405
+GL XMesaCreateVisual 406
+; XMesaDestroyVisual 407
+GL XMesaCreateWindowBuffer 408
+; XMesaCreatePixmapBuffer 409
+; XMesaDestroyBuffer 410
+; XMesaGetCurrentBuffer 411
+; XMesaFlush 412
+; XMesaGetString 413
+; glPolygonOffsetEXT 414
+GL glDisableClientState 450
+GL glEnableClientState 451
+GL glXFreeContextEXT 452
+GL glXGetContextIDEXT 453
+GL glXGetCurrentDisplay 454
+GL glXImportContextEXT 455
+GL glXQueryContextInfoEXT 456
+GL glXGetCurrentDrawableEXT 457
+GL glCopyTexSubImage3D 458
+GL glDrawRangeElements 459
+GL glTexSubImage3D 460
+GL glBlendColorEXT 461
+GL glBlendEquationEXT 462
+GL glTexImage3D 463
+GL _glapi_Context 500
+GL _glapi_Dispatch 501
+GL glMultiTexCoord1svARB 502
+GL glMultiTexCoord1ivARB 503
+GL glMultiTexCoord1fvARB 504
+GL glMultiTexCoord1dvARB 505
+GL glMultiTexCoord2svARB 506
+GL glMultiTexCoord2ivARB 507
+GL glMultiTexCoord2fvARB 508
+GL glMultiTexCoord2dvARB 509
+GL glMultiTexCoord3svARB 510
+GL glMultiTexCoord3ivARB 511
+GL glMultiTexCoord3fvARB 512
+GL glMultiTexCoord3dvARB 513
+GL glMultiTexCoord4svARB 514
+GL glMultiTexCoord4ivARB 515
+GL glMultiTexCoord4fvARB 516
+GL glMultiTexCoord4dvARB 517
+GL glMultiTexCoord1fARB 518
+GL glMultiTexCoord2fARB 519
+GL glMultiTexCoord3fARB 520
+GL glMultiTexCoord4fARB 521
+GL _glapi_set_dispatch 522
+GL _glapi_noop_enable_warnings 523
+GL _glapi_add_entrypoint 524
+GL _glapi_get_dispatch_table_size 525
+GL _glapi_check_multithread 526
+GL _glapi_set_context 527
+GL _glapi_get_context 528
+GL glColorTable 529
+GL glColorSubTable 530
+GL glConvolutionFilter1D 531
+GL glConvolutionFilter2D 532
+GL glXGetProcAddressARB 533
+GL glLockArraysEXT 534
+GL glUnlockArraysEXT 535
+GL glActiveTextureARB 536
+GL glColorTableEXT 537
+GL glPointParameterfEXT 538
+GL glPointParameterfvEXT 539
+GL glXMakeContextCurrent 540
+GL _glapi_get_proc_address 541
+GL _glapi_set_warning_func 542
+LIBRARY ICE ICE
+ICE IceAcceptConnection 1
+ICE IceAddConnectionWatch 2
+ICE IceAllocScratch 3
+ICE IceAppLockConn 4
+ICE IceAppUnlockConn 5
+ICE IceAuthFileName 6
+ICE IceCheckShutdownNegotiation 7
+ICE IceCloseConnection 8
+ICE IceComposeNetworkIdList 9
+ICE IceConnectionNumber 10
+ICE IceConnectionStatus 11
+ICE IceConnectionString 12
+ICE IceFlush 13
+ICE IceFreeAuthFileEntry 14
+ICE IceFreeListenObjs 15
+ICE IceGenerateMagicCookie 16
+ICE IceGetAuthFileEntry 17
+ICE IceGetConnectionContext 18
+ICE IceGetInBufSize 19
+ICE IceGetListenConnectionNumber 20
+ICE IceGetListenConnectionString 21
+ICE IceGetOutBufSize 22
+ICE IceInitThreads 23
+ICE IceLastReceivedSequenceNumber 24
+ICE IceLastSentSequenceNumber 25
+ICE IceListenForConnections 26
+ICE IceLockAuthFile 27
+ICE IceOpenConnection 28
+ICE IcePing 29
+ICE IceProcessMessages 30
+ICE IceProtocolRevision 31
+ICE IceProtocolSetup 32
+ICE IceProtocolShutdown 33
+ICE IceProtocolVersion 34
+ICE IceReadAuthFileEntry 35
+ICE IceRegisterForProtocolReply 36
+ICE IceRegisterForProtocolSetup 37
+ICE IceRelease 38
+ICE IceRemoveConnectionWatch 39
+ICE IceSetErrorHandler 40
+ICE IceSetHostBasedAuthProc 41
+ICE IceSetIOErrorHandler 42
+ICE IceSetPaAuthData 43
+ICE IceSetShutdownNegotiation 44
+ICE IceSwapping 45
+ICE IceUnlockAuthFile 46
+ICE IceVendor 47
+ICE IceWriteAuthFileEntry 48
+ICE _IceTransGetPeerAddr 49
+ICE _IceTransGetPeerNetworkId 50
+ICE _IceErrorBadMinor 51
+ICE _IceErrorBadLength 52
+ICE _IceErrorBadState 53
+ICE _IceErrorBadValue 54
+ICE _IcePaMagicCookie1Proc 55
+ICE _IcePoMagicCookie1Proc 56
+ICE _IceRead 57
+ICE _IceReadSkip 58
+ICE _IceWrite 59
+ICE _IceErrorNoAuthentication 60
+ICE _IceErrorNoVersion 61
+ICE _IceErrorAuthenticationRejected 62
+ICE _IceErrorAuthenticationFailed 63
+ICE _IceErrorProtocolDuplicate 64
+ICE _IceErrorMajorOpcodeDuplicate 65
+ICE _IceErrorUnknownProtocol 66
+ICE _IceErrorBadMajor 67
+ICE _IceDefaultErrorHandler 68
+ICE _IceDefaultIOErrorHandler 69
+ICE _IceGetPoValidAuthIndices 70
+ICE _IceGetPaValidAuthIndices 71
+ICE _IceAddOpcodeMapping 72
+ICE _IceGetPeerName 73
+ICE _IceProcessCoreMessage 74
+ICE _IceAddReplyWait 75
+ICE _IceSearchReplyWaits 76
+ICE _IceCheckReplyReady 77
+ICE _IceFreeConnection 78
+ICE _IceConnectionOpened 79
+ICE _IceConnectionClosed 80
+ICE _IceErrorSetupFailed 81
+ICE _IceGetPoAuthData 82
+ICE _IceGetPaAuthData 83
+ICE _IceTransOpenCOTSClient 84
+ICE _IceTransOpenCOTSServer 85
+ICE _IceTransOpenCLTSClient 86
+ICE _IceTransOpenCLTSServer 87
+ICE _IceTransSetOption 88
+ICE _IceTransCreateListener 89
+ICE _IceTransResetListener 90
+ICE _IceTransAccept 91
+ICE _IceTransConnect 92
+ICE _IceTransBytesReadable 93
+ICE _IceTransRead 94
+ICE _IceTransWrite 95
+ICE _IceTransReadv 96
+ICE _IceTransWritev 97
+ICE _IceTransDisconnect 98
+ICE _IceTransClose 99
+ICE _IceTransCloseForCloning 100
+ICE _IceTransIsLocal 101
+ICE _IceTransGetMyAddr 102
+ICE _IceTransGetConnectionNumber 103
+ICE _IceTransMakeAllCOTSServerListeners 104
+ICE _IceTransMakeAllCLTSServerListeners 105
+ICE _IceTransGetHostname 106
+ICE _IceTransGetMyNetworkId 107
+ICE _IceConnectionCount 108
+ICE _IceLastMajorOpcode 109
+ICE _IceAuthCount 110
+ICE _IceAuthNames 111
+ICE _IcePoAuthProcs 112
+ICE _IcePaAuthProcs 113
+ICE _IcePaAuthDataEntryCount 114
+ICE _IceVersionCount 115
+ICE _IceVersions 116
+ICE _IceWatchProcs 117
+ICE _IceErrorHandler 118
+ICE _IceIOErrorHandler 119
+ICE _IceConnectionObjs 120
+ICE _IceConnectionStrings 121
+ICE _IceProtocols 122
+ICE _IcePaAuthDataEntries 123
+ICE _IceTransSocketINETFuncs 124
+ICE _IceTransSocketTCPFuncs 125
+ICE IceListenForWellKnownConnections 126
+LIBRARY SM SM
+SM SmFreeProperty 1
+SM SmFreeReasons 2
+SM SmcClientID 3
+SM SmcCloseConnection 4
+SM SmcDeleteProperties 5
+SM SmcGetIceConnection 6
+SM SmcGetProperties 7
+SM SmcInteractDone 8
+SM SmcInteractRequest 9
+SM SmcModifyCallbacks 10
+SM SmcOpenConnection 11
+SM SmcProtocolRevision 12
+SM SmcProtocolVersion 13
+SM SmcRelease 14
+SM SmcRequestSaveYourself 15
+SM SmcRequestSaveYourselfPhase2 16
+SM SmcSaveYourselfDone 17
+SM SmcSetErrorHandler 18
+SM SmcSetProperties 19
+SM SmcVendor 20
+SM SmsCleanUp 21
+SM SmsClientHostName 22
+SM SmsClientID 23
+SM SmsDie 24
+SM SmsGenerateClientID 25
+SM SmsGetIceConnection 26
+SM SmsInitialize 27
+SM SmsInteract 28
+SM SmsProtocolRevision 29
+SM SmsProtocolVersion 30
+SM SmsRegisterClientReply 31
+SM SmsReturnProperties 32
+SM SmsSaveComplete 33
+SM SmsSaveYourself 34
+SM SmsSaveYourselfPhase2 35
+SM SmsSetErrorHandler 36
+SM SmsShutdownCancelled 37
+SM _SmcProcessMessage 38
+SM _SmsProcessMessage 39
+SM _SmcDefaultErrorHandler 40
+SM _SmsDefaultErrorHandler 41
+SM _SmsProtocolSetupProc 42
+SM _SmcOpcode 43
+SM _SmsOpcode 44
+SM _SmVersionCount 45
+SM _SmcVersions 46
+SM _SmsVersions 47
+SM _SmAuthCount 48
+SM _SmAuthNames 49
+SM _SmcAuthProcs 50
+SM _SmsAuthProcs 51
+SM _SmcErrorHandler 52
+SM _SmsErrorHandler 53
+SM _SmsNewClientProc 54
+SM _SmsNewClientData 55
+LIBRARY Xft Xft
+Xft XftColorAllocName 1
+Xft XftColorAllocValue 2
+Xft XftColorFree 3
+Xft XftDefaultGetBool 4
+Xft XftDefaultGetDouble 5
+Xft XftDefaultGetInteger 6
+Xft XftDefaultHasRender 7
+Xft XftDefaultParseBool 8
+Xft XftDefaultSet 9
+Xft XftDefaultSubstitute 10
+Xft XftDrawChange 11
+Xft XftDrawCreate 12
+Xft XftDrawCreateBitmap 13
+Xft XftDrawDestroy 14
+Xft XftDrawRect 15
+Xft XftDrawSetClip 16
+Xft XftDrawString16 17
+Xft XftDrawString32 18
+Xft XftDrawString8 19
+Xft XftDrawStringUtf8 20
+Xft XftTextExtents16 21
+Xft XftTextExtents32 22
+Xft XftTextExtents8 23
+Xft XftTextExtentsUtf8 24
+Xft XftFontClose 25
+Xft XftFontMatch 26
+Xft XftFontOpen 27
+Xft XftFontOpenName 28
+Xft XftFontOpenPattern 29
+Xft XftFontOpenXlfd 30
+Xft XftInit 31
+Xft XftListFonts 32
+Xft XftListFontsPatternObjects 33
+Xft XftNameParse 34
+Xft XftNameUnparse 35
+Xft _XftMatchSymbolic 36
+Xft XftXlfdParse 37
+Xft XftInitFtLibrary 38
+Xft XftDrawPicture 39
+Xft XftDrawSrcPicture 40
+Xft XftCharExists 41
+Xft XftDrawCharSpec 42
+LIBRARY Xmuu Xmuu
+Xmuu XmuClientWindow 1
+Xmuu XmuCursorNameToIndex 2
+Xmuu XmuPrintDefaultErrorMessage 3
+Xmuu XmuSimpleErrorHandler 4
+Xmuu XmuGetHostname 5
+Xmuu XmuCompareISOLatin1 6
+Xmuu XmuCopyISOLatin1Lowered 7
+Xmuu XmuCopyISOLatin1Uppered 8
+Xmuu XmuNCopyISOLatin1Lowered 9
+Xmuu XmuNCopyISOLatin1Uppered 10
+Xmuu XmuSnprintf 11
+LIBRARY GLU GLU
+GLU bezierPatchDelete 1
+GLU bezierPatchDeleteList 2
+GLU bezierPatchDraw 3
+GLU bezierPatchEval 4
+GLU bezierPatchEvalNormal 5
+GLU bezierPatchInsert 6
+GLU bezierPatchListDraw 7
+GLU bezierPatchMake 8
+GLU bezierPatchMake2 9
+GLU bezierPatchPrint 10
+GLU bezierPatchPrintList 11
+GLU bezierPatchMeshBeginStrip 12
+GLU bezierPatchMeshDelDeg 13
+GLU bezierPatchMeshDelete 14
+GLU bezierPatchMeshDraw 15
+GLU bezierPatchMeshEndStrip 16
+GLU bezierPatchMeshEval 17
+GLU bezierPatchMeshInsertUV 18
+GLU bezierPatchMeshListCollect 19
+GLU bezierPatchMeshListDelDeg 20
+GLU bezierPatchMeshListDelete 21
+GLU bezierPatchMeshListDraw 22
+GLU bezierPatchMeshListEval 23
+GLU bezierPatchMeshListInsert 24
+GLU bezierPatchMeshListNumTriangles 25
+GLU bezierPatchMeshListPrint 26
+GLU bezierPatchMeshListReverse 27
+GLU bezierPatchMeshListTotalStrips 28
+GLU bezierPatchMeshListTotalVert 29
+GLU bezierPatchMeshMake 30
+GLU bezierPatchMeshMake2 31
+GLU bezierPatchMeshNumTriangles 32
+GLU bezierPatchMeshPrint 33
+GLU bezierPatchMeshPutPatch 34
+GLU drawStrips 35
+GLU gluBeginCurve 36
+GLU gluBeginSurface 37
+GLU gluBeginTrim 38
+GLU gluDeleteNurbsRenderer 39
+GLU gluDeleteNurbsTessellatorEXT 40
+GLU gluEndCurve 41
+GLU gluEndSurface 42
+GLU gluEndTrim 43
+GLU gluGetNurbsProperty 44
+GLU gluLoadSamplingMatrices 45
+GLU gluNewNurbsRenderer 46
+GLU gluNurbsCallback 47
+GLU gluNurbsCallbackData 48
+GLU gluNurbsCallbackDataEXT 49
+GLU gluNurbsCurve 50
+GLU gluNurbsProperty 51
+GLU gluNurbsSurface 52
+GLU gluPwlCurve 53
+GLU glu_LOD_eval_list 54
+GLU __gl_dictListDelete 55
+GLU __gl_dictListDeleteDict 56
+GLU __gl_dictListInsertBefore 57
+GLU __gl_dictListNewDict 58
+GLU __gl_dictListSearch 59
+GLU __gl_edgeEval 60
+GLU __gl_edgeIntersect 61
+GLU __gl_edgeSign 62
+GLU __gl_transEval 63
+GLU __gl_transSign 64
+GLU __gl_vertCCW 65
+GLU __gl_vertLeq 66
+GLU __gl_memInit 67
+GLU __gl_meshAddEdgeVertex 68
+GLU __gl_meshConnect 69
+GLU __gl_meshDelete 70
+GLU __gl_meshDeleteMesh 71
+GLU __gl_meshMakeEdge 72
+GLU __gl_meshNewMesh 73
+GLU __gl_meshSplice 74
+GLU __gl_meshSplitEdge 75
+GLU __gl_meshUnion 76
+GLU __gl_meshZapFace 77
+GLU __gl_projectPolygon 78
+GLU __gl_pqHeapDelete 79
+GLU __gl_pqHeapDeletePriorityQ 80
+GLU __gl_pqHeapExtractMin 81
+GLU __gl_pqHeapInit 82
+GLU __gl_pqHeapInsert 83
+GLU __gl_pqHeapNewPriorityQ 84
+GLU __gl_pqSortDelete 85
+GLU __gl_pqSortDeletePriorityQ 86
+GLU __gl_pqSortExtractMin 87
+GLU __gl_pqSortInit 88
+GLU __gl_pqSortInsert 89
+GLU __gl_pqSortIsEmpty 90
+GLU __gl_pqSortMinimum 91
+GLU __gl_pqSortNewPriorityQ 92
+GLU __gl_renderBoundary 93
+GLU __gl_renderCache 94
+GLU __gl_renderMesh 95
+GLU __gl_computeInterior 96
+GLU __gl_noBeginData 97
+GLU __gl_noCombineData 98
+GLU __gl_noEdgeFlagData 99
+GLU __gl_noEndData 100
+GLU __gl_noErrorData 101
+GLU __gl_noVertexData 102
+GLU gluBeginPolygon 103
+GLU gluDeleteTess 104
+GLU gluEndPolygon 105
+GLU gluGetTessProperty 106
+GLU gluNewTess 107
+GLU gluNextContour 108
+GLU gluTessBeginContour 109
+GLU gluTessBeginPolygon 110
+GLU gluTessCallback 111
+GLU gluTessEndContour 112
+GLU gluTessEndPolygon 113
+GLU gluTessNormal 114
+GLU gluTessProperty 115
+GLU gluTessVertex 116
+GLU __gl_meshDiscardExterior 117
+GLU __gl_meshSetWindingNumber 118
+GLU __gl_meshTessellateInterior 119
+GLU __gl_meshTessellateMonoRegion 120
+GLU gluErrorString 121
+GLU gluBuild1DMipmapLevels 122
+GLU gluBuild1DMipmaps 123
+GLU gluBuild2DMipmapLevels 124
+GLU gluBuild2DMipmaps 125
+GLU gluBuild3DMipmapLevels 126
+GLU gluBuild3DMipmaps 127
+GLU gluScaleImage 128
+GLU gluScaleImage3D 129
+GLU gluLookAt 130
+GLU gluOrtho2D 131
+GLU gluPerspective 132
+GLU gluPickMatrix 133
+GLU gluProject 134
+GLU gluUnProject 135
+GLU gluUnProject4 136
+GLU gluCylinder 137
+GLU gluDeleteQuadric 138
+GLU gluDisk 139
+GLU gluNewQuadric 140
+GLU gluPartialDisk 141
+GLU gluQuadricCallback 142
+GLU gluQuadricDrawStyle 143
+GLU gluQuadricNormals 144
+GLU gluQuadricOrientation 145
+GLU gluQuadricTexture 146
+GLU gluSphere 147
+GLU gluCheckExtension 148
+GLU gluGetString 149
+LIBRARY Xrandr Xrandr
+Xrandr XRRCurrentConfig 1
+Xrandr XRRFindDisplay 2
+Xrandr XRRFreeScreenInfo 3
+Xrandr XRRGetScreenInfo 4
+Xrandr XRRQueryExtension 5
+Xrandr XRRQueryVersion 6
+Xrandr XRRRootToScreen 7
+Xrandr XRRRotations 8
+Xrandr XRRScreenChangeSelectInput 9
+Xrandr XRRSetScreenConfig 10
+Xrandr XRRSizes 11
+Xrandr XRRTimes 12
+Xrandr XRRVisualIDToVisual 13
+Xrandr XRRVisualToDepth 14
+Xrandr XRRConfigCurrentConfiguration 15
+Xrandr XRRConfigSizes 16
+Xrandr XRRConfigRotations 17
+Xrandr XRRSelectInput 18
+Xrandr XRRFreeScreenConfigInfo 19
+Xrandr XRRUpdateConfiguration 20
+Xrandr XRRConfigCurrentRate 21
+Xrandr XRRConfigRates 22
+Xrandr XRRSetScreenConfigAndRate 23
+LIBRARY freetype frtype
+freetype ah_arctan 1
+freetype autohint_module_class 2
+freetype autohinter_interface 3
+freetype cff_driver_class 4
+freetype FT_Access_Frame 5
+freetype FT_Add64 6
+freetype FT_Add_Module 7
+freetype FT_Alloc 8
+freetype FT_Attach_File 9
+freetype FT_Attach_Stream 10
+freetype FT_Create_Extensions 11
+freetype FT_Destroy_Extensions 12
+freetype FT_Div64by32 13
+freetype FT_DivFix 14
+freetype FT_Done_Extensions 15
+freetype FT_Done_Face 16
+freetype FT_Done_GlyphSlot 17
+freetype FT_Done_Library 18
+freetype FT_Done_Size 19
+freetype FT_Done_Stream 20
+freetype FT_Extract_Frame 21
+freetype FT_Forget_Frame 22
+freetype FT_Free 23
+freetype FT_Get_Char 24
+freetype FT_Get_Char_Index 25
+freetype FT_Get_Extension 26
+freetype FT_Get_Glyph_Name 27
+freetype FT_Get_Kerning 28
+freetype FT_Get_Long 29
+freetype FT_Get_LongLE 30
+freetype FT_Get_Module 31
+freetype FT_Get_Module_Interface 32
+freetype FT_Get_Offset 33
+freetype FT_Get_Renderer 34
+freetype FT_Get_Sfnt_Name 35
+freetype FT_Get_Sfnt_Name_Count 36
+freetype FT_Get_Sfnt_Table 37
+freetype FT_Get_Short 38
+freetype FT_Get_ShortLE 39
+freetype FT_GlyphLoader_Add 40
+freetype FT_GlyphLoader_Check_Points 41
+freetype FT_GlyphLoader_Check_Subglyphs 42
+freetype FT_GlyphLoader_Copy_Points 43
+freetype FT_GlyphLoader_Create_Extra 44
+freetype FT_GlyphLoader_Done 45
+freetype FT_GlyphLoader_New 46
+freetype FT_GlyphLoader_Prepare 47
+freetype FT_GlyphLoader_Reset 48
+freetype FT_GlyphLoader_Rewind 49
+freetype FT_Init_Extensions 50
+freetype FT_List_Add 51
+freetype FT_List_Finalize 52
+freetype FT_List_Find 53
+freetype FT_List_Insert 54
+freetype FT_List_Iterate 55
+freetype FT_List_Remove 56
+freetype FT_List_Up 57
+freetype FT_Load_Char 58
+freetype FT_Load_Glyph 59
+freetype FT_Lookup_Renderer 60
+freetype FT_MulDiv 61
+freetype FT_MulFix 62
+freetype FT_MulTo64 63
+freetype FT_New_Face 64
+freetype FT_New_GlyphSlot 65
+freetype FT_New_Library 66
+freetype FT_New_Memory_Face 67
+freetype FT_New_Memory_Stream 68
+freetype FT_New_Size 69
+freetype FT_Open_Face 70
+freetype FT_Outline_Copy 71
+freetype FT_Outline_Decompose 72
+freetype FT_Outline_Done 73
+freetype FT_Outline_Done_Internal 74
+freetype FT_Outline_Get_Bitmap 75
+freetype FT_Outline_Get_CBox 76
+freetype FT_Outline_New 77
+freetype FT_Outline_New_Internal 78
+freetype FT_Outline_Render 79
+freetype FT_Outline_Reverse 80
+freetype FT_Outline_Transform 81
+freetype FT_Outline_Translate 82
+freetype FT_Read_Char 83
+freetype FT_Read_Fields 84
+freetype FT_Read_Long 85
+freetype FT_Read_LongLE 86
+freetype FT_Read_Offset 87
+freetype FT_Read_Short 88
+freetype FT_Read_ShortLE 89
+freetype FT_Read_Stream 90
+freetype FT_Read_Stream_At 91
+freetype FT_Realloc 92
+freetype FT_Register_Extension 93
+freetype FT_Release_Frame 94
+freetype FT_Remove_Module 95
+freetype FT_Render_Glyph 96
+freetype FT_Render_Glyph_Internal 97
+freetype FT_Seek_Stream 98
+freetype FT_Select_Charmap 99
+freetype FT_Set_Char_Size 100
+freetype FT_Set_Charmap 101
+freetype FT_Set_Debug_Hook 102
+freetype FT_Set_Pixel_Sizes 103
+freetype FT_Set_Renderer 104
+freetype FT_Set_Transform 105
+freetype FT_Skip_Stream 106
+freetype FT_Sqrt64 107
+freetype FT_SqrtFixed 108
+freetype FT_Stream_Pos 109
+freetype FT_Vector_Transform 110
+freetype FT_Outline_Get_BBox 111
+freetype FT_Done_Glyph 112
+freetype FT_Get_Glyph 113
+freetype FT_Glyph_Copy 114
+freetype FT_Glyph_Get_CBox 115
+freetype FT_Glyph_To_Bitmap 116
+freetype FT_Glyph_Transform 117
+freetype FT_Matrix_Invert 118
+freetype FT_Matrix_Multiply 119
+freetype ft_bitmap_glyph_class 120
+freetype ft_outline_glyph_class 121
+freetype FT_Add_Default_Modules 122
+freetype FT_Done_FreeType 123
+freetype FT_Init_FreeType 124
+freetype FT_Get_Multi_Master 125
+freetype FT_Set_MM_Blend_Coordinates 126
+freetype FT_Set_MM_Design_Coordinates 127
+freetype FT_Done_Memory 128
+freetype FT_New_Memory 129
+freetype FT_New_Stream 130
+freetype ps_table_funcs 131
+freetype psaux_module_class 132
+freetype t1_builder_funcs 133
+freetype t1_decoder_funcs 134
+freetype t1_parser_funcs 135
+freetype psnames_module_class 136
+freetype ft_raster1_renderer_class 137
+freetype ft_raster5_renderer_class 138
+freetype ft_standard_raster 139
+freetype sbit_metrics_fields 140
+freetype sfnt_module_class 141
+freetype ft_grays_raster 142
+freetype ft_smooth_renderer_class 143
+freetype grays_raster_render 144
+freetype TT_New_Context 145
+freetype TT_RunIns 146
+freetype tt_default_graphics_state 147
+freetype tt_driver_class 148
+freetype t1_driver_class 149
+freetype t1cid_driver_class 150
+freetype winfnt_driver_class 151
+freetype FT_Get_First_Char 152
+freetype FT_Get_Next_Char 153
+freetype FT_Get_PS_Font_Info 154
+freetype FT_Has_PS_Glyph_Names 155
+freetype FT_Get_Name_Index 156
+freetype FT_Get_BDF_Property 157
+freetype FT_Activate_Size 158
+freetype FT_Get_X11_Font_Format 159
+freetype FT_Get_BDF_Charset_ID 160
+freetype FT_Get_Postscript_Name 161
+LIBRARY XTrap XTrap
+XTrap XEAddEventCB 1
+XTrap XEAddEventCBs 2
+XTrap XEAddRequestCB 3
+XTrap XEAddRequestCBs 4
+XTrap XERemoveAllEventCBs 5
+XTrap XERemoveAllRequestCBs 6
+XTrap XERemoveEventCB 7
+XTrap XERemoveEventCBs 8
+XTrap XERemoveRequestCB 9
+XTrap XERemoveRequestCBs 10
+XTrap XEChangeTC 11
+XTrap XECreateTC 12
+XTrap XEFreeTC 13
+XTrap XESetCmdGateState 14
+XTrap XETrapSetColorReplies 15
+XTrap XETrapSetCommandKey 16
+XTrap XETrapSetCursor 17
+XTrap XETrapSetEvents 18
+XTrap XETrapSetGrabServer 19
+XTrap XETrapSetMaxPacket 20
+XTrap XETrapSetRequests 21
+XTrap XETrapSetStatistics 22
+XTrap XETrapSetTimestamps 23
+XTrap XETrapSetWinXY 24
+XTrap XETrapSetXInput 25
+XTrap XETrapDispatchXLib 26
+XTrap XEPrintAvail 27
+XTrap XEPrintAvailFlags 28
+XTrap XEPrintAvailPktSz 29
+XTrap XEPrintCfgFlags 30
+XTrap XEPrintCmdKey 31
+XTrap XEPrintCurPktSz 32
+XTrap XEPrintCurXY 33
+XTrap XEPrintCurrent 34
+XTrap XEPrintEvents 35
+XTrap XEPrintEvtStats 36
+XTrap XEPrintLastTime 37
+XTrap XEPrintMajOpcode 38
+XTrap XEPrintPlatform 39
+XTrap XEPrintRelease 40
+XTrap XEPrintReqStats 41
+XTrap XEPrintRequests 42
+XTrap XEPrintStateFlags 43
+XTrap XEPrintStatistics 44
+XTrap XEPrintTkFlags 45
+XTrap XEPrintTkRelease 46
+XTrap XEPrintTkState 47
+XTrap XEFlushConfig 48
+XTrap XEGetAvailableRequest 49
+XTrap XEGetCurrentRequest 50
+XTrap XEGetLastInpTimeRequest 51
+XTrap XEGetStatisticsRequest 52
+XTrap XEGetVersionRequest 53
+XTrap XEResetRequest 54
+XTrap XESimulateXEventRequest 55
+XTrap XEStartTrapRequest 56
+XTrap XEStopTrapRequest 57
+XTrap XEEventIDToString 58
+XTrap XEEventStringToID 59
+XTrap XEPlatformIDToString 60
+XTrap XEPlatformStringToID 61
+XTrap XERequestIDToExtString 62
+XTrap XERequestIDToString 63
+XTrap XERequestStringToID 64
+XTrap XETrapQueryExtension 65
+XTrap XETrapAppMainLoop 66
+XTrap XETrapAppPending 67
+XTrap XETrapAppWhileLoop 68
+XTrap XETrapDispatchEvent 69
+XTrap XETrapGetEventHandler 70
+XTrap XETrapSetEventHandler 71
+XTrap XETrapWaitForSomething 72
+LIBRARY fontconfig fontcfg
+fontconfig FcAtomicCreate 1
+fontconfig FcAtomicDeleteNew 2
+fontconfig FcAtomicDestroy 3
+fontconfig FcAtomicLock 4
+fontconfig FcAtomicNewFile 5
+fontconfig FcAtomicOrigFile 6
+fontconfig FcAtomicReplaceOrig 7
+fontconfig FcAtomicUnlock 8
+fontconfig FcBlanksAdd 9
+fontconfig FcBlanksCreate 10
+fontconfig FcBlanksDestroy 11
+fontconfig FcBlanksIsMember 12
+fontconfig FcFileCacheCreate 13
+fontconfig FcFileCacheDestroy 14
+fontconfig FcFileCacheFind 15
+fontconfig FcFileCacheLoad 16
+fontconfig FcFileCacheReadDir 17
+fontconfig FcFileCacheSave 18
+fontconfig FcFileCacheUpdate 19
+fontconfig FcFileCacheWriteDir 20
+fontconfig FcConfigAddBlank 21
+fontconfig FcConfigAddConfigFile 22
+fontconfig FcConfigAddDir 23
+fontconfig FcConfigAddEdit 24
+fontconfig FcConfigAppFontAddDir 25
+fontconfig FcConfigAppFontAddFile 26
+fontconfig FcConfigAppFontClear 27
+fontconfig FcConfigBuildFonts 28
+fontconfig FcConfigCompareValue 29
+fontconfig FcConfigCreate 30
+fontconfig FcConfigDestroy 31
+fontconfig FcConfigFilename 32
+fontconfig FcConfigGetBlanks 33
+fontconfig FcConfigGetCache 34
+fontconfig FcConfigGetConfigFiles 35
+fontconfig FcConfigGetCurrent 36
+fontconfig FcConfigGetFonts 37
+fontconfig FcConfigSetCache 38
+fontconfig FcConfigSetCurrent 39
+fontconfig FcConfigSetFonts 40
+fontconfig FcConfigSubstitute 41
+fontconfig FcCharSetAddChar 42
+fontconfig FcCharSetCopy 43
+fontconfig FcCharSetCount 44
+fontconfig FcCharSetCoverage 45
+fontconfig FcCharSetCreate 46
+fontconfig FcCharSetDestroy 47
+fontconfig FcCharSetEqual 48
+fontconfig FcCharSetHasChar 49
+fontconfig FcCharSetIntersect 50
+fontconfig FcCharSetIntersectCount 51
+fontconfig FcCharSetNew 52
+fontconfig FcCharSetSubtract 53
+fontconfig FcCharSetSubtractCount 54
+fontconfig FcCharSetUnion 55
+fontconfig FcFreeTypeCharIndex 56
+fontconfig FcFreeTypeCharSet 57
+fontconfig FcNameParseCharSet 58
+fontconfig FcNameUnparseCharSet 59
+fontconfig FcDebug 60
+fontconfig FcEditPrint 61
+fontconfig FcExprPrint 62
+fontconfig FcFontSetPrint 63
+fontconfig FcOpPrint 64
+fontconfig FcPatternPrint 65
+fontconfig FcSubstPrint 66
+fontconfig FcTestPrint 67
+fontconfig FcValueListPrint 68
+fontconfig FcValuePrint 69
+fontconfig FcDefaultSubstitute 70
+fontconfig FcDirSave 71
+fontconfig FcDirScan 72
+fontconfig FcFileScan 73
+fontconfig FcFreeTypeQuery 74
+fontconfig FcFontSetAdd 75
+fontconfig FcFontSetCreate 76
+fontconfig FcFontSetDestroy 77
+fontconfig FcInit 78
+fontconfig FcMemAlloc 79
+fontconfig FcMemFree 80
+fontconfig FcMemReport 81
+fontconfig FcFontList 82
+fontconfig FcFontSetList 83
+fontconfig FcObjectSetAdd 84
+fontconfig FcObjectSetBuild 85
+fontconfig FcObjectSetCreate 86
+fontconfig FcObjectSetDestroy 87
+fontconfig FcObjectSetVaBuild 88
+fontconfig FcFontMatch 89
+fontconfig FcFontRenderPrepare 90
+fontconfig FcFontSetMatch 91
+fontconfig FcFontSetSort 92
+fontconfig FcMatrixCopy 93
+fontconfig FcMatrixEqual 94
+fontconfig FcMatrixFree 95
+fontconfig FcMatrixMultiply 96
+fontconfig FcMatrixRotate 97
+fontconfig FcMatrixScale 98
+fontconfig FcMatrixShear 99
+fontconfig FcNameBool 100
+fontconfig FcNameConstant 101
+fontconfig FcNameGetConstant 102
+fontconfig FcNameGetObjectType 103
+fontconfig FcNameParse 104
+fontconfig FcNameRegisterConstants 105
+fontconfig FcNameRegisterObjectTypes 106
+fontconfig FcNameUnparse 107
+fontconfig FcNameUnregisterConstants 108
+fontconfig FcNameUnregisterObjectTypes 109
+fontconfig FcPatternAdd 110
+fontconfig FcPatternAddBool 111
+fontconfig FcPatternAddCharSet 112
+fontconfig FcPatternAddDouble 113
+fontconfig FcPatternAddInteger 114
+fontconfig FcPatternAddMatrix 115
+fontconfig FcPatternAddString 116
+fontconfig FcPatternBuild 117
+fontconfig FcPatternCreate 118
+fontconfig FcPatternDel 119
+fontconfig FcPatternDestroy 120
+fontconfig FcPatternDuplicate 121
+fontconfig FcPatternGet 122
+fontconfig FcPatternGetBool 123
+fontconfig FcPatternGetCharSet 124
+fontconfig FcPatternGetDouble 125
+fontconfig FcPatternGetInteger 126
+fontconfig FcPatternGetMatrix 127
+fontconfig FcPatternGetString 128
+fontconfig FcPatternVaBuild 129
+fontconfig FcValueDestroy 130
+fontconfig FcValueListDestroy 131
+fontconfig FcValueSave 132
+fontconfig FcStrBufChar 133
+fontconfig FcStrBufData 134
+fontconfig FcStrBufDestroy 135
+fontconfig FcStrBufDone 136
+fontconfig FcStrBufInit 137
+fontconfig FcStrBufString 138
+fontconfig FcStrCmpIgnoreCase 139
+fontconfig FcStrCopy 140
+fontconfig FcStrFree 141
+fontconfig FcStrPlus 142
+fontconfig FcUtf8Len 143
+fontconfig FcUtf8ToUcs4 144
+fontconfig FcConfigParseAndLoad 145
+fontconfig FcConfigSaveField 146
+fontconfig FcEditCreate 147
+fontconfig FcEditDestroy 148
+fontconfig FcExprCreateBool 149
+fontconfig FcExprCreateConst 150
+fontconfig FcExprCreateDouble 151
+fontconfig FcExprCreateField 152
+fontconfig FcExprCreateInteger 153
+fontconfig FcExprCreateMatrix 154
+fontconfig FcExprCreateNil 155
+fontconfig FcExprCreateOp 156
+fontconfig FcExprCreateString 157
+fontconfig FcExprDestroy 158
+fontconfig FcTestCreate 159
+fontconfig FcTestDestroy 160
+fontconfig FcStrListCreate 161
+fontconfig FcStrListNext 162
+fontconfig FcStrListDone 163
+fontconfig FcStrSetCreate 164
+fontconfig FcDirCacheValid 165
+fontconfig FcStrSetDestroy 166
+fontconfig FcInitLoadConfig 167
+fontconfig FcStrSetAdd 168
+fontconfig FcConfigGetConfigDirs 169
+fontconfig FcPatternAddFTFace 170
+fontconfig FcPatternGetFTFace 171
+fontconfig FcPatternFindElt 172
+fontconfig FcPatternInsertElt 173
+fontconfig FcCharSetFirstPage 174
+fontconfig FcCharSetNextPage 175
+fontconfig FcUtf16ToUcs4 176
+LIBRARY expat expat
+expat XML_DefaultCurrent 1
+expat XML_ErrorString 2
+expat XML_ExpatVersion 3
+expat XML_ExpatVersionInfo 4
+expat XML_ExternalEntityParserCreate 5
+expat XML_GetBase 6
+expat XML_GetBuffer 7
+expat XML_GetCurrentByteCount 8
+expat XML_GetCurrentByteIndex 9
+expat XML_GetCurrentColumnNumber 10
+expat XML_GetCurrentLineNumber 11
+expat XML_GetErrorCode 12
+expat XML_GetIdAttributeIndex 13
+expat XML_GetInputContext 14
+expat XML_GetSpecifiedAttributeCount 15
+expat XML_Parse 16
+expat XML_ParseBuffer 17
+expat XML_ParserCreate 18
+expat XML_ParserCreateNS 19
+expat XML_ParserCreate_MM 20
+expat XML_ParserFree 21
+expat XML_SetAttlistDeclHandler 22
+expat XML_SetBase 23
+expat XML_SetCdataSectionHandler 24
+expat XML_SetCharacterDataHandler 25
+expat XML_SetCommentHandler 26
+expat XML_SetDefaultHandler 27
+expat XML_SetDefaultHandlerExpand 28
+expat XML_SetDoctypeDeclHandler 29
+expat XML_SetElementDeclHandler 30
+expat XML_SetElementHandler 31
+expat XML_SetEncoding 32
+expat XML_SetEndCdataSectionHandler 33
+expat XML_SetEndDoctypeDeclHandler 34
+expat XML_SetEndElementHandler 35
+expat XML_SetEndNamespaceDeclHandler 36
+expat XML_SetEntityDeclHandler 37
+expat XML_SetExternalEntityRefHandler 38
+expat XML_SetExternalEntityRefHandlerArg 39
+expat XML_SetNamespaceDeclHandler 40
+expat XML_SetNotStandaloneHandler 41
+expat XML_SetNotationDeclHandler 42
+expat XML_SetParamEntityParsing 43
+expat XML_SetProcessingInstructionHandler 44
+expat XML_SetReturnNSTriplet 45
+expat XML_SetStartCdataSectionHandler 46
+expat XML_SetStartDoctypeDeclHandler 47
+expat XML_SetStartElementHandler 48
+expat XML_SetStartNamespaceDeclHandler 49
+expat XML_SetUnknownEncodingHandler 50
+expat XML_SetUnparsedEntityDeclHandler 51
+expat XML_SetUserData 52
+expat XML_SetXmlDeclHandler 53
+expat XML_UseParserAsHandlerArg 54
+expat XmlPrologStateInit 55
+expat XmlPrologStateInitExternalEntity 56
+expat XmlGetUtf16InternalEncoding 57
+expat XmlGetUtf16InternalEncodingNS 58
+expat XmlGetUtf8InternalEncoding 59
+expat XmlGetUtf8InternalEncodingNS 60
+expat XmlInitEncoding 61
+expat XmlInitEncodingNS 62
+expat XmlInitUnknownEncoding 63
+expat XmlInitUnknownEncodingNS 64
+expat XmlParseXmlDecl 65
+expat XmlParseXmlDeclNS 66
+expat XmlSizeOfUnknownEncoding 67
+expat XmlUtf16Encode 68
+expat XmlUtf8Encode 69
+LIBRARY OSMesa OSMesa
+OSMesa OSMesaCreateContext 1
+OSMesa OSMesaDestroyContext 2
+OSMesa OSMesaGetColorBuffer 3
+OSMesa OSMesaGetCurrentContext 4
+OSMesa OSMesaGetDepthBuffer 5
+OSMesa OSMesaGetIntegerv 6
+OSMesa OSMesaMakeCurrent 7
+OSMesa OSMesaPixelStore 8
+OSMesa OSMesaCreateContextExt 9
+LIBRARY Xcursor Xcursor
+Xcursor XcursorCursorsCreate 1
+Xcursor XcursorCursorsDestroy 2
+Xcursor XcursorAnimateCreate 3
+Xcursor XcursorAnimateDestroy 4
+Xcursor XcursorAnimateNext 5
+Xcursor XcursorImageLoadCursor 6
+Xcursor XcursorImagesLoadCursors 7
+Xcursor XcursorFilenameLoadCursor 8
+Xcursor XcursorFilenameLoadCursors 9
+Xcursor XcursorLibraryLoadCursor 10
+Xcursor XcursorLibraryLoadCursors 11
+Xcursor _XcursorCreateGlyphCursor 12
+Xcursor XcursorShapeLoadCursor 13
+Xcursor XcursorShapeLoadCursors 14
+Xcursor _XcursorGetDisplayInfo 15
+Xcursor XcursorSupportsARGB 16
+Xcursor XcursorSetDefaultSize 17
+Xcursor XcursorGetDefaultSize 18
+Xcursor XcursorSetTheme 19
+Xcursor XcursorGetTheme 20
+Xcursor XcursorGetThemeCore 21
+Xcursor XcursorSetThemeCore 22
+Xcursor XcursorImageCreate 23
+Xcursor XcursorImageDestroy 24
+Xcursor XcursorImagesCreate 25
+Xcursor XcursorImagesDestroy 26
+Xcursor XcursorCommentCreate 27
+Xcursor XcursorCommentDestroy 28
+Xcursor XcursorCommentsCreate 29
+Xcursor XcursorCommentsDestroy 30
+Xcursor XcursorXcFileLoadImage 31
+Xcursor XcursorXcFileLoadImages 32
+Xcursor XcursorXcFileLoadAllImages 33
+Xcursor XcursorXcFileLoad 34
+Xcursor XcursorXcFileSave 35
+Xcursor XcursorFileLoadImage 36
+Xcursor XcursorFileLoadImages 37
+Xcursor XcursorFileLoadAllImages 38
+Xcursor XcursorFileLoad 39
+Xcursor XcursorFileSaveImages 40
+Xcursor XcursorFileSave 41
+Xcursor XcursorFilenameLoadImage 42
+Xcursor XcursorFilenameLoadImages 43
+Xcursor XcursorFilenameLoadAllImages 44
+Xcursor XcursorFilenameLoad 45
+Xcursor XcursorFilenameSaveImages 46
+Xcursor XcursorFilenameSave 47
+Xcursor XcursorLibraryLoadImage 48
+Xcursor XcursorLibraryLoadImages 49
+Xcursor XcursorShapeLoadImage 50
+Xcursor XcursorShapeLoadImages 51
+Xcursor XcursorTryShapeCursor 52
+Xcursor XcursorNoticeCreateBitmap 53
+Xcursor XcursorImageHash 54
+Xcursor XcursorNoticePutBitmap 55
+Xcursor XcursorTryShapeBitmapCursor 56
+LIBRARY Xv Xv
+Xv XvCreateImage 1
+Xv XvFreeAdaptorInfo 2
+Xv XvFreeEncodingInfo 3
+Xv XvGetPortAttribute 4
+Xv XvGetStill 5
+Xv XvGetVideo 6
+Xv XvGrabPort 7
+Xv XvListImageFormats 8
+Xv XvPutImage 9
+Xv XvPutStill 10
+Xv XvPutVideo 11
+Xv XvQueryAdaptors 12
+Xv XvQueryBestSize 13
+Xv XvQueryEncodings 14
+Xv XvQueryExtension 15
+Xv XvQueryPortAttributes 16
+Xv XvSelectPortNotify 17
+Xv XvSelectVideoNotify 18
+Xv XvSetPortAttribute 19
+Xv XvShmCreateImage 20
+Xv XvShmPutImage 21
+Xv XvStopVideo 22
+Xv XvUngrabPort 23
+LIBRARY xkbfile xkbfile
+xkbfile XkbAccessXDetailText 1
+xkbfile XkbActionText 2
+xkbfile XkbActionTypeText 3
+xkbfile XkbAtomGetString 4
+xkbfile XkbAtomText 5
+xkbfile XkbBehaviorText 6
+xkbfile XkbCFAddModByName 7
+xkbfile XkbCFAddPrivate 8
+xkbfile XkbCFApplyMods 9
+xkbfile XkbCFApplyRtrnValues 10
+xkbfile XkbCFBindMods 11
+xkbfile XkbCFDup 12
+xkbfile XkbCFFree 13
+xkbfile XkbCFFreeRtrn 14
+xkbfile XkbCFParse 15
+xkbfile XkbCFReportError 16
+xkbfile XkbCFScan 17
+xkbfile XkbChangeAtomDisplay 18
+xkbfile XkbChangeKbdDisplay 19
+xkbfile XkbConfigText 20
+xkbfile XkbControlsMaskText 21
+xkbfile XkbConvertGetByNameComponents 22
+xkbfile XkbConvertXkbComponents 23
+xkbfile XkbDetermineFileType 24
+xkbfile XkbDoodadTypeText 25
+xkbfile XkbEnsureSafeMapName 26
+xkbfile XkbFindKeycodeByName 27
+xkbfile XkbFreeOrderedDrawables 28
+xkbfile XkbGeomFPText 29
+xkbfile XkbGetOrderedDrawables 30
+xkbfile XkbIMWhichStateMaskText 31
+xkbfile XkbIndentText 32
+xkbfile XkbInitAtoms 33
+xkbfile XkbInternAtom 34
+xkbfile XkbKeyNameText 35
+xkbfile XkbKeysymText 36
+xkbfile XkbLookupCanonicalRGBColor 37
+xkbfile XkbLookupGroupAndLevel 38
+xkbfile XkbMergeFile 39
+xkbfile XkbModIndexText 40
+xkbfile XkbModMaskText 41
+xkbfile XkbNKNDetailMaskText 42
+xkbfile XkbNameMatchesPattern 43
+xkbfile XkbRF_AddGroup 44
+xkbfile XkbRF_AddRule 45
+xkbfile XkbRF_AddVarDesc 46
+xkbfile XkbRF_AddVarDescCopy 47
+xkbfile XkbRF_AddVarToDescribe 48
+xkbfile XkbRF_Create 49
+xkbfile XkbRF_Free 50
+xkbfile XkbRF_GetComponents 51
+xkbfile XkbRF_GetNamesProp 52
+xkbfile XkbRF_Load 53
+xkbfile XkbRF_LoadDescriptions 54
+xkbfile XkbRF_LoadDescriptionsByName 55
+xkbfile XkbRF_LoadRules 56
+xkbfile XkbRF_LoadRulesByName 57
+xkbfile XkbRF_SetNamesProp 58
+xkbfile XkbReadFromServer 59
+xkbfile XkbSIMatchText 60
+xkbfile XkbStdBell 61
+xkbfile XkbStdBellEvent 62
+xkbfile XkbStringText 63
+xkbfile XkbVModIndexText 64
+xkbfile XkbVModMaskText 65
+xkbfile XkbWriteCFile 66
+xkbfile XkbWriteToServer 67
+xkbfile XkbWriteXKBCompatMap 68
+xkbfile XkbWriteXKBFile 69
+xkbfile XkbWriteXKBGeometry 70
+xkbfile XkbWriteXKBKeyTypes 71
+xkbfile XkbWriteXKBKeycodes 72
+xkbfile XkbWriteXKBKeymap 73
+xkbfile XkbWriteXKBKeymapForNames 74
+xkbfile XkbWriteXKBLayout 75
+xkbfile XkbWriteXKBSemantics 76
+xkbfile XkbWriteXKBSymbols 77
+xkbfile XkbWriteXKMFile 78
+xkbfile XkmFindTOCEntry 79
+xkbfile XkmProbe 80
+xkbfile XkmReadFile 81
+xkbfile XkmReadFileSection 82
+xkbfile XkmReadFileSectionName 83
+xkbfile XkmReadTOC 84
+xkbfile _XkbStrCaseCmp 85
+xkbfile XkbCFDflts 86
+xkbfile _XkbErrLocation 87
+xkbfile _XkbErrCode 88
+xkbfile _XkbErrMessages 89
+xkbfile _XkbKSCheckCase 90
+LIBRARY xkbui xkbui
+xkbui XbUI_GetViewOpts 1
+xkbui XkbUI_DrawChanged 2
+xkbui XkbUI_DrawRegion 3
+xkbui XkbUI_GetCanvasSize 4
+xkbui XkbUI_Init 5
+xkbui XkbUI_ResetKeyAppearance 6
+xkbui XkbUI_Select 7
+xkbui XkbUI_SetCanvasSize 8
+xkbui XkbUI_SetKeyAppearance 9
+xkbui XkbUI_SetKeyAppearanceByName 10
+xkbui XkbUI_SetViewOpts 11
+xkbui XkbUI_SimpleInit 12
+LIBRARY Xinerama Xinerama
+Xinerama XPanoramiXAllocInfo 1
+Xinerama XPanoramiXGetScreenCount 2
+Xinerama XPanoramiXGetScreenSize 3
+Xinerama XPanoramiXGetState 4
+Xinerama XPanoramiXQueryExtension 5
+Xinerama XPanoramiXQueryVersion 6
+Xinerama XineramaIsActive 7
+Xinerama XineramaQueryExtension 8
+Xinerama XineramaQueryScreens 9
+Xinerama XineramaQueryVersion 10
+LIBRARY XvMC XvMC
+XvMC XvMCListSubpictureTypes 1
+XvMC XvMCListSurfaceTypes 2
+XvMC XvMCQueryExtension 3
+XvMC XvMCQueryVersion 4
+LIBRARY XRes XRes
+XRes XResQueryClientPixmapBytes 1
+XRes XResQueryClientResources 2
+XRes XResQueryClients 3
+XRes XResQueryExtension 4
+XRes XResQueryVersion 5
+LIBRARY FS FS
+FS FSErrorList 1
+FS FSErrorListSize 2
+FS FSCloseFont 3
+FS FSCloseServer 4
+FS FSFlush 5
+FS FSFree 6
+FS FSFreeCatalogues 7
+FS FSFreeExtensionList 8
+FS FSFreeFontNames 9
+FS FSGetCatalogues 10
+FS FSGetErrorDatabaseText 11
+FS FSGetErrorText 12
+FS FSListCatalogues 13
+FS FSListExtensions 14
+FS FSListFonts 15
+FS FSListFontsWithXInfo 16
+FS FSMalloc 17
+FS FSMaxRequestSize 18
+FS FSNextEvent 19
+FS FSOpenBitmapFont 20
+FS FSOpenServer 21
+FS FSQueryExtension 22
+FS FSQueryXBitmaps16 23
+FS FSQueryXBitmaps8 24
+FS FSQueryXExtents16 25
+FS FSQueryXExtents8 26
+FS FSQueryXInfo 27
+FS FSServerName 28
+FS FSSetAfterFunction 29
+FS FSSetCatalogues 30
+FS FSSetErrorHandler 31
+FS FSSetIOErrorHandler 32
+FS FSSync 33
+FS FSSynchronize 34
+LIBRARY fontenc fontenc
+fontenc FontEncDirectory 1
+fontenc FontEncIdentify 2
+fontenc FontEncReallyLoad 3
+fontenc FontEncFind 4
+fontenc FontEncFromXLFD 5
+fontenc FontEncMapFind 6
+fontenc FontEncName 7
+fontenc FontEncRecode 8
+fontenc FontEncSimpleName 9
+fontenc FontEncSimpleRecode 10
+fontenc FontEncUndefinedName 11
+fontenc FontEncUndefinedRecode 12
+fontenc FontMapFind 13
+fontenc FontMapReverse 14
+fontenc FontMapReverseFree 15
+LIBRARY Xfontcache Fntcache
+Xfontcache FontCacheChangeCacheSettings 1
+Xfontcache FontCacheGetCacheSettings 2
+Xfontcache FontCacheGetCacheStatistics 3
+Xfontcache FontCacheQueryExtension 4
+Xfontcache FontCacheQueryVersion 5
diff --git a/nx-X11/config/cf/osf1.cf b/nx-X11/config/cf/osf1.cf
new file mode 100644
index 000000000..9bb8cdc42
--- /dev/null
+++ b/nx-X11/config/cf/osf1.cf
@@ -0,0 +1,211 @@
+XCOMM platform: $Xorg: osf1.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+/* only tested with Digital OSF/1 */
+
+
+
+XCOMM platform: $XFree86$
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion.OSMinorVersion)
+
+#define StandardCppDefines -D__osf__ StandardDefines
+#define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARY_PATH
+#define HasPutenv YES
+#define Malloc0ReturnsNull YES
+#define HasNdbm YES
+#define HasShm YES
+#define AvoidNullMakeCommand YES
+#define NullMakeCommand @ echo
+#define HasPosixThreads YES
+#define SystemMTDefines -D_REENTRANT
+#define CplusplusSystemMTDefines -D_REENTRANT
+#define HasPoll YES
+#define HasVFork NO
+#define HasPlugin YES
+#define InstallCmd installbsd
+#define RanlibCmd ranlib -t
+#if OSMajorVersion > 1 || OSMinorVersion > 0
+#define ModernOSF1 YES
+#else
+#define ModernOSF1 NO
+#define ShLibDir /usr/shlib
+#endif
+
+#define InstallXloadSetGID NO
+
+#define ThreadedX ModernOSF1
+
+#if ThreadedX
+#define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
+#if OSMajorVersion < 4
+#define ThreadsLibraries -lpthreads -lmach -lc_r
+#define ThreadsCplusplusLibraries -lpthreads -lmach
+#define ThreadPreStdAPIDefines -DXPRE_STANDARD_API
+#else
+#define ThreadsLibraries -lpthread -lmach -lexc -lc
+#define ThreadsCplusplusLibraries -lpthread -lmach -lexc
+#define LibraryMTDefines -DUSE_TIS_SUPPORT
+#endif
+#endif
+
+#if ModernOSF1
+#ifndef OptimizedCDebugFlags
+#define OptimizedCDebugFlags -O2 -Olimit 2000
+#endif
+#ifndef ExtraLoadFlags
+/*
+ * In OSF/1 3.0 Digital has shared libXdmcp and libXau. What's more,
+ * the link editor has different search semantics, i.e. it will search
+ * for shared libraries first, then, if it can't find a shared lib, it
+ * will use a static lib. By using -oldstyle_liblookup the linker will
+ * follow "normal" semantics for linking libraries and will get the
+ * static libraries we really want. By 3.2 they no longer have libXdmcp
+ * and libXau as shared libraries and we can omit -oldstyle_liblookup.
+ * (What did they have in 3.1?)
+ */
+#if OSMajorVersion == 3 && OSMinorVersion == 0
+#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH),-oldstyle_liblookup
+#else
+#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
+#endif
+#endif
+#if OSMajorVersion > 3
+#define TermcapLibrary -lcurses
+#endif
+#if OSMajorVersion >= 3
+#define HasMkstemp YES
+#endif
+#endif
+
+/*
+ * C++ compiler setup. This file knows what options to use with the
+ * DEC C++ compiler, and may learn about other compilers in the future.
+ *
+ * For DEC C++, define HasDECCplusplus to YES in site.def.
+ *
+ * For g++ 2.6.x, define HasGcc2ForCplusplus to YES in site.def.
+ *
+ * For other compilers, define HasCplusplus to YES in site.def, and
+ * check to see if you need to provide values for CplusplusOptions
+ * and/or DefaultCplusplusOptions.
+ *
+ * In any case, you may also need to set CplusplusDependIncludes.
+ *
+ * Note: For DEC C++, the -call_shared option really only needs to
+ * appear when linking C++ executables, not when actually compiling
+ * the C++ sources. But since there's no imake variable that lets
+ * us insert flags only into the C++ link stage, we use -call_shared
+ * on all compilations when building executables. This could be
+ * considered a deficiency in the current imake configuration
+ */
+
+#if HasDECCplusplus
+#ifndef HasCplusplus
+#define HasCplusplus YES
+#endif
+#ifndef CplusplusCmd
+#define CplusplusCmd /usr/bin/cxx
+#endif
+#ifndef CplusplusFilt
+# define CplusplusFilt /usr/bin/demangle
+#endif
+#ifndef CplusplusDependIncludes
+#define CplusplusDependIncludes -D__DECCXX -I/usr/include/cxx
+#endif
+#ifndef CplusplusLibDir
+#define CplusplusLibDir /usr/lib/cmplrs/cxx
+#endif
+#ifndef CplusplusLibC
+#define CplusplusLibC -L/usr/lib/cmplrs/cxx -lcxx
+#endif
+#ifndef CplusplusOptions
+#define CplusplusOptions -call_shared
+#endif
+#endif /* HasDECCplusplus */
+
+
+#if HasGcc2ForCplusplus
+#ifndef CplusplusLibC
+#define CplusplusLibC `$(CXX) -print-libgcc-file-name`
+#endif
+#endif /* HasGcc2ForCplusplus */
+
+#ifdef CplusplusLibDir
+# define SystemBuildLibPath \
+/usr/shlib:/usr/ccs/lib:CplusplusLibDir:/usr/lib/cmplrs/cc:/usr/lib:/usr/local/lib:/var/shlib
+#else
+# define SystemBuildLibPath \
+/usr/shlib:/usr/ccs/lib:/usr/lib/cmplrs/cc:/usr/lib:/usr/local/lib:/var/shlib
+#endif
+
+#include <osfLib.rules>
+#define NoRConst YES
+
+#ifdef AlphaArchitecture
+#ifndef HasWChar32
+#define HasWChar32 YES
+#endif
+#define ServerExtraDefines -D_XSERVER64
+#define ServerOSDefines -DDDXTIME
+#ifndef DefaultCCOptions
+#define DefaultCCOptions -std1
+#endif
+#ifndef XawI18nDefines
+#define XawI18nDefines -DHAS_WCHAR_H
+#endif
+#ifndef BuildServer
+#define BuildServer NO
+#endif
+
+/* For DtHelp's TIFF processing routines. */
+#define LSBBitOrder YES
+
+#define MotifDefines -DNO_REGCOMP -DNO_REGEX -DSTRINGS_ALIGNED
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DMESSAGE_CAT
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#define DtWidgetDefines DtSearchDefines
+#define DtPrintDefines DtSearchDefines
+#define DtMailDefines \
+ -DNEED_MMAP_WRAPPER -DSENDMAIL_LOCKS -DMAIL_SPOOL_PATH=\"/var/spool/mail/%s\"
+
+#define ArchitectureDefines -DALPHA_ARCHITECTURE
+#endif
+
+#ifdef MipsArchitecture
+#define DefaultCCOptions -Xa
+#define XdecServer YES
+#define ServerOSDefines -DDDXTIME
+#define NormalLibObjCompile(options) ClearmakeOSName \
+ $(RM) $@ $*.os \ @@\
+ && $(CC) -c options $(CFLAGS) $*.c \ @@\
+ && $(LD) $(LDSTRIPFLAGS) -r $@ -o $*.os \ @@\
+ && $(MV) $*.os $@
+#endif
+
+#if !HasClearmake
+#ifndef HasMakefileSafeInclude
+#define HasMakefileSafeInclude YES
+#endif
+#ifndef IncludeMakefile
+#define IncludeMakefile(file) @@-include file
+#endif
+#endif
+
+#ifndef ManKeywordsTarget
+#define ManKeywordsTarget(manpath) @@\
+man_keywords:: @@\
+ catman -M $(DESTDIR)manpath -w
+#endif
+
+#define CdeTicDefines -DHAS_KNL -DHAS_KTAB
+#define CdeProjectDefines \
+ -DDEC -DMULTIBYTE -DNLS16 \
+ -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
diff --git a/nx-X11/config/cf/osfLib.rules b/nx-X11/config/cf/osfLib.rules
new file mode 100644
index 000000000..7f9a386d0
--- /dev/null
+++ b/nx-X11/config/cf/osfLib.rules
@@ -0,0 +1,163 @@
+XCOMM $Xorg: osfLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*
+ * OSF/1 shared library rules
+ */
+
+XCOMM $XFree86: xc/config/cf/osfLib.rules,v 1.2 1999/01/11 05:13:08 dawes Exp $
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+#ifndef SeparateSharedCompile
+#define SeparateSharedCompile NO
+#endif
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <osfLib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -shared -no_archive
+#endif
+
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags /**/
+#endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\
+ cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+#ifndef PackageName(libname)
+#if ModernOSF1
+#define PackageName(libname) /**/
+#define Objects(objlist) -all objlist -none
+#else
+#define PackageName(libname) -package libname
+#define Objects(objlist) objlist
+#endif
+#endif
+#if ThreadedX && ModernOSF1 && OSMajorVersion < 4
+#define BaseShLibReqs -lc_r -lc
+#else
+#define BaseShLibReqs -lc
+#endif
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+#if SeparateSharedCompile
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) PackageName($@) \ @@\
+ -soname $@ Objects(solist) \ @@\
+ $(REQUIREDLIBS) BaseShLibReqs) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+#else
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ $(LD) -o $@~ $(SHLIBLDFLAGS) PackageName($@) \ @@\
+ -soname $@ Objects(solist) \ @@\
+ $(REQUIREDLIBS) BaseShLibReqs @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+#endif /* SeparateSharedCompile */
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+#if SeparateSharedCompile
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) PackageName($@) \ @@\
+ -soname $@ Objects(solist) \ @@\
+ $(REQUIREDLIBS) BaseShLibReqs) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+#else
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ $(LD) -o $@~ $(SHLIBLDFLAGS) PackageName($@) \ @@\
+ -soname $@ Objects(solist) \ @@\
+ $(REQUIREDLIBS) BaseShLibReqs @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+#endif /* SeparateSharedCompile */
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
diff --git a/nx-X11/config/cf/osfLib.tmpl b/nx-X11/config/cf/osfLib.tmpl
new file mode 100644
index 000000000..82b7f92b7
--- /dev/null
+++ b/nx-X11/config/cf/osfLib.tmpl
@@ -0,0 +1,53 @@
+XCOMM $Xorg: osfLib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*
+ * OSF/1 shared library template
+ */
+
+XCOMM $XFree86: xc/config/cf/osfLib.tmpl,v 1.3tsi Exp $
+
+#if ThreadedX && ModernOSF1
+#if OSMajorVersion < 4
+#define SharedX11Reqs -lpthreads -lmach
+#endif
+#endif
+#define SharedOldXReqs $(LDPRELIBS) $(XONLYLIB)
+
+#if ThreadedX && ModernOSF1 && OSMajorVersion < 4
+#define SharedThreadReqs -lpthreads -lmach
+#else
+#define SharedThreadReqs /**/
+#endif
+#define SharedXtReqs $(LDPRELIBS) $(XONLYLIB) $(SMLIB) $(ICELIB) SharedThreadReqs
+#if ModernOSF1
+#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(EXTRAXAWREQS) $(XLIB)
+#else
+#define SharedXawReqs $(LDPRELIBS) $(XMULIB) $(XTOOLLIB) $(EXTRAXAWREQS) $(XLIB) -init _XawFixupVendorShell
+#endif
+#define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIBS) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIBS) $(XLIB)
+#define SharedXtstReqs $(LDPRELIBS) $(XLIB)
+#define SharedSMReqs $(LDPRELIBS) $(ICELIB)
+#define SharedXpReqs $(LDPRELIBS) $(XLIB)
+#define SharedXpmReqs $(LDPRELIBS) $(XLIB)
+
+#define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB) SharedThreadReqs $(LDPOSTLIBS)
+#define SharedXmReqs $(LDPRELIBS) SharedXReqs
+#define SharedMrmReqs $(LDPRELIBS) $(XMLIB) SharedXReqs
+#define SharedUilReqs $(LDPRELIBS) $(MRESOURCELIB) $(XMLIB) SharedXReqs
+
+/* #define SharedPamReqs */
+#define SharedTtReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB) SharedThreadReqs $(CXXLIB)
+#define SharedDtSvcReqs $(LDPRELIBS) $(TTLIB) $(XMLIB) SharedXReqs -lm $(CXXLIB)
+#define SharedDtMmdbReqs $(LDPRELIBS) $(DTSVCLIB) $(TTLIB) $(XMLIB) SharedXReqs -lm $(CXXLIB)
+#define SharedDtSearchReqs $(LDPRELIBS) -lm
+#define SharedDtWidgetReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXReqs -lm $(CXXLIB)
+#define SharedDtHelpReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXReqs -lm -liconv
+#define SharedDtPrintReqs $(LDPRELIBS) $(DTSVCLIB) $(DTHELPLIB) $(XMLIB) SharedXReqs -lm $(CXXLIB)
+#define SharedDtTermReqs $(LDPRELIBS) $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) SharedXReqs -lm
+#define SharedDtMrmReqs $(LDPRELIBS) $(DTTERMLIB) $(DTPRINTLIB) $(DTHELPLIB) $(DTWIDGETLIB) $(MRESOURCELIB) $(XMLIB) SharedXReqs -lm
+#define SharedDtMailReqs $(LDPRELIBS) $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) SharedXReqs -liconv -lm $(CXXLIB)
+#define SharedCsaReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXReqs -lm
+
+ICONVSYSLIB = -liconv
diff --git a/nx-X11/config/cf/pegasus.cf b/nx-X11/config/cf/pegasus.cf
new file mode 100644
index 000000000..0a6f53a37
--- /dev/null
+++ b/nx-X11/config/cf/pegasus.cf
@@ -0,0 +1,34 @@
+XCOMM platform: $Xorg: pegasus.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+#ifndef OSName
+#define OSName UTek 4.0
+#endif
+XCOMM operating system: OSName
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+
+#define HasNdbm YES
+#define HasVoidSignalReturn NO
+
+#define BootstrapCFlags -DM4310 -DUTEK
+#define StandardDefines -DM4310 -DUTEK -Dpegasus
+
+#if HasGcc
+/* put back all of the -Ds which -ansi removes */
+#define CcCmd gcc -ansi -fstrength-reduce -fpcc-struct-return -Dmc68000 -Dtektronix -Dutek -Dunix -Dm68k
+#endif
+
+#define BuildServer NO
+/* #define XtekServer YES */
+
+#define ServerExtraDefines -DM4310 -DM4317
+#define ServerOSDefines -DDDXTIME
+#define FontFilters BDFTOSNFFILT SHELLPATH
+#define PrimaryScreenResolution 95
+
+.DIRECTORIES: /* Turn off directory search for RCS */
+
diff --git a/nx-X11/config/cf/sco.cf b/nx-X11/config/cf/sco.cf
new file mode 100644
index 000000000..dff6a659f
--- /dev/null
+++ b/nx-X11/config/cf/sco.cf
@@ -0,0 +1,206 @@
+XCOMM platform: $Xorg: sco.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+XCOMM platform: $XFree86: xc/config/cf/sco.cf,v 3.13 1997/05/24 13:46:28 dawes Exp $
+
+/*
+ * This is sco.cf, for SCO Open Server 5.0.2 and SCO UNIX.
+ * Please mail hug@netcom.com with any questions.
+ *
+ * This section is common to all versions of SCO
+ */
+
+#ifndef ScoOsMouse
+# define ScoOsMouse YES
+#endif
+
+#ifndef OSVendor
+#define OSVendor Santa Cruz Operation
+#endif
+
+#define PosixLibraries /**/
+#define Malloc0ReturnsNull YES
+#define RemoveDSDENroffMacros NO
+#define ExtraLibraries -lsocket -lmalloc -lpt
+
+#define ManSourcePath $(MANPATH)/cat.
+
+#ifndef CompressManPages
+#define CompressManPages YES
+#endif
+
+#if ScoOsMouse
+# define ServerExtraDefines -DUSE_OSMOUSE XFree86ServerDefines
+# define ServerExtraSysLibs $(CBRT) -lm -levent
+#else
+# define ServerExtraSysLibs $(CBRT) -lm
+#endif
+
+/*
+ * XBSDLIB is included with the Socket libraries, because SCO needs Xbsd
+ * as its bcopy routine doesn't handle overlapping regions. If HasSockets
+ * If HasSockets is false the XINETLIB does it for us anyway.
+ */
+#define SocketLibraries $(XBSDLIB) -lsocket
+
+#define ConnectionFlags -DLOCALCONN -DTCPCONN -DFD_SETSIZE=256
+
+#if defined(i386Sco324Architecture) || defined(i386Sco325Architecture)
+# ifndef HasSymLinks
+# define HasSymLinks YES
+# endif
+# define CompressManCmd $(COMPRESS) -v
+#else /* SCO 3.2.2 */
+# ifndef HasSymLinks
+# define HasSymLinks NO
+# endif
+# define CommpressManCmd pack
+#endif
+
+/*
+ * Due to the extra '.' chars in the SCO man pages file name we have
+ * to provide our own version of this macro.
+ */
+
+#define InstallManPageAliases(file,destdir,aliases) @@\
+install.man:: @@\
+ @(SUFFIX=`echo $(DESTDIR)destdir/file.* | cut -f3,4 -d.`; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ $(RM) $(DESTDIR)destdir/$$i.*; \ @@\
+ (cd $(DESTDIR)destdir; $(LN) file.$${SUFFIX} \ @@\
+ $$i.$${SUFFIX})); \ @@\
+ done)
+
+/*
+ * This is the SCO Open Server 5.0.2 section. BOOTSTRAPCFLAGS is computed
+ * automatically. You can simply run make World.
+ */
+#ifdef i386Sco325Architecture
+#ifndef OSName
+#define OSName OpenServer Release 5
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 5
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 2
+#endif
+
+#define StandardDefines -Dsco -DSCO -DSYSV -Di386 -DSCO325 -DSCO324
+#ifdef HasGcc2
+# define DefaultCCOptions -melf
+# define CcCmd gcc
+# define ExtraLoadOptions -melf
+# define DefaultCDebugFlags DefaultGcc2i386Opt
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+#else
+# define DefaultCCOptions -dy
+# define CcCmd cc
+# define ExtraLoadOptions -b elf
+# define DefaultCDebugFlags -O2
+# define OptimizedCDebugFlags -O2
+#endif
+
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
+#define NeedWidePrototypes NO
+#define ServerOSDefines -DDDXTIME
+#define ToolkitStringsABIOptions -intelabi
+#define ThreadedX NO
+#define HasThreadSafeAPI NO
+#define HasNdbm YES
+#define HasVFork YES
+#define HasPutenv YES
+#define ExecableScripts YES
+#define HasShadowPasswd YES
+
+#ifndef HasLibCrypt
+# define HasLibCrypt YES
+# define SpecialLibCrypt -lcrypt
+#endif
+
+#ifndef ForceNormalLib
+# define ForceNormalLib YES
+#endif
+
+#define SharedLibXmu NO
+#define SystemV YES
+#define LdCombineFlags -r
+
+#define HasLdRunPath YES
+#define HasPoll YES
+#define PatheticCpp YES
+
+#define ArCmdBase ar
+#define AsCmd as
+#define CppCmd /lib/cpp
+#define LdCmd ld
+#define LexCmd lex
+#define MakeCmd make
+#define YaccCmd yacc
+
+#include <scoLib.rules> /* minor changes to sv4Lib.rules */
+#include <sv4Lib.rules>
+
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#define DtWidgetDefines DtSearchDefines
+#define DtPrintDefines DtSearchDefines
+
+#else /* !i386Sco325Architecture */
+/*
+ * This is the SCO 3.2v4.x and SCO 3.2v2.x section
+ */
+
+/* You must manually compute BootstrapCFlags for initial build */
+
+#define OSMinorVersion 2
+
+#ifdef i386Sco324Architecture
+# define BootstrapCFlags -DSYSV -Di386 -DSCO -DSCO324
+# define OSTeenyVersion 4
+# define OSName (SCO Version 3.2.4)
+# define OSDefines -DSCO -DSCO324 -Dsco -Dsco324 -DBROKEN_FTOL \
+ -D_NO_PROTOTYPE -D_SVID
+#else
+# define BootstrapCFlags -DSYSV -Di386 -DSCO
+# define OSTeenyVersion 2
+# define OSName (SCO Version 3.2.2)
+# define OSDefines -DSCO -Dsco -DBROKEN_FTOL -DNO_PROTOTYPE \
+ -D_SVID
+#endif
+
+#ifdef i386Sco324Architecture
+/*
+ * if your gcc is compiled with STDC_VALUE=0 then change the 1 to 0
+ */
+# define GCC_STDC_VALUE 1
+# if !GCC_STDC_VALUE
+# define OSDefines -DSCO -DSCO324 -Dsco -Dsco324 -DBROKEN_FTOL \
+ -D_NO_PROTOTYPE -D_SVID -D__STDC__=1
+# undef StandardCppDefines
+# define StandardCppDefines -DUNIXCPP=1 StandardDefines
+# endif
+#endif
+
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+
+/*
+ * The user should override this in their site.def if they have the real
+ * crypt library. We default to the international crypt library here as
+ * anyone may obtain that.
+ */
+
+#ifndef HasLibCrypt
+# define HasLibCrypt YES
+# define SpecialLibCrypt -lcrypt_i
+#endif
+
+#include <svr3.cf>
+
+#endif /* SCO 3.2.4 and SCO 3.2.2 section */
+
+#ifdef i386Architecture
+#include <xorg.cf>
+#endif
+
diff --git a/nx-X11/config/cf/sco5.cf b/nx-X11/config/cf/sco5.cf
new file mode 100644
index 000000000..c6fa54bad
--- /dev/null
+++ b/nx-X11/config/cf/sco5.cf
@@ -0,0 +1,380 @@
+XCOMM $XFree86: xc/config/cf/sco5.cf,v 3.15 2003/12/19 02:05:37 dawes Exp $
+XCOMM $XdotOrg: xc/config/cf/sco5.cf,v 1.9 2005/12/20 22:30:48 alanc Exp $
+
+/*
+ * This is for SCO Open Server 5.0.6A or later. You must have the
+ * Execution Environment update (OSS646) installed on 5.0.6 (it
+ * ships standard in 5.0.7 and later), as well as the Graphics,
+ * Web and X11 (gwxlibs) package OSS631 installed, which also ships
+ * standard with 5.0.7 and later.
+ *
+ * It is suggested that you use the GNU Development Tools for compiling
+ * XFree86. Almost no testing has been done with the native development
+ * system.
+ */
+
+#ifndef OSName
+#define OSName UNIX System V/386 Open Server Release 5
+#endif
+#ifndef OSVendor
+#define OSVendor SCO-Group
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 5
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 7
+#endif
+
+/*
+ * Note: We define FD_SETSIZE here (as opposed to in ConnectionFlags) to
+ * guarantee that the same FD_SETSIZE is used. Havoc abounds if we do not
+ * do this, as some files which include sys/socket.h and sys/types.h will
+ * have different values for FD_SETSIZE.
+ *
+ * Note 2: We also define _SVID3, as this seems to enable more Streams
+ * based options which are closer to the "desired" state for X11. A by-
+ * product of this is that we get better signals too.
+ */
+
+#ifndef HasGcc2
+# define HasGcc2 YES
+#endif
+#ifndef HasGcc3
+# define HasGcc3 NO
+#endif
+#ifndef HasGcc2ForCplusplus
+# define HasGcc2ForCplusplus YES
+#endif
+
+#ifndef HasGcc
+# if HasGcc2 || HasGcc3
+# define HasGcc YES
+# endif
+#endif
+
+/*
+ * Although OpenServer does not currently have threads, there are plans
+ * for it in the near future, and libc/libsocket are already thread
+ * safe, so use -D_REENTRANT when compiling libraries so that if an
+ * app that has either the new forthcoming threads, or one that uses
+ * GNU PTH or FSU pthreads is linked against X, that the libraries are
+ * safe at least with regards to things like errno and various _r functions.
+ */
+#ifndef LibraryCCOptions
+# define LibraryCCOptions -D_REENTRANT -DFD_SETSIZE=11000 -D_NO_STATIC -DMAXPATHLEN=1024
+#endif
+
+#ifndef UseExportLists
+# define UseExportLists NO
+#endif
+
+#define StandardDefines -DSYSV -Di386 -DSCO325 -D__SCO__
+#if HasGcc
+# define DefaultCCOptions GccWarningOptions
+# ifndef CcCmd
+# define CcCmd gcc
+# endif
+# ifndef DefaultCDebugFlags
+# define DefaultCDebugFlags -O6 -fomit-frame-pointer -march=i586 -mcpu=i586
+# endif
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O6 -fomit-frame-pointer -march=i586 -mcpu=i586
+# endif
+#else
+# ifndef CcCmd
+# define CcCmd cc -belf
+# endif
+# define DefaultCCOptions -dy
+# ifndef DefaultCDebugFlags
+# define DefaultCDebugFlags -O2
+# endif
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O2
+# endif
+#endif
+
+#define BuildLibPathVar LD_LIBRARY_PATH
+
+#ifndef HasNCurses
+# define HasNCurses YES
+#endif
+#ifndef NCursesLibName
+# define NCursesLibName -lcurses
+#endif
+#ifndef TermcapLibrary
+# define TermcapLibrary -lcurses
+#endif
+
+#ifndef BuildXterm
+# define BuildXterm BuildClients
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver NO
+#endif
+
+#ifndef SCOHasGWXLIBS
+# define SCOHasGWXLIBS YES
+#endif
+
+#ifndef LogDirectory
+# define LogDirectory /var/adm
+#endif
+
+#ifndef DoLoadableServer
+# define DoLoadableServer YES
+#endif
+
+#if DoLoadableServer
+# if HasGcc
+# define SCODynamicFlags -rdynamic
+# else
+# define SCODynamicFlags -Wl,-Bexport
+# endif
+#else
+# define SCODynamicFlags /**/
+#endif
+
+#ifndef BuildFreetypeDlModule
+# define BuildFreetypeDlModule NO
+#endif
+
+#ifndef AsmDefines
+# define AsmDefines -D__ELF__ -D__PIC__
+#endif
+
+#ifndef XawI18nDefines
+# define XawI18nDefines -DHAS_WCHAR_H -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
+#endif
+
+#ifndef ServerExtraSysLibs
+# define ServerExtraSysLibs $(CBRT) -lm SCODynamicFlags
+#endif
+
+#ifndef ExtraLibraries
+# define ExtraLibraries -lsocket
+#endif
+
+#ifndef NeedWidePrototypes
+# define NeedWidePrototypes YES
+#endif
+
+#define SCOBuildFlags -DFD_SETSIZE=11000 -DMAXPATHLEN=1024 -DPATH_MAX=1024
+
+#define ServerExtraDefines -D_REENTRANT SCOBuildFlags -DDDXTIME XFree86ServerDefines
+
+#ifndef ThreadedX
+# define ThreadedX NO
+#endif
+
+#ifndef HasThreadSafeAPI
+# define HasThreadSafeAPI NO
+#endif
+
+#define HasNdbm YES
+#define HasVFork YES
+#define HasPutenv YES
+#define HasSnprintf NO
+#define ToolkitStringsABIOptions -intelabi
+#define HasSetenv NO
+#define HasMkstemp YES
+#define ExecableScripts YES
+#define HasShadowPasswd YES
+
+#define HasSymLinks YES
+#define HasDlopen YES
+#define HasShm YES
+#define HasStrcasecmp YES
+#define HasLdRunPath YES
+#define HasPoll YES
+
+#ifndef HasGnuMake
+# define HasGnuMake YES
+#endif
+
+#if SCOHasGWXLIBS
+# define HasExpat YES
+# define HasFreetype2 YES
+# define HasLibpng YES
+# define HasZlib YES
+# define HasFontconfig YES
+#endif
+
+#define InstallHardcopyDocs NO
+
+#define HasPerl YES
+#define HasPerl5 YES
+
+#ifndef ManSourcePath
+# define ManSourcePath $(MANPATH)/man
+#endif
+
+#define Malloc0ReturnsNull YES
+#define RemoveDSDENroffMacros NO
+
+#ifndef CompressManPages
+# define CompressManPages NO
+#endif
+
+#ifndef HasLibCrypt
+# define HasLibCrypt YES
+# define SpecialLibCrypt -lcrypt
+#endif
+
+#ifndef PosixLibraries
+# define PosixLibraries /**/
+#endif
+
+#ifndef ForceNormalLib
+# define ForceNormalLib NO
+#endif
+
+#define SharedLibXmu YES
+#define SystemV YES
+#define LdCombineFlags -r
+
+#define AvoidNullMakeCommand YES
+#define PatheticCpp YES
+
+#define MesaUseX86Asm NO
+
+#define MakeNamedTargetSubdir(dir,flags,subname)\
+ $(MAKE) -C dir $(MFLAGS) $(PARALLELMFLAGS) flags subname
+
+#define ArCmdBase ar
+
+#ifndef AsCmd
+# define AsCmd CcCmd
+#endif
+
+#ifndef CppCmd
+# define CppCmd /lib/cpp
+#endif
+
+#ifndef PreProcessCmd
+# define PreProcessCmd CppCmd
+#endif
+
+#ifndef RawCppCmd
+# define RawCppCmd CppCmd
+#endif
+
+#ifndef LdCmd
+# define LdCmd CcCmd
+#endif
+
+#ifdef HasGcc2
+# ifndef SharedLibraryLoadFlags
+# define SharedLibraryLoadFlags -shared
+# endif
+# undef LdCombineFlags
+# define LdCombineFlags -nostdlib -r
+#endif
+
+#ifndef LexCmd
+# define LexCmd /usr/gnu/bin/flex
+#endif
+
+#ifndef MakeCmd
+# define MakeCmd /usr/gnu/bin/gmake
+#endif
+
+#ifndef YaccCmd
+# define YaccCmd /usr/gnu/bin/bison -y
+#endif
+
+#ifndef InstallCmd
+# define InstallCmd /usr/gnu/bin/ginstall
+#endif
+
+#ifndef UseSeparateConfDir
+# define UseSeparateConfDir NO
+#endif
+
+#ifndef BuildHtmlManPages
+# define BuildHtmlManPages NO
+#endif
+
+#ifndef DefaultUserPath
+# define DefaultUserPath /bin:/usr/bin:$(BINDIR):/usr/bin/X11:/usr/gnu/bin:/usr/local/bin:/etc
+#endif
+
+#ifndef DefaultSystemPath
+# define DefaultSystemPath /etc:/bin:/usr/bin:$(BINDIR):/usr/bin/X11
+#endif
+
+#define ConnectionFlags -DLOCALCONN -DTCPCONN -DUNIXCONN
+
+#define ExportListGenSource elistgen.usl
+#define ShlibExportListOpt(filename) Concat(-Bexport:,filename)
+
+/*
+ * These settings control the interdependence of the shared libraries.
+ * Mostly borrowed from darwinLib.tmpl.
+ */
+#ifndef FixupLibReferences
+#define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef XawClientLibs
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+#define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY)
+
+#define SharedXfontReqs $(LDPRELIB) $(FONTSTUBLIB) GzipLibrary $(FREETYPE2LIB) $(XLIB)
+#define SharedFontencReqs $(LDPRELIB) GzipLibrary
+#define SharedGLReqs $(LDPRELIB) $(XLIB)
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedOSMesaReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedSMReqs $(LDPRELIB) $(ICELIB)
+#define SharedX11Reqs $(LDPRELIB) -lsocket
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIB) $(XLIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXmuuReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXpReqs $(LDPRELIB) $(XLIB)
+#define SharedXpmReqs $(LDPRELIB) $(XLIB)
+#define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+#define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
+#define SharedXtstReqs $(LDPRELIB) $(XLIB)
+#define SharedXvReqs $(LDPRELIB) $(XLIB)
+#define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIB)
+#define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedpsresReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXResReqs $(LDPRELIB) $(XLIB)
+#define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+#define SharedXineramaReqs $(LDPRELIB) $(XLIB)
+#define SharedXssReqs $(LDPRELIB) $(XLIB)
+#define SharedXvMCReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB)
+#define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXmReqs $(LDPRELIB) SharedXReqs
+#define SharedMrmReqs $(LDPRELIB) $(XMLIB) SharedXReqs
+#define SharedUilReqs $(LDPRELIB) $(XMLIB) SharedXReqs
+
+#define ObjectFromAsmSource(src,flags) @@\
+ @@\
+src.o: src.S @@\
+ RemoveFile(src.o) @@\
+ $(CC) -c AsmDefines $(DEFINES) $(INCLUDES) flags src.S
+
+#include <scoLib.rules> /* minor changes to sv4Lib.rules */
+#include <sv4Lib.rules>
+
+#include <xorg.cf>
diff --git a/nx-X11/config/cf/scoLib.rules b/nx-X11/config/cf/scoLib.rules
new file mode 100644
index 000000000..ddbe99d30
--- /dev/null
+++ b/nx-X11/config/cf/scoLib.rules
@@ -0,0 +1,68 @@
+XCOMM $XdotOrg: xc/config/cf/scoLib.rules,v 1.3 2005/11/08 06:33:24 jkj Exp $
+XCOMM $Xorg: scoLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+XCOMM $XFree86: xc/config/cf/scoLib.rules,v 1.10 2003/12/18 16:38:34 dawes Exp $
+
+#ifndef UseExportLists
+# define UseExportLists YES
+#endif
+
+#ifndef SCOAbsShlibPath
+# define SCOAbsShlibPath NO
+#endif
+
+#if SCOAbsShlibPath
+# define SCOShlibFlags -h $(SHLIBDIR)/$@
+#else
+# ifndef ExtraLoadFlags
+# define ExtraLoadFlags -R $(USRLIBDIRPATH)
+# endif
+# define SCOShlibFlags -R $(SHLIBDIR) -h $@
+#endif
+
+/*
+ * SharedLibraryTarget3 - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ *
+ * Work around SCO sh enviroment size problem.
+ */
+#ifndef SharedLibraryTarget3
+#define SharedLibraryTarget3(libname,rev,solist1,solist2,solist3,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist1 solist2 solist3 $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ echo -n $(LD) -o up/$@~ $(SHLIBLDFLAGS) SCOShlibFlags solist1 " " > Concat(down/lib,cmd) @@\
+ echo -n solist2 " " >> Concat(down/lib,cmd) @@\
+ echo -n solist3 " " >> Concat(down/lib,cmd) @@\
+ echo -n $(REQUIREDLIBS) >> Concat(down/lib,cmd) @@\
+ (cd down; $(SHELL) Concat(./lib,cmd)) @@\
+ $(RM) $@ Concat(lib,tmp1) Concat(lib,tmp2) @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedLibraryTarget */
+
+#ifndef LinkWithExports
+# if UseExportLists
+# define LinkWithExports(libname,rev,solist,down,up) \
+ (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) SCOShlibFlags solist $(REQUIREDLIBS)) @@\
+ if [ -f Concat(lib,libname.elist) ]; then \ @@\
+ $(RM) down/$@.exports $@.list; \ @@\
+ $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic >$@.list; \ @@\
+ $(EXPORTLISTGEN) $@~ $@.list > down/$@.exports; \ @@\
+ (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) SCOShlibFlags ShlibExportListOpt($@.exports) solist $(REQUIREDLIBS)); \ @@\
+ $(RM) down/$@.exports $@.list; \ @@\
+ fi;
+# else
+# define LinkWithExports(libname,rev,solist,down,up) \
+ (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) SCOShlibFlags solist $(REQUIREDLIBS))
+# endif
+#endif
diff --git a/nx-X11/config/cf/sequent.cf b/nx-X11/config/cf/sequent.cf
new file mode 100644
index 000000000..99ba9b461
--- /dev/null
+++ b/nx-X11/config/cf/sequent.cf
@@ -0,0 +1,444 @@
+XCOMM platform: $XConsortium: sequent.cf$
+
+/*
+ * SET VERSION NUMBERS BEFORE MAKING MAKEFILES; also, you'll need to install
+ * util/scripts/bsdinstall.sh before doing a "make install"
+ */
+
+/*
+ * Version numbers are set one of two ways:
+ *
+ * If the target version is different than the machine you are building on,
+ * set the target versions using the environmental variable IMAKEINCLUDES.
+ * Example: IMAKEINCLUDES="-I. -DOSMajorVersion=4 -DOSMinorVersion=4"
+ * This is usually only done at Sequent when building a product using
+ * cross compiling tools and target headers and libraries.
+ *
+ * Otherwise, the imake will use uname(2) to calculate the default to be
+ * the same as the machine you are building on. The X11R6 imake will set
+ * DefaultOS*Version macros to be these default values.
+ * Those default values will be used in the assignments below.
+ * This is the recommended method to be used by customers.
+ */
+
+ /* defaults from imake via uname(2) */
+#ifndef OSName
+#define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName V/**/OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion
+
+/*
+ * Sequent Dynix/PTX 4.x.x (SVR4) and later operating systems.
+ *
+ * Sequent Dynix/PTX 4.2.3 and later operating systems are supported with
+ * the X11R6 sequent.cf and other X11R6 configuration files.
+ * Specifically 4.4.2 and later have been tested.
+ *
+ * Attempting to use these X11R6 configuration files and X11R6 source files
+ * with early versions of Dynix/PTX 4.x.x may work, however that will not be
+ * tested or supported at Sequent.
+ * Sequent Dynix/PTX 2.1.x has been retired so support for it and earlier
+ * releases has been removed.
+ */
+
+#if OSMajorVersion >= 4
+
+#define SystemV4 YES
+#define SequentVersionDefines -DSVR4
+#define ExtraLibraries
+#define ForceNormalLib YES
+#define HasRequiredLibs YES
+#define NeedBerklib NO /* gettimeofday in libc */
+
+#define XmExtraLibraries /* for ABI-compliance do not use -lgen here */
+#define MotifDefines -DXM_STRINGS_1_2_2_STATE /* code review */
+
+/* initial port does not use multiple socket libs, default libsocket.so.1.1 */
+#define HasMultipleSockets NO /* obsolete */ /* only libsocket.so.1.1 */
+
+#endif /* OSMajorVersion >= 4 */
+
+/*
+ * Below this line are generic defines that apply to all Sequent systems.
+ * However they are currently tested with only OSMajorVersion >= 4
+ */
+
+/*
+ * The following cpp macro defines are order independent,
+ * since the right-hand-side is constant.
+ * Therefore these are simply listed in alphabetical order.
+ * Macros defined later may use these definitions.
+ */
+
+/*
+ * Threads.tmpl cpp macros.
+ * Sequent overrides the Threads.tmpl defaults with the values below.
+ * Sequent has native threads for ptx 4.5.0 and higher.
+ */
+
+#if ( OSMajorVersion >= 5 || (OSMajorVersion == 4 && OSMinorVersion >= 5) )
+
+#define HasPosixThreads YES
+#define HasThreadSafeAPI YES
+#define ThreadedX YES
+#define ThreadsLibraries /**/
+#define ThreadsCplusplusLibraries /**/
+#define ThreadPreStdAPIDefines /**/
+#define ThreadsCompileFlags -Kthread
+#define ThreadsCplusplusCompileFlags -Kthread
+#define SharedThreadReqs /**/
+
+/*
+ * THREADS macro and environment variable used with Sequent commands only.
+ * We use THREADS rather than the generic X11 THREADS_CFLAGS because we
+ * want to ensure that the macro is defined for all compiles and not just
+ * those Makefiles built from a Imakefile that includes Threads.tmpl.
+ *
+ * Sequent compiler option -Kthread will also define -D_SEQUENT_THREADS.
+ * Currently using -Kthread is the recommended interface to this define.
+ * Currently there are no extra includes files using -D_SEQUENT_THREADS.
+ * Currently no reason for makedepend or cpp to use -D_SEQUENT_THREADS.
+ * If needed in the future, we would add to ProjectThreadsDefines
+ *
+ * #define ProjectThreadsDefines -DXTHREADS -D_SEQUENT_THREADS
+ */
+
+ THREADS = -Kthread
+
+#endif /* ptx 4.5.0 or greater has threads */
+
+/*
+ * Imake.tmpl cpp macros.
+ * Sequent overrides the Imake.tmpl defaults with the values below.
+ */
+
+#define BuildLibPathVar LD_LIBRARY_PATH
+#define DefaultCCOptions -Xa
+#define ExpandManNames YES
+#define ExtraFilesToClean *.z
+#define HasNdbm YES
+#define HasShadowPasswd YES
+#define HasSockets YES /* default */
+#define HasVarDirectory NO
+#ifdef UseInstalled
+#define InstallCmd $(BINDIR)/ptxinst -t "$(TOOLS)"
+#else
+#define InstallCmd $(SHELL) $(SCRIPTSRC)/ptxinst.sh
+#endif /* UseInstalled */
+#define InstPgmFlags -s -m 0555 -o bin -g bin
+#define InstBinFlags -s -m 0555 -o bin -g bin
+#define InstLibFlags -m 0444 -o bin -g bin
+#define InstShLibFlags -m 0555 -o bin -g bin
+#define Malloc0ReturnsNull YES
+#define ManSuffix 1 /* use just one tab or cpp will die */
+#define LibManSuffix 3x /* use just one tab or cpp will die */
+#define LibmanDir $(MANSOURCEPATH)3
+#define MiscManSuffix 5x /* use just one tab or cpp will die */
+#define MiscManDir $(MANSOURCEPATH)5
+#define MkdirHierCmd mkdir -p
+#define NeedConstPrototypes YES
+#define NeedFunctionPrototypes YES
+#define NeedNestedPrototypes YES
+#define NeedVarargsPrototypes YES
+#define StripInstalledPrograms YES
+#define SystemManDirectory /usr/catman
+#define TermcapLibrary -lcurses /* code review for SVR4 ? */
+#define TerminfoDir /usr/lib/terminfo /* Sequent addition */
+#define ToolkitStringsABIOptions -intelabi
+
+
+/*
+ * X11.tmpl cpp macros.
+ * Sequent overrides the X11.tmpl defaults with the values below.
+ */
+
+#define BuildDps YES
+#define BuildServer YES
+#define BuildXF86DGA NO /* DGA has no meaning on Sequent HW */
+#define BuildXF86MiscExt NO /* turn off the server portion */
+#define BuildXF86VidModeExt NO /* turn off the server portion */
+#define BuildXInputExt YES
+#define BuildXKBuilib YES /* override NO set in xorg.cf */
+#define ConnectionFlags -DTCPCONN
+#define DefaultSystemPath /bin:/etc:/usr/bin:$(BINDIR)
+#define DefaultUserPath :/bin:/usr/bin:$(BINDIR)
+#define HasPlugin YES
+#define HasXServer NO
+#define InstallFSConfig YES /* safe since we install to DESTDIR */
+#define InstallXdmConfig YES /* safe since we install to DESTDIR */
+#define MotifBC NO /* default, code review from X11R5 */
+#define XdmServersType fs /* One tab here. Needed if BuildServer YES */
+#define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines -DXTMALLOC_BC
+#define XprtServer YES
+#define XVirtualFramebufferServer YES
+#define XF86SVGAServer NO /* Don't build the XFree86 servers */
+#define XF86S3Server NO
+#define XF86S3VServer NO
+#define XF86I8514Server NO
+#define XF86Mach8Server NO
+#define XF86Mach32Server NO
+#define XF86Mach64Server NO
+#define XF86P9000Server NO
+#define XF86AGXServer NO
+#define XF86I128Server NO
+#define XF86GLINTServer NO
+#define XF86REALimageServer NO
+
+/*
+ * Motif.tmpl cpp macros.
+ * Sequent overrides the Motif.tmpl default with the values below.
+ */
+
+#define GencatCmd /usr/lbin/gencat
+
+/* Port Sequent macro DontBuildMotifConfig to Motif 2.1 */
+/*
+ * #ifndef MetroLink
+ * #define DontBuildMotifConfig
+ * #endif
+ */
+
+/*
+ * Sequent added cpp macros.
+ *
+ * The following cpp macro defines have been introduced by Sequent.
+ * They will be referenced in Sequent patches sent to TOG.
+ * They may be moved above if accepted by TOG or X.org.
+ */
+
+#define AdminBaseDir /usr/admin.ptx/etc/base.dir
+#define MessageCatDir /usr/lib/message/C
+#define NeedXinputAlias YES
+#define UseHidesymsLists YES
+#define XlbiffMailPath /usr/mail/%s /* used by contrib xlbiff */
+
+/*
+ * Imake.tmpl, X11.tmpl, or other order dependent cpp defines.
+ *
+ * The following cpp macro defines are order dependent.
+ * They depend on previously defined cpp macros.
+ * Do not change the order.
+ */
+#define SharedLibraryCCOptions DefaultCCOptions
+#define StandardDefines SequentVersionDefines -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion -DANSICPP -DDYNIX_C2 -DMetroLink
+#define StandardCppDefines StandardDefines -D_SOCKET_VERSION=11 -DUnixCpp
+
+#ifdef ProjectRoot
+#define ManDirectoryRoot ProjectRoot/**//catman
+#else
+#define ManDirectoryRoot SystemManDirectory
+#endif
+#define XmanSearchPath ManDirectoryRoot /* for X11R5 xman */
+
+/*
+ * Sequent configuration environment specific to building X11 and Motif.
+ * This environment is only available when UseInstalled is not defined.
+ * Therefore this environment is not used by customers using xmkmf.
+ */
+
+#ifndef UseInstalled
+
+/* Product builds using local X11 and Motif trees */
+
+/*
+ * Provide libraries needed by nonX programs in the X11 build tree.
+ * These are not standard so the customer will be forced to add them to their
+ * Imakefile SYS_LIBRARIES if needed. An ABI program may not want or need them,
+ * so we do not include them in the ExtraLibraries provided to customers
+ * when UseInstalled is defined. We add them here as a convenience when
+ * building the entire X11 tree (at Sequent or the contractor).
+ */
+#undef ExtraLibraries
+#define ExtraLibraries -lsocket -lnsl
+
+/*
+ * Sequent builds X11 and Motif in the same tree.
+ * The Motif project files include the X11 project files.
+ *
+ * Later we may use the Local project files similer the the lynx.cf
+ *
+ * #define LocalTmplFile <Motif.tmpl>
+ * #define LocalRulesFile <Motif.rules>
+ */
+
+/* Try the Metro Link method. */
+
+#ifndef MetroLink
+#undef ProjectTmplFile
+#define ProjectTmplFile <Motif.tmpl>
+#undef ProjectRulesFile
+#define ProjectRulesFile <Motif.rules>
+#endif
+
+/*
+ * Later change to Metro Link directory layout,
+ * or allow $(TOP)/../motif21
+ */
+
+/* Try the Metro Link method. */
+
+#ifndef MetroLink
+#define MTop $(TOP)/motif21
+#endif
+
+/*
+ * Set the Program macros to be correct for the target machine.
+ * This will avoid using any crosstools as hardwired strings
+ * built into binaries that will run on the target machine.
+ *
+ * These macro names need to be ported from X11R5 to X11R6.
+ */
+#define ArProgramBase ar
+#define CppProgram /lib/cpp
+#define CcProgram cc
+#define RanlibProgram ranlib
+
+/*
+ * Build all the X11 debug libaries *_d.a for use by Sequent Service
+ */
+
+/*
+ * Set DebugLibDefault YES for Sequent to build all debug libs.
+ * If we move this to generic code to *.tmpl files,
+ * use the default code below that sets the default NO
+ */
+
+#define DebugLibDefault NO
+
+#ifndef DebugLibDefault
+#define DebugLibDefault NO
+#endif
+
+#define DebugLibX11 DebugLibDefault /* debugged X library */
+#define DebugLibXext DebugLibDefault /* debugged Xext library */
+#define DebugLibXau DebugLibDefault /* debugged auth library */
+#define DebugLibXdmcp DebugLibDefault /* debugged XDMCP library */
+#define DebugLibXmu DebugLibDefault /* debugged Xmu library */
+#define DebugLibXp DebugLibDefault /* debugged Xp library */
+#define DebugLibXt DebugLibDefault /* debugged toolkit library */
+#define DebugLibXa DebugLibDefault /* debugged audio library */
+#define DebugLibXaw DebugLibDefault /* debugged widget library */
+#define DebugLibXi DebugLibDefault /* debugged Xi library */
+#define DebugLibXtst DebugLibDefault /* debugged Xtst library */
+#define DebugLibICE DebugLibDefault /* debugged ICE library */
+#define DebugLibSM DebugLibDefault /* debugged SM library */
+#define DebugLibXkey DebugLibDefault /* debugged Xkey library */
+#define DebugLibFS DebugLibDefault /* debugged FS library */
+
+/*
+ * Build all the Motif debug libaries *_d.a for use by Service
+ */
+#define DebugLibXm DebugLibDefault
+#define DebugLibMrm DebugLibDefault
+#define DebugLibUil DebugLibDefault
+
+/*
+ * Build all the Adobe DPS debug libaries *_d.a for use by Service
+ */
+#define DebugLibDps DebugLibDefault
+
+#endif /* ! UseInstalled */
+
+/*
+ * Sequent general make macros.
+ * X11R6.5 should migrate these to Imake.tmpl.
+ */
+
+XCOMM Sequent general make macros.
+
+#ifndef PackCmd
+#define PackCmd pack
+#endif
+ PACK = PackCmd
+
+/*
+ * Sequent unique make macros. These will always be unique to Sequent.
+ * We introduce them here in sequent.cf since cpp macros are set in sequent.cf.
+ * We may later move them to sequentLib.tmpl.
+ */
+
+XCOMM Sequent unique make macros.
+
+ ADMINBASEDIR = AdminBaseDir
+ MESSAGECATDIR = MessageCatDir
+
+/*
+ * DPS default values (unique to sequent)
+ */
+#ifndef PswrapCmd
+#define PswrapCmd pswrap
+#endif
+
+#ifdef UseHidesymsLists
+
+#ifndef HidesymsCmd
+#define HidesymsCmd /usr/lib/hidesyms/hidesyms
+#endif
+#ifndef HsAcppCmd
+#define HsAcppCmd /lib/acpp
+#endif
+/*
+ * When building in the X11 tree.
+ * For shared libs, hidesyms executes in a subdir.
+ * For unshared libs, hidesyms executes in a subsubdir.
+ * Therefore we add both of these to the acpp path:
+ * ../../$(BUILDINCROOT)/lib/hidesyms:../$(BUILDINCROOT)/lib/hidesyms
+ */
+#ifndef HsAcppLocalPath
+# define HsAcppLocalPath ../../$(BUILDINCROOT)/lib/hidesyms:../$(BUILDINCROOT)/lib/hidesyms
+#endif
+#ifndef HsAcppSystemPath
+# define HsAcppSystemPath /usr/lib/hidesyms
+#endif
+#ifndef HsAcppPath
+# ifdef UseInstalled
+# define HsAcppPath HsAcppSystemPath
+# else
+# define HsAcppPath HsAcppLocalPath:HsAcppSystemPath
+# endif /* UseInstalled */
+#endif
+/*
+ * note: -DABI_SHARED_OBJECT requires a temporary fix added to
+ * Xt/Error.c to provide missing _abi_* routines not in libc.so.1.
+ * When the base adds those missing _abi_* to libc.so.1,
+ * then the code in Xt/Error.c can be removed and the corresponding
+ * symbols added to Xt/libXt.hs can be removed.
+ */
+#ifndef HsAcppDefines
+#define HsAcppDefines -DABI_SHARED_OBJECT -D_SOCKET_VERSION=11 $(THREADS_DEFINES)
+#endif
+
+/*
+ * For shared libs, hidesyms executes in a subdir,
+ * therefore we add a -L../$(BUILDLIBDIR)
+ */
+#ifndef LdPreLib
+#ifndef UseInstalled
+#define LdPreLib -L$(BUILDLIBDIR) -L../$(BUILDLIBDIR)
+#endif
+#endif
+
+XCOMM HIDESYMS is for filtering system library symbols.
+
+ HIDESYMS = HidesymsCmd
+ HSACPPPATH = HsAcppPath
+ HSACPPCMD = HsAcppCmd
+ HSACPPDEFINES = HsAcppDefines
+ HSACPP = $(HSACPPCMD) -Y $(HSACPPPATH) $(HSACPPDEFINES)
+ HSCMD = $(HIDESYMS) -z -p "$(HSACPP)"
+
+#endif /* UseHidesymsLists */
+
+#if OSMajorVersion >= 4
+#include <xorg.cf>
+#include <sequentLib.rules> /* include after macros, before Motif.rules */
+#endif /* OSMajorVersion >= 4 */
diff --git a/nx-X11/config/cf/sequentLib.rules b/nx-X11/config/cf/sequentLib.rules
new file mode 100644
index 000000000..7f77e3feb
--- /dev/null
+++ b/nx-X11/config/cf/sequentLib.rules
@@ -0,0 +1,323 @@
+XCOMM $Xorg: sequentLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*
+ * SVR4 shared library rules
+ */
+
+#ifndef HasSharedLibraries
+# define HasSharedLibraries YES
+#endif
+#ifndef SharedDataSeparation
+# define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+# define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+# define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+# define ShLibIncludeFile <sequentLib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+/* Sequent may need to implement the X11R5 HasMultipleSockets ? */
+# if HasMultipleSockets
+# define SharedLibraryLoadFlags -G -z text $(DEFAULTSOCKETLDOPTIONS)
+# define ExtraLoadOptions $(DEFAULTSOCKETLDOPTIONS)
+# else
+/* # define SharedLibraryLoadFlags -G -z text */
+# define SharedLibraryLoadFlags -G
+# define ExtraLoadOptions
+# endif
+#endif
+#ifndef PositionIndependentCFlags
+# if HasGcc2
+# define PositionIndependentCFlags -fpic
+# else
+# define PositionIndependentCFlags -K PIC
+# endif
+#endif
+#ifndef PositionIndependentCplusplusFlags
+# if HasGcc2ForCplusplus
+# define PositionIndependentCplusplusFlags -fpic
+# else
+# define PositionIndependentCplusplusFlags -K PIC
+# endif
+#endif
+#ifndef UseExportLists
+# define UseExportLists NO
+#endif
+#ifndef UseHidesymsLists
+# define UseHidesymsLists NO
+#endif
+
+#if UseHidesymsLists
+
+#ifndef BuildHidesyms
+#define BuildHidesyms(libname) @@\
+includes:: @@\
+ MakeDir($(BUILDLIBDIR)/hidesyms) @@\
+ @( if [ -f Concat(lib,libname.hs) ]; \ @@\
+ then \ @@\
+ (set -x; cd $(BUILDLIBDIR)/hidesyms && \ @@\
+ RemoveFile(Concat(lib,libname.hs)) && \ @@\
+ $(LN) $(BUILDLIBTOP)/../$(CURRENT_DIR)/Concat(lib,libname.hs) .); \ @@\
+ fi; )
+#endif /* BuildHidesyms */
+
+/*
+ * InstallHidesyms - install library hidesyms directive file. (Sequent only)
+ * Logic cloned from InstallNonExecFile.
+ * We do not list the hidesyms directive file as a dependency since it
+ * may not exist.
+ */
+#ifndef InstallHidesyms
+#define InstallHidesyms(libname) @@\
+install:: @@\
+ MakeDir($(DESTDIR)/usr/lib/hidesyms) @@\
+ @( if [ -f Concat(lib,libname.hs) ]; then \ @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTDATFLAGS) Concat(lib,libname.hs) $(DESTDIR)/usr/lib/hidesyms; fi; )
+#endif /* InstallHidesyms */
+
+/*
+ * InstallLibrary - generate rules to install the indicated library.
+ *
+ * Sequent includes an extra "install::" target to install hidesyms files
+ * and an extra "includes::" target to export library hidesyms files.
+ * Therefore whenever InstallLibrary is expanded the hidesyms targets
+ * will also be expanded. This avoids changes to generic cf *.tmpl files.
+ */
+#ifndef InstallLibrary
+#define InstallLibrary(libname,dest) @@\
+install:: LibraryTargetName(libname) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) LibraryTargetName(libname) $(DESTDIR)dest @@\
+ RanLibrary($(RANLIBINSTFLAGS) $(DESTDIR)dest/LibraryTargetName(libname)) @@\
+ @@\
+InstallHidesyms(libname) @@\
+ @@\
+BuildHidesyms(libname)
+#endif /* InstallLibrary */
+
+/*
+ * Sequent additions to MakeLibrary for filtering objects
+ * with hidesyms before making a normal archive library.
+ */
+
+#ifndef MakeLibrary
+#define MakeLibrary(libname,objlist) ( $(RM) -r tmp_hs ; \ @@\
+ LIBNAME_HS=`dirname libname`/`basename libname .a`.hs ; \ @@\
+ (if [ -f $$LIBNAME_HS ]; \ @@\
+ then \ @@\
+ LIBNAME_AR=../libname; \ @@\
+ $(MKDIRHIER) tmp_hs && \ @@\
+ $(CP) *.o tmp_hs && \ @@\
+ cd tmp_hs && \ @@\
+ $(HSCMD) -i ../$$LIBNAME_HS *.o ; \ @@\
+ else \ @@\
+ LIBNAME_AR=libname; \ @@\
+ fi; \ @@\
+ $(AR) $$LIBNAME_AR objlist ) ;\ @@\
+ $(RM) -r tmp_hs )
+#endif
+
+#endif /* UseHidesymsLists */
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+# define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTSHLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\
+ $(LN) Concat(lib,libname.so.rev) Concat($(DESTDIR)dest/lib,libname.so)
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+# define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+#ifndef LinkWithExports
+# if UseHidesymsLists
+# define LinkWithExports(libname,rev,solist,down,up) \
+ $(RM) -r tmp_hs @@\
+ ( if [ -f Concat(lib,libname.hs) ]; \ @@\
+ then \ @@\
+ LIBNAME_SO=../$@~; \ @@\
+ mkdir tmp_hs; \ @@\
+ cd down; \ @@\
+ $(CP) *.o up/tmp_hs && \ @@\
+ cd up/tmp_hs && \ @@\
+ $(HSCMD) -i ../Concat(lib,libname.hs) *.o; \ @@\
+ else \ @@\
+ LIBNAME_SO=up/$@~; \ @@\
+ cd down; \ @@\
+ fi; \ @@\
+ $(CCENVSETUP) $(LD) -o $$LIBNAME_SO $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS) ) @@\
+ $(RM) -r tmp_hs
+# else
+# if UseExportLists
+# define LinkWithExports(libname,rev,solist,down,up) \
+ (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS)) @@\
+ if [ -f Concat(lib,libname.elist) ]; then \ @@\
+ $(RM) down/$@.exports $@.list; \ @@\
+ $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic >$@.list; \ @@\
+ $(EXPORTLISTGEN) $@~ $@.list > down/$@.exports; \ @@\
+ (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -h $@ ShlibExportListOpt($@.exports) solist $(REQUIREDLIBS)); \ @@\
+ $(RM) down/$@.exports $@.list; \ @@\
+ fi;
+# else
+# define LinkWithExports(libname,rev,solist,down,up) \
+ (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS))
+# endif /* UseExportLists */
+# endif /* UseHidesymsLists */
+#endif
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+# define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ LinkWithExports(libname,rev,solist,down,up) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+# define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
+
+/*
+ * Sequent does not use the InstallManPageAliases rule.
+ * Sequent customer installation procedure uses makealiases(1M)
+ * after the initial product manpages are installed in system directories.
+ */
+#define InstallManPageAliases(file,destdir,aliases) /* use makealiases(1M) */
+
+/*
+ * Man pages need to be formatted when installed, so override the default
+ * imake rules.
+ */
+#if defined(UseInstalled)
+MANCAT = cat
+#else
+MANCAT = sed -f $(CONFIGSRC)/util/installman.sed
+#endif
+
+#define InstallManPageLong(file,destdir,dest) @@\
+all:: file.$(MANSUFFIX).z @@\
+ @@\
+file.$(MANSUFFIX).z:: file.man @@\
+ @if [ -f file.man ]; \ @@\
+ then \ @@\
+ $(MANCAT) file.man | $(NEQN) | \ @@\
+ $(TBL) | $(NROFF) $(MANMACROS) | $(COL) > file.$(MANSUFFIX); \ @@\
+ $(RM) file.$(MANSUFFIX).z; \ @@\
+ $(PACK) -f file.$(MANSUFFIX); \ @@\
+ fi @@\
+ @@\
+file.man:: @@\
+ @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ @if [ -f file.$(MANSUFFIX).z ]; \ @@\
+ then \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.$(MANSUFFIX).z $(DESTDIR)destdir/dest.$(MANSUFFIX).z; \@@\
+ fi
+
+#define InstallMultipleManSuffix(list,dest,suff) @@\
+install.man:: @@\
+ MakeDir($(DESTDIR)dest) @@\
+ MakeFlagsToShellFlags(i,set +e); \ @@\
+ @for i in list; do \ @@\
+ (set -x; \ @@\
+ $(MANCAT) $$i.suff | $(NEQN) | \ @@\
+ $(TBL) | $(NROFF) $(MANMACROS) | $(COL) >/tmp/$$i.suff; \ @@\
+ $(PACK) -f /tmp/$$i.suff; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/$$i.suff.z $(DESTDIR)dest/$$i.$(MANSUFFIX).z; \ @@\
+ $(RM) /tmp/$$i.suff.z); \ @@\
+ done
+
+#define InstallMultipleMan(list,dest) @@\
+ InstallMultipleManSuffix(list,dest,man)
+
+/*
+ * InstallMotifManPage relies on the fact that all the
+ * Imakefiles where it is used (or Makefile default value)
+ * will correctly define MANSUFFIX which may be
+ * either "section" or "section"x.
+ * Since we rely on MANSUFFIX being defined correctly in each Makefile
+ * we can also rely on MANDIR = $(MANSOURCEPATH)section
+ *
+ * CAUTION:
+ * The source file "file.section" may have the same name as
+ * the target file "file.$(MANSUFFIX)" so we must use temporary files
+ * so that we do not overwrite "file.section".
+ */
+#define InstallMotifManPage(file,section) @@\
+all:: file.$(MANSUFFIX).z @@\
+ @@\
+file.$(MANSUFFIX).z: file.section @@\
+ @$(MANCAT) file.section | $(NEQN) | \ @@\
+ $(TBL) | $(NROFF) $(MANMACROS) | $(COL) > /tmp/file.man; \ @@\
+ $(RM) /tmp/file.man.z; \ @@\
+ $(PACK) -f /tmp/file.man; \ @@\
+ $(CP) /tmp/file.man.z file.$(MANSUFFIX).z; \ @@\
+ $(RM) /tmp/file.man.z @@\
+ @@\
+install.man:: file.$(MANSUFFIX).z @@\
+ MakeDir($(DESTDIR)$(MANDIR)) @@\
+ $(INSTALL) -c $(INSTMANFLAGS) file.$(MANSUFFIX).z $(DESTDIR)$(MANDIR)/file.$(MANSUFFIX).z
+
+/*
+ * The Real_MessageCatalogRule defined in Motif.rules does not
+ * install the generated catalog file. This rule adds an install
+ * clause to do that.
+ */
+#define Real_MessageCatalogRule(prefix) @@\
+prefix.cat Concat(prefix,MsgCatI.h): @@\
+ $(RM) Concat(prefix,MsgCatI.h) prefix.cat $(MLOCSRC)/C/msg/prefix.msg @@\
+ $(MKCATTOOL) Concat(prefix,MsgCatI.h) prefix.msg > $(MLOCSRC)/C/msg/prefix.msg @@\
+ $(GENCAT) prefix.cat $(MLOCSRC)/C/msg/prefix.msg @@\
+ @@\
+includes:: prefix.cat Concat(prefix,MsgCatI.h) @@\
+ @@\
+depend:: prefix.cat Concat(prefix,MsgCatI.h) @@\
+ @@\
+all:: prefix.cat @@\
+ @@\
+install:: prefix.cat @@\
+ MakeDir($(DESTDIR)$(MESSAGECATDIR)) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) prefix.cat $(DESTDIR)$(MESSAGECATDIR)/prefix.cat @@\
+ $(RM) $(DESTDIR)$(MESSAGECATDIR)/prefix @@\
+ $(LN) prefix.cat $(DESTDIR)$(MESSAGECATDIR)/prefix @@\
+ MakeDir($(DESTDIR)$(NLSDIR)) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) prefix.cat $(DESTDIR)$(NLSDIR)/prefix.cat @@\
+ $(RM) $(DESTDIR)$(NLSDIR)/prefix @@\
+ $(LN) prefix.cat $(DESTDIR)$(NLSDIR)/prefix @@\
+ @@\
+clean:: @@\
+ $(RM) prefix.cat Concat(prefix,MsgCatI.h)
+
diff --git a/nx-X11/config/cf/sgi.cf b/nx-X11/config/cf/sgi.cf
new file mode 100644
index 000000000..70e727c60
--- /dev/null
+++ b/nx-X11/config/cf/sgi.cf
@@ -0,0 +1,318 @@
+XCOMM platform: $Xorg: sgi.cf,v 1.4 2000/08/17 19:41:48 cpqbld Exp $
+XCOMM $XFree86: xc/config/cf/sgi.cf,v 1.12tsi Exp $
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+#if OSMajorVersion < 4
+/* We do not guarantee this will work */
+#define BootstrapCFlags -DX_WCHAR -DX_LOCALE -DX_USEBFUNCS -DSYSV
+#define StandardDefines -DX_WCHAR -DX_LOCALE -DX_USEBFUNCS -DSYSV
+#define SetTtyGroup NO
+#else
+#define HasPlugin YES
+#define SetTtyGroup YES
+#define ExtraFilesToClean so_locations
+#endif
+
+#if OSMajorVersion < 5
+#define SystemV YES
+#define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#else
+#define BootstrapCFlags -DSVR4
+#define StandardDefines -DSVR4
+#define SystemV4 YES
+#define HasWChar32 YES
+#define HasVFork NO
+#if OSMajorVersion < 6
+#define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
+#else
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
+#define HasSetenv NO
+#define HasSnprintf YES
+#endif
+#define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+#ifndef ExtraLoadFlags
+#define ExtraLoadFlags -Wl,-rpath,$(USRLIBDIRPATH)
+#endif
+#endif
+
+/*
+ * To build 64-bit binaries define Mips64Architecture in your site.def or
+ * host.def file. This is usually on done at the X Consortium to test
+ * big endian 64-bit cleanliness.
+ * To build 32-bit binaries using the old 32-bit mode, define
+ * NoMipsN32Archtecture in your site.def or host.def file.
+ * Otherwise the default is to use the "new 32" mode as requested by SGI.
+ */
+#ifndef MipsN32Architecture
+#if !defined(Mips64Architecture) && !defined(NoMipsN32Architecture)
+#define MipsN32Architecture YES
+#endif
+#endif
+
+#ifdef Mips64Architecture
+# define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARY64_PATH
+# define SystemBuildLibPath /usr/lib64:/lib64
+# define LdCmd ld -64
+# define AsCmd as -64
+#elif defined(MipsN32Architecture)
+# define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARYN32_PATH
+# define SystemBuildLibPath /usr/lib32:/lib32
+# define LdCmd ld -n32
+# define AsCmd as -n32
+#else
+# define BuildLibPathVar _RLD_ROOT=/dev/null LD_LIBRARY_PATH
+# define SystemBuildLibPath /usr/lib:/lib
+# define LdCmd ld -32
+# define AsCmd as -32
+#endif
+#define HasCplusplus YES
+#define Malloc0ReturnsNull YES /* IRIX [56].x -lmalloc needs this */
+#define HasPutenv YES
+#define ExecableScripts YES
+#define HasNdbm YES
+#define HasPoll YES
+#define ExpandManNames YES
+#define LexLib /* Not needed */
+#ifndef BuildXInputExt
+#define BuildXInputExt YES
+#endif
+
+#if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion > 2)
+#define NeedVarargsPrototypes YES
+#define NeedConstPrototypes YES
+#define NeedWidePrototypes NO
+#endif
+
+#include <sgiLib.rules>
+
+#if OSMajorVersion < 5
+#define SymbolTables -Wf,-XNp16000,-XNd16000,-XNh2000
+#define ServerSymbolTables -Wf,-XNp8000,-XNh2000,-XNd8000
+#else
+#define SymbolTables
+#define ServerSymbolTables
+#endif
+
+/* this is for floating point, ANSI cpp */
+#if OSMajorVersion < 5
+/* Extra libraries provide : yp, sysV malloc, shared libc, and widechar */
+# define ExtraLibraries -lsun -lmalloc -lc_s -lw
+# define sgiCCOptions -xansi -D__STDC__=1 -float
+#else
+# if OSMajorVersion < 6
+# define sgiCCOptions -xansi
+# else
+# define CppCmd cc -E -cckr
+# ifdef Mips64Architecture
+/* set Mips64Architecture in host.def. Usually don't need it but we
+ * (the X Consortium) want a 64-bit big-endian machine to test on. */
+# define sgiCCOptions -xansi -mips3 -64
+# define DlLibrary /**/
+# elif defined(MipsN32Architecture)
+/* Set MipsN32Architecture to build "new" 32-bit objs with a 32-bit kernel. */
+# define sgiCCOptions -xansi -mips3 -n32
+# else
+# define sgiCCOptions -xansi -32
+# endif
+# if OSMinorVersion == 2
+/* if you haven't installed patch 1361, 1403, or 1645 on IRIX 6.2 then you
+ * must add "#define HasPosixThreads NO" in your site.def or host.def file
+ */
+# ifndef HasPosixThreads
+# define HasPosixThreads YES
+# endif
+# define ThreadedX HasPosixThreads
+# define ThreadsLibraries -lpthread
+/*
+ * Add "#define HasSgiThreadsPatch1403 YES" to your site.def or host.def if
+ * that's which patch you have.
+ */
+# ifndef HasSgiThreadsPatch1403
+# define HasSgiThreadsPatch1403 NO
+# endif
+# if (HasSgiThreadsPatch1403)
+# define SystemMTDefines -D_POSIX_THREAD_SAFE_FUNCTIONS
+# endif
+# endif
+# endif
+/* SGI's -lsocket -lnsl is broken, at least in 5.2, so override here */
+# define ExtraLibraries /**/
+#endif
+
+/* IRIX 6.5 doesn't support IPv6, but #define's AF_INET6. Go figure... */
+#ifndef BuildIPv6
+#define BuildIPv6 NO
+#endif
+
+#undef BuildXF86DRI
+#define BuildXF86DRI NO
+
+#if !HasGcc
+#if !defined(OptimizedCDebugFlags)
+#if defined(MipsN32Architecture) || defined(Mips64Architecture)
+#define OptimizedCDebugFlags -O -OPT:Olimit=0
+#else
+#define OptimizedCDebugFlags -O -Olimit 2048
+#endif
+#endif
+#if !defined(RawCppCmd)
+#define RawCppCmd CppCmd
+#endif
+#endif
+
+#ifndef DefaultCCOptions
+#define DefaultCCOptions sgiCCOptions SymbolTables
+#endif
+#ifndef ServerCCOptions
+#define ServerCCOptions sgiCCOptions ServerSymbolTables
+#endif
+#ifndef DefaultCplusplusOptions
+#define DefaultCplusplusOptions DefaultCCOptions
+#endif
+
+/* For SGI C++ compiler, need to search extra dirs in make depend */
+#ifndef CplusplusDependIncludes
+#define CplusplusDependIncludes -I/usr/include/CC
+#endif
+
+/* At SGI, we don't need this */
+#define ConstructMFLAGS NO /* build MFLAGS from MAKEFLAGS */
+
+/* Used only for compressed fonts */
+#define UNCOMPRESSPATH /usr/bsd/uncompress /* obsolete */
+
+/* Normally used only to conditionally chose the default font path order */
+#define PrimaryScreenResolution 96
+
+/* Override Imake.tmpl's "-X" flag */
+#define LdCombineFlags -r
+
+/* Installation Build Parameters */
+#define InstKmemFlags -m 2711 -g sys
+
+#define ArCmd ar scq
+
+/* for xdm or anyone else to use */
+#define DefaultUserPath :/usr/sbin:/usr/bsd:/usr/bin:/bin:$(BINDIR):/etc:/usr/etc
+#define DefaultSystemPath /usr/sbin:/usr/bsd:/bin:/etc:/usr/bin:/usr/etc:$(BINDIR)
+
+#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
+
+#ifndef ServerExtraDefines
+#ifndef Mips64Architecture
+#define ServerExtraDefines -DNEED_LINEHELPER AllocateLocalDefines \
+ XFree86ServerDefines
+#else
+#define ServerExtraDefines -DNEED_LINEHELPER AllocateLocalDefines \
+ XFree86ServerDefines -D_XSERVER64
+#endif
+#endif
+
+/* Changed to a single shell command for pmake/smake */
+#if OSMajorVersion < 5
+/*
+ * NormalLibObjCompile - compile fragment for a library object file
+ * do ld -x to remove line number symbols for libraries
+ */
+#define NormalLibObjCompile(options) ClearmakeOSName \
+ $(RM) $@ $*.os \ @@\
+ && $(CC) -c options $(CFLAGS) $*.c \ @@\
+ && $(LD) $(LDSTRIPFLAGS) -r $@ -o $*.os \ @@\
+ && $(MV) $*.os $@
+#endif
+
+#define LibObjCompile(dir,options) ClearmakeOSName \
+ $(RM) $@ dir/$@ \ @@\
+ && $(CC) -c $(CCOPTIONS) $(ALLDEFINES) options $*.c \ @@\
+ && $(MV) $@ dir/$@
+
+#ifndef HasMakefileSafeInclude
+#define HasMakefileSafeInclude YES
+#endif
+#ifndef IncludeMakefile
+#define IncludeMakefile(file) @@sinclude file
+#endif
+
+/* needs to find nroff on the system to work */
+#ifndef ManKeywordsTarget
+#define ManKeywordsTarget(manpath) @@\
+man_keywords:: @@\
+ /usr/lib/makewhatis -M $(DESTDIR)manpath $(DESTDIR)manpath/whatis
+#endif
+
+#define MotifDefines -DSYS_DIR -DPORT_NOVFORK -DNO_REGCOMP
+
+#if !defined(HasGcc) || !HasGcc
+
+#ifndef CppFileTarget
+#define CppFileTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(CPP) CppNoLineInfoOption defs src 2>/dev/null | CppSedMagic >$@; @@\
+ @@\
+clean:: @@\
+ RemoveFiles(dst)
+#endif /* CppFileTarget */
+
+#ifndef CppScriptTarget
+#if ExecableScripts /* can use #! instead of colon */
+#define CppScriptTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(CPP) CppNoLineInfoOption defs src | CppSedMagic >$@ @@\
+ chmod a+x $@ @@\
+ @@\
+clean:: @@\
+ RemoveFiles(dst)
+#else
+#define CppScriptTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \
+ echo \: >$@ @@\
+ sed '1d' src | $(CPP) CppNoLineInfoOption defs | CppSedMagic >>$@ @@\
+ chmod a+x $@ @@\
+ @@\
+clean:: @@\
+ RemoveFile(dst)
+#endif /* ExecableScripts */
+#endif /* CppScriptTarget */
+
+/* Like CppFileTarget, but don't add any default defines */
+#ifndef CppRawFileTarget
+#define CppRawFileTarget(dst,src,defs,deplist) @@\
+dst:: src deplist @@\
+ RemoveFile($@) @@\
+ ClearmakeOSName \
+ $(RAWCPP) CppNoLineInfoOption defs src | CppSedMagic >$@ @@\
+ @@\
+clean:: @@\
+ RemoveFiles(dst)
+#endif /* CppFileTarget */
+
+#endif /* !HasGcc */
+
+#ifndef DoLoadableServer
+#define DoLoadableServer YES
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+#include <xorg.cf>
diff --git a/nx-X11/config/cf/sgiLib.rules b/nx-X11/config/cf/sgiLib.rules
new file mode 100644
index 000000000..2d5cd7dfd
--- /dev/null
+++ b/nx-X11/config/cf/sgiLib.rules
@@ -0,0 +1,204 @@
+XCOMM $Xorg: sgiLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+XCOMM $XFree86: xc/config/cf/sgiLib.rules,v 1.3 2000/06/15 20:49:56 dawes Exp $
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+#if OSMajorVersion < 5
+#ifndef SharedDataSeparation
+#define SharedDataSeparation YES
+#endif
+#define SharedCodeDef -DSHAREDCODE
+#define SharedLibraryDef -DATTSHAREDLIB
+#define PositionIndependentCFlags -G 0
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we don't hose people by having
+ * the library gone for long periods.
+ */
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat3(lib,libname,_s)) @@\
+ @@\
+Concat3(lib,libname,_s): sharedlib.o solist Concat(lib,libname.spec) $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@ $@.a \ @@\
+ && cd down \ @@\
+ && mkshlib -s Concat(up/lib,libname.spec) -t up/$@ -h up/$@.a \ @@\
+ && ar rs up/$@.a sharedlib.o @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary($@.a) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat3(lib,libname,_s) Concat3(lib,libname,_s.a)
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat3(lib,libname,_s)) @@\
+ @@\
+Concat3(lib,libname,_s): deplist sharedlib.o Concat(lib,libname.spec) $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@ $@.a \ @@\
+ && cd down \ @@\
+ && mkshlib -s Concat(up/lib,libname.spec) -t up/$@ -h up/$@.a \ @@\
+ && ar rs up/$@.a sharedlib.o @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary($@.a) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat3(lib,libname,_s) Concat3(lib,libname,_s.a)
+
+#define SharedLibraryDataTarget(libname,rev,salist)
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ * NOTE: file must be executable, hence "INSTBINFLAGS"
+ */
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat3(lib,libname,_s) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTBINFLAGS) Concat3(lib,libname,_s) $(DESTDIR)dest
+
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#define InstallSharedLibraryData(libname,rev,dest) @@\
+InstallTarget(install,Concat3(lib,libname,_s.a),$(INSTLIBFLAGS),dest)
+
+#else /* OSMajorVersion >= 5 */
+
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <sgiLib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#if OSMajorVersion < 6
+#define SharedLibraryLoadFlags -shared
+#else
+#ifndef Mips64Architecture
+#define SharedLibraryLoadFlags -shared
+#else
+#define SharedLibraryLoadFlags -shared -mips3
+#endif
+#endif
+#endif
+/* -KPIC is redundant, PIC is always used unless you specify -non_shared */
+#ifndef PositionIndependentCFlags
+#define PositionIndependentCFlags -KPIC
+#endif
+#ifndef PositionIndependentCplusplusFlags
+#define PositionIndependentCplusplusFlags -KPIC
+#endif
+
+/*
+ * SGI's cc passes an undocumented flag to ld that causes it to look for
+ * -lX11 and force use of libX11.so.1. And it can't be turned off. Sigh.
+ * So we install one of those, too, in the shared library install target.
+ */
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so) @@\
+ cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so) @@\
+ if [ "libname" = X11 ]; then \ @@\
+ RemoveFile(Concat($(DESTDIR)dest/lib,libname.so.1)); \ @@\
+ cd $(DESTDIR)dest; $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so.1);\ @@\
+ fi
+
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+
+/*
+ * SGI's cc passes an undocumented flag to ld that causes it to look for
+ * -lX11 and force use of libX11.so.1. Sigh. So we make one of those, too,
+ * in the shared library build target.
+ */
+
+#ifndef sgiX11soHack
+#ifdef UseInstalled
+#define sgiX11soHack(libname) /**/
+#else
+#define sgiX11soHack(libname) if [ "libname" = X11 ]; then \ @@\
+ RemoveFile($(BUILDLIBDIR)/Concat(lib,libname.so.1)); \ @@\
+ cd $(BUILDLIBDIR); $(LN) $(BUILDINCTOP)/$(CURRENT_DIR)/$@ Concat(lib,libname.so.1); \ @@\
+ fi
+#endif
+#endif /* sgiX11soHack */
+
+#ifndef SharedLibraryTarget
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -soname $@ solist $(REQUIREDLIBS)) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ sgiX11soHack(libname) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) so_locations
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
+
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(CCENVSETUP) $(LD) -o up/$@~ $(SHLIBLDFLAGS) -soname $@ solist $(REQUIREDLIBS)) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ $(RM) Concat(lib,libname.so) @@\
+ $(LN) $@ Concat(lib,libname.so) @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibrary(Concat(lib,libname.so)) @@\
+ sgiX11soHack(libname) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so) so_locations
+
+#endif /* SharedDepLibraryTarget */
+
+#endif /* OsMajorVersion < 5 else */
diff --git a/nx-X11/config/cf/sgiLib.tmpl b/nx-X11/config/cf/sgiLib.tmpl
new file mode 100644
index 000000000..7ef4f1494
--- /dev/null
+++ b/nx-X11/config/cf/sgiLib.tmpl
@@ -0,0 +1,18 @@
+XCOMM $Xorg: sgiLib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+
+XCOMM $XFree86: xc/config/cf/sgiLib.tmpl,v 3.3tsi Exp $
+
+/*
+ * SGI shared library template
+ */
+#define SharedXtReqs $(LDPRELIBS) $(XONLYLIB) -delay_load $(SMLIB) -delay_load $(ICELIB)
+#define SharedXmuReqs $(LDPRELIBS) $(XTOOLONLYLIB)
+#define SharedXpReqs $(LDPRELIBS) $(XLIB)
+
+#define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB) -lgen
+#define SharedXmReqs $(LDPRELIBS) SharedXReqs
+#define SharedMrmReqs $(LDPRELIBS) $(XMLIB) SharedXReqs
+#define SharedUilReqs $(LDPRELIBS) $(MRESOURCELIB) $(XMLIB) SharedXReqs
diff --git a/nx-X11/config/cf/site.def b/nx-X11/config/cf/site.def
new file mode 100644
index 000000000..2d8c4ba48
--- /dev/null
+++ b/nx-X11/config/cf/site.def
@@ -0,0 +1,148 @@
+XCOMM site: $TOG: site.sample /main/r64_final/1 1998/02/05 16:28:49 kaleb $
+
+/***************************************************************************
+ * *
+ * SITE-SPECIFIC DEFINITIONS *
+ * *
+ * This file contains two halves, one included before the vendor-specific *
+ * configuration file (.cf file), and one included after the .cf file. *
+ * The before-half should be protected by #ifdef BeforeVendorCF, and the *
+ * after-half should be protected by #ifdef AfterVendorCF. *
+ * *
+ * The before-half should only set things that the .cf file depends on. *
+ * For the .cf files shipped in this release, the main variables in this *
+ * category are HasGcc, HasGcc2, HasCplusplus, OSMajorVersion, *
+ * OSMinorVersion, and OSTeenyVersion. *
+ * *
+ * The after-half should contain all other definitions. For example, *
+ * place your ProjectRoot definition here. *
+ * *
+ * OS Major and Minor version numbers should be changed directly in the *
+ * .cf file, not overridden in site.def. *
+ * *
+ ***************************************************************************/
+XCOMM site: $XFree86: xc/config/cf/site.def,v 3.24 2000/06/25 20:17:29 dawes Exp $
+
+/* if you want host-specific customization, this is one way to do it */
+/*
+#ifndef SiteIConfigFiles
+#define SiteIConfigFiles $(IRULESRC)/host.def
+#define LocalConfigFiles host.def
+#endif
+*/
+
+
+#ifdef BeforeVendorCF
+
+/*
+ * Include this for easy XFree86 customisations
+ */
+#ifndef SiteIConfigFiles
+#define SiteIConfigFiles $(IRULESRC)/xorgsite.def $(IRULESRC)/host.def
+#endif
+
+#include <host.def>
+
+#include <xorgsite.def>
+
+/* On systems where cpp doesn't correctly expand macros in include directives
+ * the two following macros need to be defined directly (where "X11" is
+ * really whatever the TopLevelProject macro is defined to be).
+ */
+# if defined(AIXArchitecture) || defined(SVR4Architecture) || \
+ defined(SCOArchitecture) || defined(Win32Architecture) || \
+ defined(UXPArchitecture) || defined(SunArchitecture) || \
+ defined(DynixPtxArchitecture) || defined(i386IscArchitecture)
+# ifndef ProjectRulesFile
+# define ProjectRulesFile <X11.rules>
+# endif
+# ifndef ProjectTmplFile
+# define ProjectTmplFile <X11.tmpl>
+# endif
+# endif
+
+/*
+#ifndef HasGcc2
+#define HasGcc2 YES
+#endif
+*/
+
+#endif /* BeforeVendorCF */
+
+#ifdef AfterVendorCF
+
+#ifndef ProjectRoot
+#define ProjectRoot /usr/X11R6
+#endif
+
+/*
+ * On some platforms, some things may be installed outside of ProjectRoot
+ * by default. To disable this, uncomment the following line.
+ *
+#define NothingOutsideProjectRoot YES
+ */
+
+/*
+ * Set EtcX11Directory if you want config file links installed under
+ * ProjectRoot rather than in /etc/X11. See also HasVarDirectory,
+ * UseEtcX11 and UseSeparateConfDir.
+ *
+#define EtcX11Directory ProjectRoot/etc
+ */
+
+
+/* Only set HasXdmAuth to YES if you have a Wraphelp.c file. */
+/* #define HasXdmAuth YES */
+
+/*
+#if defined(SunArchitecture) && defined(SparcArchitecture)
+#define HasCodeCenter YES
+#ifndef SVR4Architecture
+#define HasTestCenter YES
+#endif
+#endif
+*/
+
+/*
+#ifdef __hp9000s800
+#define HasCodeCenter YES
+#endif
+*/
+
+/*
+#if defined(SunArchitecture) && defined(SparcArchitecture) && !defined(SVR4Architecture)
+#define HasPurify YES
+#endif
+*/
+
+/*
+#define HasSentinel YES
+*/
+
+/*
+#undef DefaultUserPath
+#define DefaultUserPath /bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/local/bin
+*/
+
+
+/* You do NOT need SetUID if you only run the server under xdm */
+/* You MAY need SetUID if users run the server by hand or under xinit */
+/* Consult your system administrator before making the X server setuid */
+/*
+#if defined(SunArchitecture) && OSMajorVersion > 4
+#define InstallXserverSetUID YES
+#endif
+*/
+
+/* You do NOT need SetUID if you only run the server under xdm */
+/* You MAY need SetUID if users run the server by hand or under xinit */
+/* Consult your system administrator before making the X server setuid */
+/*
+#if defined(XFree86Version) || defined (XorgVersion)
+#define InstallXserverSetUID YES
+#endif
+*/
+
+#include <host.def>
+
+#endif /* AfterVendorCF */
diff --git a/nx-X11/config/cf/site.sample b/nx-X11/config/cf/site.sample
new file mode 100644
index 000000000..e712f7dbf
--- /dev/null
+++ b/nx-X11/config/cf/site.sample
@@ -0,0 +1,125 @@
+XCOMM site: $Xorg: site.sample,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/***************************************************************************
+ * *
+ * SITE-SPECIFIC DEFINITIONS *
+ * *
+ * This file contains two halves, one included before the vendor-specific *
+ * configuration file (.cf file), and one included after the .cf file. *
+ * The before-half should be protected by #ifdef BeforeVendorCF, and the *
+ * after-half should be protected by #ifdef AfterVendorCF. *
+ * *
+ * The before-half should only set things that the .cf file depends on. *
+ * For the .cf files shipped in this release, the main variables in this *
+ * category are HasGcc, HasGcc2, HasCplusplus, OSMajorVersion, *
+ * OSMinorVersion, and OSTeenyVersion. *
+ * *
+ * The after-half should contain all other definitions. For example, *
+ * place your ProjectRoot definition here. *
+ * *
+ * OS Major and Minor version numbers should be changed directly in the *
+ * .cf file, not overridden in site.def. *
+ * *
+ ***************************************************************************/
+
+/* if you want host-specific customization, this is one way to do it */
+/*
+#ifndef SiteIConfigFiles
+#define SiteIConfigFiles $(IRULESRC)/host.def
+#define LocalConfigFiles host.def
+#endif
+*/
+
+
+#ifdef BeforeVendorCF
+
+/* #include <host.def> */
+
+/* On systems where cpp doesn't expand correctly macros in include directives
+ * the two following macros need to be defined directly (where "X11" is
+ * really whatever the TopLevelProject macro is defined to be).
+ */
+# if defined(AIXArchitecture) || defined(SVR4Architecture) || \
+ defined(SCOArchitecture) || defined(Win32Architecture) || \
+ defined(UXPArchitecture) || defined(SunArchitecture)
+# ifndef ProjectRulesFile
+# define ProjectRulesFile <X11.rules>
+# endif
+# ifndef ProjectTmplFile
+# define ProjectTmplFile <X11.tmpl>
+# endif
+# endif
+
+/*
+#ifndef HasGcc2
+#define HasGcc2 YES
+#endif
+*/
+
+#endif /* BeforeVendorCF */
+
+#ifdef AfterVendorCF
+
+#define ProjectRoot Concat(/usr/X11R,XORG_VERSION_MAJOR.XORG_VERSION_MINOR)
+
+/* Only set HasXdmAuth to YES if you have a Wraphelp.c file. */
+/* #define HasXdmAuth YES */
+
+/*
+#if defined(SunArchitecture) && defined(SparcArchitecture)
+#define HasCodeCenter YES
+#ifndef SVR4Architecture
+#define HasTestCenter YES
+#endif
+#endif
+*/
+
+/*
+#ifdef __hp9000s800
+#define HasCodeCenter YES
+#endif
+*/
+
+/*
+#if defined(SunArchitecture) && defined(SparcArchitecture) && !defined(SVR4Architecture)
+#define HasPurify YES
+#endif
+*/
+
+/*
+#define HasSentinel YES
+*/
+
+/*
+#undef DefaultUserPath
+#define DefaultUserPath /bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/local/bin
+*/
+
+
+/* You do NOT need SetUID if you only run the server under xdm */
+/* You MAY need SetUID if users run the server by hand or under xinit */
+/* Consult your system administrator before making the X server setuid */
+/*
+#if defined(SunArchitecture) && OSMajorVersion > 4
+#define InstallXserverSetUID YES
+#endif
+*/
+
+/* You do NOT need SetUID if you only run the server under xdm */
+/* You MAY need SetUID if users run the server by hand or under xinit */
+/* Consult your system administrator before making the X server setuid */
+/*
+#if defined(XFree86Version) || defined(XorgVersion)
+#define InstallXserverSetUID YES
+#endif
+*/
+
+#ifndef XnestServer
+#undef BuildServer
+#define BuildServer YES
+#define XnestServer YES
+#endif
+
+/* #include <host.def> */
+
+#endif /* AfterVendorCF */
diff --git a/nx-X11/config/cf/sony.cf b/nx-X11/config/cf/sony.cf
new file mode 100644
index 000000000..014cedcf7
--- /dev/null
+++ b/nx-X11/config/cf/sony.cf
@@ -0,0 +1,100 @@
+XCOMM platform: $Xorg: sony.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+#ifdef SonyBsdArchitecture
+
+#ifndef OSName
+#define OSName NEWS-OS 4.2.1C
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 2
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 1
+#endif
+#define SetTtyGroup YES
+#define HasVoidSignalReturn NO
+#define HasNdbm YES
+#define DirFailPrefix -
+#define InstKmemFlags -g kmem -m 2711
+#define DefaultUserPath :/bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/sony/bin:
+#define DefaultSystemPath /etc:/usr/etc:/bin:/usr/bin:$(BINDIR):/usr/ucb:/usr/sony/bin:
+#ifdef MipsArchitecture
+#define ExtraLibraries -lmld
+#define LintOpts -ax
+#define LintLibFlag -o
+#define DefaultCCOptions -Wf,-XNh2000,-XNd6000,-XNp10000 -Olimit 2000
+#else
+#define HasFortran YES
+#endif
+#if OSMajorVersion >= 4
+#define HasShm YES
+#define HasPutenv YES
+#define HasSecureRPC YES
+#define XdmDir /etc/xdm
+#if OSMinorVersion >= 1
+#define HasBsearch YES
+#else
+#define HasBsearch NO
+#endif
+#else
+#define StandardDefines -DNOSTDHDRS
+#define HasBsearch NO
+#endif
+
+#else
+
+#ifndef OSName
+#define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+#define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+#define BootstrapCFlags -Dsony
+#define SystemV4 YES
+#define HasVFork NO
+#define CcCmd /usr/bin/cc
+#define LdCmd /usr/bin/ld
+#if OSMajorVersion >= 6
+#define DefaultCCOptions -Xa -Wf,-XNp9000,-XNd6000
+#define SharedLibraryLoadFlags -G -rpath $(USRLIBDIRPATH)
+#define PositionIndependentCFlags -K PIC -Wx,-G 0
+#define PositionIndependentCplusplusFlags -K PIC -Wx,-G 0
+#define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB)
+#define FixupLibReferences() /**/
+#include <sv4Lib.rules>
+#else
+#define DefaultCCOptions -Wf,-XNp9000,-XNd6000
+#endif
+
+#endif
+
+/*
+ * SONY C++ compiler is based on vanilla cfront, which means it
+ * refuses to compile files unless their names end in ".C". We
+ * have to completely override .SUFFIXES to avoid using the builtin
+ * .C to .o rule in cases where the link to foo.C is already there,
+ * because the builtin rule doesn't use the right compilation flags.
+ */
+
+.SUFFIXES:
+.SUFFIXES: .o .c .y .l .s .sh .h .f .Y .L .cxx
+
+#define NormalLibObjCplusplusCompile(options) test -r $*.C || $(LN) $*.CCsuf $*.C @@\
+ $(CXX) -c $(CXXFLAGS) options $*.C
+
+XCOMM operating system: OSName
+
+#ifndef BuildServer
+#define BuildServer NO
+#endif
diff --git a/nx-X11/config/cf/sun.cf b/nx-X11/config/cf/sun.cf
new file mode 100644
index 000000000..cc9fbf503
--- /dev/null
+++ b/nx-X11/config/cf/sun.cf
@@ -0,0 +1,966 @@
+XCOMM $XdotOrg: xc/config/cf/sun.cf,v 1.34 2005/12/03 17:20:48 alanc Exp $
+XCOMM platform: $Xorg: sun.cf,v 1.4 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/sun.cf,v 3.70 2004/01/13 02:42:51 tsi Exp $
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+/* For various reasons, Sun uses different settings when compiling the
+ * X Window System packages included in Solaris than are normally used
+ * by most people building the X.Org software releases. Sun also has
+ * two different X server hierarchies in Solaris - Xsun in /usr/openwin
+ * and Xorg in /usr/X11.
+ *
+ * If you want to try to match Sun's settings as closely as possible
+ * add this setting to your host.def:
+ * #define BuildLikeSun YES
+ *
+ * If you're trying to match the openwin directory layout as well, you'll
+ * need to also add:
+ * #define ProjectRoot /usr/openwin
+ * otherwise it will use /usr/X11. (Note that these settings match closer
+ * to Sun's Xorg delivery in /usr/X11 than the older X11R6.6-based delivery
+ * in /usr/openwin though.)
+ */
+#ifndef BuildLikeSun
+# define BuildLikeSun NO
+#endif
+
+#if BuildLikeSun
+# ifndef ProjectRoot
+# define ProjectRoot /usr/X11
+# endif
+# ifndef DocDir
+# define DocDir Concat(ProjectRoot,/share/doc)
+# endif
+# ifndef ManDirectoryRoot
+# define ManDirectoryRoot Concat(ProjectRoot,/share/man)
+# endif
+# ifndef ManSuffix
+# define ManSuffix 1
+# endif
+# ifndef LibraryCCOptions
+# if DoSharedLib && defined(SharedLibraryCCOptions)
+# define LibraryCCOptions SharedLibraryCCOptions ArchLibraryCCOptions
+# else
+# define LibraryCCOptions DefaultCCOptions ArchLibraryCCOptions
+# endif
+# endif
+#endif
+
+/* Flag passed to makestrs in Xt build to control string array names in the
+ * libXt headers. -solarisabinames matches those used in the libXt in
+ * Solaris, but not in other OS'es.
+ */
+#ifndef SolarisABIFlag
+# if BuildLikeSun
+# define SolarisABIFlag -solarisabinames
+# else
+# define SolarisABIFlag /**/
+# endif
+#endif
+
+/*
+ * Compiler setup. This sun.cf file knows what options to use with
+ * certain compilers, including Sun C, CenterLine C, and gcc. It
+ * also understands how to set some of the options for various C++
+ * compilers, including Sun C++ and CenterLine C++.
+ *
+ * === C Compiler Setup ==========================================
+ *
+ * For SunPro C, define HasSunC to YES in site.def.
+ * For CenterLine C, define HasCenterLineC to YES in site.def
+ * For gcc, gcc2 or gcc3, define HasGcc, HasGcc2 or HasGcc3 to YES in site.def
+ * For other compilers, define HasSunC to NO in site.def, then
+ * provide appropriate values for the various compiler related
+ * configuration varibles used here.
+ *
+ * If you don't tell us which C compiler you have, we assume you have
+ * the SunPro C compiler under Solaris 2.x, and the bundled /bin/cc
+ * under SunOS 4.1.x
+ *
+ * === C++ Compiler Setup ==========================================
+ *
+ * For SunPro C++, define HasSunCplusplus to YES in site.def
+ * For CenterLine C++, define HasCenterLineCplusplus to YES in site.def
+ * For Gnu g++ 2.6.x, define HasGcc2ForCplusplus to YES in site.def
+ * For other compilers, define HasCplusplus to YES in site.def, and
+ * check to see if you need to provide values for CplusplusOptions
+ * and/or DefaultCplusplusOptions.
+ *
+ * In any case, you may also need to set CplusplusDependIncludes.
+ *
+ * If you say you have the SunPro C++ compiler, we assume you have
+ * version 3.0.x of the compiler. If you have version 4.0.x instead,
+ * define CplusplusCompilerMajorVersion as 4 in site.def.
+ *
+ */
+
+#ifndef HasGcc3
+#define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+#define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+#define HasGcc HasGcc2
+#endif
+
+#ifndef HasSunC
+# if HasCenterLineC || HasGcc || HasGcc2 || HasGcc3 || (OSMajorVersion < 5)
+# define HasSunC NO
+# else
+# define HasSunC YES
+# endif
+#endif
+
+#if HasSunC
+# ifndef CCompilerMajorVersion
+# define CCompilerMajorVersion DefaultSunProCCompilerMajorVersion
+# endif
+# ifndef CCompilerMinorVersion
+# define CCompilerMinorVersion DefaultSunProCCompilerMinorVersion
+# endif
+XCOMM SunPro C CCompilerMajorVersion./**/CCompilerMinorVersion
+
+/* Choose some reasonable default optimizer flags based on compiler &
+ OS versions */
+# ifndef OptimizedCDebugFlags
+# if (CCompilerMajorVersion > 5) || \
+ (CCompilerMajorVersion == 5 && CCompilerMinorVersion > 2)
+# define OptimizedCDebugFlags -xO4 -xbuiltin=%all -xlibmil -xstrconst ArchOptimizedFlags
+# else
+# define OptimizedCDebugFlags -xO4 -xstrconst ArchOptimizedFlags
+# endif
+# endif
+# ifndef ArchOptimizedFlags
+# if OSMajorVersion == 5
+# if defined(SparcArchitecture) && !defined(Sparc64Architecture)
+# if OSMinorVersion > 9 /* Solaris 10 and later only run on UltraSPARC's */
+# define ArchOptimizedFlags -xarch=v8plus
+# else
+# define ArchOptimizedFlags -xarch=v8
+# endif
+# elif defined(i386Architecture) || defined(AMD64Architecture)
+# if (CCompilerMajorVersion > 5) || \
+ (CCompilerMajorVersion == 5 && CCompilerMinorVersion >= 7)
+/* -xregs=no%frameptr is required on x86 when compiling at -xO4 or higher to
+ * avoid losing stack frame pointers so you can't get stack traces or debug.
+ * This may lose a small bit of performance, so you can override by adding
+ * #define FramePtrFlags -xregs=frameptr if you care about performance more
+ * than debuggability.
+ */
+# ifndef FramePtrFlags
+# define FramePtrFlags -xregs=no%frameptr
+# endif
+# endif
+# ifndef FramePtrFlags
+# define FramePtrFlags /* */
+# endif
+# if defined(i386Architecture) && (OSMinorVersion > 8)
+ /* Solaris 9 and later require Pentium or better */
+# define ArchOptimizedFlags -xpentium FramePtrFlags
+# else
+# define ArchOptimizedFlags FramePtrFlags
+# endif
+# endif
+# endif
+# ifndef ArchOptimizedFlags
+# define ArchOptimizedFlags /**/
+# endif
+# endif
+# ifndef DefaultCDebugFlags
+# define DefaultCDebugFlags OptimizedCDebugFlags
+# endif
+# ifndef SharedLibraryLdCmd
+# define SharedLibraryLdCmd $(CC)
+# endif
+/* Flags for lint version included with Sun C compilers */
+# if OSMajorVersion >= 5
+# ifndef LintLibFlag
+# define LintLibFlag -y -o
+# endif
+# ifndef LintOpts
+# define LintOpts -b -h -u -erroff=E_INDISTING_FROM_TRUNC2 $(LINTSECFLAG) ExtraLibraries MathLibrary -lc
+# endif
+# ifndef LintSecFlag
+# if (CCompilerMajorVersion > 5) || \
+ (CCompilerMajorVersion == 5 && CCompilerMinorVersion >= 6)
+# define LintSecFlag -errsecurity=standard
+# else
+# define LintSecFlag /**/
+# endif
+# endif
+ LINTSECFLAG = LintSecFlag
+# ifndef LintLibReferences
+# define LintLibReferences(varname,libname,libsource) @@\
+ Concat(LINT,varname) = _UseCat(-L $(LINTLIBDIR) -l, -L libsource -l,libname)
+# endif
+
+# endif /* Lint Flags for Solaris */
+
+#endif /* HasSunC */
+
+#ifndef ArchLibraryCCOptions
+# if HasSunC && defined(SparcArchitecture) && CCompilerMajorVersion > 3
+# define ArchLibraryCCOptions -xregs=no%appl
+# else
+# define ArchLibraryCCOptions
+# endif
+#endif /* ArchLibraryCCOptions */
+
+/* we used to have this here :
+ *
+ * #if HasSunC
+ * # ifndef CCompilerMajorVersion
+ * # define CCompilerMajorVersion 3
+ * # define DefaultCDebugFlags -xO3
+ * # define OptimizedCDebugFlags -xO3
+ * # endif
+ * #endif
+ */
+
+#ifndef HasSunCplusplus
+# define HasSunCplusplus HasSunC /* ??? */
+#endif
+#if HasSunCplusplus
+# ifndef HasCplusplus
+# define HasCplusplus YES
+# define OptimizedCplusplusDebugFlags -xO4 -xbuiltin=%all -xlibmil
+# endif
+# ifndef CplusplusCompilerMajorVersion
+# ifdef DefaultSunProCplusplusCompilerMajorVersion
+# define CplusplusCompilerMajorVersion DefaultSunProCplusplusCompilerMajorVersion
+# else
+# define CplusplusCompilerMajorVersion 3
+# endif
+# endif
+# ifndef CplusplusCompilerMinorVersion
+# ifdef DefaultSunProCplusplusCompilerMinorVersion
+# define CplusplusCompilerMinorVersion DefaultSunProCplusplusCompilerMinorVersion
+# else
+# define CplusplusCompilerMinorVersion 0
+# endif
+# endif
+# ifndef CplusplusLibC
+# if CplusplusCompilerMajorVersion >= 5
+# define CplusplusLibC -norunpath -lCrun
+# endif
+# endif
+XCOMM SunPro C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
+#endif
+
+/* we used to have this here :
+ *
+ * # ifndef CplusplusCompilerMajorVersion
+ * # define CplusplusCompilerMajorVersion 4
+ * # endif
+ */
+
+#if HasCenterLineC
+# ifndef CcCmd
+# define CcCmd clcc
+# endif
+#endif
+
+#if HasCenterLineCplusplus
+# ifndef HasCplusplus
+# define HasCplusplus YES
+# endif
+# ifndef DefaultCplusplusOptions
+# define DefaultCplusplusOptions -Xa
+# endif
+# ifndef CplusplusOptions
+# define CplusplusOptions -Xa
+# endif
+#endif
+
+#if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
+/* We do not guarantee this will work */
+# define BootstrapCFlags -DNOSTDHDRS
+# define StandardDefines -DNOSTDHDRS
+# define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#endif
+
+#if OSMajorVersion == 4
+# if OSMinorVersion == 1
+/*
+ * Currently the NX transport only works with select().
+ *
+# define HasPoll YES
+ */
+# define HasPoll NO
+# endif
+# if OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1)
+/* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
+# define SunPost411FCSLd YES
+# endif
+#endif
+
+/* The Xsun server was not building for SunOS 5.7 due to
+ includes of <sys/cg2reg.h>.
+*/
+#if OSMajorVersion < 5
+# define IncludeCG2HeaderDefine -DINCLUDE_CG2_HEADER
+#else
+# define IncludeCG2HeaderDefine /**/
+#endif
+
+#if defined(i386Architecture) || defined(AMD64Architecture)
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 8))
+# define OSServerExtraDefines -D__SOL8__
+# endif
+#endif
+
+#if !HasGcc
+# if HasSunC
+# if defined(AMD64Architecture)
+# define AsmArch amd64
+# define AsmFlags -xarch=amd64
+# elif defined(i386Architecture)
+# define AsmArch ia32
+# define AsmFlags /**/
+# elif defined(Sparc64Architecture)
+# define AsmArch sparcv8plus
+# define AsmFlags -xarch=v9
+# elif defined(SparcArchitecture)
+# define AsmArch sparcv8plus
+# define AsmFlags -xarch=v8plus
+# endif
+# ifndef CompilerServerExtraDefines
+# define CompilerServerExtraDefines $(SERVERSRC)/hw/xfree86/os-support/sunos/AsmArch.il
+# endif
+# endif
+#endif
+
+#ifndef CompilerServerExtraDefines
+# define CompilerServerExtraDefines /**/
+#endif
+
+#ifndef OSServerExtraDefines
+# define OSServerExtraDefines /**/
+#endif
+
+#ifndef ArchServerExtraDefines
+# if defined(Sparc64Architecture) || defined(AMD64Architecture)
+# define ArchServerExtraDefines -D_XSERVER64
+# else
+# define ArchServerExtraDefines /**/
+# endif
+#endif
+
+#define ServerOSDefines XFree86ServerOSDefines IncludeCG2HeaderDefine \
+ -DPIXPRIV
+#define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines \
+ CompilerServerExtraDefines \
+ OSServerExtraDefines ArchServerExtraDefines \
+ -DPIXPRIV
+
+#ifndef HasPerl
+/* Solaris 8 comes with perl. Earlier versions don't. */
+# if (OSMajorVersion == 5) && (OSMinorVersion >= 8)
+# define HasPerl YES
+# else
+# define HasPerl NO
+# endif
+#endif
+
+#ifndef XkbServerDefines
+# if BuildLikeSun
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT \
+ -DXKM_OUTPUT_DIR='"/var/run/xkb/"' -DXKM_OUTPUT_DIR_MODE=0775 \
+ -DMAKE_XKM_OUTPUT_DIR
+# else
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+# endif
+#endif
+
+#if OSMajorVersion > 4
+/* #define ConnectionFlags -DTCPCONN -DUNIXCONN -DLOCALCONN */
+#define ConnectionFlags -DUNIXCONN -DTCPCONN
+# if HasSunC
+# ifdef DefaultSunProCCompilerDir
+# ifndef CcCmd
+# define CcCmd DefaultSunProCCompilerDir/cc
+# endif
+# endif
+# ifdef DefaultSunProCplusplusCompilerDir
+# ifndef CplusplusCmd
+# define CplusplusCmd DefaultSunProCplusplusCompilerDir/CC
+# endif
+# ifndef CplusplusFilt
+# define CplusplusFilt DefaultSunProCplusplusCompilerDir/c++filt
+# endif
+# ifndef CplusplusWhatdir
+# define CplusplusWhatdir DefaultSunProCplusplusCompilerDir/whatdir
+# endif
+# else /* DefaultSunProCplusplusCompilerDir not defined */
+# ifndef CplusplusWhatdir
+# define CplusplusWhatdir whatdir
+# endif
+# endif /* DefaultSunProCplusplusCompilerDir */
+# ifndef CplusplusDependIncludes
+# if CplusplusCompilerMajorVersion > 3
+# define CplusplusDependIncludes -I`CplusplusWhatdir CC`/../include/CC
+# elif CplusplusCompilerMajorVersion > 2
+# define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC
+# else
+# define CplusplusDependIncludes -I/opt/SUNWspro/SC2.0.1/include/CC
+# endif
+# endif
+# endif /* HasSunC */
+
+# if HasSunC && (CCompilerMajorVersion < 3)
+# define BootstrapCFlags -DSVR4
+# else
+# define BootstrapCFlags /* none needed */
+# endif
+# ifndef XawI18nDefines
+# if OSMinorVersion < 4
+# define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
+# else
+# define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
+# endif
+# endif
+# if OSMinorVersion > 3
+# define InstallCmd /usr/ucb/install
+# endif
+#ifndef LargefileDefines
+# if (OSMajorVersion > 5) || (OSMajorVersion == 5 && OSMinorVersion >= 6)
+# define LargefileDefines -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+# else
+# define LargefileDefines /* */
+# endif
+#endif
+# ifdef AMD64Architecture
+# define StandardDefines -Dsun -DSVR4 -D__EXTENSIONS__ -D__amd64
+# define ToolkitStringsABIOptions -intelabi SolarisABIFlag
+# elif defined(i386Architecture)
+# if (OSMajorVersion < 4) || ((OSMajorVersion == 5) && (OSMinorVersion <= 5))
+# define StandardDefines -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386 \
+ -D__SOL64__ LargefileDefines
+# else
+# define StandardDefines -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386 \
+ LargefileDefines
+# endif
+# define ToolkitStringsABIOptions -intelabi SolarisABIFlag
+# else
+# define StandardDefines -Dsun -Dsparc -DSVR4 -D__EXTENSIONS__ LargefileDefines \
+ -DPIXPRIV
+# define ToolkitStringsABIOptions -sparcabi SolarisABIFlag
+# endif
+# define ExtraLibraries -lsocket -lnsl
+# define HasWeakSymbols YES
+# if OSMinorVersion > 1
+# ifndef ThreadedX
+# define ThreadedX YES
+# endif
+# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
+# if HasSunC && CCompilerMajorVersion > 2
+# define ThreadsCompileFlags -mt
+# else
+# define SystemMTDefines -D_REENTRANT
+# define ThreadsLibraries -lthread
+# endif
+# if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
+# define ThreadsCplusplusCompileFlags -mt
+# else
+# define CplusplusSystemMTDefines -D_REENTRANT
+# define ThreadsCplusplusLibraries -lthread
+# endif
+# endif /* OSMinorVersion > 1 */
+# ifndef UseExportLists
+# if (OSMinorVersion > 4) && !HasGcc2
+# define UseExportLists YES
+# else
+# define UseExportLists NO
+# endif
+# endif
+# if OSMinorVersion > 5 /* Solaris 2.6 and later */
+# define HasSnprintf YES
+# endif
+# if OSMinorVersion > 7 /* Solaris 8 and later */
+# define HasStrlcat YES
+# define HasStrcasecmp YES
+# define HasVarRun YES
+# endif
+# if OSMinorVersion > 9 /* Solaris 10 and later */
+# define HasSetenv YES
+# define HasGetpeerucred YES
+# define HasGetoptLong YES
+# define DlLibrary -lc /* dlopen() is in libc in Solaris 10 */
+# endif
+# define HasVFork NO
+# define HasDlopen YES
+# define InstallXloadSetGID NO /* libkstat doesn't require gid kmem */
+# define InstKmemFlags -g sys -m 2711
+# define ShLibIncludeFile <sunLib.tmpl>
+# define LinkerRuntimeLibraryPathFlag(path) Concat(-R,path)
+# define RpathLoadFlags LinkerRuntimeLibraryPathFlag($(USRLIBDIRPATH))
+/*
+ * Set flags for position independent code before including sv4Lib.rules
+ * if the compiler in use doesn't use standard SVR4 flags
+ */
+# if HasSunC || HasCenterLineC
+# define PositionIndependentCFlags -Kpic
+# define LargePositionIndependentCFlags -KPIC
+# ifdef Sparc64Architecture
+# define LargePICTable YES
+# endif
+# endif
+# if HasSunCplusplus || HasCenterLineCplusplus
+# define PositionIndependentCplusplusFlags -pic
+# define LargePositionIndependentCplusplusFlags -PIC
+# endif
+/* As is done in sco5.cf, we lie and say Solaris has NCURSES, since
+ * the system curses is close enough for xorgcfg's purposes. xorgcfg
+ * should not depend on the NCURSES package but rather on a "capable curses",
+ * of which NCURSES is just one.
+ */
+#define HasNCurses YES
+#define NCursesLibName -lcurses
+#else /* not OSMajorVersion > 4 */
+#define InstKmemFlags -g kmem -m 2711
+#include <sunLib.rules>
+#endif /* OSMajorVersion > 4 (else) */
+
+/* Solaris 10 includes FreeType already. It's also available in GNOME 2.0 for
+ * Solaris 8 & 9, and in Solaris 9 4/03 and later, but there's no easy way to
+ * detect that in imake, so users of those releases who want to use the
+ * installed FreeType instead of the one in this tree should copy the following
+ * two settings to their host.def. Those who want to use the in-tree copy
+ * regardless of OS version should add "#define HasFreetype2 NO" to host.def.
+ */
+#ifndef HasFreetype2
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
+# define HasFreetype2 YES
+# ifndef Freetype2Dir
+# define Freetype2Dir /usr/sfw
+# endif
+# else
+# define HasFreetype2 NO
+# endif
+#endif
+
+#ifndef HasExpat
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
+# define HasExpat YES
+# ifndef ExpatDir
+# define ExpatDir /usr/sfw
+# endif
+# else
+# define HasExpat NO
+# endif
+#endif
+
+/* Solaris 10 includes fontconfig, but not the fcprivate.h header needed by
+ * Xft1 library.
+ */
+#ifndef HasFontconfig
+# define HasFontconfig NO
+#endif
+
+/* libpng was in /usr/sfw/lib on Solaris 9, moved to /usr/lib in Solaris 10 */
+#ifndef HasLibpng
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 9))
+# define HasLibpng YES
+# if !defined(LibpngDir) && ((OSMajorVersion == 5) && (OSMinorVersion == 9))
+# define LibpngDir /usr/sfw
+# endif
+# else
+# define HasLibpng NO
+# endif
+#endif
+
+#ifndef HasZlib
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 8))
+# define HasZlib YES
+# else
+# define HasZlib NO
+# endif
+#endif
+
+#ifndef TroffCmd
+# if !(HasGroff)
+# define TroffCmd troff -Tpost
+# endif
+#endif
+
+#define BuildLibPathVar LD_LIBRARY_PATH
+#define HasNdbm YES
+#define HasShm YES
+#define HasSecureRPC YES
+#define SetTtyGroup YES
+#define HasPutenv YES
+#define HasMkstemp YES
+#if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 8))
+#define HasDevRandom YES /* /dev/random is in Solaris 8 patches */
+#define PollDevRandom YES /* /dev/random is poll()able on Solaris */
+#endif
+#if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 9))
+# define HasIssetugid YES
+#endif
+#if defined(Sun3Architecture) || defined(SparcArchitecture) || defined(Sparc64Architecture)
+# ifndef Xsun24Server
+# define Xsun24Server NO /* color, mono, multiple depths */
+# endif
+# ifndef XsunServer
+# define XsunServer NO /* color and mono, 8 bit only */
+# endif
+# ifndef XsunMonoServer
+# define XsunMonoServer NO /* monochrome only */
+# endif
+# ifndef XorgServer
+# define XorgServer (!(Xsun24Server || XsunServer || XsunMonoServer))
+# endif
+# undef BuildXF86DRI
+# define BuildXF86DRI NO
+# if (OSMajorVersion > 4)
+# if !defined(AsOutputArchSize) || \
+ ((AsOutputArchSize != 32) && (AsOutputArchSize != 64))
+# undef AsOutputArchSize
+# define AsOutputArchSize 32
+# endif
+# ifndef AsVISOption
+# if AsOutputArchSize == 32
+# ifdef UseGas
+# define AsVISOption -Av8plusa
+# else
+# define AsVISOption -xarch=v8plusa
+# endif
+# else
+# ifdef UseGas
+# define AsVISOption -Av9a
+# else
+# define AsVISOption -xarch=v9a
+# endif
+# endif
+# endif
+# endif
+#endif /* SPARC or Sun3/M68k */
+
+#if OSMajorVersion >= 4
+#define HasUsableFileMap YES
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+#if HasGcc
+# if OSMajorVersion > 4
+# ifndef DefaultCCOptions
+# ifdef UseInstalled
+# define DefaultCCOptions -DNO_ASM
+# elif OSMinorVersion > 6
+# define DefaultCCOptions -DNO_ASM GccWarningOptions
+# elif OSMinorVersion > 3
+# define DefaultCCOptions -DNO_ASM GccWarningOptions -ansi -pedantic
+# else
+# define DefaultCCOptions -DNO_ASM
+# endif
+# endif
+# endif
+# if HasGcc2
+# ifndef CcCmd
+# define CcCmd gcc
+# endif
+# ifndef AsCmd
+# define AsCmd CcCmd -c -x assembler
+# endif
+# ifndef OptimizedCDebugFlags
+# ifdef i386Architecture
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# elif defined(AMD64Architecture)
+# define OptimizedCDebugFlags DefaultGcc2AMD64Opt
+# else
+# define OptimizedCDebugFlags -O2
+# endif
+# endif
+# if !defined(SharedLibraryLoadFlags) && !defined(SharedLibraryLdCmd)
+# if OSMajorVersion == 5 && OSMinorVersion > 6 && defined(i386Architecture)
+ /* This is to work around what appears to be a PIC bug in some gcc/egcs
+ versions that shows up with the Solaris 7/x86 <ctype.h>. */
+# define SharedLibraryLdCmd $(LD)
+# define SharedLibraryLoadFlags -G -z textwarn
+# else
+# define SharedLibraryLdCmd $(CC)
+# define SharedLibraryLoadFlags -shared -z text
+# endif
+# endif
+# else
+# define SharedLibraryCcCmd cc
+# define ExtraLoadFlags -B/usr/bin/
+# define AllocateLocalDefines /**/
+
+.c.o:
+ ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
+
+# endif /* HasGcc2 (else) */
+
+#else /* not HasGcc */
+
+# define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+
+/* Set up compiler-dependent options for Sun C */
+/*
+ * To build 64-bit binaries define Sparc64Architecture or AMD64Architecture
+ * in your site.def or host.def file.
+ */
+# if HasSunC
+# ifdef Sun3Architecture
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -f68881 -pipe
+# endif
+# else /* not defined(Sun3Architecture) */
+# if OSMajorVersion < 5
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -pipe
+# endif
+# else /* OSMajorVersion >= 5*/
+# ifndef DefaultXArchOptions
+# ifdef Sparc64Architecture
+# define DefaultXArchOptions -xarch=v9
+# elif defined(AMD64Architecture)
+# define DefaultXArchOptions -xarch=generic64
+# else
+# define DefaultXArchOptions /* */
+# endif
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -Xa -v DefaultXArchOptions -z lazyload -z combreloc -xstrconst -xildoff
+# endif
+# ifndef DefaultCplusplusOptions
+# define DefaultCplusplusOptions DefaultXArchOptions -z lazyload -z combreloc -xildoff
+# endif
+# ifndef SharedLibraryLoadFlags
+# define SharedLibraryLoadFlags -G DefaultXArchOptions -z text $(EXTRA_LOAD_FLAGS)
+# endif
+# endif
+# endif
+# endif
+# endif
+
+/* Set compiler-dependent options for CenterLine C */
+
+# if HasCenterLineC
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
+# endif
+# ifndef NeedConstPrototypes
+# define NeedConstPrototypes YES
+# endif
+# ifndef NeedNestedPrototypes
+# define NeedNestedPrototypes YES
+# endif
+# ifndef NeedVarargsPrototypes
+# define NeedVarargsPrototypes YES
+# endif
+# endif
+
+
+#endif /* HasGcc (else) */
+
+#if OSMajorVersion < 5
+# define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
+# define LibraryCCOptions /* don't want special floating point */
+#else /* OSMajorVersion >= 5, i.e. Solaris 2.0 & later */
+/* Only load libraries when needed on Solaris 7 & later */
+# if OSMinorVersion >= 7
+# define LazyLoadFlag -z lazyload -z combreloc
+# else
+# define LazyLoadFlag /* */
+# endif
+/* Link with extra mapfiles for some performance & security enhancements */
+#ifndef MapfileFlag
+# if HasSunC
+# define MapfileFlag -M
+# else
+# define MapfileFlag -Wl,-M,
+# endif
+#endif
+#ifndef Mapfile_BssAlign
+# if OSMinorVersion >= 9
+# define Mapfile_BssAlign $(MAPFILEFLAG)/usr/lib/ld/map.bssalign
+# else
+# define Mapfile_BssAlign /**/
+# endif
+#endif
+#ifndef Mapfile_PageAlign
+# if OSMinorVersion >= 10
+# define Mapfile_PageAlign $(MAPFILEFLAG)/usr/lib/ld/map.pagealign
+# else
+# define Mapfile_PageAlign /**/
+# endif
+#endif
+#ifndef Mapfile_NoExStack
+# if OSMinorVersion >= 9
+# define Mapfile_NoExStack $(MAPFILEFLAG)/usr/lib/ld/map.noexstk
+# else
+# define Mapfile_NoExStack /**/
+# endif
+#endif
+#ifndef Mapfile_NoExData
+# if defined(SparcArchitecture)
+/* SPARC archictecture requires PLT section in .data be executable, so
+ we can only make .bss, not all of .data no-exec on SPARC */
+# define Mapfile_NoExData /**/
+# else
+# if OSMinorVersion >= 10
+# define Mapfile_NoExData $(MAPFILEFLAG)/usr/lib/ld/map.noexdata
+# else
+# define Mapfile_NoExData /**/
+# endif
+# endif
+#endif
+ MAPFILEFLAG = MapfileFlag
+ MAPFILES_FOR_ALL = Mapfile_PageAlign Mapfile_NoExData
+MAPFILES_FOR_PROGS = Mapfile_BssAlign Mapfile_NoExStack
+/* ExtraLoadFlags apply to all binaries - programs & libraries */
+# ifndef ExtraLoadFlags
+# define ExtraLoadFlags LazyLoadFlag $(MAPFILES_FOR_ALL)
+# endif
+/* ExtraLoadOptions only apply to programs */
+# ifndef ExtraLoadOptions
+# define ExtraLoadOptions -B direct $(MAPFILES_FOR_PROGS)
+# endif
+#endif /* OSMajorVersion < 5 */
+
+/* 64-bit build support */
+#ifndef Solaris64bitSubdir
+# ifdef Sparc64Architecture
+# define Solaris64bitSubdir sparcv9
+# elif defined(AMD64Architecture)
+# define Solaris64bitSubdir amd64
+# endif
+#endif
+
+#ifdef Solaris64bitSubdir
+# define LibDirName Concat3(lib,/,Solaris64bitSubdir)
+#endif
+
+#if OSMajorVersion > 4
+# include <svr4.cf>
+#endif
+
+#ifndef ManKeywordsTarget
+# define ManKeywordsTarget(manpath) @@\
+man_keywords:: @@\
+ catman -M $(DESTDIR)manpath -w
+#endif
+
+#if !defined(UsePamLibrary)
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
+# define UsePamLibrary YES
+# endif
+#endif
+
+/* PAM appeared in SunOS 5.6 */
+#if !defined(HasPam)
+# if (OSMajorVersion > 5) || (OSMajorVersion == 5 && OSMinorVersion >= 6)
+# define HasPam YES
+# endif
+#endif
+
+#ifndef PamLibraries
+#define PamLibraries -lpam
+#endif
+
+#ifndef HasMotif
+/* Solaris's Motif depends on Solaris libX11 and won't work with libX11 built
+ * from this tree, so only use it when using libX11 from outside the tree.
+ */
+# define HasMotif (defined(UseInstalled) || UseInstalledX11)
+# define MotifDir /usr/dt
+#endif /* !HasMotif */
+#ifndef HasMotif2
+/* Solaris's Motif2 version is broken and misses XmPrintShell
+ * (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=1366) */
+# define HasMotif2 NO
+#endif /* !HasMotif2 */
+
+#define MotifDefines \
+ -DNO_ISDIR -DNO_REGCOMP -DNO_ALLOCA -DBOGUS_MB_MAX -DNO_CONST
+#define PamUnixDefines -DPAM_NIS
+#define TtLargePICTable YES
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#define DtWidgetDefines DtSearchDefines
+#define DtPrintDefines DtSearchDefines
+
+#define baseDtMailDefines \
+ -DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
+#if !defined(i386Architecture) && !defined(AMD64Architecture)
+# define DtMailDefines baseDtMailDefines
+#else
+# define DtMailDefines -DBIG_ENDIAN baseDtMailDefines
+#endif
+
+#define ArchitectureDefines -DSUN_ARCHITECTURE
+
+#define TtClientExtraLibs ExtraLibraries -ldl -lintl
+
+#define ExportListGenSource elistgen.sun
+#define ShlibExportListOpt(filename) -M filename
+
+#define CdeProjectDefines \
+ -DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D_XOPEN_VERSION=4 \
+ -D_XOPEN_SOURCE -D__EXTENSIONS__ \
+ -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
+
+
+/*
+ * Turn off HTML manpages like we do under NetBSD.
+ */
+#ifndef BuildHtmlManPages
+#define BuildHtmlManPages NO
+#endif
+
+/*
+ * Turn off seperate configuration directories.
+ */
+#ifndef UseSeparateConfDir
+#define UseSeparateConfDir NO
+#endif
+
+/* Hackery for building modules as Solaris shared objects with dependencies */
+#if MakeDllModules && DoLoadableServer
+
+/* If you change this, you will need to change find-deps.pl to match */
+#define DlModuleDependencyName(module) Concat(module,_deps)
+
+#define DlModuleTarget(module,deplist,modlist) @@\
+DepDynamicModuleTarget(module,deplist DlModuleDependencyName(module),modlist LazyLoadFlag `cat DlModuleDependencyName(module)`) @@\
+ @@\
+DlModuleDependencyName(module): @@\
+ touch $@ @@\
+ @@\
+clean:: @@\
+ RemoveFile(DlModuleDependencyName(module))
+
+#define ObjectModuleTarget(module,objects) @@\
+DlModuleTarget(Concat(module,_drv.so), objects, objects)
+
+#define LibraryModuleTarget(module,objects) @@\
+NormalLibraryTarget(module, objects) @@\
+DlModuleTarget(Concat3(lib,module,.so), objects, objects)
+
+#define DepLibraryModuleTarget(module,deplist,objects) @@\
+NormalDepLibraryTarget(module, deplist, objects) @@\
+DlModuleTarget(Concat3(lib,module,.so), deplist, objects)
+
+#endif
diff --git a/nx-X11/config/cf/sun.cf.NX.original b/nx-X11/config/cf/sun.cf.NX.original
new file mode 100644
index 000000000..cc9fbf503
--- /dev/null
+++ b/nx-X11/config/cf/sun.cf.NX.original
@@ -0,0 +1,966 @@
+XCOMM $XdotOrg: xc/config/cf/sun.cf,v 1.34 2005/12/03 17:20:48 alanc Exp $
+XCOMM platform: $Xorg: sun.cf,v 1.4 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/sun.cf,v 3.70 2004/01/13 02:42:51 tsi Exp $
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+/* For various reasons, Sun uses different settings when compiling the
+ * X Window System packages included in Solaris than are normally used
+ * by most people building the X.Org software releases. Sun also has
+ * two different X server hierarchies in Solaris - Xsun in /usr/openwin
+ * and Xorg in /usr/X11.
+ *
+ * If you want to try to match Sun's settings as closely as possible
+ * add this setting to your host.def:
+ * #define BuildLikeSun YES
+ *
+ * If you're trying to match the openwin directory layout as well, you'll
+ * need to also add:
+ * #define ProjectRoot /usr/openwin
+ * otherwise it will use /usr/X11. (Note that these settings match closer
+ * to Sun's Xorg delivery in /usr/X11 than the older X11R6.6-based delivery
+ * in /usr/openwin though.)
+ */
+#ifndef BuildLikeSun
+# define BuildLikeSun NO
+#endif
+
+#if BuildLikeSun
+# ifndef ProjectRoot
+# define ProjectRoot /usr/X11
+# endif
+# ifndef DocDir
+# define DocDir Concat(ProjectRoot,/share/doc)
+# endif
+# ifndef ManDirectoryRoot
+# define ManDirectoryRoot Concat(ProjectRoot,/share/man)
+# endif
+# ifndef ManSuffix
+# define ManSuffix 1
+# endif
+# ifndef LibraryCCOptions
+# if DoSharedLib && defined(SharedLibraryCCOptions)
+# define LibraryCCOptions SharedLibraryCCOptions ArchLibraryCCOptions
+# else
+# define LibraryCCOptions DefaultCCOptions ArchLibraryCCOptions
+# endif
+# endif
+#endif
+
+/* Flag passed to makestrs in Xt build to control string array names in the
+ * libXt headers. -solarisabinames matches those used in the libXt in
+ * Solaris, but not in other OS'es.
+ */
+#ifndef SolarisABIFlag
+# if BuildLikeSun
+# define SolarisABIFlag -solarisabinames
+# else
+# define SolarisABIFlag /**/
+# endif
+#endif
+
+/*
+ * Compiler setup. This sun.cf file knows what options to use with
+ * certain compilers, including Sun C, CenterLine C, and gcc. It
+ * also understands how to set some of the options for various C++
+ * compilers, including Sun C++ and CenterLine C++.
+ *
+ * === C Compiler Setup ==========================================
+ *
+ * For SunPro C, define HasSunC to YES in site.def.
+ * For CenterLine C, define HasCenterLineC to YES in site.def
+ * For gcc, gcc2 or gcc3, define HasGcc, HasGcc2 or HasGcc3 to YES in site.def
+ * For other compilers, define HasSunC to NO in site.def, then
+ * provide appropriate values for the various compiler related
+ * configuration varibles used here.
+ *
+ * If you don't tell us which C compiler you have, we assume you have
+ * the SunPro C compiler under Solaris 2.x, and the bundled /bin/cc
+ * under SunOS 4.1.x
+ *
+ * === C++ Compiler Setup ==========================================
+ *
+ * For SunPro C++, define HasSunCplusplus to YES in site.def
+ * For CenterLine C++, define HasCenterLineCplusplus to YES in site.def
+ * For Gnu g++ 2.6.x, define HasGcc2ForCplusplus to YES in site.def
+ * For other compilers, define HasCplusplus to YES in site.def, and
+ * check to see if you need to provide values for CplusplusOptions
+ * and/or DefaultCplusplusOptions.
+ *
+ * In any case, you may also need to set CplusplusDependIncludes.
+ *
+ * If you say you have the SunPro C++ compiler, we assume you have
+ * version 3.0.x of the compiler. If you have version 4.0.x instead,
+ * define CplusplusCompilerMajorVersion as 4 in site.def.
+ *
+ */
+
+#ifndef HasGcc3
+#define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+#define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+#define HasGcc HasGcc2
+#endif
+
+#ifndef HasSunC
+# if HasCenterLineC || HasGcc || HasGcc2 || HasGcc3 || (OSMajorVersion < 5)
+# define HasSunC NO
+# else
+# define HasSunC YES
+# endif
+#endif
+
+#if HasSunC
+# ifndef CCompilerMajorVersion
+# define CCompilerMajorVersion DefaultSunProCCompilerMajorVersion
+# endif
+# ifndef CCompilerMinorVersion
+# define CCompilerMinorVersion DefaultSunProCCompilerMinorVersion
+# endif
+XCOMM SunPro C CCompilerMajorVersion./**/CCompilerMinorVersion
+
+/* Choose some reasonable default optimizer flags based on compiler &
+ OS versions */
+# ifndef OptimizedCDebugFlags
+# if (CCompilerMajorVersion > 5) || \
+ (CCompilerMajorVersion == 5 && CCompilerMinorVersion > 2)
+# define OptimizedCDebugFlags -xO4 -xbuiltin=%all -xlibmil -xstrconst ArchOptimizedFlags
+# else
+# define OptimizedCDebugFlags -xO4 -xstrconst ArchOptimizedFlags
+# endif
+# endif
+# ifndef ArchOptimizedFlags
+# if OSMajorVersion == 5
+# if defined(SparcArchitecture) && !defined(Sparc64Architecture)
+# if OSMinorVersion > 9 /* Solaris 10 and later only run on UltraSPARC's */
+# define ArchOptimizedFlags -xarch=v8plus
+# else
+# define ArchOptimizedFlags -xarch=v8
+# endif
+# elif defined(i386Architecture) || defined(AMD64Architecture)
+# if (CCompilerMajorVersion > 5) || \
+ (CCompilerMajorVersion == 5 && CCompilerMinorVersion >= 7)
+/* -xregs=no%frameptr is required on x86 when compiling at -xO4 or higher to
+ * avoid losing stack frame pointers so you can't get stack traces or debug.
+ * This may lose a small bit of performance, so you can override by adding
+ * #define FramePtrFlags -xregs=frameptr if you care about performance more
+ * than debuggability.
+ */
+# ifndef FramePtrFlags
+# define FramePtrFlags -xregs=no%frameptr
+# endif
+# endif
+# ifndef FramePtrFlags
+# define FramePtrFlags /* */
+# endif
+# if defined(i386Architecture) && (OSMinorVersion > 8)
+ /* Solaris 9 and later require Pentium or better */
+# define ArchOptimizedFlags -xpentium FramePtrFlags
+# else
+# define ArchOptimizedFlags FramePtrFlags
+# endif
+# endif
+# endif
+# ifndef ArchOptimizedFlags
+# define ArchOptimizedFlags /**/
+# endif
+# endif
+# ifndef DefaultCDebugFlags
+# define DefaultCDebugFlags OptimizedCDebugFlags
+# endif
+# ifndef SharedLibraryLdCmd
+# define SharedLibraryLdCmd $(CC)
+# endif
+/* Flags for lint version included with Sun C compilers */
+# if OSMajorVersion >= 5
+# ifndef LintLibFlag
+# define LintLibFlag -y -o
+# endif
+# ifndef LintOpts
+# define LintOpts -b -h -u -erroff=E_INDISTING_FROM_TRUNC2 $(LINTSECFLAG) ExtraLibraries MathLibrary -lc
+# endif
+# ifndef LintSecFlag
+# if (CCompilerMajorVersion > 5) || \
+ (CCompilerMajorVersion == 5 && CCompilerMinorVersion >= 6)
+# define LintSecFlag -errsecurity=standard
+# else
+# define LintSecFlag /**/
+# endif
+# endif
+ LINTSECFLAG = LintSecFlag
+# ifndef LintLibReferences
+# define LintLibReferences(varname,libname,libsource) @@\
+ Concat(LINT,varname) = _UseCat(-L $(LINTLIBDIR) -l, -L libsource -l,libname)
+# endif
+
+# endif /* Lint Flags for Solaris */
+
+#endif /* HasSunC */
+
+#ifndef ArchLibraryCCOptions
+# if HasSunC && defined(SparcArchitecture) && CCompilerMajorVersion > 3
+# define ArchLibraryCCOptions -xregs=no%appl
+# else
+# define ArchLibraryCCOptions
+# endif
+#endif /* ArchLibraryCCOptions */
+
+/* we used to have this here :
+ *
+ * #if HasSunC
+ * # ifndef CCompilerMajorVersion
+ * # define CCompilerMajorVersion 3
+ * # define DefaultCDebugFlags -xO3
+ * # define OptimizedCDebugFlags -xO3
+ * # endif
+ * #endif
+ */
+
+#ifndef HasSunCplusplus
+# define HasSunCplusplus HasSunC /* ??? */
+#endif
+#if HasSunCplusplus
+# ifndef HasCplusplus
+# define HasCplusplus YES
+# define OptimizedCplusplusDebugFlags -xO4 -xbuiltin=%all -xlibmil
+# endif
+# ifndef CplusplusCompilerMajorVersion
+# ifdef DefaultSunProCplusplusCompilerMajorVersion
+# define CplusplusCompilerMajorVersion DefaultSunProCplusplusCompilerMajorVersion
+# else
+# define CplusplusCompilerMajorVersion 3
+# endif
+# endif
+# ifndef CplusplusCompilerMinorVersion
+# ifdef DefaultSunProCplusplusCompilerMinorVersion
+# define CplusplusCompilerMinorVersion DefaultSunProCplusplusCompilerMinorVersion
+# else
+# define CplusplusCompilerMinorVersion 0
+# endif
+# endif
+# ifndef CplusplusLibC
+# if CplusplusCompilerMajorVersion >= 5
+# define CplusplusLibC -norunpath -lCrun
+# endif
+# endif
+XCOMM SunPro C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
+#endif
+
+/* we used to have this here :
+ *
+ * # ifndef CplusplusCompilerMajorVersion
+ * # define CplusplusCompilerMajorVersion 4
+ * # endif
+ */
+
+#if HasCenterLineC
+# ifndef CcCmd
+# define CcCmd clcc
+# endif
+#endif
+
+#if HasCenterLineCplusplus
+# ifndef HasCplusplus
+# define HasCplusplus YES
+# endif
+# ifndef DefaultCplusplusOptions
+# define DefaultCplusplusOptions -Xa
+# endif
+# ifndef CplusplusOptions
+# define CplusplusOptions -Xa
+# endif
+#endif
+
+#if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
+/* We do not guarantee this will work */
+# define BootstrapCFlags -DNOSTDHDRS
+# define StandardDefines -DNOSTDHDRS
+# define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#endif
+
+#if OSMajorVersion == 4
+# if OSMinorVersion == 1
+/*
+ * Currently the NX transport only works with select().
+ *
+# define HasPoll YES
+ */
+# define HasPoll NO
+# endif
+# if OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1)
+/* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
+# define SunPost411FCSLd YES
+# endif
+#endif
+
+/* The Xsun server was not building for SunOS 5.7 due to
+ includes of <sys/cg2reg.h>.
+*/
+#if OSMajorVersion < 5
+# define IncludeCG2HeaderDefine -DINCLUDE_CG2_HEADER
+#else
+# define IncludeCG2HeaderDefine /**/
+#endif
+
+#if defined(i386Architecture) || defined(AMD64Architecture)
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 8))
+# define OSServerExtraDefines -D__SOL8__
+# endif
+#endif
+
+#if !HasGcc
+# if HasSunC
+# if defined(AMD64Architecture)
+# define AsmArch amd64
+# define AsmFlags -xarch=amd64
+# elif defined(i386Architecture)
+# define AsmArch ia32
+# define AsmFlags /**/
+# elif defined(Sparc64Architecture)
+# define AsmArch sparcv8plus
+# define AsmFlags -xarch=v9
+# elif defined(SparcArchitecture)
+# define AsmArch sparcv8plus
+# define AsmFlags -xarch=v8plus
+# endif
+# ifndef CompilerServerExtraDefines
+# define CompilerServerExtraDefines $(SERVERSRC)/hw/xfree86/os-support/sunos/AsmArch.il
+# endif
+# endif
+#endif
+
+#ifndef CompilerServerExtraDefines
+# define CompilerServerExtraDefines /**/
+#endif
+
+#ifndef OSServerExtraDefines
+# define OSServerExtraDefines /**/
+#endif
+
+#ifndef ArchServerExtraDefines
+# if defined(Sparc64Architecture) || defined(AMD64Architecture)
+# define ArchServerExtraDefines -D_XSERVER64
+# else
+# define ArchServerExtraDefines /**/
+# endif
+#endif
+
+#define ServerOSDefines XFree86ServerOSDefines IncludeCG2HeaderDefine \
+ -DPIXPRIV
+#define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines \
+ CompilerServerExtraDefines \
+ OSServerExtraDefines ArchServerExtraDefines \
+ -DPIXPRIV
+
+#ifndef HasPerl
+/* Solaris 8 comes with perl. Earlier versions don't. */
+# if (OSMajorVersion == 5) && (OSMinorVersion >= 8)
+# define HasPerl YES
+# else
+# define HasPerl NO
+# endif
+#endif
+
+#ifndef XkbServerDefines
+# if BuildLikeSun
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT \
+ -DXKM_OUTPUT_DIR='"/var/run/xkb/"' -DXKM_OUTPUT_DIR_MODE=0775 \
+ -DMAKE_XKM_OUTPUT_DIR
+# else
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+# endif
+#endif
+
+#if OSMajorVersion > 4
+/* #define ConnectionFlags -DTCPCONN -DUNIXCONN -DLOCALCONN */
+#define ConnectionFlags -DUNIXCONN -DTCPCONN
+# if HasSunC
+# ifdef DefaultSunProCCompilerDir
+# ifndef CcCmd
+# define CcCmd DefaultSunProCCompilerDir/cc
+# endif
+# endif
+# ifdef DefaultSunProCplusplusCompilerDir
+# ifndef CplusplusCmd
+# define CplusplusCmd DefaultSunProCplusplusCompilerDir/CC
+# endif
+# ifndef CplusplusFilt
+# define CplusplusFilt DefaultSunProCplusplusCompilerDir/c++filt
+# endif
+# ifndef CplusplusWhatdir
+# define CplusplusWhatdir DefaultSunProCplusplusCompilerDir/whatdir
+# endif
+# else /* DefaultSunProCplusplusCompilerDir not defined */
+# ifndef CplusplusWhatdir
+# define CplusplusWhatdir whatdir
+# endif
+# endif /* DefaultSunProCplusplusCompilerDir */
+# ifndef CplusplusDependIncludes
+# if CplusplusCompilerMajorVersion > 3
+# define CplusplusDependIncludes -I`CplusplusWhatdir CC`/../include/CC
+# elif CplusplusCompilerMajorVersion > 2
+# define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC
+# else
+# define CplusplusDependIncludes -I/opt/SUNWspro/SC2.0.1/include/CC
+# endif
+# endif
+# endif /* HasSunC */
+
+# if HasSunC && (CCompilerMajorVersion < 3)
+# define BootstrapCFlags -DSVR4
+# else
+# define BootstrapCFlags /* none needed */
+# endif
+# ifndef XawI18nDefines
+# if OSMinorVersion < 4
+# define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
+# else
+# define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
+# endif
+# endif
+# if OSMinorVersion > 3
+# define InstallCmd /usr/ucb/install
+# endif
+#ifndef LargefileDefines
+# if (OSMajorVersion > 5) || (OSMajorVersion == 5 && OSMinorVersion >= 6)
+# define LargefileDefines -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+# else
+# define LargefileDefines /* */
+# endif
+#endif
+# ifdef AMD64Architecture
+# define StandardDefines -Dsun -DSVR4 -D__EXTENSIONS__ -D__amd64
+# define ToolkitStringsABIOptions -intelabi SolarisABIFlag
+# elif defined(i386Architecture)
+# if (OSMajorVersion < 4) || ((OSMajorVersion == 5) && (OSMinorVersion <= 5))
+# define StandardDefines -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386 \
+ -D__SOL64__ LargefileDefines
+# else
+# define StandardDefines -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386 \
+ LargefileDefines
+# endif
+# define ToolkitStringsABIOptions -intelabi SolarisABIFlag
+# else
+# define StandardDefines -Dsun -Dsparc -DSVR4 -D__EXTENSIONS__ LargefileDefines \
+ -DPIXPRIV
+# define ToolkitStringsABIOptions -sparcabi SolarisABIFlag
+# endif
+# define ExtraLibraries -lsocket -lnsl
+# define HasWeakSymbols YES
+# if OSMinorVersion > 1
+# ifndef ThreadedX
+# define ThreadedX YES
+# endif
+# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
+# if HasSunC && CCompilerMajorVersion > 2
+# define ThreadsCompileFlags -mt
+# else
+# define SystemMTDefines -D_REENTRANT
+# define ThreadsLibraries -lthread
+# endif
+# if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
+# define ThreadsCplusplusCompileFlags -mt
+# else
+# define CplusplusSystemMTDefines -D_REENTRANT
+# define ThreadsCplusplusLibraries -lthread
+# endif
+# endif /* OSMinorVersion > 1 */
+# ifndef UseExportLists
+# if (OSMinorVersion > 4) && !HasGcc2
+# define UseExportLists YES
+# else
+# define UseExportLists NO
+# endif
+# endif
+# if OSMinorVersion > 5 /* Solaris 2.6 and later */
+# define HasSnprintf YES
+# endif
+# if OSMinorVersion > 7 /* Solaris 8 and later */
+# define HasStrlcat YES
+# define HasStrcasecmp YES
+# define HasVarRun YES
+# endif
+# if OSMinorVersion > 9 /* Solaris 10 and later */
+# define HasSetenv YES
+# define HasGetpeerucred YES
+# define HasGetoptLong YES
+# define DlLibrary -lc /* dlopen() is in libc in Solaris 10 */
+# endif
+# define HasVFork NO
+# define HasDlopen YES
+# define InstallXloadSetGID NO /* libkstat doesn't require gid kmem */
+# define InstKmemFlags -g sys -m 2711
+# define ShLibIncludeFile <sunLib.tmpl>
+# define LinkerRuntimeLibraryPathFlag(path) Concat(-R,path)
+# define RpathLoadFlags LinkerRuntimeLibraryPathFlag($(USRLIBDIRPATH))
+/*
+ * Set flags for position independent code before including sv4Lib.rules
+ * if the compiler in use doesn't use standard SVR4 flags
+ */
+# if HasSunC || HasCenterLineC
+# define PositionIndependentCFlags -Kpic
+# define LargePositionIndependentCFlags -KPIC
+# ifdef Sparc64Architecture
+# define LargePICTable YES
+# endif
+# endif
+# if HasSunCplusplus || HasCenterLineCplusplus
+# define PositionIndependentCplusplusFlags -pic
+# define LargePositionIndependentCplusplusFlags -PIC
+# endif
+/* As is done in sco5.cf, we lie and say Solaris has NCURSES, since
+ * the system curses is close enough for xorgcfg's purposes. xorgcfg
+ * should not depend on the NCURSES package but rather on a "capable curses",
+ * of which NCURSES is just one.
+ */
+#define HasNCurses YES
+#define NCursesLibName -lcurses
+#else /* not OSMajorVersion > 4 */
+#define InstKmemFlags -g kmem -m 2711
+#include <sunLib.rules>
+#endif /* OSMajorVersion > 4 (else) */
+
+/* Solaris 10 includes FreeType already. It's also available in GNOME 2.0 for
+ * Solaris 8 & 9, and in Solaris 9 4/03 and later, but there's no easy way to
+ * detect that in imake, so users of those releases who want to use the
+ * installed FreeType instead of the one in this tree should copy the following
+ * two settings to their host.def. Those who want to use the in-tree copy
+ * regardless of OS version should add "#define HasFreetype2 NO" to host.def.
+ */
+#ifndef HasFreetype2
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
+# define HasFreetype2 YES
+# ifndef Freetype2Dir
+# define Freetype2Dir /usr/sfw
+# endif
+# else
+# define HasFreetype2 NO
+# endif
+#endif
+
+#ifndef HasExpat
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
+# define HasExpat YES
+# ifndef ExpatDir
+# define ExpatDir /usr/sfw
+# endif
+# else
+# define HasExpat NO
+# endif
+#endif
+
+/* Solaris 10 includes fontconfig, but not the fcprivate.h header needed by
+ * Xft1 library.
+ */
+#ifndef HasFontconfig
+# define HasFontconfig NO
+#endif
+
+/* libpng was in /usr/sfw/lib on Solaris 9, moved to /usr/lib in Solaris 10 */
+#ifndef HasLibpng
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 9))
+# define HasLibpng YES
+# if !defined(LibpngDir) && ((OSMajorVersion == 5) && (OSMinorVersion == 9))
+# define LibpngDir /usr/sfw
+# endif
+# else
+# define HasLibpng NO
+# endif
+#endif
+
+#ifndef HasZlib
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 8))
+# define HasZlib YES
+# else
+# define HasZlib NO
+# endif
+#endif
+
+#ifndef TroffCmd
+# if !(HasGroff)
+# define TroffCmd troff -Tpost
+# endif
+#endif
+
+#define BuildLibPathVar LD_LIBRARY_PATH
+#define HasNdbm YES
+#define HasShm YES
+#define HasSecureRPC YES
+#define SetTtyGroup YES
+#define HasPutenv YES
+#define HasMkstemp YES
+#if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 8))
+#define HasDevRandom YES /* /dev/random is in Solaris 8 patches */
+#define PollDevRandom YES /* /dev/random is poll()able on Solaris */
+#endif
+#if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 9))
+# define HasIssetugid YES
+#endif
+#if defined(Sun3Architecture) || defined(SparcArchitecture) || defined(Sparc64Architecture)
+# ifndef Xsun24Server
+# define Xsun24Server NO /* color, mono, multiple depths */
+# endif
+# ifndef XsunServer
+# define XsunServer NO /* color and mono, 8 bit only */
+# endif
+# ifndef XsunMonoServer
+# define XsunMonoServer NO /* monochrome only */
+# endif
+# ifndef XorgServer
+# define XorgServer (!(Xsun24Server || XsunServer || XsunMonoServer))
+# endif
+# undef BuildXF86DRI
+# define BuildXF86DRI NO
+# if (OSMajorVersion > 4)
+# if !defined(AsOutputArchSize) || \
+ ((AsOutputArchSize != 32) && (AsOutputArchSize != 64))
+# undef AsOutputArchSize
+# define AsOutputArchSize 32
+# endif
+# ifndef AsVISOption
+# if AsOutputArchSize == 32
+# ifdef UseGas
+# define AsVISOption -Av8plusa
+# else
+# define AsVISOption -xarch=v8plusa
+# endif
+# else
+# ifdef UseGas
+# define AsVISOption -Av9a
+# else
+# define AsVISOption -xarch=v9a
+# endif
+# endif
+# endif
+# endif
+#endif /* SPARC or Sun3/M68k */
+
+#if OSMajorVersion >= 4
+#define HasUsableFileMap YES
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+#if HasGcc
+# if OSMajorVersion > 4
+# ifndef DefaultCCOptions
+# ifdef UseInstalled
+# define DefaultCCOptions -DNO_ASM
+# elif OSMinorVersion > 6
+# define DefaultCCOptions -DNO_ASM GccWarningOptions
+# elif OSMinorVersion > 3
+# define DefaultCCOptions -DNO_ASM GccWarningOptions -ansi -pedantic
+# else
+# define DefaultCCOptions -DNO_ASM
+# endif
+# endif
+# endif
+# if HasGcc2
+# ifndef CcCmd
+# define CcCmd gcc
+# endif
+# ifndef AsCmd
+# define AsCmd CcCmd -c -x assembler
+# endif
+# ifndef OptimizedCDebugFlags
+# ifdef i386Architecture
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# elif defined(AMD64Architecture)
+# define OptimizedCDebugFlags DefaultGcc2AMD64Opt
+# else
+# define OptimizedCDebugFlags -O2
+# endif
+# endif
+# if !defined(SharedLibraryLoadFlags) && !defined(SharedLibraryLdCmd)
+# if OSMajorVersion == 5 && OSMinorVersion > 6 && defined(i386Architecture)
+ /* This is to work around what appears to be a PIC bug in some gcc/egcs
+ versions that shows up with the Solaris 7/x86 <ctype.h>. */
+# define SharedLibraryLdCmd $(LD)
+# define SharedLibraryLoadFlags -G -z textwarn
+# else
+# define SharedLibraryLdCmd $(CC)
+# define SharedLibraryLoadFlags -shared -z text
+# endif
+# endif
+# else
+# define SharedLibraryCcCmd cc
+# define ExtraLoadFlags -B/usr/bin/
+# define AllocateLocalDefines /**/
+
+.c.o:
+ ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
+
+# endif /* HasGcc2 (else) */
+
+#else /* not HasGcc */
+
+# define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+
+/* Set up compiler-dependent options for Sun C */
+/*
+ * To build 64-bit binaries define Sparc64Architecture or AMD64Architecture
+ * in your site.def or host.def file.
+ */
+# if HasSunC
+# ifdef Sun3Architecture
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -f68881 -pipe
+# endif
+# else /* not defined(Sun3Architecture) */
+# if OSMajorVersion < 5
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -pipe
+# endif
+# else /* OSMajorVersion >= 5*/
+# ifndef DefaultXArchOptions
+# ifdef Sparc64Architecture
+# define DefaultXArchOptions -xarch=v9
+# elif defined(AMD64Architecture)
+# define DefaultXArchOptions -xarch=generic64
+# else
+# define DefaultXArchOptions /* */
+# endif
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -Xa -v DefaultXArchOptions -z lazyload -z combreloc -xstrconst -xildoff
+# endif
+# ifndef DefaultCplusplusOptions
+# define DefaultCplusplusOptions DefaultXArchOptions -z lazyload -z combreloc -xildoff
+# endif
+# ifndef SharedLibraryLoadFlags
+# define SharedLibraryLoadFlags -G DefaultXArchOptions -z text $(EXTRA_LOAD_FLAGS)
+# endif
+# endif
+# endif
+# endif
+# endif
+
+/* Set compiler-dependent options for CenterLine C */
+
+# if HasCenterLineC
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
+# endif
+# ifndef NeedConstPrototypes
+# define NeedConstPrototypes YES
+# endif
+# ifndef NeedNestedPrototypes
+# define NeedNestedPrototypes YES
+# endif
+# ifndef NeedVarargsPrototypes
+# define NeedVarargsPrototypes YES
+# endif
+# endif
+
+
+#endif /* HasGcc (else) */
+
+#if OSMajorVersion < 5
+# define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
+# define LibraryCCOptions /* don't want special floating point */
+#else /* OSMajorVersion >= 5, i.e. Solaris 2.0 & later */
+/* Only load libraries when needed on Solaris 7 & later */
+# if OSMinorVersion >= 7
+# define LazyLoadFlag -z lazyload -z combreloc
+# else
+# define LazyLoadFlag /* */
+# endif
+/* Link with extra mapfiles for some performance & security enhancements */
+#ifndef MapfileFlag
+# if HasSunC
+# define MapfileFlag -M
+# else
+# define MapfileFlag -Wl,-M,
+# endif
+#endif
+#ifndef Mapfile_BssAlign
+# if OSMinorVersion >= 9
+# define Mapfile_BssAlign $(MAPFILEFLAG)/usr/lib/ld/map.bssalign
+# else
+# define Mapfile_BssAlign /**/
+# endif
+#endif
+#ifndef Mapfile_PageAlign
+# if OSMinorVersion >= 10
+# define Mapfile_PageAlign $(MAPFILEFLAG)/usr/lib/ld/map.pagealign
+# else
+# define Mapfile_PageAlign /**/
+# endif
+#endif
+#ifndef Mapfile_NoExStack
+# if OSMinorVersion >= 9
+# define Mapfile_NoExStack $(MAPFILEFLAG)/usr/lib/ld/map.noexstk
+# else
+# define Mapfile_NoExStack /**/
+# endif
+#endif
+#ifndef Mapfile_NoExData
+# if defined(SparcArchitecture)
+/* SPARC archictecture requires PLT section in .data be executable, so
+ we can only make .bss, not all of .data no-exec on SPARC */
+# define Mapfile_NoExData /**/
+# else
+# if OSMinorVersion >= 10
+# define Mapfile_NoExData $(MAPFILEFLAG)/usr/lib/ld/map.noexdata
+# else
+# define Mapfile_NoExData /**/
+# endif
+# endif
+#endif
+ MAPFILEFLAG = MapfileFlag
+ MAPFILES_FOR_ALL = Mapfile_PageAlign Mapfile_NoExData
+MAPFILES_FOR_PROGS = Mapfile_BssAlign Mapfile_NoExStack
+/* ExtraLoadFlags apply to all binaries - programs & libraries */
+# ifndef ExtraLoadFlags
+# define ExtraLoadFlags LazyLoadFlag $(MAPFILES_FOR_ALL)
+# endif
+/* ExtraLoadOptions only apply to programs */
+# ifndef ExtraLoadOptions
+# define ExtraLoadOptions -B direct $(MAPFILES_FOR_PROGS)
+# endif
+#endif /* OSMajorVersion < 5 */
+
+/* 64-bit build support */
+#ifndef Solaris64bitSubdir
+# ifdef Sparc64Architecture
+# define Solaris64bitSubdir sparcv9
+# elif defined(AMD64Architecture)
+# define Solaris64bitSubdir amd64
+# endif
+#endif
+
+#ifdef Solaris64bitSubdir
+# define LibDirName Concat3(lib,/,Solaris64bitSubdir)
+#endif
+
+#if OSMajorVersion > 4
+# include <svr4.cf>
+#endif
+
+#ifndef ManKeywordsTarget
+# define ManKeywordsTarget(manpath) @@\
+man_keywords:: @@\
+ catman -M $(DESTDIR)manpath -w
+#endif
+
+#if !defined(UsePamLibrary)
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
+# define UsePamLibrary YES
+# endif
+#endif
+
+/* PAM appeared in SunOS 5.6 */
+#if !defined(HasPam)
+# if (OSMajorVersion > 5) || (OSMajorVersion == 5 && OSMinorVersion >= 6)
+# define HasPam YES
+# endif
+#endif
+
+#ifndef PamLibraries
+#define PamLibraries -lpam
+#endif
+
+#ifndef HasMotif
+/* Solaris's Motif depends on Solaris libX11 and won't work with libX11 built
+ * from this tree, so only use it when using libX11 from outside the tree.
+ */
+# define HasMotif (defined(UseInstalled) || UseInstalledX11)
+# define MotifDir /usr/dt
+#endif /* !HasMotif */
+#ifndef HasMotif2
+/* Solaris's Motif2 version is broken and misses XmPrintShell
+ * (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=1366) */
+# define HasMotif2 NO
+#endif /* !HasMotif2 */
+
+#define MotifDefines \
+ -DNO_ISDIR -DNO_REGCOMP -DNO_ALLOCA -DBOGUS_MB_MAX -DNO_CONST
+#define PamUnixDefines -DPAM_NIS
+#define TtLargePICTable YES
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#define DtWidgetDefines DtSearchDefines
+#define DtPrintDefines DtSearchDefines
+
+#define baseDtMailDefines \
+ -DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
+#if !defined(i386Architecture) && !defined(AMD64Architecture)
+# define DtMailDefines baseDtMailDefines
+#else
+# define DtMailDefines -DBIG_ENDIAN baseDtMailDefines
+#endif
+
+#define ArchitectureDefines -DSUN_ARCHITECTURE
+
+#define TtClientExtraLibs ExtraLibraries -ldl -lintl
+
+#define ExportListGenSource elistgen.sun
+#define ShlibExportListOpt(filename) -M filename
+
+#define CdeProjectDefines \
+ -DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D_XOPEN_VERSION=4 \
+ -D_XOPEN_SOURCE -D__EXTENSIONS__ \
+ -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
+
+
+/*
+ * Turn off HTML manpages like we do under NetBSD.
+ */
+#ifndef BuildHtmlManPages
+#define BuildHtmlManPages NO
+#endif
+
+/*
+ * Turn off seperate configuration directories.
+ */
+#ifndef UseSeparateConfDir
+#define UseSeparateConfDir NO
+#endif
+
+/* Hackery for building modules as Solaris shared objects with dependencies */
+#if MakeDllModules && DoLoadableServer
+
+/* If you change this, you will need to change find-deps.pl to match */
+#define DlModuleDependencyName(module) Concat(module,_deps)
+
+#define DlModuleTarget(module,deplist,modlist) @@\
+DepDynamicModuleTarget(module,deplist DlModuleDependencyName(module),modlist LazyLoadFlag `cat DlModuleDependencyName(module)`) @@\
+ @@\
+DlModuleDependencyName(module): @@\
+ touch $@ @@\
+ @@\
+clean:: @@\
+ RemoveFile(DlModuleDependencyName(module))
+
+#define ObjectModuleTarget(module,objects) @@\
+DlModuleTarget(Concat(module,_drv.so), objects, objects)
+
+#define LibraryModuleTarget(module,objects) @@\
+NormalLibraryTarget(module, objects) @@\
+DlModuleTarget(Concat3(lib,module,.so), objects, objects)
+
+#define DepLibraryModuleTarget(module,deplist,objects) @@\
+NormalDepLibraryTarget(module, deplist, objects) @@\
+DlModuleTarget(Concat3(lib,module,.so), deplist, objects)
+
+#endif
diff --git a/nx-X11/config/cf/sun.cf.X.original b/nx-X11/config/cf/sun.cf.X.original
new file mode 100644
index 000000000..55bf2c1e2
--- /dev/null
+++ b/nx-X11/config/cf/sun.cf.X.original
@@ -0,0 +1,957 @@
+XCOMM $XdotOrg: xc/config/cf/sun.cf,v 1.34 2005/12/03 17:20:48 alanc Exp $
+XCOMM platform: $Xorg: sun.cf,v 1.4 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/sun.cf,v 3.70 2004/01/13 02:42:51 tsi Exp $
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+/* For various reasons, Sun uses different settings when compiling the
+ * X Window System packages included in Solaris than are normally used
+ * by most people building the X.Org software releases. Sun also has
+ * two different X server hierarchies in Solaris - Xsun in /usr/openwin
+ * and Xorg in /usr/X11.
+ *
+ * If you want to try to match Sun's settings as closely as possible
+ * add this setting to your host.def:
+ * #define BuildLikeSun YES
+ *
+ * If you're trying to match the openwin directory layout as well, you'll
+ * need to also add:
+ * #define ProjectRoot /usr/openwin
+ * otherwise it will use /usr/X11. (Note that these settings match closer
+ * to Sun's Xorg delivery in /usr/X11 than the older X11R6.6-based delivery
+ * in /usr/openwin though.)
+ */
+#ifndef BuildLikeSun
+# define BuildLikeSun NO
+#endif
+
+#if BuildLikeSun
+# ifndef ProjectRoot
+# define ProjectRoot /usr/X11
+# endif
+# ifndef DocDir
+# define DocDir Concat(ProjectRoot,/share/doc)
+# endif
+# ifndef ManDirectoryRoot
+# define ManDirectoryRoot Concat(ProjectRoot,/share/man)
+# endif
+# ifndef ManSuffix
+# define ManSuffix 1
+# endif
+# ifndef LibraryCCOptions
+# if DoSharedLib && defined(SharedLibraryCCOptions)
+# define LibraryCCOptions SharedLibraryCCOptions ArchLibraryCCOptions
+# else
+# define LibraryCCOptions DefaultCCOptions ArchLibraryCCOptions
+# endif
+# endif
+#endif
+
+/* Flag passed to makestrs in Xt build to control string array names in the
+ * libXt headers. -solarisabinames matches those used in the libXt in
+ * Solaris, but not in other OS'es.
+ */
+#ifndef SolarisABIFlag
+# if BuildLikeSun
+# define SolarisABIFlag -solarisabinames
+# else
+# define SolarisABIFlag /**/
+# endif
+#endif
+
+/*
+ * Compiler setup. This sun.cf file knows what options to use with
+ * certain compilers, including Sun C, CenterLine C, and gcc. It
+ * also understands how to set some of the options for various C++
+ * compilers, including Sun C++ and CenterLine C++.
+ *
+ * === C Compiler Setup ==========================================
+ *
+ * For SunPro C, define HasSunC to YES in site.def.
+ * For CenterLine C, define HasCenterLineC to YES in site.def
+ * For gcc, gcc2 or gcc3, define HasGcc, HasGcc2 or HasGcc3 to YES in site.def
+ * For other compilers, define HasSunC to NO in site.def, then
+ * provide appropriate values for the various compiler related
+ * configuration varibles used here.
+ *
+ * If you don't tell us which C compiler you have, we assume you have
+ * the SunPro C compiler under Solaris 2.x, and the bundled /bin/cc
+ * under SunOS 4.1.x
+ *
+ * === C++ Compiler Setup ==========================================
+ *
+ * For SunPro C++, define HasSunCplusplus to YES in site.def
+ * For CenterLine C++, define HasCenterLineCplusplus to YES in site.def
+ * For Gnu g++ 2.6.x, define HasGcc2ForCplusplus to YES in site.def
+ * For other compilers, define HasCplusplus to YES in site.def, and
+ * check to see if you need to provide values for CplusplusOptions
+ * and/or DefaultCplusplusOptions.
+ *
+ * In any case, you may also need to set CplusplusDependIncludes.
+ *
+ * If you say you have the SunPro C++ compiler, we assume you have
+ * version 3.0.x of the compiler. If you have version 4.0.x instead,
+ * define CplusplusCompilerMajorVersion as 4 in site.def.
+ *
+ */
+
+#ifndef HasGcc3
+#define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+#define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+#define HasGcc HasGcc2
+#endif
+
+#ifndef HasSunC
+# if HasCenterLineC || HasGcc || HasGcc2 || HasGcc3 || (OSMajorVersion < 5)
+# define HasSunC NO
+# else
+# define HasSunC YES
+# endif
+#endif
+
+#if HasSunC
+# ifndef CCompilerMajorVersion
+# define CCompilerMajorVersion DefaultSunProCCompilerMajorVersion
+# endif
+# ifndef CCompilerMinorVersion
+# define CCompilerMinorVersion DefaultSunProCCompilerMinorVersion
+# endif
+XCOMM SunPro C CCompilerMajorVersion./**/CCompilerMinorVersion
+
+/* Choose some reasonable default optimizer flags based on compiler &
+ OS versions */
+# ifndef OptimizedCDebugFlags
+# if (CCompilerMajorVersion > 5) || \
+ (CCompilerMajorVersion == 5 && CCompilerMinorVersion > 2)
+# define OptimizedCDebugFlags -xO4 -xbuiltin=%all -xlibmil -xstrconst ArchOptimizedFlags
+# else
+# define OptimizedCDebugFlags -xO4 -xstrconst ArchOptimizedFlags
+# endif
+# endif
+# ifndef ArchOptimizedFlags
+# if OSMajorVersion == 5
+# if defined(SparcArchitecture) && !defined(Sparc64Architecture)
+# if OSMinorVersion > 9 /* Solaris 10 and later only run on UltraSPARC's */
+# define ArchOptimizedFlags -xarch=v8plus
+# else
+# define ArchOptimizedFlags -xarch=v8
+# endif
+# elif defined(i386Architecture) || defined(AMD64Architecture)
+# if (CCompilerMajorVersion > 5) || \
+ (CCompilerMajorVersion == 5 && CCompilerMinorVersion >= 7)
+/* -xregs=no%frameptr is required on x86 when compiling at -xO4 or higher to
+ * avoid losing stack frame pointers so you can't get stack traces or debug.
+ * This may lose a small bit of performance, so you can override by adding
+ * #define FramePtrFlags -xregs=frameptr if you care about performance more
+ * than debuggability.
+ */
+# ifndef FramePtrFlags
+# define FramePtrFlags -xregs=no%frameptr
+# endif
+# endif
+# ifndef FramePtrFlags
+# define FramePtrFlags /* */
+# endif
+# if defined(i386Architecture) && (OSMinorVersion > 8)
+ /* Solaris 9 and later require Pentium or better */
+# define ArchOptimizedFlags -xpentium FramePtrFlags
+# else
+# define ArchOptimizedFlags FramePtrFlags
+# endif
+# endif
+# endif
+# ifndef ArchOptimizedFlags
+# define ArchOptimizedFlags /**/
+# endif
+# endif
+# ifndef DefaultCDebugFlags
+# define DefaultCDebugFlags OptimizedCDebugFlags
+# endif
+# ifndef SharedLibraryLdCmd
+# define SharedLibraryLdCmd $(CC)
+# endif
+/* Flags for lint version included with Sun C compilers */
+# if OSMajorVersion >= 5
+# ifndef LintLibFlag
+# define LintLibFlag -y -o
+# endif
+# ifndef LintOpts
+# define LintOpts -b -h -u -erroff=E_INDISTING_FROM_TRUNC2 $(LINTSECFLAG) ExtraLibraries MathLibrary -lc
+# endif
+# ifndef LintSecFlag
+# if (CCompilerMajorVersion > 5) || \
+ (CCompilerMajorVersion == 5 && CCompilerMinorVersion >= 6)
+# define LintSecFlag -errsecurity=standard
+# else
+# define LintSecFlag /**/
+# endif
+# endif
+ LINTSECFLAG = LintSecFlag
+# ifndef LintLibReferences
+# define LintLibReferences(varname,libname,libsource) @@\
+ Concat(LINT,varname) = _UseCat(-L $(LINTLIBDIR) -l, -L libsource -l,libname)
+# endif
+
+# endif /* Lint Flags for Solaris */
+
+#endif /* HasSunC */
+
+#ifndef ArchLibraryCCOptions
+# if HasSunC && defined(SparcArchitecture) && CCompilerMajorVersion > 3
+# define ArchLibraryCCOptions -xregs=no%appl
+# else
+# define ArchLibraryCCOptions
+# endif
+#endif /* ArchLibraryCCOptions */
+
+/* we used to have this here :
+ *
+ * #if HasSunC
+ * # ifndef CCompilerMajorVersion
+ * # define CCompilerMajorVersion 3
+ * # define DefaultCDebugFlags -xO3
+ * # define OptimizedCDebugFlags -xO3
+ * # endif
+ * #endif
+ */
+
+#ifndef HasSunCplusplus
+# define HasSunCplusplus HasSunC /* ??? */
+#endif
+#if HasSunCplusplus
+# ifndef HasCplusplus
+# define HasCplusplus YES
+# define OptimizedCplusplusDebugFlags -xO4 -xbuiltin=%all -xlibmil
+# endif
+# ifndef CplusplusCompilerMajorVersion
+# ifdef DefaultSunProCplusplusCompilerMajorVersion
+# define CplusplusCompilerMajorVersion DefaultSunProCplusplusCompilerMajorVersion
+# else
+# define CplusplusCompilerMajorVersion 3
+# endif
+# endif
+# ifndef CplusplusCompilerMinorVersion
+# ifdef DefaultSunProCplusplusCompilerMinorVersion
+# define CplusplusCompilerMinorVersion DefaultSunProCplusplusCompilerMinorVersion
+# else
+# define CplusplusCompilerMinorVersion 0
+# endif
+# endif
+# ifndef CplusplusLibC
+# if CplusplusCompilerMajorVersion >= 5
+# define CplusplusLibC -norunpath -lCrun
+# endif
+# endif
+XCOMM SunPro C++ CplusplusCompilerMajorVersion./**/CplusplusCompilerMinorVersion
+#endif
+
+/* we used to have this here :
+ *
+ * # ifndef CplusplusCompilerMajorVersion
+ * # define CplusplusCompilerMajorVersion 4
+ * # endif
+ */
+
+#if HasCenterLineC
+# ifndef CcCmd
+# define CcCmd clcc
+# endif
+#endif
+
+#if HasCenterLineCplusplus
+# ifndef HasCplusplus
+# define HasCplusplus YES
+# endif
+# ifndef DefaultCplusplusOptions
+# define DefaultCplusplusOptions -Xa
+# endif
+# ifndef CplusplusOptions
+# define CplusplusOptions -Xa
+# endif
+#endif
+
+#if OSMajorVersion < 4 || (OSMajorVersion == 4 && OSMinorVersion < 1)
+/* We do not guarantee this will work */
+# define BootstrapCFlags -DNOSTDHDRS
+# define StandardDefines -DNOSTDHDRS
+# define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
+#endif
+
+#if OSMajorVersion == 4
+# if OSMinorVersion == 1
+# define HasPoll YES
+# endif
+# if OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1)
+/* You ALSO need this if you have Sun ld patch 100170-06 or later to 4.1.1 */
+# define SunPost411FCSLd YES
+# endif
+#endif
+
+/* The Xsun server was not building for SunOS 5.7 due to
+ includes of <sys/cg2reg.h>.
+*/
+#if OSMajorVersion < 5
+# define IncludeCG2HeaderDefine -DINCLUDE_CG2_HEADER
+#else
+# define IncludeCG2HeaderDefine /**/
+#endif
+
+#if defined(i386Architecture) || defined(AMD64Architecture)
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 8))
+# define OSServerExtraDefines -D__SOL8__
+# endif
+#endif
+
+#if !HasGcc
+# if HasSunC
+# if defined(AMD64Architecture)
+# define AsmArch amd64
+# define AsmFlags -xarch=amd64
+# elif defined(i386Architecture)
+# define AsmArch ia32
+# define AsmFlags /**/
+# elif defined(Sparc64Architecture)
+# define AsmArch sparcv8plus
+# define AsmFlags -xarch=v9
+# elif defined(SparcArchitecture)
+# define AsmArch sparcv8plus
+# define AsmFlags -xarch=v8plus
+# endif
+# ifndef CompilerServerExtraDefines
+# define CompilerServerExtraDefines $(SERVERSRC)/hw/xfree86/os-support/sunos/AsmArch.il
+# endif
+# endif
+#endif
+
+#ifndef CompilerServerExtraDefines
+# define CompilerServerExtraDefines /**/
+#endif
+
+#ifndef OSServerExtraDefines
+# define OSServerExtraDefines /**/
+#endif
+
+#ifndef ArchServerExtraDefines
+# if defined(Sparc64Architecture) || defined(AMD64Architecture)
+# define ArchServerExtraDefines -D_XSERVER64
+# else
+# define ArchServerExtraDefines /**/
+# endif
+#endif
+
+#define ServerOSDefines XFree86ServerOSDefines IncludeCG2HeaderDefine
+#define ServerExtraDefines AllocateLocalDefines XFree86ServerDefines \
+ CompilerServerExtraDefines \
+ OSServerExtraDefines ArchServerExtraDefines
+
+#ifndef HasPerl
+/* Solaris 8 comes with perl. Earlier versions don't. */
+# if (OSMajorVersion == 5) && (OSMinorVersion >= 8)
+# define HasPerl YES
+# else
+# define HasPerl NO
+# endif
+#endif
+
+#ifndef XkbServerDefines
+# if BuildLikeSun
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT \
+ -DXKM_OUTPUT_DIR='"/var/run/xkb/"' -DXKM_OUTPUT_DIR_MODE=0775 \
+ -DMAKE_XKM_OUTPUT_DIR
+# else
+# define XkbServerDefines -DXKB_ALWAYS_USES_SOFT_REPEAT
+# endif
+#endif
+
+#if OSMajorVersion > 4
+# define ConnectionFlags -DTCPCONN -DUNIXCONN -DLOCALCONN
+# if HasSunC
+# ifdef DefaultSunProCCompilerDir
+# ifndef CcCmd
+# define CcCmd DefaultSunProCCompilerDir/cc
+# endif
+# endif
+# ifdef DefaultSunProCplusplusCompilerDir
+# ifndef CplusplusCmd
+# define CplusplusCmd DefaultSunProCplusplusCompilerDir/CC
+# endif
+# ifndef CplusplusFilt
+# define CplusplusFilt DefaultSunProCplusplusCompilerDir/c++filt
+# endif
+# ifndef CplusplusWhatdir
+# define CplusplusWhatdir DefaultSunProCplusplusCompilerDir/whatdir
+# endif
+# else /* DefaultSunProCplusplusCompilerDir not defined */
+# ifndef CplusplusWhatdir
+# define CplusplusWhatdir whatdir
+# endif
+# endif /* DefaultSunProCplusplusCompilerDir */
+# ifndef CplusplusDependIncludes
+# if CplusplusCompilerMajorVersion > 3
+# define CplusplusDependIncludes -I`CplusplusWhatdir CC`/../include/CC
+# elif CplusplusCompilerMajorVersion > 2
+# define CplusplusDependIncludes -I/opt/SUNWspro/SC3.0/include/CC
+# else
+# define CplusplusDependIncludes -I/opt/SUNWspro/SC2.0.1/include/CC
+# endif
+# endif
+# endif /* HasSunC */
+
+# if HasSunC && (CCompilerMajorVersion < 3)
+# define BootstrapCFlags -DSVR4
+# else
+# define BootstrapCFlags /* none needed */
+# endif
+# ifndef XawI18nDefines
+# if OSMinorVersion < 4
+# define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
+# else
+# define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
+# endif
+# endif
+# if OSMinorVersion > 3
+# define InstallCmd /usr/ucb/install
+# endif
+#ifndef LargefileDefines
+# if (OSMajorVersion > 5) || (OSMajorVersion == 5 && OSMinorVersion >= 6)
+# define LargefileDefines -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+# else
+# define LargefileDefines /* */
+# endif
+#endif
+# ifdef AMD64Architecture
+# define StandardDefines -Dsun -DSVR4 -D__EXTENSIONS__ -D__amd64
+# define ToolkitStringsABIOptions -intelabi SolarisABIFlag
+# elif defined(i386Architecture)
+# if (OSMajorVersion < 4) || ((OSMajorVersion == 5) && (OSMinorVersion <= 5))
+# define StandardDefines -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386 \
+ -D__SOL64__ LargefileDefines
+# else
+# define StandardDefines -Dsun -Di386 -DSVR4 -D__EXTENSIONS__ -D__i386 \
+ LargefileDefines
+# endif
+# define ToolkitStringsABIOptions -intelabi SolarisABIFlag
+# else
+# define StandardDefines -Dsun -Dsparc -DSVR4 -D__EXTENSIONS__ LargefileDefines
+# define ToolkitStringsABIOptions -sparcabi SolarisABIFlag
+# endif
+# define ExtraLibraries -lsocket -lnsl
+# define HasWeakSymbols YES
+# if OSMinorVersion > 1
+# ifndef ThreadedX
+# define ThreadedX YES
+# endif
+# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
+# if HasSunC && CCompilerMajorVersion > 2
+# define ThreadsCompileFlags -mt
+# else
+# define SystemMTDefines -D_REENTRANT
+# define ThreadsLibraries -lthread
+# endif
+# if HasSunCplusplus && CplusplusCompilerMajorVersion > 3
+# define ThreadsCplusplusCompileFlags -mt
+# else
+# define CplusplusSystemMTDefines -D_REENTRANT
+# define ThreadsCplusplusLibraries -lthread
+# endif
+# endif /* OSMinorVersion > 1 */
+# ifndef UseExportLists
+# if (OSMinorVersion > 4) && !HasGcc2
+# define UseExportLists YES
+# else
+# define UseExportLists NO
+# endif
+# endif
+# if OSMinorVersion > 5 /* Solaris 2.6 and later */
+# define HasSnprintf YES
+# endif
+# if OSMinorVersion > 7 /* Solaris 8 and later */
+# define HasStrlcat YES
+# define HasStrcasecmp YES
+# define HasVarRun YES
+# endif
+# if OSMinorVersion > 9 /* Solaris 10 and later */
+# define HasSetenv YES
+# define HasGetpeerucred YES
+# define HasGetoptLong YES
+# define DlLibrary -lc /* dlopen() is in libc in Solaris 10 */
+# endif
+# define HasVFork NO
+# define HasDlopen YES
+# define InstallXloadSetGID NO /* libkstat doesn't require gid kmem */
+# define InstKmemFlags -g sys -m 2711
+# define ShLibIncludeFile <sunLib.tmpl>
+# define LinkerRuntimeLibraryPathFlag(path) Concat(-R,path)
+# define RpathLoadFlags LinkerRuntimeLibraryPathFlag($(USRLIBDIRPATH))
+/*
+ * Set flags for position independent code before including sv4Lib.rules
+ * if the compiler in use doesn't use standard SVR4 flags
+ */
+# if HasSunC || HasCenterLineC
+# define PositionIndependentCFlags -Kpic
+# define LargePositionIndependentCFlags -KPIC
+# ifdef Sparc64Architecture
+# define LargePICTable YES
+# endif
+# endif
+# if HasSunCplusplus || HasCenterLineCplusplus
+# define PositionIndependentCplusplusFlags -pic
+# define LargePositionIndependentCplusplusFlags -PIC
+# endif
+/* As is done in sco5.cf, we lie and say Solaris has NCURSES, since
+ * the system curses is close enough for xorgcfg's purposes. xorgcfg
+ * should not depend on the NCURSES package but rather on a "capable curses",
+ * of which NCURSES is just one.
+ */
+#define HasNCurses YES
+#define NCursesLibName -lcurses
+#else /* not OSMajorVersion > 4 */
+#define InstKmemFlags -g kmem -m 2711
+#include <sunLib.rules>
+#endif /* OSMajorVersion > 4 (else) */
+
+/* Solaris 10 includes FreeType already. It's also available in GNOME 2.0 for
+ * Solaris 8 & 9, and in Solaris 9 4/03 and later, but there's no easy way to
+ * detect that in imake, so users of those releases who want to use the
+ * installed FreeType instead of the one in this tree should copy the following
+ * two settings to their host.def. Those who want to use the in-tree copy
+ * regardless of OS version should add "#define HasFreetype2 NO" to host.def.
+ */
+#ifndef HasFreetype2
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
+# define HasFreetype2 YES
+# ifndef Freetype2Dir
+# define Freetype2Dir /usr/sfw
+# endif
+# else
+# define HasFreetype2 NO
+# endif
+#endif
+
+#ifndef HasExpat
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 10))
+# define HasExpat YES
+# ifndef ExpatDir
+# define ExpatDir /usr/sfw
+# endif
+# else
+# define HasExpat NO
+# endif
+#endif
+
+/* Solaris 10 includes fontconfig, but not the fcprivate.h header needed by
+ * Xft1 library.
+ */
+#ifndef HasFontconfig
+# define HasFontconfig NO
+#endif
+
+/* libpng was in /usr/sfw/lib on Solaris 9, moved to /usr/lib in Solaris 10 */
+#ifndef HasLibpng
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 9))
+# define HasLibpng YES
+# if !defined(LibpngDir) && ((OSMajorVersion == 5) && (OSMinorVersion == 9))
+# define LibpngDir /usr/sfw
+# endif
+# else
+# define HasLibpng NO
+# endif
+#endif
+
+#ifndef HasZlib
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 8))
+# define HasZlib YES
+# else
+# define HasZlib NO
+# endif
+#endif
+
+#ifndef TroffCmd
+# if !(HasGroff)
+# define TroffCmd troff -Tpost
+# endif
+#endif
+
+#define BuildLibPathVar LD_LIBRARY_PATH
+#define HasNdbm YES
+#define HasShm YES
+#define HasSecureRPC YES
+#define SetTtyGroup YES
+#define HasPutenv YES
+#define HasMkstemp YES
+#if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 8))
+#define HasDevRandom YES /* /dev/random is in Solaris 8 patches */
+#define PollDevRandom YES /* /dev/random is poll()able on Solaris */
+#endif
+#if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 9))
+# define HasIssetugid YES
+#endif
+#if defined(Sun3Architecture) || defined(SparcArchitecture) || defined(Sparc64Architecture)
+# ifndef Xsun24Server
+# define Xsun24Server NO /* color, mono, multiple depths */
+# endif
+# ifndef XsunServer
+# define XsunServer NO /* color and mono, 8 bit only */
+# endif
+# ifndef XsunMonoServer
+# define XsunMonoServer NO /* monochrome only */
+# endif
+# ifndef XorgServer
+# define XorgServer (!(Xsun24Server || XsunServer || XsunMonoServer))
+# endif
+# undef BuildXF86DRI
+# define BuildXF86DRI NO
+# if (OSMajorVersion > 4)
+# if !defined(AsOutputArchSize) || \
+ ((AsOutputArchSize != 32) && (AsOutputArchSize != 64))
+# undef AsOutputArchSize
+# define AsOutputArchSize 32
+# endif
+# ifndef AsVISOption
+# if AsOutputArchSize == 32
+# ifdef UseGas
+# define AsVISOption -Av8plusa
+# else
+# define AsVISOption -xarch=v8plusa
+# endif
+# else
+# ifdef UseGas
+# define AsVISOption -Av9a
+# else
+# define AsVISOption -xarch=v9a
+# endif
+# endif
+# endif
+# endif
+#endif /* SPARC or Sun3/M68k */
+
+#if OSMajorVersion >= 4
+#define HasUsableFileMap YES
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+#if HasGcc
+# if OSMajorVersion > 4
+# ifndef DefaultCCOptions
+# ifdef UseInstalled
+# define DefaultCCOptions -DNO_ASM
+# elif OSMinorVersion > 6
+# define DefaultCCOptions -DNO_ASM GccWarningOptions
+# elif OSMinorVersion > 3
+# define DefaultCCOptions -DNO_ASM GccWarningOptions -ansi -pedantic
+# else
+# define DefaultCCOptions -DNO_ASM
+# endif
+# endif
+# endif
+# if HasGcc2
+# ifndef CcCmd
+# define CcCmd gcc
+# endif
+# ifndef AsCmd
+# define AsCmd CcCmd -c -x assembler
+# endif
+# ifndef OptimizedCDebugFlags
+# ifdef i386Architecture
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# elif defined(AMD64Architecture)
+# define OptimizedCDebugFlags DefaultGcc2AMD64Opt
+# else
+# define OptimizedCDebugFlags -O2
+# endif
+# endif
+# if !defined(SharedLibraryLoadFlags) && !defined(SharedLibraryLdCmd)
+# if OSMajorVersion == 5 && OSMinorVersion > 6 && defined(i386Architecture)
+ /* This is to work around what appears to be a PIC bug in some gcc/egcs
+ versions that shows up with the Solaris 7/x86 <ctype.h>. */
+# define SharedLibraryLdCmd $(LD)
+# define SharedLibraryLoadFlags -G -z textwarn
+# else
+# define SharedLibraryLdCmd $(CC)
+# define SharedLibraryLoadFlags -shared -z text
+# endif
+# endif
+# else
+# define SharedLibraryCcCmd cc
+# define ExtraLoadFlags -B/usr/bin/
+# define AllocateLocalDefines /**/
+
+.c.o:
+ ClearmakeOSName $(CC) -c $(CFLAGS) $*.c
+
+# endif /* HasGcc2 (else) */
+
+#else /* not HasGcc */
+
+# define AllocateLocalDefines -DINCLUDE_ALLOCA_H
+
+/* Set up compiler-dependent options for Sun C */
+/*
+ * To build 64-bit binaries define Sparc64Architecture or AMD64Architecture
+ * in your site.def or host.def file.
+ */
+# if HasSunC
+# ifdef Sun3Architecture
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -f68881 -pipe
+# endif
+# else /* not defined(Sun3Architecture) */
+# if OSMajorVersion < 5
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -pipe
+# endif
+# else /* OSMajorVersion >= 5*/
+# ifndef DefaultXArchOptions
+# ifdef Sparc64Architecture
+# define DefaultXArchOptions -xarch=v9
+# elif defined(AMD64Architecture)
+# define DefaultXArchOptions -xarch=generic64
+# else
+# define DefaultXArchOptions /* */
+# endif
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -Xa -v DefaultXArchOptions -z lazyload -z combreloc -xstrconst -xildoff
+# endif
+# ifndef DefaultCplusplusOptions
+# define DefaultCplusplusOptions DefaultXArchOptions -z lazyload -z combreloc -xildoff
+# endif
+# ifndef SharedLibraryLoadFlags
+# define SharedLibraryLoadFlags -G DefaultXArchOptions -z text $(EXTRA_LOAD_FLAGS)
+# endif
+# endif
+# endif
+# endif
+# endif
+
+/* Set compiler-dependent options for CenterLine C */
+
+# if HasCenterLineC
+# ifndef DefaultCCOptions
+# define DefaultCCOptions -Xt -w1 -DANSICPP -U__HIGHC__
+# endif
+# ifndef NeedConstPrototypes
+# define NeedConstPrototypes YES
+# endif
+# ifndef NeedNestedPrototypes
+# define NeedNestedPrototypes YES
+# endif
+# ifndef NeedVarargsPrototypes
+# define NeedVarargsPrototypes YES
+# endif
+# endif
+
+
+#endif /* HasGcc (else) */
+
+#if OSMajorVersion < 5
+# define SharedAllocateLocalDefines -DINCLUDE_ALLOCA_H
+# define LibraryCCOptions /* don't want special floating point */
+#else /* OSMajorVersion >= 5, i.e. Solaris 2.0 & later */
+/* Only load libraries when needed on Solaris 7 & later */
+# if OSMinorVersion >= 7
+# define LazyLoadFlag -z lazyload -z combreloc
+# else
+# define LazyLoadFlag /* */
+# endif
+/* Link with extra mapfiles for some performance & security enhancements */
+#ifndef MapfileFlag
+# if HasSunC
+# define MapfileFlag -M
+# else
+# define MapfileFlag -Wl,-M,
+# endif
+#endif
+#ifndef Mapfile_BssAlign
+# if OSMinorVersion >= 9
+# define Mapfile_BssAlign $(MAPFILEFLAG)/usr/lib/ld/map.bssalign
+# else
+# define Mapfile_BssAlign /**/
+# endif
+#endif
+#ifndef Mapfile_PageAlign
+# if OSMinorVersion >= 10
+# define Mapfile_PageAlign $(MAPFILEFLAG)/usr/lib/ld/map.pagealign
+# else
+# define Mapfile_PageAlign /**/
+# endif
+#endif
+#ifndef Mapfile_NoExStack
+# if OSMinorVersion >= 9
+# define Mapfile_NoExStack $(MAPFILEFLAG)/usr/lib/ld/map.noexstk
+# else
+# define Mapfile_NoExStack /**/
+# endif
+#endif
+#ifndef Mapfile_NoExData
+# if defined(SparcArchitecture)
+/* SPARC archictecture requires PLT section in .data be executable, so
+ we can only make .bss, not all of .data no-exec on SPARC */
+# define Mapfile_NoExData /**/
+# else
+# if OSMinorVersion >= 10
+# define Mapfile_NoExData $(MAPFILEFLAG)/usr/lib/ld/map.noexdata
+# else
+# define Mapfile_NoExData /**/
+# endif
+# endif
+#endif
+ MAPFILEFLAG = MapfileFlag
+ MAPFILES_FOR_ALL = Mapfile_PageAlign Mapfile_NoExData
+MAPFILES_FOR_PROGS = Mapfile_BssAlign Mapfile_NoExStack
+/* ExtraLoadFlags apply to all binaries - programs & libraries */
+# ifndef ExtraLoadFlags
+# define ExtraLoadFlags LazyLoadFlag $(MAPFILES_FOR_ALL)
+# endif
+/* ExtraLoadOptions only apply to programs */
+# ifndef ExtraLoadOptions
+# define ExtraLoadOptions -B direct $(MAPFILES_FOR_PROGS)
+# endif
+#endif /* OSMajorVersion < 5 */
+
+/* 64-bit build support */
+#ifndef Solaris64bitSubdir
+# ifdef Sparc64Architecture
+# define Solaris64bitSubdir sparcv9
+# elif defined(AMD64Architecture)
+# define Solaris64bitSubdir amd64
+# endif
+#endif
+
+#ifdef Solaris64bitSubdir
+# define LibDirName Concat3(lib,/,Solaris64bitSubdir)
+#endif
+
+#if OSMajorVersion > 4
+# include <svr4.cf>
+#endif
+
+#ifndef ManKeywordsTarget
+# define ManKeywordsTarget(manpath) @@\
+man_keywords:: @@\
+ catman -M $(DESTDIR)manpath -w
+#endif
+
+#if !defined(UsePamLibrary)
+# if (OSMajorVersion > 5) || ((OSMajorVersion == 5) && (OSMinorVersion >= 4))
+# define UsePamLibrary YES
+# endif
+#endif
+
+/* PAM appeared in SunOS 5.6 */
+#if !defined(HasPam)
+# if (OSMajorVersion > 5) || (OSMajorVersion == 5 && OSMinorVersion >= 6)
+# define HasPam YES
+# endif
+#endif
+
+#ifndef PamLibraries
+#define PamLibraries -lpam
+#endif
+
+#ifndef HasMotif
+/* Solaris's Motif depends on Solaris libX11 and won't work with libX11 built
+ * from this tree, so only use it when using libX11 from outside the tree.
+ */
+# define HasMotif (defined(UseInstalled) || UseInstalledX11)
+# define MotifDir /usr/dt
+#endif /* !HasMotif */
+#ifndef HasMotif2
+/* Solaris's Motif2 version is broken and misses XmPrintShell
+ * (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=1366) */
+# define HasMotif2 NO
+#endif /* !HasMotif2 */
+
+#define MotifDefines \
+ -DNO_ISDIR -DNO_REGCOMP -DNO_ALLOCA -DBOGUS_MB_MAX -DNO_CONST
+#define PamUnixDefines -DPAM_NIS
+#define TtLargePICTable YES
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#define DtWidgetDefines DtSearchDefines
+#define DtPrintDefines DtSearchDefines
+
+#define baseDtMailDefines \
+ -DSunOS=OSMajorVersion\#\#OSMinorVersion -DMMAP_NORESERVE -DSPRO_V2
+#if !defined(i386Architecture) && !defined(AMD64Architecture)
+# define DtMailDefines baseDtMailDefines
+#else
+# define DtMailDefines -DBIG_ENDIAN baseDtMailDefines
+#endif
+
+#define ArchitectureDefines -DSUN_ARCHITECTURE
+
+#define TtClientExtraLibs ExtraLibraries -ldl -lintl
+
+#define ExportListGenSource elistgen.sun
+#define ShlibExportListOpt(filename) -M filename
+
+#define CdeProjectDefines \
+ -DMULTIBYTE -DNLS16 -DMESSAGE_CAT -D_XOPEN_VERSION=4 \
+ -D_XOPEN_SOURCE -D__EXTENSIONS__ \
+ -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
+
+
+/*
+ * Turn off HTML manpages like we do under NetBSD.
+ */
+#ifndef BuildHtmlManPages
+#define BuildHtmlManPages NO
+#endif
+
+/*
+ * Turn off seperate configuration directories.
+ */
+#ifndef UseSeparateConfDir
+#define UseSeparateConfDir NO
+#endif
+
+/* Hackery for building modules as Solaris shared objects with dependencies */
+#if MakeDllModules && DoLoadableServer
+
+/* If you change this, you will need to change find-deps.pl to match */
+#define DlModuleDependencyName(module) Concat(module,_deps)
+
+#define DlModuleTarget(module,deplist,modlist) @@\
+DepDynamicModuleTarget(module,deplist DlModuleDependencyName(module),modlist LazyLoadFlag `cat DlModuleDependencyName(module)`) @@\
+ @@\
+DlModuleDependencyName(module): @@\
+ touch $@ @@\
+ @@\
+clean:: @@\
+ RemoveFile(DlModuleDependencyName(module))
+
+#define ObjectModuleTarget(module,objects) @@\
+DlModuleTarget(Concat(module,_drv.so), objects, objects)
+
+#define LibraryModuleTarget(module,objects) @@\
+NormalLibraryTarget(module, objects) @@\
+DlModuleTarget(Concat3(lib,module,.so), objects, objects)
+
+#define DepLibraryModuleTarget(module,deplist,objects) @@\
+NormalDepLibraryTarget(module, deplist, objects) @@\
+DlModuleTarget(Concat3(lib,module,.so), deplist, objects)
+
+#endif
diff --git a/nx-X11/config/cf/sunLib.rules b/nx-X11/config/cf/sunLib.rules
new file mode 100644
index 000000000..11256b2ad
--- /dev/null
+++ b/nx-X11/config/cf/sunLib.rules
@@ -0,0 +1,133 @@
+XCOMM $Xorg: sunLib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*
+ * SunOS shared library rules
+ */
+
+XCOMM $XFree86: xc/config/cf/sunLib.rules,v 1.3 2001/01/17 16:38:49 dawes Exp $
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries YES
+#endif
+#ifndef SharedDataSeparation
+#define SharedDataSeparation YES
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef -DSHAREDCODE
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef -DSUNSHLIB
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <sunLib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -assert pure-text
+#endif
+#ifndef PositionIndependentCFlags
+#if HasGcc2
+#define PositionIndependentCFlags -fPIC
+#else
+#define PositionIndependentCFlags -pic
+#endif
+#endif
+#ifndef PositionIndependentCplusplusFlags
+#if HasGcc2ForCplusplus
+#define PositionIndependentCplusplusFlags -fPIC
+#else
+#define PositionIndependentCplusplusFlags -pic
+#endif
+#endif
+
+/*
+ * SharedDSLibDependencies - shared library dependencies with data separation
+ */
+#ifndef SharedDSLibDependencies
+#define SharedDSLibDependencies(libname,libsource,revname) _UseCat($(USRLIBDIR)/lib,libsource/lib,libname.sa.$(revname))
+#endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+#define InstallSharedLibrary(libname,rev,dest) @@\
+InstallTarget(install,Concat(lib,libname.so.rev),$(INSTLIBFLAGS),dest)
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest) @@\
+install:: Concat(lib,libname.sa.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.sa.rev) $(DESTDIR)dest @@\
+ RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.sa.rev))
+#endif /* InstallSharedLibraryData */
+
+#if HasPurify
+#define PureCleanSharedLibrary(libname,rev) @@\
+clean clean.pure:: @@\
+ $(RM) Concat3(lib,libname,_pure_*.so.rev)
+#else
+#define PureCleanSharedLibrary(libname,rev) /**/
+#endif
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) @@\
+ @@\
+PureCleanSharedLibrary(libname,rev)
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(LD) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) @@\
+ @@\
+PureCleanSharedLibrary(libname,rev)
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist) @@\
+AllTarget(Concat(lib,libname.sa.rev)) @@\
+ @@\
+Concat(lib,libname.sa.rev): salist @@\
+ $(RM) $@ @@\
+ $(AR) $@ salist @@\
+ RanLibrary($@) @@\
+ LinkBuildLibrary($@) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.sa.rev)
+#endif /* SharedLibraryDataTarget */
diff --git a/nx-X11/config/cf/sunLib.tmpl b/nx-X11/config/cf/sunLib.tmpl
new file mode 100644
index 000000000..0eaaa9144
--- /dev/null
+++ b/nx-X11/config/cf/sunLib.tmpl
@@ -0,0 +1,145 @@
+XCOMM $Xorg: sunLib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+XCOMM $XdotOrg: xc/config/cf/sunLib.tmpl,v 1.14 2005/12/03 17:20:48 alanc Exp $
+
+
+
+
+
+XCOMM $XFree86: xc/config/cf/sunLib.tmpl,v 3.12tsi Exp $
+
+/*
+ * SunOS shared library template
+ */
+
+#if OSMajorVersion <= 4
+
+# if SunPost411FCSLd
+# define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB)
+# define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+# endif
+
+#ifndef SharedX11Rev
+#define SharedX11Rev 4.30
+#endif
+#ifndef SharedOldXRev
+#define SharedOldXRev 4.20
+#endif
+#ifndef SharedXtRev
+#define SharedXtRev 4.20
+#endif
+#ifndef SharedXawRev
+#define SharedXawRev 6.10
+#endif
+#ifndef SharedXmuRev
+#define SharedXmuRev 4.20
+#endif
+#ifndef SharedXextRev
+#define SharedXextRev 4.50
+#endif
+#ifndef SharedXiRev
+#define SharedXiRev 4.20
+#endif
+#ifndef SharedXtstRev
+#define SharedXtstRev 1.20
+#endif
+
+#else /* else it's Solaris */
+
+# if ThreadedX
+# if OSMinorVersion > 3
+# define SharedThreadReqs /**/
+# endif
+# endif
+
+# define SharedX11Reqs $(LDPRELIB) SharedThreadReqs $(EXTRA_LIBRARIES) -lc DlLibrary
+# define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedOldXReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXtReqs $(LDPRELIB) $(XLIBONLY) $(SMLIB) $(ICELIB) -lc
+# define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB) -lc
+# define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) -lc
+# define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -lc
+# define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) -lnsl -lc
+# define SharedXmuuReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXextReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXiReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXtstReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedFSReqs $(EXTRA_LIBRARIES) -lc
+# define SharedICEReqs $(EXTRA_LIBRARIES) -lc
+# define SharedSMReqs $(LDPRELIB) $(ICELIB) $(EXTRA_LIBRARIES) -lc
+# define SharedXineramaReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXpReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXpmReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXResReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXrenderReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB) -lc
+# define SharedXssReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXvReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXvMCReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXfontReqs $(LDPRELIB) $(FREETYPE2LIB) GzipLibrary -lsocket MathLibrary -lc
+# define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+# define SharedFontencReqs $(LDPRELIB) GzipLibrary -lc
+# define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXxf86miscReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXxf86vmReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIBONLY) $(EXTRA_LIBRARIES) -lc
+# define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIBONLY) -lc
+# define SharedPSResReqs -lc
+# define SharedGLReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedGLUReqs $(LDPRELIBS) $(XLIB) $(GLXLIB) $(CXXLIB) MathLibrary -lc
+# define SharedGLwReqs $(LDPRELIBS) $(MOTIFLIB) $(GLXLIB) $(XTOOLLIB) $(XLIB)
+# define SharedOSMesaReqs $(LDPRELIB) $(XLIB) $(GLXLIB) MathLibrary -lc
+# define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB) -lc
+# define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB) MathLibrary -lc
+# define SharedXfixesReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXdamageReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXauReqs -lc
+# define SharedXdmcpReqs -lsocket -lc
+# define SharedXcompositeReqs $(LDPRELIB) $(XDAMAGELIB) $(XFIXESLIB) $(XLIB) -lc
+# define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XONLYLIB) -lc
+# define SharedXevieReqs $(LDPRELIB) $(XLIB)
+
+# define FixupLibReferences() /**/
+
+# define SharedPamReqs DlLibrary
+# define SharedPamUnixReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) -lnsl -lmp -lcmd SharedThreadReqs
+# define SharedPamSampleReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) SharedThreadReqs
+# define SharedPamDialAuthReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) SharedThreadReqs
+# define SharedPamRhostsAuthReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) -lsocket SharedThreadReqs
+# define SharedPamDceAuthReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) -ldce -lnsl -lsocket SharedThreadReqs
+# define SharedTtReqs -lnsl -lsocket -lintl DlLibrary -lc -lw
+# define SharedDtSvcReqs $(LDPRELIBS) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) SharedThreadReqs -lgen -lc -lsocket -lnsl DlLibrary
+# define SharedDtMmdbReqs $(LDPRELIBS) $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) SharedThreadReqs -lgen -lc -lsocket -lnsl DlLibrary
+# define SharedDtSearchReqs -lm -lc
+# define SharedDtWidgetReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) -lintl $(LDPOSTLIBS) -lw -lm -lc
+# define SharedDtHelpReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) -lw -lgen -lm -lc
+# define SharedDtPrintReqs $(LDPRELIBS) $(DTSVCLIB) $(DTHELPLIB) $(XMLIB) -lintl $(LDPOSTLIBS) -lw -lm -lc
+# define SharedDtTermReqs SharedDtHelpReqs DlLibrary -lgen
+# define SharedDtMrmReqs $(LDPRELIBS) $(DTTERMLIB) $(DTPRINTLIB) $(DTHELPLIB) $(DTWIDGETLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) -lw -lsocket -lnsl -lc
+# define SharedDtMailReqs $(LDPRELIBS) -lw $(CXXLIB) -lm DlLibrary
+# define SharedCsaReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXmReqs
+
+# define DtClientExtraLibs -lintl
+
+/* The inbuf paramter to iconv(3) is "const char**", not "char **" */
+ICONV_INBUF_DEFINE = -DICONV_INBUF_CONST=const
+
+# if HasCplusplus
+# if HasGcc2ForCplusplus
+UNSHARED_CXXLIB = -static -lC
+# elif HasSunCplusplus
+# if CplusplusCompilerMajorVersion > 3
+# ifdef CplusplusWhatdir
+UNSHARED_CXXLIB = -Bstatic -L`CplusplusWhatdir CC`/../lib -lC -Bdynamic
+# else
+UNSHARED_CXXLIB = -Bstatic -L/opt/SUNWspro/SC4.0/lib -lC -Bdynamic
+# endif
+# else
+UNSHARED_CXXLIB = -Bstatic -lC -Bdynamic -lm -lc -Bstatic
+# endif
+# endif
+# endif
+
+# define IafSysLib /**/
+# include <sv4Lib.tmpl>
+
+#endif
diff --git a/nx-X11/config/cf/sunLib.tmpl.NX.original b/nx-X11/config/cf/sunLib.tmpl.NX.original
new file mode 100644
index 000000000..0eaaa9144
--- /dev/null
+++ b/nx-X11/config/cf/sunLib.tmpl.NX.original
@@ -0,0 +1,145 @@
+XCOMM $Xorg: sunLib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+XCOMM $XdotOrg: xc/config/cf/sunLib.tmpl,v 1.14 2005/12/03 17:20:48 alanc Exp $
+
+
+
+
+
+XCOMM $XFree86: xc/config/cf/sunLib.tmpl,v 3.12tsi Exp $
+
+/*
+ * SunOS shared library template
+ */
+
+#if OSMajorVersion <= 4
+
+# if SunPost411FCSLd
+# define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB)
+# define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+# endif
+
+#ifndef SharedX11Rev
+#define SharedX11Rev 4.30
+#endif
+#ifndef SharedOldXRev
+#define SharedOldXRev 4.20
+#endif
+#ifndef SharedXtRev
+#define SharedXtRev 4.20
+#endif
+#ifndef SharedXawRev
+#define SharedXawRev 6.10
+#endif
+#ifndef SharedXmuRev
+#define SharedXmuRev 4.20
+#endif
+#ifndef SharedXextRev
+#define SharedXextRev 4.50
+#endif
+#ifndef SharedXiRev
+#define SharedXiRev 4.20
+#endif
+#ifndef SharedXtstRev
+#define SharedXtstRev 1.20
+#endif
+
+#else /* else it's Solaris */
+
+# if ThreadedX
+# if OSMinorVersion > 3
+# define SharedThreadReqs /**/
+# endif
+# endif
+
+# define SharedX11Reqs $(LDPRELIB) SharedThreadReqs $(EXTRA_LIBRARIES) -lc DlLibrary
+# define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedOldXReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXtReqs $(LDPRELIB) $(XLIBONLY) $(SMLIB) $(ICELIB) -lc
+# define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB) -lc
+# define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) -lc
+# define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -lc
+# define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) -lnsl -lc
+# define SharedXmuuReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXextReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXiReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXtstReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedFSReqs $(EXTRA_LIBRARIES) -lc
+# define SharedICEReqs $(EXTRA_LIBRARIES) -lc
+# define SharedSMReqs $(LDPRELIB) $(ICELIB) $(EXTRA_LIBRARIES) -lc
+# define SharedXineramaReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXpReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXpmReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXResReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXrenderReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB) -lc
+# define SharedXssReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXvReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXvMCReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXfontReqs $(LDPRELIB) $(FREETYPE2LIB) GzipLibrary -lsocket MathLibrary -lc
+# define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+# define SharedFontencReqs $(LDPRELIB) GzipLibrary -lc
+# define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXxf86miscReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXxf86vmReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIBONLY) $(EXTRA_LIBRARIES) -lc
+# define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIBONLY) -lc
+# define SharedPSResReqs -lc
+# define SharedGLReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedGLUReqs $(LDPRELIBS) $(XLIB) $(GLXLIB) $(CXXLIB) MathLibrary -lc
+# define SharedGLwReqs $(LDPRELIBS) $(MOTIFLIB) $(GLXLIB) $(XTOOLLIB) $(XLIB)
+# define SharedOSMesaReqs $(LDPRELIB) $(XLIB) $(GLXLIB) MathLibrary -lc
+# define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB) -lc
+# define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB) MathLibrary -lc
+# define SharedXfixesReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXdamageReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXauReqs -lc
+# define SharedXdmcpReqs -lsocket -lc
+# define SharedXcompositeReqs $(LDPRELIB) $(XDAMAGELIB) $(XFIXESLIB) $(XLIB) -lc
+# define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XONLYLIB) -lc
+# define SharedXevieReqs $(LDPRELIB) $(XLIB)
+
+# define FixupLibReferences() /**/
+
+# define SharedPamReqs DlLibrary
+# define SharedPamUnixReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) -lnsl -lmp -lcmd SharedThreadReqs
+# define SharedPamSampleReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) SharedThreadReqs
+# define SharedPamDialAuthReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) SharedThreadReqs
+# define SharedPamRhostsAuthReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) -lsocket SharedThreadReqs
+# define SharedPamDceAuthReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) -ldce -lnsl -lsocket SharedThreadReqs
+# define SharedTtReqs -lnsl -lsocket -lintl DlLibrary -lc -lw
+# define SharedDtSvcReqs $(LDPRELIBS) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) SharedThreadReqs -lgen -lc -lsocket -lnsl DlLibrary
+# define SharedDtMmdbReqs $(LDPRELIBS) $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) SharedThreadReqs -lgen -lc -lsocket -lnsl DlLibrary
+# define SharedDtSearchReqs -lm -lc
+# define SharedDtWidgetReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) -lintl $(LDPOSTLIBS) -lw -lm -lc
+# define SharedDtHelpReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) -lw -lgen -lm -lc
+# define SharedDtPrintReqs $(LDPRELIBS) $(DTSVCLIB) $(DTHELPLIB) $(XMLIB) -lintl $(LDPOSTLIBS) -lw -lm -lc
+# define SharedDtTermReqs SharedDtHelpReqs DlLibrary -lgen
+# define SharedDtMrmReqs $(LDPRELIBS) $(DTTERMLIB) $(DTPRINTLIB) $(DTHELPLIB) $(DTWIDGETLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) -lw -lsocket -lnsl -lc
+# define SharedDtMailReqs $(LDPRELIBS) -lw $(CXXLIB) -lm DlLibrary
+# define SharedCsaReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXmReqs
+
+# define DtClientExtraLibs -lintl
+
+/* The inbuf paramter to iconv(3) is "const char**", not "char **" */
+ICONV_INBUF_DEFINE = -DICONV_INBUF_CONST=const
+
+# if HasCplusplus
+# if HasGcc2ForCplusplus
+UNSHARED_CXXLIB = -static -lC
+# elif HasSunCplusplus
+# if CplusplusCompilerMajorVersion > 3
+# ifdef CplusplusWhatdir
+UNSHARED_CXXLIB = -Bstatic -L`CplusplusWhatdir CC`/../lib -lC -Bdynamic
+# else
+UNSHARED_CXXLIB = -Bstatic -L/opt/SUNWspro/SC4.0/lib -lC -Bdynamic
+# endif
+# else
+UNSHARED_CXXLIB = -Bstatic -lC -Bdynamic -lm -lc -Bstatic
+# endif
+# endif
+# endif
+
+# define IafSysLib /**/
+# include <sv4Lib.tmpl>
+
+#endif
diff --git a/nx-X11/config/cf/sunLib.tmpl.X.original b/nx-X11/config/cf/sunLib.tmpl.X.original
new file mode 100644
index 000000000..3b4613ad4
--- /dev/null
+++ b/nx-X11/config/cf/sunLib.tmpl.X.original
@@ -0,0 +1,258 @@
+XCOMM $Xorg: sunLib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+XCOMM $XdotOrg: xc/config/cf/sunLib.tmpl,v 1.14 2005/12/03 17:20:48 alanc Exp $
+
+
+
+
+
+XCOMM $XFree86: xc/config/cf/sunLib.tmpl,v 3.12tsi Exp $
+
+/*
+ * SunOS shared library template
+ */
+
+#if OSMajorVersion <= 4
+
+# if SunPost411FCSLd
+# define SharedXmuReqs $(LDPRELIBS) $(XTOOLLIB) $(XLIB)
+# define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+# endif
+
+#ifndef SharedX11Rev
+#define SharedX11Rev 4.30
+#endif
+#ifndef SharedOldXRev
+#define SharedOldXRev 4.20
+#endif
+#ifndef SharedXtRev
+#define SharedXtRev 4.20
+#endif
+#ifndef SharedXawRev
+#define SharedXawRev 6.10
+#endif
+#ifndef SharedXmuRev
+#define SharedXmuRev 4.20
+#endif
+#ifndef SharedXextRev
+#define SharedXextRev 4.50
+#endif
+#ifndef SharedXiRev
+#define SharedXiRev 4.20
+#endif
+#ifndef SharedXtstRev
+#define SharedXtstRev 1.20
+#endif
+
+#else /* else it's Solaris */
+
+/* Solaris uses single digit library versions, and versions of libraries
+ * defined in SVID specs should match the versions specified there.
+ */
+
+#ifndef SharedX11Rev
+# define SharedX11Rev 4
+#endif
+#ifndef SharedOldXRev
+# define SharedOldXRev 6
+#endif
+#ifndef SharedXextRev
+# define SharedXextRev 0
+#endif
+#ifndef SharedXauRev
+# define SharedXauRev 6
+#endif
+#ifndef SharedXdmcpRev
+# define SharedXdmcpRev 6
+#endif
+#ifndef SharedXmuRev
+# define SharedXmuRev 4
+#endif
+#ifndef SharedXmuuRev
+# define SharedXmuuRev 1
+#endif
+#ifndef SharedXpRev
+# define SharedXpRev 1
+#endif
+#ifndef SharedXpmRev
+# define SharedXpmRev 4
+#endif
+#ifndef SharedXtRev
+# define SharedXtRev 4
+#endif
+#ifndef SharedXaw6Rev
+# define SharedXaw6Rev 5
+#endif
+#ifndef SharedXiRev
+# define SharedXiRev 5
+#endif
+#ifndef SharedXtstRev
+# define SharedXtstRev 1
+#endif
+#ifndef SharedFSRev
+# define SharedFSRev 5
+#endif
+#ifndef SharedICERev
+# define SharedICERev 6
+#endif
+#ifndef SharedSMRev
+# define SharedSMRev 6
+#endif
+#ifndef SharedXcursor
+# define SharedXcursorRev 1
+#endif
+#ifndef SharedXdamageRev
+# define SharedXdamageRev 1
+#endif
+#ifndef SharedXevieRev
+# define SharedXevieRev 1
+#endif
+#ifndef SharedXfixesRev
+# define SharedXfixesRev 1
+#endif
+#ifndef SharedXftRev
+# define SharedXftRev 2
+#endif
+#ifndef SharedXineramaRev
+# define SharedXineramaRev 1
+#endif
+#ifndef SharedXrenderRev
+# define SharedXrenderRev 1
+#endif
+#ifndef SharedXResRev
+# define SharedXResRev 1
+#endif
+#ifndef SharedXvRev
+# define SharedXvRev 1
+#endif
+#ifndef SharedXvMCRev
+# define SharedXvMCRev 1
+#endif
+#ifndef SharedXrandrRev
+# define SharedXrandrRev 2
+#endif
+#ifndef SharedXssRev
+# define SharedXssRev 1
+#endif
+#ifndef SharedFontconfigRev
+# define SharedFontconfigRev 1
+#endif
+#ifndef SharedGlxRev
+# define SharedGlxRev 1
+#endif
+#ifndef SharedGluRev
+# define SharedGluRev 1
+#endif
+#ifndef SharedGLwRev
+# define SharedGLwRev 1
+#endif
+#ifndef SharedOSMesaRev
+# define SharedOSMesaRev 4
+#endif
+#ifndef SharedxkbfileRev
+# define SharedxkbfileRev 5
+#endif
+#ifndef SharedXxf86miscRev
+# define SharedXxf86miscRev 1
+#endif
+#ifndef SharedXxf86vmRev
+# define SharedXxf86vmRev 1
+#endif
+
+# if ThreadedX
+# if OSMinorVersion > 3
+# define SharedThreadReqs /**/
+# endif
+# endif
+
+# define SharedX11Reqs $(LDPRELIB) SharedThreadReqs $(EXTRA_LIBRARIES) -lc DlLibrary
+# define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedOldXReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXtReqs $(LDPRELIB) $(XLIBONLY) $(SMLIB) $(ICELIB) -lc
+# define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB) -lc
+# define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB) -lc
+# define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB) -lc
+# define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB) -lnsl -lc
+# define SharedXmuuReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXextReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXiReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXtstReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedFSReqs $(EXTRA_LIBRARIES) -lc
+# define SharedICEReqs $(EXTRA_LIBRARIES) -lc
+# define SharedSMReqs $(LDPRELIB) $(ICELIB) $(EXTRA_LIBRARIES) -lc
+# define SharedXineramaReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXpReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXpmReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXResReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXrenderReqs $(LDPRELIB) $(XLIBONLY) -lc
+# define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB) -lc
+# define SharedXssReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXvReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXvMCReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXfontReqs $(LDPRELIB) $(FREETYPE2LIB) GzipLibrary -lsocket MathLibrary -lc
+# define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+# define SharedFontencReqs $(LDPRELIB) GzipLibrary -lc
+# define SharedXxf86dgaReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXxf86miscReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXxf86vmReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIBONLY) $(EXTRA_LIBRARIES) -lc
+# define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIBONLY) -lc
+# define SharedPSResReqs -lc
+# define SharedGLReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedGLUReqs $(LDPRELIBS) $(XLIB) $(GLXLIB) $(CXXLIB) MathLibrary -lc
+# define SharedGLwReqs $(LDPRELIBS) $(MOTIFLIB) $(GLXLIB) $(XTOOLLIB) $(XLIB)
+# define SharedOSMesaReqs $(LDPRELIB) $(XLIB) $(GLXLIB) MathLibrary -lc
+# define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB) -lc
+# define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB) MathLibrary -lc
+# define SharedXfixesReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXdamageReqs $(LDPRELIB) $(XLIB) -lc
+# define SharedXauReqs -lc
+# define SharedXdmcpReqs -lsocket -lc
+# define SharedXcompositeReqs $(LDPRELIB) $(XDAMAGELIB) $(XFIXESLIB) $(XLIB) -lc
+# define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XONLYLIB) -lc
+# define SharedXevieReqs $(LDPRELIB) $(XLIB)
+
+# define FixupLibReferences() /**/
+
+# define SharedPamReqs DlLibrary
+# define SharedPamUnixReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) -lnsl -lmp -lcmd SharedThreadReqs
+# define SharedPamSampleReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) SharedThreadReqs
+# define SharedPamDialAuthReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) SharedThreadReqs
+# define SharedPamRhostsAuthReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) -lsocket SharedThreadReqs
+# define SharedPamDceAuthReqs $(LDPRELIBS) -lpam $(LDPOSTLIBS) -ldce -lnsl -lsocket SharedThreadReqs
+# define SharedTtReqs -lnsl -lsocket -lintl DlLibrary -lc -lw
+# define SharedDtSvcReqs $(LDPRELIBS) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) SharedThreadReqs -lgen -lc -lsocket -lnsl DlLibrary
+# define SharedDtMmdbReqs $(LDPRELIBS) $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) SharedThreadReqs -lgen -lc -lsocket -lnsl DlLibrary
+# define SharedDtSearchReqs -lm -lc
+# define SharedDtWidgetReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) -lintl $(LDPOSTLIBS) -lw -lm -lc
+# define SharedDtHelpReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) -lw -lgen -lm -lc
+# define SharedDtPrintReqs $(LDPRELIBS) $(DTSVCLIB) $(DTHELPLIB) $(XMLIB) -lintl $(LDPOSTLIBS) -lw -lm -lc
+# define SharedDtTermReqs SharedDtHelpReqs DlLibrary -lgen
+# define SharedDtMrmReqs $(LDPRELIBS) $(DTTERMLIB) $(DTPRINTLIB) $(DTHELPLIB) $(DTWIDGETLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(LDPOSTLIBS) -lw -lsocket -lnsl -lc
+# define SharedDtMailReqs $(LDPRELIBS) -lw $(CXXLIB) -lm DlLibrary
+# define SharedCsaReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXmReqs
+
+# define DtClientExtraLibs -lintl
+
+/* The inbuf paramter to iconv(3) is "const char**", not "char **" */
+ICONV_INBUF_DEFINE = -DICONV_INBUF_CONST=const
+
+# if HasCplusplus
+# if HasGcc2ForCplusplus
+UNSHARED_CXXLIB = -static -lC
+# elif HasSunCplusplus
+# if CplusplusCompilerMajorVersion > 3
+# ifdef CplusplusWhatdir
+UNSHARED_CXXLIB = -Bstatic -L`CplusplusWhatdir CC`/../lib -lC -Bdynamic
+# else
+UNSHARED_CXXLIB = -Bstatic -L/opt/SUNWspro/SC4.0/lib -lC -Bdynamic
+# endif
+# else
+UNSHARED_CXXLIB = -Bstatic -lC -Bdynamic -lm -lc -Bstatic
+# endif
+# endif
+# endif
+
+# define IafSysLib /**/
+# include <sv4Lib.tmpl>
+
+#endif
diff --git a/nx-X11/config/cf/sv3Lib.rules b/nx-X11/config/cf/sv3Lib.rules
new file mode 100644
index 000000000..00c1d7d3d
--- /dev/null
+++ b/nx-X11/config/cf/sv3Lib.rules
@@ -0,0 +1,252 @@
+XCOMM $Xorg: sv3Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/sv3Lib.rules,v 3.5 2002/11/22 22:55:56 tsi Exp $
+/*
+ * SVR3 shared library rules
+ * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany
+ * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de
+ * Conception derived partially from work of Thomas Roell
+ */
+
+#ifndef HasSharedLibraries
+#define HasSharedLibraries NO /* JUST FOR NOW */
+#endif
+#ifndef ForceNormalLib
+#define ForceNormalLib YES
+#endif
+
+#ifndef SharedLibSM
+#define SharedLibSM HasSharedLibraries
+#endif
+#ifndef SharedLibXau
+#define SharedLibXau HasSharedLibraries
+#endif
+#ifndef SharedLibXdmcp
+#define SharedLibXdmcp HasSharedLibraries
+#endif
+#ifndef SharedLibXi
+#define SharedLibXi HasSharedLibraries
+#endif
+#ifndef SharedLibXtst
+#define SharedLibXtst HasSharedLibraries
+#endif
+#ifndef SharedLibICE
+#define SharedLibICE HasSharedLibraries
+#endif
+#ifndef SharedLibFS
+#define SharedLibFS HasSharedLibraries
+#endif
+#ifndef SharedLibX11
+#define SharedLibX11 HasSharedLibraries
+#endif
+#ifndef SharedOldX
+#define SharedOldX NO /* it's obsolete */
+#endif
+#ifndef SharedLibXt
+#define SharedLibXt HasSharedLibraries
+#endif
+#ifndef SharedLibXaw
+#define SharedLibXaw HasSharedLibraries
+#endif
+#ifndef SharedLibXmu
+#define SharedLibXmu HasSharedLibraries
+#endif
+#ifndef SharedLibXext
+#define SharedLibXext HasSharedLibraries
+#endif
+
+#ifndef SharedDataSeparation
+#define SharedDataSeparation NO
+#endif
+#ifndef SharedCodeDef
+#define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+#define SharedLibraryDef -DSVR3SHLIB
+#endif
+#ifndef ShLibIncludeFile
+#define ShLibIncludeFile <sv3Lib.tmpl>
+#endif
+#ifndef SharedLibraryLoadFlags
+#define SharedLibraryLoadFlags -q
+#endif
+
+#ifndef PositionIndependentCFlags
+# if HasGcc2
+# define PositionIndependentCFlags -msvr3-shlib
+# else
+# define PositionIndependentCFlags /**/
+# endif
+#endif
+
+#ifndef PositionIndependentCplusplusFlags
+# if HasGcc2
+# define PositionIndependentCplusplusFlags -msvr3-shlib
+# else
+# define PositionIndependentCplusplusFlags /**/
+# endif
+#endif
+
+#ifndef StripInstalledPrograms
+# define StripInstalledPrograms NO
+#endif
+
+#if 0
+/*
+ * LibCleanDir - helper for cleaning library object subdirectories
+ */
+#ifndef LibCleanDir
+#define LibCleanDir(dir) -@if [ -d dir ]; then \ @@\
+ (set -x; cd dir; $(RM) *.o *.sd); else exit 0; fi
+#endif
+
+/*
+ * SharedLibObjCompile - compile fragment for shared objects
+ */
+#ifndef SharedLibObjCompile
+#define SharedLibObjCompile(options) $(RM) shared/$@ @@\
+ cat import.h $*.c >_$*.c @@\
+ $(CC) -c $(ANSICCOPTIONS) $(CCOPTIONS) $(ALLDEFINES) options \ @@\
+$(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) $(CDEBUGFLAGS) $(CLIBDEBUGFLAGS) \@@\
+_$*.c @@\
+ $(MV) _$*.o shared/$@ @@\
+ $(RM) _$*.c
+#endif
+
+/*
+ * NormalSharedLibObjCompile - compile fragment for shared object when
+ * a normal library is not being built
+ */
+#ifndef NormalSharedLibObjCompile
+#define NormalSharedLibObjCompile(options) $(RM) $@ @@\
+ cat import.h $*.c >_$*.c @@\
+ $(CC) -c $(CFLAGS) options $(SHLIBDEF) $(SHAREDCODEDEF) $(PICFLAGS) _$*.c @@\
+ $(MV) _$*.o $@ @@\
+ $(RM) _$*.c
+#endif
+
+
+#ifndef LibraryObjectRule
+#define LibraryObjectRule() @@\
+all:: @@\
+ _DebuggedLibMkdir() @@\
+ _ProfiledLibMkdir() @@\
+ _SharedLibMkdir() @@\
+ @@\
+includes:: @@\
+ _DebuggedLibMkdir() @@\
+ _ProfiledLibMkdir() @@\
+ _SharedLibMkdir() @@\
+ @@\
+.c.o: @@\
+ _DebuggedObjCompile($(_NOOP_)) @@\
+ _ProfiledObjCompile($(_NOOP_)) @@\
+ _SharedObjCompile($(_NOOP_)) @@\
+ _NormalObjCompile($(_NOOP_)) @@\
+ @@\
+.SUFFIXES: .sd @@\
+.c.sd: @@\
+ _SharedDatCompile(-DSVR3SHDAT) @@\
+ @@\
+clean:: @@\
+ _DebuggedCleanDir() @@\
+ _ProfiledCleanDir() @@\
+ _SharedCleanDir() @@\
+
+#endif /* LibraryObjectRule */
+
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+#if StripInstalledPrograms
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\
+ MakeDir($(DESTDIR)$(LIBDIR)/shlib) @@\
+ $(INSTALL) -c $(INSTPGMFLAGS) Concat(lib,libname.rev) \ @@\
+ $(DESTDIR)$(LIBDIR)/shlib @@\
+ strip Concat($(DESTDIR)$(LIBDIR)/shlib/lib,libname.rev) @@\
+ mcs -d Concat($(DESTDIR)$(LIBDIR)/shlib/lib,libname.rev)
+#else
+#define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) Concat3(lib,libname,_s.a) $(DESTDIR)dest @@\
+ MakeDir($(DESTDIR)$(LIBDIR)/shlib) @@\
+ $(INSTALL) -c $(INSTPGMFLAGS) Concat(lib,libname.rev) \ @@\
+ $(DESTDIR)$(LIBDIR)/shlib
+#endif
+
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+#define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+#define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.rev)) @@\
+ @@\
+Concat(lib,libname.rev): solist @@\
+ $(RM) $@ Concat3(lib,libname,_s.a) @@\
+ $(CPP) -DDOWN=down ConnectionFlags ShlibDefines Concat(lib,libname.def) | \ @@\
+ sed -e '/^# *[0-9][0-9]* *.*$$/d; /^$$/d' >spec.cpp @@\
+ sed -e '1,/#libraries/d; /#externals/,$$d' spec.cpp | \ @@\
+ nawk '{ system("ar x " $$1 " " $$2 )}' @@\
+ echo "#target " Concat($(LIBDIR)/shlib/lib,libname.rev) >spec @@\
+ sed -e '/#libraries/,$$d' spec.cpp >>spec @@\
+ mkshlib -s spec -t $@ -h Concat3(lib,libname,_s.a) $(SHLIBLDFLAGS) @@\
+ ar rulv Concat3(lib,libname,_s.a) `sed -e '1,/#externals/d' spec.cpp` @@\
+ $(RM) spec.cpp spec @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.rev) Concat3(lib,libname,_s.a)
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+#define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.rev)) @@\
+ @@\
+Concat(lib,libname.rev): deplist @@\
+ $(RM) $@ Concat3(lib,libname,_s.a) @@\
+ $(CPP) -DDOWN=down ConnectionFlags ShlibDefines Concat(lib,libname.def) | \ @@\
+ sed -e '/^# *[0-9][0-9]* *.*$$/d; /^$$/d' >spec.cpp @@\
+ sed -e '1,/#libraries/d; /#externals/,$$d' spec.cpp | \ @@\
+ nawk '{ system("ar x " $$1 " " $$2 )}' @@\
+ echo "#target " Concat($(LIBDIR)/shlib/lib,libname.rev) >spec @@\
+ sed -e '/#libraries/,$$d' spec.cpp >>spec @@\
+ mkshlib -s spec -t $@ -h Concat3(lib,libname,_s.a) $(SHLIBLDFLAGS) @@\
+ ar rulv Concat3(lib,libname,_s.a) `sed -e '1,/#externals/d' spec.cpp` @@\
+ $(RM) spec.cpp spec @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.rev) Concat3(lib,libname,_s.a)
+
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+#define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
+
+#endif
diff --git a/nx-X11/config/cf/sv3Lib.tmpl b/nx-X11/config/cf/sv3Lib.tmpl
new file mode 100644
index 000000000..c9fd32331
--- /dev/null
+++ b/nx-X11/config/cf/sv3Lib.tmpl
@@ -0,0 +1,70 @@
+XCOMM $Xorg: sv3Lib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/sv3Lib.tmpl,v 3.2 2001/01/17 16:38:49 dawes Exp $
+/*
+ * SVR3 shared library template
+ * Copyright (c) 1992, 1993 by Thomas Wolfram, Berlin, Germany
+ * Author: Thomas Wolfram, thomas@aeon.in-berlin.de, wolf@prz.tu-berlin.de
+ * Conception derived partially from work of Thomas Roell
+ */
+
+#ifndef SharedXlibRev
+#define SharedXlibRev 6.0.0
+#endif
+#ifndef SharedOldXRev
+#define SharedOldXRev 6.0
+#endif
+#ifndef SharedXtRev
+#define SharedXtRev 6.0
+#endif
+#ifndef SharedXawRev
+#define SharedXawRev 6.0
+#endif
+#ifndef SharedXmuRev
+#define SharedXmuRev 6.0
+#endif
+#ifndef SharedXextRev
+#define SharedXextRev 6.0
+#endif
+#ifndef SharedXinputRev
+#define SharedXinputRev 6.0
+#endif
+
+ SHLIBLDFLAGS = SharedLibraryLoadFlags
+ PICFLAGS = PositionIndependentCFlags
+
+/*
+ * and now a little bit of magic for using imake without source tree; if we
+ * are using shared libraries, we really do not need to depend on anything
+ */
+#if SharedLibXext
+ DEPEXTENSIONLIB = _UseCat($(USRLIBDIR),$(EXTENSIONSRC)/lib,/libXext_s.a)
+ EXTENSIONLIB = LoaderLibPrefix _Use(-lXext_s, $(DEPEXTENSIONLIB))
+#endif
+#if SharedLibX
+ DEPXLIB = $(DEPEXTENSIONLIB) _UseCat($(USRLIBDIR),$(XLIBSRC),/libX11_s.a)
+ XLIB = $(EXTENSIONLIB) LoaderLibPrefix _Use(-lX11_s,$(XLIBSRC)/libX11_s.a)
+#endif
+#if SharedLibXmu
+ DEPXMULIB = _UseCat($(USRLIBDIR),$(XMUSRC),/libXmu_s.a)
+ XMULIB = LoaderLibPrefix _Use(-lXmu_s,$(DEPXMULIB))
+#endif
+#if SharedOldLibX
+ DEPOLDXLIB = _UseCat($(USRLIBDIR),$(OLDXLIBSRC),/liboldX_s.a)
+ OLDXLIB = LoaderLibPrefix _Use(-loldX_s,$(DEPOLDXLIB))
+#endif
+#if SharedLibXt
+ DEPXTOOLLIB = _UseCat($(USRLIBDIR),$(TOOLKITSRC),/libXt_s.a)
+ XTOOLLIB = LoaderLibPrefix _Use(-lXt_s,$(DEPXTOOLLIB))
+#endif
+#if SharedLibXaw
+ DEPXAWLIB = _UseCat($(USRLIBDIR),$(AWIDGETSRC),/libXaw_s.a)
+ XAWLIB = LoaderLibPrefix _Use(-lXaw_s,$(DEPXAWLIB))
+#endif
+#if SharedLibXinput
+ DEPXILIB = _UseCat($(USRLIBDIR),$(XILIBSRC),/libXi_s.a)
+ XILIB = LoaderLibPrefix _Use(-lXi_s,$(DEPXILIB))
+#endif
+
diff --git a/nx-X11/config/cf/sv4Lib.rules b/nx-X11/config/cf/sv4Lib.rules
new file mode 100644
index 000000000..e027fdbee
--- /dev/null
+++ b/nx-X11/config/cf/sv4Lib.rules
@@ -0,0 +1,206 @@
+XCOMM $Xorg: sv4Lib.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*
+ * SVR4 shared library rules
+ */
+
+XCOMM $XFree86: xc/config/cf/sv4Lib.rules,v 3.8tsi Exp $
+
+#ifndef HasSharedLibraries
+# define HasSharedLibraries YES
+#endif
+#ifndef SharedDataSeparation
+# define SharedDataSeparation NO
+#endif
+#ifndef HasGcc2ForCplusplus
+# define HasGcc2ForCplusplus HasGcc2
+#endif
+#ifndef SharedCodeDef
+# define SharedCodeDef /**/
+#endif
+#ifndef SharedLibraryDef
+# define SharedLibraryDef /**/
+#endif
+#ifndef ShLibIncludeFile
+# define ShLibIncludeFile <sv4Lib.tmpl>
+#endif
+#ifndef SharedLibraryLdCmd
+# define SharedLibraryLdCmd $(LD)
+#endif
+#ifndef SharedLibraryLoadFlags
+# define SharedLibraryLoadFlags -G -z text
+#endif
+#ifndef RpathLoadFlags
+#define RpathLoadFlags /**/
+#endif
+#ifndef LibraryRpathLoadFlags
+#define LibraryRpathLoadFlags RpathLoadFlags
+#endif
+#ifndef HardCodeLibdirFlag
+#define HardCodeLibdirFlag RpathLoadFlags
+#endif
+#ifndef PositionIndependentCFlags
+# if HasGcc2
+# define PositionIndependentCFlags -fPIC
+# else
+# define PositionIndependentCFlags -K PIC
+# endif
+#endif
+#ifndef PositionIndependentCplusplusFlags
+# if HasGcc2ForCplusplus
+# define PositionIndependentCplusplusFlags -fPIC
+# else
+# define PositionIndependentCplusplusFlags -K PIC
+# endif
+#endif
+#ifndef UseExportLists
+# define UseExportLists NO
+#endif
+#ifndef StripInstalledPrograms
+# define StripInstalledPrograms NO
+#endif
+
+/*
+ * InstallSharedLibrary - generate rules to install the shared library.
+ */
+#ifndef InstallSharedLibrary
+#if StripInstalledPrograms
+# define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ mcs -d Concat($(DESTDIR)dest/lib,libname.so.rev) @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\
+ cd $(DESTDIR)dest; \ @@\
+ $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi
+#else
+# define InstallSharedLibrary(libname,rev,dest) @@\
+install:: Concat(lib,libname.so.rev) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) $(INSTALLFLAGS) $(INSTLIBFLAGS) Concat(lib,libname.so.rev) $(DESTDIR)dest @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat($(DESTDIR)dest/lib,libname.so); \ @@\
+ cd $(DESTDIR)dest; \ @@\
+ $(LN) Concat(lib,libname.so.rev) Concat(lib,libname.so)); fi
+#endif
+
+#endif /* InstallSharedLibrary */
+
+/*
+ * InstallSharedLibraryData - generate rules to install the shared library data
+ */
+#ifndef InstallSharedLibraryData
+# define InstallSharedLibraryData(libname,rev,dest)
+#endif /* InstallSharedLibraryData */
+
+#ifndef LinkWithExports
+# if UseExportLists
+# define LinkWithExports(libname,rev,solist,down,up) \
+ (cd down; $(CCENVSETUP) SharedLibraryLdCmd -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS)) @@\
+ if [ -f Concat(lib,libname.elist) ]; then \ @@\
+ $(RM) down/$@.exports $@.list; \ @@\
+ $(CPP) $(ALLINCLUDES) $(EXTRA_DEFINES) $(PROTO_DEFINES) $(THREADS_DEFINES) $(DEFINES) Concat(lib,libname.elist) | CppSedMagic >$@.list; \ @@\
+ $(EXPORTLISTGEN) $@~ $@.list > down/$@.exports; \ @@\
+ (cd down; $(CCENVSETUP) SharedLibraryLdCmd -o up/$@~ $(SHLIBLDFLAGS) -h $@ ShlibExportListOpt($@.exports) solist $(REQUIREDLIBS)); \ @@\
+ $(RM) down/$@.exports $@.list; \ @@\
+ fi;
+# else
+# define LinkWithExports(libname,rev,solist,down,up) \
+ (cd down; $(CCENVSETUP) SharedLibraryLdCmd -o up/$@~ $(SHLIBLDFLAGS) -h $@ solist $(REQUIREDLIBS))
+# endif
+#endif
+
+/*
+ * SharedLibraryTarget - generate rules to create a shared library;
+ * build it into a different name so that we do not hose people by having
+ * the library gone for long periods.
+ */
+#ifndef SharedLibraryTarget
+# define SharedLibraryTarget(libname,rev,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): solist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ LinkWithExports(libname,rev,solist,down,up) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedLibraryTarget */
+
+/*
+ * SharedDepLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepLibraryTarget
+# define SharedDepLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ LinkWithExports(libname,rev,solist,down,up) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev) Concat(lib,libname.so)
+
+#endif /* SharedDepLibraryTarget */
+
+/*
+ * SharedDepCplusplusLibraryTarget - generate rules to create a shared library.
+ */
+#ifndef SharedDepCplusplusLibraryTarget
+#define SharedDepCplusplusLibraryTarget(libname,rev,deplist,solist,down,up) @@\
+AllTarget(Concat(lib,libname.so.rev)) @@\
+ @@\
+Concat(lib,libname.so.rev): deplist $(EXTRALIBRARYDEPS) @@\
+ $(RM) $@~ @@\
+ (cd down; $(CXX) -o up/$@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS)) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @if $(SOSYMLINK); then (set -x; \ @@\
+ $(RM) Concat(lib,libname.so); \ @@\
+ $(LN) $@ Concat(lib,libname.so)); fi @@\
+ LinkBuildLibrary($@) @@\
+ LinkBuildLibraryMaybe(Concat(lib,libname.so),$(SOSYMLINK)) @@\
+ @@\
+clean:: @@\
+ $(RM) Concat(lib,libname.so.rev)
+#endif /* SharedDepCplusplusLibraryTarget */
+
+
+#ifndef SharedDepModuleTarget
+#define SharedDepModuleTarget(name,deps,solist) @@\
+AllTarget(name) @@\
+ @@\
+name: deps @@\
+ $(RM) $@~ @@\
+ SharedLibraryLdCmd -o $@~ $(SHLIBLDFLAGS) solist $(REQUIREDLIBS) @@\
+ $(RM) $@ @@\
+ $(MV) $@~ $@ @@\
+ @@\
+clean:: @@\
+ $(RM) name
+
+#endif /* SharedDepModuleTarget */
+
+
+/*
+ * SharedLibraryDataTarget - generate rules to create shlib data file;
+ */
+#ifndef SharedLibraryDataTarget
+# define SharedLibraryDataTarget(libname,rev,salist)
+#endif /* SharedLibraryTarget */
diff --git a/nx-X11/config/cf/sv4Lib.tmpl b/nx-X11/config/cf/sv4Lib.tmpl
new file mode 100644
index 000000000..d209e83ff
--- /dev/null
+++ b/nx-X11/config/cf/sv4Lib.tmpl
@@ -0,0 +1,89 @@
+XCOMM $Xorg: sv4Lib.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*
+ * SVR4 shared library template
+ */
+
+XCOMM $XFree86: xc/config/cf/sv4Lib.tmpl,v 3.7 2003/05/29 21:56:57 herrb Exp $
+
+/* SVR4 shared libraries are deficient in link semantics */
+XMULIBONLY = -lXmu
+#ifndef FixupLibReferences
+# define FixupLibReferences() @@\
+XMULIB = $(XMULIBONLY) -z nodefs
+#endif
+#ifndef XawClientLibs
+# define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+#if 0
+/* This causes problems on SVR4.0 */
+#ifndef SharedICEReqs
+# define SharedICEReqs -lsocket
+#endif
+#endif
+
+#if ThreadedX
+# ifndef SharedThreadReqs
+# define SharedThreadReqs -lthread
+# endif
+# ifndef SharedX11Reqs
+# define SharedX11Reqs -lthread
+# endif
+#else
+# ifndef SharedThreadReqs
+# define SharedThreadReqs
+# endif
+#endif
+
+#ifndef SharedXReqs
+# define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB) SharedThreadReqs $(LDPOSTLIBS)
+#endif
+
+#ifndef SharedXlibi18nReqs
+# define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY)
+#endif
+
+#ifndef SharedXmReqs
+# define SharedXmReqs $(LDPRELIBS) SharedXReqs -lgen -lsocket -lnsl -lw -lc
+#endif
+
+#ifndef SharedMrmReqs
+# define SharedMrmReqs $(LDPRELIBS) $(XMLIB) SharedXReqs -lgen -lsocket -lnsl -lw -lc
+#endif
+
+#ifndef SharedUilReqs
+# define SharedUilReqs $(LDPRELIBS) $(MRESOURCELIB) $(XMLIB) SharedXReqs -lgen -lsocket -lnsl -lw -lc
+#endif
+
+#ifndef SharedDtSvcReqs
+# define SharedDtSvcReqs $(LDPRELIBS) $(TTLIB) $(XMLIB) SharedXReqs
+#endif
+
+#ifndef SharedDtMmdbReqs
+# define SharedDtMmdbReqs $(LDPRELIBS) $(DTSVCLIB) $(TTLIB) $(XMLIB) SharedXReqs
+#endif
+
+#ifndef SharedDtHelpReqs
+# define SharedDtHelpReqs $(LDPRELIBS) $(DTSVCLIB) $(XMLIB) SharedXReqs
+#endif
+
+#ifndef DtClientExtraLibs
+# define DtClientExtraLibs -lresolv
+#endif
+
+REGEXSYSLIB = -lgen
+DYNLIBSYSLIB = -ldl
+
+#ifndef IafSysLib
+# define IafSysLib -liaf
+#endif
+IAFSYSLIB = IafSysLib
+
+#ifndef SharedGLUReqs
+# if HasGcc2ForCplusplus
+# define SharedGLUReqs $(LDPRELIBS) $(XLIB) $(GLXLIB) $(CXXLIB)
+# else
+# define SharedGLUReqs $(LDPRELIBS) $(XLIB) $(GLXLIB)
+# endif
+#endif
diff --git a/nx-X11/config/cf/svr3.cf b/nx-X11/config/cf/svr3.cf
new file mode 100644
index 000000000..88ee4faab
--- /dev/null
+++ b/nx-X11/config/cf/svr3.cf
@@ -0,0 +1,348 @@
+XCOMM $Xorg: svr3.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/svr3.cf,v 3.15 2002/08/19 03:16:31 tsi Exp $
+
+#ifndef HasGcc
+#define HasGcc YES
+#endif
+#ifndef HasGcc2
+#define HasGcc2 YES
+#endif
+#ifndef HasGcc3
+#define HasGcc3 NO
+#endif
+#ifndef GccUsesGas
+#define GccUsesGas NO
+#endif
+#ifndef UseGas
+#define UseGas NO
+#endif
+#ifndef GnuCpp
+#define GnuCpp NO
+#endif
+
+#ifndef Gcc2MOption
+# if HasGcc2
+# define Gcc2MOption /* */
+# else
+# define Gcc2MOption /* */
+# endif
+#endif
+
+#ifndef HasShadowPasswd
+# define HasShadowPasswd YES
+#endif
+
+#ifndef HasLibCrypt
+# define HasLibCrypt NO
+#endif
+
+#ifndef HasSVR3mmapDrv
+# define HasSVR3mmapDrv NO
+#endif
+
+#if HasSVR3mmapDrv
+# define SVR3mmapFlags -DHAS_SVR3_MMAPDRV
+#else
+# define SVR3mmapFlags /**/
+#endif
+
+#ifndef HasSockets
+# define HasSockets YES
+#endif
+
+#ifndef XmanSearchPath
+#define XmanSearchPath /usr/man
+#endif
+
+/*
+ * Most SVR3 do not have symbolic links, only some of the newer ones
+ */
+#ifndef HasSymLinks
+# define HasSymLinks NO
+#endif
+
+#ifndef MotifBC
+# define MotifBC YES
+#endif
+
+#ifndef CompressAllFonts
+# define CompressAllFonts YES
+#endif
+
+/*
+ * A default OS name
+ */
+#ifndef OSName
+#ifdef i386Architecture
+#define OSName UNIX System V/386 Release 3
+#else
+#define OSName UNIX System V Release 3
+#endif
+#endif
+#ifndef OSVendor
+#define OSVendor /**/
+#endif
+
+/*
+ * The default version will be 3.0.0 which should be
+ * the least common denominator of all SVR3
+ */
+
+#ifndef OSMajorVersion
+#define OSMajorVersion 3
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 0
+#endif
+#ifndef BootstrapCFlags
+#ifdef SYSV386
+#define BootstrapCFlags -DSYSV -DSYSV386
+#else
+#define BootstrapCFlags -DSYSV
+#endif
+#endif
+
+/* Some stuff that all SYSV's should have */
+
+#define SystemV YES
+
+#ifndef NeedBerklib
+#define NeedBerklib YES
+#endif
+#ifndef HasPoll
+#define HasPoll YES
+#endif
+#ifndef SVR3Architecture
+#define SVR3Architecture
+#endif
+#ifndef PatheticCpp
+#define PatheticCpp YES
+#endif
+
+#ifndef StandardDefines
+#ifdef i386Architecture
+#define StandardDefines -DSYSV OSDefines -Di386
+#else
+#define StandardDefines -DSYSV OSDefines
+#endif
+#endif
+
+#ifndef ServerOSDefines
+# ifdef i386Architecture
+# define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
+# else
+# define ServerOSDefines -DDDXTIME
+# endif
+#endif
+
+#ifndef XawI18nDefines
+# define XawI18nDefines -DUSE_XWCHAR_STRING
+#endif
+
+#ifndef DefaultCDebugFlags
+# if HasGcc2
+# if defined(i386Architecture)
+# define DefaultCDebugFlags DefaultGcc2i386Opt
+# else
+# define DefaultCDebugFlags -O2
+# endif
+# else
+# define DefaultCDebugFlags -O
+# endif
+#endif
+
+#ifndef LdCombineFlags
+#define LdCombineFlags -r
+#endif
+
+#if HasGcc
+# if HasGcc2
+# define DefaultCCOptions Gcc2MOption -DNO_ASM -fpcc-struct-return \
+ -fwritable-strings
+# define LibraryCCOptions Gcc2MOption -DNO_ASM -fpcc-struct-return
+# if defined(i386Architecture)
+# define OptimizedCDebugFlags DefaultGcc2i386Opt
+# else
+# define OptimizedCDebugFlags -O2
+# endif
+# else
+# define DefaultCCOptions -DNO_ASM -fpcc-struct-return -fwritable-strings
+# define LibraryCCOptions -DNO_ASM -fpcc-struct-return
+# define OptimizedCDebugFlags -O -fstrength-reduce
+# endif
+# define ShlibDefines -D__GNUC__ $(XDMAUTHDEFS)
+#else
+# define ShlibDefines $(XDMAUTHDEFS)
+#endif
+
+#ifndef Malloc0ReturnsNull
+#define Malloc0ReturnsNull YES
+#endif
+
+#ifndef SocketLibraries
+# define SocketLibraries /**/
+#endif
+#ifndef LocalLibraries
+# define LocalLibraries /**/
+#endif
+#ifndef ExtraLibraries
+# if HasSockets
+# define ExtraLibraries SocketLibraries LocalLibraries
+# else
+# define ExtraLibraries LocalLibraries
+# endif
+#endif
+
+#if RemoveDSDENroffMacros
+# define RemoveDSDENroffMacrosCmd sed -e '/^\.D[S|E]$$/d'
+#else
+# define RemoveDSDENroffMacrosCmd cat
+#endif
+
+#ifndef ConnectionFlags
+# define ConnectionFlags -DLOCALCONN -DTCPCONN
+#endif
+
+#ifndef FormattedManPages
+# define FormattedManPages YES
+#endif
+
+#ifndef ManSuffix
+# define ManSuffix 1x
+# define ManDir $(MANSOURCEPATH)1
+#endif
+#ifndef LibManSuffix
+# define LibManSuffix 3x
+# define LibmanDir $(MANSOURCEPATH)3
+#endif
+#ifndef FileManSuffix
+# define FileManSuffix 4
+#endif
+
+/*
+ * Compress manual pages, default on ISC and SCO
+ */
+#ifndef CompressManPages
+# define CompressManPages YES
+#endif
+
+/*
+ * The .DS and .DE macros used in some manual pages are obsolete
+ * in the often used ISC's Textprocessing Workbench 2.1.0 and break it,
+ * so it's better to remove these previously
+ */
+#ifndef RemoveDSDENroffMacros
+# define RemoveDSDENroffMacros NO
+#endif
+
+#if RemoveDSDENroffMacros
+# define RemoveDSDENroffMacrosCmd sed -e '/^\.D[S|E]$$/d'
+#else
+# define RemoveDSDENroffMacrosCmd cat
+#endif
+
+#ifndef CompressManCmd
+# define CompressManCmd @true
+#endif
+
+ RMDSDEMACCMD = RemoveDSDENroffMacrosCmd
+ COMPRESSMANCMD = CompressManCmd
+
+#if FormattedManPages
+
+#ifndef InstallManPageLong
+#define InstallManPageLong(file,destdir,dest) @@\
+BuildInstallHtmlManPage(file,dest,$(MANSUFFIX)) @@\
+ @@\
+install.man:: file.man @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ $(RM) $(DESTDIR)destdir/dest.$(MANSUFFIX)* @@\
+ $(RMDSDEMACCMD) file.man | neqn | nroff -man >/tmp/file.man @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/file.man $(DESTDIR)destdir/dest.$(MANSUFFIX) @@\
+ -$(COMPRESSMANCMD) $(DESTDIR)destdir/dest.$(MANSUFFIX) @@\
+ $(RM) /tmp/file.man
+#endif
+
+#ifndef InstallGenManPageLong
+#define InstallGenManPageLong(file,destdir,dest,suffix) @@\
+BuildInstallHtmlManPage(file,dest,suffix) @@\
+ @@\
+install.man:: file.man @@\
+ MakeDir($(DESTDIR)destdir) @@\
+ $(RM) $(DESTDIR)destdir/dest.suffix* @@\
+ $(RMDSDEMACCMD) file.man | neqn | nroff -man >/tmp/file.man @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/file.man $(DESTDIR)destdir/dest.suffix @@\
+ -$(COMPRESSMANCMD) $(DESTDIR)destdir/dest.suffix @@\
+ $(RM) /tmp/file.man
+#endif
+
+#ifndef InstallMultipleMan
+#define InstallMultipleMan(list,dest) @@\
+install.man:: list @@\
+ MakeDir($(DESTDIR)dest) @@\
+ @case '${MFLAGS}' in *[i]*) set +e;; esac; \ @@\
+ for i in list; do \ @@\
+ (MNAME=`echo $$i | cut -f1 -d.`; \ @@\
+ set -x; \ @@\
+ $(RM) $(DESTDIR)dest/$${MNAME}*; \ @@\
+ $(RMDSDEMACCMD) $$i | neqn | nroff -man >/tmp/$$i; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/$$i $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX); \ @@\
+ $(COMPRESSMANCMD) $(DESTDIR)dest/$${MNAME}.$(MANSUFFIX); \ @@\
+ $(RM) /tmp/$$i); \ @@\
+ done
+#endif
+
+/*
+ * InstallManPageAliases - generate rules to install manual page aliases.
+ * (Make hard links on SVR3.)
+ */
+#ifndef InstallManPageAliasesBase
+#define InstallManPageAliasesBase(file,destdir,aliases) @@\
+
+install.man:: @@\
+ @(SUFFIX=`echo $(DESTDIR)destdir/file.* | cut -f2,3 -d.`; \ @@\
+ for i in aliases; do (set -x; \ @@\
+ $(RM) $(DESTDIR)destdir/$$i.*; \ @@\
+ (cd $(DESTDIR)destdir; $(LN) file.$${SUFFIX} \ @@\
+ $$i.$${SUFFIX})); \ @@\
+ done)
+#endif
+
+#ifndef InstallManPageAliases
+#define InstallManPageAliases(file,destdir,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX)) @@\
+ @@\
+InstallManPageAliasesBase(file,destdir,aliases)
+#endif
+
+#ifndef InstallGenManPageAliases
+#define InstallGenManPageAliases(file,destdir,suffix,aliases) @@\
+InstallHtmlManPageAliases(file,aliases,suffix) @@\
+ @@\
+InstallManPageAliasesBase(file,destdir,aliases)
+#endif
+
+#endif /* FormattedManPages */
+
+/* If you have trouble with make bombing out in Xlib, try uncommenting this. */
+/* You will not get dependencies as a result, but better than nothing. */
+#ifndef MakeHashTableBug
+#define MakeHashTableBug NO
+#endif
+
+#if MakeHashTableBug
+#define DependTarget3(srcs1,srcs2,srcs3)
+#endif
+
+#include <sv3Lib.rules>
+
+#ifdef i386Architecture
+#include <xorg.cf>
+#endif
+
diff --git a/nx-X11/config/cf/svr4.cf b/nx-X11/config/cf/svr4.cf
new file mode 100644
index 000000000..8567b6caf
--- /dev/null
+++ b/nx-X11/config/cf/svr4.cf
@@ -0,0 +1,295 @@
+XCOMM $Xorg: svr4.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/svr4.cf,v 3.50 2003/11/04 01:25:31 dawes Exp $
+/*
+ * A default OS name
+ */
+#ifndef OSName
+#ifdef i386Architecture
+#define OSName UNIX System V/386 Release 4
+#else
+#define OSName UNIX System V Release 4
+#endif
+#endif
+#ifndef OSVendor
+#define OSVendor /**/
+#endif
+
+/*
+ * The default version will be 4.0.0 which should be
+ * the least common denominator of all SVR4
+ */
+
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 0
+#endif
+#ifndef BootstrapCFlags
+#ifdef i386Architecture
+#define BootstrapCFlags -DSVR4 -Di386
+#else
+#ifdef SYSV386
+#define BootstrapCFlags -DSVR4 -Di386
+#else
+#define BootstrapCFlags -DSVR4
+#endif
+#endif
+#endif
+
+/* Some stuff that all SVR4s should have */
+
+#ifndef SystemV4
+#define SystemV4 YES
+#endif
+#ifndef HasLdRunPath
+#define HasLdRunPath YES
+#endif
+/*
+ * Currently the NX transport only works with select().
+ *
+#define HasPoll YES
+ */
+#define HasPoll NO
+#ifndef SVR4Architecture
+#define SVR4Architecture
+#endif
+#ifndef PatheticCpp
+#define PatheticCpp YES
+#endif
+#define Malloc0ReturnsNull YES /* in case -lmalloc used */
+
+/*
+ * Here are the default paths to use to pick up tools for building.
+ */
+#ifndef ArCmdBase
+#define ArCmdBase /usr/ccs/bin/ar
+#endif
+#ifndef AsCmd
+#define AsCmd /usr/ccs/bin/as
+#endif
+#ifndef CppCmd
+#define CppCmd /usr/ccs/lib/cpp
+#endif
+#ifndef RawCppCmd
+#if !defined(SunArchitecture)
+#define RawCppCmd CppCmd -Uunix -Ui386
+#endif
+#endif
+#ifndef LdCmd
+#define LdCmd /usr/ccs/bin/ld
+#endif
+#ifndef LexCmd
+#define LexCmd /usr/ccs/bin/lex
+#endif
+#ifndef MakeCmd
+#define MakeCmd /usr/ccs/bin/make
+#endif
+#ifndef YaccCmd
+#define YaccCmd /usr/ccs/bin/yacc
+#endif
+#ifndef MkdirHierCmd
+#define MkdirHierCmd mkdir -p
+#endif
+
+/*
+ * Add the s option to ArCmd and ArAddCmd so that empty archives can be created
+ */
+#ifndef ArCmd
+#define ArCmd ArCmdBase cqs
+#endif
+#ifndef ArAddCmd
+#define ArAddCmd ArCmdBase rus
+#endif
+
+/* Libtool on SVR4 uses minor numbers */
+#ifndef LibtoolMinorVersions
+#define LibtoolMinorVersions YES
+#endif
+
+#ifndef SunArchitecture
+/*
+ * These come from usl.cf, and at least some are required by other
+ * SVR4 versions
+ */
+#ifndef UseLocalRegex
+#define UseLocalRegex YES
+#endif
+#ifndef XmDefines
+#define XmDefines \
+ -DNO_REGCOMP -DNEED_STRCASECMP \
+ -DSUPPORT_ZERO_WIDTH -DHAS_WIDECHAR_FUNCTIONS
+#endif
+#ifndef DtSvcDefines
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP
+#endif
+#ifndef DtSearchDefines
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#endif
+#ifndef DtWidgetDefines
+#define DtWidgetDefines DtSearchDefines
+#endif
+#ifndef DtPrintDefines
+#define DtPrintDefines DtSearchDefines
+#endif
+#ifndef HasStrcasecmp
+#define HasStrcasecmp NO
+#endif
+#endif
+
+/* SVR4 (including Solaris) doesn't have setenv() and unsetenv() */
+#ifndef HasSetenv
+#define HasSetenv NO
+#endif
+
+#ifndef SunArchitecture
+#if (OSMinorVersion == 0)
+#ifndef XawI18nDefines
+#define XawI18nDefines -DUSE_XWCHAR_STRING
+#endif
+#ifndef UseSmartScheduler
+#define UseSmartScheduler NO
+#endif
+#endif
+#ifdef i386Architecture
+#ifndef HasPosixRegex
+#define HasPosixRegex NO
+#endif
+#endif
+#ifndef LogDirectory
+#define LogDirectory $(VARDIR)/adm
+#endif
+#endif
+
+#ifndef HasGcc3
+#define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+#define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+#define HasGcc HasGcc2
+#endif
+
+#ifndef HasPerl
+#define HasPerl NO
+#endif
+
+#ifdef i386Architecture
+#ifndef SunArchitecture
+#if (OSMinorVersion > 2) || ((OSMinorVersion == 2) && (OSTeenyVersion >= 2))
+#ifndef StandardDefines
+#define StandardDefines -DSVR4 -DSVR42MP -Di386
+#endif
+#ifndef HasParallelMake
+#define HasParallelMake YES
+#endif
+#if HasParallelMake
+#define TopParallelDefines -P -B
+#define MutexDirective .MUTEX
+#endif
+#else /* SVR4 < 4.2.2 */
+#ifndef StandardDefines
+#define StandardDefines -DSVR4 -Di386
+#endif
+#endif
+#endif
+#ifndef ToolkitStringsABIOptions
+#define ToolkitStringsABIOptions -intelabi -earlyR6bc
+#endif
+#ifndef DefaultCCOptions
+#if !HasGcc
+#define DefaultCCOptions -Xa -Dasm=__asm
+#endif
+#endif
+#ifndef DefaultCDebugFlags
+#if HasGcc
+#if HasGcc2
+#ifndef CcCmd
+#define CcCmd gcc
+#endif
+#define DefaultCDebugFlags DefaultGcc2i386Opt
+#else
+#define DefaultCDebugFlags -O2
+#endif
+#else
+#define DefaultCDebugFlags -O
+#endif
+#endif
+#ifndef ServerOSDefines
+#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
+#endif
+#endif
+
+/*
+ * The TLI interface is more robust on most SVR4s, so it will be the default.
+ */
+#if !defined(SunArchitecture)
+#ifndef ConnectionFlags
+#define ConnectionFlags -DSTREAMSCONN -DUNIXCONN -DLOCALCONN
+#endif
+#endif
+
+#ifndef ManSuffix
+#define ManSuffix 1x
+#define ManDir $(MANSOURCEPATH)1
+#endif
+#ifndef LibManSuffix
+#define LibManSuffix 3x
+#define LibmanDir $(MANSOURCEPATH)3
+#endif
+#ifndef FileManSuffix
+#define FileManSuffix 4
+#endif
+
+#ifndef StaticLibrary
+#if !HasGcc
+#define StaticLibrary(libpath,libname) -B static Concat(-L,libpath) Concat(-l,libname) -B dynamic
+#endif
+#endif
+
+#ifndef SharedLibXdmGreet
+#define SharedLibXdmGreet HasSharedLibraries
+#endif
+
+/*
+ * At this point, an XFree86 port to Sparc/SunOS cannot be officially supported
+ * because the system I am using to develop this is just a loaner from Sun.
+ */
+#if defined(i386Architecture) || defined(AMD64Architecture) || \
+ defined(PpcArchitecture) || \
+ (defined(SparcArchitecture) && \
+ defined(SunArchitecture) && \
+ (!defined(XorgServer) || (XorgServer)))
+#ifndef DoLoadableServer
+#define DoLoadableServer YES
+#endif
+#include <xorg.cf>
+#endif
+
+#ifndef DoLoadableServer
+# define DoLoadableServer NO
+#endif
+#ifndef GccWarningOptions
+# define GccWarningOptions /* */
+#endif
+#ifndef XFree86ServerDefines
+# define XFree86ServerDefines /* */
+#endif
+#ifndef XFree86ServerOSDefines
+# define XFree86ServerOSDefines -DDDXOSINIT -DDDXOSFATALERROR -DDDXOSVERRORF
+#endif
+
+#if HasGcc2ForCplusplus
+# ifndef CplusplusLibCDir
+# define CplusplusLibCDir /usr/local/lib
+# endif
+#endif
+
+#include <sv4Lib.rules>
diff --git a/nx-X11/config/cf/svr4.cf.NX.original b/nx-X11/config/cf/svr4.cf.NX.original
new file mode 100644
index 000000000..8567b6caf
--- /dev/null
+++ b/nx-X11/config/cf/svr4.cf.NX.original
@@ -0,0 +1,295 @@
+XCOMM $Xorg: svr4.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/svr4.cf,v 3.50 2003/11/04 01:25:31 dawes Exp $
+/*
+ * A default OS name
+ */
+#ifndef OSName
+#ifdef i386Architecture
+#define OSName UNIX System V/386 Release 4
+#else
+#define OSName UNIX System V Release 4
+#endif
+#endif
+#ifndef OSVendor
+#define OSVendor /**/
+#endif
+
+/*
+ * The default version will be 4.0.0 which should be
+ * the least common denominator of all SVR4
+ */
+
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 0
+#endif
+#ifndef BootstrapCFlags
+#ifdef i386Architecture
+#define BootstrapCFlags -DSVR4 -Di386
+#else
+#ifdef SYSV386
+#define BootstrapCFlags -DSVR4 -Di386
+#else
+#define BootstrapCFlags -DSVR4
+#endif
+#endif
+#endif
+
+/* Some stuff that all SVR4s should have */
+
+#ifndef SystemV4
+#define SystemV4 YES
+#endif
+#ifndef HasLdRunPath
+#define HasLdRunPath YES
+#endif
+/*
+ * Currently the NX transport only works with select().
+ *
+#define HasPoll YES
+ */
+#define HasPoll NO
+#ifndef SVR4Architecture
+#define SVR4Architecture
+#endif
+#ifndef PatheticCpp
+#define PatheticCpp YES
+#endif
+#define Malloc0ReturnsNull YES /* in case -lmalloc used */
+
+/*
+ * Here are the default paths to use to pick up tools for building.
+ */
+#ifndef ArCmdBase
+#define ArCmdBase /usr/ccs/bin/ar
+#endif
+#ifndef AsCmd
+#define AsCmd /usr/ccs/bin/as
+#endif
+#ifndef CppCmd
+#define CppCmd /usr/ccs/lib/cpp
+#endif
+#ifndef RawCppCmd
+#if !defined(SunArchitecture)
+#define RawCppCmd CppCmd -Uunix -Ui386
+#endif
+#endif
+#ifndef LdCmd
+#define LdCmd /usr/ccs/bin/ld
+#endif
+#ifndef LexCmd
+#define LexCmd /usr/ccs/bin/lex
+#endif
+#ifndef MakeCmd
+#define MakeCmd /usr/ccs/bin/make
+#endif
+#ifndef YaccCmd
+#define YaccCmd /usr/ccs/bin/yacc
+#endif
+#ifndef MkdirHierCmd
+#define MkdirHierCmd mkdir -p
+#endif
+
+/*
+ * Add the s option to ArCmd and ArAddCmd so that empty archives can be created
+ */
+#ifndef ArCmd
+#define ArCmd ArCmdBase cqs
+#endif
+#ifndef ArAddCmd
+#define ArAddCmd ArCmdBase rus
+#endif
+
+/* Libtool on SVR4 uses minor numbers */
+#ifndef LibtoolMinorVersions
+#define LibtoolMinorVersions YES
+#endif
+
+#ifndef SunArchitecture
+/*
+ * These come from usl.cf, and at least some are required by other
+ * SVR4 versions
+ */
+#ifndef UseLocalRegex
+#define UseLocalRegex YES
+#endif
+#ifndef XmDefines
+#define XmDefines \
+ -DNO_REGCOMP -DNEED_STRCASECMP \
+ -DSUPPORT_ZERO_WIDTH -DHAS_WIDECHAR_FUNCTIONS
+#endif
+#ifndef DtSvcDefines
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP
+#endif
+#ifndef DtSearchDefines
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#endif
+#ifndef DtWidgetDefines
+#define DtWidgetDefines DtSearchDefines
+#endif
+#ifndef DtPrintDefines
+#define DtPrintDefines DtSearchDefines
+#endif
+#ifndef HasStrcasecmp
+#define HasStrcasecmp NO
+#endif
+#endif
+
+/* SVR4 (including Solaris) doesn't have setenv() and unsetenv() */
+#ifndef HasSetenv
+#define HasSetenv NO
+#endif
+
+#ifndef SunArchitecture
+#if (OSMinorVersion == 0)
+#ifndef XawI18nDefines
+#define XawI18nDefines -DUSE_XWCHAR_STRING
+#endif
+#ifndef UseSmartScheduler
+#define UseSmartScheduler NO
+#endif
+#endif
+#ifdef i386Architecture
+#ifndef HasPosixRegex
+#define HasPosixRegex NO
+#endif
+#endif
+#ifndef LogDirectory
+#define LogDirectory $(VARDIR)/adm
+#endif
+#endif
+
+#ifndef HasGcc3
+#define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+#define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+#define HasGcc HasGcc2
+#endif
+
+#ifndef HasPerl
+#define HasPerl NO
+#endif
+
+#ifdef i386Architecture
+#ifndef SunArchitecture
+#if (OSMinorVersion > 2) || ((OSMinorVersion == 2) && (OSTeenyVersion >= 2))
+#ifndef StandardDefines
+#define StandardDefines -DSVR4 -DSVR42MP -Di386
+#endif
+#ifndef HasParallelMake
+#define HasParallelMake YES
+#endif
+#if HasParallelMake
+#define TopParallelDefines -P -B
+#define MutexDirective .MUTEX
+#endif
+#else /* SVR4 < 4.2.2 */
+#ifndef StandardDefines
+#define StandardDefines -DSVR4 -Di386
+#endif
+#endif
+#endif
+#ifndef ToolkitStringsABIOptions
+#define ToolkitStringsABIOptions -intelabi -earlyR6bc
+#endif
+#ifndef DefaultCCOptions
+#if !HasGcc
+#define DefaultCCOptions -Xa -Dasm=__asm
+#endif
+#endif
+#ifndef DefaultCDebugFlags
+#if HasGcc
+#if HasGcc2
+#ifndef CcCmd
+#define CcCmd gcc
+#endif
+#define DefaultCDebugFlags DefaultGcc2i386Opt
+#else
+#define DefaultCDebugFlags -O2
+#endif
+#else
+#define DefaultCDebugFlags -O
+#endif
+#endif
+#ifndef ServerOSDefines
+#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
+#endif
+#endif
+
+/*
+ * The TLI interface is more robust on most SVR4s, so it will be the default.
+ */
+#if !defined(SunArchitecture)
+#ifndef ConnectionFlags
+#define ConnectionFlags -DSTREAMSCONN -DUNIXCONN -DLOCALCONN
+#endif
+#endif
+
+#ifndef ManSuffix
+#define ManSuffix 1x
+#define ManDir $(MANSOURCEPATH)1
+#endif
+#ifndef LibManSuffix
+#define LibManSuffix 3x
+#define LibmanDir $(MANSOURCEPATH)3
+#endif
+#ifndef FileManSuffix
+#define FileManSuffix 4
+#endif
+
+#ifndef StaticLibrary
+#if !HasGcc
+#define StaticLibrary(libpath,libname) -B static Concat(-L,libpath) Concat(-l,libname) -B dynamic
+#endif
+#endif
+
+#ifndef SharedLibXdmGreet
+#define SharedLibXdmGreet HasSharedLibraries
+#endif
+
+/*
+ * At this point, an XFree86 port to Sparc/SunOS cannot be officially supported
+ * because the system I am using to develop this is just a loaner from Sun.
+ */
+#if defined(i386Architecture) || defined(AMD64Architecture) || \
+ defined(PpcArchitecture) || \
+ (defined(SparcArchitecture) && \
+ defined(SunArchitecture) && \
+ (!defined(XorgServer) || (XorgServer)))
+#ifndef DoLoadableServer
+#define DoLoadableServer YES
+#endif
+#include <xorg.cf>
+#endif
+
+#ifndef DoLoadableServer
+# define DoLoadableServer NO
+#endif
+#ifndef GccWarningOptions
+# define GccWarningOptions /* */
+#endif
+#ifndef XFree86ServerDefines
+# define XFree86ServerDefines /* */
+#endif
+#ifndef XFree86ServerOSDefines
+# define XFree86ServerOSDefines -DDDXOSINIT -DDDXOSFATALERROR -DDDXOSVERRORF
+#endif
+
+#if HasGcc2ForCplusplus
+# ifndef CplusplusLibCDir
+# define CplusplusLibCDir /usr/local/lib
+# endif
+#endif
+
+#include <sv4Lib.rules>
diff --git a/nx-X11/config/cf/svr4.cf.X.original b/nx-X11/config/cf/svr4.cf.X.original
new file mode 100644
index 000000000..46410f091
--- /dev/null
+++ b/nx-X11/config/cf/svr4.cf.X.original
@@ -0,0 +1,290 @@
+XCOMM $Xorg: svr4.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/svr4.cf,v 3.50 2003/11/04 01:25:31 dawes Exp $
+/*
+ * A default OS name
+ */
+#ifndef OSName
+#ifdef i386Architecture
+#define OSName UNIX System V/386 Release 4
+#else
+#define OSName UNIX System V Release 4
+#endif
+#endif
+#ifndef OSVendor
+#define OSVendor /**/
+#endif
+
+/*
+ * The default version will be 4.0.0 which should be
+ * the least common denominator of all SVR4
+ */
+
+#ifndef OSMajorVersion
+#define OSMajorVersion 4
+#endif
+#ifndef OSMinorVersion
+#define OSMinorVersion 0
+#endif
+#ifndef OSTeenyVersion
+#define OSTeenyVersion 0
+#endif
+#ifndef BootstrapCFlags
+#ifdef i386Architecture
+#define BootstrapCFlags -DSVR4 -Di386
+#else
+#ifdef SYSV386
+#define BootstrapCFlags -DSVR4 -Di386
+#else
+#define BootstrapCFlags -DSVR4
+#endif
+#endif
+#endif
+
+/* Some stuff that all SVR4s should have */
+
+#ifndef SystemV4
+#define SystemV4 YES
+#endif
+#ifndef HasLdRunPath
+#define HasLdRunPath YES
+#endif
+#define HasPoll YES
+#ifndef SVR4Architecture
+#define SVR4Architecture
+#endif
+#ifndef PatheticCpp
+#define PatheticCpp YES
+#endif
+#define Malloc0ReturnsNull YES /* in case -lmalloc used */
+
+/*
+ * Here are the default paths to use to pick up tools for building.
+ */
+#ifndef ArCmdBase
+#define ArCmdBase /usr/ccs/bin/ar
+#endif
+#ifndef AsCmd
+#define AsCmd /usr/ccs/bin/as
+#endif
+#ifndef CppCmd
+#define CppCmd /usr/ccs/lib/cpp
+#endif
+#ifndef RawCppCmd
+#if !defined(SunArchitecture)
+#define RawCppCmd CppCmd -Uunix -Ui386
+#endif
+#endif
+#ifndef LdCmd
+#define LdCmd /usr/ccs/bin/ld
+#endif
+#ifndef LexCmd
+#define LexCmd /usr/ccs/bin/lex
+#endif
+#ifndef MakeCmd
+#define MakeCmd /usr/ccs/bin/make
+#endif
+#ifndef YaccCmd
+#define YaccCmd /usr/ccs/bin/yacc
+#endif
+#ifndef MkdirHierCmd
+#define MkdirHierCmd mkdir -p
+#endif
+
+/*
+ * Add the s option to ArCmd and ArAddCmd so that empty archives can be created
+ */
+#ifndef ArCmd
+#define ArCmd ArCmdBase cqs
+#endif
+#ifndef ArAddCmd
+#define ArAddCmd ArCmdBase rus
+#endif
+
+/* Libtool on SVR4 uses minor numbers */
+#ifndef LibtoolMinorVersions
+#define LibtoolMinorVersions YES
+#endif
+
+#ifndef SunArchitecture
+/*
+ * These come from usl.cf, and at least some are required by other
+ * SVR4 versions
+ */
+#ifndef UseLocalRegex
+#define UseLocalRegex YES
+#endif
+#ifndef XmDefines
+#define XmDefines \
+ -DNO_REGCOMP -DNEED_STRCASECMP \
+ -DSUPPORT_ZERO_WIDTH -DHAS_WIDECHAR_FUNCTIONS
+#endif
+#ifndef DtSvcDefines
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE -DNO_REGCOMP
+#endif
+#ifndef DtSearchDefines
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#endif
+#ifndef DtWidgetDefines
+#define DtWidgetDefines DtSearchDefines
+#endif
+#ifndef DtPrintDefines
+#define DtPrintDefines DtSearchDefines
+#endif
+#ifndef HasStrcasecmp
+#define HasStrcasecmp NO
+#endif
+#endif
+
+/* SVR4 (including Solaris) doesn't have setenv() and unsetenv() */
+#ifndef HasSetenv
+#define HasSetenv NO
+#endif
+
+#ifndef SunArchitecture
+#if (OSMinorVersion == 0)
+#ifndef XawI18nDefines
+#define XawI18nDefines -DUSE_XWCHAR_STRING
+#endif
+#ifndef UseSmartScheduler
+#define UseSmartScheduler NO
+#endif
+#endif
+#ifdef i386Architecture
+#ifndef HasPosixRegex
+#define HasPosixRegex NO
+#endif
+#endif
+#ifndef LogDirectory
+#define LogDirectory $(VARDIR)/adm
+#endif
+#endif
+
+#ifndef HasGcc3
+#define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+#define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+#define HasGcc HasGcc2
+#endif
+
+#ifndef HasPerl
+#define HasPerl NO
+#endif
+
+#ifdef i386Architecture
+#ifndef SunArchitecture
+#if (OSMinorVersion > 2) || ((OSMinorVersion == 2) && (OSTeenyVersion >= 2))
+#ifndef StandardDefines
+#define StandardDefines -DSVR4 -DSVR42MP -Di386
+#endif
+#ifndef HasParallelMake
+#define HasParallelMake YES
+#endif
+#if HasParallelMake
+#define TopParallelDefines -P -B
+#define MutexDirective .MUTEX
+#endif
+#else /* SVR4 < 4.2.2 */
+#ifndef StandardDefines
+#define StandardDefines -DSVR4 -Di386
+#endif
+#endif
+#endif
+#ifndef ToolkitStringsABIOptions
+#define ToolkitStringsABIOptions -intelabi -earlyR6bc
+#endif
+#ifndef DefaultCCOptions
+#if !HasGcc
+#define DefaultCCOptions -Xa -Dasm=__asm
+#endif
+#endif
+#ifndef DefaultCDebugFlags
+#if HasGcc
+#if HasGcc2
+#ifndef CcCmd
+#define CcCmd gcc
+#endif
+#define DefaultCDebugFlags DefaultGcc2i386Opt
+#else
+#define DefaultCDebugFlags -O2
+#endif
+#else
+#define DefaultCDebugFlags -O
+#endif
+#endif
+#ifndef ServerOSDefines
+#define ServerOSDefines -DDDXTIME XFree86ServerOSDefines
+#endif
+#endif
+
+/*
+ * The TLI interface is more robust on most SVR4s, so it will be the default.
+ */
+#if !defined(SunArchitecture)
+#ifndef ConnectionFlags
+#define ConnectionFlags -DSTREAMSCONN -DUNIXCONN -DLOCALCONN
+#endif
+#endif
+
+#ifndef ManSuffix
+#define ManSuffix 1x
+#define ManDir $(MANSOURCEPATH)1
+#endif
+#ifndef LibManSuffix
+#define LibManSuffix 3x
+#define LibmanDir $(MANSOURCEPATH)3
+#endif
+#ifndef FileManSuffix
+#define FileManSuffix 4
+#endif
+
+#ifndef StaticLibrary
+#if !HasGcc
+#define StaticLibrary(libpath,libname) -B static Concat(-L,libpath) Concat(-l,libname) -B dynamic
+#endif
+#endif
+
+#ifndef SharedLibXdmGreet
+#define SharedLibXdmGreet HasSharedLibraries
+#endif
+
+/*
+ * At this point, an XFree86 port to Sparc/SunOS cannot be officially supported
+ * because the system I am using to develop this is just a loaner from Sun.
+ */
+#if defined(i386Architecture) || defined(AMD64Architecture) || \
+ defined(PpcArchitecture) || \
+ (defined(SparcArchitecture) && \
+ defined(SunArchitecture) && \
+ (!defined(XorgServer) || (XorgServer)))
+#ifndef DoLoadableServer
+#define DoLoadableServer YES
+#endif
+#include <xorg.cf>
+#endif
+
+#ifndef DoLoadableServer
+# define DoLoadableServer NO
+#endif
+#ifndef GccWarningOptions
+# define GccWarningOptions /* */
+#endif
+#ifndef XFree86ServerDefines
+# define XFree86ServerDefines /* */
+#endif
+#ifndef XFree86ServerOSDefines
+# define XFree86ServerOSDefines -DDDXOSINIT
+#endif
+
+#if HasGcc2ForCplusplus
+# ifndef CplusplusLibCDir
+# define CplusplusLibCDir /usr/local/lib
+# endif
+#endif
+
+#include <sv4Lib.rules>
diff --git a/nx-X11/config/cf/ultrix.cf b/nx-X11/config/cf/ultrix.cf
new file mode 100644
index 000000000..51bd20dba
--- /dev/null
+++ b/nx-X11/config/cf/ultrix.cf
@@ -0,0 +1,82 @@
+XCOMM platform: $Xorg: ultrix.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86$
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion.OSMinorVersion)
+
+#define HasNdbm YES
+#define HasPutenv YES
+#define HasShm YES
+#define LintLibFlag -o
+#define LintOpts -ax
+
+#ifndef HasDECnet
+#define HasDECnet NO
+#endif
+#if HasDECnet
+#define ExtraLibraries -ldnet
+#endif
+
+#if ThreadedX
+/* if you want to experiment, turn this on, but no guarantees */
+#define HasThreadSafeAPI NO
+#define HasPosixThreads YES
+#define ThreadPreStdAPIDefines -DXPRE_STANDARD_API
+#define ExtraLibraries -lpthreads -li
+#endif
+
+#ifdef VaxArchitecture
+#define NativeFPFormat DEC_F_Float
+#define UnalignedReferencesAllowed YES /* if arbitrary deref is okay */
+#define BuildServer NO
+#endif
+
+#ifdef MipsArchitecture
+#if OSMajorVersion > 4 || (OSMajorVersion == 4 && OSMinorVersion >= 2)
+#define XdecServer YES
+#define ServerOSDefines -DDDXTIME
+/* Even under ultrix 4.2, the compiler miscompiles some alloca calls */
+#define AllocateLocalDefines /* -DINCLUDE_ALLOCA_H */
+#else
+#define BuildServer NO
+#define AllocateLocalDefines /**/
+#endif
+#if !HasGcc
+#define NeedFunctionPrototypes YES
+/*
+ * NormalLibObjCompile - compile fragment for a library object file
+ * do ld -x to remove line number symbols for libraries
+ */
+#define NormalLibObjCompile(options) $(RM) $@ $*.os \ @@\
+ && $(CC) -c options $(CFLAGS) $*.c \ @@\
+ && $(LD) $(LDSTRIPFLAGS) -r $@ -o $*.os \ @@\
+ && $(MV) $*.os $@
+#endif
+#endif
+
+#if HasGcc
+#ifdef VaxArchitecture
+#define CcCmd gcc -ansi -Dvax -Dultrix -fpcc-struct-return
+#endif
+#ifdef MipsArchitecture
+#define CcCmd gcc -ansi -Dmips -Dultrix -fpcc-struct-return
+#endif
+#define ServerCCOptions /* */
+#define AllocateLocalDefines /* */
+#endif
+
+#define ServerExtraDefines AllocateLocalDefines
+#define HasWChar32 YES
+
+#define MotifDefines -DNO_REGEX -DNO_REGCOMP -DNO_CONST
diff --git a/nx-X11/config/cf/usl.cf b/nx-X11/config/cf/usl.cf
new file mode 100644
index 000000000..e54476bee
--- /dev/null
+++ b/nx-X11/config/cf/usl.cf
@@ -0,0 +1,318 @@
+XCOMM platform: $Xorg: usl.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+
+XCOMM platform: $XFree86: xc/config/cf/usl.cf,v 3.22 2001/01/12 19:28:24 dawes Exp $
+
+#ifndef OSName
+# define OSName DefaultOSName
+#endif
+#ifndef OSMajorVersion
+# define OSMajorVersion DefaultOSMajorVersion
+#endif
+#ifndef OSMinorVersion
+# define OSMinorVersion DefaultOSMinorVersion
+#endif
+#ifndef OSTeenyVersion
+# define OSTeenyVersion DefaultOSTeenyVersion
+#endif
+XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
+
+#ifndef CcCmd
+# define CcCmd /usr/ccs/bin/cc
+#endif
+#ifndef LexCmd
+# define LexCmd /usr/ccs/bin/lex
+#endif
+#ifndef YaccCmd
+# define YaccCmd /usr/ccs/bin/yacc
+#endif
+#ifndef MakeCmd
+# define MakeCmd /usr/gnu/bin/gmake
+#endif
+
+#ifndef HasGcc2ForCplusplus
+# ifndef CplusplusCmd
+# define CplusplusCmd /usr/ccs/bin/CC
+# endif
+# ifndef CplusplusFilt
+# define CplusplusFilt /usr/ccs/bin/c++filt
+# endif
+# ifndef CplusplusDependIncludes
+# define CplusplusDependIncludes -I/usr/include/CC
+# endif
+#else
+# ifndef CplusplusCmd
+# define CplusplusCmd /usr/gnu/bin/g++
+# endif
+# ifndef CplusplusFilt
+# define CplusplusFilt /usr/gnu/bin/c++filt
+# endif
+#endif
+
+#ifndef LibraryCCOptions
+# define LibraryCCOptions -D_REENTRANT -DFD_SETSIZE=16384
+#endif
+
+#define BootstrapCFlags /* none needed */
+#define StandardDefines -DSVR4 -DSVR5 -Di386 -D__UNIXWARE__
+#define NeedWidePrototypes YES
+
+#ifdef HasGcc2
+# define DefaultCCOptions GccWarningOptions
+# ifndef CcCmd
+# define CcCmd /usr/gnu/bin/gcc
+# endif
+# define DefaultCDebugFlags -O6 -fomit-frame-pointer -march=i586 -mcpu=i586
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O6 -fomit-frame-pointer -march=i586 -mcpu=i586
+# endif
+#else
+# ifndef CcCmd
+# define CcCmd /usr/ccs/bin/cc
+# endif
+# define DefaultCCOptions -dy -O -Kalloca -Dasm=__asm
+# define DefaultCDebugFlags -O
+# ifndef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -O
+# endif
+#endif
+
+#ifndef DoLoadableServer
+# define DoLoadableServer YES
+#endif
+
+#if DoLoadableServer
+# if HasGcc
+# define USLDynamicFlags -rdynamic
+# else
+# define USLDynamicFlags -Wl,-Bexport
+# endif
+#else
+# define USLDynamicFlags /**/
+#endif
+
+#define ServerExtraDefines XFree86ServerDefines
+#ifndef ServerExtraSysLibs
+# define ServerExtraSysLibs $(CBRT) -lm USLDynamicFlags
+#endif
+
+#define ServerOSDefines -D_REENTRANT -DFD_SETSIZE=16384 -DDDXTIME XFree86ServerOSDefines
+#define ToolkitStringsABIOptions -intelabi
+#if OSMajorVersion < 2
+#define XawI18nDefines -DHAS_WCTYPE_H -DHAS_ISW_FUNCS
+#else
+#define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
+#endif
+#if OSMajorVersion > 1 || OSTeenyVersion > 1
+# if OSMajorVersion >= 7
+# define ExtraLibraries -lsocket -lnsl -lgen
+# else
+# define ExtraLibraries -lsocket -lnsl -lgen -lw
+# endif
+# define ThreadedX YES
+# define HasThreadSafeAPI NO
+/* UnixWare does not have MT-safe pwd routines. */
+# define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXNO_MTSAFE_PWDAPI -DXNO_MTSAFE_GRPAPI
+# define SystemMTDefines -D_REENTRANT
+# ifdef HasGcc2
+# define ThreadsLoadFlags -pthread
+# else
+# define ThreadsLoadFlags -Kpthread
+# endif
+#endif
+#define BuildLibPathVar LD_LIBRARY_PATH
+
+#ifndef BuildXterm
+# define BuildXterm BuildClients
+#endif
+
+#ifndef HasNCurses
+# define HasNCurses YES
+#endif
+#ifndef NCursesLibName
+# define NCursesLibName -lcurses
+#endif
+#ifndef TermcapLibrary
+# define TermcapLibrary -lcurses
+#endif
+
+#ifndef BuildFreetypeDlModule
+# define BuildFreetypeDlModule NO
+#endif
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver NO
+#endif
+
+#ifndef ManSuffix
+# define ManSuffix 1
+#endif
+
+#ifndef LibManSuffix
+# define LibManSuffix 3
+#endif
+
+#ifndef FileManSuffix
+# define FileManSuffix 4
+#endif
+
+#ifndef UseExportLists
+# define UseExportLists NO
+#endif
+
+#define GencatFlags -m
+
+#ifndef HasCplusplus
+# define HasCplusplus YES
+#endif
+
+#ifndef HasDlopen
+# define HasDlopen YES
+#endif
+
+#ifndef HasShm
+# define HasShm YES
+#endif
+
+#ifndef HasStrcasecmp
+# define HasStrcasecmp YES
+#endif
+
+#ifndef HasSnprintf
+# define HasSnprintf NO
+#endif
+
+#ifndef UseSmartScheduler
+# define UseSmartScheduler NO
+#endif
+
+#define SharedLibXmu YES
+
+#ifndef NothingOutsideProjectRoot
+# define NothingOutsideProjectRoot YES
+#endif
+
+#ifndef UseSeparateConfDir
+# define UseSeparateConfDir NO
+#endif
+
+#ifndef BuildHtmlManPages
+# define BuildHtmlManPages NO
+#endif
+
+#ifndef SCOHasGWXLIBS
+# define SCOHasGWXLIBS YES
+#endif
+
+#if SCOHasGWXLIBS
+#define HasExpat YES
+#define HasFreetype2 YES
+#define HasLibpng YES
+#define HasZlib YES
+#define HasFontconfig YES
+#define HasXpm YES
+#endif /* SCOHasGWXLIBS */
+
+#define InstallHardcopyDocs NO
+
+#define HasPerl YES
+#define HasPerl5 YES
+
+/*
+ * When generating templates the UnixWare 2.02 C++ compiler leaves
+ * protected .i files behind. Remove them so other people can
+ * compile too.
+ */
+#ifndef ObjectCplusplusCompile
+#define ObjectCplusplusCompile(options) RemoveFiles($@ $*.i) @@\
+ ClearmakeOSName \
+ $(CXX) -c $(CXXFLAGS) options $*.CCsuf
+#endif
+
+/* USL does not have a shared regex library. */
+#define UseLocalRegex YES
+
+#define XmDefines -DSUPPORT_ZERO_WIDTH -DHAS_WIDECHAR_FUNCTIONS
+#define DtSvcDefines -DXK_MISCELLANY -DMULTIBYTE
+#define DtSearchDefines -DI18N_MSG DtSvcDefines
+#define DtWidgetDefines DtSearchDefines
+#define DtPrintDefines DtSearchDefines
+
+/* For DtHelp's TIFF processing routines. */
+#define LSBBitOrder YES
+
+#define ArchitectureDefines -DUSL_ARCHITECTURE
+
+#define ExportListGenSource elistgen.usl
+#define ShlibExportListOpt(filename) Concat(-Bexport:,filename)
+
+/* <X11/Xos_r.h> requires process locking for missing _r functions */
+#define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
+#define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
+
+#define CdeProjectDefines \
+ -DANSICPP -DMULTIBYTE -DNLS16 \
+ -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion
+
+/*
+ * These settings control the interdependence of the shared libraries.
+ * Mostly borrowed from darwinLib.tmpl.
+ */
+#ifndef FixupLibReferences
+#define FixupLibReferences() @@\
+XMULIBONLY = -lXmu @@\
+XMULIB = $(XMULIBONLY) $(XTOOLLIB) $(XLIB)
+#endif
+
+#ifndef XawClientLibs
+#define XawClientLibs $(XAWLIB) $(XMULIBONLY) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWCLIENTLIBS) $(XLIB)
+#endif
+
+#define SharedXlibi18nReqs $(LDPRELIB) $(XLIBONLY)
+
+#define SharedXfontReqs $(LDPRELIB) $(FONTSTUBLIB) GzipLibrary $(FREETYPE2LIB) $(XLIB)
+#define SharedFontencReqs $(LDPRELIB) GzipLibrary
+#define SharedGLReqs $(LDPRELIB) $(XLIB)
+#define SharedGLUReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedOSMesaReqs $(LDPRELIB) $(XLIB) $(GLXLIB)
+#define SharedPexReqs $(LDPRELIB) $(XONLYLIB) MathLibrary
+#define SharedSMReqs $(LDPRELIB) $(ICELIB)
+#define SharedX11Reqs $(LDPRELIB) -lsocket -lnsl
+#define SharedXawReqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(EXTRAXAWREQS) $(XLIB)
+#define SharedXaw7Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XPMLIB) $(XLIB)
+#define SharedXaw6Reqs $(LDPRELIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
+#define SharedXcursorReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXextReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXiReqs $(LDPRELIB) $(XLIB)
+#define SharedXieReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXmuReqs $(LDPRELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXmuuReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedXpReqs $(LDPRELIB) $(XLIB)
+#define SharedXpmReqs $(LDPRELIB) $(XLIB)
+#define SharedXrandrReqs $(LDPRELIB) $(XRENDERLIB) $(XLIB)
+#define SharedXrenderReqs $(LDPRELIB) $(XLIB)
+#define SharedXtReqs $(LDPRELIB) $(XONLYLIB) $(SMLIB) $(ICELIB)
+#define SharedXtstReqs $(LDPRELIB) $(XLIB)
+#define SharedXvReqs $(LDPRELIB) $(XLIB)
+#define SharedDPSReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedDPSTKReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(DPSLIB) $(XLIB)
+#define SharedOldXReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedpsresReqs $(LDPRELIB) $(SMLIB) $(ICELIB) $(XTOOLLIB) $(XLIB)
+#define SharedXResReqs $(LDPRELIB) $(XLIB)
+#define SharedXfontcacheReqs $(LDPRELIB) $(XLIB)
+#define SharedXineramaReqs $(LDPRELIB) $(XLIB)
+#define SharedXssReqs $(LDPRELIB) $(XLIB)
+#define SharedXvMCReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86miscReqs $(LDPRELIB) $(XLIB)
+#define SharedXxf86vmReqs $(LDPRELIB) $(XLIB)
+#define SharedxkbfileReqs $(LDPRELIB) $(XONLYLIB)
+#define SharedxkbuiReqs $(LDPRELIB) $(XKBFILELIB) $(XONLYLIB)
+#define SharedXReqs $(XTOOLLIB) $(XPLIB) $(XLIB)
+#define SharedXmReqs $(LDPRELIB) SharedXReqs
+#define SharedMrmReqs $(LDPRELIB) $(XMLIB) SharedXReqs
+#define SharedUilReqs $(LDPRELIB) $(XMLIB) SharedXReqs
+
+#include <scoLib.rules> /* minor changes to sv4Lib.rules */
+#include <svr4.cf>
diff --git a/nx-X11/config/cf/x386.cf b/nx-X11/config/cf/x386.cf
new file mode 100644
index 000000000..d7d4c803f
--- /dev/null
+++ b/nx-X11/config/cf/x386.cf
@@ -0,0 +1,153 @@
+XCOMM platform: $Xorg: x386.cf,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+/*****************************************************************************
+ * Site-specfic parameters *
+ *****************************************************************************/
+
+/*
+ * there are some switches to set appropriate...
+ */
+
+#define HasGcc YES /* doesn't work for SVR4 */
+#define HasNdbm YES /* correct for GNU dbm & SVR4 */
+#define StripInstalledPrograms YES
+#define X386Server YES
+#define ExtensionOSDefines -DXTESTEXT1
+#define MotifBC YES
+
+/*****************************************************************************
+ * Do not change anything below *
+ *****************************************************************************/
+
+/* You mus manually compute BootstrapCFlags for initial build */
+#define BootstrapCFlags OSDefines OSRelease
+
+#define StandardDefines OSDefines OSRelease
+#define LdCombineFlags -r
+
+#if defined(i386SVR3Architecture)
+
+#define SystemV YES
+
+#define NeedBerklib YES
+#define HasSymLinks NO
+
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver YES
+#endif
+
+/*
+ * V/386 Release 3.2
+ */
+#ifdef ISC
+/* INTERACTIVE UNIX Version 2.2.1 */
+# define OSVendor "Interactive System Corp."
+# define OSDefines -DISC
+# define LocalLibraries -lpt
+# define PosixLibraries -lcposix
+# define SocketLibraries -linet
+#endif
+
+#ifdef ESIX
+#define OSVendor "ESIX System Inc."
+#define OSDefines -DESIX
+#define LocalLibraries -lpt
+#define SocketLibraries -lnet -lnsl_s
+#define PosixLibraries /**/
+#endif
+
+#ifdef ATT
+#define OSDefines -DATT
+#define OSVendor "AT&T"
+#define LocalLibraries -lpt
+#define SocketLibraries -lnet -lnsl_s /* just a guess */
+#define PosixLibraries /**/
+#endif
+
+#define OSName Unix System V/386 Release 3.2
+#define OSMajorVersion 3
+#define OSMinorVersion 2
+#define OSRelease -DSYSV -DSYSV386
+
+#if HasGcc
+# define CcCmd gcc -DNO_ASM -fstrength-reduce -fpcc-struct-return -fwritable-strings
+# define LibraryCcCmd gcc -DNO_ASM -fstrength-reduce -fpcc-struct-return
+# define ShlibDefines -D__GNUC__ -DGNULIB=/usr/local/lib/gcc-gnulib
+#else
+# define ShlibDefines /**/
+#endif
+
+#if HasSockets
+/* # define ConnectionFlags -DLOCALCONN -DTCPCONN */
+# define ConnectionFlags -DTCPCONN
+# define ExtraLibraries SocketLibraries LocalLibraries -lc_s PosixLibraries
+#else
+# define ConnectionFlags -DLOCALCONN
+# define ExtraLibraries $(LIBDIR)/etc/inetemul.o LocalLibraries -lc_s PosixLibraries
+#endif
+
+/* #include <sv3Lib.rules> */ /* not working yet */
+
+/*
+ * Man pages need to be formatted when installed, so override the default
+ * imake rules.
+ */
+#define InstallManPageLong(file,destdir,dest) @@\
+install.man:: file.man @@\
+ $(RM) destdir/dest.$(MANSUFFIX) @@\
+ cat file.man | $(NEQN) | $(NROFF) $(MANMACROS) >/tmp/file.man @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/file.man destdir/dest.$(MANSUFFIX) @@\
+ $(RM) /tmp/file.man
+
+#define InstallMultipleMan(list,dest) @@\
+install.man:: list @@\
+ @MakeFlagsToShellFlags(i,set +e); \ @@\
+ for i in list; do \ @@\
+ (set -x; \ @@\
+ $(RM) dest/$$i; \ @@\
+ cat $$i | $(NEQN) | $(NROFF) $(MANMACROS) >/tmp/$$i; \ @@\
+ $(INSTALL) -c $(INSTMANFLAGS) /tmp/$$i dest/$$i; \ @@\
+ $(RM) /tmp/$$i); \ @@\
+ done
+
+/* If you have trouble with make bombing out in Xlib, try uncommenting this. */
+/* You will not get dependencies as a result, but better than nothing. */
+/* #define DependTarget3(srcs1,srcs2,srcs3) */
+
+#endif /* i386SVR3Architecture */
+
+
+/*
+ * V/386 Release 4.0
+ */
+#if defined(i386SVR4Architecture)
+
+#define SystemV4 YES
+
+/* this is now just for Dell's one */
+
+#ifdef DELL
+#define OSDefines -DDELL
+#define OSVendor "DELL Computer Corp."
+#endif
+
+#define OSName Unix System V/386 Release 4.0
+#define OSMajorVersion 4
+#define OSMinorVersion 0
+#define OSRelease -DSVR4 -DSYSV386
+
+#if HasGcc
+# define CcCmd gcc -ansi -fstrength-reduce -fpcc-struct-return -Di386
+# if HasSharedLibraries
+# define LibraryCcCmd cc -Xa -Di386 -Dasm=__asm
+# endif
+#else
+# define CcCmd cc -Xa -Di386 -Dasm=__asm
+#endif
+
+#include <sv4Lib.rules>
+
+#endif /* i386SVR4Architecture */
+
+
+XCOMM operating system: OSName OSVendor
diff --git a/nx-X11/config/cf/xf86.rules b/nx-X11/config/cf/xf86.rules
new file mode 100644
index 000000000..3c69445f4
--- /dev/null
+++ b/nx-X11/config/cf/xf86.rules
@@ -0,0 +1,229 @@
+XCOMM $Xorg: xf86.rules,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+
+XCOMM $XFree86: xc/config/cf/xf86.rules,v 3.34tsi Exp $
+
+/*
+ * Rules needed to build the XFree86 X Servers
+ */
+
+#ifndef ObjectMapIncludeFromSpecialSource
+#define ObjectMapIncludeFromSpecialSource(dst,src,flags) @@\
+dst.c: src.c @@\
+ RemoveFile($@) @@\
+ echo "#include \"mfbmap.h\"" > $@ @@\
+ echo "#include \"$?\"" >> $@ @@\
+ @@\
+SpecialCObjectRule(dst,NullParameter,flags) @@\
+ @@\
+depend:: dst.c @@\
+ @@\
+clean:: @@\
+ RemoveFile(dst.c)
+#endif
+
+
+/*
+ * Rules for building config files from scripts
+ */
+
+#ifndef Depend
+# define Depend depend
+#endif
+
+#ifndef ConfigTargetLong
+#define ConfigTargetLong(target,dep,script,args,extra) @@\
+all:: Configure @@\
+ @@\
+Configure:: target.o @@\
+ @@\
+target.c: script dep @@\
+ $(MAKE) $(MFLAGS) Makefile @@\
+ $(MAKE) $(MFLAGS) extra Concat(Build,target) @@\
+ @@\
+Concat(Build,target): @@\
+ $(RM) target.c @@\
+ $(SHELL) script args @@\
+ @@\
+clean:: @@\
+ $(RM) target.c
+#endif
+
+#define ConfigTarget(target,dep,script,args) ConfigTargetLong(target,dep,script,args,Depend)
+
+#define ConfigTargetNoDepend(target,dep,script,args) ConfigTargetLong(target,dep,script,args,)
+
+#ifndef DriverObjectList
+#define DriverObjectList(drivers,list) @@\
+list: $(ICONFIGFILES) drivers @@\
+ RemoveFile(list) @@\
+ @echo Creating list for drivers; \ @@\
+ DRIVERS="drivers"; \ @@\
+ if [ x"$$DRIVERS" != x ]; then \ @@\
+ for i in $$DRIVERS; do \ @@\
+ DRIVER="$$i/*_drv.o"; \ @@\
+ for j in $$DRIVER; do \ @@\
+ echo $$j >> list; \ @@\
+ done; \ @@\
+ done; \ @@\
+ else \ @@\
+ echo "" > list; \ @@\
+ fi @@\
+ @@\
+clean:: @@\
+ RemoveFile(list)
+#endif
+
+/*
+ * Rules for installing Driver SDK parts (target is install.sdk)
+ */
+
+#ifndef InstallDriverSDKNonExecFile
+#if !DoLoadableServer
+#define InstallDriverSDKNonExecFile(file,dest) /**/
+#else
+#define InstallDriverSDKNonExecFile(file,dest) @@\
+install.sdk:: file @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTDATFLAGS) file $(DESTDIR)dest
+#endif
+#endif
+
+#ifndef InstallDriverSDKLibrary
+#if !DoLoadableServer
+#define InstallDriverSDKLibrary(libname,dest) /**/
+#else
+#define InstallDriverSDKLibrary(libname,dest) @@\
+install.sdk:: Concat(lib,libname.a) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.a) $(DESTDIR)dest @@\
+ RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,libname.a))
+#endif
+#endif
+
+#ifndef InstallDriverSDKNamedLibrary
+#if !DoLoadableServer
+#define InstallDriverSDKNamedLibrary(libname,dlibname,dest) /**/
+#else
+#define InstallDriverSDKNamedLibrary(libname,dlibname,dest) @@\
+install.sdk:: Concat(lib,libname.a) @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTLIBFLAGS) Concat(lib,libname.a) \ @@\
+ Concat($(DESTDIR)dest/lib,dlibname.a) @@\
+ RanLibrary($(RANLIBINSTFLAGS) Concat($(DESTDIR)dest/lib,dlibname.a))
+#endif
+#endif
+
+#ifndef InstallDriverSDKNamedNonExec
+#if !DoLoadableServer
+#define InstallDriverSDKNamedNonExec(srcname,dstname,dest) /**/
+#else
+#define InstallDriverSDKNamedNonExec(srcname,dstname,dest) @@\
+install.sdk:: srcname @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTDATFLAGS) srcname $(DESTDIR)dest/dstname
+#endif
+#endif
+
+#ifndef InstallDriverSDKNamedProg
+#if !DoLoadableServer
+#define InstallDriverSDKNamedProg(srcname,dstname,dest) /**/
+#else
+#define InstallDriverSDKNamedProg(srcname,dstname,dest) @@\
+install.sdk:: srcname @@\
+ MakeDir($(DESTDIR)dest) @@\
+ $(INSTALL) -c $(INSTBINFLAGS) srcname $(DESTDIR)dest/dstname
+#endif
+#endif
+
+#ifndef InstallDriverSDKSubdirs
+#if !DoLoadableServer
+#define InstallDriverSDKSubdirs(dirs) /**/
+#else
+#define InstallDriverSDKSubdirs(dirs) \
+NamedTargetSubdirs(install.sdk,dirs,"installing driver SDK",DESTDIR='$(DESTDIR)',install.sdk)
+#endif
+#endif
+
+#ifndef InstallDriverSDKMultipleDestFlags
+#if !DoLoadableServer
+#define InstallDriverSDKMultipleDestFlags(list,dest,flags) /**/
+#else
+#define InstallDriverSDKMultipleDestFlags(list,dest,flags) \
+InstallMultipleDestFlags(install.sdk,list,dest,flags)
+#endif
+#endif
+
+#ifndef InstallDriverSDKDynamicModule
+#if !DoLoadableServer
+#define InstallDriverSDKDynamicModule(module,dest,subdir) /**/
+#else
+#define InstallDriverSDKDynamicModule(module,dest,subdir) @@\
+install.sdk:: module @@\
+ MakeDir($(DESTDIR)dest/subdir) @@\
+ $(INSTALL) -c module $(DESTDIR)dest/subdir
+#endif
+#endif
+
+#ifndef InstallDriverSDKObjectModule
+#if !DoLoadableServer
+#define InstallDriverSDKObjectModule(module,dest,subdir) /**/
+#else
+#if MakeDllModules
+#define InstallDriverSDKObjectModule(module,dest,subdir) @@\
+InstallDriverSDKDynamicModule(Concat(module,_drv.so),dest,subdir)
+#else
+#define InstallDriverSDKObjectModule(module,dest,subdir) @@\
+InstallDriverSDKDynamicModule(Concat(module,_drv.o),dest,subdir)
+#endif
+#endif
+#endif
+
+
+#ifndef InstallDriverSDKObjectSubModule
+#if !DoLoadableServer
+#define InstallDriverSDKObjectSubModule(module,dest,subdir) /**/
+#else
+#if MakeDllModules
+#define InstallDriverSDKObjectSubModule(module,dest,subdir) @@\
+InstallDriverSDKDynamicModule(Concat(module,.so),dest,subdir)
+#else
+#define InstallDriverSDKObjectSubModule(module,dest,subdir) @@\
+InstallDriverSDKDynamicModule(Concat(module,.o),dest,subdir)
+#endif
+#endif
+#endif
+
+#ifndef InstallDriverSDKLibraryModule
+#if !DoLoadableServer
+#define InstallDriverSDKLibraryModule(module,dest,subdir) /**/
+#else
+#if MakeDllModules
+#define InstallDriverSDKLibraryModule(module,dest,subdir) @@\
+InstallDriverSDKDynamicModule(Concat3(lib,module,.so),dest,subdir)
+#else
+#define InstallDriverSDKLibraryModule(module,dest,subdir) @@\
+InstallDriverSDKDynamicModule(ModuleLibraryTargetName(module),dest,subdir)
+#endif
+#endif
+#endif
+
+#ifndef ServerDriverSDKTarget
+#if !DoLoadableServer
+#define ServerDriverSDKTarget(program) /**/
+#else
+#define ServerDriverSDKTarget(program) @@\
+InstallDriverSDKProgramWithFlags(program,$(DRIVERSDKDIR),$(_NOOP_))
+#endif
+#endif
+
+#ifndef InstallDriverSDKProgramWithFlags
+#if !DoLoadableServer
+#define InstallDriverSDKProgramWithFlags(program,dest,flags) /**/
+#else
+#define InstallDriverSDKProgramWithFlags(program,dest,flags) @@\
+InstallTarget(install.sdk,ProgramTargetName(program),$(INSTPGMFLAGS) flags,dest)
+#endif
+#endif
diff --git a/nx-X11/config/cf/xf86.tmpl b/nx-X11/config/cf/xf86.tmpl
new file mode 100644
index 000000000..ba352445e
--- /dev/null
+++ b/nx-X11/config/cf/xf86.tmpl
@@ -0,0 +1,128 @@
+XCOMM $Xorg: xf86.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/cf/xf86.tmpl,v 3.32 2002/11/14 21:01:14 tsi Exp $
+
+#ifdef BuilderEMailAddr
+BUILDERADDR = BuilderEMailAddr
+#else
+BUILDERADDR = "xorg@freedesktop.org"
+#endif
+BUGMSG = -DBUILDERADDR='$(BUILDERADDR)'
+
+#if defined(XF86DriverSDK)
+ BUILDMODULEDIR = $(DRIVERSDKMODULEDIR)
+ BUILDMODULETOP = ..
+ TOP_INCLUDES = TopIncludes
+ IMAKE_DEFINES = -DXF86DriverSDK=1
+#ifdef UseInstalled
+ IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(TOP) -I$(IRULESRC) \
+ $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
+#else
+ IMAKE_CMD = $(IMAKE) -I$(TOP) -I$(IRULESRC) \
+ $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
+#endif
+
+#undef ImakeSubCmdHelper
+#ifdef UseInstalled
+#define ImakeSubCmdHelper $(IMAKE) -DUseInstalled -I$(IMAKETOP) \
+ -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
+#else
+#define ImakeSubCmdHelper $(IMAKEPREFIX)$(IMAKE) -I$(IMAKETOP) \
+ $(IMAKE_DEFINES) $(IMAKE_WARNINGS) \
+ -I$(IMAKEPREFIX)$(IRULESRC)
+#endif
+#endif
+
+#ifndef JoystickSupport
+#define JoystickSupport NO
+#endif
+
+/*
+ * Module support: These overrides must be here, not in xf86.rules,
+ * because they will replace rules after having seen the first lines
+ * of Imakefile (include <Server.tmpl>)
+ */
+
+
+#ifndef HasGccMergeConstants
+#define HasGccMergeConstants NO
+#endif
+
+#if HasGccMergeConstants && DoLoadableServer && !MakeDllModules
+MODULE_GCC_FLAGS = -fno-merge-constants
+#endif
+
+#if defined(IHaveModules) && MakeDllModules
+MODULE_PIC_FLAGS = $(PICFLAGS)
+#endif
+
+MODULE_CFLAGS = $(MODULE_PIC_FLAGS) $(MODULE_GCC_FLAGS)
+
+#if defined(IHaveModules)
+# if DoLoadableServer
+MODULE_DEFINES = -DIN_MODULE -DXFree86Module
+# else
+MODULE_DEFINES = -DXFree86Module
+# endif
+#endif
+
+#if defined(IHaveModules) && DoLoadableServer
+
+/* This overrides the ObjCompile in Imake.rules! */
+#undef ObjectCompile
+#define ObjectCompile(options) RemoveFile($@) @@\
+ ClearmakeOSName\
+ $(MODCC) $(MODCFLAGS) options -c $*.c
+
+/* This overrides an AssembleObject in xf86.rules or in an os-dependent
+ * rules file (currently only minix.cf and os2.rules (uncritical))
+ */
+#define ModCPPOnlyAsm(basename,options) RemoveFile(basename.i) @@\
+ $(MODCPP) AsmDefines $(DEFINES) $(INCLUDES) options basename.S | \ @@\
+ grep -v '^\#' > basename.i
+
+#undef AssembleObject
+#define AssembleObject(basename,flags) ModCPPOnlyAsm(basename,flags) @@\
+ RemoveFile(basename.o) @@\
+ $(MODAS) $(MODASFLAGS) -o basename.o basename.i @@\
+ RemoveFile(basename.i)
+
+/* This overrides the NormalRelocatableTarget in Imake.rules */
+#undef NormalRelocatableTarget
+#define NormalRelocatableTarget(objname,objlist) @@\
+AllTarget(objname.Osuf) @@\
+ @@\
+objname.Osuf: objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(MODLD) $(MODLDCOMBINEFLAGS) objlist -o $@
+
+/* This overrides the NormalDepRelocatableTarget in Imake.rules */
+#undef NormalDepRelocatableTarget
+#define NormalDepRelocatableTarget(objname,deplist,objlist) @@\
+AllTarget(objname.Osuf) @@\
+ @@\
+objname.Osuf: deplist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(MODLD) $(MODLDCOMBINEFLAGS) objlist -o $@
+
+/* This overrides the RanLibrary in Imake.rules */
+#if DoRanlibCmd || NeedModuleRanlib
+#undef RanLibrary
+#define RanLibrary(args) $(MODRANLIB) args
+#endif
+
+/* This overrides the MakeLibrary rule in Imake.rules */
+#undef MakeLibrary
+#define MakeLibrary(libname,objlist) $(MODAR) libname objlist
+
+/* This overrides the LibraryTargetName rule in Imake.rules */
+#undef LibraryTargetName
+#define LibraryTargetName(libname)Concat(lib,libname.a)
+
+/* This disables an OS/2 rule */
+#undef BuildLibSupportLibs
+#define BuildLibSupportLibs(dummy)
+
+#endif /* IHaveModules */
diff --git a/nx-X11/config/cf/xf86site.def b/nx-X11/config/cf/xf86site.def
new file mode 100644
index 000000000..d445c1c72
--- /dev/null
+++ b/nx-X11/config/cf/xf86site.def
@@ -0,0 +1,693 @@
+XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
+/******************************************************************************/
+/*
+ * This file is to provide a quick method for most people to change the
+ * behaviour of their XFree86 installation without having to fully
+ * understand the workings of site.def and all the various '.cf' files.
+ *
+ * In the vast majority of cases, it should not be necessary to use this
+ * file at all or change it in any way.
+ *
+ * This file is divided into two sections. The first contains settings
+ * that end-users might reasonably change. The second contains settings
+ * that developers might want to change.
+ *
+ * IMPORTANT NOTE: In all cases changing the defaults may cause problems
+ * and/or unexpected side-effects. If you don't understand what a setting
+ * does, then it's best to not change it. If you make changes and have
+ * problems, verify that those problems are also present when using an
+ * empty host.def file and unchanged version of this file before reporting
+ * them.
+ *
+ * A good way to use this file is to copy it to host.def, and make the
+ * changes there. That way, future patches to this file won't fail.
+ * The host.def file will never be patched.
+ *
+ * The distributed version of this file MUST contain no uncommented
+ * definitions. Default definitions belong in xfree86.cf, or <vendor>.cf
+ * files.
+ */
+/******************************************************************************/
+
+/*
+ * If you have build-specific modifications in your host.def file, but
+ * want an empty host.def file installed when doing 'make install',
+ * uncomment the following
+ *
+#define InstallEmptyHostDef
+ */
+
+/*
+ * Which servers to build. There is now only one XFree86 server.
+ * It can be disabled by the following.
+ *
+#define XF86Server NO
+ */
+
+/*
+ * To disable building the Xnest server, uncomment this.
+ *
+#define XnestServer NO
+ */
+
+/*
+ * To disable building Xvfb, uncomment this.
+ *
+#define XVirtualFramebufferServer NO
+ */
+
+/*
+ * To enable building Xdmx, uncomment this.
+ *
+#define XdmxServer YES
+ */
+
+/*
+ * To disable building Xprt, uncomment this.
+ *
+#define XprtServer NO
+ */
+
+/*
+ * Set the default server (ie the one that gets the sym-link to "X")
+ *
+#define ServerToInstall XFree86
+ */
+
+/*
+ * If you only run the X server under xdm the X servers don't need to be
+ * installed SetUID, and you may comment out the lines below. If you run
+ * the servers by hand (with xinit or startx), then they do need to be
+ * installed SetUID on most platforms.
+ *
+ * Consult your system administrator before making the X server setuid.
+ *
+#define InstallXserverSetUID NO
+ */
+
+
+/*
+ * Server configuration parameters. The defaults are shown here:
+ */
+
+/*
+ * Which drivers to build. When building a static server, each of these
+ * will be included in it. When building the loadable server each of these
+ * modules will be built.
+ *
+#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
+ neomagic i740 tdfx savage \
+ cirrus vmware tseng trident chips apm \
+ GlideDriver fbdev i128 \
+ ati AgpGartDrivers DevelDrivers ark cyrix \
+ siliconmotion \
+ vesa vga XF86OSCardDrivers XF86ExtraCardDrivers
+ */
+
+/*
+ * To add third party drivers to the standard driver list, set the
+ * following.
+ *
+#define XF86ExtraCardDrivers extradriver1 extradriver2 ...
+ */
+
+/*
+ * Select the XInput devices you want by uncommenting this.
+ *
+#define XInputDrivers mouse keyboard acecad calcomp citron \
+ digitaledge dmc dynapro elographics \
+ microtouch mutouch penmount spaceorb summa \
+ wacom void magictouch aiptek
+ */
+
+/*
+ * There are three parameters that determine where and how the Matrox HAL
+ * library is used:
+ *
+ * HaveMatroxHal -- You have the HALlib.a binary library installed
+ * in xfree86/drivers/mga/HALlib, and you want it to
+ * be used.
+ * Default: NO
+ *
+ * BuildMatroxHal -- You have the source for the HALlib library (installed
+ * in xfree86/drivers/mga/hallib), and want to build and
+ * use it.
+ * Default: NO
+ *
+ * UseMatroxHal -- You want to build support for loading/using the HAL
+ * library into the mga driver. For module server builds
+ * you don't need to have the HALlib library to do this.
+ * but you want to build support for loading it and using
+ * it into the mga driver module.
+ * Default: YES for loadable server build
+ * (HaveMatroxHal || BuildMatroxHal) for static
+ */
+
+/*
+ * To disable use of the Matrox HAL library, uncomment this:
+ *
+#define UseMatroxHal NO
+ */
+
+/*
+ * If you have the HALlib.a binary installed in xfree86/drivers/mga/HALlib,
+ * uncomment this:
+ *
+#define HaveMatroxHal YES
+ */
+
+/*
+ * If you have the HALlib source code installed in xfree86/drivers/mga/hallib,
+ * uncomment this:
+#define BuildMatroxHal YES
+ */
+
+/*
+ * To disable building the font server, uncomment this.
+ *
+#define BuildFontServer NO
+ */
+
+/*
+ * To disable support for Speedo fonts, uncomment this.
+ *
+#define BuildSpeedo NO
+ */
+
+/*
+ * To disable support for Type1 fonts, uncomment this.
+ *
+#define BuildType1 NO
+ */
+
+/*
+ * To disable support for CID fonts, uncomment this.
+ *
+#define BuildCID NO
+ */
+
+/*
+ * To disable support for TrueType fonts, uncomment these.
+ *
+#define BuildFreeType NO
+ */
+
+/*
+ * To set non-default build options for the underlying FreeType libraries,
+ * add them here and uncomment.
+ *
+#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES
+ */
+
+/*
+ * To build the FreeType libraries with the TrueType byte code interpreter
+ * enabled, uncomment this. Note that there are patent issues related to the
+ * TrueType byte code interpreter, and we only recommend you enabling this
+ * if you are sure that there are no legal impediments to you doing so. See
+ * <http://www.freetype.org/patents.html> for further information.
+ *
+#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
+ */
+
+/*
+ * Do you want to Build Fonts (Usually you only want to build and install
+ * fonts once, if this is a first time install you will want to build the
+ * fonts)
+ *
+#define BuildFonts NO
+ */
+
+/*
+ * To not build/install the 75dpi fonts, uncomment the following
+ *
+#define Build75DpiFonts NO
+ */
+
+/*
+ * To not build/install the 100dpi fonts, uncomment the following
+ *
+#define Build100DpiFonts NO
+ */
+
+/*
+ * To not build/install the Speedo fonts, uncomment the following
+ *
+#define BuildSpeedoFonts NO
+ */
+
+/*
+ * To not build/install the Type1 fonts, uncomment the following
+ *
+#define BuildType1Fonts NO
+ */
+
+/*
+ * To not build/install the CID fonts, uncomment the following
+ *
+#define BuildCIDFonts NO
+ */
+
+/*
+ * To not build/install the True Type fonts, uncomment the following
+ *
+#define BuildTrueTypeFonts NO
+ */
+
+/*
+ * To not build/install the Cyrillic fonts, uncomment the following
+ *
+#define BuildCyrillicFonts NO
+ */
+
+/*
+ * To not install the local font directory, uncomment the following
+ *
+#define MakeLocalFontDir NO
+ */
+
+/*
+ * To build only the servers with a cut-down source tree, uncomment
+ * this.
+ *
+#define BuildServersOnly YES
+ */
+
+/*
+ * By default, the sample config files for xinit, xdm and xfs are installed
+ * only when there is no pre-existing version installed. Uncommenting the
+ * following lines will force the sample versions to be installed even if
+ * it means over-writing existing versions.
+ *
+#define InstallXinitConfig YES
+#define InstallXdmConfig YES
+#define InstallFSConfig YES
+ */
+
+/*
+ * By default the application defaults files are always installed.
+ * Uncommenting the the following will prevent exising application
+ * defaults files from being over-written.
+ *
+#define InstallAppDefFiles NO
+ */
+
+/*
+ * Undefine the following if you don't want to have config files and
+ * app-defaults installed in a separate directory (i.e. /etc/X11).
+ *
+#define UseSeparateConfDir NO
+ */
+
+/*
+ * To enable building the glide driver, you need to define
+ * HasGlide2 to YES and set the Glide2IncDir variable.
+ * HasGlide2 is per default NO.
+ *
+#define HasGlide2 YES
+ */
+
+/*
+ * Set the path to your Glide include files.
+ *
+#define Glide2IncDir /usr/include/glide
+ */
+
+/*
+ * Have glide 3?
+ *
+#define HasGlide3 YES
+ */
+
+/*
+ * Set the path to your Glide 3 include files.
+ *
+#define Glide3IncDir /usr/include/glide3
+ */
+
+
+
+/*
+ * Unless you're a developer you shouldn't need to change anything
+ * beyond this point.
+ */
+
+/*
+ * If you want to enable some developer settings, like more verbose
+ * compiler warnings, uncomment this.
+ *
+#define XFree86Devel YES
+*/
+
+/*
+ * The default optimisation flags for GCC 2.x. -fno-strength-reduce is
+ * here to work around a bug in -O2 for GCC 2.x on i386 platforms.
+ * If you are using a version that doesn't have this bug, you can
+ * uncomment the following line, and remove '-fno-strength-reduce'
+ * If you are building binaries for a 486, it may be beneficial to add
+ * -m486
+ *
+#define DefaultGcc2i386Opt -O2 -fno-strength-reduce
+ */
+
+/*
+ * This allows the GCC warning flags to be set. The default is shown here.
+ *
+#define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wredundant-decls -Wnested-externs
+ */
+
+/*
+ * Sun Compiler stuff..
+ *
+#define HasSunC YES
+#define HasSunCplusplus YES
+#define CplusplusCompilerMajorVersion 5
+#define CplusplusCompilerMinorVersion 0
+#define CCompilerMajorVersion 5
+#define CCompilerMinorVersion 0
+ */
+
+/*
+ * Optimized Sun Compiler Build.
+ *
+#define DefaultCDebugFlags -xO4 -xtarget=pentium_pro
+#define OptimizedCDebugFlags -xO4 -xtarget=pentium_pro
+ */
+
+/*
+ * Debuggable Sun Compiler Build.
+ * Note: This builds _EVERYTHING_ as debuggable
+ *
+#define DefaultCDebugFlags -g -xs
+#define OptimizedCDebugFlags -g -xs
+ */
+
+/*
+ * For Linux, this should match the Binutils version you have. This example
+ * is for 2.6.0.7. See linux.cf for the default setting.
+ *
+ * This should automatically get set correctly by imake.
+ *
+#define LinuxBinUtilsMajorVersion 26
+ */
+
+/*
+ * For Linux, these should match the libc version you have. This example
+ * is for libc.5.4.x. See linux.cf for the default setting.
+ *
+ * This should automatically get set correctly by imake.
+ *
+#define LinuxCLibMajorVersion 5
+#define LinuxClibMinorVersion 4
+ */
+
+/*
+ * If you want to use the GNU malloc library, uncomment this
+ *
+#define UseGnuMalloc YES
+ */
+
+/*
+ * Set this to whatever is required to access the GNU malloc library.
+ * The default is '-lgmalloc' unless is specified in the OS's .cf file.
+ *
+#define GnuMallocLibrary -L/usr/local/lib -lgmalloc
+ */
+
+/*
+ * To enable the internal Xserver malloc, uncomment this
+ *
+#define UseInternalMalloc YES
+ */
+
+/*
+ * Some Linux releases don't have a libtermcap. In this case you may need
+ * to uncomment the following
+ *
+#define TermcapLibrary -lncurses
+ */
+
+/*
+ * Build a server that dynamically loads the modules by setting
+ * this to YES. This defaults to YES on most platforms. A static server
+ * can be built by setting this to NO.
+ *
+#define DoLoadableServer NO
+ */
+
+/*
+ * Build dlopen() style modules instead of the standard loader modules.
+ * Don't enable this unless you have specific development reasons for
+ * doing so and understand how to deal with the problems you'll run in to.
+ *
+ * Enabling this for regular use is NOT supported, and will almost
+ * certainly cause you problems.
+ *
+#define MakeDllModules YES
+ */
+
+/*
+ * Build XAA. This can be disabled with:
+ *
+#define XF86XAA NO
+ */
+
+/*
+ * Build vgahw. This can be disabled with:
+ *
+#define XF86VgaHw NO
+ */
+
+/*
+ * Build xf1bpp. This can be disabled with:
+ *
+#define XF1Bpp NO
+ */
+
+/*
+ * Build xf4bpp. This can be disabled with:
+ *
+#define XF4Bpp NO
+ */
+
+
+/*
+ * BSD Console driver support (for FreeBSD and NetBSD).
+ *
+ * By default, support is included for pccons and pcvt for NetBSD, and
+ * pccons, syscons and pcvt for FreeBSD.
+ *
+ * To change the list of supported drivers, set the following parameter.
+ * Possible values are -DPCCONS_SUPPORT, -DSYSCONS_SUPPORT, -DPCVT_SUPPORT.
+ * The following example includes support for syscons and pcvt only.
+ *
+#define XFree86ConsoleDefines -DSYSCONS_SUPPORT -DPCVT_SUPPORT
+ */
+
+/*
+ * To link the X server with a dynamic version of the Xfont library,
+ * uncomment this.
+ *
+#define XserverStaticFontLib NO
+ */
+
+/*
+ * To enable binary compatibility with previous versions of the font
+ * encoding support, uncomment this.
+ *
+#define FontencCompatibility YES
+ */
+
+/*
+ * To disable building XInput support, uncomment this
+ *
+#define BuildXInputExt NO
+ */
+
+/*
+ * Uncomment this for joystick support.
+ *
+ * Note: Joystick support is broken, so don't enable this.
+ *
+#define JoystickSupport YES
+ */
+
+/*
+ * To disable the ScreenSaver Extension, uncomment this line.
+ *
+#define BuildScreenSaverExt NO
+ */
+
+/*
+ * If you don't want to build Xinerama support, uncomment this.
+ *
+#define BuildXinerama NO
+ */
+
+/*
+ * If you don't want to build support for the GLX extension, uncomment this.
+ *
+#define BuildGlxExt NO
+ */
+
+/*
+ * If you want to build the xf86rush extension, uncomment this line.
+ * This isn't recommended.
+ *
+#define BuildXF86RushExt YES
+ */
+
+/*
+ * If you want to build the client library for the xf86rush extension,
+ * uncomment this line. This isn't recommended.
+ *
+#define BuildXF86RushLibrary NO
+ */
+
+/*
+ * If you are running NetBSD 0.9C or later, and have the aperture driver
+ * installed, uncomment this.
+ *
+#define HasNetBSDApertureDriver YES
+ */
+
+/*
+ * If you are running SVR3 and have the mmap driver installed (for linear
+ * framebuffer access) uncomment this.
+ *
+#define HasSVR3mmapDrv YES
+ */
+
+/*
+ * If you are using an SVR3 (like ISC 4.x) which supports long file names,
+ * you can * uncomment this to have manual pages installed under their
+ * full names
+ *
+#define ExpandManNames YES
+ */
+
+/*
+ * For a POSIXized build on Interactive uncomment this
+ * Could be used with gcc 'till Version 2.6.3
+ * Should be used with gcc 2.7.2.
+ *
+#define UsePosix YES
+ */
+
+/*
+ * If you want XDMAUTH support (if you have Wraphelp.c), uncomment this.
+ *
+#define HasXdmAuth YES
+ */
+
+/*
+ * If you have Linux DECnet support, and want to build XFree86 with support
+ * for connections over DECnet, uncomment this.
+ *
+#define HasDECnet YES
+ */
+
+/*
+ * To build static and shared libraries with debugging information, uncomment
+ * this. Assumes you have Gcc2.
+ * (If you don't have Gcc2, you can use the DebugLib{X11,Xt,Xaw,...} variables
+ * to build debugging versions of the libraries separately.)
+ *
+#define DebuggableLibraries YES
+*/
+
+/*
+ * To forceably build static libraries in addition to shared libraries,
+ * uncomment this.
+ *
+#define ForceNormalLib YES
+ */
+
+/*
+ * Uncomment this if your default tools (eg, gcc, ld, as, etc) are
+ * not the Linux ELF versions.
+ *
+#define LinuxElfDefault NO
+ */
+
+/*
+ * To use ELF format shared libraries for supported OSs, uncomment this.
+ *
+ * For Linux the default setting of this is the same as the setting of
+ * LinuxElfDefault.
+ *
+ * For FreeBSD this should automatically be set correctly by imake. Only
+ * change it here if you need to override the automatic setting.
+ *
+#define UseElfFormat YES
+ */
+
+/*
+ * For FreeBSD/ELF (FreeBSD 3.0) it is possible to also build and install
+ * a.out compatibility libraries. To enable that, uncomment this.
+ *
+#define BuildAoutLibraries YES
+ */
+
+/*
+ * If you have trouble with make bombing out in Xlib, try uncommenting this.
+ * You will not get dependencies as a result, but better than nothing.
+ *
+#define MakeHashTableBug YES
+ */
+
+/*
+ * If you do not want your man pages compress under SVR3 systems that
+ * support it, uncomment this.
+ *
+#define CompressManPages NO
+ */
+
+/*
+ * If you have sgmlfmt (the XFree86 doctools package) and want to build
+ * formatted docs from the SGML source, uncomment this.
+ *
+#define HasSgmlFmt YES
+ */
+
+/*
+ * To disable building some document formats, uncomment some of these.
+ *
+#define BuildLinuxDocText NO
+#define BuildLinuxDocHtml NO
+#define BuildLinuxDocPS NO
+ */
+
+/*
+ * To install Japanese versions of the documentation uncomment this.
+ * Note: The Japanese documentation consists of a subset of the
+ * XFree86 3.1 docs.
+ *
+#define InstallJapaneseDocs YES
+ */
+
+/*
+ * To build/install X specs docs, uncomment the following.
+ * The SpecsDocDirs setting here is recommended because it covers
+ * the docs that XFree86 has changed or added.
+ *
+#define BuildSpecsDocs YES
+#define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xmu Xv XvMC i18n
+ */
+
+/*
+ * To build all specs docs, not just those listed in SpecsDocDirs, uncomment
+ * the following.
+ *
+#define BuildAllSpecsDocs YES
+ */
+
+/*
+ * If your system doesn't support vm86() mode and you have
+ * libx86emu set library path here
+ *
+#define X86EMU_LIBPATH /usr/local/lib
+ */
+
+
diff --git a/nx-X11/config/cf/xfree86.cf b/nx-X11/config/cf/xfree86.cf
new file mode 100644
index 000000000..f7c151c41
--- /dev/null
+++ b/nx-X11/config/cf/xfree86.cf
@@ -0,0 +1,2132 @@
+XCOMM $XFree86: xc/config/cf/xfree86.cf,v 3.466 2004/01/11 18:48:11 dawes Exp $
+/*
+ * This configuration file contains all of the configuration
+ * information for the XFree86 based X Servers.
+ *
+ * Most of these settings can be overridden in a vendor.cf or the
+ * BeforeVendor part of the site.def file.
+ */
+XCOMM $Xorg: xfree86.cf,v 1.4 2000/08/17 19:41:49 cpqbld Exp $
+
+
+/* Get and set version information. */
+
+#include "version.def"
+#include "date.def"
+/*
+ * As of the development trunk after 4.0.2, XFree86 versions are
+ * M.m.P.s, and XFree86Version is:
+ *
+ * M * 10000000 + m * 100000 + P * 1000 + s
+ *
+ * See xc/programs/Xserver/hw/xfree86/doc/Versions for further details.
+ *
+ * From 3.9.15 to 4.0.x, XFree86 release versions are X.Y.Z, and
+ * XFree86Version is:
+ *
+ * X * 1000 + Y * 100 + Z
+ *
+ * For the 3.3.x branch, the versions are X.Y.Z.W, with XFree86Version
+ * calculated as:
+ *
+ * X * 1000 + Y * 100 + Z * 10 + W
+ *
+ */
+#ifndef XFree86Version
+# ifdef XF86_VERSION_CURRENT
+# define XFree86Version XF86_VERSION_CURRENT
+# else /* Must be defined for bootstrapping purposes */
+# define XFree86Version 0
+# endif
+#endif
+
+#if !defined(XFree86VersionString) && \
+ defined(XF86_VERSION_MAJOR) && defined(XF86_VERSION_MINOR) && \
+ defined(XF86_VERSION_PATCH) && defined(XF86_VERSION_SNAP)
+# if XF86_VERSION_SNAP == 0
+#define XFree86VersionString `echo XF86_VERSION_MAJOR XF86_VERSION_MINOR XF86_VERSION_PATCH | sed 's/ /./g'`
+#else
+#define XFree86VersionString `echo XF86_VERSION_MAJOR XF86_VERSION_MINOR XF86_VERSION_PATCH XF86_VERSION_SNAP | sed 's/ /./g'`
+# endif
+#endif
+
+#if !defined(XFree86ManVersionString) && \
+ defined(XF86_VERSION_MAJOR) && defined(XF86_VERSION_MINOR) && \
+ defined(XF86_VERSION_PATCH) && defined(XF86_VERSION_SNAP)
+# if XF86_VERSION_SNAP == 0
+#define XFree86ManVersionString `echo XF86_VERSION_MAJOR XF86_VERSION_MINOR XF86_VERSION_PATCH | sed -e 's/ /./g' -e 's/^/Version\\\ /'`
+#else
+#define XFree86ManVersionString `echo XF86_VERSION_MAJOR XF86_VERSION_MINOR XF86_VERSION_PATCH XF86_VERSION_SNAP | sed -e 's/ /./g' -e 's/^/Version\\\ /'`
+# endif
+#endif
+
+#if !defined(XFree86DateString) && defined(XF86_DATE)
+# define XFree86DateString XF86_DATE
+#endif
+
+#ifndef BuildDateCmd
+# define BuildDateCmd date +%Y%m%d
+#endif
+
+#if !defined(BuildDate)
+# define BuildDate `BuildDateCmd`
+#endif
+
+#ifndef ChangelogDateCmd
+# define ChangelogDateCmd if tail $(CHANGELOGFILE) | \ @@\
+ fgrep '$$XFree86:' >/dev/null 2>&1; then \ @@\
+ tail $(CHANGELOGFILE) | fgrep '$$XFree86:' | \ @@\
+ sed s,'.* \([0-9][0-9]*\)/\([0-9][0-9]*\)/\([0-9][0-9]*\).*,\1\2\3,'; \ @@\
+ else echo 0; fi
+#endif
+
+#if !defined(ChangelogDate)
+# define ChangelogDate `ChangelogDateCmd`
+#endif
+
+#ifndef XVendorString
+# define XVendorString "The X.Org Foundation, Inc"
+#endif
+
+#ifndef XVendorRelease
+# define XVendorRelease XFree86Version
+#endif
+
+#ifndef XVendorManVersionString
+#define XVendorManVersionString XFree86ManVersionString
+#endif
+
+#ifndef XVendorManNameString
+#define XVendorManNameString XFree86
+#endif
+
+/*
+ * This enables some settings for developers.
+ */
+
+#ifndef XFree86Devel
+# if !defined(PatheticCpp) || !PatheticCpp
+# if (XFree86Version % 1000)
+# define XFree86Devel YES
+# else
+# define XFree86Devel NO
+# endif
+# else
+# define XFree86Devel NO /* Assume the worst */
+# endif
+#endif
+
+#ifndef BuildDebug
+# define BuildDebug YES
+#endif
+
+/*
+ * settings for the config file parser
+ */
+
+#ifndef XConfigFile
+#define XConfigFile XF86Config
+#endif
+#ifndef XConfigDir
+#define XConfigDir $(LIBDIR)
+#endif
+#ifndef XLogFile
+#define XLogFile XFree86
+#endif
+
+/*
+ * BuildXFree86ConfigTools:
+ *
+ * Turning this on allows the XFree86 config tools to build when
+ * BuildServersOnly is YES. This requires more than the servonly CVS
+ * module. This cannot be used to disable building the config tools with
+ * a full build.
+ */
+#ifndef BuildXFree86ConfigTools
+#ifdef BuildServersOnly
+#define BuildXFree86ConfigTools !BuildServersOnly
+#else
+#define BuildXFree86ConfigTools YES
+#endif
+#endif
+
+#ifndef BuildLibrariesForConfigTools
+#define BuildLibrariesForConfigTools BuildXFree86ConfigTools
+#endif
+
+#if BuildXFree86ConfigTools && BuildLibrariesForConfigTools
+#define BuildLibraries YES
+#define BuildXF86MiscLibrary YES
+#define BuildXF86VidModeLibrary YES
+#define BuildXKBlib YES
+#define BuildXKBfilelib YES
+#define BuildXKBuilib YES
+#endif
+
+/*
+ * When this is set, modules are always built separately from the libraries
+ * that statically link into an Xserver. This is for platforms where the
+ * module and native object formats are different (e.g., OS/2).
+ */
+#ifndef BuildModuleInSubdir
+#define BuildModuleInSubdir NO
+#endif
+
+#ifndef MakeDllModules
+#define MakeDllModules NO
+#endif
+#ifndef DoLoadableServer
+#define DoLoadableServer NO
+#endif
+
+/*
+ * Default settings for which X Servers to build.
+ */
+
+/* OS.cf files may set this for OS-specific input drivers */
+#ifndef OSXInputDrivers
+#define OSXInputDrivers /**/
+#endif
+
+/* This may be set in host.def for 3rd party input drivers */
+#ifndef ExtraXInputDrivers
+#define ExtraXInputDrivers /**/
+#endif
+
+/* XInput drivers */
+#ifndef XInputDrivers
+#define XInputDrivers mouse keyboard acecad calcomp citron \
+ digitaledge dmc dynapro elographics tek4957 \
+ microtouch mutouch penmount spaceorb summa \
+ wacom void magellan /* magictouch */ hyperpen \
+ jamstudio fpit \
+ palmax OSXInputDrivers ExtraXInputDrivers
+#endif
+
+/* <linux/input.h> support mainly for USB support */
+#ifndef HasLinuxInput
+# define HasLinuxInput NO
+#endif
+
+/* OS.cf files may set this for OS-specific drivers */
+#ifndef XF86OSCardDrivers
+#define XF86OSCardDrivers /**/
+#endif
+
+/* This may be set in host.def for 3rd party drivers */
+#ifndef XF86ExtraCardDrivers
+#define XF86ExtraCardDrivers /**/
+#endif
+
+/* OS.cf files may set this for OS-specific drivers */
+#ifndef HasAgpGart
+#define HasAgpGart NO
+#endif
+
+/* The glide driver only works for the loadable server at the moment */
+#ifndef HasGlide2
+#define HasGlide2 NO
+#endif
+#if HasGlide2 && DoLoadableServer
+#define GlideDriver glide
+#else
+#define GlideDriver /**/
+#endif
+
+/*
+ * There are three parameters that determine where and how the Matrox HAL
+ * library is used:
+ *
+ * HaveMatroxHal -- You have the HALlib.a binary library installed
+ * in xfree86/drivers/mga/HALlib, and you want it to
+ * be used.
+ * Default: NO
+ *
+ * BuildMatroxHal -- You have the source for the HALlib library (installed
+ * in xfree86/drivers/mga/hallib), and want to build and
+ * use it.
+ * Default: NO
+ *
+ * UseMatroxHal -- You want to build support for loading/using the HAL
+ * library into the mga driver. For module server builds
+ * you don't need to have the HALlib library to do this.
+ * but you want to build support for loading it and using
+ * it into the mga driver module.
+ * Default: YES for loadable server build
+ * (HaveMatroxHal || BuildMatroxHal) for static
+ */
+
+#ifndef HaveMatroxHal
+#define HaveMatroxHal NO
+#endif
+
+#ifndef BuildMatroxHal
+#define BuildMatroxHal NO
+#endif
+
+#ifndef UseMatroxHal
+#if DoLoadableServer
+#define UseMatroxHal YES
+#else
+#define UseMatroxHal (HaveMatroxHal || BuildMatroxHal)
+#endif
+#endif
+
+/*
+ * For Intel platforms, the default is to build all modules which
+ * are supported on this platform.
+ */
+#if defined(i386Architecture) || defined(ia64Architecture)
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* EXA module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+/*
+ * Amiga framebuffer module.
+ * This is mostly for build testing, but the vesa driver references it.
+ */
+# ifndef XF86AFB
+# define XF86AFB YES
+# endif
+
+# define AgpGartDrivers /**/
+
+/*
+ * Drivers under development, but not ready for binary releases, or
+ * drivers included on this platform only for build testing.
+ */
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers imstt newport
+# else
+# define DevelDrivers /**/
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# /* Don't build the nsc driver on IA64 */
+# ifndef ia64Architecture
+# define NscDriver nsc
+# else
+# define NscDriver /**/
+# endif
+# define XF86CardDrivers mga glint nv tga s3 s3virge sis rendition \
+ neomagic i740 tdfx savage \
+ cirrus vmware tseng trident chips apm \
+ GlideDriver i128 NscDriver \
+ ati i810 AgpGartDrivers DevelDrivers ark \
+ cyrix siliconmotion via \
+ fbdev vesa vga \
+ dummy XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+
+/*
+ * DRI drivers under development, or drivers included on this platform
+ * only for build testing.
+ */
+# ifndef DevelDRIDrivers
+# if XFree86Devel
+# define DevelDRIDrivers ffb
+# else
+# define DevelDRIDrivers /**/
+# endif
+# endif
+
+# ifndef DriDrivers
+# define DriDrivers gamma i810 i830 mga r128 radeon r200 \
+ sis tdfx DevelDRIDrivers
+# endif
+#endif
+
+#if defined(AMD64Architecture)
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* EXA module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+# define AgpGartDrivers /**/
+
+# define DevelDrivers /**/
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers mga glint nv tga s3 s3virge sis rendition \
+ neomagic tdfx savage cirrus tseng trident \
+ chips apm i128 ati ark cyrix siliconmotion \
+ vga dummy fbdev vesa
+# endif
+
+/* DRI tdfx driver needs Glide, which is not available for AMD64 */
+# define TdfxDriDriver /**/
+
+# define DevelDRIDrivers /**/
+
+# define DriDrivers gamma i810 mga r128 radeon r200 \
+ TdfxDriDriver DevelDRIDrivers
+#endif /*AMD64Arcitecture*/
+
+/* SPARC and UltraSPARC drivers */
+
+#if (defined(SparcArchitecture) || defined(Sparc64Architecture)) && \
+ !defined(LynxOSArchitecture) && \
+ !defined(NetBSDArchitecture) && \
+ !defined(OpenBSDArchitecture)
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32wid fb module */
+# ifndef XF8_32Wid
+# define XF8_32Wid YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* EXA module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+ /*
+ * Some of these are compiled just for the fun of it. Undoubtedly some
+ * require changes (or even removal) for things like endianness, etc. Move
+ * those known to work into the main XF86CardDrivers #define.
+ */
+# define DevelDrivers apm ark chips cirrus i128 i740 i810 imstt \
+ neomagic newport nv rendition s3virge savage \
+ siliconmotion tga trident vmware dummy
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure SBUS and PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers sunffb sunleo suncg6 suncg3 suncg14 suntcx \
+ sunbw2 glint mga tdfx ati vesa vga fbdev \
+ XF86OSCardDrivers XF86ExtraCardDrivers \
+ DevelDrivers
+# endif
+# ifndef DriDrivers
+# define DriDrivers ffb
+# endif
+
+#endif
+
+/* Sparc64 Drivers */
+#if defined(OpenBSDArchitecture) && defined(Sparc64Architecture)
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* Amiga framebuffer module */
+# ifndef XF86AFB
+# define XF86AFB NO
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* EXA module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+# ifndef UseX86Emu
+# define UseX86Emu NO
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers /* */
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers ati \
+ DevelDrivers \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+# define TdfxDriDriver /**/
+# ifndef DriDrivers
+# define DriDrivers /**/
+# endif
+#endif
+
+/* MIPS drivers */
+
+#ifdef MipsArchitecture
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* Exa module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers /* */
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+# ifndef XF86CardDrivers
+# define XF86CardDrivers mga glint nv s3 s3virge sis savage \
+ trident chips tdfx fbdev ati \
+ DevelDrivers newport \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+#endif
+
+/*
+ * DEC Alpha drivers
+ */
+#ifdef AlphaArchitecture
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* Exa module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers /* */
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers mga tdfx glint s3 s3virge rendition tga ati \
+ savage nv cirrus DevelDrivers siliconmotion \
+ vga XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+# ifndef DriDrivers
+# define DriDrivers gamma tdfx mga r128 radeon r200 /*sis*/
+# endif
+#endif
+
+/*
+ * Motorola 68k and PowerPC drivers
+ */
+#if defined(PpcArchitecture) || defined(Mc68020Architecture)
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* Amiga framebuffer module */
+# ifndef XF86AFB
+# define XF86AFB YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* Exa module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers imstt
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers ati mga glint nv s3 s3virge sis savage\
+ trident chips tdfx fbdev \
+ DevelDrivers vga \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+# ifndef DriDrivers
+# define DriDrivers gamma tdfx mga r128 radeon r200
+# endif
+#endif
+
+/*
+ * Intel StrongARM and Hewlett-Packard PA-RISC
+ */
+#if defined(Arm32Architecture) || defined(HPArchitecture)
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* Exa module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers /* */
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers ati mga glint nv s3 s3virge sis savage\
+ trident chips tdfx fbdev \
+ DevelDrivers vga \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+# if HasGlide3
+# define TdfxDriDriver tdfx
+# else
+# define TdfxDriDriver /**/
+# endif
+# ifndef DriDrivers
+# define DriDrivers gamma tdfx mga r128 radeon r200
+# endif
+#endif
+
+/* SuperH drivers */
+
+#if defined(SuperHArchitecture)
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* Exa module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+# ifndef XF86CardDrivers
+# define XF86CardDrivers fbdev XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+#endif
+
+/*
+ * For PowerPC 64bit systems
+ * only libraries are strictly needed
+ */
+#if defined(Ppc64Architecture)
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+/* Amiga framebuffer module */
+# ifndef XF86AFB
+# define XF86AFB NO
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp NO
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp NO
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* 24/32bpp conversion module */
+# ifndef XF24_32Bpp
+# define XF24_32Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw NO
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* Exa module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers ati mga \
+ DevelDrivers \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+# if HasGlide3
+# define TdfxDriDriver
+# else
+# define TdfxDriDriver /**/
+# endif
+# ifndef DriDrivers
+# define DriDrivers gamma r128
+# endif
+#endif
+
+/*
+ * For Mips/Arc platforms, the default is to build all modules which
+ * are supported on this platform.
+ */
+#ifdef ArcArchitecture
+# ifndef XF86Server
+# define XF86Server YES
+# endif
+#endif
+
+#if BuildDebug
+# define DebugDefines -DBUILDDEBUG
+#else
+# define DebugDefines /**/
+#endif
+
+#ifndef XF86Server
+# define XF86Server NO
+#endif
+#if !XF86Server
+# undef DoLoadableServer
+# define DoLoadableServer NO
+#endif
+
+/*
+ * Fbdev module defines. They are set to indicate the fb types supported
+ * on different architectures.
+ */
+#ifndef XF86AFB
+# define XF86AFB NO
+#endif
+#ifndef XF86ILBM
+# define XF86ILBM NO
+#endif
+#ifndef XF86IPLAN2P2
+# define XF86IPLAN2P2 NO
+#endif
+#ifndef XF86IPLAN2P4
+# define XF86IPLAN2P4 NO
+#endif
+#ifndef XF86IPLAN2P8
+# define XF86IPLAN2P8 NO
+#endif
+#if XF86AFB
+AFB_DEFS = -DUSE_AFB
+#endif
+#if XF86ILBM
+ILBM_DEFS = -DUSE_ILBM
+#endif
+#if XF86IPLAN2P2
+IPLAN2P2_DEFS = -DUSE_IPLAN2P2
+#endif
+#if XF86IPLAN2P4
+IPLAN2P4_DEFS = -DUSE_IPLAN2P4
+#endif
+#if XF86IPLAN2P8
+IPLAN2P8_DEFS = -DUSE_IPLAN2P8
+#endif
+#ifndef FbdevDefines
+# define FbdevDefines $(AFB_DEFS) $(ILBM_DEFS) $(IPLAN2P2_DEFS) \
+ $(IPLAN2P4_DEFS) $(IPLAN2P8_DEFS)
+#endif
+
+/*
+ * The default is to install the X servers setuid-root on most OSs.
+ * It the servers are only started by xdm, they should not be setuid-root.
+ */
+#if !defined(i386MachArchitecture) && !defined(OS2Architecture)
+# ifndef InstallXserverSetUID
+# define InstallXserverSetUID YES
+# endif
+#endif
+
+/*
+ * Build GLX server interface
+ * --- Doesn't work for 1-bit and 4-bit servers
+ */
+#ifndef BuildGlxExt
+# define BuildGlxExt YES
+#endif
+
+#ifndef BuildXF86DRI
+#define BuildXF86DRI NO
+#endif
+
+#ifndef GlxUseSGISI
+#define GlxUseSGISI NO
+#endif
+
+#if BuildXF86DRI
+
+#ifndef BuildGLXLibrary
+# if defined (BuildServersOnly) && BuildServersOnly
+# define BuildGLXLibrary NO
+# else
+# define BuildGLXLibrary YES
+# endif
+#endif
+
+/*
+ * One and ONLY one of the GlxBuiltIn* drivers can be defined to be YES.
+ * If more than one are defined, the compilation will fail with multiply
+ * defined references of GLX and OpenGL functions.
+ */
+
+/*
+ * The first is a built-in driver that does software rendering client-side
+ * and renders to the X server via Xlib.
+ */
+
+# ifndef GlxBuiltInXMesa
+# define GlxBuiltInXMesa NO
+# endif
+
+/*
+ * The rest are hardware-specific DRI drivers.
+ */
+# ifndef GlxBuiltInGamma
+# define GlxBuiltInGamma NO
+# endif
+# ifndef GlxBuiltInTdfx
+# define GlxBuiltInTdfx NO
+# endif
+# ifndef GlxBuiltInMga
+# define GlxBuiltInMga NO
+# endif
+# ifndef GlxBuiltInI810
+# define GlxBuiltInI810 NO
+# endif
+# ifndef GlxBuiltInI830
+# define GlxBuiltInI830 NO
+# endif
+# ifndef GlxBuiltInR128
+# define GlxBuiltInR128 NO
+# endif
+# ifndef GlxBuiltInRadeon
+# define GlxBuiltInRadeon NO
+# endif
+# ifndef GlxBuiltInR200
+# define GlxBuiltInR200 NO
+# endif
+# ifndef GlxBuiltInFfb
+# define GlxBuiltInFfb NO
+# endif
+# ifndef GlxBuiltInSIS
+# define GlxBuiltInSIS NO
+# endif
+
+# if GlxBuiltInTdfx || \
+ GlxBuiltInMga || \
+ GlxBuiltInI810 || \
+ GlxBuiltInI830 || \
+ GlxBuiltInR128 || \
+ GlxBuiltInRadeon || \
+ GlxBuiltInR200 || \
+ GlxBuiltInFfb || \
+ GlxBuiltInSIS
+# define GlxDriverUsesMesa YES
+# else
+# define GlxDriverUsesMesa NO
+# endif
+
+# if GlxBuiltInGamma || \
+ GlxBuiltInTdfx || \
+ GlxBuiltInMga || \
+ GlxBuiltInI810 || \
+ GlxBuiltInI830 || \
+ GlxBuiltInR128 || \
+ GlxBuiltInRadeon || \
+ GlxBuiltInR200 || \
+ GlxBuiltInFfb || \
+ GlxBuiltInSIS
+# define GlxUseBuiltInDRIDriver YES
+# define DRIDynLoadDefines /**/
+# else
+# define GlxUseBuiltInDRIDriver NO
+# define DRIDynLoadDefines -DGLX_USE_DLOPEN
+# endif
+
+# if GlxUseBuiltInDRIDriver
+# undef DriDrivers
+# if GlxBuiltInGamma
+# define DriDrivers gamma
+# endif
+# if GlxBuiltInTdfx
+# define DriDrivers tdfx
+# endif
+# if GlxBuiltInMga
+# define DriDrivers mga
+# endif
+# if GlxBuiltInI810
+# define DriDrivers i810
+# endif
+# if GlxBuiltInI830
+# define DriDrivers i830
+# endif
+# if GlxBuiltInR128
+# define DriDrivers r128
+# endif
+# if GlxBuiltInRadeon
+# define DriDrivers radeon
+# endif
+# if GlxBuiltInR200
+# define DriDrivers r200
+# endif
+# if GlxBuiltInSIS
+# define DriDrivers sis
+# endif
+# if GlxBuiltInFfb
+# define DriDrivers ffb
+# endif
+# endif
+
+#endif
+
+/*
+ * This enables building DRI support into video drivers, which can be done
+ * even on platforms that don't have functional DRI support.
+ *
+ * Defining BuildXF86DRIDriverSupport to YES will not work until we have a
+ * separate set of defines set up for building driver-only support for the
+ * DRI.
+ */
+#ifndef BuildXF86DRIDriverSupport
+# define BuildXF86DRIDriverSupport NO
+#endif
+
+#if BuildGlxExt
+
+# if BuildXF86DRI
+# define DRIDefines -DXF86DRI -DGLX_DIRECT_RENDERING DRIDynLoadDefines
+# else
+# define DRIDefines /**/
+# endif
+# if defined(GlxUseSGISI) && GlxUseSGISI
+# define GlxCoreLibDefines -DGLX_USE_SGI_SI
+# else
+# define GlxCoreLibDefines -DGLX_USE_MESA
+# endif
+
+# if defined(SparcArchitecture) \
+ || defined (Sparc64Architecture) \
+ || defined(ia64Architecture) \
+ || defined(s390xArchitecture) \
+ || defined(AMD64Architecture)
+# define GlxArchDefines -D__GLX_ALIGN64
+# elif defined(AlphaArchitecture)
+/* On the Alpha we need to ensure floating point accuracy for 3D */
+# define GlxArchDefines -D__GLX_ALIGN64 -mieee
+# elif defined(DarwinArchitecture)
+/* GLX contains lots of uninitialized globals, which can upset Darwin */
+# define GlxArchDefines -fno-common
+# else
+# define GlxArchDefines /**/
+# endif
+
+# ifndef GlxExtraDefines
+# define GlxExtraDefines DRIDefines GlxCoreLibDefines GlxArchDefines
+# endif
+
+#else
+
+/* If we are not building GLX, then make sure the DRI is not built */
+# undef BuildXF86DRI
+# define BuildXF86DRI NO
+# undef BuildXF86DRIDriverSupport
+# define BuildXF86DRIDriverSupport NO
+
+#endif
+
+#if !BuildXF86DRI
+# define GlxUseBuiltInDRIDriver NO /* For libOSmesa */
+#endif
+
+# ifndef UseX86Emu
+# define UseX86Emu YES
+# endif
+
+#define X86INT10_STUB 0
+#define X86EMU_GENERIC 1
+#define X86VM 2
+#define X86EMU_OS 3
+
+#ifndef XF86INT10_BUILD
+# if UseX86Emu
+# define XF86INT10_BUILD X86EMU_GENERIC
+# else
+# define XF86INT10_BUILD X86INT10_STUB
+# endif
+#endif
+/*
+ * Build the Rush extension library (non standard extension for cooperation
+ * between glide library and X server). Enabled by default only for Linux.
+ */
+#ifndef BuildXF86RushExt
+# define BuildXF86RushExt NO
+#endif
+
+#ifndef BuildDBElib
+# define BuildDBElib YES
+#endif
+
+#ifndef BuildRECORDlib
+# define BuildRECORDlib YES
+#endif
+
+#ifndef BuildXKBlib
+# define BuildXKBlib YES
+#endif
+
+#ifndef BuildScreenSaverExt
+# define BuildScreenSaverExt YES
+#endif
+
+/*
+ * Build XInput support
+ */
+#ifndef BuildXInputExt
+# define BuildXInputExt YES
+#endif
+
+/* Build Xinerama (aka panoramiX) extension */
+#ifndef BuildXinerama
+# define BuildXinerama YES
+#endif
+
+/* Build Render extension */
+#ifndef BuildRender
+# define BuildRender YES
+#endif
+
+#if 0
+#ifndef JoystickSupport
+# define JoystickSupport NO
+#endif
+#endif
+
+#if 0
+/*
+ * Build the extra extension libs even when not including the extra extensions
+ * in the servers
+ */
+#ifndef BuildScreenSaverLibrary
+# define BuildScreenSaverLibrary YES
+#endif
+#ifndef BuildXF86MiscLibrary
+# define BuildXF86MiscLibrary YES
+#endif
+#ifndef BuildXF86DGALibrary
+# define BuildXF86DGALibrary YES
+#endif
+#ifndef BuildXF86VidModeLibrary
+# define BuildXF86VidModeLibrary YES
+#endif
+#ifndef BuildXvLibrary
+# define BuildXvLibrary YES
+#endif
+#ifndef BuildXvMCLibrary
+# define BuildXvMCLibrary YES
+#endif
+#ifndef BuildGLXLibrary
+# define BuildGLXLibrary YES
+#endif
+#ifndef BuildXResLibrary
+# define BuildXResLibrary YES
+#endif
+#endif
+
+/*
+ * Build the XFree86-VidMode extension
+ */
+#ifndef BuildXF86VidModeExt
+# define BuildXF86VidModeExt YES
+#endif
+
+/* Don't build this now because the interface hasn't been done yet */
+/*
+ * Build the XFree86-Misc extension
+ */
+#ifndef BuildXF86MiscExt
+# define BuildXF86MiscExt YES
+#endif
+
+/*
+ * Build the XFree86-Bigfont extension
+ */
+#ifndef BuildXF86BigfontExt
+# define BuildXF86BigfontExt YES
+#endif
+
+/*
+ * Build the XFree86 DGA support
+ */
+#ifndef BuildXF86DGA
+# define BuildXF86DGA YES
+#endif
+
+/*
+ * Build the DPMS extension support
+ */
+#ifndef BuildDPMSExt
+# define BuildDPMSExt YES
+#endif
+
+/*
+ * Build the X Video Extension
+ */
+#ifndef BuildXvExt
+# define BuildXvExt YES
+#endif
+
+/*
+ * Build the X Video Motion Compensation Extension
+ */
+#ifndef BuildXvMCExt
+# define BuildXvMCExt YES
+#endif
+
+/*
+ * Build the X-Resource Extension
+ */
+#ifndef BuildXResExt
+# define BuildXResExt YES
+#endif
+
+#if Malloc0ReturnsNull
+# ifndef XtMalloc0ReturnsNullDefines
+# define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines -DXTMALLOC_BC
+# endif
+#endif
+
+#ifndef UseInternalMalloc
+# define UseInternalMalloc NO
+#endif
+
+#ifndef HasDlsymBug
+# define HasDlsymBug NO
+#endif
+
+#ifndef HasMTRRSupport
+# define HasMTRRSupport NO
+#endif
+
+/*
+ * Build the font server
+ */
+#ifndef BuildFontServer
+# define BuildFontServer YES
+#endif
+
+/*
+ * Include fonts support
+ */
+#ifndef BuildSpeedo
+# define BuildSpeedo NO
+#endif
+
+#ifndef BuildType1
+# define BuildType1 NO
+#endif
+
+#ifndef BuildCID
+# define BuildCID YES
+#endif
+
+#ifndef BuildFreeType
+# define BuildFreeType YES
+#endif
+
+/*
+ * By default, build all of the fonts.
+ */
+#ifndef Build75DpiFonts
+# define Build75DpiFonts YES
+#endif
+#ifndef Build100DpiFonts
+# define Build100DpiFonts YES
+#endif
+#ifndef BuildSpeedoFonts
+# define BuildSpeedoFonts NO
+#endif
+#ifndef BuildType1Fonts
+# define BuildType1Fonts YES
+#endif
+#ifndef BuildCIDFonts
+# define BuildCIDFonts YES
+#endif
+#ifndef BuildTrueTypeFonts
+# define BuildTrueTypeFonts YES
+#endif
+#ifndef BuildCyrillicFonts
+# define BuildCyrillicFonts YES
+#endif
+
+/*
+ * Build scanpci?
+ */
+#ifndef SystemV
+#define SystemV NO
+#endif
+#ifndef SystemV4
+#define SystemV4 NO
+#endif
+#ifndef BuildScanpci
+# if SystemV || SystemV4 || \
+ (defined(LinuxArchitecture) && !defined(Mc68020Architecture)) || \
+ defined(i386BsdArchitecture) || defined(LynxOSArchitecture) || \
+ defined(OS2Architecture) || defined(GNUMachArchitecture) || \
+ (defined(KFreeBSDArchitecture) && defined(i386Architecture))
+# define BuildScanpci YES
+# else
+# define BuildScanpci NO
+# endif
+#endif
+
+#ifndef CompressAllFonts
+# define CompressAllFonts YES
+#endif
+
+#ifndef GzipFontCompression
+# define GzipFontCompression YES
+#endif
+
+/* Disable stripping installed programs for this release. */
+#ifndef StripInstalledPrograms
+# define StripInstalledPrograms NO
+#endif
+
+#ifndef InstallJapaneseDocs
+#define InstallJapaneseDocs NO
+#endif
+
+#if BuildXF86DGA
+# define XFree86DGADefines -DXFreeXDGA
+#else
+# define XFree86DGADefines /**/
+#endif
+
+#if BuildXvExt
+# define XFree86XvDefines -DXvExtension
+#else
+# define XFree86XvDefines /**/
+#endif
+
+#if BuildXvMCExt
+# define XFree86XvMCDefines -DXvMCExtension
+#else
+# define XFree86XvMCDefines /**/
+#endif
+
+#if BuildXResExt
+# define XFree86XResDefines -DXResExtension
+#else
+# define XFree86XResDefines /**/
+#endif
+
+#ifndef DlopenHack
+# define DlopenHack -DDLOPEN_HACK
+#endif
+
+#ifndef ExtraLoaderDefines
+# if MakeDllModules
+# define ExtraLoaderDefines DlopenHack
+# else
+# define ExtraLoaderDefines /**/
+# endif
+#endif
+
+#if DoLoadableServer
+# define XFree86LoaderDefines -DXFree86LOADER ExtraLoaderDefines
+#else
+# define XFree86LoaderDefines /**/
+#endif
+
+#ifndef HasBsdMake
+#define HasBsdMake NO
+#endif
+
+#ifndef MakeHasPosixVariableSubstitutions
+# if !HasBsdMake && !defined(SunArchitecture)
+# define MakeHasPosixVariableSubstitutions NO
+# else
+# define MakeHasPosixVariableSubstitutions YES
+# endif
+#endif
+
+#ifndef UseSmartScheduler
+#define UseSmartScheduler YES
+#endif
+
+#if UseSmartScheduler
+#define SmartScheduleDefines -DSMART_SCHEDULE
+#else
+#define SmartScheduleDefines /**/
+#endif
+
+/* Server defines required for all OSs */
+#ifndef XFree86ServerDefines
+# define XFree86ServerDefines -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH \
+ XFree86DGADefines XFree86XvDefines \
+ XFree86LoaderDefines -DXFree86Server \
+ VidModeExtensionDefines \
+ XFree86XvMCDefines \
+ SmartScheduleDefines \
+ DebugDefines XFree86XResDefines \
+ -DX_BYTE_ORDER=$(X_BYTE_ORDER)
+#endif
+
+#ifndef XFree86ServerOSDefines
+# define XFree86ServerOSDefines -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR \
+ -DDDXOSVERRORF
+#endif
+
+#ifndef XFree86ConsoleDefines
+# if defined(i386BsdArchitecture) || defined(AlphaBsdArchitecture) || (defined(KFreeBSDArchitecture) && defined(i386Architecture))
+# define XFree86ConsoleDefines -DPCCONS_SUPPORT -DSYSCONS_SUPPORT -DPCVT_SUPPORT
+# elif defined(KFreeBSDArchitecture)
+# define XFree86ConsoleDefines -DSYSCONS_SUPPORT
+# else
+# define XFree86ConsoleDefines /**/
+# endif
+#endif
+
+/* Support for USB mouse */
+#ifndef UsbMouseSupport
+# define UsbMouseSupport NO
+#endif
+/* Does this OS have libusb ? */
+#ifndef HasLibUsb
+# define HasLibUsb NO
+#endif
+
+#ifndef UseServerLock
+# define UseServerLock YES
+#endif
+
+#ifndef XnestServer
+# define XnestServer YES
+#endif
+#ifndef XVirtualFramebufferServer
+# define XVirtualFramebufferServer YES
+#endif
+#ifndef XprtServer
+# define XprtServer YES
+#endif
+
+#ifndef ServerExtraDefines
+# define ServerExtraDefines XFree86ServerDefines
+#endif
+
+#ifndef ServerOSDefines
+# define ServerOSDefines XFree86ServerOSDefines
+#endif
+
+#ifndef DriverSDKDir
+# define DriverSDKDir $(USRLIBDIR)/Server
+#endif
+
+#ifndef DriverSDKModuleDir
+# define DriverSDKModuleDir $(USRLIBDIR)/Server/modules
+#endif
+
+#ifndef DriverSDKIncludeDir
+# define DriverSDKIncludeDir $(USRLIBDIR)/Server/include
+#endif
+
+DRIVERSDKDIR = DriverSDKDir
+DRIVERSDKMODULEDIR = DriverSDKModuleDir
+DRIVERSDKINCLUDEDIR = DriverSDKIncludeDir
+
+/*
+ * Some commonly refered to directories are defined here.
+ */
+
+ XF86SRC = $(SERVERSRC)/hw/xfree86
+ XF86COMSRC = $(XF86SRC)/common
+ XF86PARSERSRC = $(XF86SRC)/parser
+ XF86OSSRC = $(XF86SRC)/os-support
+ XF86DRIVERSRC = $(XF86SRC)/drivers
+ DRIVERSRC = $(XF86DRIVERSRC)
+
+/*
+ * Installed location of the XFree86 documentation
+ */
+
+ XFREE86DOCDIR = $(DOCDIR)
+ XFREE86PSDOCDIR = $(DOCPSDIR)
+ XFREE86PDFDOCDIR = $(DOCPDFDIR)
+ XFREE86HTMLDOCDIR = $(DOCHTMLDIR)
+XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
+
+/*
+ * Other stuff used in the X Server source.
+ */
+
+#ifndef OtherIConfigFiles
+# define OtherIConfigFiles $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules
+#endif
+
+#ifndef UseRgbTxt
+# define UseRgbTxt YES
+#endif
+
+#ifndef ManSuffix
+# define ManSuffix 1
+#endif
+
+/*
+ * GNU Compiler stuff
+ */
+#ifndef HasGcc3
+# define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+# define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+# define HasGcc HasGcc2
+#endif
+#ifndef HasGcc2ForCplusplus
+# define HasGcc2ForCplusplus HasGcc2
+#endif
+
+#if HasGcc
+# ifndef Gcc28Warnings
+# if (GccMajorVersion > 2) || \
+ ((GccMajorVersion == 2) && (GccMinorVersion >= 8))
+# define Gcc28Warnings -Wundef
+# else
+# define Gcc28Warnings /* */
+# endif
+# endif
+# ifndef GccWarningOptions
+# if XFree86Devel
+# define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wredundant-decls -Wnested-externs Gcc28Warnings
+# else
+# define GccWarningOptions -Wall -Wpointer-arith Gcc28Warnings
+# endif
+# endif
+# ifndef DefaultCCOptions
+# if defined(UseInstalled)
+# define DefaultCCOptions /* -ansi */
+# else
+# define DefaultCCOptions -ansi GccWarningOptions
+# endif
+# endif
+# if defined(UseInstalled)
+# ifndef UseGccMakeDepend
+# define UseGccMakeDepend YES
+# endif
+# endif
+#endif
+
+/* Make imake noisier. Note that this is ineffective for 3.0 <= GCC <= 3.2 */
+#ifndef ImakeWarningFlags
+# ifdef Gcc28Warnings
+# define ImakeWarningFlags Gcc28Warnings
+# else
+# define ImakeWarningFlags /* */
+# endif
+#endif
+
+#if (GccMajorVersion == 3) && (GccMinorVersion >= 1)
+# define GccAliasingArgs -fno-strict-aliasing
+#else
+# define GccAliasingArgs /* */
+#endif
+
+#if HasGcc2 && defined(i386Architecture)
+# ifndef DefaultGcc2i386Opt
+# define DefaultGcc2i386Opt -O2 -fno-strength-reduce GccAliasingArgs
+# endif
+#endif
+
+#if HasGcc2 && defined(AMD64Architecture)
+# ifndef DefaultGcc2AMD64Opt
+# define DefaultGcc2AMD64Opt -O2 -fno-strength-reduce GccAliasingArgs
+# endif
+#endif
+
+#if HasGcc2 && defined(AlphaArchitecture)
+# ifndef DefaultGcc2AxpOpt
+# define DefaultGcc2AxpOpt -O2 GccAliasingArgs
+# endif
+#endif
+
+#if HasGcc2 && defined(Ppc64Architecture)
+# ifndef DefaultGcc2Ppc64Opt
+# define DefaultGcc2Ppc64Opt -O2 GccAliasingArgs
+# endif
+#endif
+
+#if HasGcc2 && defined(PpcArchitecture)
+# ifndef DefaultGcc2PpcOpt
+# define DefaultGcc2PpcOpt -O2 GccAliasingArgs
+# endif
+#endif
+
+#ifndef DefaultGcc2DebugOpt
+# define DefaultGcc2DebugOpt -g
+#endif
+
+#ifndef DebuggableLibraries
+# define DebuggableLibraries NO
+#endif
+
+#if HasGcc2 && DebuggableLibraries
+# define LibraryDebugOpt DefaultGcc2DebugOpt
+#endif
+
+/*
+ * Some versions of gcc have optimisation bugs that cause problems building
+ * some files. The definitions here cover those.
+ */
+
+#ifndef Egcs112Bug
+ /* Not exactly precise, but it'll do for now... */
+# if HasGcc2 && defined(i386Architecture) && \
+ (GccMajorVersion == 2) && (GccMinorVersion > 8)
+# define Egcs112Bug YES
+# else
+# define Egcs112Bug NO
+# endif
+#endif
+
+#ifdef i386Architecture
+# ifndef HasX86Support
+# define HasX86Support YES
+# endif
+# ifndef HasMMXSupport
+# define HasMMXSupport YES
+# endif
+# ifndef HasSSESupport
+# define HasSSESupport NO
+# endif
+# ifndef Has3DNowSupport
+# define Has3DNowSupport NO
+# endif
+#elif defined (AMD64Architecture)
+# ifndef HasX86Support
+# define HasX86Support NO
+# endif
+# ifndef HasMMXSupport
+# define HasMMXSupport NO
+# endif
+# ifndef HasSSESupport
+# define HasSSESupport NO
+# endif
+# ifndef Has3DNowSupport
+# define Has3DNowSupport NO
+# endif
+#else
+# ifndef HasX86Support
+# define HasX86Support NO
+# endif
+# ifndef HasMMXSupport
+# define HasMMXSupport NO
+# endif
+# ifndef HasSSESupport
+# define HasSSESupport NO
+# endif
+# ifndef Has3DNowSupport
+# define Has3DNowSupport NO
+# endif
+#endif
+
+#ifndef StaticNeedsPicForShared
+# if defined (AMD64Architecture)\
+ || defined (AlphaArchitecture) \
+ || defined (ia64Architecture) \
+ || defined (PpcArchitecture) \
+ || defined (SparcArchitecture) \
+ || defined (s390xArchitecture)
+# define StaticNeedsPicForShared YES
+# else
+# define StaticNeedsPicForShared NO
+# endif
+#endif
+
+#ifndef XF8_32Wid
+# define XF8_32Wid NO
+#endif
+
+#if CrossCompiling
+#include <cross.def>
+#endif
+#include <xf86.rules>
+
diff --git a/nx-X11/config/cf/xorg.cf b/nx-X11/config/cf/xorg.cf
new file mode 100644
index 000000000..6c42574aa
--- /dev/null
+++ b/nx-X11/config/cf/xorg.cf
@@ -0,0 +1,1689 @@
+XCOMM $XdotOrg: xc/config/cf/xorg.cf,v 1.53 2005/10/03 16:08:44 alanc Exp $
+/*
+ * This configuration file contains all of the configuration
+ * information for the Xorg based X Servers.
+ *
+ * Most of these settings can be overridden in a vendor.cf or the
+ * BeforeVendor part of the site.def file.
+ */
+XCOMM $Xorg: xfree86.cf,v 1.4 2000/08/17 19:41:49 cpqbld Exp $
+
+/* Get and set version information. */
+
+#include "date.def"
+#include "xorgversion.def"
+
+#if !defined(XorgVersionString) && \
+ defined(XORG_VERSION_MAJOR) && defined(XORG_VERSION_MINOR) && \
+ defined(XORG_VERSION_PATCH) && defined(XORG_VERSION_SNAP)
+# if XORG_VERSION_SNAP == 0
+# if XORG_VERSION_PATCH == 0
+# define XorgVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR | sed 's/ /./g'`
+# else
+# define XorgVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR XORG_VERSION_PATCH | sed 's/ /./g'`
+# endif
+# else
+# define XorgVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR XORG_VERSION_PATCH XORG_VERSION_SNAP | sed 's/ /./g'`
+# endif
+#endif
+
+#if !defined(XORG_DATE) && defined(XF86_DATE)
+# define XORG_DATE XF86_DATE
+#endif
+
+/*
+ * Xorg versions are M.m.P.s, and XorgVersion is:
+ *
+ * M * 10000000 + m * 100000 + P * 1000 + s
+ *
+ */
+
+#ifndef XorgVersion
+# define XorgVersion (((XORG_VERSION_MAJOR) * 10000000) + ((XORG_VERSION_MINOR) * 100000) + ((XORG_VERSION_PATCH) * 1000) + XORG_VERSION_SNAP)
+#endif
+
+#ifndef VersionDefines
+# define VersionDefines -DXORG_VERSION_CURRENT="$(XORG_VERSION_CURRENT)"
+#endif
+
+/* Place the version of the relevant changelog file here */
+#ifndef ReleaseVersion
+# define ReleaseVersion RELEASE-1
+#endif
+
+XORG_VERSION_CURRENT = XorgVersion
+RELEASE_VERSION = ReleaseVersion
+
+#if !defined(XorgManVersionString) && \
+ defined(XORG_VERSION_MAJOR) && defined(XORG_VERSION_MINOR) && \
+ defined(XORG_VERSION_PATCH) && defined(XORG_VERSION_SNAP)
+# if XORG_VERSION_SNAP == 0
+#define XorgManVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR XORG_VERSION_PATCH | sed -e 's/ /./g' -e 's/^/Version\\\ /'`
+#else
+#define XorgManVersionString `echo XORG_VERSION_MAJOR XORG_VERSION_MINOR XORG_VERSION_PATCH XORG_VERSION_SNAP | sed -e 's/ /./g' -e 's/^/Version\\\ /'`
+# endif
+#endif
+
+#if !defined(XorgDateString) && defined(XORG_DATE)
+# define XorgDateString XORG_DATE
+#endif
+
+#if !defined(XFree86DateString) && defined(XorgDateString)
+# define XFree86DateString XorgDateString
+#endif
+
+#ifndef BuildDateCmd
+# define BuildDateCmd date +%Y%m%d
+#endif
+
+#if !defined(BuildDate)
+# define BuildDate `BuildDateCmd`
+#endif
+
+#ifndef ChangelogDateCmd
+# define ChangelogDateCmd if tail $(CHANGELOGFILE) 2>/dev/null | \ @@\
+ fgrep '$$XdotOrg:' >/dev/null 2>&1; then \ @@\
+ tail $(CHANGELOGFILE) | fgrep '$$XdotOrg:' | \ @@\
+ sed s,'.* \([0-9][0-9]*\)/\([0-9][0-9]*\)/\([0-9][0-9]*\).*,\1\2\3,'; \ @@\
+ else echo 0; fi
+#endif
+
+#if !defined(ChangelogDate)
+# define ChangelogDate `ChangelogDateCmd`
+#endif
+
+#ifndef XVendorString
+# define XVendorString "The X.Org Foundation"
+#endif
+
+#ifndef XVendorRelease
+# define XVendorRelease XorgVersion
+#endif
+
+#ifndef XVendorManVersionString
+#define XVendorManVersionString XorgManVersionString
+#endif
+
+#ifndef XVendorManNameString
+#define XVendorManNameString X.Org
+#endif
+
+/*
+ * This enables some settings for developers.
+ */
+
+#ifndef XFree86Devel
+# if !defined(PatheticCpp) || !PatheticCpp
+# if (XorgVersion % 1000)
+# define XFree86Devel YES
+# else
+# define XFree86Devel NO
+# endif
+# else
+# define XFree86Devel NO /* Assume the worst */
+# endif
+#endif
+
+#ifndef BuildDebug
+# define BuildDebug YES
+#endif
+
+/*
+ * settings for the config file parser
+ */
+
+#ifndef XConfigFile
+#define XConfigFile xorg.conf
+#endif
+#ifndef XConfigDir
+#define XConfigDir $(LIBDIR)
+#endif
+#ifndef XLogFile
+#define XLogFile Xorg
+#endif
+#ifndef XServerName
+# define XServerName Xorg
+#endif
+
+/*
+ * BuildXFree86ConfigTools:
+ *
+ * Turning this on allows the XFree86 config tools to build when
+ * BuildServersOnly is YES. This requires more than the servonly CVS
+ * module. This cannot be used to disable building the config tools with
+ * a full build.
+ */
+#ifndef BuildXFree86ConfigTools
+#ifdef BuildServersOnly
+#define BuildXFree86ConfigTools !BuildServersOnly
+#else
+#define BuildXFree86ConfigTools YES
+#endif
+#endif
+
+#ifndef BuildLibrariesForConfigTools
+#define BuildLibrariesForConfigTools BuildXFree86ConfigTools
+#endif
+
+#if BuildXFree86ConfigTools && BuildLibrariesForConfigTools
+#define BuildLibraries YES
+#define BuildXF86MiscLibrary YES
+#define BuildXF86VidModeLibrary YES
+#define BuildXKBlib YES
+#define BuildXKBfilelib YES
+#define BuildXKBuilib YES
+#endif
+
+/*
+ * When this is set, modules are always built separately from the libraries
+ * that statically link into an Xserver. This is for platforms where the
+ * module and native object formats are different (e.g., OS/2).
+ */
+#ifndef BuildModuleInSubdir
+#define BuildModuleInSubdir NO
+#endif
+
+#ifndef DoLoadableServer
+#define DoLoadableServer NO
+#endif
+
+#ifndef MakeDllModules
+#if DoLoadableServer
+#define MakeDllModules YES
+#else
+#define MakeDllModules NO
+#endif
+#endif
+
+/*
+ * Default settings for which X Servers to build.
+ */
+
+/* OS.cf files may set this for OS-specific input drivers */
+#ifndef OSXInputDrivers
+#define OSXInputDrivers /**/
+#endif
+
+/* This may be set in host.def for 3rd party input drivers */
+#ifndef ExtraXInputDrivers
+#define ExtraXInputDrivers /**/
+#endif
+
+/* XInput drivers */
+#ifndef XInputDrivers
+#define XInputDrivers mouse keyboard acecad calcomp citron \
+ digitaledge dmc dynapro elographics tek4957 \
+ microtouch mutouch penmount spaceorb summa \
+ wacom void magellan /* magictouch */ hyperpen \
+ jamstudio fpit \
+ palmax OSXInputDrivers ExtraXInputDrivers
+#endif
+
+
+/* Deprecated keyboard driver */
+#ifndef UseDeprecatedKeyboardDriver
+#define UseDeprecatedKeyboardDriver NO
+#endif
+
+/* <linux/input.h> support mainly for USB support */
+#ifndef HasLinuxInput
+# define HasLinuxInput NO
+#endif
+
+/* OS.cf files may set this for OS-specific drivers */
+#ifndef XF86OSCardDrivers
+#define XF86OSCardDrivers /**/
+#endif
+
+/* This may be set in host.def for 3rd party drivers */
+#ifndef XF86ExtraCardDrivers
+#define XF86ExtraCardDrivers /**/
+#endif
+
+/* OS.cf files may set this for OS-specific drivers */
+#ifndef HasAgpGart
+#define HasAgpGart NO
+#endif
+
+/* Some DRI drivers are disabled because they are either insecure or unusable on
+ * this architecture. This switch allows you to enable building these drivers.
+ */
+#ifndef BuildDevelDRIDrivers
+#define BuildDevelDRIDrivers NO
+#endif
+
+/* The glide driver only works for the loadable server at the moment */
+#ifndef HasGlide2
+#define HasGlide2 NO
+#endif
+#if HasGlide2 && DoLoadableServer
+#define GlideDriver glide
+#else
+#define GlideDriver /**/
+#endif
+
+/*
+ * There are three parameters that determine where and how the Matrox HAL
+ * library is used:
+ *
+ * HaveMatroxHal -- You have the HALlib.a binary library installed
+ * in xfree86/drivers/mga/HALlib, and you want it to
+ * be used.
+ * Default: NO
+ *
+ * BuildMatroxHal -- You have the source for the HALlib library (installed
+ * in xfree86/drivers/mga/hallib), and want to build and
+ * use it.
+ * Default: NO
+ *
+ * UseMatroxHal -- You want to build support for loading/using the HAL
+ * library into the mga driver. For module server builds
+ * you don't need to have the HALlib library to do this.
+ * but you want to build support for loading it and using
+ * it into the mga driver module.
+ * Default: YES for loadable server build
+ * (HaveMatroxHal || BuildMatroxHal) for static
+ */
+
+#ifndef HaveMatroxHal
+#define HaveMatroxHal NO
+#endif
+
+#ifndef BuildMatroxHal
+#define BuildMatroxHal NO
+#endif
+
+#ifndef UseMatroxHal
+#if DoLoadableServer
+#define UseMatroxHal YES
+#else
+#define UseMatroxHal (HaveMatroxHal || BuildMatroxHal)
+#endif
+#endif
+
+/*
+ * Many architectures share common X Server pieces. List them here.
+ */
+#if defined(i386Architecture) || defined(ia64Architecture) || \
+ defined(AMD64Architecture) || defined(SparcArchitecture) || \
+ defined(Sparc64Architecture) || defined(MipsArchitecture) || \
+ defined(AlphaArchitecture) || defined(PpcArchitecture) || \
+ defined(Mc68020Architecture) || defined(Arm32Architecture) || \
+ defined(HPArchitecture) || defined(SuperHArchitecture)
+# ifndef XorgServer
+# define XorgServer YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp YES
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp YES
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* Exa module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+#endif
+
+/*
+ * Intel x86 and ia64 drivers
+ */
+#if defined(i386Architecture) || defined(ia64Architecture)
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* Amiga framebuffer module. Required by vesa module. */
+# ifndef XF86AFB
+# define XF86AFB YES
+# endif
+
+/*
+ * Drivers under development, but not ready for binary releases, or
+ * drivers included on this platform only for build testing.
+ */
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers imstt newport
+# else
+# define DevelDrivers /**/
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# /* Don't build the nsc driver on IA64 */
+# ifndef ia64Architecture
+# define i386Drivers nsc i810
+# else
+# define i386Drivers /**/
+# endif
+# define XF86CardDrivers mga glint nv tga s3 s3virge sis rendition \
+ neomagic i740 tdfx savage \
+ cirrus vmware tseng trident chips apm \
+ GlideDriver i128 i386Drivers \
+ ati DevelDrivers ark \
+ cyrix siliconmotion via \
+ vesa vga \
+ dummy XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+
+# ifndef DevelDRIDrivers
+# define DevelDRIDrivers ffb mach64 unichrome
+# endif
+
+# ifndef DriDrivers
+# ifndef ia64Architecture
+# define i386DRIDrivers i810 i915 sis
+# else
+ /* SiS is 64-bit unclean as of this writing. */
+# define i386DRIDrivers /**/
+# endif
+# define DriDrivers i386DRIDrivers mga r128 radeon r200 tdfx
+# endif
+#endif /* i386Architecture || ia64Architecture */
+
+#if defined(AMD64Architecture)
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* Amiga framebuffer module. Required by vesa module. */
+# ifndef XF86AFB
+# define XF86AFB YES
+# endif
+
+/*
+ * Drivers under development, but not ready for binary releases, or
+ * drivers included on this platform only for build testing.
+ */
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers /**/
+# else
+# define DevelDrivers /**/
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers mga glint nv tga s3 s3virge sis rendition \
+ neomagic tdfx savage cirrus tseng trident \
+ chips apm i128 ati ark cyrix siliconmotion \
+ vga dummy vesa i810 vmware \
+ XF86OSCardDrivers XF86ExtraCardDrivers DevelDrivers
+# endif
+
+/* SiS is 64-bit unclean as of this writing. */
+# ifndef DriDrivers
+# define DriDrivers i915 mga r128 radeon r200 tdfx
+# endif
+#endif /*AMD64Arcitecture*/
+
+/* SPARC and UltraSPARC drivers */
+
+#if (defined(SparcArchitecture) || defined(Sparc64Architecture)) && \
+ !defined(LynxOSArchitecture) && \
+ !defined(NetBSDArchitecture) && \
+ !defined(OpenBSDArchitecture)
+/* 8/32wid fb module */
+# ifndef XF8_32Wid
+# define XF8_32Wid YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* Amiga framebuffer module. Required by vesa module. */
+# ifndef XF86AFB
+# define XF86AFB YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+ /*
+ * Some of these are compiled just for the fun of it. Undoubtedly some
+ * require changes (or even removal) for things like endianness, etc. Move
+ * those known to work into the main XF86CardDrivers #define.
+ */
+# define DevelDrivers apm ark chips cirrus i128 i740 i810 imstt \
+ neomagic newport nv rendition s3virge savage \
+ siliconmotion tga trident vmware dummy
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure SBUS and PCI drivers should go first */
+# ifndef XF86CardDrivers
+# ifdef SunArchitecture
+# define XF86CardDrivers /* sunffb */ sunleo suncg6 suncg3 suncg14 \
+ suntcx sunbw2 glint mga tdfx ati vesa vga \
+ dummy XF86OSCardDrivers XF86ExtraCardDrivers \
+ DevelDrivers
+# else
+# define XF86CardDrivers sunffb sunleo suncg6 suncg3 suncg14 suntcx \
+ sunbw2 glint mga tdfx ati vesa vga dummy \
+ XF86OSCardDrivers XF86ExtraCardDrivers \
+ DevelDrivers
+# endif
+# endif
+# ifndef DriDrivers
+# define DriDrivers ffb
+# endif
+
+#endif
+
+/* Sparc64 Drivers */
+#if defined(OpenBSDArchitecture) && defined(Sparc64Architecture)
+/* Amiga framebuffer module */
+# ifndef XF86AFB
+# define XF86AFB NO
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+# ifndef UseX86Emu
+# define UseX86Emu NO
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers /* */
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers ati dummy \
+ DevelDrivers \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+#endif /* OpenBSDArchitecture && Sparc64Architecture */
+
+/* MIPS drivers */
+
+#ifdef MipsArchitecture
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers /* */
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+# ifndef XF86CardDrivers
+# define XF86CardDrivers mga glint nv s3 s3virge sis savage \
+ trident chips tdfx ati dummy \
+ DevelDrivers newport \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+#endif /* MipsArchitecture */
+
+/*
+ * DEC Alpha drivers
+ */
+#ifdef AlphaArchitecture
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers /* */
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers mga tdfx glint s3 s3virge rendition tga ati \
+ savage nv cirrus DevelDrivers siliconmotion \
+ vga dummy XF86OSCardDrivers \
+ XF86ExtraCardDrivers
+# endif
+/*
+ * Glide is available for Alpha, therefore build tdfx DRM module.
+ * SiS is 64-bit unclean as of this writing.
+ */
+# ifndef DriDrivers
+# define DriDrivers tdfx mga r128 radeon r200
+# endif
+#endif /* AlphaArchitecture */
+
+/*
+ * Motorola 68k and PowerPC drivers
+ */
+#if defined(PpcArchitecture) || defined(Mc68020Architecture)
+/* Amiga framebuffer module */
+# ifndef XF86AFB
+# define XF86AFB YES
+# endif
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers imstt
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers ati mga glint nv s3 s3virge sis savage\
+ trident chips tdfx \
+ DevelDrivers vga dummy \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+/* The tdfx driver needs Glide, which is not available for PPC. */
+# ifndef DriDrivers
+# define DriDrivers mga r128 radeon r200
+# endif
+#endif /* PpcArchitecture || Mc68020Architecture */
+
+/*
+ * Intel StrongARM and Hewlett-Packard PA-RISC
+ */
+#if defined(Arm32Architecture) || defined(HPArchitecture)
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers /* */
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers ati mga glint nv s3 s3virge sis savage\
+ trident chips tdfx \
+ DevelDrivers vga dummy \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+# ifndef DriDrivers
+# define DriDrivers mga r128 radeon r200
+# endif
+#endif
+
+/* SuperH drivers */
+#if defined(SuperHArchitecture)
+# ifndef XF86CardDrivers
+# define XF86CardDrivers XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+#endif
+
+/*
+ * For PowerPC 64bit systems
+ * only libraries are strictly needed
+ */
+#if defined(Ppc64Architecture)
+# ifndef XorgServer
+# define XorgServer YES
+# endif
+/* 1bpp module */
+# ifndef XF1Bpp
+# define XF1Bpp NO
+# endif
+/* 4bpp module */
+# ifndef XF4Bpp
+# define XF4Bpp NO
+# endif
+/* 8/32bpp overlay module */
+# ifndef XF8_32Bpp
+# define XF8_32Bpp YES
+# endif
+/* 8/16bpp dual fb module */
+# ifndef XF8_16Bpp
+# define XF8_16Bpp YES
+# endif
+/* shadow fb module */
+# ifndef XFShadowFB
+# define XFShadowFB YES
+# endif
+/* fbdevhw module */
+# ifndef XF86FBDevHw
+# define XF86FBDevHw YES
+# endif
+/* XAA module */
+# ifndef XF86XAA
+# define XF86XAA YES
+# endif
+/* Exa module */
+# ifndef XF86EXA
+# define XF86EXA YES
+# endif
+/* ramdac module */
+# ifndef XF86Ramdac
+# define XF86Ramdac YES
+# endif
+/* I2C module */
+# ifndef XF86I2C
+# define XF86I2C YES
+# endif
+/* DDC module */
+# ifndef XF86DDC
+# define XF86DDC YES
+# endif
+/* RAC (Resource Access Control) module */
+# ifndef XF86RAC
+# define XF86RAC YES
+# endif
+/* int10 module */
+# ifndef XF86Int10
+# define XF86Int10 YES
+# endif
+/* vbe module */
+# ifndef XF86VBE
+# define XF86VBE YES
+# endif
+
+/* vgahw module */
+# ifndef XF86VgaHw
+# define XF86VgaHw YES
+# endif
+/* Amiga framebuffer module */
+# ifndef XF86AFB
+# define XF86AFB NO
+# endif
+
+# ifndef DevelDrivers
+# if XFree86Devel
+# define DevelDrivers
+# else
+# define DevelDrivers /* */
+# endif
+# endif
+
+/* Pure PCI drivers should go first */
+# ifndef XF86CardDrivers
+# define XF86CardDrivers ati mga dummy \
+ DevelDrivers \
+ XF86OSCardDrivers XF86ExtraCardDrivers
+# endif
+# define TdfxDriDriver /**/
+# ifndef DriDrivers
+# define DriDrivers r128
+# endif
+#endif /* Ppc64Architecture */
+
+/*
+ * For Mips/Arc platforms, the default is to build all modules which
+ * are supported on this platform.
+ */
+#ifdef ArcArchitecture
+# ifndef XorgServer
+# define XorgServer YES
+# endif
+#endif
+
+#if BuildDebug
+# define DebugDefines -DBUILDDEBUG
+#else
+# define DebugDefines /**/
+#endif
+
+#ifndef XorgServer
+# define XorgServer NO
+#endif
+#if !XorgServer
+# undef DoLoadableServer
+# define DoLoadableServer NO
+#endif
+
+/*
+ * Fbdev module defines. They are set to indicate the fb types supported
+ * on different architectures.
+ */
+#ifndef XF86AFB
+# define XF86AFB NO
+#endif
+#ifndef XF86ILBM
+# define XF86ILBM NO
+#endif
+#ifndef XF86IPLAN2P2
+# define XF86IPLAN2P2 NO
+#endif
+#ifndef XF86IPLAN2P4
+# define XF86IPLAN2P4 NO
+#endif
+#ifndef XF86IPLAN2P8
+# define XF86IPLAN2P8 NO
+#endif
+#if XF86AFB
+AFB_DEFS = -DUSE_AFB
+#endif
+#if XF86ILBM
+ILBM_DEFS = -DUSE_ILBM
+#endif
+#if XF86IPLAN2P2
+IPLAN2P2_DEFS = -DUSE_IPLAN2P2
+#endif
+#if XF86IPLAN2P4
+IPLAN2P4_DEFS = -DUSE_IPLAN2P4
+#endif
+#if XF86IPLAN2P8
+IPLAN2P8_DEFS = -DUSE_IPLAN2P8
+#endif
+#ifndef FbdevDefines
+# define FbdevDefines $(AFB_DEFS) $(ILBM_DEFS) $(IPLAN2P2_DEFS) \
+ $(IPLAN2P4_DEFS) $(IPLAN2P8_DEFS)
+#endif
+
+/*
+ * The default is to install the X servers setuid-root on most OSs.
+ * It the servers are only started by xdm, they should not be setuid-root.
+ */
+#if !defined(i386MachArchitecture) && !defined(OS2Architecture)
+# ifndef InstallXserverSetUID
+# define InstallXserverSetUID YES
+# endif
+#endif
+
+/*
+ * Build GLX server interface
+ * --- Doesn't work for 1-bit and 4-bit servers
+ */
+#ifndef BuildGlxExt
+# define BuildGlxExt YES
+#endif
+
+#ifndef BuildXF86DRI
+#define BuildXF86DRI NO
+#endif
+
+#ifndef GlxUseSGISI
+#define GlxUseSGISI NO
+#endif
+
+#if BuildXF86DRI
+
+#ifndef DriDrivers
+#define DriDrivers /**/
+#endif
+
+#ifndef DevelDRIDrivers
+#define DevelDRIDrivers /**/
+#endif
+
+#ifndef BuildGLXLibrary
+# if defined (BuildServersOnly) && BuildServersOnly
+# define BuildGLXLibrary NO
+# else
+# define BuildGLXLibrary YES
+# endif
+#endif
+
+/*
+ * One and ONLY one of the GlxBuiltIn* drivers can be defined to be YES.
+ * If more than one are defined, the compilation will fail with multiply
+ * defined references of GLX and OpenGL functions.
+ */
+
+/*
+ * The first is a built-in driver that does software rendering client-side
+ * and renders to the X server via Xlib.
+ */
+
+# ifndef GlxBuiltInXMesa
+# define GlxBuiltInXMesa NO
+# endif
+
+/*
+ * The rest are hardware-specific DRI drivers.
+ */
+# ifndef GlxBuiltInGamma
+# define GlxBuiltInGamma NO
+# endif
+# ifndef GlxBuiltInTdfx
+# define GlxBuiltInTdfx NO
+# endif
+# ifndef GlxBuiltInMga
+# define GlxBuiltInMga NO
+# endif
+# ifndef GlxBuiltInI810
+# define GlxBuiltInI810 NO
+# endif
+# ifndef GlxBuiltInI915
+# define GlxBuiltInI915 NO
+# endif
+# ifndef GlxBuiltInR128
+# define GlxBuiltInR128 NO
+# endif
+# ifndef GlxBuiltInRadeon
+# define GlxBuiltInRadeon NO
+# endif
+# ifndef GlxBuiltInR200
+# define GlxBuiltInR200 NO
+# endif
+# ifndef GlxBuiltInFfb
+# define GlxBuiltInFfb NO
+# endif
+# ifndef GlxBuiltInSIS
+# define GlxBuiltInSIS NO
+# endif
+
+# if GlxBuiltInTdfx || \
+ GlxBuiltInMga || \
+ GlxBuiltInI810 || \
+ GlxBuiltInI915 || \
+ GlxBuiltInR128 || \
+ GlxBuiltInRadeon || \
+ GlxBuiltInR200 || \
+ GlxBuiltInFfb || \
+ GlxBuiltInSIS
+# define GlxDriverUsesMesa YES
+# else
+# define GlxDriverUsesMesa NO
+# endif
+
+# if GlxBuiltInGamma || \
+ GlxBuiltInTdfx || \
+ GlxBuiltInMga || \
+ GlxBuiltInI810 || \
+ GlxBuiltInI915 || \
+ GlxBuiltInR128 || \
+ GlxBuiltInRadeon || \
+ GlxBuiltInR200 || \
+ GlxBuiltInFfb || \
+ GlxBuiltInSIS
+# define GlxUseBuiltInDRIDriver YES
+# define DRIDynLoadDefines /**/
+# else
+# define GlxUseBuiltInDRIDriver NO
+# define DRIDynLoadDefines -DGLX_USE_DLOPEN
+# endif
+
+# if GlxUseBuiltInDRIDriver
+# undef DriDrivers
+# if GlxBuiltInGamma
+# define DriDrivers gamma
+# endif
+# if GlxBuiltInTdfx
+# define DriDrivers tdfx
+# endif
+# if GlxBuiltInMga
+# define DriDrivers mga
+# endif
+# if GlxBuiltInI810
+# define DriDrivers i810
+# endif
+# if GlxBuiltInI915
+# define DriDrivers i915
+# endif
+# if GlxBuiltInR128
+# define DriDrivers r128
+# endif
+# if GlxBuiltInRadeon
+# define DriDrivers radeon
+# endif
+# if GlxBuiltInR200
+# define DriDrivers r200
+# endif
+# if GlxBuiltInSIS
+# define DriDrivers sis
+# endif
+# if GlxBuiltInFfb
+# define DriDrivers ffb
+# endif
+# endif
+
+#endif
+
+/*
+ * This enables building DRI support into video drivers, which can be done
+ * even on platforms that don't have functional DRI support.
+ *
+ * Defining BuildXF86DRIDriverSupport to YES will not work until we have a
+ * separate set of defines set up for building driver-only support for the
+ * DRI.
+ */
+#ifndef BuildXF86DRIDriverSupport
+# define BuildXF86DRIDriverSupport NO
+#endif
+
+#if BuildGlxExt
+
+# if BuildXF86DRI
+# define DRIDefines -DXF86DRI -DGLX_DIRECT_RENDERING DRIDynLoadDefines
+# else
+# define DRIDefines /**/
+# endif
+# if defined(GlxUseSGISI) && GlxUseSGISI
+# define GlxCoreLibDefines -DGLX_USE_SGI_SI
+# else
+# define GlxCoreLibDefines -DGLX_USE_MESA
+# endif
+
+# if defined(SparcArchitecture) \
+ || defined (Sparc64Architecture) \
+ || defined(ia64Architecture) \
+ || defined(s390xArchitecture) \
+ || defined(AMD64Architecture)
+# define GlxArchDefines -D__GLX_ALIGN64
+# elif defined(AlphaArchitecture)
+/* On the Alpha we need to ensure floating point accuracy for 3D */
+# define GlxArchDefines -D__GLX_ALIGN64 -mieee
+# elif defined(DarwinArchitecture)
+/* GLX contains lots of uninitialized globals, which can upset Darwin */
+# define GlxArchDefines -fno-common
+# else
+# define GlxArchDefines /**/
+# endif
+
+# ifndef GlxExtraDefines
+# define GlxExtraDefines DRIDefines GlxCoreLibDefines GlxArchDefines
+# endif
+
+#else
+
+/* If we are not building GLX, then make sure the DRI is not built */
+# undef BuildXF86DRI
+# define BuildXF86DRI NO
+# undef BuildXF86DRIDriverSupport
+# define BuildXF86DRIDriverSupport NO
+
+#endif
+
+#if !BuildXF86DRI
+# define GlxUseBuiltInDRIDriver NO /* For libOSmesa */
+#endif
+
+# ifndef UseX86Emu
+# define UseX86Emu YES
+# endif
+
+#define X86INT10_STUB 0
+#define X86EMU_GENERIC 1
+#define X86VM 2
+#define X86EMU_OS 3
+
+#ifndef XF86INT10_BUILD
+# if UseX86Emu
+# define XF86INT10_BUILD X86EMU_GENERIC
+# else
+# define XF86INT10_BUILD X86INT10_STUB
+# endif
+#endif
+/*
+ * Build the Rush extension library (non standard extension for cooperation
+ * between glide library and X server). Enabled by default only for Linux.
+ */
+#ifndef BuildXF86RushExt
+# define BuildXF86RushExt NO
+#endif
+
+#ifndef BuildDBElib
+# define BuildDBElib YES
+#endif
+
+#ifndef BuildRECORDlib
+# define BuildRECORDlib YES
+#endif
+
+#ifndef BuildXKBlib
+# define BuildXKBlib YES
+#endif
+
+#ifndef BuildScreenSaverExt
+# define BuildScreenSaverExt YES
+#endif
+
+/*
+ * Build XInput support
+ */
+#ifndef BuildXInputExt
+# define BuildXInputExt YES
+#endif
+
+/* Build Xinerama (aka panoramiX) extension */
+#ifndef BuildXinerama
+# define BuildXinerama YES
+#endif
+
+/* Build Render extension */
+#ifndef BuildRender
+# define BuildRender YES
+#endif
+
+#if 0
+#ifndef JoystickSupport
+# define JoystickSupport NO
+#endif
+#endif
+
+#if 0
+/*
+ * Build the extra extension libs even when not including the extra extensions
+ * in the servers
+ */
+#ifndef BuildScreenSaverLibrary
+# define BuildScreenSaverLibrary YES
+#endif
+#ifndef BuildXF86MiscLibrary
+# define BuildXF86MiscLibrary YES
+#endif
+#ifndef BuildXF86DGALibrary
+# define BuildXF86DGALibrary YES
+#endif
+#ifndef BuildXF86VidModeLibrary
+# define BuildXF86VidModeLibrary YES
+#endif
+#ifndef BuildXvLibrary
+# define BuildXvLibrary YES
+#endif
+#ifndef BuildXvMCLibrary
+# define BuildXvMCLibrary YES
+#endif
+#ifndef BuildGLXLibrary
+# define BuildGLXLibrary YES
+#endif
+#ifndef BuildXResLibrary
+# define BuildXResLibrary YES
+#endif
+#endif
+
+/*
+ * Build the XFree86-VidMode extension
+ */
+#ifndef BuildXF86VidModeExt
+# define BuildXF86VidModeExt YES
+#endif
+
+/* Don't build this now because the interface hasn't been done yet */
+/*
+ * Build the XFree86-Misc extension
+ */
+#ifndef BuildXF86MiscExt
+# define BuildXF86MiscExt YES
+#endif
+
+/*
+ * Build the XFree86-Bigfont extension
+ */
+#ifndef BuildXF86BigfontExt
+# define BuildXF86BigfontExt YES
+#endif
+
+/*
+ * Build the XFree86 DGA support
+ */
+#ifndef BuildXF86DGA
+# define BuildXF86DGA YES
+#endif
+
+/*
+ * Build the DPMS extension support
+ */
+#ifndef BuildDPMSExt
+# define BuildDPMSExt YES
+#endif
+
+/*
+ * Build the X Video Extension
+ */
+#ifndef BuildXvExt
+# define BuildXvExt YES
+#endif
+
+/*
+ * Build the X Video Motion Compensation Extension
+ */
+#ifndef BuildXvMCExt
+# define BuildXvMCExt YES
+#endif
+
+/*
+ * Build the X-Resource Extension
+ */
+#ifndef BuildXResExt
+# define BuildXResExt YES
+#endif
+
+#if Malloc0ReturnsNull
+# ifndef XtMalloc0ReturnsNullDefines
+# define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines -DXTMALLOC_BC
+# endif
+#endif
+
+#ifndef UseInternalMalloc
+# define UseInternalMalloc NO
+#endif
+
+#ifndef HasDlsymBug
+# define HasDlsymBug NO
+#endif
+
+#ifndef HasMTRRSupport
+# define HasMTRRSupport NO
+#endif
+
+/*
+ * Build the font server
+ */
+#ifndef BuildFontServer
+# define BuildFontServer YES
+#endif
+
+/*
+ * Include fonts support
+ */
+#ifndef BuildSpeedo
+# define BuildSpeedo NO
+#endif
+
+#ifndef BuildType1
+# define BuildType1 NO
+#endif
+
+#ifndef BuildCID
+# define BuildCID YES
+#endif
+
+#ifndef BuildFreeType
+# define BuildFreeType YES
+#endif
+
+/*
+ * By default, build all of the fonts.
+ */
+#ifndef Build75DpiFonts
+# define Build75DpiFonts YES
+#endif
+#ifndef Build100DpiFonts
+# define Build100DpiFonts YES
+#endif
+#ifndef BuildSpeedoFonts
+# define BuildSpeedoFonts NO
+#endif
+#ifndef BuildType1Fonts
+# define BuildType1Fonts YES
+#endif
+#ifndef BuildCIDFonts
+# define BuildCIDFonts YES
+#endif
+#ifndef BuildTrueTypeFonts
+# define BuildTrueTypeFonts YES
+#endif
+#ifndef BuildCyrillicFonts
+# define BuildCyrillicFonts YES
+#endif
+
+/*
+ * Build scanpci?
+ */
+#ifndef SystemV
+#define SystemV NO
+#endif
+#ifndef SystemV4
+#define SystemV4 NO
+#endif
+#ifndef BuildScanpci
+# if SystemV || SystemV4 || \
+ (defined(LinuxArchitecture) && !defined(Mc68020Architecture)) || \
+ defined(i386BsdArchitecture) || defined(LynxOSArchitecture) || \
+ defined(OS2Architecture) || defined(GNUMachArchitecture) || \
+ (defined(KFreeBSDArchitecture) && defined(i386Architecture))
+# define BuildScanpci YES
+# else
+# define BuildScanpci NO
+# endif
+#endif
+
+#ifndef CompressAllFonts
+# define CompressAllFonts YES
+#endif
+
+#ifndef GzipFontCompression
+# define GzipFontCompression YES
+#endif
+
+/* Disable stripping installed programs for this release. */
+#ifndef StripInstalledPrograms
+# define StripInstalledPrograms NO
+#endif
+
+#ifndef InstallJapaneseDocs
+#define InstallJapaneseDocs NO
+#endif
+
+#if BuildXF86DGA
+# define XFree86DGADefines -DXFreeXDGA
+#else
+# define XFree86DGADefines /**/
+#endif
+
+#if BuildXvExt
+# define XFree86XvDefines -DXvExtension
+#else
+# define XFree86XvDefines /**/
+#endif
+
+#if BuildXvMCExt
+# define XFree86XvMCDefines -DXvMCExtension
+#else
+# define XFree86XvMCDefines /**/
+#endif
+
+#if BuildXResExt
+# define XFree86XResDefines -DXResExtension
+#else
+# define XFree86XResDefines /**/
+#endif
+
+#ifndef DlopenHack
+# define DlopenHack -DDLOPEN_HACK
+#endif
+
+#ifndef ExtraLoaderDefines
+# if MakeDllModules
+# define ExtraLoaderDefines DlopenHack
+# else
+# define ExtraLoaderDefines /**/
+# endif
+#endif
+
+#if DoLoadableServer
+# define XFree86LoaderDefines -DXFree86LOADER ExtraLoaderDefines
+#else
+# define XFree86LoaderDefines /**/
+#endif
+
+#ifndef HasBsdMake
+#define HasBsdMake NO
+#endif
+
+#ifndef MakeHasPosixVariableSubstitutions
+# if !HasBsdMake && !defined(SunArchitecture)
+# define MakeHasPosixVariableSubstitutions NO
+# else
+# define MakeHasPosixVariableSubstitutions YES
+# endif
+#endif
+
+#ifndef UseSmartScheduler
+#define UseSmartScheduler YES
+#endif
+
+#if UseSmartScheduler
+#define SmartScheduleDefines -DSMART_SCHEDULE
+#else
+#define SmartScheduleDefines /**/
+#endif
+
+/* Server defines required for all OSs */
+#ifndef XFree86ServerDefines
+# define XFree86ServerDefines -DAVOID_GLYPHBLT -DPIXPRIV -DSINGLEDEPTH \
+ XFree86DGADefines XFree86XvDefines \
+ XFree86LoaderDefines -DXFree86Server \
+ VidModeExtensionDefines \
+ XFree86XvMCDefines \
+ SmartScheduleDefines \
+ DebugDefines XFree86XResDefines \
+ -DX_BYTE_ORDER=$(X_BYTE_ORDER) \
+ VersionDefines
+#endif
+
+#ifndef XFree86ServerOSDefines
+# define XFree86ServerOSDefines -DDDXOSINIT -DSERVER_LOCK -DDDXOSFATALERROR \
+ -DDDXOSVERRORF
+#endif
+
+#ifndef XFree86ConsoleDefines
+# if defined(i386BsdArchitecture) || defined(AlphaBsdArchitecture) || (defined(KFreeBSDArchitecture) && defined(i386Architecture))
+# define XFree86ConsoleDefines -DPCCONS_SUPPORT -DSYSCONS_SUPPORT -DPCVT_SUPPORT
+# elif defined(KFreeBSDArchitecture)
+# define XFree86ConsoleDefines -DSYSCONS_SUPPORT
+# else
+# define XFree86ConsoleDefines /**/
+# endif
+#endif
+
+/* Support for USB mouse */
+#ifndef UsbMouseSupport
+# define UsbMouseSupport NO
+#endif
+/* Does this OS have libusb ? */
+#ifndef HasLibUsb
+# define HasLibUsb NO
+#endif
+
+#ifndef UseServerLock
+# define UseServerLock YES
+#endif
+
+#ifndef XnestServer
+# define XnestServer YES
+#endif
+#ifndef XVirtualFramebufferServer
+# define XVirtualFramebufferServer YES
+#endif
+
+#ifndef ServerExtraDefines
+# define ServerExtraDefines XFree86ServerDefines
+#endif
+
+#ifndef ServerOSDefines
+# define ServerOSDefines XFree86ServerOSDefines
+#endif
+
+#ifndef DriverSDKDir
+# define DriverSDKDir $(USRLIBDIR)/Server
+#endif
+
+#ifndef DriverSDKModuleDir
+# define DriverSDKModuleDir $(USRLIBDIR)/Server/modules
+#endif
+
+#ifndef DriverSDKIncludeDir
+# define DriverSDKIncludeDir $(USRLIBDIR)/Server/include
+#endif
+
+DRIVERSDKDIR = DriverSDKDir
+DRIVERSDKMODULEDIR = DriverSDKModuleDir
+DRIVERSDKINCLUDEDIR = DriverSDKIncludeDir
+
+/*
+ * Some commonly refered to directories are defined here.
+ */
+
+ XF86SRC = $(SERVERSRC)/hw/xfree86
+ XF86COMSRC = $(XF86SRC)/common
+ XF86PARSERSRC = $(XF86SRC)/parser
+ XF86OSSRC = $(XF86SRC)/os-support
+ XF86DRIVERSRC = $(XF86SRC)/drivers
+ DRIVERSRC = $(XF86DRIVERSRC)
+
+/*
+ * Installed location of the XFree86 documentation
+ */
+
+ XFREE86DOCDIR = $(DOCDIR)
+ XFREE86PSDOCDIR = $(DOCPSDIR)
+ XFREE86PDFDOCDIR = $(DOCPDFDIR)
+ XFREE86HTMLDOCDIR = $(DOCHTMLDIR)
+XFREE86JAPANESEDOCDIR = $(DOCDIR)/Japanese
+
+/*
+ * Other stuff used in the X Server source.
+ */
+
+#ifndef OtherIConfigFiles
+# define OtherIConfigFiles $(IRULESRC)/xfree86.cf $(IRULESRC)/xf86.rules
+#endif
+
+#ifndef UseRgbTxt
+# define UseRgbTxt YES
+#endif
+
+#ifndef ManSuffix
+# define ManSuffix 1
+#endif
+
+/*
+ * GNU Compiler stuff
+ */
+#ifndef HasGcc3
+# define HasGcc3 NO
+#endif
+#ifndef HasGcc2
+# define HasGcc2 HasGcc3
+#endif
+#ifndef HasGcc
+# define HasGcc HasGcc2
+#endif
+#ifndef HasGcc2ForCplusplus
+# define HasGcc2ForCplusplus HasGcc2
+#endif
+
+#if HasGcc
+# ifndef Gcc28Warnings
+# if (GccMajorVersion > 2) || \
+ ((GccMajorVersion == 2) && (GccMinorVersion >= 8))
+# define Gcc28Warnings -Wundef
+# else
+# define Gcc28Warnings /* */
+# endif
+# ifndef HasGcc34
+# if (((GccMajorVersion == 3) && (GccMinorVersion >= 4)) || \
+ (GccMajorVersion > 3))
+# define HasGcc34 YES
+# else
+# define HasGcc34 NO
+# endif
+# endif
+# endif
+# ifndef GccWarningOptions
+# if XFree86Devel
+# define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wredundant-decls -Wnested-externs Gcc28Warnings
+# else
+# define GccWarningOptions -Wall -Wpointer-arith Gcc28Warnings
+# endif
+# endif
+# ifndef DefaultCCOptions
+# if defined(UseInstalled)
+# define DefaultCCOptions /* -ansi */
+# else
+# define DefaultCCOptions -ansi GccWarningOptions
+# endif
+# endif
+# if defined(UseInstalled)
+# ifndef UseGccMakeDepend
+# define UseGccMakeDepend YES
+# endif
+# endif
+#endif
+
+/* Make imake noisier. Note that this is ineffective for 3.0 <= GCC <= 3.2 */
+#ifndef ImakeWarningFlags
+# ifdef Gcc28Warnings
+# define ImakeWarningFlags Gcc28Warnings
+# else
+# define ImakeWarningFlags /* */
+# endif
+#endif
+
+#if ((GccMajorVersion == 3) && (GccMinorVersion >= 1)) || (GccMajorVersion > 3)
+# define GccAliasingArgs -fno-strict-aliasing
+#else
+# define GccAliasingArgs /* */
+#endif
+
+#if HasGcc2 && defined(i386Architecture)
+# ifndef DefaultGcc2i386Opt
+# define DefaultGcc2i386Opt -O2 -fno-strength-reduce GccAliasingArgs
+# endif
+#endif
+
+#if HasGcc2 && defined(AMD64Architecture)
+# ifndef DefaultGcc2AMD64Opt
+# define DefaultGcc2AMD64Opt -O2 -fno-strength-reduce GccAliasingArgs
+# endif
+#endif
+
+#if HasGcc2 && defined(AlphaArchitecture)
+# ifndef DefaultGcc2AxpOpt
+# define DefaultGcc2AxpOpt -O2 GccAliasingArgs
+# endif
+#endif
+
+#if HasGcc2 && defined(Ppc64Architecture)
+# ifndef DefaultGcc2Ppc64Opt
+# define DefaultGcc2Ppc64Opt -O2 GccAliasingArgs
+# endif
+#endif
+
+#if HasGcc2 && defined(MipsArchitecture)
+# ifndef DefaultGcc2MipsOpt
+# define DefaultGcc2MipsOpt -O2 GccAliasingArgs
+# endif
+#endif
+
+#if HasGcc2 && defined(PpcArchitecture)
+# ifndef DefaultGcc2PpcOpt
+# define DefaultGcc2PpcOpt -O2 GccAliasingArgs
+# endif
+#endif
+
+#ifndef DefaultGcc2DebugOpt
+# define DefaultGcc2DebugOpt -g
+#endif
+
+#ifndef DebuggableLibraries
+# define DebuggableLibraries NO
+#endif
+
+#if HasGcc2 && DebuggableLibraries
+# define LibraryDebugOpt DefaultGcc2DebugOpt
+#endif
+
+/*
+ * Some versions of gcc have optimisation bugs that cause problems building
+ * some files. The definitions here cover those.
+ */
+
+#ifndef Egcs112Bug
+ /* Not exactly precise, but it'll do for now... */
+# if HasGcc2 && defined(i386Architecture) && \
+ (GccMajorVersion == 2) && (GccMinorVersion > 8)
+# define Egcs112Bug YES
+# else
+# define Egcs112Bug NO
+# endif
+#endif
+
+#ifdef i386Architecture
+# ifndef HasX86Support
+# define HasX86Support YES
+# endif
+# ifndef HasMMXSupport
+# define HasMMXSupport YES
+# endif
+# ifndef HasSSESupport
+# define HasSSESupport NO
+# endif
+# ifndef Has3DNowSupport
+# define Has3DNowSupport NO
+# endif
+#elif defined (AMD64Architecture)
+# ifndef HasX86Support
+# define HasX86Support NO
+# endif
+# ifndef HasMMXSupport
+# define HasMMXSupport NO
+# endif
+# ifndef HasSSESupport
+# define HasSSESupport NO
+# endif
+# ifndef Has3DNowSupport
+# define Has3DNowSupport NO
+# endif
+#else
+# ifndef HasX86Support
+# define HasX86Support NO
+# endif
+# ifndef HasMMXSupport
+# define HasMMXSupport NO
+# endif
+# ifndef HasSSESupport
+# define HasSSESupport NO
+# endif
+# ifndef Has3DNowSupport
+# define Has3DNowSupport NO
+# endif
+#endif
+
+#ifndef StaticNeedsPicForShared
+# if defined (AMD64Architecture)\
+ || defined (AlphaArchitecture) \
+ || defined (ia64Architecture) \
+ || defined (PpcArchitecture) \
+ || defined (SparcArchitecture) \
+ || defined (s390xArchitecture)
+# define StaticNeedsPicForShared YES
+# else
+# define StaticNeedsPicForShared NO
+# endif
+#endif
+
+#if (defined(SparcArchitecture) || defined(Sparc64Architecture)) \
+ && !defined(LargePositionIndependentCFlags) \
+ && defined(HasGcc)
+# define LargePositionIndependentCFlags -fPIC
+#endif
+
+#ifndef XF8_32Wid
+# define XF8_32Wid NO
+#endif
+
+#if CrossCompiling
+#include <cross.def>
+#endif
+#include <xf86.rules>
+
diff --git a/nx-X11/config/cf/xorg.tmpl b/nx-X11/config/cf/xorg.tmpl
new file mode 100644
index 000000000..a1703b56b
--- /dev/null
+++ b/nx-X11/config/cf/xorg.tmpl
@@ -0,0 +1,145 @@
+XCOMM $Xorg: xf86.tmpl,v 1.3 2000/08/17 19:41:48 cpqbld Exp $
+XCOMM $XdotOrg: xc/config/cf/xorg.tmpl,v 1.5 2005/11/08 06:33:24 jkj Exp $
+
+#ifndef ConfigDefines
+# define ConfigDefines -D__XCONFIGFILE__='"$(XCONFIGFILE)"' \
+ -D__XCONFIGDIR__='"$(XCONFIGDIR)"' -D__XLOGFILE__='"$(XLOGFILE)"' \
+ -D__XSERVERNAME__='"$(XSERVERNAME)"'
+#endif
+
+CONFIG_DEFINES = ConfigDefines
+
+#ifndef ServerDefines
+#define ServerDefines StandardDefines VersionDefines
+#endif
+
+#ifdef BuilderEMailAddr
+BUILDERADDR = BuilderEMailAddr
+#else
+BUILDERADDR = "xorg@lists.freedesktop.org"
+#endif
+#ifdef VendorSupportAddress
+ VENDORSUPPORT = VendorSupportAddress
+ BUGMSG = -DBUILDERADDR='$(BUILDERADDR)' -DVENDORSUPPORT='$(VENDORSUPPORT)'
+#else
+ BUGMSG = -DBUILDERADDR='$(BUILDERADDR)'
+#endif
+
+#if defined(XF86DriverSDK)
+ BUILDMODULEDIR = $(DRIVERSDKMODULEDIR)
+ BUILDMODULETOP = ..
+ TOP_INCLUDES = TopIncludes
+ IMAKE_DEFINES = -DXF86DriverSDK=1
+#ifdef UseInstalled
+ IMAKE_CMD = $(IMAKE) -DUseInstalled -I$(TOP) -I$(IRULESRC) \
+ $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
+#else
+ IMAKE_CMD = $(IMAKE) -I$(TOP) -I$(IRULESRC) \
+ $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
+#endif
+
+#undef ImakeSubCmdHelper
+#ifdef UseInstalled
+#define ImakeSubCmdHelper $(IMAKE) -DUseInstalled -I$(IMAKETOP) \
+ -I$(IRULESRC) $(IMAKE_DEFINES) $(IMAKE_WARNINGS)
+#else
+#define ImakeSubCmdHelper $(IMAKEPREFIX)$(IMAKE) -I$(IMAKETOP) \
+ $(IMAKE_DEFINES) $(IMAKE_WARNINGS) \
+ -I$(IMAKEPREFIX)$(IRULESRC)
+#endif
+#endif
+
+#ifndef JoystickSupport
+#define JoystickSupport NO
+#endif
+
+/*
+ * Module support: These overrides must be here, not in xf86.rules,
+ * because they will replace rules after having seen the first lines
+ * of Imakefile (include <Server.tmpl>)
+ */
+
+#ifndef ProPoliceSupport
+#define ProPoliceSupport O
+#endif
+
+#ifndef HasGccMergeConstants
+#define HasGccMergeConstants NO
+#endif
+
+#if HasGccMergeConstants && DoLoadableServer && !MakeDllModules
+MODULE_GCC_FLAGS = -fno-merge-constants
+#endif
+
+#if defined(IHaveModules) && MakeDllModules
+MODULE_PIC_FLAGS = $(PICFLAGS)
+#endif
+
+MODULE_CFLAGS = $(MODULE_PIC_FLAGS) $(MODULE_GCC_FLAGS)
+
+#if defined(IHaveModules)
+# if DoLoadableServer
+MODULE_DEFINES = -DIN_MODULE -DXFree86Module
+# else
+MODULE_DEFINES = -DXFree86Module
+# endif
+#endif
+
+#if defined(IHaveModules) && DoLoadableServer
+
+/* This overrides the ObjCompile in Imake.rules! */
+#undef ObjectCompile
+#define ObjectCompile(options) RemoveFile($@) @@\
+ ClearmakeOSName\
+ $(MODCC) $(MODCFLAGS) options -c $*.c
+
+/* This overrides an AssembleObject in xf86.rules or in an os-dependent
+ * rules file (currently only minix.cf and os2.rules (uncritical))
+ */
+#define ModCPPOnlyAsm(basename,options) RemoveFile(basename.i) @@\
+ $(MODCPP) AsmDefines $(DEFINES) $(INCLUDES) options basename.S | \ @@\
+ grep -v '^\#' > basename.i
+
+#undef AssembleObject
+#define AssembleObject(basename,flags) ModCPPOnlyAsm(basename,flags) @@\
+ RemoveFile(basename.o) @@\
+ $(MODAS) $(MODASFLAGS) -o basename.o basename.i @@\
+ RemoveFile(basename.i)
+
+/* This overrides the NormalRelocatableTarget in Imake.rules */
+#undef NormalRelocatableTarget
+#define NormalRelocatableTarget(objname,objlist) @@\
+AllTarget(objname.Osuf) @@\
+ @@\
+objname.Osuf: objlist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(MODLD) $(MODLDCOMBINEFLAGS) objlist -o $@
+
+/* This overrides the NormalDepRelocatableTarget in Imake.rules */
+#undef NormalDepRelocatableTarget
+#define NormalDepRelocatableTarget(objname,deplist,objlist) @@\
+AllTarget(objname.Osuf) @@\
+ @@\
+objname.Osuf: deplist $(EXTRALIBRARYDEPS) @@\
+ RemoveFile($@) @@\
+ $(MODLD) $(MODLDCOMBINEFLAGS) objlist -o $@
+
+/* This overrides the RanLibrary in Imake.rules */
+#if DoRanlibCmd || NeedModuleRanlib
+#undef RanLibrary
+#define RanLibrary(args) $(MODRANLIB) args
+#endif
+
+/* This overrides the MakeLibrary rule in Imake.rules */
+#undef MakeLibrary
+#define MakeLibrary(libname,objlist) $(MODAR) libname objlist
+
+/* This overrides the LibraryTargetName rule in Imake.rules */
+#undef LibraryTargetName
+#define LibraryTargetName(libname)Concat(lib,libname.a)
+
+/* This disables an OS/2 rule */
+#undef BuildLibSupportLibs
+#define BuildLibSupportLibs(dummy)
+
+#endif /* IHaveModules */
diff --git a/nx-X11/config/cf/xorgsite.def b/nx-X11/config/cf/xorgsite.def
new file mode 100644
index 000000000..dea5ceb92
--- /dev/null
+++ b/nx-X11/config/cf/xorgsite.def
@@ -0,0 +1,768 @@
+XCOMM $XFree86: xc/config/cf/xf86site.def,v 3.186 2003/06/25 18:06:22 eich Exp $
+/******************************************************************************/
+/*
+ * This file is to provide a quick method for most people to change the
+ * behaviour of their Xorg installation without having to fully
+ * understand the workings of site.def and all the various '.cf' files.
+ *
+ * In the vast majority of cases, it should not be necessary to use this
+ * file at all or change it in any way.
+ *
+ * This file is divided into two sections. The first contains settings
+ * that end-users might reasonably change. The second contains settings
+ * that developers might want to change.
+ *
+ * IMPORTANT NOTE: In all cases changing the defaults may cause problems
+ * and/or unexpected side-effects. If you don't understand what a setting
+ * does, then it's best to not change it. If you make changes and have
+ * problems, verify that those problems are also present when using an
+ * empty host.def file and unchanged version of this file before reporting
+ * them.
+ *
+ * A good way to use this file is to copy it to host.def, and make the
+ * changes there. That way, future patches to this file won't fail.
+ * The host.def file will never be patched.
+ *
+ * The distributed version of this file MUST contain no uncommented
+ * definitions. Default definitions belong in xorg.cf, or <vendor>.cf
+ * files.
+ */
+/******************************************************************************/
+
+/*
+ * If you have build-specific modifications in your host.def file, but
+ * want an empty host.def file installed when doing 'make install',
+ * uncomment the following
+ *
+#define InstallEmptyHostDef
+ */
+
+/*
+ * Which servers to build. There is only Xorg server.
+ * It can be disabled by the following.
+ *
+#define XorgServer NO
+ */
+
+/*
+ * To disable building the Xnest server, uncomment this.
+ *
+#define XnestServer NO
+ */
+
+/*
+ * To disable building Xvfb, uncomment this.
+ *
+#define XVirtualFramebufferServer NO
+ */
+
+/*
+ * To enable building Xdmx, uncomment this.
+ *
+#define XdmxServer YES
+ */
+
+/*
+ * To disable building Xprt, uncomment this.
+ *
+#define XprtServer NO
+ */
+
+/*
+ * Set the default server (ie the one that gets the sym-link to "X")
+ *
+#define ServerToInstall Xorg
+ */
+
+/*
+ * If you only run the X server under xdm the X servers don't need to be
+ * installed SetUID, and you may comment out the lines below. If you run
+ * the servers by hand (with xinit or startx), then they do need to be
+ * installed SetUID on most platforms.
+ *
+ * Consult your system administrator before making the X server setuid.
+ *
+#define InstallXserverSetUID NO
+ */
+
+
+/*
+ * Server configuration parameters. The defaults are shown here:
+ */
+
+/*
+ * Which drivers to build. When building a static server, each of these
+ * will be included in it. When building the loadable server each of these
+ * modules will be built.
+ *
+#define XF86CardDrivers mga glint nv tga s3virge sis rendition \
+ neomagic i740 tdfx savage \
+ cirrus vmware tseng trident chips apm \
+ GlideDriver fbdev i128 \
+ ati DevelDrivers ark cyrix \
+ siliconmotion \
+ vesa vga XF86OSCardDrivers XF86ExtraCardDrivers
+ */
+
+/*
+ * To add third party drivers to the standard driver list, set the
+ * following.
+ *
+#define XF86ExtraCardDrivers extradriver1 extradriver2 ...
+ */
+
+/*
+ * Select the XInput devices you want by uncommenting this.
+ *
+#define XInputDrivers mouse keyboard acecad calcomp citron \
+ digitaledge dmc dynapro elographics \
+ microtouch mutouch penmount spaceorb summa \
+ wacom void magictouch aiptek
+ */
+
+/* To enable building of development DRI drivers (insecure, or not
+ * useful on the chosen architecture, uncomment this define.
+#define BuildDevelDRIDrivers YES
+ */
+
+/*
+ * To use the deprecated, old keyboard driver, uncomment this. But
+ * even better, make the new keyboard driver (hw/xfree86/input/keyboard)
+ * work for your architechture. The old driver will be removed in the
+ * next release.
+ *
+#define UseDeprecatedKeyboardDriver YES
+ */
+
+/*
+ * There are three parameters that determine where and how the Matrox HAL
+ * library is used:
+ *
+ * HaveMatroxHal -- You have the HALlib.a binary library installed
+ * in xfree86/drivers/mga/HALlib, and you want it to
+ * be used.
+ * Default: NO
+ *
+ * BuildMatroxHal -- You have the source for the HALlib library (installed
+ * in xfree86/drivers/mga/hallib), and want to build and
+ * use it.
+ * Default: NO
+ *
+ * UseMatroxHal -- You want to build support for loading/using the HAL
+ * library into the mga driver. For module server builds
+ * you don't need to have the HALlib library to do this.
+ * but you want to build support for loading it and using
+ * it into the mga driver module.
+ * Default: YES for loadable server build
+ * (HaveMatroxHal || BuildMatroxHal) for static
+ */
+
+/*
+ * To disable use of the Matrox HAL library, uncomment this:
+ *
+#define UseMatroxHal NO
+ */
+
+/*
+ * If you have the HALlib.a binary installed in xfree86/drivers/mga/HALlib,
+ * uncomment this:
+ *
+#define HaveMatroxHal YES
+ */
+
+/*
+ * If you have the HALlib source code installed in xfree86/drivers/mga/hallib,
+ * uncomment this:
+#define BuildMatroxHal YES
+ */
+
+/*
+ * To disable building the font server, uncomment this.
+ *
+#define BuildFontServer NO
+ */
+
+/*
+ * Speedo fonts have been disabled by default in this release.
+ * To re-enable support for Speedo fonts, uncomment this.
+ *
+#define BuildSpeedo YES
+ */
+
+/*
+ * To disable support for CID fonts, uncomment this.
+ *
+#define BuildCID NO
+ */
+
+/*
+ * To disable support for TrueType fonts, uncomment these.
+ *
+#define BuildFreeType NO
+ */
+
+/*
+ * To set non-default build options for the underlying FreeType libraries,
+ * add them here and uncomment.
+ *
+#define Freetype2BuildDefines -DFREETYPE_BUILD_DEFINES
+ */
+
+/*
+ * To build the FreeType libraries with the TrueType byte code interpreter
+ * enabled, uncomment this. Note that there are patent issues related to the
+ * TrueType byte code interpreter, and we only recommend you enabling this
+ * if you are sure that there are no legal impediments to you doing so. See
+ * <http://www.freetype.org/patents.html> for further information.
+ *
+#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
+ */
+
+/*
+ * Do you want to Build Fonts (Usually you only want to build and install
+ * fonts once, if this is a first time install you will want to build the
+ * fonts)
+ *
+#define BuildFonts NO
+ */
+
+/*
+ * To not build/install the 75dpi fonts, uncomment the following
+ *
+#define Build75DpiFonts NO
+ */
+
+/*
+ * To not build/install the 100dpi fonts, uncomment the following
+ *
+#define Build100DpiFonts NO
+ */
+
+/*
+ * To build/install the Speedo fonts, uncomment the following
+ * (see setting above about Speedo support as well)
+ *
+#define BuildSpeedoFonts YES
+ */
+
+/*
+ * To not build/install the Type1 fonts, uncomment the following
+ *
+#define BuildType1Fonts NO
+ */
+
+/*
+ * To not build/install the CID fonts, uncomment the following
+ *
+#define BuildCIDFonts NO
+ */
+
+/*
+ * To not build/install the True Type fonts, uncomment the following
+ *
+#define BuildTrueTypeFonts NO
+ */
+
+/*
+ * To not build/install the Cyrillic fonts, uncomment the following
+ *
+#define BuildCyrillicFonts NO
+ */
+
+/*
+ * To not install the local font directory, uncomment the following
+ *
+#define MakeLocalFontDir NO
+ */
+
+/*
+ * To build only the servers with a cut-down source tree, uncomment
+ * this.
+ *
+#define BuildServersOnly YES
+ */
+
+/*
+ * By default, the sample config files for xinit, xdm and xfs are installed
+ * only when there is no pre-existing version installed. Uncommenting the
+ * following lines will force the sample versions to be installed even if
+ * it means over-writing existing versions.
+ *
+#define InstallXinitConfig YES
+#define InstallXdmConfig YES
+#define InstallFSConfig YES
+ */
+
+/*
+ * By default the application defaults files are always installed.
+ * Uncommenting the the following will prevent exising application
+ * defaults files from being over-written.
+ *
+#define InstallAppDefFiles NO
+ */
+
+/*
+ * Undefine the following if you don't want to have config files and
+ * app-defaults installed in a separate directory (i.e. /etc/X11).
+ *
+#define UseSeparateConfDir NO
+ */
+
+/*
+ * To enable building the glide driver, you need to define
+ * HasGlide2 to YES and set the Glide2IncDir variable.
+ * HasGlide2 is per default NO.
+ *
+#define HasGlide2 YES
+ */
+
+/*
+ * Set the path to your Glide include files.
+ *
+#define Glide2IncDir /usr/include/glide
+ */
+
+/*
+ * Have glide 3?
+ *
+#define HasGlide3 YES
+ */
+
+/*
+ * Set the path to your Glide 3 include files.
+ *
+#define Glide3IncDir /usr/include/glide3
+ */
+
+
+
+/*
+ * Unless you're a developer you shouldn't need to change anything
+ * beyond this point.
+ */
+
+/*
+ * If you want to enable some developer settings, like more verbose
+ * compiler warnings, uncomment this.
+ *
+#define XFree86Devel YES
+*/
+
+/*
+ * The default optimisation flags for GCC 2.x. -fno-strength-reduce is
+ * here to work around a bug in -O2 for GCC 2.x on i386 platforms.
+ * If you are using a version that doesn't have this bug, you can
+ * uncomment the following line, and remove '-fno-strength-reduce'
+ * If you are building binaries for a 486, it may be beneficial to add
+ * -m486
+ *
+#define DefaultGcc2i386Opt -O2 -fno-strength-reduce
+ */
+
+/*
+ * This allows the GCC warning flags to be set. The default is shown here.
+ *
+#define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
+ -Wmissing-prototypes -Wmissing-declarations \
+ -Wredundant-decls -Wnested-externs
+ */
+
+/*
+ * Sun Compiler stuff..
+ *
+#define HasSunC YES
+#define HasSunCplusplus YES
+#define CplusplusCompilerMajorVersion 5
+#define CplusplusCompilerMinorVersion 0
+#define CCompilerMajorVersion 5
+#define CCompilerMinorVersion 0
+ */
+
+/*
+ * Optimized Sun Compiler Build.
+ *
+#define DefaultCDebugFlags -xO4 -xtarget=pentium_pro
+#define OptimizedCDebugFlags -xO4 -xtarget=pentium_pro
+ */
+
+/*
+ * Debuggable Sun Compiler Build.
+ * Note: This builds _EVERYTHING_ as debuggable
+ *
+#define DefaultCDebugFlags -g -xs
+#define OptimizedCDebugFlags -g -xs
+ */
+
+/*
+ * For Linux, this should match the Binutils version you have. This example
+ * is for 2.6.0.7. See linux.cf for the default setting.
+ *
+ * This should automatically get set correctly by imake.
+ *
+#define LinuxBinUtilsMajorVersion 26
+ */
+
+/*
+ * For Linux, these should match the libc version you have. This example
+ * is for libc.5.4.x. See linux.cf for the default setting.
+ *
+ * This should automatically get set correctly by imake.
+ *
+#define LinuxCLibMajorVersion 5
+#define LinuxClibMinorVersion 4
+ */
+
+/*
+ * If you want to use the GNU malloc library, uncomment this
+ *
+#define UseGnuMalloc YES
+ */
+
+/*
+ * Set this to whatever is required to access the GNU malloc library.
+ * The default is '-lgmalloc' unless is specified in the OS's .cf file.
+ *
+#define GnuMallocLibrary -L/usr/local/lib -lgmalloc
+ */
+
+/*
+ * To enable the internal Xserver malloc, uncomment this
+ *
+#define UseInternalMalloc YES
+ */
+
+/*
+ * Some Linux releases don't have a libtermcap. In this case you may need
+ * to uncomment the following
+ *
+#define TermcapLibrary -lncurses
+ */
+
+/*
+ * Build a server that dynamically loads the modules by setting
+ * this to YES. This defaults to YES on most platforms. A static server
+ * can be built by setting this to NO.
+ *
+#define DoLoadableServer NO
+ */
+
+/*
+ * This release defaults to building dlopen() style modules instead of the
+ * previously standard loader modules.
+ *
+ * Uncomment the following to return to the XFree86 custom loader modules.
+ *
+#define MakeDllModules NO
+ */
+
+/*
+ * Build XAA. This can be disabled with:
+ *
+#define XF86XAA NO
+ */
+
+/*
+ * Build vgahw. This can be disabled with:
+ *
+#define XF86VgaHw NO
+ */
+
+/*
+ * Build xf1bpp. This can be disabled with:
+ *
+#define XF1Bpp NO
+ */
+
+/*
+ * Build xf4bpp. This can be disabled with:
+ *
+#define XF4Bpp NO
+ */
+
+
+/*
+ * BSD Console driver support (for FreeBSD and NetBSD).
+ *
+ * By default, support is included for pccons and pcvt for NetBSD, and
+ * pccons, syscons and pcvt for FreeBSD.
+ *
+ * To change the list of supported drivers, set the following parameter.
+ * Possible values are -DPCCONS_SUPPORT, -DSYSCONS_SUPPORT, -DPCVT_SUPPORT.
+ * The following example includes support for syscons and pcvt only.
+ *
+#define XFree86ConsoleDefines -DSYSCONS_SUPPORT -DPCVT_SUPPORT
+ */
+
+/*
+ * To link the X server with a dynamic version of the Xfont library,
+ * uncomment this.
+ *
+#define XserverStaticFontLib NO
+ */
+
+/*
+ * To enable binary compatibility with previous versions of the font
+ * encoding support, uncomment this.
+ *
+#define FontencCompatibility YES
+ */
+
+/*
+ * To disable building XInput support, uncomment this
+ *
+#define BuildXInputExt NO
+ */
+
+/*
+ * Uncomment this for joystick support.
+ *
+ * Note: Joystick support is broken, so don't enable this.
+ *
+#define JoystickSupport YES
+ */
+
+/*
+ * To disable the ScreenSaver Extension, uncomment this line.
+ *
+#define BuildScreenSaverExt NO
+ */
+
+/*
+ * If you don't want to build Xinerama support, uncomment this.
+ *
+#define BuildXinerama NO
+ */
+
+/*
+ * If you don't want to build support for the GLX extension, uncomment this.
+ *
+#define BuildGlxExt NO
+ */
+
+/*
+ * If you want to build the xf86rush extension, uncomment this line.
+ * This isn't recommended.
+ *
+#define BuildXF86RushExt YES
+ */
+
+/*
+ * If you want to build the client library for the xf86rush extension,
+ * uncomment this line. This isn't recommended.
+ *
+#define BuildXF86RushLibrary NO
+ */
+
+/*
+ * If you are running NetBSD 0.9C or later, and have the aperture driver
+ * installed, uncomment this.
+ *
+#define HasNetBSDApertureDriver YES
+ */
+
+/*
+ * If you are running SVR3 and have the mmap driver installed (for linear
+ * framebuffer access) uncomment this.
+ *
+#define HasSVR3mmapDrv YES
+ */
+
+/*
+ * If you are using an SVR3 (like ISC 4.x) which supports long file names,
+ * you can uncomment this to have manual pages installed under their
+ * full names
+ *
+#define ExpandManNames YES
+ */
+
+/*
+ * For a POSIXized build on Interactive uncomment this
+ * Could be used with gcc 'till Version 2.6.3
+ * Should be used with gcc 2.7.2.
+ *
+#define UsePosix YES
+ */
+
+/*
+ * If you don't want XDMAUTH support (if you don't have Wraphelp.c),
+ * comment this out.
+ *
+ */
+#define HasXdmAuth YES
+
+/*
+ * If you have Linux DECnet support, and want to build XFree86 with support
+ * for connections over DECnet, uncomment this.
+ *
+#define HasDECnet YES
+ */
+
+/*
+ * To build static and shared libraries with debugging information, uncomment
+ * this. Assumes you have Gcc2.
+ * (If you don't have Gcc2, you can use the DebugLib{X11,Xt,Xaw,...} variables
+ * to build debugging versions of the libraries separately.)
+ *
+#define DebuggableLibraries YES
+*/
+
+/*
+ * To forceably build static libraries in addition to shared libraries,
+ * uncomment this.
+ *
+#define ForceNormalLib YES
+ */
+
+/*
+ * Uncomment this if your default tools (eg, gcc, ld, as, etc) are
+ * not the Linux ELF versions.
+ *
+#define LinuxElfDefault NO
+ */
+
+/*
+ * To use ELF format shared libraries for supported OSs, uncomment this.
+ *
+ * For Linux the default setting of this is the same as the setting of
+ * LinuxElfDefault.
+ *
+ * For FreeBSD this should automatically be set correctly by imake. Only
+ * change it here if you need to override the automatic setting.
+ *
+#define UseElfFormat YES
+ */
+
+/*
+ * For FreeBSD/ELF (FreeBSD 3.0) it is possible to also build and install
+ * a.out compatibility libraries. To enable that, uncomment this.
+ *
+#define BuildAoutLibraries YES
+ */
+
+/*
+ * If you have trouble with make bombing out in Xlib, try uncommenting this.
+ * You will not get dependencies as a result, but better than nothing.
+ *
+#define MakeHashTableBug YES
+ */
+
+/*
+ * If you do not want your man pages compress under SVR3 systems that
+ * support it, uncomment this.
+ *
+#define CompressManPages NO
+ */
+
+/*
+ * If you have sgmlfmt (the XFree86 doctools package) and want to build
+ * formatted docs from the SGML source, uncomment this.
+ *
+#define HasSgmlFmt YES
+ */
+
+/*
+ * To disable building some document formats, uncomment some of these.
+ *
+#define BuildLinuxDocText NO
+#define BuildLinuxDocHtml NO
+#define BuildLinuxDocPS NO
+ */
+
+/*
+ * To install Japanese versions of the documentation uncomment this.
+ * Note: The Japanese documentation consists of a subset of the
+ * XFree86 3.1 docs.
+ *
+#define InstallJapaneseDocs YES
+ */
+
+/*
+ * To build/install X specs docs, uncomment the following.
+ * The SpecsDocDirs setting here is recommended because it covers
+ * the docs that XFree86 has changed or added.
+ *
+#define BuildSpecsDocs YES
+#define SpecsDocDirs CTEXT GL ICCCM X11 Xext Xmu Xv XvMC i18n
+ */
+
+/*
+ * To build all specs docs, not just those listed in SpecsDocDirs, uncomment
+ * the following.
+ *
+#define BuildAllSpecsDocs YES
+ */
+
+/*
+ * If your system doesn't support vm86() mode and you have
+ * libx86emu set library path here
+ *
+#define X86EMU_LIBPATH /usr/local/lib
+ */
+
+/*
+ * Most platforms default to using an already installed FreeType 2 library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasFreetype2 NO
+ */
+
+/*
+ * To use a FreeType library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+ *
+#define HasFreetype2 YES
+#define Freetype2Dir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed Fontconfig library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasFontconfig NO
+ */
+
+/*
+ * To use a Fontconfig library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+#define HasFontconfig YES
+#define FontconfigDir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed Expat library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasExpat NO
+ */
+
+/*
+ * To use a Expat library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+#define HasExpat YES
+#define ExpatDir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed PNG library.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define HasLibpng NO
+ */
+
+/*
+ * To use a PNG library already installed outside the default search
+ * paths, uncomment the following and set the path as needed.
+#define HasLibpng YES
+#define LibpngDir /usr/local
+ */
+
+
+/*
+ * Most platforms default to using an already installed xterm program.
+ * To use the one included in this release instead, uncomment the following.
+ *
+#define BuildXterm YES
+ */
diff --git a/nx-X11/config/cf/xorgversion.def b/nx-X11/config/cf/xorgversion.def
new file mode 100644
index 000000000..f630100fa
--- /dev/null
+++ b/nx-X11/config/cf/xorgversion.def
@@ -0,0 +1,5 @@
+#define XORG_VERSION_MAJOR 6
+#define XORG_VERSION_MINOR 9
+#define XORG_VERSION_PATCH 0
+#define XORG_VERSION_SNAP 0
+#define XORG_DATE "21 December 2005"
diff --git a/nx-X11/config/cf/xprint_host.def b/nx-X11/config/cf/xprint_host.def
new file mode 100644
index 000000000..a9b4cee2f
--- /dev/null
+++ b/nx-X11/config/cf/xprint_host.def
@@ -0,0 +1,305 @@
+/* host.def config for the Xprint server standalone packages */
+
+/*
+ * Enable this if you want to build the GISWxprintglue package...
+ * #define BuildGISWxprintglue YES
+ * Then do a % make World ; cd packager/solaris/GISWxprintglue/ ; make make_GISWxprintglue
+ */
+
+/*
+ * Enable this if you want to build the GISWxprint package...
+ * #define BuildGISWxprint YES
+ * Then do a % make World ; cd packager/solaris/GISWxprint/ ; make make_GISWxprint
+ */
+
+/*
+ * Enable this if you want to build the Debian Xprint server package
+ * #define BuildDebianXprintPackage YES
+ */
+
+/*
+ * If you build a RPM package from this tree the xprint.spec file
+ * will set BuildXprintRPMPackage to YES
+ */
+
+/*
+ * Enable this if you want to build the Mozilla Xprint XPI server package
+ * #define BuildMozillaXprintXPIPackage YES
+ */
+
+/* HasDocBookTools - set to YES if "xsltproc", "xmllint", "docbook2man",
+ * "lynx" and the docbook-xsl-stylesheets are installed.
+ * #define HasDocBookTools YES
+ */
+
+/* #########################################################################
+ * ############ xprint.mozdev.org defaults start (do not edit!) ############
+ * #########################################################################
+ */
+
+#ifndef BuildGISWxprintglue
+# define BuildGISWxprintglue NO
+#endif /* BuildGISWxprintglue */
+
+#ifndef BuildGISWxprint
+# define BuildGISWxprint NO
+#endif /* BuildGISWxprint */
+
+#ifndef BuildDebianXprintPackage
+# define BuildDebianXprintPackage NO
+#endif /* BuildDebianXprintPackage */
+
+#ifndef BuildXprintRPMPackage
+# define BuildXprintRPMPackage NO
+#endif /* BuildXprintRPMPackage */
+
+#ifndef BuildMozillaXprintXPIPackage
+# define BuildMozillaXprintXPIPackage NO
+#endif /* BuildMozillaXprintXPIPackage */
+
+/* If we do not build any of the special packages then build and
+ * install everything */
+#ifndef BuildFullXprintDistrib
+# if BuildGISWxprintglue || BuildGISWxprint || BuildDebianXprintPackage || BuildXprintRPMPackage || BuildMozillaXprintXPIPackage
+# define BuildFullXprintDistrib NO
+# else
+# define BuildFullXprintDistrib YES
+# endif /* BuildGISWxprintglue || BuildGISWxprint || BuildDebianXprintPackage || BuildXprintRPMPackage || BuildMozillaXprintXPIPackage */
+#endif /* BuildFullXprintDistrib */
+
+/* Verify that only one package is enabled at the same time */
+#if (BuildGISWxprintglue + BuildGISWxprint + BuildDebianXprintPackage + BuildXprintRPMPackage + BuildFullXprintDistrib + BuildMozillaXprintXPIPackage) > 1
+# error Building more than one special package is not allowed.
+#endif /* Verify */
+
+/* Some flags to build the Xprint server (Xprt), the tools and the fonts */
+#define BuildServer YES
+#define XprtServer YES
+
+/* Needed to build encoding files */
+#define BuildFonts YES
+#define BuildSpeedoFonts NO
+#define BuildType1Fonts NO
+#define BuildCIDFonts NO
+#define BuildTrueTypeFonts NO
+#define BuildEthiopicFonts NO
+#define BuildBethMarduthoFonts NO
+
+/* X extensions not needed (or not supported yet by Xprt) */
+#define BuildXKB NO
+#define BuildRECORD NO
+#define BuildDPMS NO
+#define BuildXF86VidModeExt NO
+#define BuildXInputExt NO
+#define BuildScreenSaverExt NO
+#define BuildXvExt NO
+#define BuildXvMCExt NO
+#define BuildDmx NO
+#define BuildXF86DRI NO
+#define BuildRender NO
+#define BuildXfixes NO
+#define BuildDamage NO
+#define BuildComposite NO
+#define BuildXevie NO
+#define BuildXF86DGA NO
+#define BuildRandR NO
+#define BuildXinerama NO
+
+/* X extensions needed */
+#define BuildGlxExt YES
+/* LBX is needed for compatibility to the XWeb stuff */
+#define BuildLBX YES
+
+/* Xprt's non-bitmap based DDX (PS, PCL, PDF, SVGprint etc.) cannot support MIT-SHM */
+#undef HasShm
+#define HasShm NO
+/* Disable stipple code due portability issues
+ * (see http://xprint.mozdev.org/bugs/show_bug.cgi?id=2220) */
+#define BuildStippleCode NO
+
+/* Temporary for Xorg tree */
+#define BuildFontconfigLibrary NO
+#define XorgServer NO
+#define XF86Server NO
+#define XnestServer NO
+#define XVirtualFramebufferServer NO
+#define XdmxServer NO
+
+#define GzipFontCompression YES
+#define BuildFreeType YES
+#define BuildFreetype2Library YES
+#define SharedLibFreetype2 NO
+#define NormalLibFreetype2 YES
+#define HasFreetype2 NO
+#define Freetype2BuildDefines -DTT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
+#define BuildType1 NO
+#define BuildCID NO
+#define BuildSpeedo NO
+#define BuildFontCache NO
+#define BuildRender NO
+#define BuildRenderLibrary NO
+#define BuildRandRLibrary NO
+#define BuildXcursorLibrary NO
+#define BuildXcursorgen NO
+#define SharedLibFontEnc NO
+#define SharedLibFont NO
+#define XserverStaticFontLib YES
+
+/* Build only Xprint applications */
+#ifndef BuildXprintAppsOnly
+#define BuildXprintAppsOnly YES
+#endif /* BuildXprintAppsOnly */
+
+/* Set our own XVendorString/XVendorRelease
+ * (and to avoid that xorg.cf sets it's own stuff here) */
+#define XVendorString "xprint.mozdev.org"
+#define XVendorRelease 100000
+
+#define UseHackLinkAgainstInstalledX11Libs NO
+#if UseHackLinkAgainstInstalledX11Libs
+/* "Hack" to reuse an already installed X11 distribution when linking our
+ * programs (this assumes that the installed X version is at least X11R6.4) */
+# ifndef IBMArchitecture
+# define LdPreLib -L$(USRLIBDIR) -R$(USRLIBDIR) -L$(BUILDLIBDIR)
+# endif /* !IBMArchitecture */
+#endif /* UseHackLinkAgainstInstalledX11Libs */
+
+XCOMM #### Sun/Solaris-specifc stuff ... ####
+#if defined(SunArchitecture) && (OSMajorVersion > 4)
+#undef XsunServer
+#define XsunServer NO
+
+XCOMM X11R6.7's sun.cf does not set ProjectRoot to /usr/openwin anymore - why ?
+#define ProjectRoot /usr/openwin
+#define ServerConfigDir /usr/openwin/server/etc
+
+XCOMM Some build hacks for the GISWxprintglue package
+#if BuildGISWxprintglue
+# define ProjectRoot /usr/openwin
+# define ServerConfigDir /usr/openwin/server/etc
+# define BinDir /opt/GISWxprintglue/bin
+# define ManDirectoryRoot /opt/GISWxprintglue/man
+# undef XPrintDir
+# define XPrintDir /opt/GISWxprintglue/server/etc/XpConfig
+ /* PCL DDXs are currently defunct in Solaris Xprt, so do not ship the
+ * config files for now */
+# undef XpColorPclDDX
+# define XpColorPclDDX NO
+# undef XpMonoPclDDX
+# define XpMonoPclDDX NO
+ /* GISWxprintglue uses the Solaris Xprt server which uses the Solaris
+ * encoding/ttmap files for font encodings
+ */
+# define InstallXF86EncodingFiles NO
+#endif /* BuildGISWxprintglue */
+
+XCOMM Some build hacks for the GISWxprint package
+#if BuildGISWxprint
+# define ProjectRoot /usr/openwin
+# define ServerConfigDir /usr/openwin/server/etc
+# define BinDir /opt/GISWxprint/bin
+# define ManDirectoryRoot /opt/GISWxprint/man
+# undef XPrintDir
+# define XPrintDir /opt/GISWxprint/server/etc/XpConfig
+ /* PCL DDXs are currently defunct in Solaris Xprt, so do not ship the
+ * config files for now */
+# undef XpColorPclDDX
+# define XpColorPclDDX NO
+# undef XpMonoPclDDX
+# define XpMonoPclDDX NO
+ /* Make sure we install our own encoding files since Solaris uses a format we
+ * (currently) do not support (yet).
+ */
+# define InstallXF86EncodingFiles YES
+# undef XF86EncodingsPath
+# define XF86EncodingsPath /opt/GISWxprint/lib/X11/fonts/encodings
+#endif /* GISWxprint */
+
+/* Install XF86 encoding files since that's the only format we currently support */
+#ifndef InstallXF86EncodingFiles
+#define InstallXF86EncodingFiles YES
+#endif /* InstallXF86EncodingFiles */
+
+#define HasVarDirectory NO
+#undef HasMotif2
+#define HasMotif2 YES
+
+#if 1 /* Switch for 32bit binaries or 64bit binaries */
+ /* 32bit SPARC */
+# define CcCmd /opt/SUNWspro/bin/cc
+# define CplusplusCmd /opt/SUNWspro/bin/CC
+#else
+ /* 64bit sparc (Doesn't really work yet because the Xservers cannot link properly... ;-( */
+# define ServerExtraDefines -D_XSERVER64
+# define CcCmd /opt/SUNWspro/bin/cc -xarch=v9a
+# define CplusplusCmd /opt/SUNWspro/bin/CC -xarch=v9a
+# define UsrLibDir /usr/openwin/lib/sparcv9
+#endif
+
+#if 0 /* Development only */
+ XCOMM Explicitly use "-xs" to make Rational Purify "happy"
+# undef OptimizedCDebugFlags
+# define OptimizedCDebugFlags -xs -g -DDEBUG_$(LOGNAME)
+#endif
+
+XCOMM #### FreeBSD-specifc stuff ... ####
+#elif defined(FreeBSDArchitecture)
+#define ProjectRoot /usr/X11R6
+#define XPrintDir /etc/X11/xserver
+#define DlLibrary -lc
+#undef XF86SVGAServer
+#define XF86SVGAServer NO
+#define HasVarDirectory NO
+#define HasMotif2 YES
+#define HasGhostScript YES
+#define InstallXF86EncodingFiles NO
+
+XCOMM #### NetBSD-specifc stuff ... ####
+#elif defined(NetBSDArchitecture)
+#define ProjectRoot /usr/X11R6
+#define XPrintDir /etc/X11/xserver
+#undef XF86SVGAServer
+#define XF86SVGAServer NO
+#define HasVarDirectory NO
+#define HasMotif2 YES
+#define HasGhostScript YES
+#define InstallXF86EncodingFiles NO
+
+XCOMM #### Linux-specifc stuff ... ####
+#elif defined(LinuxArchitecture)
+#define ProjectRoot /usr/X11R6
+#define XPrintDir /etc/X11/xserver
+#undef XF86SVGAServer
+#define XF86SVGAServer NO
+#define HasVarDirectory NO
+#define HasMotif2 YES
+#define HasGhostScript YES
+#define InstallXF86EncodingFiles NO
+/* Debian Xprint package puts the Xprt config files elsewhere */
+#if (LinuxDistribution == LinuxDebian)
+# define XPrintDir /usr/share/Xprint/xserver
+#endif
+
+#endif
+
+/* Do not strip binaries to ensure usefull stacktraces in bug reports
+ * (http://xprint.mozdev.org/bugs/show_bug.cgi?id=2264)
+ */
+#define StripInstalledPrograms NO
+
+/* Does the X11 installation have the Xfree86 encoding files ? */
+#ifndef InstallXF86EncodingFiles
+#define InstallXF86EncodingFiles YES
+#endif /* InstallXF86EncodingFiles */
+
+INSTALLXF86ENCODINGFILES = InstallXF86EncodingFiles
+
+#ifndef XF86EncodingsPath
+#define XF86EncodingsPath $(FONTDIR)/encodings
+#endif /* XF86EncodingsPath *
+
+/* #########################################################################
+ * ################ xprint.mozdev.org defaults end ################
+ * #########################################################################
+ */
diff --git a/nx-X11/config/docbook/docbookconv.sh b/nx-X11/config/docbook/docbookconv.sh
new file mode 100755
index 000000000..e58f05b78
--- /dev/null
+++ b/nx-X11/config/docbook/docbookconv.sh
@@ -0,0 +1,124 @@
+#!/bin/sh
+
+#set -x
+
+fatal_error()
+{
+ echo "$1" 1>&2
+ exit 1
+}
+
+debug_echo()
+{
+ echo "$1" 1>&2
+}
+
+verbose_echo()
+{
+ echo "$1" 1>&2
+}
+
+which_tool()
+{
+ echo "${PATH}" | tr ":" "\n" | while read i ;
+ do ls -1ad "${i}/${1}" 2>/dev/null ; done | sort | uniq
+}
+
+which_program()
+{
+ echo "${1}" | tr ":" "\n" | while read i ;
+ do
+ which_tool "${i}"
+ done | sort | uniq
+}
+
+which_xsl()
+{
+ ls -1ad ${1}/docbook-xsl-stylesheets*/ 2>/dev/null | head -1
+}
+
+# Fix HTML generated by the DocBook XSL stylesheets
+# In many cases <nsxyz:p> is used instead of <p>, screwing-up
+# display (this stuff only works for XHTML)
+fix_docbook_html()
+{
+ sed "s/<ns[0-9]*:p>/<p>/g;s/<\/ns[0-9]*:p>/<\/p>/g"
+}
+
+# main
+infile="${1}"
+outputformat="${2}"
+outputfile="${3}"
+
+# xsl processing
+case "`uname -s`" in
+ FreeBSD)
+ PATH="${PATH}:/usr/local/bin:/usr/local/sbin"
+ export PATH
+ stylesheetbase="/usr/local/share/xsl/"
+ ;;
+ *)
+ stylesheetbase="/usr/share/sgml/docbook/"
+ ;;
+esac
+xsltproc="`which_tool xsltproc`"
+stylesheetdir="`which_xsl ${stylesheetbase}`"
+docbook2man="`which_tool docbook2man`"
+verbose_echo "# Using xsltproc=${xsltproc}."
+verbose_echo "# Using stylesheetdir=${stylesheetdir}."
+verbose_echo "# Using docbook2man=${docbook2man}."
+
+# Prechecks
+[ "${infile}" = "" ] && fatal_error "$0: No input file."
+[ "${outputfile}" = "" ] && fatal_error "$0: No output file."
+[ "${outputformat}" = "" ] && fatal_error "$0: No format given."
+[ ! -r "${infile}" ] && fatal_error "$0: Input file not found or readable."
+[ ! -x "${xsltproc}" ] && fatal_error "$0: No xsltproc found."
+[ ! -r "${stylesheetdir}" ] && fatal_error "$0: No DocBook/XSL style sheets found."
+[ ! -x "${docbook2man}" ] && fatal_error "$0: No docbook2man found."
+
+
+# this is hack style to work around the problem that "docbook2man"
+# writes lots of files into the current dir
+MYTMPDIR="/tmp/docbookconv_${RANDOM}"
+MYCURRDIR="${PWD}"
+
+(
+ mkdir "${MYTMPDIR}"
+ cd "${MYTMPDIR}"
+
+ case "${outputformat}" in
+ "html")
+ cp "${MYCURRDIR}/${infile}" "${infile}.tmp"
+ if [ "${infile}" != "${infile%.sgml}" ] ; then
+ verbose_echo "# processing as SGML document"
+ ${xsltproc} --docbook ${stylesheetdir}/html/docbook.xsl "${infile}.tmp" | fix_docbook_html >"${MYCURRDIR}/${outputfile}"
+ else
+ verbose_echo "# processing as XML document"
+ ${xsltproc} ${stylesheetdir}/html/docbook.xsl "${infile}.tmp" | fix_docbook_html >"${MYCURRDIR}/${outputfile}"
+ fi
+ ;;
+ "man")
+ if [ "${infile}" != "${infile%.sgml}" ] ; then
+ #cp "${MYCURRDIR}/${infile}" "${infile%.sgml}.xml"
+ #${docbook2man} --network "${infile%.sgml}.xml"
+ cp "${MYCURRDIR}/${infile}" "${infile}.tmp"
+ ${docbook2man} --network "${infile}.tmp"
+ else
+ cp "${MYCURRDIR}/${infile}" "${infile}.tmp"
+ ${docbook2man} --network "${infile}.tmp"
+ fi
+ manfile="$(ls -1 ${infile%.*}.__*)"
+
+ verbose_echo "manfile=${manfile}"
+ [ ! -r "${manfile}" ] && fatal_error "$0: manfile not found."
+ cp "${manfile}" "${MYCURRDIR}/${outputfile}"
+ ;;
+ *)
+ fatal_error "Unsupported output format ${outputformat}."
+ ;;
+ esac
+)
+
+# EOF.
+
diff --git a/nx-X11/config/imake/Imakefile b/nx-X11/config/imake/Imakefile
new file mode 100644
index 000000000..13645443b
--- /dev/null
+++ b/nx-X11/config/imake/Imakefile
@@ -0,0 +1,84 @@
+XCOMM $XdotOrg: xc/config/imake/Imakefile,v 1.3 2005/10/10 23:49:09 kem Exp $
+XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:41:50 cpqbld Exp $
+XCOMM
+XCOMM
+XCOMM
+XCOMM
+XCOMM $XFree86: xc/config/imake/Imakefile,v 3.18 2003/10/21 17:41:44 tsi Exp $
+
+XCOMM Some compilers generate fatal errors if an -L directory does
+XCOMM not exist. Since BUILDLIBDIR may not exist yet suppress its use.
+ LDPRELIB =
+ LDPRELIBS =
+
+DEPLIBS =
+
+INCLUDES = -I$(TOP)/include $(TOP_X_INCLUDES)/X11
+CPP_PROGRAM = CppCmd
+CPP_DEFINES = -DCPP_PROGRAM="\"$(CPP_PROGRAM)\""
+GCC_COMMAND = $(CC) -fmerge-constants -xc /dev/null -S -o /dev/null 2> /dev/null 1> /dev/null
+GCC_DEFINES = -DHAS_MERGE_CONSTANTS=`if $(GCC_COMMAND); then echo 1; else echo 0; fi`
+
+EXTRA_DEFINES=-DMONOLITH
+
+#ifdef CrossCompileDir
+CROSSCOMPILEDIR = CrossCompileDir
+CROSSCOMPILEDEFINES=-DCROSSCOMPILE -DCROSSCOMPILEDIR=\"$(CROSSCOMPILEDIR)\"
+#else
+CROSSCOMPILEDIR =
+CROSSCOMPILEDEFINES=
+BOOTSTRAPDEFINES =
+#endif
+
+DEFINES = $(SIGNAL_DEFINES) $(BOOTSTRAPCFLAGS) $(CPP_DEFINES) $(GCC_DEFINES) \
+ $(CROSSCOMPILEDEFINES)
+
+EXTRAMANDEFS = -D__cpp__="\"$(CPP_PROGRAM)\""
+
+#if defined(MacIIArchitecture) || defined(SequentArchitecture) || defined(i386ScoArchitecture)
+XBSDLIB = /**/
+#endif
+
+#ifdef CrossCompileDir
+# ifdef TargetPreProcessCmd
+CPP = TargetPreProcessCmd
+# else
+CPP = CrossCompileDir/cc -E -
+# endif
+IMAKEMDEFS_CPPDEFINES = $(DEFINES) -DCROSSCOMPILE_CPP
+CppFileTarget(imakemdep_cpp.h,imakemdep.h,$(IMAKEMDEFS_CPPDEFINES),\
+ NullParameter)
+#endif
+
+#undef ImakeDependency
+#define ImakeDependency(dummy) @@\
+imake.o: imakemdep_cpp.h @@\
+Makefile:: ProgramTargetName(imake)
+
+#if CrossCompiling
+SimpleHostProgramTarget(imake)
+#else
+SimpleProgramTarget(imake)
+#endif
+
+imakeonly:: $(PROGRAM)
+
+InstallDriverSDKNamedProg(imake,imake,$(DRIVERSDKDIR)/config/imake)
+
+#if HasClearmake
+bootstrapdepend: depend
+#else
+bootstrapdepend:
+#endif
+
+clean::
+ RemoveFile(ProgramTargetName(ccimake))
+ RemoveFile(Makefile.proto)
+ RemoveFile(imakemdep_cpp.h)
+ $(RM) -r bootstrap
+
+#ifdef OS2Architecture
+clean::
+ RemoveFiles(imake ccimake)
+
+#endif
diff --git a/nx-X11/config/imake/Makefile.ini b/nx-X11/config/imake/Makefile.ini
new file mode 100644
index 000000000..b9c22963e
--- /dev/null
+++ b/nx-X11/config/imake/Makefile.ini
@@ -0,0 +1,86 @@
+# $Xorg: Makefile.ini,v 1.3 2000/08/17 19:41:50 cpqbld Exp $
+#
+# WARNING WARNING WARNING WARNING WARNING WARNING WARNING
+#
+# This is NOT an automatically generated Makefile! It is hand-crafted as a
+# bootstrap, may need editing for your system. The BOOTSTRAPCFLAGS variable
+# may be given at the top of the build tree for systems that do not define
+# any machine-specific preprocessor symbols.
+#
+# $XFree86: xc/config/imake/Makefile.ini,v 3.9 2000/10/26 17:57:45 dawes Exp $
+
+CROSSCOMPILEDIR =
+CROSSCOMPILEFLAGS = -DCROSSCOMPILEDIR=\"$(CROSSCOMPILEDIR)\"
+BOOTSTRAPCFLAGS =
+CC = cc
+PREPROCESS_CMD = cc -E
+CDEBUGFLAGS = -O
+INCLUDES = -I../../include -I../../imports/x11/include/X11
+CFLAGS = $(BOOTSTRAPCFLAGS) $(CDEBUGFLAGS) $(INCLUDES) -DMONOLITH
+IMAKEMDEP_CROSSCOMPILE = -DCROSSCOMPILE_CPP
+SHELL = /bin/sh
+RM = rm -f
+MV = mv
+MAKE = make
+RM_CMD = $(RM) *.CKP *.ln *.BAK *.bak *.o core errs ,* *~ *.a \
+ tags TAGS make.log
+NPROC = 1
+
+imake::
+ @echo "making imake with BOOTSTRAPCFLAGS=$(BOOTSTRAPCFLAGS) and CROSSCOMPILEFLAGS=$(CROSSCOMPILEFLAGS) in config/imake"
+
+imake:: imake.o
+ $(CC) -o imake $(CFLAGS) imake.o
+
+imake.o: ccimake imake.c imakemdep_cpp.h
+ $(CC) -c $(CFLAGS) `./ccimake` imake.c
+
+ccimake: ccimake.c
+ $(CC) -o ccimake $(CROSSCOMPILEFLAGS) $(CFLAGS) ccimake.c
+
+imakemdep_cpp.h: ccimake imakemdep.h
+ if [ -n "$(CROSSCOMPILEDIR)" ] ; then \
+ $(CROSSCOMPILEDIR)/$(PREPROCESS_CMD) `./ccimake` \
+ $(IMAKEMDEP_CROSSCOMPILE) imakemdep.h > imakemdep_cpp.h; \
+ else touch imakemdep_cpp.h; fi
+
+# a derived object erroneously would get shared across platforms by clearmake
+.NO_CONFIG_REC: ccimake
+
+bootstrap:
+ -@if [ -d bootstrap ]; then exit 0; else set -x; mkdir bootstrap; fi
+ $(MV) *.o bootstrap
+ @if [ -f imake.exe ]; then set -x; $(MV) imake.exe bootstrap; \
+ elif [ -f imake ]; then set -x; $(MV) imake bootstrap; else exit 0; fi
+
+relink:
+ $(RM) imake
+ $(MAKE) $(MFLAGS) imake
+
+clean:
+ $(RM) ccimake imake.o imake
+ $(RM_CMD) \#*
+ $(RM) -r Makefile.proto Makefile Makefile.dep bootstrap
+ $(RM) imakemdep_cpp.h
+
+depend:
+
+imake.exe::
+ @echo making imake with BOOTSTRAPCFLAGS=-DWIN32
+
+imake.exe:: imake.obj
+ cl -nologo imake.obj libc.lib kernel32.lib
+
+imake.obj: imake.c
+ cl -nologo -W2 -D__STDC__ -c -DWIN32 $(CFLAGS) imake.c
+
+clean.Win32:
+ if exist imake.exe del imake.exe
+ if exist imake.obj del imake.obj
+
+clean.os2:
+ imakesvc 4 imake imake.exe imake.o /imake.exe
+
+imake.os2: imake.c
+ $(CC) -DBSD43 $(CFLAGS) -o imake.exe imake.c
+ copy imake.exe \\
diff --git a/nx-X11/config/imake/ccimake.c b/nx-X11/config/imake/ccimake.c
new file mode 100644
index 000000000..30524d55f
--- /dev/null
+++ b/nx-X11/config/imake/ccimake.c
@@ -0,0 +1,62 @@
+/* $Xorg: ccimake.c,v 1.4 2001/02/09 02:03:15 xorgcvs Exp $ */
+/*
+
+Copyright (c) 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group .
+
+*/
+/* $XFree86: xc/config/imake/ccimake.c,v 1.2 2001/04/01 13:59:56 tsi Exp $ */
+
+/*
+ * Warning: This file must be kept as simple as possible so that it can
+ * compile without any special flags on all systems. Do not touch it unless
+ * you *really* know what you're doing. Make changes in imakemdep.h, not here.
+ */
+
+#define CCIMAKE /* only get imake_ccflags definitions */
+#include "imakemdep.h" /* things to set when porting imake */
+
+#ifndef imake_ccflags
+# define imake_ccflags "-O"
+#endif
+
+#ifndef CROSSCOMPILEDIR
+# define CROSSCOMPILEDIR ""
+#endif
+
+#define crosscompile_ccflags " -DCROSSCOMPILE "
+#define crosscompiledir_str "-DCROSSCOMPILEDIR="
+
+int
+main()
+{
+ if (CROSSCOMPILEDIR[0] != '\0') {
+ write(1, crosscompiledir_str, sizeof(crosscompiledir_str) - 1);
+ write(1,"\"",1);
+ write(1, CROSSCOMPILEDIR, sizeof(CROSSCOMPILEDIR) - 1);
+ write(1,"\"",1);
+ write(1, crosscompile_ccflags, sizeof(crosscompile_ccflags) - 1);
+ }
+ write(1, imake_ccflags, sizeof(imake_ccflags) - 1);
+ return 0;
+}
+
diff --git a/nx-X11/config/imake/imake.c b/nx-X11/config/imake/imake.c
new file mode 100644
index 000000000..46e03daf2
--- /dev/null
+++ b/nx-X11/config/imake/imake.c
@@ -0,0 +1,2203 @@
+
+/***************************************************************************
+ * *
+ * Porting Note *
+ * *
+ * Add the value of BOOTSTRAPCFLAGS to the cpp_argv table so that it will *
+ * be passed to the template file. *
+ * *
+ ***************************************************************************/
+/* $XFree86: xc/config/imake/imake.c,v 3.63tsi Exp $ */
+
+/*
+ *
+Copyright (c) 1985, 1986, 1987, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+ *
+ * Original Author:
+ * Todd Brunhoff
+ * Tektronix, inc.
+ * While a guest engineer at Project Athena, MIT
+ *
+ * imake: the include-make program.
+ *
+ * Usage: imake [-Idir] [-Ddefine] [-T template] [-f imakefile ] [-C Imakefile.c ] [-s] [-e] [-v] [make flags]
+ *
+ * Imake takes a template file (Imake.tmpl) and a prototype (Imakefile)
+ * and runs cpp on them producing a Makefile. It then optionally runs make
+ * on the Makefile.
+ * Options:
+ * -D define. Same as cpp -D argument.
+ * -U undefine. Same as cpp -U argument.
+ * -W warning. Same as cpp -W argument.
+ * -I Include directory. Same as cpp -I argument.
+ * -T template. Designate a template other
+ * than Imake.tmpl
+ * -f specify the Imakefile file
+ * -C specify the name to use instead of Imakefile.c
+ * -s[F] show. Show the produced makefile on the standard
+ * output. Make is not run is this case. If a file
+ * argument is provided, the output is placed there.
+ * -e[F] execute instead of show; optionally name Makefile F
+ * -v verbose. Show the make command line executed.
+ *
+ * Environment variables:
+ *
+ * IMAKEINCLUDE Include directory to use in addition to "."
+ * IMAKECPP Cpp to use instead of /lib/cpp
+ * IMAKEMAKE make program to use other than what is
+ * found by searching the $PATH variable.
+ * Other features:
+ * imake reads the entire cpp output into memory and then scans it
+ * for occurences of "@@". If it encounters them, it replaces it with
+ * a newline. It also trims any trailing white space on output lines
+ * (because make gets upset at them). This helps when cpp expands
+ * multi-line macros but you want them to appear on multiple lines.
+ * It also changes occurences of "XCOMM" to "#", to avoid problems
+ * with treating commands as invalid preprocessor commands.
+ *
+ * The macros MAKEFILE and MAKE are provided as macros
+ * to make. MAKEFILE is set to imake's makefile (not the constructed,
+ * preprocessed one) and MAKE is set to argv[0], i.e. the name of
+ * the imake program.
+ *
+ * Theory of operation:
+ * 1. Determine the name of the imakefile from the command line (-f)
+ * or from the content of the current directory (Imakefile or imakefile).
+ * Call this <imakefile>. This gets added to the arguments for
+ * make as MAKEFILE=<imakefile>.
+ * 2. Determine the name of the template from the command line (-T)
+ * or the default, Imake.tmpl. Call this <template>
+ * 3. Determine the name of the imakeCfile from the command line (-C)
+ * or the default, Imakefile.c. Call this <imakeCfile>
+ * 4. Store lines of input into <imakeCfile>:
+ * - A c-style comment header (see ImakefileCHeader below), used
+ * to recognize temporary files generated by imake.
+ * - If DEFAULT_OS_NAME is defined, format the utsname struct and
+ * call the result <defaultOsName>. Add:
+ * #define DefaultOSName <defaultOsName>
+ * - If DEFAULT_OS_MAJOR_REV is defined, format the utsname struct
+ * and call the result <defaultOsMajorVersion>. Add:
+ * #define DefaultOSMajorVersion <defaultOsMajorVersion>
+ * - If DEFAULT_OS_MINOR_REV is defined, format the utsname struct
+ * and call the result <defaultOsMinorVersion>. Add:
+ * #define DefaultOSMinorVersion <defaultOsMinorVersion>
+ * - If DEFAULT_OS_TEENY_REV is defined, format the utsname struct
+ * and call the result <defaultOsTeenyVersion>. Add:
+ * #define DefaultOSTeenyVersion <defaultOsTeenyVersion>
+ * - If DEFAULT_MACHINE_ARCITECTURE is defined, format the utsname struct
+ * and define the corresponding macro. (For example on the amiga,
+ * this will define amiga in addition to m68k).
+ * - If the file "localdefines" is readable in the current
+ * directory, print a warning message to stderr and add:
+ * #define IMAKE_LOCAL_DEFINES "localdefines"
+ * #include IMAKE_LOCAL_DEFINES
+ * - If the file "admindefines" is readable in the current
+ * directory, print a warning message to stderr and add:
+ * #define IMAKE_ADMIN_DEFINES "admindefines"
+ * #include IMAKE_ADMIN_DEFINES
+ * - The following lines:
+ * #define INCLUDE_IMAKEFILE < <imakefile> >
+ * #define IMAKE_TEMPLATE " <template> "
+ * #include IMAKE_TEMPLATE
+ * - If the file "adminmacros" is readable in the current
+ * directory, print a warning message to stderr and add:
+ * #define IMAKE_ADMIN_MACROS "adminmacros"
+ * #include IMAKE_ADMIN_MACROS
+ * - If the file "localmacros" is readable in the current
+ * directory, print a warning message to stderr and add:
+ * #define IMAKE_LOCAL_MACROS "localmacros"
+ * #include IMAKE_LOCAL_MACROS
+ * 5. Start up cpp and provide it with this file.
+ * Note that the define for INCLUDE_IMAKEFILE is intended for
+ * use in the template file. This implies that the imake is
+ * useless unless the template file contains at least the line
+ * #include INCLUDE_IMAKEFILE
+ * 6. Gather the output from cpp, and clean it up, expanding @@ to
+ * newlines, stripping trailing white space, cpp control lines,
+ * and extra blank lines, and changing XCOMM to #. This cleaned
+ * output is placed in a new file, default "Makefile", but can
+ * be specified with -s or -e options.
+ * 7. Optionally start up make on the resulting file.
+ *
+ * The design of the template makefile should therefore be:
+ * <set global macros like CFLAGS, etc.>
+ * <include machine dependent additions>
+ * #include INCLUDE_IMAKEFILE
+ * <add any global targets like 'clean' and long dependencies>
+ */
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
+/* This needs to be before _POSIX_SOURCE gets defined */
+# include <sys/param.h>
+# include <sys/types.h>
+# include <sys/sysctl.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef MONOLITH
+# include "Xosdefs.h"
+#else
+# include <X11/Xosdefs.h>
+#endif
+#include <string.h>
+#include <ctype.h>
+#ifdef WIN32
+# include "Xw32defs.h"
+#endif
+#if 0
+#ifndef X_NOT_POSIX
+# ifndef _POSIX_SOURCE
+# define _POSIX_SOURCE
+# endif
+#endif
+#endif
+#include <sys/types.h>
+#include <fcntl.h>
+#ifdef X_NOT_POSIX
+# ifndef WIN32
+# include <sys/file.h>
+# endif
+#else
+# include <unistd.h>
+#endif
+#ifdef ISC
+# include <unistd.h>
+#endif
+#if defined(X_NOT_POSIX) || defined(_POSIX_SOURCE)
+# include <signal.h>
+#else
+# define _POSIX_SOURCE
+# include <signal.h>
+# undef _POSIX_SOURCE
+#endif
+#if !defined(SIGCHLD) && defined(SIGCLD)
+# define SIGCHLD SIGCLD
+#endif
+#include <sys/stat.h>
+#ifndef X_NOT_POSIX
+# ifdef _POSIX_SOURCE
+# ifdef __SCO__
+# include <sys/procset.h>
+# include <sys/siginfo.h>
+# endif
+# include <sys/wait.h>
+# else
+# define _POSIX_SOURCE
+# include <sys/wait.h>
+# undef _POSIX_SOURCE
+# endif
+# define waitCode(w) WEXITSTATUS(w)
+# define waitSig(w) WTERMSIG(w)
+typedef int waitType;
+#else /* X_NOT_POSIX */
+# ifdef SYSV
+# define waitCode(w) (((w) >> 8) & 0x7f)
+# define waitSig(w) ((w) & 0xff)
+typedef int waitType;
+# else /* SYSV */
+# ifdef WIN32
+# include <process.h>
+typedef int waitType;
+# else
+# include <sys/wait.h>
+# define waitCode(w) ((w).w_T.w_Retcode)
+# define waitSig(w) ((w).w_T.w_Termsig)
+typedef union wait waitType;
+# endif
+# endif
+# ifndef WIFSIGNALED
+# define WIFSIGNALED(w) waitSig(w)
+# endif
+# ifndef WIFEXITED
+# define WIFEXITED(w) waitCode(w)
+# endif
+#endif /* X_NOT_POSIX */
+# include <stdlib.h>
+#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
+char *malloc(), *realloc();
+#endif /* macII */
+#include <errno.h>
+#ifdef __minix_vmd
+#define USE_FREOPEN 1
+#endif
+
+#if !((defined(sun) && !defined(SVR4)) || defined(macII))
+#define USE_STRERROR 1
+#endif
+#ifndef WIN32
+#include <sys/utsname.h>
+#else
+#include <windows.h>
+#endif
+#ifndef SYS_NMLN
+# ifdef _SYS_NMLN
+# define SYS_NMLN _SYS_NMLN
+# else
+# define SYS_NMLN 257
+# endif
+#endif
+#if defined(linux) || defined(__GNU__) || defined(__GLIBC__)
+#include <limits.h>
+#include <stdio.h>
+#endif
+#ifdef __QNX__
+#include <unix.h>
+#endif
+
+/*
+ * This define of strerror is copied from (and should be identical to)
+ * Xos.h, which we don't want to include here for bootstrapping reasons.
+ */
+#ifndef USE_STRERROR
+# ifndef strerror
+extern char *sys_errlist[];
+extern int sys_nerr;
+# define strerror(n) \
+ (((n) >= 0 && (n) < sys_nerr) ? sys_errlist[n] : "unknown error")
+# endif
+#endif
+
+#if defined(__NetBSD__) /* see code clock in init() below */
+#include <sys/utsname.h>
+#endif
+
+#if !(defined(Lynx) || defined(__Lynx__) || (defined(SVR4) && !defined(sun))) && !defined (__CYGWIN__)
+#define HAS_MKSTEMP
+#endif
+
+typedef unsigned char boolean;
+#define TRUE 1
+#define FALSE 0
+
+# include "imakemdep.h"
+#ifdef CROSSCOMPILE
+# include "imakemdep_cpp.h"
+#endif
+
+#if defined CROSSCOMPILE || defined FIXUP_CPP_WHITESPACE
+int InRule = FALSE;
+#endif
+#if defined CROSSCOMPILE || defined INLINE_SYNTAX
+int InInline = 0;
+#endif
+#if defined CROSSCOMPILE || defined MAGIC_MAKE_VARS
+int xvariable = 0;
+int xvariables[10];
+#endif
+
+#ifndef PATH_MAX
+#define PATH_MAX 1024
+#endif
+
+/*
+ * Some versions of cpp reduce all tabs in macro expansion to a single
+ * space. In addition, the escaped newline may be replaced with a
+ * space instead of being deleted. Blech.
+ */
+void KludgeOutputLine(char **), KludgeResetRule(void);
+
+#ifndef CROSSCOMPILE
+# ifdef USE_CC_E
+# ifndef DEFAULT_CC
+# define DEFAULT_CC "cc"
+# endif
+# else
+# ifndef DEFAULT_CPP
+# ifdef CPP_PROGRAM
+# define DEFAULT_CPP CPP_PROGRAM
+# else
+# define DEFAULT_CPP "/lib/cpp"
+# endif
+# endif
+# endif
+#endif
+
+char *cpp = NULL;
+
+char *tmpMakefile = "/tmp/Imf.XXXXXX";
+char *tmpImakefile = "/tmp/IIf.XXXXXX";
+char *make_argv[ ARGUMENTS ] = {
+#ifdef WIN32
+ "nmake"
+#else
+ "make"
+#endif
+};
+
+int make_argindex;
+int cpp_argindex;
+char *Imakefile = NULL;
+char *Makefile = "Makefile";
+char *Template = "Imake.tmpl";
+char *ImakefileC = "Imakefile.c";
+boolean haveImakefileC = FALSE;
+char *cleanedImakefile = NULL;
+char *program;
+char *FindImakefile(char *Imakefile);
+char *ReadLine(FILE *tmpfd, char *tmpfname);
+char *CleanCppInput(char *imakefile);
+char *Strdup(char *cp);
+char *Emalloc(int size);
+void LogFatalI(char *s, int i), LogFatal(char *x0, char *x1),
+ LogMsg(char *x0, char *x1);
+
+void showit(FILE *fd);
+void wrapup(void);
+void init(void);
+void AddMakeArg(char *arg);
+void AddCppArg(char *arg);
+#ifdef CROSSCOMPILE
+char *CrossCompileCPP(void);
+#endif
+void SetOpts(int argc, char **argv);
+void CheckImakefileC(char *masterc);
+void cppit(char *imakefile, char *template, char *masterc,
+ FILE *outfd, char *outfname);
+void makeit(void);
+void CleanCppOutput(FILE *tmpfd, char *tmpfname);
+boolean isempty(char *line);
+void writetmpfile(FILE *fd, char *buf, int cnt, char *fname);
+#ifdef SIGNALRETURNSINT
+int catch(int sig);
+#else
+void catch(int sig);
+#endif
+void showargs(char **argv);
+boolean optional_include(FILE *inFile, char *defsym, char *fname);
+void doit(FILE *outfd, char *cmd, char **argv);
+boolean define_os_defaults(FILE *inFile);
+#ifdef CROSSCOMPILE
+static void get_cross_compile_dir(FILE *inFile);
+#endif
+#ifdef CROSSCOMPILEDIR
+char *CrossCompileDir = CROSSCOMPILEDIR;
+#else
+char *CrossCompileDir = "";
+#endif
+boolean CrossCompiling = FALSE;
+
+
+
+boolean verbose = FALSE;
+boolean show = TRUE;
+
+int
+main(int argc, char *argv[])
+{
+ FILE *tmpfd = NULL;
+ char makeMacro[ BUFSIZ ];
+ char makefileMacro[ BUFSIZ ];
+ int lenCrossCompileDir = 0;
+
+ program = argv[0];
+ init();
+
+ lenCrossCompileDir = strlen(CrossCompileDir);
+ if (lenCrossCompileDir) {
+ if (lenCrossCompileDir > (PATH_MAX - 20))
+ LogFatal("Cross compile directory path too long %s\n",
+ CrossCompileDir);
+ else
+ CrossCompiling = TRUE;
+ }
+
+ SetOpts(argc, argv);
+ Imakefile = FindImakefile(Imakefile);
+ CheckImakefileC(ImakefileC);
+ if (Makefile) {
+ tmpMakefile = Makefile;
+ if ((tmpfd = fopen(tmpMakefile, "w+")) == NULL)
+ LogFatal("Cannot create temporary file %s.", tmpMakefile);
+ } else {
+#ifdef HAS_MKSTEMP
+ int fd;
+#endif
+ tmpMakefile = Strdup(tmpMakefile);
+#ifndef HAS_MKSTEMP
+ if (mktemp(tmpMakefile) == NULL ||
+ (tmpfd = fopen(tmpMakefile, "w+")) == NULL) {
+ LogFatal("Cannot create temporary file %s.", tmpMakefile);
+ }
+#else
+ fd = mkstemp(tmpMakefile);
+ if (fd == -1 || (tmpfd = fdopen(fd, "w+")) == NULL) {
+ if (fd != -1) {
+ unlink(tmpMakefile); close(fd);
+ }
+ LogFatal("Cannot create temporary file %s.", tmpMakefile);
+ }
+#endif
+ }
+ AddMakeArg("-f");
+ AddMakeArg( tmpMakefile );
+ sprintf(makeMacro, "MAKE=%s", program);
+ AddMakeArg( makeMacro );
+ sprintf(makefileMacro, "MAKEFILE=%s", Imakefile);
+ AddMakeArg( makefileMacro );
+
+ cleanedImakefile = CleanCppInput(Imakefile);
+ cppit(cleanedImakefile, Template, ImakefileC, tmpfd, tmpMakefile);
+
+ if (show) {
+ if (Makefile == NULL)
+ showit(tmpfd);
+ } else
+ makeit();
+ wrapup();
+ exit(0);
+}
+
+void
+showit(FILE *fd)
+{
+ char buf[ BUFSIZ ];
+ int red;
+
+ fseek(fd, 0, 0);
+ while ((red = fread(buf, 1, BUFSIZ, fd)) > 0)
+ writetmpfile(stdout, buf, red, "stdout");
+ if (red < 0)
+ LogFatal("Cannot read %s.", tmpMakefile);
+}
+
+void
+wrapup(void)
+{
+ if (tmpMakefile != Makefile)
+ unlink(tmpMakefile);
+ if (cleanedImakefile && cleanedImakefile != Imakefile)
+ unlink(cleanedImakefile);
+ if (haveImakefileC)
+ unlink(ImakefileC);
+}
+
+#ifdef SIGNALRETURNSINT
+int
+#else
+void
+#endif
+catch(int sig)
+{
+ errno = 0;
+ LogFatalI("Signal %d.", sig);
+}
+
+/*
+ * Initialize some variables.
+ */
+void
+init(void)
+{
+ register char *p;
+
+ make_argindex=0;
+ while (make_argv[ make_argindex ] != NULL)
+ make_argindex++;
+ cpp_argindex = 0;
+ while (cpp_argv[ cpp_argindex ] != NULL)
+ cpp_argindex++;
+
+#if defined CROSSCOMPILE
+ if (sys == netBSD)
+ if (CrossCompiling) {
+ LogFatal("fix imake to do crosscompiling for NetBSD\n","");
+ } else
+#endif
+#if defined(__NetBSD__) || defined CROSSCOMPILE
+ {
+ struct utsname uts;
+ static char argument[512];
+
+ /*
+ * Sharable imake configurations require a
+ * machine identifier.
+ */
+ if (uname(&uts) != 0)
+ LogFatal("uname(3) failed; can't tell what %s",
+ "kind of machine you have.");
+
+ memset(argument, 0, sizeof(argument));
+ (void)snprintf(argument, sizeof(argument) - 1,
+ "-D__%s__", uts.machine);
+
+ AddCppArg(argument);
+ }
+#endif /* __NetBSD__ */
+
+ /*
+ * See if the standard include directory is different than
+ * the default. Or if cpp is not the default. Or if the make
+ * found by the PATH variable is not the default.
+ */
+ if ((p = getenv("IMAKEINCLUDE"))) {
+ if (*p != '-' || *(p+1) != 'I')
+ LogFatal("Environment var IMAKEINCLUDE %s",
+ "must begin with -I");
+ AddCppArg(p);
+ for (; *p; p++)
+ if (*p == ' ') {
+ *p++ = '\0';
+ AddCppArg(p);
+ }
+ }
+ if ((p = getenv("IMAKECPP")))
+ cpp = p;
+ if ((p = getenv("IMAKEMAKE")))
+ make_argv[0] = p;
+
+ if (signal(SIGINT, SIG_IGN) != SIG_IGN)
+ signal(SIGINT, catch);
+#ifdef SIGCHLD
+ signal(SIGCHLD, SIG_DFL);
+#endif
+}
+
+void
+AddMakeArg(char *arg)
+{
+ errno = 0;
+ if (make_argindex >= ARGUMENTS-1)
+ LogFatal("Out of internal storage.", "");
+ make_argv[ make_argindex++ ] = arg;
+ make_argv[ make_argindex ] = NULL;
+}
+
+void
+AddCppArg(char *arg)
+{
+ errno = 0;
+ if (cpp_argindex >= ARGUMENTS-1)
+ LogFatal("Out of internal storage.", "");
+ cpp_argv[ cpp_argindex++ ] = arg;
+ cpp_argv[ cpp_argindex ] = NULL;
+}
+
+void
+SetOpts(int argc, char **argv)
+{
+
+ errno = 0;
+ /*
+ * Now gather the arguments for make
+ */
+ for(argc--, argv++; argc; argc--, argv++) {
+ /*
+ * We intercept these flags.
+ */
+ if (argv[0][0] == '-') {
+ if (argv[0][1] == 'D') {
+ AddCppArg(argv[0]);
+ } else if (argv[0][1] == 'I') {
+ AddCppArg(argv[0]);
+ } else if (argv[0][1] == 'U') {
+ AddCppArg(argv[0]);
+ } else if (argv[0][1] == 'W') {
+ AddCppArg(argv[0]);
+ } else if (argv[0][1] == 'f') {
+ if (argv[0][2])
+ Imakefile = argv[0]+2;
+ else {
+ argc--, argv++;
+ if (! argc)
+ LogFatal("No description arg after -f flag", "");
+ Imakefile = argv[0];
+ }
+ } else if (argv[0][1] == 's') {
+ if (argv[0][2])
+ Makefile = ((argv[0][2] == '-') && !argv[0][3]) ?
+ NULL : argv[0]+2;
+ else {
+ argc--, argv++;
+ if (!argc)
+ LogFatal("No description arg after -s flag", "");
+ Makefile = ((argv[0][0] == '-') && !argv[0][1]) ?
+ NULL : argv[0];
+ }
+ show = TRUE;
+ } else if (argv[0][1] == 'e') {
+ Makefile = (argv[0][2] ? argv[0]+2 : NULL);
+ show = FALSE;
+ } else if (argv[0][1] == 'T') {
+ if (argv[0][2])
+ Template = argv[0]+2;
+ else {
+ argc--, argv++;
+ if (! argc)
+ LogFatal("No description arg after -T flag", "");
+ Template = argv[0];
+ }
+ } else if (argv[0][1] == 'C') {
+ if (argv[0][2])
+ ImakefileC = argv[0]+2;
+ else {
+ argc--, argv++;
+ if (! argc)
+ LogFatal("No imakeCfile arg after -C flag", "");
+ ImakefileC = argv[0];
+ }
+ } else if (argv[0][1] == 'v') {
+ verbose = TRUE;
+ } else
+ AddMakeArg(argv[0]);
+ } else
+ AddMakeArg(argv[0]);
+ }
+
+#ifndef CROSSCOMPILE
+# ifdef USE_CC_E
+ if (!cpp)
+ {
+ AddCppArg("-E");
+#ifdef __GNUC__
+ if (verbose)
+ AddCppArg("-v");
+#endif
+ cpp = DEFAULT_CC;
+ }
+# else
+ if (!cpp)
+ cpp = DEFAULT_CPP;
+# endif
+#else
+ if (!cpp)
+ cpp = CrossCompileCPP();
+#endif
+
+ cpp_argv[0] = cpp;
+ AddCppArg(ImakefileC);
+}
+
+char *
+FindImakefile(char *Imakefile)
+{
+ if (Imakefile) {
+ if (access(Imakefile, R_OK) < 0)
+ LogFatal("Cannot find %s.", Imakefile);
+ } else {
+ if (access("Imakefile", R_OK) < 0) {
+ if (access("imakefile", R_OK) < 0)
+ LogFatal("No description file.", "");
+ else
+ Imakefile = "imakefile";
+ } else
+ Imakefile = "Imakefile";
+ }
+ return(Imakefile);
+}
+
+void
+LogFatalI(char *s, int i)
+{
+ /*NOSTRICT*/
+ LogFatal(s, (char *)(long)i);
+}
+
+void
+LogFatal(char *x0, char *x1)
+{
+ static boolean entered = FALSE;
+
+ if (entered)
+ return;
+ entered = TRUE;
+
+ LogMsg(x0, x1);
+ fprintf(stderr, " Stop.\n");
+ wrapup();
+ exit(1);
+}
+
+void
+LogMsg(char *x0, char *x1)
+{
+ int error_number = errno;
+
+ if (error_number) {
+ fprintf(stderr, "%s: ", program);
+ fprintf(stderr, "%s\n", strerror(error_number));
+ }
+ fprintf(stderr, "%s: ", program);
+ fprintf(stderr, x0, x1);
+ fprintf(stderr, "\n");
+}
+
+void
+showargs(char **argv)
+{
+ for (; *argv; argv++)
+ fprintf(stderr, "%s ", *argv);
+ fprintf(stderr, "\n");
+}
+
+#define ImakefileCHeader "/* imake - temporary file */"
+
+void
+CheckImakefileC(char *masterc)
+{
+ char mkcbuf[1024];
+ FILE *inFile;
+
+ if (access(masterc, F_OK) == 0) {
+ inFile = fopen(masterc, "r");
+ if (inFile == NULL)
+ LogFatal("Refuse to overwrite: %s", masterc);
+ if ((fgets(mkcbuf, sizeof(mkcbuf), inFile) &&
+ strncmp(mkcbuf, ImakefileCHeader,
+ sizeof(ImakefileCHeader)-1)))
+ {
+ fclose(inFile);
+ LogFatal("Refuse to overwrite: %s", masterc);
+ }
+ fclose(inFile);
+ }
+}
+
+#define LocalDefineFmt "#define %s \"%s\"\n"
+#define IncludeFmt "#include %s\n"
+#define ImakeDefSym "INCLUDE_IMAKEFILE"
+#define ImakeTmplSym "IMAKE_TEMPLATE"
+#define OverrideWarning "Warning: local file \"%s\" overrides global macros."
+
+boolean
+optional_include(FILE *inFile, char *defsym, char *fname)
+{
+ errno = 0;
+ if (access(fname, R_OK) == 0) {
+ LogMsg(OverrideWarning, fname);
+ return (fprintf(inFile, LocalDefineFmt, defsym, fname) < 0 ||
+ fprintf(inFile, IncludeFmt, defsym) < 0);
+ }
+ return FALSE;
+}
+
+void
+doit(FILE *outfd, char *cmd, char **argv)
+{
+ int pid;
+ waitType status;
+
+ /*
+ * Fork and exec the command.
+ */
+#ifdef WIN32
+ if (outfd)
+ dup2(fileno(outfd), 1);
+ status = _spawnvp(_P_WAIT, cmd, argv);
+ if (status < 0)
+ LogFatal("Cannot spawn %s.", cmd);
+ if (status > 0)
+ LogFatalI("Exit code %d.", status);
+#else
+ pid = fork();
+ if (pid < 0)
+ LogFatal("Cannot fork.", "");
+ if (pid) { /* parent... simply wait */
+ while (wait(&status) > 0) {
+ errno = 0;
+ if (WIFSIGNALED(status))
+ LogFatalI("Signal %d.", waitSig(status));
+ if (WIFEXITED(status) && waitCode(status))
+ LogFatalI("Exit code %d.", waitCode(status));
+ }
+ }
+ else { /* child... dup and exec cmd */
+ if (verbose)
+ showargs(argv);
+ if (outfd)
+ dup2(fileno(outfd), 1);
+ execvp(cmd, argv);
+ LogFatal("Cannot exec %s.", cmd);
+ }
+#endif
+}
+
+#if !defined WIN32
+static void
+parse_utsname(struct utsname *name, char *fmt, char *result, char *msg)
+{
+ char buf[SYS_NMLN * 5 + 1];
+ char *ptr = buf;
+ int arg;
+
+ if (!name)
+ LogFatal(msg,fmt);
+
+ /* Assemble all the pieces into a buffer. */
+ for (arg = 0; fmt[arg] != ' '; arg++)
+ {
+ /* Our buffer is only guaranteed to hold 5 arguments. */
+ if (arg >= 5)
+ LogFatal(msg, fmt);
+
+ switch (fmt[arg])
+ {
+ case 's':
+ if (arg > 0)
+ *ptr++ = ' ';
+ strcpy(ptr, name->sysname);
+ ptr += strlen(ptr);
+ break;
+
+ case 'n':
+ if (arg > 0)
+ *ptr++ = ' ';
+ strcpy(ptr, name->nodename);
+ ptr += strlen(ptr);
+ break;
+
+ case 'r':
+ if (arg > 0)
+ *ptr++ = ' ';
+ strcpy(ptr, name->release);
+ ptr += strlen(ptr);
+ break;
+
+ case 'v':
+ if (arg > 0)
+ *ptr++ = ' ';
+ strcpy(ptr, name->version);
+ ptr += strlen(ptr);
+ break;
+
+ case 'm':
+ if (arg > 0)
+ *ptr++ = ' ';
+ strcpy(ptr, name->machine);
+ ptr += strlen(ptr);
+ break;
+
+ default:
+ LogFatal(msg, fmt);
+ }
+ }
+
+ /* Just in case... */
+ if (strlen(buf) >= sizeof(buf))
+ LogFatal("Buffer overflow parsing uname.", "");
+
+ /* Parse the buffer. The sscanf() return value is rarely correct. */
+ *result = '\0';
+ (void) sscanf(buf, fmt + arg + 1, result);
+}
+
+/* Trim leading 0's and periods from version names. The 0's cause
+ the number to be interpreted as octal numbers. Some version strings
+ have the potential for different numbers of .'s in them.
+ */
+
+static char *
+trim_version(char *p)
+{
+
+ if (p != 0 && *p != '\0')
+ {
+ while ((*p == '0' || *p == '.') && *(p + 1) != '\0')
+ ++p;
+ }
+ return (p);
+}
+#endif
+
+#if defined(linux) || defined(__GLIBC__)
+const char *libc_c=
+"#include <stdio.h>\n"
+"#include <ctype.h>\n"
+"\n"
+"#if 1\n"
+"#pragma weak gnu_get_libc_version\n"
+"#pragma weak __libc_version\n"
+"#pragma weak __linux_C_lib_version\n"
+"#endif\n"
+"\n"
+"extern const char * gnu_get_libc_version (void);\n"
+"extern const char * __linux_C_lib_version;\n"
+"extern const char __libc_version [];\n"
+"\n"
+"int\n"
+"main ()\n"
+"{\n"
+" int libcmajor = 0, libcminor = 0, libcteeny = 0;\n"
+" const char * ptr = NULL;\n"
+" int glibcmajor = 0;\n"
+"\n"
+" if (gnu_get_libc_version != 0)\n"
+" {\n"
+" ptr = gnu_get_libc_version ();\n"
+" glibcmajor = 4;\n"
+" }\n"
+" else if (&__libc_version != 0)\n"
+" {\n"
+" ptr = __libc_version;\n"
+" glibcmajor = 4;\n"
+" }\n"
+" else if (&__linux_C_lib_version != 0)\n"
+" {\n"
+" ptr = __linux_C_lib_version;\n"
+" }\n"
+" else\n"
+" {\n"
+" libcmajor = 0; libcminor = 0; libcteeny = 0;\n"
+" }\n"
+"\n"
+" if (ptr)\n"
+" {\n"
+" while (!isdigit (*ptr))\n"
+" ptr++;\n"
+"\n"
+" sscanf (ptr, \"%d.%d.%d\", &libcmajor, &libcminor, &libcteeny);\n"
+" libcmajor += glibcmajor;\n"
+" }\n"
+"\n"
+" printf(\"#define DefaultLinuxCLibMajorVersion %d\\n\", libcmajor);\n"
+" printf(\"#define DefaultLinuxCLibMinorVersion %d\\n\", libcminor);\n"
+" printf(\"#define DefaultLinuxCLibTeenyVersion %d\\n\", libcteeny);\n"
+"\n"
+" return 0;\n"
+"}\n"
+;
+
+static void
+get_libc_version(FILE *inFile)
+{
+ char aout[] = "/tmp/imakeXXXXXX";
+ FILE *fp;
+ const char *format = "%s -o %s -x c -";
+ char *cc;
+ int len;
+ char *command;
+
+ /* Pre-create temp file safely */
+ {
+ /* Linux + ELF has mkstemp() */
+ int tmpfd;
+ if ((tmpfd = mkstemp(aout)) == -1) {
+ perror("mkstemp");
+ abort();
+ }
+ close(tmpfd);
+ }
+ cc = getenv ("CC");
+ if (cc == NULL)
+ cc = "gcc";
+ len = strlen (aout) + strlen (format) + strlen (cc);
+ if (len < 128) len = 128;
+ command = alloca (len);
+
+ if (snprintf (command , len, format, cc, aout) == len)
+ abort ();
+
+ fp = popen (command, "w");
+ if (fp == NULL || fprintf (fp, "%s\n", libc_c) < 0
+ || pclose (fp) != 0)
+ abort ();
+
+ fp = popen (aout, "r");
+ if (fp == NULL)
+ abort ();
+
+ while (fgets (command, len, fp))
+ fprintf (inFile, command);
+
+ len = pclose (fp);
+ remove (aout);
+ if (len)
+ abort ();
+}
+#endif
+
+#if defined(__OpenBSD__) || defined(__DragonFly__)
+static void
+get_stackprotector(FILE *inFile)
+{
+ FILE *fp;
+ char *cc;
+ char command[1024], buf[1024];
+
+ cc = getenv("CC");
+ if (cc == NULL) {
+ cc = "cc";
+ }
+ snprintf(command, sizeof(command), "%s -v 2>&1", cc);
+ fp = popen(command, "r");
+ if (fp == NULL)
+ abort();
+ while (fgets(buf, sizeof(buf), fp)) {
+ if (strstr(buf, "propolice") != NULL) {
+ fprintf(inFile, "#define ProPoliceSupport YES\n");
+ break;
+ }
+ }
+ if (pclose(fp))
+ abort();
+}
+#endif
+
+
+#if defined CROSSCOMPILE || defined linux || defined(__GLIBC__)
+static void
+get_distrib(FILE *inFile)
+{
+ struct stat sb;
+
+ static char* suse = "/etc/SuSE-release";
+ static char* redhat = "/etc/redhat-release";
+ static char* debian = "/etc/debian_version";
+
+ fprintf (inFile, "%s\n", "#define LinuxUnknown 0");
+ fprintf (inFile, "%s\n", "#define LinuxSuSE 1");
+ fprintf (inFile, "%s\n", "#define LinuxCaldera 2");
+ fprintf (inFile, "%s\n", "#define LinuxCraftworks 3");
+ fprintf (inFile, "%s\n", "#define LinuxDebian 4");
+ fprintf (inFile, "%s\n", "#define LinuxInfoMagic 5");
+ fprintf (inFile, "%s\n", "#define LinuxKheops 6");
+ fprintf (inFile, "%s\n", "#define LinuxPro 7");
+ fprintf (inFile, "%s\n", "#define LinuxRedHat 8");
+ fprintf (inFile, "%s\n", "#define LinuxSlackware 9");
+ fprintf (inFile, "%s\n", "#define LinuxTurbo 10");
+ fprintf (inFile, "%s\n", "#define LinuxWare 11");
+ fprintf (inFile, "%s\n", "#define LinuxYggdrasil 12");
+
+#ifdef CROSSCOMPILE
+ if (CrossCompiling) {
+ fprintf (inFile, "%s\n",
+ "#define DefaultLinuxDistribution LinuxUnknown");
+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistName Unknown");
+ return;
+ }
+#endif
+ if (lstat (suse, &sb) == 0) {
+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxSuSE");
+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistName SuSE");
+ return;
+ }
+ if (lstat (redhat, &sb) == 0) {
+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxRedHat");
+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistName RedHat");
+ return;
+ }
+ if (lstat (debian, &sb) == 0) {
+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxDebian");
+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistName Debian");
+ /* You could also try to get the version of the Debian distrib by looking
+ * at the content of /etc/debian_version */
+ return;
+ }
+ /* what's the definitive way to tell what any particular distribution is? */
+
+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistribution LinuxUnknown");
+ fprintf (inFile, "%s\n", "#define DefaultLinuxDistName Unknown");
+ /* would like to know what version of the distribution it is */
+}
+
+static void
+get_ld_version(FILE *inFile)
+{
+ FILE* ldprog;
+ signed char c;
+ int ldmajor, ldminor;
+ const char *ld = "ld -v";
+
+#ifdef CROSSCOMPILE
+ if (CrossCompiling) {
+ char cmd[PATH_MAX];
+ strcpy (cmd, CrossCompileDir);
+ strcat (cmd,"/");
+ strcat (cmd,ld);
+ ldprog = popen (cmd, "r");
+ } else
+#endif
+ ldprog = popen (ld, "r");
+
+ if (ldprog) {
+ do {
+ c = fgetc (ldprog);
+ } while (c != EOF && !isdigit (c));
+ ungetc (c, ldprog);
+ (void) fscanf (ldprog, "%d.%d", &ldmajor, &ldminor);
+ /* Start conversion to a more rational number */
+ if ((ldmajor > 2) || ((ldmajor == 2) && (ldminor > 9)))
+ ldmajor *= 100;
+ else
+ ldmajor *= 10;
+
+ fprintf(inFile, "#define DefaultLinuxBinUtilsMajorVersion %d\n",
+ ldmajor + ldminor);
+ pclose (ldprog);
+ }
+}
+#endif
+
+#if defined __FreeBSD__
+static void
+get_binary_format(FILE *inFile)
+{
+ int mib[2];
+ size_t len;
+ int osrel = 0;
+ FILE *objprog = NULL;
+ int iself = 0;
+ char buf[10];
+ char cmd[PATH_MAX];
+
+ mib[0] = CTL_KERN;
+ mib[1] = KERN_OSRELDATE;
+ len = sizeof(osrel);
+ sysctl(mib, 2, &osrel, &len, NULL, 0);
+ if (CrossCompiling) {
+ strcpy (cmd, CrossCompileDir);
+ strcat (cmd, "/");
+ strcat (cmd,"objformat");
+ } else
+ strcpy (cmd, "objformat");
+
+ if (osrel >= 300004 &&
+ (objprog = popen(cmd, "r")) != NULL &&
+ fgets(buf, sizeof(buf), objprog) != NULL &&
+ strncmp(buf, "elf", 3) == 0)
+ iself = 1;
+ if (objprog)
+ pclose(objprog);
+
+ fprintf(inFile, "#define DefaultToElfFormat %s\n", iself ? "YES" : "NO");
+}
+#endif
+
+#if defined(sun) && defined(__SVR4)
+/* Runs Sun compiler command and parses output - this is a bit of a hack
+ * as it depends on the particular output format of the -V flag, but it's
+ * worked for many releases.
+ *
+ * Input : cmd - command to run (called with -V flag)
+ * path - path to command to run (use $PATH if NULL)
+ * Output: cmajor & cminor - major and minor versions if found
+ * Returns: 0 if successful, -1 if not.
+ */
+static int
+ask_sun_compiler_for_versions(const char *cmd, const char *path,
+ int *cmajor, int *cminor)
+{
+ char buf[BUFSIZ];
+ char cmdtorun[PATH_MAX];
+ char* vptr;
+ FILE* ccproc;
+ const char vflag[] = " -V 2>&1";
+ int retval = -1;
+
+ int len = strlen(cmd) + sizeof(vflag);
+
+ if (path != NULL) {
+ len += strlen(path) + 1;
+ }
+
+ if (len < sizeof(cmdtorun)) {
+ if (path != NULL) {
+ sprintf(cmdtorun, "%s/%s %s", path, cmd, vflag);
+ } else {
+ sprintf(cmdtorun, "%s %s", cmd, vflag);
+ }
+
+ if ((ccproc = popen (cmdtorun, "r")) != NULL) {
+ if (fgets (buf, sizeof(buf), ccproc) != NULL) {
+ vptr = strrchr (buf, 'C');
+ if (vptr) {
+ for (; (*vptr != '\0') && !isdigit(*vptr); vptr++) {
+ /* Do nothing - just scanning for first digit */
+ }
+ if (*vptr != '\0') {
+ if (sscanf (vptr, "%d.%d", cmajor, cminor) == 2) {
+ retval = 0;
+ }
+ }
+ }
+ if (retval != 0) {
+ fprintf(stderr,
+ "warning: could not parse version number in output of:\n"
+ " %s\n", cmdtorun);
+ }
+ while (fgets (buf, sizeof(buf), ccproc) != NULL) {};
+ }
+ pclose (ccproc);
+ }
+ }
+ return retval;
+}
+
+/* Find Sun compilers and their versions if present */
+static void
+get_sun_compiler_versions (FILE *inFile)
+{
+ const char* sunpro_path = "/opt/SUNWspro/bin";
+ int cmajor, cminor, found = 0;
+ struct stat sb;
+
+ /* If cross-compiling, only check CrossCompilerDir for compilers.
+ * If not cross-compiling, first check cc in users $PATH,
+ * then try /opt/SUNWspro if not found in the users $PATH
+ */
+
+#if defined CROSSCOMPILE
+ if (CrossCompiling) {
+ if (ask_sun_compiler_for_versions("cc", CrossCompileDir,
+ &cmajor, &cminor) == 0) {
+ found = 1;
+ }
+ }
+ else
+#endif
+ {
+ if (ask_sun_compiler_for_versions("cc", NULL, &cmajor, &cminor) == 0) {
+ found = 1;
+ } else if (ask_sun_compiler_for_versions("cc", sunpro_path,
+ &cmajor, &cminor) == 0) {
+ found = 1;
+ fprintf(inFile, "#define DefaultSunProCCompilerDir %s", sunpro_path);
+ }
+ }
+
+ if (found) {
+ fprintf (inFile,
+ "#define DefaultSunProCCompilerMajorVersion %d\n", cmajor);
+ fprintf (inFile,
+ "#define DefaultSunProCCompilerMinorVersion %d\n", cminor);
+ }
+
+ /* Now do it again for C++ compiler (CC) */
+ found = 0;
+#if defined CROSSCOMPILE
+ if (CrossCompiling) {
+ if (ask_sun_compiler_for_versions("CC", CrossCompileDir,
+ &cmajor, &cminor) == 0) {
+ found = 1;
+ }
+ }
+ else
+#endif
+ {
+ if (ask_sun_compiler_for_versions("CC", NULL, &cmajor, &cminor) == 0) {
+ found = 1;
+ } else if (ask_sun_compiler_for_versions("CC", sunpro_path,
+ &cmajor, &cminor) == 0) {
+ found = 1;
+ fprintf(inFile,
+ "#define DefaultSunProCplusplusCompilerDir %s", sunpro_path);
+ }
+ }
+
+ if (found) {
+ fprintf (inFile,
+ "#define DefaultSunProCplusplusCompilerMajorVersion %d\n",
+ cmajor);
+ fprintf (inFile,
+ "#define DefaultSunProCplusplusCompilerMinorVersion %d\n",
+ cminor);
+ }
+}
+#endif
+
+#if defined CROSSCOMPILE || defined __GNUC__
+static void
+get_gcc_version(FILE *inFile, char *name)
+{
+ fprintf (inFile, "#define HasGcc 1\n");
+#ifdef CROSSCOMPILE
+ if (CrossCompiling)
+ {
+ if (gnu_c > 1) {
+ fprintf (inFile, "#define HasGcc2 1\n");
+ if (gnu_c > 2)
+ fprintf (inFile, "#define HasGcc3 1\n");
+ }
+ fprintf (inFile, "#define GccMajorVersion %d\n", gnu_c);
+ fprintf (inFile, "#define GccMinorVersion %d\n", gnu_c_minor);
+ } else
+#endif
+ {
+#if __GNUC__ > 1
+ fprintf (inFile, "#define HasGcc2 1\n");
+# if __GNUC__ > 2
+ fprintf (inFile, "#define HasGcc3 1\n");
+# endif
+#endif
+ fprintf (inFile, "#define GccMajorVersion %d\n", __GNUC__);
+ fprintf (inFile, "#define GccMinorVersion %d\n", __GNUC_MINOR__);
+ }
+#if defined(HAS_MERGE_CONSTANTS)
+ fprintf (inFile, "#define HasGccMergeConstants %d\n", HAS_MERGE_CONSTANTS);
+#endif
+}
+#endif
+
+static boolean
+get_gcc(char *cmd)
+{
+ struct stat sb;
+ static char* gcc_path[] = {
+# if defined(linux) || \
+ defined(__NetBSD__) || \
+ defined(__OpenBSD__) || \
+ defined(__FreeBSD__) || \
+ defined(__DragonFly__) || \
+ defined(__APPLE__) || \
+ defined(__CYGWIN__) || \
+ defined(__MINGW32__) || \
+ defined(__GNU__) || \
+ defined(__GLIBC__)
+ "/usr/bin/cc", /* for Linux PostIncDir */
+# endif
+ "/usr/local/bin/gcc",
+ "/opt/gnu/bin/gcc",
+ "/usr/pkg/bin/gcc"
+ };
+
+#ifdef CROSSCOMPILE
+ static char* cross_cc_name[] = {
+ "cc",
+ "gcc"
+ };
+
+ if (CrossCompiling) {
+ int i;
+ for (i = 0; i < sizeof (cross_cc_name) / sizeof cross_cc_name[0]; i++){
+ strcpy (cmd, CrossCompileDir);
+ strcat (cmd, "/");
+ strcat (cmd, cross_cc_name[i]);
+ if (lstat (cmd, &sb) == 0) {
+ return TRUE;
+ break;
+ }
+ }
+ } else
+#endif
+ {
+ int i;
+ for (i = 0; i < sizeof (gcc_path) / sizeof gcc_path[0]; i++) {
+ if (lstat (gcc_path[i], &sb) == 0) {
+ strcpy (cmd, gcc_path[i]);
+ return TRUE;
+ }
+ }
+ }
+ return FALSE;
+}
+
+#if defined CROSSCOMPILE || !defined __UNIXOS2__
+static void
+get_gcc_incdir(FILE *inFile, char* name)
+{
+ FILE* gccproc;
+ char buf[PATH_MAX];
+ char cmd[PATH_MAX];
+ char* ptr;
+
+ strcpy(cmd,name);
+
+ buf[0] = '\0';
+ strcat (cmd, " --print-libgcc-file-name");
+ if ((gccproc = popen (cmd, "r")) != NULL) {
+ if (fgets (buf, PATH_MAX, gccproc) != NULL) {
+ ptr = strstr (buf, "libgcc.a");
+ if (ptr) strcpy (ptr, "include");
+ }
+ (void) pclose (gccproc);
+ }
+
+ if (buf[0])
+ fprintf (inFile, "#define DefaultGccIncludeDir \"%s\"\n", buf);
+}
+#endif
+
+boolean
+define_os_defaults(FILE *inFile)
+{
+#if defined CROSSCOMPILE || ( !defined(WIN32) && !defined(__UNIXOS2__) )
+#ifdef CROSSCOMPILE
+#ifdef __GNUC__
+ if (1)
+#else
+ if ((sys != win32) && (sys != emx))
+#endif
+#endif
+ {
+# if (defined(DEFAULT_OS_NAME) || defined(DEFAULT_OS_MAJOR_REV) || \
+ defined(DEFAULT_OS_MINOR_REV) || defined(DEFAULT_OS_TEENY_REV))
+ struct utsname *name = NULL;
+ struct utsname uts_name;
+ char buf[SYS_NMLN * 5 + 1];
+
+ /* Obtain the system information. */
+#ifdef CROSSCOMPILE
+ if (!CrossCompiling)
+#endif
+ {
+ if (uname(&uts_name) < 0)
+ LogFatal("Cannot invoke uname", "");
+ else
+ name = &uts_name;
+ }
+#if defined CROSSCOMPILE && (defined linux || defined(__GLIBC__))
+ else {
+ strncpy(uts_name.sysname,cross_uts_sysname,SYS_NMLN);
+ strncpy(uts_name.release,cross_uts_release,SYS_NMLN);
+ strncpy(uts_name.version,cross_uts_version,SYS_NMLN);
+ strncpy(uts_name.machine,cross_uts_machine,SYS_NMLN);
+ name = &uts_name;
+ }
+#endif
+# ifdef __FreeBSD__
+ /* Override for compiling in chroot of other OS version, such as
+ * in the bento build cluster.
+ */
+ {
+ char *e;
+ if ((e = getenv("OSREL")) != NULL &&
+ strlen(name->sysname) + strlen(e) + 1 < SYS_NMLN) {
+ strcpy(name->release, e);
+ strcpy(name->version, name->sysname);
+ strcat(name->version, " ");
+ strcat(name->version, e);
+ }
+ }
+# endif
+
+# if defined DEFAULT_OS_NAME
+# if defined CROSSCOMPILE
+ if (!CrossCompiling)
+# endif
+ {
+ parse_utsname(name, DEFAULT_OS_NAME, buf,
+ "Bad DEFAULT_OS_NAME syntax %s");
+# ifdef DEFAULT_OS_NAME_FROB
+ DEFAULT_OS_NAME_FROB(buf, sizeof buf);
+# endif
+ if (buf[0] != '\0')
+ fprintf(inFile, "#define DefaultOSName %s\n", buf);
+ }
+# endif
+
+# if defined CROSSCOMPILE
+ if (CrossCompiling && defaultOsName) {
+ parse_utsname(name, defaultOsName, buf,
+ "Bad DEFAULT_OS_NAME syntax %s");
+ if (defaultOsNameFrob)
+ defaultOsNameFrob(buf, sizeof buf);
+ if (buf[0] != '\0')
+ fprintf(inFile, "#define DefaultOSName %s\n", buf);
+ }
+# endif
+
+# ifdef DEFAULT_OS_MAJOR_REV
+# if defined CROSSCOMPILE
+ if (!CrossCompiling)
+# endif
+ {
+ parse_utsname(name, DEFAULT_OS_MAJOR_REV, buf,
+ "Bad DEFAULT_OS_MAJOR_REV syntax %s");
+# ifdef DEFAULT_OS_MAJOR_REV_FROB
+ DEFAULT_OS_MAJOR_REV_FROB(buf, sizeof buf);
+# endif
+ fprintf(inFile, "#define DefaultOSMajorVersion %s\n",
+ *buf ? trim_version(buf) : "0");
+ }
+# endif
+
+# if defined CROSSCOMPILE
+ if (CrossCompiling && defaultOsMajorRev) {
+ parse_utsname(name, defaultOsMajorRev, buf,
+ "Bad defaultOsMajorRev syntax %s");
+ if (defaultOsMajorRevFrob)
+ defaultOsMajorRevFrob(buf, sizeof buf);
+ fprintf(inFile, "#define DefaultOSMajorVersion %s\n",
+ *buf ? trim_version(buf) : "0");
+ }
+# endif
+
+# ifdef DEFAULT_OS_MINOR_REV
+# if defined CROSSCOMPILE
+ if (!CrossCompiling)
+# endif
+ {
+ parse_utsname(name, DEFAULT_OS_MINOR_REV, buf,
+ "Bad DEFAULT_OS_MINOR_REV syntax %s");
+# ifdef DEFAULT_OS_MINOR_REV_FROB
+ DEFAULT_OS_MINOR_REV_FROB(buf, sizeof buf);
+# endif
+ fprintf(inFile, "#define DefaultOSMinorVersion %s\n",
+ *buf ? trim_version(buf) : "0");
+ }
+# endif
+
+# if defined CROSSCOMPILE
+ if (CrossCompiling && defaultOsMinorRev) {
+ parse_utsname(name, defaultOsMinorRev, buf,
+ "Bad defaultOsMinorRev syntax %s");
+ if (defaultOsMinorRevFrob)
+ defaultOsMinorRevFrob(buf, sizeof buf);
+ fprintf(inFile, "#define DefaultOSMinorVersion %s\n",
+ *buf ? trim_version(buf) : "0");
+ }
+# endif
+
+# ifdef DEFAULT_OS_TEENY_REV
+# if defined CROSSCOMPILE
+ if (!CrossCompiling)
+# endif
+ {
+ parse_utsname(name, DEFAULT_OS_TEENY_REV, buf,
+ "Bad DEFAULT_OS_TEENY_REV syntax %s");
+# ifdef DEFAULT_OS_TEENY_REV_FROB
+ DEFAULT_OS_TEENY_REV_FROB(buf, sizeof buf);
+# endif
+ fprintf(inFile, "#define DefaultOSTeenyVersion %s\n",
+ *buf ? trim_version(buf) : "0");
+ }
+# endif
+
+# if defined CROSSCOMPILE
+ if (CrossCompiling && defaultOsTeenyRev) {
+ parse_utsname(name, defaultOsTeenyRev, buf,
+ "Bad defaultOsTeenyRev syntax %s");
+ if (defaultOsTeenyRevFrob)
+ defaultOsTeenyRevFrob(buf, sizeof buf);
+ fprintf(inFile, "#define DefaultOSTeenyVersion %s\n",
+ *buf ? trim_version(buf) : "0");
+ }
+# endif
+
+# ifdef DEFAULT_MACHINE_ARCHITECTURE
+# if defined CROSSCOMPILE
+ if (!CrossCompiling)
+# endif
+ {
+ parse_utsname(name, DEFAULT_MACHINE_ARCHITECTURE, buf,
+ "Bad DEFAULT_MACHINE_ARCHITECTURE %s");
+ fprintf(inFile, "#ifndef %s\n# define %s\n#endif\n", buf, buf);
+ }
+# endif
+
+# if defined CROSSCOMPILE
+ if (CrossCompiling && defaultMachineArchitecture) {
+ parse_utsname(name, defaultMachineArchitecture, buf,
+ "Bad defaultMachineArchitecture syntax %s");
+ fprintf(inFile, "#ifndef %s\n# define %s\n#endif\n", buf, buf);
+ }
+# endif
+# endif
+# if defined CROSSCOMPILE
+ if (CrossCompiling)
+ get_cross_compile_dir(inFile);
+ else
+# endif
+ fprintf(inFile, "#define CrossCompiling NO\n");
+# if defined CROSSCOMPILE
+ if (CrossCompiling && sys == LinuX)
+# endif
+# if defined CROSSCOMPILE || defined linux || defined(__GLIBC__)
+# if defined(CROSSCOMPILE) && defined(__linux__)
+ if (sys == LinuX)
+# endif
+ get_distrib (inFile);
+# endif
+# if defined linux || defined(__GLIBC__)
+# if defined CROSSCOMPILE
+ if (!CrossCompiling)
+# endif
+ get_libc_version (inFile);
+# if defined CROSSCOMPILE
+ else {
+ fprintf(inFile,"#define DefaultLinuxCLibMajorVersion %d\n",
+ glibc_major);
+ fprintf(inFile,"#define DefaultLinuxCLibMinorVersion %d\n",
+ glibc_minor);
+ fprintf(inFile,"#define DefaultLinuxCLibTeenyVersion 0\n");
+ }
+# endif
+# endif /* linux || __GLIBC__ */
+# if defined CROSSCOMPILE || defined linux || defined(__GLIBC__)
+# if defined CROSSCOMPILE && defined(__linux__)
+ if (sys == LinuX)
+# endif
+ get_ld_version(inFile);
+# endif
+# if defined (sun) && defined(SVR4)
+ get_sun_compiler_versions (inFile);
+# endif
+# if defined CROSSCOMPILE || defined __GNUC__
+# if defined CROSSCOMPILE
+ if (gnu_c)
+# endif
+ {
+ char name[PATH_MAX];
+ if (get_gcc(name)) {
+ get_gcc_version (inFile,name);
+# if defined CROSSCOMPILE || !defined __UNIXOS2__
+# if defined CROSSCOMPILE
+ if (sys != emx)
+# endif
+ get_gcc_incdir(inFile,name);
+# endif
+ }
+ }
+# endif
+# if defined __FreeBSD__
+# if defined CROSSCOMPILE
+ if (sys == freeBSD)
+# endif
+ get_binary_format(inFile);
+# endif
+ }
+#endif /* !WIN32 && !__UNIXOS2__*/
+#if defined WIN32
+# ifdef CROSSCOMPILE
+ else if (sys == win32 && !CrossCompiling)
+# endif
+ {
+ OSVERSIONINFO osvi;
+ static char* os_names[] = { "Win32s", "Windows 95", "Windows NT" };
+
+ memset(&osvi, 0, sizeof(OSVERSIONINFO));
+ osvi.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
+ GetVersionEx (&osvi);
+
+ fprintf (inFile, "#define DefaultOSName Microsoft %s\n",
+ os_names[osvi.dwPlatformId]);
+
+ fprintf(inFile, "#define DefaultOSMajorVersion %d\n", osvi.dwMajorVersion);
+ fprintf(inFile, "#define DefaultOSMinorVersion %d\n", osvi.dwMinorVersion);
+ fprintf(inFile, "#define DefaultOSTeenyVersion %d\n",
+ osvi.dwBuildNumber & 0xFFFF);
+ }
+#endif /* WIN32 */
+#ifdef CROSSCOMPILE
+ else if (sys == emx)
+#endif
+#if defined CROSSCOMPILE || defined __UNIXOS2__
+ {
+ fprintf(inFile, "#define DefaultOSMajorVersion 4\n");
+ fprintf(inFile, "#define DefaultOSMinorVersion 0\n");
+ fprintf(inFile, "#define DefaultOSTeenyVersion 0\n");
+ }
+#endif /* EMX */
+#if defined(__OpenBSD__) || defined(__DragonFly__)
+ get_stackprotector(inFile);
+#endif
+ return FALSE;
+}
+
+void
+cppit(char *imakefile, char *template, char *masterc,
+ FILE *outfd, char *outfname)
+{
+ FILE *inFile;
+
+ haveImakefileC = TRUE;
+ inFile = fopen(masterc, "w");
+ if (inFile == NULL)
+ LogFatal("Cannot open %s for output.", masterc);
+ if (fprintf(inFile, "%s\n", ImakefileCHeader) < 0 ||
+ define_os_defaults(inFile) ||
+ optional_include(inFile, "IMAKE_LOCAL_DEFINES", "localdefines") ||
+ optional_include(inFile, "IMAKE_ADMIN_DEFINES", "admindefines") ||
+ fprintf(inFile, "#define %s <%s>\n", ImakeDefSym, imakefile) < 0 ||
+ fprintf(inFile, LocalDefineFmt, ImakeTmplSym, template) < 0 ||
+ fprintf(inFile, IncludeFmt, ImakeTmplSym) < 0 ||
+ optional_include(inFile, "IMAKE_ADMIN_MACROS", "adminmacros") ||
+ optional_include(inFile, "IMAKE_LOCAL_MACROS", "localmacros") ||
+ fflush(inFile) ||
+ fclose(inFile))
+ LogFatal("Cannot write to %s.", masterc);
+ /*
+ * Fork and exec cpp
+ */
+ doit(outfd, cpp, cpp_argv);
+ CleanCppOutput(outfd, outfname);
+}
+
+void
+makeit(void)
+{
+ doit(NULL, make_argv[0], make_argv);
+}
+
+char *
+CleanCppInput(char *imakefile)
+{
+ FILE *outFile = NULL;
+ FILE *inFile;
+ char *buf, /* buffer for file content */
+ *pbuf, /* walking pointer to buf */
+ *punwritten, /* pointer to unwritten portion of buf */
+ *ptoken, /* pointer to # token */
+ *pend, /* pointer to end of # token */
+ savec; /* temporary character holder */
+ int count;
+ struct stat st;
+
+ /*
+ * grab the entire file.
+ */
+ if (!(inFile = fopen(imakefile, "r")))
+ LogFatal("Cannot open %s for input.", imakefile);
+ if (fstat(fileno(inFile), &st) < 0)
+ LogFatal("Cannot stat %s for size.", imakefile);
+ buf = Emalloc((int)st.st_size+3);
+ count = fread(buf + 2, 1, st.st_size, inFile);
+ if (count == 0 && st.st_size != 0)
+ LogFatal("Cannot read %s:", imakefile);
+ fclose(inFile);
+ buf[0] = '\n';
+ buf[1] = '\n';
+ buf[count + 2] = '\0';
+
+ punwritten = pbuf = buf + 2;
+ while (*pbuf) {
+ /* for compatibility, replace make comments for cpp */
+ if (*pbuf == '#' && pbuf[-1] == '\n' && pbuf[-2] != '\\') {
+ ptoken = pbuf+1;
+ while (*ptoken == ' ' || *ptoken == '\t')
+ ptoken++;
+ pend = ptoken;
+ while (*pend && *pend != ' ' && *pend != '\t' && *pend != '\n' && *pend != '\r')
+ pend++;
+ savec = *pend;
+ *pend = '\0';
+ if (strcmp(ptoken, "define") &&
+ strcmp(ptoken, "if") &&
+ strcmp(ptoken, "ifdef") &&
+ strcmp(ptoken, "ifndef") &&
+ strcmp(ptoken, "include") &&
+ strcmp(ptoken, "line") &&
+ strcmp(ptoken, "else") &&
+ strcmp(ptoken, "elif") &&
+ strcmp(ptoken, "endif") &&
+ strcmp(ptoken, "error") &&
+ strcmp(ptoken, "pragma") &&
+ strcmp(ptoken, "undef")) {
+ if (outFile == NULL) {
+#ifdef HAS_MKSTEMP
+ int fd;
+#endif
+ tmpImakefile = Strdup(tmpImakefile);
+#ifndef HAS_MKSTEMP
+ if (mktemp(tmpImakefile) == NULL ||
+ (outFile = fopen(tmpImakefile, "w+")) == NULL) {
+ LogFatal("Cannot open %s for write.",
+ tmpImakefile);
+ }
+#else
+ fd=mkstemp(tmpImakefile);
+ if (fd != -1)
+ outFile = fdopen(fd, "w");
+ if (outFile == NULL) {
+ if (fd != -1) {
+ unlink(tmpImakefile); close(fd);
+ }
+ LogFatal("Cannot open %s for write.",
+ tmpImakefile);
+ }
+#endif
+ }
+ writetmpfile(outFile, punwritten, pbuf-punwritten,
+ tmpImakefile);
+ if (ptoken > pbuf + 1)
+ writetmpfile(outFile, "XCOMM", 5, tmpImakefile);
+ else
+ writetmpfile(outFile, "XCOMM ", 6, tmpImakefile);
+ punwritten = pbuf + 1;
+ }
+ *pend = savec;
+ }
+ pbuf++;
+ }
+ if (outFile) {
+ writetmpfile(outFile, punwritten, pbuf-punwritten, tmpImakefile);
+ fclose(outFile);
+
+ return tmpImakefile;
+ }
+
+ return(imakefile);
+}
+
+void
+CleanCppOutput(FILE *tmpfd, char *tmpfname)
+{
+ char *input;
+ int blankline = 0;
+
+ while((input = ReadLine(tmpfd, tmpfname))) {
+ if (isempty(input)) {
+ if (blankline++)
+ continue;
+#ifdef CROSSCOMPILE
+ if (fixup_whitespace)
+#endif
+#if defined CROSSCOMPILE || defined FIXUP_CPP_WHITESPACE
+ KludgeResetRule();
+#endif
+ } else {
+ blankline = 0;
+#ifdef CROSSCOMPILE
+ if (fixup_whitespace)
+#endif
+#if defined CROSSCOMPILE || defined FIXUP_CPP_WHITESPACE
+ KludgeOutputLine(&input);
+#endif
+ writetmpfile(tmpfd, input, strlen(input), tmpfname);
+ }
+ writetmpfile(tmpfd, "\n", 1, tmpfname);
+ }
+ fflush(tmpfd);
+#ifdef NFS_STDOUT_BUG
+ /*
+ * On some systems, NFS seems to leave a large number of nulls at
+ * the end of the file. Ralph Swick says that this kludge makes the
+ * problem go away.
+ */
+ ftruncate (fileno(tmpfd), (off_t)ftell(tmpfd));
+#endif
+}
+
+/*
+ * Determine if a line has nothing in it. As a side effect, we trim white
+ * space from the end of the line. Cpp magic cookies are also thrown away.
+ * "XCOMM" token is transformed to "#".
+ */
+boolean
+isempty(char *line)
+{
+ char *pend;
+
+ /*
+ * Check for lines of the form
+ * # n "...
+ * or
+ * # line n "...
+ */
+ if (*line == '#') {
+ pend = line+1;
+ if (*pend == ' ')
+ pend++;
+ if (*pend == 'l' && pend[1] == 'i' && pend[2] == 'n' &&
+ pend[3] == 'e' && pend[4] == ' ')
+ pend += 5;
+ if (isdigit(*pend)) {
+ do {
+ pend++;
+ } while (isdigit(*pend));
+ if (*pend == '\n' || *pend == '\0')
+ return(TRUE);
+ if (*pend++ == ' ' && *pend == '"')
+ return(TRUE);
+ }
+ while (*pend)
+ pend++;
+ } else {
+ for (pend = line; *pend; pend++) {
+ if (*pend == 'X' && pend[1] == 'C' && pend[2] == 'O' &&
+ pend[3] == 'M' && pend[4] == 'M' &&
+ (pend == line || pend[-1] == ' ' || pend[-1] == '\t' || pend[-1] == '\r') &&
+ (pend[5] == ' ' || pend[5] == '\t' || pend[5] == '\r' || pend[5] == '\0'))
+ {
+ *pend = '#';
+ memmove(pend+1, pend+5, strlen(pend+5)+1);
+ }
+#ifdef CROSSCOMPILE
+ if (magic_make_vars)
+#endif
+ {
+#if defined CROSSCOMPILE || defined MAGIC_MAKE_VARS
+ if (*pend == 'X' && pend[1] == 'V' && pend[2] == 'A' &&
+ pend[3] == 'R')
+ {
+ char varbuf[5];
+ int i;
+
+ if (pend[4] == 'd' && pend[5] == 'e' && pend[6] == 'f' &&
+ pend[7] >= '0' && pend[7] <= '9')
+ {
+ i = pend[7] - '0';
+ sprintf(varbuf, "%0.4d", xvariable);
+ strncpy(pend+4, varbuf, 4);
+ xvariables[i] = xvariable;
+ xvariable = (xvariable + 1) % 10000;
+ }
+ else if (pend[4] == 'u' && pend[5] == 's' &&
+ pend[6] == 'e' && pend[7] >= '0' &&
+ pend[7] <= '9')
+ {
+ i = pend[7] - '0';
+ sprintf(varbuf, "%0.4d", xvariables[i]);
+ strncpy(pend+4, varbuf, 4);
+ }
+ }
+#endif
+ }
+ }
+ }
+ while (--pend >= line && (*pend == ' ' || *pend == '\t' || *pend == '\r')) ;
+ pend[1] = '\0';
+ return (*line == '\0');
+}
+
+/*ARGSUSED*/
+char *
+ReadLine(FILE *tmpfd, char *tmpfname)
+{
+ static boolean initialized = FALSE;
+ static char *buf, *pline, *end;
+ register char *p1, *p2;
+
+ if (! initialized) {
+#ifdef WIN32
+ FILE *fp = tmpfd;
+#endif
+ int total_red;
+ struct stat st;
+
+ /*
+ * Slurp it all up.
+ */
+ fseek(tmpfd, 0, 0);
+ if (fstat(fileno(tmpfd), &st) < 0)
+ LogFatal("cannot stat %s for size", tmpMakefile);
+ pline = buf = Emalloc((int)st.st_size+1);
+ total_red = fread(buf, 1, st.st_size, tmpfd);
+ if (total_red == 0 && st.st_size != 0)
+ LogFatal("cannot read %s", tmpMakefile);
+ end = buf + total_red;
+ *end = '\0';
+ fseek(tmpfd, 0, 0);
+#if defined(SYSV) || defined(WIN32) || defined(USE_FREOPEN)
+ tmpfd = freopen(tmpfname, "w+", tmpfd);
+#ifdef WIN32
+ if (! tmpfd) /* if failed try again */
+ tmpfd = freopen(tmpfname, "w+", fp);
+#endif
+ if (! tmpfd)
+ LogFatal("cannot reopen %s\n", tmpfname);
+#else /* !SYSV */
+ ftruncate(fileno(tmpfd), (off_t) 0);
+#endif /* !SYSV */
+ initialized = TRUE;
+ fprintf (tmpfd, "# Makefile generated by imake - do not edit!\n");
+ fprintf (tmpfd, "# %s\n",
+ "$Xorg: imake.c,v 1.6 2001/02/09 02:03:15 xorgcvs Exp $");
+ }
+
+ for (p1 = pline; p1 < end; p1++) {
+ if (*p1 == '@' && *(p1+1) == '@'
+ /* ignore ClearCase version-extended pathnames */
+ && !(p1 != pline && !isspace(*(p1-1)) && *(p1+2) == '/'))
+ { /* soft EOL */
+ *p1++ = '\0';
+ p1++; /* skip over second @ */
+ break;
+ }
+ else if (*p1 == '\n') { /* real EOL */
+#if defined CROSSCOMPILE || defined WIN32
+# if defined CROSSCOMPILE
+ if (sys == win32)
+# endif
+ {
+ if (p1 > pline && p1[-1] == '\r')
+ p1[-1] = '\0';
+ }
+#endif
+ *p1++ = '\0';
+ break;
+ }
+ }
+
+ /*
+ * return NULL at the end of the file.
+ */
+ p2 = (pline == p1 ? NULL : pline);
+ pline = p1;
+ return(p2);
+}
+
+void
+writetmpfile(FILE *fd, char *buf, int cnt, char *fname)
+{
+ if (fwrite(buf, sizeof(char), cnt, fd) == -1)
+ LogFatal("Cannot write to %s.", fname);
+}
+
+char *
+Emalloc(int size)
+{
+ char *p;
+
+ if ((p = malloc(size)) == NULL)
+ LogFatalI("Cannot allocate %d bytes", size);
+ return(p);
+}
+
+#if defined CROSSCOMPILE || defined FIXUP_CPP_WHITESPACE
+void
+KludgeOutputLine(char **pline)
+{
+ char *p = *pline;
+ char quotechar = '\0';
+
+ switch (*p) {
+ case '#': /*Comment - ignore*/
+ break;
+ case '\t': /*Already tabbed - ignore it*/
+ break;
+ case ' ': /*May need a tab*/
+ default:
+#ifdef CROSSCOMPILE
+ if (inline_syntax)
+#endif
+#if defined CROSSCOMPILE || defined INLINE_SYNTAX
+ {
+ if (*p == '<' && p[1] == '<') { /* inline file close */
+ InInline--;
+ InRule = TRUE;
+ break;
+ }
+ }
+#endif
+ /*
+ * The following cases should not be treated as beginning of
+ * rules:
+ * variable := name (GNU make)
+ * variable = .*:.* (':' should be allowed as value)
+ * sed 's:/a:/b:' (: used in quoted values)
+ */
+ for (; *p; p++) {
+ if (quotechar) {
+ if (quotechar == '\\' ||
+ (*p == quotechar &&
+# if defined CROSSCOMPILE || defined WIN32
+ (
+# if defined CROSSCOMPILE
+ (sys == win32) &&
+# endif
+ quotechar != ')') &&
+# endif
+ p[-1] != '\\'))
+ quotechar = '\0';
+ continue;
+ }
+ switch (*p) {
+ case '\\':
+ case '"':
+ case '\'':
+ quotechar = *p;
+ break;
+ case '(':
+ quotechar = ')';
+ break;
+ case '{':
+ quotechar = '}';
+ break;
+ case '[':
+ quotechar = ']';
+ break;
+ case '=':
+#ifdef CROSSCOMPILE
+ if (remove_cpp_leadspace)
+#endif
+#if defined CROSSCOMPILE || defined REMOVE_CPP_LEADSPACE
+ {
+ if (!InRule && **pline == ' ') {
+ while (**pline == ' ')
+ (*pline)++;
+ }
+ }
+#endif
+ goto breakfor;
+#if defined CROSSCOMPILE || defined INLINE_SYNTAX
+ case '<':
+ if (inline_syntax) {
+ if (p[1] == '<') /* inline file start */
+ InInline++;
+ }
+ break;
+#endif
+ case ':':
+ if (p[1] == '=')
+ goto breakfor;
+ while (**pline == ' ')
+ (*pline)++;
+ InRule = TRUE;
+ return;
+ }
+ }
+breakfor:
+ if (InRule && **pline == ' ')
+ **pline = '\t';
+ break;
+ }
+}
+
+void
+KludgeResetRule(void)
+{
+ InRule = FALSE;
+}
+#endif
+char *
+Strdup(char *cp)
+{
+ char *new = Emalloc(strlen(cp) + 1);
+
+ strcpy(new, cp);
+ return new;
+}
+
+#ifdef CROSSCOMPILE
+char*
+CrossCompileCPP(void)
+{
+ char *cpp, *c;
+ int len ;
+ if (crosscompile_use_cc_e)
+ AddCppArg("-E");
+
+ cpp = strrchr(crosscompile_cpp,'/');
+ if (!cpp)
+ cpp = crosscompile_cpp;
+ else
+ cpp++;
+
+ len = strlen(cpp) + strlen(CrossCompileDir) + 2;
+ c = Emalloc(len);
+
+ (void)snprintf(c, len,"%s/%s",CrossCompileDir,cpp);
+
+ return c;
+}
+
+#endif
+
+#ifdef CROSSCOMPILE
+static void
+get_cross_compile_dir(FILE *inFile)
+{
+ fprintf(inFile, "#define CrossCompileDir %s\n",
+ CrossCompileDir);
+ fprintf(inFile, "#define CrossCompiling YES\n");
+}
+#endif
diff --git a/nx-X11/config/imake/imake.man b/nx-X11/config/imake/imake.man
new file mode 100644
index 000000000..34d5b9403
--- /dev/null
+++ b/nx-X11/config/imake/imake.man
@@ -0,0 +1,262 @@
+.\" $Xorg: imake.man,v 1.4 2001/02/09 02:03:16 xorgcvs Exp $
+.\" Copyright (c) 1993, 1994, 1998 The Open Group
+.\"
+.\" Permission to use, copy, modify, distribute, and sell this software and its
+.\" documentation for any purpose is hereby granted without fee, provided that
+.\" the above copyright notice appear in all copies and that both that
+.\" copyright notice and this permission notice appear in supporting
+.\" documentation.
+.\"
+.\" The above copyright notice and this permission notice shall be included
+.\" in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of The Open Group shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from The Open Group.
+.\"
+.\" $XFree86: imake.man,v 1.8 2001/12/14 19:53:19 dawes Exp $
+.\"
+.TH IMAKE 1 __xorgversion__
+.SH NAME
+imake \- C preprocessor interface to the make utility
+.SH SYNOPSIS
+\fBimake\fP [ \fB\-D\fP\fIdefine\fP ] [ \fB\-I\fP\fIdir\fP ]
+[ \fB\-U\fP\fIdefine\fP ]
+[ \fB\-T\fP\fItemplate\fP ]
+[ \fB\-f\fP \fIfilename\fP ] [ \fB\-C\fP \fIfilename\fP ]
+[ \fB\-s\fP \fIfilename\fP ] [ \fB\-e\fP ]
+[ \fB\-v\fP ]
+.SH DESCRIPTION
+.I Imake
+is used to
+generate \fIMakefiles\fP from a template, a set of \fIcpp\fP macro functions,
+and a per-directory input file called an \fIImakefile\fP. This allows machine
+dependencies (such as compiler options, alternate command names, and special
+\fImake\fP rules) to be kept separate from the descriptions of the
+various items to be built.
+.SH OPTIONS
+The following command line options may be passed to \fIimake\fP:
+.TP 8
+.B \-D\fIdefine\fP
+This option is passed directly to \fIcpp\fP. It is typically used to set
+directory-specific variables. For example, the X Window System uses this
+flag to set \fITOPDIR\fP to the name of the directory containing the top
+of the core distribution and \fICURDIR\fP to the name of the current
+directory, relative to the top.
+.TP 8
+.B \-I\fIdirectory\fP
+This option is passed directly to \fIcpp\fP. It is typically used to
+indicate the directory in which the \fIimake\fP template and configuration
+files may be found.
+.TP 8
+.B \-U\fIdefine\fP
+This option is passed directly to \fIcpp\fP. It is typically used to
+unset variables when debugging \fIimake\fP configuration files.
+.TP 8
+.B \-T\fItemplate\fP
+This option specifies the name of the master template file (which is usually
+located in the directory specified with \fI\-I\fP) used by \fIcpp\fP.
+The default is \fIImake.tmpl\fP.
+.TP 8
+.B \-f \fIfilename\fP
+This option specifies the name of the per-directory input file. The default
+is \fIImakefile\fP.
+.TP 8
+.B \-C \fIfilename\fP
+This option specifies the name of the .c file that is constructed in the
+current directory. The default is \fIImakefile.c\fP.
+.TP 8
+.B \-s \fIfilename\fP
+This option specifies the name of the \fImake\fP description file to be
+generated but \fImake\fP should not be invoked.
+If the \fIfilename\fP is a dash (\-), the
+output is written to \fIstdout\fP. The default is to generate, but
+not execute, a \fIMakefile\fP.
+.TP 8
+.B \-e
+This option indicates the \fIimake\fP should execute the generated
+\fIMakefile\fP. The default is to leave this to the user.
+.TP 8
+.B \-v
+This option indicates that \fIimake\fP should print the \fIcpp\fP command line
+that it is using to generate the \fIMakefile\fP.
+.SH "HOW IT WORKS"
+\fIImake\fP invokes \fIcpp\fP with any \fI\-I\fP or \fI\-D\fP flags passed
+on the command line and passes the name of a file containing the
+following 3 lines:
+.sp
+.nf
+\& #define IMAKE_TEMPLATE "Imake.tmpl"
+\& #define INCLUDE_IMAKEFILE <Imakefile>
+\& #include IMAKE_TEMPLATE
+.fi
+.sp
+where \fIImake.tmpl\fP and \fIImakefile\fP may be overridden by the
+\fI\-T\fP and \fI\-f\fP command options, respectively.
+.PP
+The IMAKE_TEMPLATE typically
+reads in a file containing machine-dependent parameters
+(specified as \fIcpp\fP symbols), a site-specific parameters file,
+a file defining variables,
+a file
+containing \fIcpp\fP macro functions for generating \fImake\fP rules, and
+finally the \fIImakefile\fP (specified by INCLUDE_IMAKEFILE) in the current
+directory. The \fIImakefile\fP uses the macro functions to indicate what
+targets should be built; \fIimake\fP takes care of generating the appropriate
+rules.
+.PP
+.I Imake
+configuration files contain two types of variables, imake variables
+and make variables. The imake variables are interpreted by cpp when
+.I imake
+is run. By convention they are mixed case. The make variables are
+written into the
+.I Makefile
+for later interpretation by
+.I make.
+By convention make variables are upper case.
+.PP
+The rules file (usually named \fIImake.rules\fP in the configuration
+directory) contains a variety of \fIcpp\fP macro functions that are
+configured according to the current platform. \fIImake\fP replaces
+any occurrences of the string ``@@'' with a newline to allow macros that
+generate more than one line of \fImake\fP rules.
+For example, the macro
+.ta 1i 1.6i 5i
+.nf
+
+\& #define program_target(program, objlist) @@\e
+ program: objlist @@\e
+ $(CC) \-o $@ objlist $(LDFLAGS)
+
+.fi
+when called with
+.I "program_target(foo, foo1.o foo2.o)"
+will expand to
+.nf
+
+ foo: foo1.o foo2.o
+ $(CC) \-o $@ foo1.o foo2.o $(LDFLAGS)
+
+.fi
+.PP
+\fIImake\fP also replaces any occurrences of the word ``XCOMM'' with
+the character ``#'' to permit placing comments in the Makefile without
+causing ``invalid directive'' errors from the preprocessor.
+.PP
+Some complex \fIimake\fP macros require generated \fImake\fP variables
+local to each invocation of the macro, often because their value
+depends on parameters passed to the macro.
+Such variables can be created by using an \fIimake\fP variable
+of the form \fBXVARdef\fP\fIn\fP, where \fIn\fP is a single digit.
+A unique \fImake\fP variable will be substituted. Later occurrences
+of the variable \fBXVARuse\fP\fIn\fP will
+be replaced by the variable created by the corresponding
+\fBXVARdef\fP\fIn\fP.
+.PP
+On systems whose \fIcpp\fP reduces multiple tabs and spaces to a single
+space, \fIimake\fP attempts to put back any necessary tabs (\fImake\fP is
+very picky about the difference between tabs and spaces). For this reason,
+colons (:) in command lines must be preceded by a backslash (\\).
+.SH "USE WITH THE X WINDOW SYSTEM"
+The X Window System uses \fIimake\fP extensively, for both full builds within
+the source tree and external software. As mentioned above, two special
+variables, \fITOPDIR\fP and \fICURDIR,\fP are set to make referencing files
+using relative path names easier. For example, the following command is
+generated automatically to build the \fIMakefile\fP in the directory
+\fIlib/X/\fP (relative to the top of the sources):
+.sp
+.nf
+ % ../.././config/imake \-I../.././config \\
+ \-DTOPDIR=../../. \-DCURDIR=./lib/X
+.fi
+.sp
+When building X programs outside the source tree, a special symbol
+\fIUseInstalled\fP is defined and \fITOPDIR\fP and
+\fICURDIR\fP are omitted. If the configuration files have been
+properly installed, the script \fIxmkmf\fP(1) may be used.
+.SH "INPUT FILES"
+Here is a summary of the files read by
+.I imake
+as used by X.
+The indentation shows what files include what other files.
+.nf
+.sp
+.ta 3i
+ Imake.tmpl generic variables
+ site.def site-specific, BeforeVendorCF defined
+ *.cf machine-specific
+ *Lib.rules shared library rules
+ site.def site-specific, AfterVendorCF defined
+ Imake.rules rules
+ Project.tmpl X-specific variables
+ *Lib.tmpl shared library variables
+ Imakefile
+ Library.tmpl library rules
+ Server.tmpl server rules
+ Threads.tmpl multi-threaded rules
+.fi
+.LP
+Note that \fIsite.def\fP gets included twice, once before the
+\fI*.cf\fP file and once after. Although most site customizations
+should be specified after the \fI*.cf\fP file, some, such as the
+choice of compiler, need to be specified before, because other
+variable settings may depend on them.
+.LP
+The first time \fIsite.def\fP is included, the variable BeforeVendorCF
+is defined, and the second time, the variable AfterVendorCF is
+defined. All code in \fIsite.def\fP should be inside an #ifdef for
+one of these symbols.
+.SH FILES
+.ta 3i
+Imakefile.c temporary input file for cpp
+.br
+/tmp/Imf.XXXXXX temporary Makefile for -s
+.br
+/tmp/IIf.XXXXXX temporary Imakefile if specified Imakefile uses # comments
+.br
+__cpp__ default C preprocessor
+.DT
+.SH "SEE ALSO"
+make(1), xmkmf(1)
+.br
+S. I. Feldman,
+.I
+Make \(em A Program for Maintaining Computer Programs
+.SH "ENVIRONMENT VARIABLES"
+The following environment variables may be set, however their use is not
+recommended as they introduce dependencies that are not readily apparent
+when \fIimake\fP is run:
+.TP 5
+.B IMAKEINCLUDE
+If defined, this specifies a ``\-I'' include argument to pass to the
+C preprocessor. E.g., ``\-I/usr/X11/config''.
+.TP 5
+.B IMAKECPP
+If defined, this should be a valid path to a preprocessor program.
+E.g., ``/usr/local/cpp''.
+By default,
+.I imake
+will use cc -E or __cpp__, depending on the OS specific configuration.
+.TP 5
+.B IMAKEMAKE
+If defined, this should be a valid path to a make program,
+such as ``/usr/local/make''.
+By default,
+.I imake
+will use whatever
+.I make
+program is found using
+.I execvp(3).
+This variable is only used if the ``\-e'' option is specified.
+.SH "AUTHOR"
+Todd Brunhoff, Tektronix and MIT Project Athena; Jim Fulton, MIT X Consortium
diff --git a/nx-X11/config/imake/imakemdep.h b/nx-X11/config/imake/imakemdep.h
new file mode 100644
index 000000000..bacc3af54
--- /dev/null
+++ b/nx-X11/config/imake/imakemdep.h
@@ -0,0 +1,1532 @@
+/* $Xorg: imakemdep.h,v 1.6 2001/02/09 02:03:16 xorgcvs Exp $ */
+/* $XdotOrg: xc/config/imake/imakemdep.h,v 1.12 2005/11/08 06:33:24 jkj Exp $ */
+/*
+
+Copyright (c) 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/config/imake/imakemdep.h,v 3.71 2003/06/12 14:12:26 eich Exp $ */
+
+
+/*
+ * This file contains machine-dependent constants for the imake utility.
+ * When porting imake, read each of the steps below and add in any necessary
+ * definitions. In general you should *not* edit ccimake.c or imake.c!
+ */
+
+#ifdef __UNIXOS2__
+#define lstat stat
+#endif
+
+#ifdef CCIMAKE
+/*
+ * Step 1: imake_ccflags
+ * Define any special flags that will be needed to get imake.c to compile.
+ * These will be passed to the compile along with the contents of the
+ * make variable BOOTSTRAPCFLAGS.
+ */
+#if defined(clipper) || defined(__clipper__)
+#define imake_ccflags "-O -DSYSV -DBOOTSTRAPCFLAGS=-DSYSV"
+#endif
+
+#ifdef hpux
+#ifdef hp9000s800
+#define imake_ccflags "-DSYSV"
+#else
+#define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
+#endif
+#endif
+
+#if defined(macII) || defined(_AUX_SOURCE)
+#define imake_ccflags "-DmacII -DSYSV"
+#endif
+
+#ifdef stellar
+#define imake_ccflags "-DSYSV"
+#endif
+
+/*
+ * SCO UnixWare and OpenServer 6 are both System V Release 5 based OSes.
+ * The native C compiler doesn't assert __UNIXWARE__ but gcc does, so
+ * we don't redefine it if we are using gcc (as it sets it to a specific
+ * value). On OpenServer 6, which is a multi-ABI world, if you attempt
+ * to build with -Kosr, then the C compiler will assert __OPENSERVER__
+ * and set it to the value 507. That indicates an OSR5 compile, and
+ * is handled below.
+ */
+
+#if defined(__UNIXWARE__) || defined(__USLC__) || defined(Oki) || defined(NCR)
+# ifdef imake_ccflags
+# undef imake_ccflags
+# endif
+# ifdef __UNIXWARE__
+# ifndef __GNUC__
+# define imake_ccflags "-Xa -DSVR4 -DSVR5 -D__UNIXWARE__"
+# else
+# define imake_ccflags "-Xa -DSVR4 -DSVR5"
+# endif
+# else
+# define imake_ccflags "-Xa -DSVR4"
+# endif
+#endif
+
+/* SCO may define __USLC__ so put this after the USL check */
+#if defined(M_UNIX) || defined(_SCO_DS) || defined(__OPENSERVER__)
+# ifdef imake_ccflags
+# undef imake_ccflags
+# endif
+# define imake_ccflags "-DSYSV -DSCO325 -D__SCO__"
+#endif
+
+#ifdef sony
+#if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
+#define imake_ccflags "-DSVR4"
+#else
+#include <sys/param.h>
+#if NEWSOS < 41
+#define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
+#else
+#if NEWSOS < 42
+#define imake_ccflags "-Dbsd43"
+#endif
+#endif
+#endif
+#endif
+#ifdef _CRAY
+#define imake_ccflags "-DSYSV -DUSG"
+#endif
+
+#if defined(_IBMR2) || defined(aix)
+#define imake_ccflags "-Daix -DSYSV"
+#endif
+
+#ifdef Mips
+# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
+# define imake_ccflags "-DBSD43"
+# else
+# define imake_ccflags "-DSYSV"
+# endif
+#endif
+
+#ifdef is68k
+#define imake_ccflags "-Dluna -Duniosb"
+#endif
+
+#ifdef SYSV386
+# ifdef SVR4
+# define imake_ccflags "-Xa -DSVR4"
+# else
+# define imake_ccflags "-DSYSV"
+# endif
+#endif
+
+#ifdef SVR4
+# ifdef i386
+# define imake_ccflags "-Xa -DSVR4"
+# endif
+#endif
+
+#ifdef SYSV
+# ifdef i386
+# define imake_ccflags "-DSYSV"
+# endif
+#endif
+
+#if defined(Lynx) || defined(__Lynx__)
+#define imake_ccflags "-DLynx"
+#endif /* Lynx */
+
+#ifdef __convex__
+#define imake_ccflags "-fn -tm c1"
+#endif
+
+#ifdef apollo
+#define imake_ccflags "-DX_NOT_POSIX"
+#endif
+
+#ifdef WIN32
+#ifdef __GNUC__
+#define imake_ccflags "-D__STDC__"
+#else
+#if _MSC_VER < 1000
+#define imake_ccflags "-nologo -batch -D__STDC__"
+#else
+#define imake_ccflags "-nologo -D__STDC__"
+#endif
+#endif
+#endif
+
+#ifdef __uxp__
+#define imake_ccflags "-DSVR4 -DANSICPP"
+#endif
+
+#ifdef __sxg__
+#define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
+#endif
+
+#ifdef _SEQUENT_
+#define imake_ccflags "-Xa -DSVR4"
+#endif
+
+#if defined(SX) || defined(PC_UX)
+#define imake_ccflags "-DSYSV"
+#endif
+
+#ifdef nec_ews_svr2
+#define imake_ccflags "-DUSG"
+#endif
+
+#if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
+#define imake_ccflags "-DSVR4"
+#endif
+
+#if defined(MACH) && !defined(__GNU__)
+#define imake_ccflags "-DNOSTDHDRS"
+#endif
+
+/* this is for OS/2 under UNIXOS2. This won't work with DOS */
+#if defined(__UNIXOS2__)
+#define imake_ccflags "-DBSD43"
+#endif
+
+#if defined(__QNX__) && !defined(__QNXNTO__)
+#define imake_ccflags "-D__QNX__ -D_i386"
+#endif
+
+#if defined(__QNXNTO__)
+#define imake_ccflags "-D__QNXNTO__"
+#endif
+
+#else /* not CCIMAKE */
+#ifndef MAKEDEPEND
+/*
+ * Step 2: dup2
+ * If your OS doesn't have a dup2() system call to duplicate one file
+ * descriptor onto another, define such a mechanism here (if you don't
+ * already fall under the existing category(ies).
+ */
+#if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(__SCO__)
+#define dup2(fd1,fd2) ((fd1 == fd2) ? fd1 : (close(fd2), \
+ fcntl(fd1, F_DUPFD, fd2)))
+#endif
+
+
+/*
+ * Step 3: FIXUP_CPP_WHITESPACE
+ * If your cpp collapses tabs in macro expansions into a single space and
+ * replaces escaped newlines with a space, define this symbol. This will
+ * cause imake to attempt to patch up the generated Makefile by looking
+ * for lines that have colons in them (this is why the rules file escapes
+ * all colons). One way to tell if you need this is to see whether or not
+ * your Makefiles have no tabs in them and lots of @@ strings.
+ */
+#if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__SCO__) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXOS2__) || defined(__UNIXWARE__)
+#define FIXUP_CPP_WHITESPACE
+#endif
+#ifdef WIN32
+#define REMOVE_CPP_LEADSPACE
+#define INLINE_SYNTAX
+#define MAGIC_MAKE_VARS
+#endif
+#ifdef __minix_vmd
+#define FIXUP_CPP_WHITESPACE
+#endif
+
+#if defined(Lynx)
+/* On LynxOS 2.4.0 imake gets built with the old "legacy"
+ * /bin/cc which has a rather pedantic builtin preprocessor.
+ * Using a macro which is not #defined (as in Step 5
+ * below) flags an *error*
+ */
+#define __NetBSD_Version__ 0
+#endif
+
+/*
+ * Step 4: USE_CC_E, DEFAULT_CC, DEFAULT_CPP
+ * If you want to use cc -E instead of cpp, define USE_CC_E.
+ * If use cc -E but want a different compiler, define DEFAULT_CC.
+ * If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
+ */
+#if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
+
+#if defined(__APPLE__)
+#define DEFAULT_CPP "/usr/bin/cpp"
+#define DEFAULT_CC "cc"
+#endif
+#if defined(Lynx) || defined(__Lynx__)
+#define DEFAULT_CC "gcc"
+#define USE_CC_E
+#endif
+#ifdef hpux
+#define USE_CC_E
+#endif
+#ifdef WIN32
+#define USE_CC_E
+#ifdef __GNUC__
+#define DEFAULT_CC "gcc"
+#else
+#define DEFAULT_CC "cl"
+#endif
+#endif
+#ifdef apollo
+#define DEFAULT_CPP "/usr/lib/cpp"
+#endif
+#if defined(clipper) || defined(__clipper__)
+#define DEFAULT_CPP "/usr/lib/cpp"
+#endif
+#if defined(_IBMR2) && !defined(DEFAULT_CPP)
+#define DEFAULT_CPP "/usr/ccs/lib/cpp"
+#endif
+#if defined(sun) && (defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__))
+#define DEFAULT_CPP "/usr/ccs/lib/cpp"
+#endif
+#ifdef __bsdi__
+#define DEFAULT_CPP "/usr/bin/cpp"
+#endif
+#ifdef __uxp__
+#define DEFAULT_CPP "/usr/ccs/lib/cpp"
+#endif
+#ifdef __sxg__
+#define DEFAULT_CPP "/usr/lib/cpp"
+#endif
+#ifdef _CRAY
+#define DEFAULT_CPP "/lib/pcpp"
+#endif
+#if defined(__386BSD__)
+#define DEFAULT_CPP "/usr/libexec/cpp"
+#endif
+#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
+#define USE_CC_E
+#endif
+#if defined(__sgi) && defined(__ANSI_CPP__)
+#define USE_CC_E
+#endif
+#if defined(MACH) && !defined(__GNU__)
+#define USE_CC_E
+#endif
+#ifdef __minix_vmd
+#define DEFAULT_CPP "/usr/lib/cpp"
+#endif
+#if defined(__UNIXOS2__)
+/* expects cpp in PATH */
+#define DEFAULT_CPP "cpp"
+#endif
+#ifdef __CYGWIN__
+#define DEFAULT_CC "gcc"
+#define DEFAULT_CPP "/usr/bin/cpp"
+#endif
+#if defined (__QNX__)
+#ifdef __QNXNTO__
+#define DEFAULT_CPP "/usr/bin/cpp"
+#else
+#define DEFAULT_CPP "/usr/X11R6/bin/cpp"
+#endif
+#endif
+#if defined(__GNUC__) && !defined(USE_CC_E)
+#define USE_CC_E
+#ifndef DEFAULT_CC
+#define DEFAULT_CC "gcc"
+#endif
+#endif
+
+#endif /* !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) */
+/*
+ * Step 5: cpp_argv
+ * The following table contains the flags that should be passed
+ * whenever a Makefile is being generated. If your preprocessor
+ * doesn't predefine any unique symbols, choose one and add it to the
+ * end of this table. Then, do the following:
+ *
+ * a. Use this symbol in Imake.cf when setting MacroFile.
+ * b. Put this symbol in the definition of BootstrapCFlags in your
+ * <platform>.cf file.
+ * c. When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol"
+ * to the end of the command line.
+ *
+ * Note that you may define more than one symbol (useful for platforms
+ * that support multiple operating systems).
+ */
+
+#define ARGUMENTS 50 /* number of arguments in various arrays */
+#if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
+char *cpp_argv[ARGUMENTS] = {
+ "cc", /* replaced by the actual program to exec */
+ "-I.", /* add current directory to include path */
+#if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 103080000
+#ifdef unix
+ "-Uunix", /* remove unix symbol so that filename unix.c okay */
+#endif
+#endif
+#if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
+ defined(__FreeBSD__) || defined(__DragonFly__) || defined(MACH) || \
+ defined(linux) || defined(__GNU__) || defined(__bsdi__) || \
+ defined(__GNUC__) || defined(__GLIBC__)
+# ifdef __i386__
+ "-D__i386__",
+# if defined(__GNUC__) && (__GNUC__ >= 3)
+ "-m32",
+# endif
+# endif
+# ifdef __i486__
+ "-D__i486__",
+# endif
+# ifdef __i586__
+ "-D__i586__",
+# endif
+# ifdef __i686__
+ "-D__i686__",
+# endif
+# ifdef __k6__
+ "-D__k6__",
+# endif
+# ifdef __ia64__
+ "-D__ia64__",
+# endif
+# ifdef __amd64__
+ "-D__amd64__",
+# endif
+# ifdef __x86_64__
+ "-D__amd64__",
+# endif
+# ifdef __s390__
+ "-D__s390__",
+# endif
+# ifdef __alpha__
+ "-D__alpha__",
+# endif
+# ifdef __arm__
+ "-D__arm__",
+# endif
+# ifdef __s390x__
+ "-D__s390x__",
+# endif
+# ifdef __sparc__
+ "-D__sparc__",
+# endif
+# ifdef __m68k__
+ "-D__m68k__",
+# endif
+# ifdef __hppa__
+ "-D__hppa__",
+# endif
+# ifdef __sh__
+ "-D__sh__",
+# endif
+# ifdef __sh3__
+ "-D__sh3__",
+# endif
+# ifdef __SH3__
+ "-D__SH3__",
+# endif
+# ifdef __SH4__
+ "-D__SH4__",
+# endif
+# ifdef __SH4NOFPU__
+ "-D__SH4_NOFPU__",
+# endif
+# ifdef __GNUC__
+ "-traditional",
+# endif
+#endif
+#ifdef M4330
+ "-DM4330", /* Tektronix */
+#endif
+#ifdef M4310
+ "-DM4310", /* Tektronix */
+#endif
+#if defined(macII) || defined(_AUX_SOURCE)
+ "-DmacII", /* Apple A/UX */
+#endif
+#if defined(USL) || defined(__UNIXWARE__) || \
+ (defined(__USLC__) && !defined(_SCO_DS))
+ "-D__UNIXWARE__", /* SCO UnixWare 7 */
+#endif
+#ifdef sony
+ "-Dsony", /* Sony */
+#if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
+ "-Dbsd43",
+#endif
+#endif
+#ifdef _IBMR2
+ "-D_IBMR2", /* IBM RS-6000 (we ensured that aix is defined above */
+#ifndef aix
+#define aix /* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
+#endif
+#endif /* _IBMR2 */
+#ifdef aix
+ "-Daix", /* AIX instead of AOS */
+#ifndef ibm
+#define ibm /* allow BOOTSTRAPCFLAGS="-Daix" */
+#endif
+#endif /* aix */
+#ifdef ibm
+ "-Dibm", /* IBM PS/2 and RT under both AOS and AIX */
+#endif
+#ifdef luna
+ "-Dluna", /* OMRON luna 68K and 88K */
+#ifdef luna1
+ "-Dluna1",
+#endif
+#ifdef luna88k /* need not on UniOS-Mach Vers. 1.13 */
+ "-traditional", /* for some older version */
+#endif /* instead of "-DXCOMM=\\#" */
+#ifdef uniosb
+ "-Duniosb",
+#endif
+#ifdef uniosu
+ "-Duniosu",
+#endif
+#endif /* luna */
+#ifdef _CRAY /* Cray */
+ "-Ucray",
+#endif
+#ifdef Mips
+ "-DMips", /* Define and use Mips for Mips Co. OS/mach. */
+# if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
+ "-DBSD43", /* Mips RISCOS supports two environments */
+# else
+ "-DSYSV", /* System V environment is the default */
+# endif
+#endif /* Mips */
+#ifdef MOTOROLA
+ "-DMOTOROLA", /* Motorola Delta Systems */
+# ifdef SYSV
+ "-DSYSV",
+# endif
+# ifdef SVR4
+ "-DSVR4",
+# endif
+#endif /* MOTOROLA */
+#if defined(M_UNIX) || defined(sco) || defined(__SCO__) || \
+ defined(_SCO_DS) || defined(__OPENSERVER__)
+ "-D__SCO__",
+ "-DSYSV",
+#endif
+#ifdef i386
+ "-Di386",
+# ifdef SVR4
+ "-DSVR4",
+# endif
+# ifdef SYSV
+ "-DSYSV",
+# ifdef ISC
+ "-DISC",
+# ifdef ISC40
+ "-DISC40", /* ISC 4.0 */
+# else
+# ifdef ISC202
+ "-DISC202", /* ISC 2.0.2 */
+# else
+# ifdef ISC30
+ "-DISC30", /* ISC 3.0 */
+# else
+ "-DISC22", /* ISC 2.2.1 */
+# endif
+# endif
+# endif
+# endif
+# if (_SCO_DS - 0 == 1)
+ "-DSCO325",
+# endif
+# if (_SCO_DS - 0 > 1)
+ "-DSCO5V6",
+# endif
+# endif
+# ifdef ESIX
+ "-DESIX",
+# endif
+# ifdef ATT
+ "-DATT",
+# endif
+# ifdef DELL
+ "-DDELL",
+# endif
+#endif
+#ifdef SYSV386 /* System V/386 folks, obsolete */
+ "-Di386",
+# ifdef SVR4
+ "-DSVR4",
+# endif
+# ifdef ISC
+ "-DISC",
+# ifdef ISC40
+ "-DISC40", /* ISC 4.0 */
+# else
+# ifdef ISC202
+ "-DISC202", /* ISC 2.0.2 */
+# else
+# ifdef ISC30
+ "-DISC30", /* ISC 3.0 */
+# else
+ "-DISC22", /* ISC 2.2.1 */
+# endif
+# endif
+# endif
+# endif
+# if (_SCO_DS - 0 == 1)
+ "-DSCO325",
+# endif
+# if (_SCO_DS - 0 > 1)
+ "-DSCO5V6",
+# endif
+# ifdef ESIX
+ "-DESIX",
+# endif
+# ifdef ATT
+ "-DATT",
+# endif
+# ifdef DELL
+ "-DDELL",
+# endif
+#endif
+#ifdef __osf__
+ "-D__osf__",
+# ifdef __mips__
+ "-D__mips__",
+# endif
+# ifdef __alpha
+ "-D__alpha",
+# endif
+# ifdef __amiga__
+ "-D__amiga__",
+# endif
+# ifdef __alpha__
+ "-D__alpha__",
+# endif
+# ifdef __i386__
+ "-D__i386__",
+# endif
+# ifdef __GNUC__
+ "-traditional",
+# endif
+#endif
+#ifdef Oki
+ "-DOki",
+#endif
+#ifdef sun
+#if defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__)
+ "-DSVR4",
+#endif
+# ifdef __sparcv9
+ "-D__sparcv9",
+# endif
+# ifdef __amd64
+ "-D__amd64",
+# endif
+#endif
+#ifdef WIN32
+ "-DWIN32",
+#ifndef __GNUC__
+ "-nologo",
+#if _MSC_VER < 1000
+ "-batch",
+#endif
+#endif
+ "-D__STDC__",
+#endif
+#ifdef NCR
+ "-DNCR", /* NCR */
+#endif
+#ifdef linux
+ "-Dlinux",
+#endif
+#if defined(__CYGWIN__)
+ "-traditional",
+#endif
+#if defined(Lynx) || defined(__Lynx__)
+ "-traditional",
+#if 0
+ "-DLYNX", /* do we really need this?? */
+#endif
+ "-DLynx",
+# ifdef ppc
+ "-Dppc",
+# endif
+# ifdef ppc64
+ "-Dppc64",
+# endif
+# if defined(m68k) || defined(M68k) || defined(m68040)
+ "-Dm68k",
+ "-DM68k",
+# endif
+# ifdef uSPARC1
+ "-Dsparc",
+# endif
+#endif
+#ifdef __uxp__
+ "-D__uxp__",
+#endif
+#ifdef __sxg__
+ "-D__sxg__",
+#endif
+#ifdef nec_ews_svr2
+ "-Dnec_ews_svr2",
+#endif
+#ifdef AMOEBA
+ "-DAMOEBA",
+# ifdef CROSS_COMPILE
+ "-DCROSS_COMPILE",
+# ifdef CROSS_i80386
+ "-Di80386",
+# endif
+# ifdef CROSS_sparc
+ "-Dsparc",
+# endif
+# ifdef CROSS_mc68000
+ "-Dmc68000",
+# endif
+# else
+# ifdef i80386
+ "-Di80386",
+# endif
+# ifdef sparc
+ "-Dsparc",
+# endif
+# ifdef mc68000
+ "-Dmc68000",
+# endif
+# endif
+#endif
+#if defined(__sgi) && defined(__ANSI_CPP__)
+ "-cckr",
+#endif
+#ifdef __minix_vmd
+ "-Dminix",
+#endif
+
+#if defined(__UNIXOS2__)
+ "-traditional",
+ "-Demxos2",
+#endif
+#ifdef MetroLink
+ "-DMetroLink",
+# ifdef SVR4
+ "-DSVR4",
+# endif
+#endif
+#ifdef __powerpc__
+ "-D__powerpc__",
+#endif
+#ifdef __powerpc64__
+ "-D__powerpc64__",
+#endif
+#ifdef PowerMAX_OS
+ "-DPowerMAX_OS",
+#endif
+#if defined (__QNX__) && !defined(__QNXNTO__)
+ "-traditional",
+ "-D__QNX__",
+#endif
+
+#if defined(__QNXNTO__)
+ "-traditional",
+ "-D__QNXNTO__",
+#if defined(i386)
+ "-Di386",
+#endif
+#if defined(__i386__)
+ "-D__i386__",
+#endif
+#if defined(PPC)
+ "-DPPC",
+#endif
+#if defined(MIPS)
+ "-DMIPS",
+#endif
+#endif
+
+#if defined(__APPLE__)
+ "-D__APPLE__",
+ "-D__DARWIN__",
+# ifdef __ppc__
+ "-D__ppc__",
+# endif
+# ifdef __ppc64__
+ "-D__ppc64__",
+# endif
+# ifdef __i386__
+ "-D__i386__",
+# endif
+#endif
+};
+#endif /* CROSSCOMPILE */
+
+
+/*
+ * Step 6: DEFAULT_OS_MAJOR_REV, DEFAULT_OS_MINOR_REV, DEFAULT_OS_TEENY_REV,
+ * and DEFAULT_OS_NAME.
+ * If your system provides a way to generate the default major,
+ * minor, teeny, or system names at runtime add commands below.
+ * The syntax of the _REV strings is 'f fmt' where 'f' is an argument
+ * you would give to uname, and "fmt" is a scanf() format string.
+ * Supported uname arguments are "snrvm", and if you specify multiple
+ * arguments they will be separated by spaces. No more than 5 arguments
+ * may be given. Unlike uname() order of arguments matters.
+ *
+ * DEFAULT_OS_MAJOR_REV_FROB, DEFAULT_OS_MINOR_REV_FROB,
+ * DEFAULT_OS_TEENY_REV_FROB, and DEFAULT_OS_NAME_FROB can be used to
+ * modify the results of the use of the various strings.
+ */
+#if !defined CROSSCOMPILE || defined CROSSCOMPILE_CPP
+# if defined(aix)
+/* uname -v returns "x" (e.g. "4"), and uname -r returns "y" (e.g. "1") */
+# define DEFAULT_OS_MAJOR_REV "v %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %[0-9]"
+/* No information available to generate default OSTeenyVersion value. */
+# define DEFAULT_OS_NAME "srvm %[^\n]"
+# elif defined(sun) || defined(sgi) || defined(ultrix) || defined(__uxp__) || defined(sony)
+/* uname -r returns "x.y[.z]", e.g. "5.4" or "4.1.3" */
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
+# define DEFAULT_OS_NAME "srvm %[^\n]"
+# elif defined(hpux)
+/* uname -r returns "W.x.yz", e.g. "B.10.01" */
+# define DEFAULT_OS_MAJOR_REV "r %*[^.].%[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*[^.].%*d.%1s"
+# define DEFAULT_OS_TEENY_REV "r %*[^.].%*d.%*c%[0-9]"
+# define DEFAULT_OS_NAME "srvm %[^\n]"
+# elif defined(USL) || defined(__USLC__) || defined(__UNIXWARE__) || \
+ defined(__SCO__) || defined(__OPENSERVER__) || defined(_SCO_DS)
+/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
+# define DEFAULT_OS_MAJOR_REV "v %[0-9]"
+# define DEFAULT_OS_MINOR_REV "v %*d.%1s"
+# define DEFAULT_OS_TEENY_REV "v %*d.%*c%[.0-9]"
+# define DEFAULT_OS_NAME "srvm %[^\n]"
+# elif defined(__APPLE__)
+/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]" /* this will just get 0 */
+# define DEFAULT_OS_NAME "s %[^\n]"
+# elif defined(__osf__)
+/* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */
+# define DEFAULT_OS_MAJOR_REV "r %*[^0-9]%[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*[^.].%[0-9]"
+# define DEFAULT_OS_NAME "srvm %[^\n]"
+# elif defined(__uxp__)
+/* NOTE: "x.y[.z]" above handles UXP/DF. This is a sample alternative. */
+/* uname -v returns "VxLy Yzzzzz ....", e.g. "V20L10 Y95021 Increment 5 ..." */
+# define DEFAULT_OS_MAJOR_REV "v V%[0-9]"
+# define DEFAULT_OS_MINOR_REV "v V%*dL%[0-9]"
+# define DEFAULT_OS_NAME "srvm %[^\n]"
+# elif defined(linux) || defined(__bsdi__)
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
+# define DEFAULT_OS_NAME "srm %[^\n]"
+# if defined(linux) && defined (CROSSCOMPILE_CPP)
+# define CROSS_UTS_SYSNAME "Linux"
+# include <linux/version.h>
+# define CROSS_UTS_RELEASE UTS_RELEASE
+# endif
+# elif defined(__CYGWIN__)
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
+# define DEFAULT_OS_NAME "srm %[^\n]"
+# if defined(__CYGWIN__) && defined (CROSSCOMPILE_CPP)
+# define CROSS_UTS_SYSNAME "Cygwin"
+# include <cygwin/version.h>
+# define CROSS_UTS_RELEASE "1.3.12"
+# endif
+# elif defined(__GNU__)
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_NAME "srm %[^\n]"
+# elif defined(ISC)
+/* ISC all Versions ? */
+/* uname -r returns "x.y", e.g. "3.2" ,uname -v returns "x" e.g. "2" */
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "v %[0-9]"
+/* # define DEFAULT_OS_NAME "srm %[^\n]" */ /* Not useful on ISC */
+# elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__)
+/* BSD/OS too? */
+/* uname -r returns "x.y[.z]-mumble", e.g. "2.1.5-RELEASE" or "2.2-0801SNAP" */
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
+# define DEFAULT_OS_NAME "srm %[^\n]"
+# if defined(__FreeBSD__) || defined(__DragonFly__)
+/* Use an alternate way to find the teeny version for -STABLE, -SNAP versions */
+# ifndef CROSSCOMPILE_CPP
+# define DEFAULT_OS_TEENY_REV_FROB(buf, size) \
+ do { \
+ if (*buf == 0) { \
+ int __mib[2]; \
+ size_t __len; \
+ int __osrel; \
+ \
+ __mib[0] = CTL_KERN; \
+ __mib[1] = KERN_OSRELDATE; \
+ __len = sizeof(__osrel); \
+ sysctl(__mib, 2, &__osrel, &__len, NULL, 0); \
+ if (__osrel < 210000) { \
+ if (__osrel < 199607) \
+ buf[0] = '0'; \
+ else if (__osrel < 199612) \
+ buf[0] = '5'; \
+ else if (__osrel == 199612) \
+ buf[0] = '6'; \
+ else \
+ buf[0] = '8'; /* guess */ \
+ } else { \
+ buf[0] = ((__osrel / 1000) % 10) + '0'; \
+ } \
+ buf[1] = 0; \
+ } \
+ } while (0)
+# endif
+# else
+ /* OpenBSD - Add DEFAULT_MACHINE_ARCHITECTURE */
+# define DEFAULT_MACHINE_ARCHITECTURE "m %[^\n]"
+# endif
+# elif defined(__NetBSD__)
+/*
+ * uname -r returns "x.y([ABCD...]|_mumble)", e.g.:
+ * 1.2 1.2_BETA 1.2A 1.2B
+ *
+ * That means that we have to do something special to turn the
+ * TEENY revision into a form that we can use (i.e., a string of
+ * decimal digits).
+ *
+ * We also frob the name DEFAULT_OS_NAME so that it looks like the
+ * 'standard' NetBSD name for the version, e.g. "NetBSD/i386 1.2B" for
+ * NetBSD 1.2B on an i386.
+ */
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "r %*d.%*d%[A-Z]"
+# define DEFAULT_OS_TEENY_REV_FROB(buf, size) \
+ do { \
+ int teeny = 0; \
+ char *ptr = (buf); \
+ \
+ while (*ptr >= 'A' && *ptr <= 'Z') /* sanity check */ \
+ teeny = teeny * 26 + (int)(*ptr++ - 'A'); \
+ \
+ snprintf((buf), (size), "%d", teeny + 1); \
+ } while (0)
+# define DEFAULT_OS_NAME "smr %[^\n]"
+# define DEFAULT_OS_NAME_FROB(buf, size) \
+ do { \
+ char *__sp; \
+ if ((__sp = strchr((buf), ' ')) != NULL) \
+ *__sp = '/'; \
+ } while (0)
+# elif defined(__Lynx__) || defined(Lynx)
+/* Lynx 2.4.0 /bin/cc doesn't like #elif */
+# define DEFAULT_OS_MAJOR_REV "r %[0-9]"
+# define DEFAULT_OS_MINOR_REV "r %*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "r %*d.%*d.%[0-9]"
+# define DEFAULT_OS_NAME "srm %[^\n]"
+# elif defined(_SEQUENT_)
+/* uname -v returns 'Vx.y.z', e.g. 'V4.4.2' */
+# define DEFAULT_OS_MAJOR_REV "v V%[0-9]"
+# define DEFAULT_OS_MINOR_REV "v V%*d.%[0-9]"
+# define DEFAULT_OS_TEENY_REV "v V%*d.%*d.%[0-9]"
+# define DEFAULT_OS_NAME "s %[^\n]"
+# endif
+#endif /* !defined CROSSCOMPILE || defined CROSSCOMPILE_CPP */
+
+# if defined (CROSSCOMPILE_CPP)
+# ifndef CROSS_UTS_SYSNAME
+char *cross_uts_sysname = "";
+# else
+char *cross_uts_sysname = CROSS_UTS_SYSNAME;
+# endif
+# ifndef CROSS_UTS_RELEASE
+char* cross_uts_release = "";
+# else
+char* cross_uts_release = CROSS_UTS_RELEASE;
+# endif
+# ifndef CROSS_UTS_MACHINE
+char *cross_uts_machine = "";
+# else
+char *cross_uts_machine = CROSS_UTS_MACHINE;
+# endif
+# ifndef CROSS_UTS_VERSION
+char * cross_uts_version = "";
+# else
+char * cross_uts_version = CROSS_UTS_VERSION;
+# endif
+# ifdef DEFAULT_OS_NAME
+char *defaultOsName = DEFAULT_OS_NAME;
+# else
+char *defaultOsName = NULL;
+# endif
+# ifdef DEFAULT_OS_MAJOR_REV
+char *defaultOsMajorRev = DEFAULT_OS_MAJOR_REV;
+# else
+char *defaultOsMajorRev = NULL;
+# endif
+# ifdef DEFAULT_OS_MINOR_REV
+char *defaultOsMinorRev = DEFAULT_OS_MINOR_REV;
+# else
+char *defaultOsMinorRev = NULL;
+# endif
+# ifdef DEFAULT_OS_TEENY_REV
+char *defaultOsTeenyRev = DEFAULT_OS_TEENY_REV;
+# else
+char *defaultOsTeenyRev = NULL;
+# endif
+# ifdef DEFAULT_MACHINE_ARCHITECTURE
+char *defaultMachineArchitecture = DEFAULT_MACHINE_ARCHITECTURE;
+# else
+char *defaultMachineArchitecture = NULL;
+# endif
+# ifdef DEFAULT_OS_NAME_FROB
+void defaultOsNameFrob(char *buf, int size)
+{DEFAULT_OS_NAME_FROB(buf,size)}
+# else
+void (*defaultOsNameFrob)(char *buf, int size) = NULL;
+# endif
+# ifdef DEFAULT_OS_MAJOR_REV_FROB
+void defaultOsMajorRevFrob(char *buf, int size)
+{DEFAULT_OS_MAJOR_REV_FROB(buf,size)}
+# else
+void (*defaultOsMajorRevFrob)(char *buf, int size) = NULL;
+# endif
+# ifdef DEFAULT_OS_MINOR_REV_FROB
+void defaultOsMinorRevFrob(char *buf, int size)
+{DEFAULT_OS_MINOR_REV_FROB(buf,size)}
+# else
+void (*defaultOsMinorRevFrob)(char *buf, int size) = NULL;
+# endif
+# ifdef DEFAULT_OS_TEENY_REV_FROB
+void defaultOsTeenyRevFrob(char *buf, int size)
+{DEFAULT_OS_TEENY_REV_FROB(buf,size)}
+# else
+void (*defaultOsTeenyRevFrob)(char *buf, int size) = NULL;
+# endif
+# endif /* CROSSCOMPILE_CPP */
+
+#else /* else MAKEDEPEND */
+#if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
+/*
+ * Step 7: predefs
+ * If your compiler and/or preprocessor define any specific symbols, add
+ * them to the the following table. The definition of struct symtab is
+ * in util/makedepend/def.h.
+ */
+#undef DEF_EVALUATE
+#undef DEF_STRINGIFY
+#define DEF_EVALUATE(__x) #__x
+#define DEF_STRINGIFY(_x) DEF_EVALUATE(_x)
+struct symtab predefs[] = {
+#ifdef apollo
+ {"apollo", "1"},
+#endif
+#if defined(clipper) || defined(__clipper__)
+ {"clipper", "1"},
+ {"__clipper__", "1"},
+ {"clix", "1"},
+ {"__clix__", "1"},
+#endif
+#ifdef ibm032
+ {"ibm032", "1"},
+#endif
+#ifdef ibm
+ {"ibm", "1"},
+#endif
+#ifdef aix
+ {"aix", "1"},
+#endif
+#ifdef sun
+ {"sun", "1"},
+#endif
+#ifdef sun2
+ {"sun2", "1"},
+#endif
+#ifdef sun3
+ {"sun3", "1"},
+#endif
+#ifdef sun4
+ {"sun4", "1"},
+#endif
+#ifdef sparc
+ {"sparc", "1"},
+#endif
+#ifdef __sparc
+ {"__sparc", "1"},
+#endif
+#ifdef __sparcv9
+ {"__sparcv9", "1"},
+#endif
+#ifdef __sparc__
+ {"__sparc__", "1"},
+#endif
+#ifdef __sparcv9__
+ {"__sparcv9__", "1"},
+#endif
+#ifdef hpux
+ {"hpux", "1"},
+#endif
+#ifdef __hpux
+ {"__hpux", "1"},
+#endif
+#ifdef __hp9000s800
+ {"__hp9000s800", "1"},
+#endif
+#ifdef __hp9000s700
+ {"__hp9000s700", "1"},
+#endif
+#ifdef vax
+ {"vax", "1"},
+#endif
+#ifdef VMS
+ {"VMS", "1"},
+#endif
+#ifdef cray
+ {"cray", "1"},
+#endif
+#ifdef CRAY
+ {"CRAY", "1"},
+#endif
+#ifdef _CRAY
+ {"_CRAY", "1"},
+#endif
+#ifdef att
+ {"att", "1"},
+#endif
+#ifdef mips
+ {"mips", "1"},
+#endif
+#ifdef __mips__
+ {"__mips__", "1"},
+#endif
+#ifdef ultrix
+ {"ultrix", "1"},
+#endif
+#ifdef stellar
+ {"stellar", "1"},
+#endif
+#ifdef mc68000
+ {"mc68000", "1"},
+#endif
+#ifdef mc68020
+ {"mc68020", "1"},
+#endif
+#ifdef __GNUC__
+ {"__GNUC__", DEF_STRINGIFY(__GNUC__)},
+#endif
+#ifdef __STRICT_ANSI__
+ {"__STRICT_ANSI__", "1"},
+#endif
+#ifdef __STDC__
+ {"__STDC__", DEF_STRINGIFY(__STDC__)},
+#endif
+#ifdef __HIGHC__
+ {"__HIGHC__", "1"},
+#endif
+#ifdef __OPENSERVER__
+ {"__OPENSERVER__", DEF_STRINGIFY(__OPENSERVER__)},
+#endif
+#ifdef _SCO_DS
+ {"_SCO_DS", DEF_STRINGIFY(_SCO_DS)},
+#endif
+#ifdef _SCO_DS_LL
+ {"_SCO_DS_LL", DEF_STRINGIFY(_SCO_DS_LL)},
+#endif
+#ifdef __SCO_VERSION__
+ {"__SCO_VERSION__", DEF_STRINGIFY(__SCO_VERSION__)},
+#endif
+#ifdef __UNIXWARE__
+ {"__UNIXWARE__", DEF_STRINGIFY(__UNIXWARE__)},
+#endif
+#ifdef __USLC__
+ {"__USLC__", DEF_STRINGIFY(__USLC__)},
+#endif
+#ifdef CMU
+ {"CMU", "1"},
+#endif
+#ifdef luna
+ {"luna", "1"},
+#ifdef luna1
+ {"luna1", "1"},
+#endif
+#ifdef luna2
+ {"luna2", "1"},
+#endif
+#ifdef luna88k
+ {"luna88k", "1"},
+#endif
+#ifdef uniosb
+ {"uniosb", "1"},
+#endif
+#ifdef uniosu
+ {"uniosu", "1"},
+#endif
+#endif
+#ifdef ieeep754
+ {"ieeep754", "1"},
+#endif
+#ifdef is68k
+ {"is68k", "1"},
+#endif
+#ifdef m68k
+ {"m68k", "1"},
+#endif
+#ifdef M68k
+ {"M68k", "1"},
+#endif
+#ifdef __m68k__
+ {"__m68k__", "1"},
+#endif
+#ifdef m88k
+ {"m88k", "1"},
+#endif
+#ifdef __m88k__
+ {"__m88k__", "1"},
+#endif
+#ifdef bsd43
+ {"bsd43", "1"},
+#endif
+#ifdef hcx
+ {"hcx", "1"},
+#endif
+#ifdef sony
+ {"sony", "1"},
+#ifdef SYSTYPE_SYSV
+ {"SYSTYPE_SYSV", "1"},
+#endif
+#ifdef _SYSTYPE_SYSV
+ {"_SYSTYPE_SYSV", "1"},
+#endif
+#endif
+#ifdef __OSF__
+ {"__OSF__", "1"},
+#endif
+#ifdef __osf__
+ {"__osf__", "1"},
+#endif
+#ifdef __amiga__
+ {"__amiga__", "1"},
+#endif
+#ifdef __alpha
+ {"__alpha", "1"},
+#endif
+#ifdef __alpha__
+ {"__alpha__", "1"},
+#endif
+#ifdef __DECC
+ {"__DECC", "1"},
+#endif
+#ifdef __decc
+ {"__decc", "1"},
+#endif
+#ifdef __unix__
+ {"__unix__", "1"},
+#endif
+#ifdef __uxp__
+ {"__uxp__", "1"},
+#endif
+#ifdef __sxg__
+ {"__sxg__", "1"},
+#endif
+#ifdef _SEQUENT_
+ {"_SEQUENT_", "1"},
+ {"__STDC__", "1"},
+#endif
+#ifdef __bsdi__
+ {"__bsdi__", "1"},
+#endif
+#ifdef nec_ews_svr2
+ {"nec_ews_svr2", "1"},
+#endif
+#ifdef nec_ews_svr4
+ {"nec_ews_svr4", "1"},
+#endif
+#ifdef _nec_ews_svr4
+ {"_nec_ews_svr4", "1"},
+#endif
+#ifdef _nec_up
+ {"_nec_up", "1"},
+#endif
+#ifdef SX
+ {"SX", "1"},
+#endif
+#ifdef nec
+ {"nec", "1"},
+#endif
+#ifdef _nec_ft
+ {"_nec_ft", "1"},
+#endif
+#ifdef PC_UX
+ {"PC_UX", "1"},
+#endif
+#ifdef sgi
+ {"sgi", "1"},
+#endif
+#ifdef __sgi
+ {"__sgi", "1"},
+#endif
+#ifdef _MIPS_FPSET
+ {"_MIPS_FPSET", DEF_STRINGIFY(_MIPS_FPSET)},
+#endif
+#ifdef _MIPS_ISA
+ {"_MIPS_ISA", DEF_STRINGIFY(_MIPS_ISA)},
+#endif
+#ifdef _MIPS_SIM
+ {"_MIPS_SIM", DEF_STRINGIFY(_MIPS_SIM)},
+#endif
+#ifdef _MIPS_SZINT
+ {"_MIPS_SZINT", DEF_STRINGIFY(_MIPS_SZINT)},
+#endif
+#ifdef _MIPS_SZLONG
+ {"_MIPS_SZLONG", DEF_STRINGIFY(_MIPS_SZLONG)},
+#endif
+#ifdef _MIPS_SZPTR
+ {"_MIPS_SZPTR", DEF_STRINGIFY(_MIPS_SZPTR)},
+#endif
+#ifdef __DragonFly__
+ {"__DragonFly__", "1"},
+#endif
+#ifdef __FreeBSD__
+ {"__FreeBSD__", "1"},
+#endif
+#ifdef __OpenBSD__
+ {"__OpenBSD__", "1"},
+#endif
+#ifdef __NetBSD__
+ {"__NetBSD__", "1"},
+#endif
+#ifdef __GNU__
+ {"__GNU__", "1"},
+#endif
+#ifdef __ELF__
+ {"__ELF__", "1"},
+#endif
+#ifdef __UNIXOS2__
+ {"__UNIXOS2__", "1"},
+#endif
+#if defined(__QNX__)
+ {"__QNX__", "1"},
+#endif
+#ifdef __QNXNTO__
+ {"__QNXNTO__", "1"},
+#endif
+# ifdef __powerpc__
+ {"__powerpc__", "1"},
+# endif
+# ifdef __powerpc64__
+ {"__powerpc64__", "1"},
+# endif
+# ifdef PowerMAX_OS
+ {"PowerMAX_OS", "1"},
+# endif
+# ifdef ia64
+ {"ia64", "1"},
+# endif
+# ifdef __ia64__
+ {"__ia64__", "1"},
+# endif
+# if defined (amd64) || defined (x86_64)
+ {"amd64", "1"},
+ {"x86_64", "1"},
+# endif
+# if defined (__amd64__) || defined (__x86_64__)
+ {"__amd64__", "1"},
+ {"__x86_64__", "1"},
+# endif
+# if defined (__amd64) || defined(__x86_64)
+ {"__amd64", "1"},
+ {"__x86_64", "1"},
+# endif
+# ifdef __x86
+ {"__x86", "1"},
+# endif
+# ifdef __i386
+ {"__i386", "1"},
+# endif
+# ifdef __i386__
+ {"__i386__", "1"},
+# endif
+# ifdef __i486__
+ {"__i486__", "1"},
+# endif
+# ifdef __i586__
+ {"__i586__", "1"},
+# endif
+# ifdef __i686__
+ {"__i686__", "1"},
+# endif
+# ifdef __k6__
+ {"__k6__", "1"},
+# endif
+# ifdef i386
+ {"i386", "1"},
+# endif
+# ifdef i486
+ {"i486", "1"},
+# endif
+# ifdef i586
+ {"i586", "1"},
+# endif
+# ifdef i686
+ { "i686", "1"},
+# endif
+# ifdef k6
+ {"k6", "1"},
+# endif
+# ifdef sparc
+ {"sparc", "1"},
+# endif
+# ifdef __sparc__
+ {"__sparc__", "1"},
+# endif
+# ifdef __s390__
+ {"__s390__", "1"},
+# endif
+# ifdef __hppa__
+ {"__hppa__", "1"},
+# endif
+# ifdef __sh__
+ {"__sh__", "1"},
+# endif
+# ifdef __sh3_
+ {"__sh3__", "1"},
+# endif
+# ifdef __SH3__
+ {"__SH3__", "1"},
+# endif
+# ifdef __SH4__
+ {"__SH4__", "1"},
+# endif
+# ifdef __SH4NOFPU__
+ {"__SH4NOFPU__", "1"},
+# endif
+#if defined(__ppc__)
+ {"__ppc__", "1"},
+#endif
+#if defined(__ppc64__)
+ {"__ppc64__", "1"},
+#endif
+#if defined(__BIG_ENDIAN__)
+ {"__BIG_ENDIAN__", "1"},
+#endif
+#if defined(__LITTLE_ENDIAN__)
+ {"__LITTLE_ENDIAN__", "1"},
+#endif
+#if defined (__CHAR_BIT__)
+ {"__CHAR_BIT__", DEF_STRINGIFY(__CHAR_BIT__)},
+#endif
+#if defined (__BUILTIN_VA_STRUCT)
+ {"__BUILTIN_VA_STRUCT", "1"},
+#endif
+#if defined (__BUILTIN_VA_ARG_INCR)
+ {"__BUILTIN_VA_ARG_INCR", "1"},
+#endif
+ /* add any additional symbols before this line */
+ {NULL, NULL}
+};
+#undef DEF_EVALUATE
+#undef DEF_STRINGIFY
+#endif /* CROSSCOMPILE */
+#endif /* MAKEDEPEND */
+
+# ifndef MAKEDEPEND
+# if defined (CROSSCOMPILE_CPP)
+# ifdef USE_CC_E
+boolean crosscompile_use_cc_e = TRUE;
+# ifdef DEFAULT_CC
+char* crosscompile_cpp = DEFAULT_CC;
+# else
+char* crosscompile_cpp = "cc";
+# endif
+# else
+boolean crosscompile_use_cc_e = FALSE;
+# ifdef DEFAULT_CPP
+char* crosscompile_cpp = DEFAULT_CPP;
+# else
+char* crosscompile_cpp = "cpp";
+# endif
+# endif
+# ifdef FIXUP_CPP_WHITESPACE
+boolean fixup_whitespace = TRUE;
+# else
+boolean fixup_whitespace = FALSE;
+# endif
+# ifdef REMOVE_CPP_LEADSPACE
+boolean remove_cpp_leadspace = TRUE;
+# else
+boolean remove_cpp_leadspace = FALSE;
+# endif
+# ifdef INLINE_SYNTAX
+boolean inline_syntax = TRUE;
+# else
+boolean inline_syntax = FALSE;
+# endif
+# ifdef MAGIC_MAKE_VARS
+boolean magic_make_vars = TRUE;
+# else
+boolean magic_make_vars = FALSE;
+# endif
+
+typedef enum {
+ unknown,
+ freeBSD,
+ netBSD,
+ LinuX,
+ emx,
+ win32,
+ dragonfly
+} System;
+
+# if defined(linux) || defined(__GLIBC__)
+System sys = LinuX;
+# elif defined __FreeBSD__
+System sys = freebsd;
+# elif defined __NetBSD__
+System sys = netBSD;
+# elif defined __EMX__
+System sys = emx;
+# elif defined WIN32
+System sys = win32;
+# elif defined __DragonFly__
+System sys = dragonfly;
+# else
+System sys = unknown;
+# endif
+
+# if defined __GNUC__
+int gnu_c = __GNUC__;
+int gnu_c_minor = __GNUC_MINOR__;
+# else
+int gnu_c = 0;
+int gnu_c_minor = -1;
+# endif
+# if defined(linux) || defined(__GLIBC__)
+# include <features.h>
+int glibc_major = __GLIBC__ + 4;
+int glibc_minor = __GLIBC_MINOR__;
+# else
+int glibc_major = 0;
+int glibc_minor = -1;
+# endif
+# endif /* !CROSSCOMPILE || CROSSCOMPILE_CPP */
+
+# endif /* MAKEDEPEND */
+
+#endif /* CCIMAKE */
diff --git a/nx-X11/config/imake/imakesvc.cmd b/nx-X11/config/imake/imakesvc.cmd
new file mode 100644
index 000000000..1108c3904
--- /dev/null
+++ b/nx-X11/config/imake/imakesvc.cmd
@@ -0,0 +1,302 @@
+/* Rexx OS/2
+ * This script serves as a helper cmd file for imake. Install this in
+ * the path just like imake itself.
+ *
+ * $XFree86: xc/config/imake/imakesvc.cmd,v 3.13 1999/04/29 09:13:23 dawes Exp $
+ */
+'@echo off'
+ADDRESS CMD
+CALL RxFuncAdd 'SysFileDelete', 'RexxUtil', 'SysFileDelete'
+CALL RxFuncAdd 'SysFileTree', 'RexxUtil', 'SysFileTree'
+CALL RxFuncAdd 'SysRmDir', 'RexxUtil', 'SysRmDir'
+CALL RxFuncAdd 'SysMkDir', 'RexxUtil', 'SysMkDir'
+
+PARSE ARG all
+code = WORD(all,1)
+
+SELECT
+ WHEN code=1 THEN DO
+ /* imakesvc 1 u/n dir ruledir top current */
+ instflg = WORD(all,2)
+ imakecmd = '\imake'
+ ruledir = WORD(all,4)
+ topdir = WORD(all,5)
+ currentdir = WORD(all,6)
+ IF instflg = 'u' THEN DO
+ root = VALUE('X11ROOT',,'OS2ENVIRONMENT')
+ IF root = '' THEN DO
+ SAY 'Fatal error: no X11ROOT environment variable found!'
+ EXIT 99
+ END
+ imakecmd = 'imake'
+ IF POS(':',ruledir) = 0 THEN
+ ruledir1 = root||ruledir
+ ELSE
+ ruledir1 = ruledir
+ topdir1 = topdir
+ useinst = '-DUseInstalled'
+ END
+ ELSE DO
+ /* in n mode, we must add a prefix ../ for MakeMakeSubdirs */
+ ruledir1 = '../'||ruledir
+ topdir1 = '../'||topdir
+ useinst = ''
+ END
+
+ ruledir = ruledir1
+ topdir = topdir1
+ curdir = DIRECTORY()
+ dir = fixbadprefix(WORD(all,3))
+ d = DIRECTORY(dir)
+ dirfwd=TRANSLATE(dir,'/','\')
+ RC = SysFileDelete('Makefile.bak')
+ IF exists('Makefile') THEN REN Makefile Makefile.bak
+ /* There is a difficulty in the Imakefiles. Some builds refer
+ * to directories that are in a different subtree. We need to adjust
+ * the CURDIR and TOPDIR and -I paths
+ */
+ IF SUBSTR(dirfwd,1,2)='..' THEN DO
+ /* must recalculate passed topdir, currentdir, and ruledir */
+ ndist = nlevels(topdir)
+ ncurdir = './'striplevel(dirfwd,ndist-1)
+ ntopdir = maketop(nlevels(ncurdir))
+ nruledir = ntopdir||'/config/cf'
+ END
+ ELSE DO
+ /* this is simple it is relative to this dir */
+ pfx = downlevels(dirfwd)
+ nruledir = ruledir
+ IF instflg = 'n' THEN DO /*sm120296*/
+ nruledir = pfx||ruledir
+ END
+ ntopdir = pfx||topdir
+ ncurdir = currentdir /* use to be pfx || currentdir */
+ END
+ imakecmd useinst '-I'nruledir' -DTOPDIR='ntopdir' -DCURDIR='ncurdir'/'dirfwd
+ 'x11make MAKE=x11make SHELL= Makefiles'
+ d = DIRECTORY(curdir)
+ END
+ WHEN code=2 THEN DO
+ /* imakesvc 2 buildincdir buildinctop currentdir file */
+ bid = WORD(all,3)
+ cid = WORD(all,4)
+ fil = WORD(all,5)
+ curdir = DIRECTORY()
+ d = DIRECTORY(WORD(all,2))
+ rc = SysFileDelete(fil)
+ dir = TRANSLATE(bid'/'cid'/'fil,'\','/')
+ COPY dir .' >nul 2>&1 '
+ d = DIRECTORY(curdir)
+ END
+ WHEN code=3 THEN DO
+ /* imakesvc 3 subdir updir file */
+ sdi = WORD(all,2)
+ fil = WORD(all,4)
+ curdir = DIRECTORY()
+ d = DIRECTORY(WORD(all,3))
+ rc = SysFileDelete(fil)
+ dir = TRANSLATE(sdi'/'fil,'\','/')
+ COPY dir' . >nul 2>&1'
+ d = DIRECTORY(curdir)
+ END
+ WHEN code=4 THEN DO
+ /* imakesvc 4 [-r] files... */
+ rec = WORD(all,2)
+ fp = 2
+ IF rec = '-r' THEN fp = 3
+ ELSE rec = '-n'
+ DO i=fp TO WORDS(all)
+ CALL discard rec,TRANSLATE(WORD(all,i),'\','/')
+ END
+ END
+ WHEN code=5 THEN DO
+ /* imakesvc 5 file */
+ file = TRANSLATE(WORD(all,2),'\','/')
+ RC = SysFileDelete(file'.bak')
+ if exists(file) THEN 'REN 'file file||'.bak'
+ END
+ WHEN code=6 THEN DO
+ /* imakesvc 6 file */
+ file = TRANSLATE(WORD(all,2),'\','/')
+ CALL SysFileDelete(file||'.bak')
+ if exists(file) THEN 'REN 'file file||'.bak'
+ END
+ WHEN code=7 THEN DO
+ /* imakesvc 7 from to */
+ from = TRANSLATE(WORD(all,2),'\','/')
+ to = TRANSLATE(WORD(all,3),'\','/')
+ CALL SysFileDelete(to)
+ COPY from to' >nul 2>&1'
+ END
+ WHEN code=8 THEN DO
+ /* imakesvc 8 arg */
+ SAY SUBWORD(TRANSLATE(all,' ','222c'x),2)
+ END
+ WHEN code=9 THEN DO
+ /* imakesvc 9 dst.c incl.h src.c */
+ dst = TRANSLATE(WORD(all,2),'\','/')
+ src = TRANSLATE(WORD(all,4),'\','/')
+ CALL SysFileDelete(dst)
+ CALL LINEOUT dst,'#include "'WORD(all,3)'"'
+ CALL LINEOUT dst,'#include "'src'"'
+ CALL LINEOUT dst
+ END
+ WHEN code=10 THEN DO
+ /* imakesvc 10 srcfile destdir destfile suffix */
+ src = stripsuffix(WORD(all,2))
+ destdir = TRANSLATE(WORD(all,3),'\','/')
+ dest = stripsuffix(WORD(all,4))
+ suffix = WORD(all,5)
+ tgt = destdir'\'dest'.'suffix
+ /* if you have no col.exe get one from 4.4BSD */
+ 'groff -e -t -man -Tascii 'src'.man | col -b >'tgt
+ END
+ WHEN code=11 THEN DO
+ /* imakesvc 11 dirtomake */
+ dirtomake = TRANSLATE(WORD(all,2),'\','/')
+ rc = SysMkDir(dirtomake)
+ END
+ WHEN code=12 THEN DO
+ /* imakesvc 12 srcfile destdir destfile */
+ src = stripsuffix(WORD(all,2))
+ destdir = TRANSLATE(WORD(all,3),'\','/')
+ dest = stripsuffix(WORD(all,4))
+ tgt = destdir'\'dest'.gz'
+ /* if you have no col.exe get one from 4.4BSD */
+ 'groff -e -t -man -Tascii 'src'.man | col -b | gzip -n >'tgt
+ END
+ WHEN code=13 THEN DO
+ /* imakesvc 13 indir fromfile tofile */
+ ind = TRANSLATE(WORD(all,2),'\','/')
+ frm = TRANSLATE(WORD(all,3),'\','/')
+ tof = ind'\'WORD(all,4)
+ IF \(exists(ind)) THEN call SysMkDir ind
+ rc = SysFileDelete(tof)
+ COPY frm' 'tof
+ END
+ WHEN code=14 THEN DO
+ /* imakesvc 14 destdir srcfile... */
+ destdir = TRANSLATE(WORD(all,2),'\','/')
+ DO i=3 TO WORDS(all)
+ src = stripsuffix(WORD(all,i))
+ tgt = destdir'\'src'.gz'
+ 'groff -e -t -man -Tascii 'src'.man | col -b | gzip -n >'tgt
+ END
+ END
+ WHEN code=15 THEN DO
+ /* imakesvc 15 destdir suffix srcfile... */
+ destdir = TRANSLATE(WORD(all,2),'\','/')
+ suffix = WORD(all,3)
+ DO i=4 TO WORDS(all)
+ src = stripsuffix(WORD(all,i))
+ tgt = destdir'\'src'.'suffix
+ 'groff -e -t -man -Tascii 'src'.man | col -b >'tgt
+ END
+ END
+ WHEN code=16 THEN DO
+ /* imakesvc 16 dirlist...*/
+ mkfontdir = TRANSLATE(WORD(all,2),'\','/')
+ earg=''
+ DO i=3 TO WORDS(all)
+ arg = WORD(all,i)
+ earg = earg' -e 'arg
+ END
+ mkfontdir' -r -p inst/ 'earg' .'
+ END
+ OTHERWISE NOP
+END
+RETURN
+
+downlevels:
+oldpos = 1
+pfx = ''
+DO FOREVER
+ newpos = POS('/',ARG(1),oldpos)
+ IF newpos = 0 THEN LEAVE
+ newpfx = '../'pfx
+ oldpos = newpos+1
+ pfx = newpfx
+END
+RETURN pfx
+
+/* returns 1, if file exists */
+exists:
+'DIR "'arg(1)'" >nul 2>&1'
+IF rc = 0 THEN return 1
+RETURN 0
+
+discard: PROCEDURE
+rec=ARG(1)
+files=ARG(2)
+IF rec = '-r' THEN DO
+ old = DIRECTORY()
+ nd = DIRECTORY
+ CALL SysFileTree files, 'deld', 'DO'
+ IF deld.0 > 0 THEN DO
+ DO m=1 TO deld.0
+ CALL DIRECTORY deld.m
+ CALL discard '-R' .
+ CALL DIRECTORY ..
+ CALL SysRmDir deld.m
+ END
+ CALL SysRmDir files
+ END
+ CALL SysFileTree files, 'delf', 'FO'
+ DO k=1 TO delf.0
+ DEL '"'delf.k'"' '>nul 2>&1'
+ END
+ CALL SysRmDir files
+END
+ELSE DO
+ DEL '"'files'"' '>nul 2>&1'
+END
+RETURN
+
+/* somehow make or cmd manages to convert a relative path ..\..\. to ..... */
+fixbadprefix:
+count = 1
+str = ARG(1)
+DO WHILE SUBSTR(str,count,2) = '..'
+ count = count+1
+ str = INSERT('\',str,count)
+ count = count+2
+END
+RETURN str
+
+striplevel:
+str=ARG(1)
+n=arg(2)
+DO count=0 TO n
+ p = POS('/',str)
+ IF p = 0 THEN LEAVE
+ str = DELSTR(str,1,p)
+END
+RETURN str
+
+nlevels:
+str = ARG(1)
+count = 0
+oldpos = 1
+DO FOREVER
+ newpos = POS('/',str,oldpos)
+ IF newpos = 0 THEN LEAVE
+ oldpos = newpos + 1
+ count = count + 1
+END
+RETURN count
+
+maketop:
+str = ''
+n = ARG(1)
+DO k=1 TO n
+ str = str||'../'
+END
+RETURN str||'.'
+
+stripsuffix:
+str = ARG(1)
+spos = POS('.',str)
+IF spos = 0 THEN
+ RETURN str
+ELSE
+ RETURN LEFT(str,spos-1)
diff --git a/nx-X11/config/makedepend/Imakefile b/nx-X11/config/makedepend/Imakefile
new file mode 100644
index 000000000..8bb20724b
--- /dev/null
+++ b/nx-X11/config/makedepend/Imakefile
@@ -0,0 +1,101 @@
+XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:41:50 cpqbld Exp $
+XCOMM
+XCOMM
+XCOMM
+XCOMM
+XCOMM $XFree86: xc/config/makedepend/Imakefile,v 3.12tsi Exp $
+
+ SRCS = include.c main.c parse.c pr.c cppsetup.c ifparser.c
+ OBJS = include.o main.o parse.o pr.o cppsetup.o ifparser.o
+
+XCOMM Some compilers generate fatal errors if an -L directory does
+XCOMM not exist. Since BUILDLIBDIR may not exist yet suppress its use.
+ LDPRELIB =
+ LDPRELIBS =
+
+#if HasGcc && !defined(PreIncDir)
+#ifdef CrossCompileDir
+#else
+#define PreIncDir /usr/local/lib/gcc-include
+#endif
+#endif
+#ifdef PreIncDir
+PREINCDIR = PreIncDir
+PREINC_DEFINES = -DPREINCDIR=\"$(PREINCDIR)\"
+#endif
+#ifndef StdIncDir
+#ifdef CrossCompileDir
+#define StdIncDir Concat(CrossCompileDir,/../include)
+#else
+#define StdIncDir /usr/include
+#endif
+#endif
+STDINCDIR = StdIncDir
+STDINC_DEFINES = -DINCLUDEDIR=\"$(STDINCDIR)\"
+#ifdef PostIncDir
+POSTINCDIR = PostIncDir
+POSTINC_DEFINES = -DPOSTINCDIR=\"$(POSTINCDIR)\"
+#endif
+#ifdef ExtraIncDir
+EXTRAINCDIR = ExtraIncDir
+EXTRAINC_DEFINES = -DEXTRAINCDIR=\"$(EXTRAINCDIR)\"
+#endif
+INC_DEFINES = $(PREINC_DEFINES) $(STDINC_DEFINES) $(POSTINC_DEFINES) \
+ $(EXTRAINC_DEFINES)
+OSUF = Concat(.,Osuf)
+OSUF_DEFINES = -DOBJSUFFIX=\"$(OSUF)\"
+MAIN_DEFINES = $(INC_DEFINES) $(SIGNAL_DEFINES) $(OSUF_DEFINES)
+INCLUDES = -I$(IMAKESRC) -I$(TOP)/include $(TOP_X_INCLUDES)/X11
+
+ DEPLIBS =
+
+#if defined(MacIIArchitecture) || defined(SequentArchitecture) || defined(i386ScoArchitecture)
+ XBSDLIB = /**/
+#endif
+
+AllTarget(HostProgramTargetName(makedepend))
+
+makedependonly:: HostProgramTargetName(makedepend)
+
+/*
+ * bootstrapping: want to build the real makedepend
+ * only after we've run "make depend" here. That way
+ * the program has the right dependencies for clearmake.
+ * Save the bootstrap original files so they can be winked in
+ * to other views.
+ */
+
+#if HasClearmake
+bootstrap:
+ test -h X11 || $(LN) TOPDIR/include X11
+ $(MAKE) -f Makefile.proto TOP_INCLUDES=-I. makedepend
+
+depend::
+ $(MAKE) -f Makefile.proto depend
+ test -d bootstrap || mkdir bootstrap
+ $(MV) *.o makedepend bootstrap
+ $(MAKE) -f Makefile.proto makedepend
+
+clean::
+ $(RM) -r bootstrap
+ $(RM) X11
+#else
+bootstrap:
+#endif /* HasClearmake */
+
+clean::
+ $(RM) Makefile.proto
+
+#undef InstallManPage
+#define InstallManPage(file,dest) /* as nothing */
+#if CrossCompiling
+ComplexHostProgramTarget(makedepend)
+#else
+ComplexProgramTarget(makedepend)
+#endif
+
+SpecialCObjectRule(main,$(ICONFIGFILES),$(MAIN_DEFINES))
+
+InstallManPageLong(mkdepend,$(MANDIR),makedepend)
+
+InstallDriverSDKNamedProg(makedepend,makedepend,$(DRIVERSDKDIR)/config/makedepend)
diff --git a/nx-X11/config/makedepend/cpp.ed b/nx-X11/config/makedepend/cpp.ed
new file mode 100644
index 000000000..3a7db5096
--- /dev/null
+++ b/nx-X11/config/makedepend/cpp.ed
@@ -0,0 +1,75 @@
+#
+# $Xorg: cpp.ed,v 1.3 2000/08/17 19:41:50 cpqbld Exp $
+#
+# $Locker $
+#
+/struct symtab stab/d
+/struct symtab \*defloc;/d
+/struct symtab \*udfloc;/d
+/struct symtab \*incloc;/d
+/struct symtab \*ifloc;/d
+/struct symtab \*elsloc;/d
+/struct symtab \*eifloc;/d
+/struct symtab \*ifdloc;/d
+/struct symtab \*ifnloc;/d
+/struct symtab \*ysysloc;/d
+/struct symtab \*varloc;/d
+/struct symtab \*lneloc;/d
+/struct symtab \*ulnloc;/d
+/struct symtab \*uflloc;/d
+/^sayline(/s/$/ DELETED/p
+.,/^}/d
+/^unfill(/s/$/ DELETED/p
+.-1,/^}/d
+/^doincl(/s/$/ DELETED/p
+.-1,/^}/d
+/^equfrm(/s/$/ DELETED/p
+.,/^}/d
+/^dodef(/s/$/ DELETED/p
+.-1,/^}/d
+/^control(/s/$/ DELETED/p
+.-1,/^}/d
+/^savestring(/s/$/ DELETED/p
+.-1,/^}/d
+/^stsym(/s/$/ DELETED/p
+.-1,/^}/d
+/^ppsym(/s/$/ DELETED/p
+.-1,/^}/d
+/^yyerror(/s/$/ DELETED/p
+.,/^}/d
+/^ppwarn(/s/$/ DELETED/p
+.,/^}/d
+/^lookup(/s/$/ DELETED/p
+.-1,/^}/d
+/^subst(/s/$/ DELETED/p
+.-1,/^}/d
+/^trmdir(/s/$/ DELETED/p
+.-1,/^}/d
+/^copy(/s/$/ DELETED/p
+.-1,/^}/d
+/^pperror(/s/$/ DELETED/p
+.,/^}/d
+/^main(/s/$/ CHANGED to cpp_varsetup(argc,argv)/p
+.c
+cpp_varsetup(argc,argv)
+.
+/^strdex(/s/$/ DELETED/p
+.-1,/^}/d
+/^ for(i=1; i<argc; i++)/s/$/ To the end DELETED/p
+.,$c
+}
+.
+/^dump(/s/$/ DELETED/p
+.,/^}/c
+dump() { fatal("dump\n"); }
+.
+/^refill(/s/$/ DELETED/p
+.,/^}/c
+refill() { fatal("refill\n"); }
+.
+/^slookup(/s/$/ DELETED/p
+.-1,/^}/c
+static struct symtab *slookup() { fatal("slookup\n"); }
+.
+w
+q
diff --git a/nx-X11/config/makedepend/cppsetup.c b/nx-X11/config/makedepend/cppsetup.c
new file mode 100644
index 000000000..c7ac25681
--- /dev/null
+++ b/nx-X11/config/makedepend/cppsetup.c
@@ -0,0 +1,233 @@
+/* $Xorg: cppsetup.c,v 1.5 2001/02/09 02:03:16 xorgcvs Exp $ */
+/*
+
+Copyright (c) 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/config/makedepend/cppsetup.c,v 3.10 2001/12/14 19:53:20 dawes Exp $ */
+
+#include "def.h"
+
+#ifdef CPP
+/*
+ * This file is strictly for the sake of cpy.y and yylex.c (if
+ * you indeed have the source for cpp).
+ */
+#define IB 1
+#define SB 2
+#define NB 4
+#define CB 8
+#define QB 16
+#define WB 32
+#define SALT '#'
+#if defined(pdp11) || defined(vax) || defined(ns16000) || defined(mc68000) || defined(ibm032)
+#define COFF 128
+#else
+#define COFF 0
+#endif
+/*
+ * These variables used by cpy.y and yylex.c
+ */
+extern char *outp, *inp, *newp, *pend;
+extern char *ptrtab;
+extern char fastab[];
+extern char slotab[];
+
+/*
+ * cppsetup
+ */
+struct filepointer *currentfile;
+struct inclist *currentinc;
+
+int
+cppsetup(char *line, struct filepointer *filep, struct inclist *inc)
+{
+ char *p, savec;
+ static boolean setupdone = FALSE;
+ boolean value;
+
+ if (!setupdone) {
+ cpp_varsetup();
+ setupdone = TRUE;
+ }
+
+ currentfile = filep;
+ currentinc = inc;
+ inp = newp = line;
+ for (p=newp; *p; p++)
+ ;
+
+ /*
+ * put a newline back on the end, and set up pend, etc.
+ */
+ *p++ = '\n';
+ savec = *p;
+ *p = '\0';
+ pend = p;
+
+ ptrtab = slotab+COFF;
+ *--inp = SALT;
+ outp=inp;
+ value = yyparse();
+ *p = savec;
+ return(value);
+}
+
+struct symtab **lookup(symbol)
+ char *symbol;
+{
+ static struct symtab *undefined;
+ struct symtab **sp;
+
+ sp = isdefined(symbol, currentinc, NULL);
+ if (sp == NULL) {
+ sp = &undefined;
+ (*sp)->s_value = NULL;
+ }
+ return (sp);
+}
+
+pperror(tag, x0,x1,x2,x3,x4)
+ int tag,x0,x1,x2,x3,x4;
+{
+ warning("\"%s\", line %d: ", currentinc->i_file, currentfile->f_line);
+ warning(x0,x1,x2,x3,x4);
+}
+
+
+yyerror(s)
+ register char *s;
+{
+ fatalerr("Fatal error: %s\n", s);
+}
+#else /* not CPP */
+
+#include "ifparser.h"
+struct _parse_data {
+ struct filepointer *filep;
+ struct inclist *inc;
+ char *filename;
+ const char *line;
+};
+
+static const char *
+my_if_errors (IfParser *ip, const char *cp, const char *expecting)
+{
+ struct _parse_data *pd = (struct _parse_data *) ip->data;
+ int lineno = pd->filep->f_line;
+ char *filename = pd->filename;
+ char prefix[300];
+ int prefixlen;
+ int i;
+
+ sprintf (prefix, "\"%s\":%d", filename, lineno);
+ prefixlen = strlen(prefix);
+ fprintf (stderr, "%s: %s", prefix, pd->line);
+ i = cp - pd->line;
+ if (i > 0 && pd->line[i-1] != '\n') {
+ putc ('\n', stderr);
+ }
+ for (i += prefixlen + 3; i > 0; i--) {
+ putc (' ', stderr);
+ }
+ fprintf (stderr, "^--- expecting %s\n", expecting);
+ return NULL;
+}
+
+
+#define MAXNAMELEN 256
+
+static struct symtab **
+lookup_variable (IfParser *ip, const char *var, int len)
+{
+ char tmpbuf[MAXNAMELEN + 1];
+ struct _parse_data *pd = (struct _parse_data *) ip->data;
+
+ if (len > MAXNAMELEN)
+ return 0;
+
+ strncpy (tmpbuf, var, len);
+ tmpbuf[len] = '\0';
+ return isdefined (tmpbuf, pd->inc, NULL);
+}
+
+
+static int
+my_eval_defined (IfParser *ip, const char *var, int len)
+{
+ if (lookup_variable (ip, var, len))
+ return 1;
+ else
+ return 0;
+}
+
+#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
+
+static long
+my_eval_variable (IfParser *ip, const char *var, int len)
+{
+ long val;
+ struct symtab **s;
+
+ s = lookup_variable (ip, var, len);
+ if (!s)
+ return 0;
+ do {
+ var = (*s)->s_value;
+ if (!isvarfirstletter(*var) || !strcmp((*s)->s_name, var))
+ break;
+ s = lookup_variable (ip, var, strlen(var));
+ } while (s);
+
+ var = ParseIfExpression(ip, var, &val);
+ if (var && *var) debug(4, ("extraneous: '%s'\n", var));
+ return val;
+}
+
+int
+cppsetup(char *filename,
+ char *line,
+ struct filepointer *filep,
+ struct inclist *inc)
+{
+ IfParser ip;
+ struct _parse_data pd;
+ long val = 0;
+
+ pd.filep = filep;
+ pd.inc = inc;
+ pd.line = line;
+ pd.filename = filename;
+ ip.funcs.handle_error = my_if_errors;
+ ip.funcs.eval_defined = my_eval_defined;
+ ip.funcs.eval_variable = my_eval_variable;
+ ip.data = (char *) &pd;
+
+ (void) ParseIfExpression (&ip, line, &val);
+ if (val)
+ return IF;
+ else
+ return IFFALSE;
+}
+#endif /* CPP */
+
diff --git a/nx-X11/config/makedepend/def.h b/nx-X11/config/makedepend/def.h
new file mode 100644
index 000000000..cf8f37b02
--- /dev/null
+++ b/nx-X11/config/makedepend/def.h
@@ -0,0 +1,188 @@
+/* $XdotOrg: xc/config/makedepend/def.h,v 1.4 2005/07/29 18:42:37 kem Exp $ */
+/* $Xorg: def.h,v 1.4 2001/02/09 02:03:16 xorgcvs Exp $ */
+/*
+
+Copyright (c) 1993, 1994, 1998 The Open Group.
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/config/makedepend/def.h,v 3.13tsi Exp $ */
+
+#ifdef HAVE_CONFIG_H /* Autotooled for Xorg 7.0? */
+# include "makedepend-config.h"
+# define USING_AUTOCONF
+#endif
+
+#include <X11/Xos.h>
+#include <X11/Xfuncproto.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <ctype.h>
+#if 0
+#ifndef X_NOT_POSIX
+#ifndef _POSIX_SOURCE
+#define _POSIX_SOURCE
+#endif
+#endif
+#endif
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#define MAXDEFINES 512
+#define MAXFILES 1024
+#define MAXINCFILES 128 /* "-include" files */
+#define MAXDIRS 64
+#define SYMTABINC 10 /* must be > 1 for define() to work right */
+#define TRUE 1
+#define FALSE 0
+
+/* the following must match the directives table in main.c */
+#define IF 0
+#define IFDEF 1
+#define IFNDEF 2
+#define ELSE 3
+#define ENDIF 4
+#define DEFINE 5
+#define UNDEF 6
+#define INCLUDE 7
+#define LINE 8
+#define PRAGMA 9
+#define ERROR 10
+#define IDENT 11
+#define SCCS 12
+#define ELIF 13
+#define EJECT 14
+#define WARNING 15
+#define INCLUDENEXT 16
+#define IFFALSE 17 /* pseudo value --- never matched */
+#define ELIFFALSE 18 /* pseudo value --- never matched */
+#define INCLUDEDOT 19 /* pseudo value --- never matched */
+#define IFGUESSFALSE 20 /* pseudo value --- never matched */
+#define ELIFGUESSFALSE 21 /* pseudo value --- never matched */
+#define INCLUDENEXTDOT 22 /* pseudo value --- never matched */
+
+#ifdef DEBUG
+extern int _debugmask;
+/*
+ * debug levels are:
+ *
+ * 0 show ifn*(def)*,endif
+ * 1 trace defined/!defined
+ * 2 show #include
+ * 3 show #include SYMBOL
+ * 4-6 unused
+ */
+#define debug(level,arg) { if (_debugmask & (1 << level)) warning arg; }
+#else
+#define debug(level,arg) /**/
+#endif /* DEBUG */
+
+typedef unsigned char boolean;
+
+struct symtab {
+ char *s_name;
+ char *s_value;
+};
+
+/* possible i_flag */
+#define DEFCHECKED (1<<0) /* whether defines have been checked */
+#define NOTIFIED (1<<1) /* whether we have revealed includes */
+#define MARKED (1<<2) /* whether it's in the makefile */
+#define SEARCHED (1<<3) /* whether we have read this */
+#define FINISHED (1<<4) /* whether we are done reading this */
+#define INCLUDED_SYM (1<<5) /* whether #include SYMBOL was found
+ Can't use i_list if TRUE */
+struct inclist {
+ char *i_incstring; /* string from #include line */
+ char *i_file; /* path name of the include file */
+ struct inclist **i_list; /* list of files it itself includes */
+ int i_listlen; /* length of i_list */
+ struct symtab **i_defs; /* symbol table for this file and its
+ children when merged */
+ int i_ndefs; /* current # defines */
+ boolean *i_merged; /* whether we have merged child
+ defines */
+ unsigned char i_flags;
+};
+
+struct filepointer {
+ char *f_name;
+ char *f_p;
+ char *f_base;
+ char *f_end;
+ long f_len;
+ long f_line;
+ long cmdinc_count;
+ char **cmdinc_list;
+ long cmdinc_line;
+};
+
+#include <stdlib.h>
+#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
+char *malloc(), *realloc();
+#endif /* macII */
+
+char *copy(char *str);
+int match(char *str, char **list);
+char *base_name(char *file);
+char *getnextline(struct filepointer *fp);
+struct symtab **slookup(char *symbol, struct inclist *file);
+struct symtab **isdefined(char *symbol, struct inclist *file,
+ struct inclist **srcfile);
+struct symtab **fdefined(char *symbol, struct inclist *file,
+ struct inclist **srcfile);
+struct filepointer *getfile(char *file);
+void included_by(struct inclist *ip,
+ struct inclist *newfile);
+struct inclist *newinclude(char *newfile, char *incstring);
+void inc_clean (void);
+struct inclist *inc_path(char *file, char *include, int type);
+
+void freefile(struct filepointer *fp);
+
+void define2(char *name, char *val, struct inclist *file);
+void define(char *def, struct inclist *file);
+void undefine(char *symbol, struct inclist *file);
+int find_includes(struct filepointer *filep,
+ struct inclist *file,
+ struct inclist *file_red,
+ int recursion, boolean failOK);
+
+void recursive_pr_include(struct inclist *head,
+ char *file, char *base);
+void add_include(struct filepointer *filep,
+ struct inclist *file,
+ struct inclist *file_red,
+ char *include, int type,
+ boolean failOK);
+
+int cppsetup(char *filename,
+ char *line,
+ struct filepointer *filep,
+ struct inclist *inc);
+
+
+extern void fatalerr(char *, ...);
+extern void warning(char *, ...);
+extern void warning1(char *, ...);
diff --git a/nx-X11/config/makedepend/ifparser.c b/nx-X11/config/makedepend/ifparser.c
new file mode 100644
index 000000000..58c05a09f
--- /dev/null
+++ b/nx-X11/config/makedepend/ifparser.c
@@ -0,0 +1,553 @@
+/*
+ * $Xorg: ifparser.c,v 1.3 2000/08/17 19:41:50 cpqbld Exp $
+ *
+ * Copyright 1992 Network Computing Devices, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Network Computing Devices may not be
+ * used in advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. Network Computing Devices makes
+ * no representations about the suitability of this software for any purpose.
+ * It is provided ``as is'' without express or implied warranty.
+ *
+ * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Jim Fulton
+ * Network Computing Devices, Inc.
+ *
+ * Simple if statement processor
+ *
+ * This module can be used to evaluate string representations of C language
+ * if constructs. It accepts the following grammar:
+ *
+ * EXPRESSION := VALUE
+ * | VALUE BINOP EXPRESSION
+ * | VALUE '?' EXPRESSION ':' EXPRESSION
+ *
+ * VALUE := '(' EXPRESSION ')'
+ * | '!' VALUE
+ * | '-' VALUE
+ * | '+' VALUE
+ * | '~' VALUE
+ * | 'defined' '(' variable ')'
+ * | 'defined' variable
+ * | # variable '(' variable-list ')'
+ * | variable
+ * | number
+ *
+ * BINOP := '*' | '/' | '%'
+ * | '+' | '-'
+ * | '<<' | '>>'
+ * | '<' | '>' | '<=' | '>='
+ * | '==' | '!='
+ * | '&' | '^' | '|'
+ * | '&&' | '||'
+ *
+ * The normal C order of precedence is supported.
+ *
+ *
+ * External Entry Points:
+ *
+ * ParseIfExpression parse a string for #if
+ */
+/* $XFree86: xc/config/makedepend/ifparser.c,v 3.10tsi Exp $ */
+
+#include "ifparser.h"
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <limits.h>
+
+/****************************************************************************
+ Internal Macros and Utilities for Parser
+ ****************************************************************************/
+
+#define DO(val) if (!(val)) return NULL
+#define CALLFUNC(ggg,fff) (*((ggg)->funcs.fff))
+#define SKIPSPACE(ccc) while (isspace(*ccc)) ccc++
+#define isvarfirstletter(ccc) (isalpha(ccc) || (ccc) == '_')
+
+
+static const char *
+parse_variable (IfParser *g, const char *cp, const char **varp)
+{
+ SKIPSPACE (cp);
+
+ if (!isvarfirstletter (*cp))
+ return CALLFUNC(g, handle_error) (g, cp, "variable name");
+
+ *varp = cp;
+ /* EMPTY */
+ for (cp++; isalnum(*cp) || *cp == '_'; cp++) ;
+ return cp;
+}
+
+
+static const char *
+parse_number (IfParser *g, const char *cp, long *valp)
+{
+ long base = 10;
+ SKIPSPACE (cp);
+
+ if (!isdigit(*cp))
+ return CALLFUNC(g, handle_error) (g, cp, "number");
+
+ *valp = 0;
+
+ if (*cp == '0') {
+ cp++;
+ if ((*cp == 'x') || (*cp == 'X')) {
+ base = 16;
+ cp++;
+ } else {
+ base = 8;
+ }
+ }
+
+ /* Ignore overflows and assume ASCII, what source is usually written in */
+ while (1) {
+ int increment = -1;
+ if (base == 8) {
+ if ((*cp >= '0') && (*cp <= '7'))
+ increment = *cp++ - '0';
+ } else if (base == 16) {
+ if ((*cp >= '0') && (*cp <= '9'))
+ increment = *cp++ - '0';
+ else if ((*cp >= 'A') && (*cp <= 'F'))
+ increment = *cp++ - ('A' - 10);
+ else if ((*cp >= 'a') && (*cp <= 'f'))
+ increment = *cp++ - ('a' - 10);
+ } else { /* Decimal */
+ if ((*cp >= '0') && (*cp <= '9'))
+ increment = *cp++ - '0';
+ }
+ if (increment < 0)
+ break;
+ *valp = (*valp * base) + increment;
+ }
+
+ /* Skip trailing qualifiers */
+ while (*cp == 'U' || *cp == 'u' || *cp == 'L' || *cp == 'l') cp++;
+ return cp;
+}
+
+static const char *
+parse_character (IfParser *g, const char *cp, long *valp)
+{
+ char val;
+
+ SKIPSPACE (cp);
+ if (*cp == '\\')
+ switch (cp[1]) {
+ case 'n': val = '\n'; break;
+ case 't': val = '\t'; break;
+ case 'v': val = '\v'; break;
+ case 'b': val = '\b'; break;
+ case 'r': val = '\r'; break;
+ case 'f': val = '\f'; break;
+ case 'a': val = '\a'; break;
+ case '\\': val = '\\'; break;
+ case '?': val = '\?'; break;
+ case '\'': val = '\''; break;
+ case '\"': val = '\"'; break;
+ case 'x': val = (char) strtol (cp + 2, NULL, 16); break;
+ default: val = (char) strtol (cp + 1, NULL, 8); break;
+ }
+ else
+ val = *cp;
+ while (*cp != '\'') cp++;
+ *valp = (long) val;
+ return cp;
+}
+
+static const char *
+parse_value (IfParser *g, const char *cp, long *valp)
+{
+ const char *var, *varend;
+
+ *valp = 0;
+
+ SKIPSPACE (cp);
+ if (!*cp)
+ return cp;
+
+ switch (*cp) {
+ case '(':
+ DO (cp = ParseIfExpression (g, cp + 1, valp));
+ SKIPSPACE (cp);
+ if (*cp != ')')
+ return CALLFUNC(g, handle_error) (g, cp, ")");
+
+ return cp + 1; /* skip the right paren */
+
+ case '!':
+ DO (cp = parse_value (g, cp + 1, valp));
+ *valp = !(*valp);
+ return cp;
+
+ case '-':
+ DO (cp = parse_value (g, cp + 1, valp));
+ *valp = -(*valp);
+ return cp;
+
+ case '+':
+ DO (cp = parse_value (g, cp + 1, valp));
+ return cp;
+
+ case '~':
+ DO (cp = parse_value (g, cp + 1, valp));
+ *valp = ~(*valp);
+ return cp;
+
+ case '#':
+ DO (cp = parse_variable (g, cp + 1, &var));
+ SKIPSPACE (cp);
+ if (*cp != '(')
+ return CALLFUNC(g, handle_error) (g, cp, "(");
+ do {
+ DO (cp = parse_variable (g, cp + 1, &var));
+ SKIPSPACE (cp);
+ } while (*cp && *cp != ')');
+ if (*cp != ')')
+ return CALLFUNC(g, handle_error) (g, cp, ")");
+ *valp = 1; /* XXX */
+ return cp + 1;
+
+ case '\'':
+ DO (cp = parse_character (g, cp + 1, valp));
+ if (*cp != '\'')
+ return CALLFUNC(g, handle_error) (g, cp, "'");
+ return cp + 1;
+
+ case 'd':
+ if (strncmp (cp, "defined", 7) == 0 && !isalnum(cp[7])) {
+ int paren = 0;
+ int len;
+
+ cp += 7;
+ SKIPSPACE (cp);
+ if (*cp == '(') {
+ paren = 1;
+ cp++;
+ }
+ DO (cp = parse_variable (g, cp, &var));
+ len = cp - var;
+ SKIPSPACE (cp);
+ if (paren && *cp != ')')
+ return CALLFUNC(g, handle_error) (g, cp, ")");
+ *valp = (*(g->funcs.eval_defined)) (g, var, len);
+ return cp + paren; /* skip the right paren */
+ }
+ /* fall out */
+ }
+
+ if (isdigit(*cp)) {
+ DO (cp = parse_number (g, cp, valp));
+ } else if (!isvarfirstletter(*cp))
+ return CALLFUNC(g, handle_error) (g, cp, "variable or number");
+ else {
+ DO (cp = parse_variable (g, cp, &var));
+ varend = cp;
+ SKIPSPACE(cp);
+ if (*cp != '(') {
+ *valp = (*(g->funcs.eval_variable)) (g, var, varend - var);
+ } else {
+ do {
+ long dummy;
+ DO (cp = ParseIfExpression (g, cp + 1, &dummy));
+ SKIPSPACE(cp);
+ if (*cp == ')')
+ break;
+ if (*cp != ',')
+ return CALLFUNC(g, handle_error) (g, cp, ",");
+ } while (1);
+
+ *valp = 1; /* XXX */
+ cp++;
+ }
+ }
+
+ return cp;
+}
+
+
+
+static const char *
+parse_product (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_value (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '*':
+ DO (cp = parse_product (g, cp + 1, &rightval));
+ *valp = (*valp * rightval);
+ break;
+
+ case '/':
+ DO (cp = parse_product (g, cp + 1, &rightval));
+ if (rightval)
+ *valp = (*valp / rightval);
+ else
+ *valp = LONG_MAX;
+ break;
+
+ case '%':
+ DO (cp = parse_product (g, cp + 1, &rightval));
+ *valp = (*valp % rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_sum (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_product (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '+':
+ DO (cp = parse_sum (g, cp + 1, &rightval));
+ *valp = (*valp + rightval);
+ break;
+
+ case '-':
+ DO (cp = parse_sum (g, cp + 1, &rightval));
+ *valp = (*valp - rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_shift (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_sum (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '<':
+ if (cp[1] == '<') {
+ DO (cp = parse_shift (g, cp + 2, &rightval));
+ *valp = (*valp << rightval);
+ }
+ break;
+
+ case '>':
+ if (cp[1] == '>') {
+ DO (cp = parse_shift (g, cp + 2, &rightval));
+ *valp = (*valp >> rightval);
+ }
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_inequality (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_shift (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '<':
+ if (cp[1] == '=') {
+ DO (cp = parse_inequality (g, cp + 2, &rightval));
+ *valp = (*valp <= rightval);
+ } else {
+ DO (cp = parse_inequality (g, cp + 1, &rightval));
+ *valp = (*valp < rightval);
+ }
+ break;
+
+ case '>':
+ if (cp[1] == '=') {
+ DO (cp = parse_inequality (g, cp + 2, &rightval));
+ *valp = (*valp >= rightval);
+ } else {
+ DO (cp = parse_inequality (g, cp + 1, &rightval));
+ *valp = (*valp > rightval);
+ }
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_equality (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_inequality (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '=':
+ if (cp[1] == '=')
+ cp++;
+ DO (cp = parse_equality (g, cp + 1, &rightval));
+ *valp = (*valp == rightval);
+ break;
+
+ case '!':
+ if (cp[1] != '=')
+ break;
+ DO (cp = parse_equality (g, cp + 2, &rightval));
+ *valp = (*valp != rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_band (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_equality (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '&':
+ if (cp[1] != '&') {
+ DO (cp = parse_band (g, cp + 1, &rightval));
+ *valp = (*valp & rightval);
+ }
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_bxor (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_band (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '^':
+ DO (cp = parse_bxor (g, cp + 1, &rightval));
+ *valp = (*valp ^ rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_bor (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_bxor (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '|':
+ if (cp[1] != '|') {
+ DO (cp = parse_bor (g, cp + 1, &rightval));
+ *valp = (*valp | rightval);
+ }
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_land (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_bor (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '&':
+ if (cp[1] != '&')
+ return CALLFUNC(g, handle_error) (g, cp, "&&");
+ DO (cp = parse_land (g, cp + 2, &rightval));
+ *valp = (*valp && rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_lor (IfParser *g, const char *cp, long *valp)
+{
+ long rightval;
+
+ DO (cp = parse_land (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '|':
+ if (cp[1] != '|')
+ return CALLFUNC(g, handle_error) (g, cp, "||");
+ DO (cp = parse_lor (g, cp + 2, &rightval));
+ *valp = (*valp || rightval);
+ break;
+ }
+ return cp;
+}
+
+
+static const char *
+parse_cond(IfParser *g, const char *cp, long *valp)
+{
+ long trueval, falseval;
+
+ DO (cp = parse_lor (g, cp, valp));
+ SKIPSPACE (cp);
+
+ switch (*cp) {
+ case '?':
+ DO (cp = parse_cond (g, cp + 1, &trueval));
+ SKIPSPACE (cp);
+ if (*cp != ':')
+ return CALLFUNC(g, handle_error) (g, cp, ":");
+ DO (cp = parse_cond (g, cp + 1, &falseval));
+ *valp = (*valp ? trueval : falseval);
+ break;
+ }
+ return cp;
+}
+
+
+/****************************************************************************
+ External Entry Points
+ ****************************************************************************/
+
+const char *
+ParseIfExpression (IfParser *g, const char *cp, long *valp)
+{
+ return parse_cond (g, cp, valp);
+}
diff --git a/nx-X11/config/makedepend/ifparser.h b/nx-X11/config/makedepend/ifparser.h
new file mode 100644
index 000000000..398a3e49c
--- /dev/null
+++ b/nx-X11/config/makedepend/ifparser.h
@@ -0,0 +1,83 @@
+/*
+ * $Xorg: ifparser.h,v 1.3 2000/08/17 19:41:51 cpqbld Exp $
+ *
+ * Copyright 1992 Network Computing Devices, Inc.
+ *
+ * Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose and without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies and that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of Network Computing Devices may not be
+ * used in advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission. Network Computing Devices makes
+ * no representations about the suitability of this software for any purpose.
+ * It is provided ``as is'' without express or implied warranty.
+ *
+ * NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+ * IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
+ * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+ * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+ * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ * PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Author: Jim Fulton
+ * Network Computing Devices, Inc.
+ *
+ * Simple if statement processor
+ *
+ * This module can be used to evaluate string representations of C language
+ * if constructs. It accepts the following grammar:
+ *
+ * EXPRESSION := VALUE
+ * | VALUE BINOP EXPRESSION
+ * | VALUE '?' EXPRESSION ':' EXPRESSION
+ *
+ * VALUE := '(' EXPRESSION ')'
+ * | '!' VALUE
+ * | '-' VALUE
+ * | '~' VALUE
+ * | 'defined' '(' variable ')'
+ * | variable
+ * | number
+ *
+ * BINOP := '*' | '/' | '%'
+ * | '+' | '-'
+ * | '<<' | '>>'
+ * | '<' | '>' | '<=' | '>='
+ * | '==' | '!='
+ * | '&' | '^' | '|'
+ * | '&&' | '||'
+ *
+ * The normal C order of precedence is supported.
+ *
+ *
+ * External Entry Points:
+ *
+ * ParseIfExpression parse a string for #if
+ */
+
+/* $XFree86: xc/config/makedepend/ifparser.h,v 3.4 2001/01/17 16:38:58 dawes Exp $ */
+
+#include <stdio.h>
+
+typedef int Bool;
+#define False 0
+#define True 1
+
+typedef struct _if_parser {
+ struct { /* functions */
+ const char *(*handle_error) (struct _if_parser *, const char *,
+ const char *);
+ long (*eval_variable) (struct _if_parser *, const char *, int);
+ int (*eval_defined) (struct _if_parser *, const char *, int);
+ } funcs;
+ char *data;
+} IfParser;
+
+const char *ParseIfExpression (
+ IfParser *,
+ const char *,
+ long *
+);
+
diff --git a/nx-X11/config/makedepend/include.c b/nx-X11/config/makedepend/include.c
new file mode 100644
index 000000000..65ce78338
--- /dev/null
+++ b/nx-X11/config/makedepend/include.c
@@ -0,0 +1,318 @@
+/* $Xorg: include.c,v 1.4 2001/02/09 02:03:16 xorgcvs Exp $ */
+/*
+
+Copyright (c) 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/config/makedepend/include.c,v 3.6 2001/04/29 23:25:02 tsi Exp $ */
+
+
+#include "def.h"
+
+extern struct inclist inclist[ MAXFILES ],
+ *inclistp, *inclistnext;
+extern char *includedirs[ ],
+ **includedirsnext;
+extern char *notdotdot[ ];
+extern boolean show_where_not;
+extern boolean warn_multiple;
+
+static boolean
+isdot(char *p)
+{
+ if(p && *p++ == '.' && *p++ == '\0')
+ return(TRUE);
+ return(FALSE);
+}
+
+static boolean
+isdotdot(char *p)
+{
+ if(p && *p++ == '.' && *p++ == '.' && *p++ == '\0')
+ return(TRUE);
+ return(FALSE);
+}
+
+static boolean
+issymbolic(char *dir, char *component)
+{
+#ifdef S_IFLNK
+ struct stat st;
+ char buf[ BUFSIZ ], **pp;
+
+ sprintf(buf, "%s%s%s", dir, *dir ? "/" : "", component);
+ for (pp=notdotdot; *pp; pp++)
+ if (strcmp(*pp, buf) == 0)
+ return (TRUE);
+ if (lstat(buf, &st) == 0
+ && (st.st_mode & S_IFMT) == S_IFLNK) {
+ *pp++ = copy(buf);
+ if (pp >= &notdotdot[ MAXDIRS ])
+ fatalerr("out of .. dirs, increase MAXDIRS\n");
+ return(TRUE);
+ }
+#endif
+ return(FALSE);
+}
+
+/*
+ * Occasionally, pathnames are created that look like .../x/../y
+ * Any of the 'x/..' sequences within the name can be eliminated.
+ * (but only if 'x' is not a symbolic link!!)
+ */
+static void
+remove_dotdot(char *path)
+{
+ register char *end, *from, *to, **cp;
+ char *components[ MAXFILES ],
+ newpath[ BUFSIZ ];
+ boolean component_copied;
+
+ /*
+ * slice path up into components.
+ */
+ to = newpath;
+ if (*path == '/')
+ *to++ = '/';
+ *to = '\0';
+ cp = components;
+ for (from=end=path; *end; end++)
+ if (*end == '/') {
+ while (*end == '/')
+ *end++ = '\0';
+ if (*from)
+ *cp++ = from;
+ from = end;
+ }
+ *cp++ = from;
+ *cp = NULL;
+
+ /*
+ * Recursively remove all 'x/..' component pairs.
+ */
+ cp = components;
+ while(*cp) {
+ if (!isdot(*cp) && !isdotdot(*cp) && isdotdot(*(cp+1))
+ && !issymbolic(newpath, *cp))
+ {
+ char **fp = cp + 2;
+ char **tp = cp;
+
+ do
+ *tp++ = *fp; /* move all the pointers down */
+ while (*fp++);
+ if (cp != components)
+ cp--; /* go back and check for nested ".." */
+ } else {
+ cp++;
+ }
+ }
+ /*
+ * Concatenate the remaining path elements.
+ */
+ cp = components;
+ component_copied = FALSE;
+ while(*cp) {
+ if (component_copied)
+ *to++ = '/';
+ component_copied = TRUE;
+ for (from = *cp; *from; )
+ *to++ = *from++;
+ *to = '\0';
+ cp++;
+ }
+ *to++ = '\0';
+
+ /*
+ * copy the reconstituted path back to our pointer.
+ */
+ strcpy(path, newpath);
+}
+
+/*
+ * Add an include file to the list of those included by 'file'.
+ */
+struct inclist *
+newinclude(char *newfile, char *incstring)
+{
+ register struct inclist *ip;
+
+ /*
+ * First, put this file on the global list of include files.
+ */
+ ip = inclistp++;
+ if (inclistp == inclist + MAXFILES - 1)
+ fatalerr("out of space: increase MAXFILES\n");
+ ip->i_file = copy(newfile);
+
+ if (incstring == NULL)
+ ip->i_incstring = ip->i_file;
+ else
+ ip->i_incstring = copy(incstring);
+
+ inclistnext = inclistp;
+ return(ip);
+}
+
+void
+included_by(struct inclist *ip, struct inclist *newfile)
+{
+ register int i;
+
+ if (ip == NULL)
+ return;
+ /*
+ * Put this include file (newfile) on the list of files included
+ * by 'file'. If 'file' is NULL, then it is not an include
+ * file itself (i.e. was probably mentioned on the command line).
+ * If it is already on the list, don't stick it on again.
+ */
+ if (ip->i_list == NULL) {
+ ip->i_list = (struct inclist **)
+ malloc(sizeof(struct inclist *) * ++ip->i_listlen);
+ ip->i_merged = (boolean *)
+ malloc(sizeof(boolean) * ip->i_listlen);
+ } else {
+ for (i=0; i<ip->i_listlen; i++)
+ if (ip->i_list[ i ] == newfile) {
+ i = strlen(newfile->i_file);
+ if (!(ip->i_flags & INCLUDED_SYM) &&
+ !(i > 2 &&
+ newfile->i_file[i-1] == 'c' &&
+ newfile->i_file[i-2] == '.'))
+ {
+ /* only bitch if ip has */
+ /* no #include SYMBOL lines */
+ /* and is not a .c file */
+ if (warn_multiple)
+ {
+ warning("%s includes %s more than once!\n",
+ ip->i_file, newfile->i_file);
+ warning1("Already have\n");
+ for (i=0; i<ip->i_listlen; i++)
+ warning1("\t%s\n", ip->i_list[i]->i_file);
+ }
+ }
+ return;
+ }
+ ip->i_list = (struct inclist **) realloc(ip->i_list,
+ sizeof(struct inclist *) * ++ip->i_listlen);
+ ip->i_merged = (boolean *)
+ realloc(ip->i_merged, sizeof(boolean) * ip->i_listlen);
+ }
+ ip->i_list[ ip->i_listlen-1 ] = newfile;
+ ip->i_merged[ ip->i_listlen-1 ] = FALSE;
+}
+
+void
+inc_clean (void)
+{
+ register struct inclist *ip;
+
+ for (ip = inclist; ip < inclistp; ip++) {
+ ip->i_flags &= ~MARKED;
+ }
+}
+
+struct inclist *
+inc_path(char *file, char *include, int type)
+{
+ static char path[ BUFSIZ ];
+ register char **pp, *p;
+ register struct inclist *ip;
+ struct stat st;
+
+ /*
+ * Check all previously found include files for a path that
+ * has already been expanded.
+ */
+ if ((type == INCLUDE) || (type == INCLUDEDOT))
+ inclistnext = inclist;
+ ip = inclistnext;
+
+ for (; ip->i_file; ip++) {
+ if ((strcmp(ip->i_incstring, include) == 0) &&
+ !(ip->i_flags & INCLUDED_SYM)) {
+ inclistnext = ip + 1;
+ return ip;
+ }
+ }
+
+ if (inclistnext == inclist) {
+ /*
+ * If the path was surrounded by "" or is an absolute path,
+ * then check the exact path provided.
+ */
+ if ((type == INCLUDEDOT) ||
+ (type == INCLUDENEXTDOT) ||
+ (*include == '/')) {
+ if (stat(include, &st) == 0)
+ return newinclude(include, include);
+ if (show_where_not)
+ warning1("\tnot in %s\n", include);
+ }
+
+ /*
+ * If the path was surrounded by "" see if this include file is
+ * in the directory of the file being parsed.
+ */
+ if ((type == INCLUDEDOT) || (type == INCLUDENEXTDOT)) {
+ for (p=file+strlen(file); p>file; p--)
+ if (*p == '/')
+ break;
+ if (p == file) {
+ strcpy(path, include);
+ } else {
+ strncpy(path, file, (p-file) + 1);
+ path[ (p-file) + 1 ] = '\0';
+ strcpy(path + (p-file) + 1, include);
+ }
+ remove_dotdot(path);
+ if (stat(path, &st) == 0)
+ return newinclude(path, include);
+ if (show_where_not)
+ warning1("\tnot in %s\n", path);
+ }
+ }
+
+ /*
+ * Check the include directories specified. Standard include dirs
+ * should be at the end.
+ */
+ if ((type == INCLUDE) || (type == INCLUDEDOT))
+ includedirsnext = includedirs;
+ pp = includedirsnext;
+
+ for (; *pp; pp++) {
+ sprintf(path, "%s/%s", *pp, include);
+ remove_dotdot(path);
+ if (stat(path, &st) == 0) {
+ includedirsnext = pp + 1;
+ return newinclude(path, include);
+ }
+ if (show_where_not)
+ warning1("\tnot in %s\n", path);
+ }
+
+ return NULL;
+}
diff --git a/nx-X11/config/makedepend/main.c b/nx-X11/config/makedepend/main.c
new file mode 100644
index 000000000..d413964a0
--- /dev/null
+++ b/nx-X11/config/makedepend/main.c
@@ -0,0 +1,865 @@
+/* $Xorg: main.c,v 1.5 2001/02/09 02:03:16 xorgcvs Exp $ */
+/* $XdotOrg: xc/config/makedepend/main.c,v 1.4 2005/07/05 19:02:01 alanc Exp $ */
+/*
+
+Copyright (c) 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/config/makedepend/main.c,v 3.31tsi Exp $ */
+
+#include "def.h"
+#ifdef hpux
+#define sigvec sigvector
+#endif /* hpux */
+
+#ifdef X_POSIX_C_SOURCE
+#define _POSIX_C_SOURCE X_POSIX_C_SOURCE
+#include <signal.h>
+#undef _POSIX_C_SOURCE
+#else
+#if defined(X_NOT_POSIX) || defined(_POSIX_SOURCE)
+#include <signal.h>
+#else
+#define _POSIX_SOURCE
+#include <signal.h>
+#undef _POSIX_SOURCE
+#endif
+#endif
+
+#include <stdarg.h>
+
+#ifdef DEBUG
+int _debugmask;
+#endif
+
+/* #define DEBUG_DUMP */
+#ifdef DEBUG_DUMP
+#define DBG_PRINT(file, fmt, args) fprintf(file, fmt, args)
+#else
+#define DBG_PRINT(file, fmt, args) /* empty */
+#endif
+
+#define DASH_INC_PRE "#include \""
+#define DASH_INC_POST "\""
+
+char *ProgramName;
+
+char *directives[] = {
+ "if",
+ "ifdef",
+ "ifndef",
+ "else",
+ "endif",
+ "define",
+ "undef",
+ "include",
+ "line",
+ "pragma",
+ "error",
+ "ident",
+ "sccs",
+ "elif",
+ "eject",
+ "warning",
+ "include_next",
+ NULL
+};
+
+#define MAKEDEPEND
+#include "imakemdep.h" /* from config sources */
+#undef MAKEDEPEND
+
+struct inclist inclist[ MAXFILES ],
+ *inclistp = inclist,
+ *inclistnext = inclist,
+ maininclist;
+
+static char *filelist[ MAXFILES ];
+char *includedirs[ MAXDIRS + 1 ],
+ **includedirsnext = includedirs;
+char *notdotdot[ MAXDIRS ];
+static int cmdinc_count = 0;
+static char *cmdinc_list[ 2 * MAXINCFILES ];
+char *objprefix = "";
+char *objsuffix = OBJSUFFIX;
+static char *startat = "# DO NOT DELETE";
+int width = 78;
+static boolean append = FALSE;
+boolean printed = FALSE;
+boolean verbose = FALSE;
+boolean show_where_not = FALSE;
+/* Warn on multiple includes of same file */
+boolean warn_multiple = FALSE;
+
+static void setfile_cmdinc(struct filepointer *filep, long count, char **list);
+static void redirect(char *line, char *makefile);
+
+static
+#ifdef RETSIGTYPE
+RETSIGTYPE
+#else
+# ifdef SIGNALRETURNSINT
+int
+# else
+void
+# endif
+#endif
+catch (int sig)
+{
+ fflush (stdout);
+ fatalerr ("got signal %d\n", sig);
+}
+
+#if defined(USG) || (defined(i386) && defined(SYSV)) || defined(WIN32) || defined(__UNIXOS2__) || defined(Lynx_22) || defined(__CYGWIN__)
+#define USGISH
+#endif
+
+#ifndef USGISH
+#ifdef X_NOT_POSIX
+#define sigaction sigvec
+#define sa_handler sv_handler
+#define sa_mask sv_mask
+#define sa_flags sv_flags
+#endif
+struct sigaction sig_act;
+#endif /* USGISH */
+
+#ifndef USING_AUTOCONF
+# if !defined(USGISH) && !defined(_SEQUENT_) && !defined(MINIX)
+# define HAVE_FCHMOD 1
+# endif
+#endif
+
+int
+main(int argc, char *argv[])
+{
+ char **fp = filelist;
+ char **incp = includedirs;
+ char *p;
+ struct inclist *ip;
+ char *makefile = NULL;
+ struct filepointer *filecontent;
+ struct symtab *psymp = predefs;
+ char *endmarker = NULL;
+ char *defincdir = NULL;
+ char **undeflist = NULL;
+ int numundefs = 0, i;
+
+ ProgramName = argv[0];
+
+ while (psymp->s_name)
+ {
+ define2(psymp->s_name, psymp->s_value, &maininclist);
+ psymp++;
+ }
+ if (argc == 2 && argv[1][0] == '@') {
+ struct stat ast;
+ int afd;
+ char *args;
+ char **nargv;
+ int nargc;
+ char quotechar = '\0';
+
+ nargc = 1;
+ if ((afd = open(argv[1]+1, O_RDONLY)) < 0)
+ fatalerr("cannot open \"%s\"\n", argv[1]+1);
+ fstat(afd, &ast);
+ args = (char *)malloc(ast.st_size + 1);
+ if ((ast.st_size = read(afd, args, ast.st_size)) < 0)
+ fatalerr("failed to read %s\n", argv[1]+1);
+ args[ast.st_size] = '\0';
+ close(afd);
+ for (p = args; *p; p++) {
+ if (quotechar) {
+ if (quotechar == '\\' ||
+ (*p == quotechar && p[-1] != '\\'))
+ quotechar = '\0';
+ continue;
+ }
+ switch (*p) {
+ case '\\':
+ case '"':
+ case '\'':
+ quotechar = *p;
+ break;
+ case ' ':
+ case '\n':
+ *p = '\0';
+ if (p > args && p[-1])
+ nargc++;
+ break;
+ }
+ }
+ if (p[-1])
+ nargc++;
+ nargv = (char **)malloc(nargc * sizeof(char *));
+ nargv[0] = argv[0];
+ argc = 1;
+ for (p = args; argc < nargc; p += strlen(p) + 1)
+ if (*p) nargv[argc++] = p;
+ argv = nargv;
+ }
+ for(argc--, argv++; argc; argc--, argv++) {
+ /* if looking for endmarker then check before parsing */
+ if (endmarker && strcmp (endmarker, *argv) == 0) {
+ endmarker = NULL;
+ continue;
+ }
+ if (**argv != '-') {
+ /* treat +thing as an option for C++ */
+ if (endmarker && **argv == '+')
+ continue;
+ *fp++ = argv[0];
+ continue;
+ }
+ switch(argv[0][1]) {
+ case '-':
+ endmarker = &argv[0][2];
+ if (endmarker[0] == '\0') endmarker = "--";
+ break;
+ case 'D':
+ if (argv[0][2] == '\0') {
+ argv++;
+ argc--;
+ }
+ for (p=argv[0] + 2; *p ; p++)
+ if (*p == '=') {
+ *p = ' ';
+ break;
+ }
+ define(argv[0] + 2, &maininclist);
+ break;
+ case 'I':
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = argv[0]+2;
+ if (**(incp-1) == '\0') {
+ *(incp-1) = *(++argv);
+ argc--;
+ }
+ break;
+ case 'U':
+ /* Undef's override all -D's so save them up */
+ numundefs++;
+ if (numundefs == 1)
+ undeflist = malloc(sizeof(char *));
+ else
+ undeflist = realloc(undeflist,
+ numundefs * sizeof(char *));
+ if (argv[0][2] == '\0') {
+ argv++;
+ argc--;
+ }
+ undeflist[numundefs - 1] = argv[0] + 2;
+ break;
+ case 'Y':
+ defincdir = argv[0]+2;
+ break;
+ /* do not use if endmarker processing */
+ case 'a':
+ if (endmarker) break;
+ append = TRUE;
+ break;
+ case 'w':
+ if (endmarker) break;
+ if (argv[0][2] == '\0') {
+ argv++;
+ argc--;
+ width = atoi(argv[0]);
+ } else
+ width = atoi(argv[0]+2);
+ break;
+ case 'o':
+ if (endmarker) break;
+ if (argv[0][2] == '\0') {
+ argv++;
+ argc--;
+ objsuffix = argv[0];
+ } else
+ objsuffix = argv[0]+2;
+ break;
+ case 'p':
+ if (endmarker) break;
+ if (argv[0][2] == '\0') {
+ argv++;
+ argc--;
+ objprefix = argv[0];
+ } else
+ objprefix = argv[0]+2;
+ break;
+ case 'v':
+ if (endmarker) break;
+ verbose = TRUE;
+#ifdef DEBUG
+ if (argv[0][2])
+ _debugmask = atoi(argv[0]+2);
+#endif
+ break;
+ case 's':
+ if (endmarker) break;
+ startat = argv[0]+2;
+ if (*startat == '\0') {
+ startat = *(++argv);
+ argc--;
+ }
+ if (*startat != '#')
+ fatalerr("-s flag's value should start %s\n",
+ "with '#'.");
+ break;
+ case 'f':
+ if (endmarker) break;
+ makefile = argv[0]+2;
+ if (*makefile == '\0') {
+ makefile = *(++argv);
+ argc--;
+ }
+ break;
+
+ case 'm':
+ warn_multiple = TRUE;
+ break;
+
+ /* Ignore -O, -g so we can just pass ${CFLAGS} to
+ makedepend
+ */
+ case 'O':
+ case 'g':
+ break;
+ case 'i':
+ if (strcmp(&argv[0][1],"include") == 0) {
+ char *buf;
+ if (argc<2)
+ fatalerr("option -include is a "
+ "missing its parameter\n");
+ if (cmdinc_count >= MAXINCFILES)
+ fatalerr("Too many -include flags.\n");
+ argc--;
+ argv++;
+ buf = malloc(strlen(DASH_INC_PRE) +
+ strlen(argv[0]) +
+ strlen(DASH_INC_POST) + 1);
+ if(!buf)
+ fatalerr("out of memory at "
+ "-include string\n");
+ cmdinc_list[2 * cmdinc_count + 0] = argv[0];
+ cmdinc_list[2 * cmdinc_count + 1] = buf;
+ cmdinc_count++;
+ break;
+ }
+ /* intentional fall through */
+ default:
+ if (endmarker) break;
+ /* fatalerr("unknown opt = %s\n", argv[0]); */
+ warning("ignoring option %s\n", argv[0]);
+ }
+ }
+ /* Now do the undefs from the command line */
+ for (i = 0; i < numundefs; i++)
+ undefine(undeflist[i], &maininclist);
+ if (numundefs > 0)
+ free(undeflist);
+
+ if (!defincdir) {
+#ifdef PREINCDIR
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = PREINCDIR;
+#endif
+#ifdef __UNIXOS2__
+ {
+ char *emxinc = getenv("C_INCLUDE_PATH");
+ /* can have more than one component */
+ if (emxinc) {
+ char *beg, *end;
+ beg= (char*)strdup(emxinc);
+ for (;;) {
+ end = (char*)strchr(beg,';');
+ if (end) *end = 0;
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many include dirs\n");
+ *incp++ = beg;
+ if (!end) break;
+ beg = end+1;
+ }
+ }
+ }
+#else /* !__UNIXOS2__, does not use INCLUDEDIR at all */
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = INCLUDEDIR;
+#endif
+
+#ifdef EXTRAINCDIR
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = EXTRAINCDIR;
+#endif
+
+#ifdef POSTINCDIR
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = POSTINCDIR;
+#endif
+ } else if (*defincdir) {
+ if (incp >= includedirs + MAXDIRS)
+ fatalerr("Too many -I flags.\n");
+ *incp++ = defincdir;
+ }
+
+ redirect(startat, makefile);
+
+ /*
+ * catch signals.
+ */
+#ifdef USGISH
+/* should really reset SIGINT to SIG_IGN if it was. */
+#ifdef SIGHUP
+ signal (SIGHUP, catch);
+#endif
+ signal (SIGINT, catch);
+#ifdef SIGQUIT
+ signal (SIGQUIT, catch);
+#endif
+ signal (SIGILL, catch);
+#ifdef SIGBUS
+ signal (SIGBUS, catch);
+#endif
+ signal (SIGSEGV, catch);
+#ifdef SIGSYS
+ signal (SIGSYS, catch);
+#endif
+#else
+ sig_act.sa_handler = catch;
+#if defined(_POSIX_SOURCE) || !defined(X_NOT_POSIX)
+ sigemptyset(&sig_act.sa_mask);
+ sigaddset(&sig_act.sa_mask, SIGINT);
+ sigaddset(&sig_act.sa_mask, SIGQUIT);
+#ifdef SIGBUS
+ sigaddset(&sig_act.sa_mask, SIGBUS);
+#endif
+ sigaddset(&sig_act.sa_mask, SIGILL);
+ sigaddset(&sig_act.sa_mask, SIGSEGV);
+ sigaddset(&sig_act.sa_mask, SIGHUP);
+ sigaddset(&sig_act.sa_mask, SIGPIPE);
+#ifdef SIGSYS
+ sigaddset(&sig_act.sa_mask, SIGSYS);
+#endif
+#else
+ sig_act.sa_mask = ((1<<(SIGINT -1))
+ |(1<<(SIGQUIT-1))
+#ifdef SIGBUS
+ |(1<<(SIGBUS-1))
+#endif
+ |(1<<(SIGILL-1))
+ |(1<<(SIGSEGV-1))
+ |(1<<(SIGHUP-1))
+ |(1<<(SIGPIPE-1))
+#ifdef SIGSYS
+ |(1<<(SIGSYS-1))
+#endif
+ );
+#endif /* _POSIX_SOURCE */
+ sig_act.sa_flags = 0;
+ sigaction(SIGHUP, &sig_act, (struct sigaction *)0);
+ sigaction(SIGINT, &sig_act, (struct sigaction *)0);
+ sigaction(SIGQUIT, &sig_act, (struct sigaction *)0);
+ sigaction(SIGILL, &sig_act, (struct sigaction *)0);
+#ifdef SIGBUS
+ sigaction(SIGBUS, &sig_act, (struct sigaction *)0);
+#endif
+ sigaction(SIGSEGV, &sig_act, (struct sigaction *)0);
+#ifdef SIGSYS
+ sigaction(SIGSYS, &sig_act, (struct sigaction *)0);
+#endif
+#endif /* USGISH */
+
+ /*
+ * now peruse through the list of files.
+ */
+ for(fp=filelist; *fp; fp++) {
+ DBG_PRINT(stderr,"file: %s\n",*fp);
+ filecontent = getfile(*fp);
+ setfile_cmdinc(filecontent, cmdinc_count, cmdinc_list);
+ ip = newinclude(*fp, (char *)NULL);
+
+ find_includes(filecontent, ip, ip, 0, FALSE);
+ freefile(filecontent);
+ recursive_pr_include(ip, ip->i_file, base_name(*fp));
+ inc_clean();
+ }
+ if (printed)
+ printf("\n");
+ return 0;
+}
+
+#ifdef __UNIXOS2__
+/*
+ * eliminate \r chars from file
+ */
+static int
+elim_cr(char *buf, int sz)
+{
+ int i,wp;
+ for (i= wp = 0; i<sz; i++) {
+ if (buf[i] != '\r')
+ buf[wp++] = buf[i];
+ }
+ return wp;
+}
+#endif
+
+struct filepointer *
+getfile(char *file)
+{
+ int fd;
+ struct filepointer *content;
+ struct stat st;
+
+ content = (struct filepointer *)malloc(sizeof(struct filepointer));
+ content->f_name = file;
+ if ((fd = open(file, O_RDONLY)) < 0) {
+ warning("cannot open \"%s\"\n", file);
+ content->f_p = content->f_base = content->f_end = (char *)malloc(1);
+ *content->f_p = '\0';
+ return(content);
+ }
+ fstat(fd, &st);
+ content->f_base = (char *)malloc(st.st_size+1);
+ if (content->f_base == NULL)
+ fatalerr("cannot allocate mem\n");
+ if ((st.st_size = read(fd, content->f_base, st.st_size)) < 0)
+ fatalerr("failed to read %s\n", file);
+#ifdef __UNIXOS2__
+ st.st_size = elim_cr(content->f_base,st.st_size);
+#endif
+ close(fd);
+ content->f_len = st.st_size+1;
+ content->f_p = content->f_base;
+ content->f_end = content->f_base + st.st_size;
+ *content->f_end = '\0';
+ content->f_line = 0;
+ content->cmdinc_count = 0;
+ content->cmdinc_list = NULL;
+ content->cmdinc_line = 0;
+ return(content);
+}
+
+void
+setfile_cmdinc(struct filepointer* filep, long count, char** list)
+{
+ filep->cmdinc_count = count;
+ filep->cmdinc_list = list;
+ filep->cmdinc_line = 0;
+}
+
+void
+freefile(struct filepointer *fp)
+{
+ free(fp->f_base);
+ free(fp);
+}
+
+char *copy(char *str)
+{
+ char *p = (char *)malloc(strlen(str) + 1);
+
+ strcpy(p, str);
+ return(p);
+}
+
+int
+match(char *str, char **list)
+{
+ int i;
+
+ for (i=0; *list; i++, list++)
+ if (strcmp(str, *list) == 0)
+ return(i);
+ return(-1);
+}
+
+/*
+ * Get the next line. We only return lines beginning with '#' since that
+ * is all this program is ever interested in.
+ */
+char *getnextline(struct filepointer *filep)
+{
+ char *p, /* walking pointer */
+ *eof, /* end of file pointer */
+ *bol; /* beginning of line pointer */
+ int lineno; /* line number */
+ boolean whitespace = FALSE;
+
+ /*
+ * Fake the "-include" line files in form of #include to the
+ * start of each file.
+ */
+ if (filep->cmdinc_line < filep->cmdinc_count) {
+ char *inc = filep->cmdinc_list[2 * filep->cmdinc_line + 0];
+ char *buf = filep->cmdinc_list[2 * filep->cmdinc_line + 1];
+ filep->cmdinc_line++;
+ sprintf(buf,"%s%s%s",DASH_INC_PRE,inc,DASH_INC_POST);
+ DBG_PRINT(stderr,"%s\n",buf);
+ return(buf);
+ }
+
+ p = filep->f_p;
+ eof = filep->f_end;
+ if (p >= eof)
+ return((char *)NULL);
+ lineno = filep->f_line;
+
+ for (bol = p--; ++p < eof; ) {
+ if ((bol == p) && ((*p == ' ') || (*p == '\t')))
+ {
+ /* Consume leading white-spaces for this line */
+ while (((p+1) < eof) && ((*p == ' ') || (*p == '\t')))
+ {
+ p++;
+ bol++;
+ }
+ whitespace = TRUE;
+ }
+
+ if (*p == '/' && (p+1) < eof && *(p+1) == '*') {
+ /* Consume C comments */
+ *(p++) = ' ';
+ *(p++) = ' ';
+ while (p < eof && *p) {
+ if (*p == '*' && (p+1) < eof && *(p+1) == '/') {
+ *(p++) = ' ';
+ *(p++) = ' ';
+ break;
+ }
+ if (*p == '\n')
+ lineno++;
+ *(p++) = ' ';
+ }
+ --p;
+ }
+ else if (*p == '/' && (p+1) < eof && *(p+1) == '/') {
+ /* Consume C++ comments */
+ *(p++) = ' ';
+ *(p++) = ' ';
+ while (p < eof && *p) {
+ if (*p == '\\' && (p+1) < eof &&
+ *(p+1) == '\n') {
+ *(p++) = ' ';
+ lineno++;
+ }
+ else if (*p == '?' && (p+3) < eof &&
+ *(p+1) == '?' &&
+ *(p+2) == '/' &&
+ *(p+3) == '\n') {
+ *(p++) = ' ';
+ *(p++) = ' ';
+ *(p++) = ' ';
+ lineno++;
+ }
+ else if (*p == '\n')
+ break; /* to process end of line */
+ *(p++) = ' ';
+ }
+ --p;
+ }
+ else if (*p == '\\' && (p+1) < eof && *(p+1) == '\n') {
+ /* Consume backslash line terminations */
+ *(p++) = ' ';
+ *p = ' ';
+ lineno++;
+ }
+ else if (*p == '?' && (p+3) < eof &&
+ *(p+1) == '?' && *(p+2) == '/' && *(p+3) == '\n') {
+ /* Consume trigraph'ed backslash line terminations */
+ *(p++) = ' ';
+ *(p++) = ' ';
+ *(p++) = ' ';
+ *p = ' ';
+ lineno++;
+ }
+ else if (*p == '\n') {
+ lineno++;
+ if (*bol == '#') {
+ char *cp;
+
+ *(p++) = '\0';
+ /* punt lines with just # (yacc generated) */
+ for (cp = bol+1;
+ *cp && (*cp == ' ' || *cp == '\t'); cp++);
+ if (*cp) goto done;
+ --p;
+ }
+ bol = p+1;
+ whitespace = FALSE;
+ }
+ }
+ if (*bol != '#')
+ bol = NULL;
+done:
+ filep->f_p = p;
+ filep->f_line = lineno;
+#ifdef DEBUG_DUMP
+ if (bol)
+ DBG_PRINT(stderr,"%s\n",bol);
+#endif
+ return(bol);
+}
+
+/*
+ * Strip the file name down to what we want to see in the Makefile.
+ * It will have objprefix and objsuffix around it.
+ */
+char *base_name(char *file)
+{
+ char *p;
+
+ file = copy(file);
+ for(p=file+strlen(file); p>file && *p != '.'; p--) ;
+
+ if (*p == '.')
+ *p = '\0';
+ return(file);
+}
+
+#ifdef USING_AUTOCONF
+# ifndef HAVE_RENAME
+# define NEED_RENAME
+# endif
+#else /* Imake configured, check known OS'es without rename() */
+# if defined(USG) && !defined(CRAY) && !defined(SVR4) && !defined(__UNIXOS2__) && !defined(clipper) && !defined(__clipper__)
+# define NEED_RENAME
+# endif
+#endif
+
+#ifdef NEED_RENAME
+int rename (char *from, char *to)
+{
+ (void) unlink (to);
+ if (link (from, to) == 0) {
+ unlink (from);
+ return 0;
+ } else {
+ return -1;
+ }
+}
+#endif /* NEED_RENAME */
+
+void
+redirect(char *line, char *makefile)
+{
+ struct stat st;
+ FILE *fdin, *fdout;
+ char backup[ BUFSIZ ],
+ buf[ BUFSIZ ];
+ boolean found = FALSE;
+ int len;
+
+ /*
+ * if makefile is "-" then let it pour onto stdout.
+ */
+ if (makefile && *makefile == '-' && *(makefile+1) == '\0') {
+ puts(line);
+ return;
+ }
+
+ /*
+ * use a default makefile is not specified.
+ */
+ if (!makefile) {
+ if (stat("Makefile", &st) == 0)
+ makefile = "Makefile";
+ else if (stat("makefile", &st) == 0)
+ makefile = "makefile";
+ else
+ fatalerr("[mM]akefile is not present\n");
+ }
+ else
+ stat(makefile, &st);
+ if ((fdin = fopen(makefile, "r")) == NULL)
+ fatalerr("cannot open \"%s\"\n", makefile);
+ sprintf(backup, "%s.bak", makefile);
+ unlink(backup);
+#if defined(WIN32) || defined(__UNIXOS2__) || defined(__CYGWIN__)
+ fclose(fdin);
+#endif
+ if (rename(makefile, backup) < 0)
+ fatalerr("cannot rename %s to %s\n", makefile, backup);
+#if defined(WIN32) || defined(__UNIXOS2__) || defined(__CYGWIN__)
+ if ((fdin = fopen(backup, "r")) == NULL)
+ fatalerr("cannot open \"%s\"\n", backup);
+#endif
+ if ((fdout = freopen(makefile, "w", stdout)) == NULL)
+ fatalerr("cannot open \"%s\"\n", backup);
+ len = strlen(line);
+ while (!found && fgets(buf, BUFSIZ, fdin)) {
+ if (*buf == '#' && strncmp(line, buf, len) == 0)
+ found = TRUE;
+ fputs(buf, fdout);
+ }
+ if (!found) {
+ if (verbose)
+ warning("Adding new delimiting line \"%s\" and dependencies...\n",
+ line);
+ puts(line); /* same as fputs(fdout); but with newline */
+ } else if (append) {
+ while (fgets(buf, BUFSIZ, fdin)) {
+ fputs(buf, fdout);
+ }
+ }
+ fflush(fdout);
+#ifndef HAVE_FCHMOD
+ chmod(makefile, st.st_mode);
+#else
+ fchmod(fileno(fdout), st.st_mode);
+#endif /* HAVE_FCHMOD */
+}
+
+void
+fatalerr(char *msg, ...)
+{
+ va_list args;
+ fprintf(stderr, "%s: error: ", ProgramName);
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+ exit (1);
+}
+
+void
+warning(char *msg, ...)
+{
+ va_list args;
+ fprintf(stderr, "%s: warning: ", ProgramName);
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+}
+
+void
+warning1(char *msg, ...)
+{
+ va_list args;
+ va_start(args, msg);
+ vfprintf(stderr, msg, args);
+ va_end(args);
+}
diff --git a/nx-X11/config/makedepend/mkdepend.man b/nx-X11/config/makedepend/mkdepend.man
new file mode 100644
index 000000000..ac67cc8d3
--- /dev/null
+++ b/nx-X11/config/makedepend/mkdepend.man
@@ -0,0 +1,382 @@
+.\" $Xorg: mkdepend.man,v 1.5 2001/02/09 02:03:16 xorgcvs Exp $
+.\" Copyright (c) 1993, 1994, 1998 The Open Group
+.\"
+.\" Permission to use, copy, modify, distribute, and sell this software and its
+.\" documentation for any purpose is hereby granted without fee, provided that
+.\" the above copyright notice appear in all copies and that both that
+.\" copyright notice and this permission notice appear in supporting
+.\" documentation.
+.\"
+.\" The above copyright notice and this permission notice shall be included in
+.\" all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+.\" THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+.\" SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of The Open Group shall not
+.\" be used in advertising or otherwise to promote the sale, use or other
+.\" dealing in this Software without prior written authorization from The
+.\" Open Group.
+.\"
+.\" $XFree86: xc/config/makedepend/mkdepend.man,v 1.6 2001/12/17 20:52:22 dawes Exp $
+.\"
+.TH MAKEDEPEND 1 __xorgversion__
+.UC 4
+.SH NAME
+makedepend \- create dependencies in makefiles
+.SH SYNOPSIS
+.B makedepend
+[
+.BI \-D name\fB=\fPdef
+] [
+.BI \-D name
+] [
+.BI \-I includedir
+] [
+.BI \-Y includedir
+] [
+.B \-a
+] [
+.BI \-f makefile
+] [
+.BI \-include \ file
+] [
+.BI \-o objsuffix
+] [
+.BI \-p objprefix
+] [
+.BI \-s string
+] [
+.BI \-w width
+] [
+.B \-v
+] [
+.B \-m
+] [
+\-\^\-
+.I otheroptions
+\-\^\-
+]
+.I sourcefile
+\&.\|.\|.
+.br
+.SH DESCRIPTION
+The
+.B makedepend
+program reads each
+.I sourcefile
+in sequence and parses it like a C-preprocessor,
+processing all
+.I #include,
+.I #define,
+.I #undef,
+.I #ifdef,
+.I #ifndef,
+.I #endif,
+.I #if,
+.I #elif
+and
+.I #else
+directives so that it can correctly tell which
+.I #include,
+directives would be used in a compilation.
+Any
+.I #include,
+directives can reference files having other
+.I #include
+directives, and parsing will occur in these files as well.
+.PP
+Every file that a
+.I sourcefile
+includes,
+directly or indirectly,
+is what
+.B makedepend
+calls a \fIdependency.\fP
+These dependencies are then written to a
+.I makefile
+in such a way that
+.B make(1)
+will know which object files must be recompiled when a dependency has changed.
+.PP
+By default,
+.B makedepend
+places its output in the file named
+.I makefile
+if it exists, otherwise
+.I Makefile.
+An alternate makefile may be specified with the
+.B \-f
+option.
+It first searches the makefile for
+the line
+.sp
+\& # DO NOT DELETE THIS LINE \-\^\- make depend depends on it.
+.sp
+or one provided with the
+.B \-s
+option,
+as a delimiter for the dependency output.
+If it finds it, it will delete everything
+following this to the end of the makefile
+and put the output after this line.
+If it doesn't find it, the program
+will append the string to the end of the makefile
+and place the output following that.
+For each
+.I sourcefile
+appearing on the command line,
+.B makedepend
+puts lines in the makefile of the form
+.sp
+ sourcefile.o:\0dfile .\|.\|.
+.sp
+Where \fIsourcefile.o\fP is the name from the command
+line with its suffix replaced with ``.o'',
+and \fIdfile\fP is a dependency discovered in a
+.I #include
+directive while parsing
+.I sourcefile
+or one of the files it included.
+.SH EXAMPLE
+Normally,
+.B makedepend
+will be used in a makefile target so that typing ``make depend'' will
+bring the dependencies up to date for the makefile.
+For example,
+.nf
+ SRCS\0=\0file1.c\0file2.c\0.\|.\|.
+ CFLAGS\0=\0\-O\0\-DHACK\0\-I\^.\^.\^/foobar\0\-xyz
+ depend:
+ makedepend\0\-\^\-\0$(CFLAGS)\0\-\^\-\0$(SRCS)
+.fi
+.SH OPTIONS
+The program
+will ignore any option that it does not understand so that you may use
+the same arguments that you would for
+.B cc(1).
+.TP 5
+.B \-D\fIname\fP=\fIdef\fP \fRor\fP \-D\fIname\fP
+Define.
+This places a definition for
+.I name
+in
+.B makedepend's
+symbol table.
+Without
+.I =def\|
+the symbol becomes defined as ``1''.
+.TP 5
+.B \-I\fIincludedir\fP
+Include directory.
+This option tells
+.B makedepend
+to prepend
+.I includedir
+to its list of directories to search when it encounters
+a
+.I #include
+directive.
+By default,
+.B makedepend
+only searches the standard include directories (usually /usr/include
+and possibly a compiler-dependent directory).
+.TP 5
+.B \-Y\fIincludedir\fP
+Replace all of the standard include directories with the single specified
+include directory; you can omit the
+.I includedir
+to simply prevent searching the standard include directories.
+.TP 5
+.B \-a
+Append the dependencies to the end of the file instead of replacing them.
+.TP 5
+.B \-f\fImakefile\fP
+Filename.
+This allows you to specify an alternate makefile in which
+.B makedepend
+can place its output.
+Specifying ``\-'' as the file name (i.e., \fB\-f\-\fP) sends the
+output to standard output instead of modifying an existing file.
+.TP 5
+.B \-include \fIfile\fP
+Process file as input, and include all the resulting output
+before processing the regular input file. This has the same
+affect as if the specified file is an include statement that
+appears before the very first line of the regular input file.
+.TP 5
+.B \-o\fIobjsuffix\fP
+Object file suffix.
+Some systems may have object files whose suffix is something other
+than ``.o''.
+This option allows you to specify another suffix, such as
+``.b'' with
+.I \-o.b
+or ``:obj''
+with
+.I \-o:obj
+and so forth.
+.TP 5
+.B \-p\fIobjprefix\fP
+Object file prefix.
+The prefix is prepended to the name of the object file. This is
+usually used to designate a different directory for the object file.
+The default is the empty string.
+.TP 5
+.B \-s\fIstring\fP
+Starting string delimiter.
+This option permits you to specify
+a different string for
+.B makedepend
+to look for in the makefile.
+.TP 5
+.B \-w\fIwidth\fP
+Line width.
+Normally,
+.B makedepend
+will ensure that every output line that it writes will be no wider than
+78 characters for the sake of readability.
+This option enables you to change this width.
+.TP 5
+.B \-v
+Verbose operation.
+This option causes
+.B makedepend
+to emit the list of files included by each input file.
+.TP 5
+.B \-m
+Warn about multiple inclusion.
+This option causes
+.B makedepend
+to produce a warning if any input file includes another file more than
+once. In previous versions of
+.B makedepend
+this was the default behavior; the default has been changed to better
+match the behavior of the C compiler, which does not consider multiple
+inclusion to be an error. This option is provided for backward
+compatibility, and to aid in debugging problems related to multiple
+inclusion.
+.TP 5
+.B "\-\^\- \fIoptions\fP \-\^\-"
+If
+.B makedepend
+encounters a double hyphen (\-\^\-) in the argument list,
+then any unrecognized argument following it
+will be silently ignored; a second double hyphen terminates this
+special treatment.
+In this way,
+.B makedepend
+can be made to safely ignore esoteric compiler arguments that might
+normally be found in a CFLAGS
+.B make
+macro (see the
+.B EXAMPLE
+section above).
+All options that
+.B makedepend
+recognizes and appear between the pair of double hyphens
+are processed normally.
+.SH ALGORITHM
+The approach used in this program enables it to run an order of magnitude
+faster than any other ``dependency generator'' I have ever seen.
+Central to this performance are two assumptions:
+that all files compiled by a single
+makefile will be compiled with roughly the same
+.I \-I
+and
+.I \-D
+options;
+and that most files in a single directory will include largely the
+same files.
+.PP
+Given these assumptions,
+.B makedepend
+expects to be called once for each makefile, with
+all source files that are maintained by the
+makefile appearing on the command line.
+It parses each source and include
+file exactly once, maintaining an internal symbol table
+for each.
+Thus, the first file on the command line will take an amount of time
+proportional to the amount of time that a normal C preprocessor takes.
+But on subsequent files, if it encounters an include file
+that it has already parsed, it does not parse it again.
+.PP
+For example,
+imagine you are compiling two files,
+.I file1.c
+and
+.I file2.c,
+they each include the header file
+.I header.h,
+and the file
+.I header.h
+in turn includes the files
+.I def1.h
+and
+.I def2.h.
+When you run the command
+.sp
+ makedepend\0file1.c\0file2.c
+.sp
+.B makedepend
+will parse
+.I file1.c
+and consequently,
+.I header.h
+and then
+.I def1.h
+and
+.I def2.h.
+It then decides that the dependencies for this file are
+.sp
+ file1.o:\0header.h\0def1.h\0def2.h
+.sp
+But when the program parses
+.I file2.c
+and discovers that it, too, includes
+.I header.h,
+it does not parse the file,
+but simply adds
+.I header.h,
+.I def1.h
+and
+.I def2.h
+to the list of dependencies for
+.I file2.o.
+.SH "SEE ALSO"
+cc(1), make(1)
+.SH BUGS
+.B makedepend
+parses, but does not currently evaluate, the SVR4 #predicate(token-list)
+preprocessor expression; such expressions are simply assumed to be true.
+This may cause the wrong
+.I #include
+directives to be evaluated.
+.PP
+Imagine you are parsing two files,
+say
+.I file1.c
+and
+.I file2.c,
+each includes the file
+.I def.h.
+The list of files that
+.I def.h
+includes might truly be different when
+.I def.h
+is included by
+.I file1.c
+than when it is included by
+.I file2.c.
+But once
+.B makedepend
+arrives at a list of dependencies for a file,
+it is cast in concrete.
+.SH AUTHOR
+Todd Brunhoff, Tektronix, Inc. and MIT Project Athena
diff --git a/nx-X11/config/makedepend/parse.c b/nx-X11/config/makedepend/parse.c
new file mode 100644
index 000000000..935c61df7
--- /dev/null
+++ b/nx-X11/config/makedepend/parse.c
@@ -0,0 +1,686 @@
+/* $Xorg: parse.c,v 1.6 2001/02/09 02:03:16 xorgcvs Exp $ */
+/*
+
+Copyright (c) 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/config/makedepend/parse.c,v 1.11 2001/12/17 20:52:22 dawes Exp $ */
+
+#include "def.h"
+
+extern char *directives[];
+extern struct inclist inclist[ MAXFILES ],
+ *inclistnext,
+ maininclist;
+extern char *includedirs[ ],
+ **includedirsnext;
+
+static int deftype (char *line, struct filepointer *filep,
+ struct inclist *file_red, struct inclist *file,
+ int parse_it);
+static int zero_value(char *filename, char *exp, struct filepointer *filep,
+ struct inclist *file_red);
+static int merge2defines(struct inclist *file1, struct inclist *file2);
+
+static int
+gobble(struct filepointer *filep, struct inclist *file,
+ struct inclist *file_red)
+{
+ char *line;
+ int type;
+
+ while ((line = getnextline(filep))) {
+ switch(type = deftype(line, filep, file_red, file, FALSE)) {
+ case IF:
+ case IFFALSE:
+ case IFGUESSFALSE:
+ case IFDEF:
+ case IFNDEF:
+ type = gobble(filep, file, file_red);
+ while ((type == ELIF) || (type == ELIFFALSE) ||
+ (type == ELIFGUESSFALSE))
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ (void)gobble(filep, file, file_red);
+ break;
+ case ELSE:
+ case ENDIF:
+ debug(0,("%s, line %d: #%s\n",
+ file->i_file, filep->f_line,
+ directives[type]));
+ return(type);
+ case DEFINE:
+ case UNDEF:
+ case INCLUDE:
+ case INCLUDEDOT:
+ case PRAGMA:
+ case ERROR:
+ case IDENT:
+ case SCCS:
+ case EJECT:
+ case WARNING:
+ case INCLUDENEXT:
+ case INCLUDENEXTDOT:
+ break;
+ case ELIF:
+ case ELIFFALSE:
+ case ELIFGUESSFALSE:
+ return(type);
+ case -1:
+ warning("%s", file_red->i_file);
+ if (file_red != file)
+ warning1(" (reading %s)", file->i_file);
+ warning1(", line %d: unknown directive == \"%s\"\n",
+ filep->f_line, line);
+ break;
+ }
+ }
+ return(-1);
+}
+
+/*
+ * Decide what type of # directive this line is.
+ */
+static int
+deftype (char *line, struct filepointer *filep,
+ struct inclist *file_red, struct inclist *file, int parse_it)
+{
+ register char *p;
+ char *directive, savechar, *q;
+ register int ret;
+
+ /*
+ * Parse the directive...
+ */
+ directive=line+1;
+ while (*directive == ' ' || *directive == '\t')
+ directive++;
+
+ p = directive;
+ while ((*p == '_') || (*p >= 'a' && *p <= 'z'))
+ p++;
+ savechar = *p;
+ *p = '\0';
+ ret = match(directive, directives);
+ *p = savechar;
+
+ /* If we don't recognize this compiler directive or we happen to just
+ * be gobbling up text while waiting for an #endif or #elif or #else
+ * in the case of an #elif we must check the zero_value and return an
+ * ELIF or an ELIFFALSE.
+ */
+
+ if (ret == ELIF && !parse_it)
+ {
+ while (*p == ' ' || *p == '\t')
+ p++;
+ /*
+ * parse an expression.
+ */
+ debug(0,("%s, line %d: #elif %s ",
+ file->i_file, filep->f_line, p));
+ ret = zero_value(file->i_file, p, filep, file_red);
+ if (ret != IF)
+ {
+ debug(0,("false...\n"));
+ if (ret == IFFALSE)
+ return(ELIFFALSE);
+ else
+ return(ELIFGUESSFALSE);
+ }
+ else
+ {
+ debug(0,("true...\n"));
+ return(ELIF);
+ }
+ }
+
+ if (ret < 0 || ! parse_it)
+ return(ret);
+
+ /*
+ * now decide how to parse the directive, and do it.
+ */
+ while (*p == ' ' || *p == '\t')
+ p++;
+ q = p + strlen(p);
+ do {
+ q--;
+ } while (*q == ' ' || *q == '\t');
+ q[1] = '\0';
+ switch (ret) {
+ case IF:
+ /*
+ * parse an expression.
+ */
+ ret = zero_value(file->i_file, p, filep, file_red);
+ debug(0,("%s, line %d: %s #if %s\n",
+ file->i_file, filep->f_line, ret?"false":"true", p));
+ break;
+ case IFDEF:
+ case IFNDEF:
+ debug(0,("%s, line %d: #%s %s\n",
+ file->i_file, filep->f_line, directives[ret], p));
+ case UNDEF:
+ /*
+ * separate the name of a single symbol.
+ */
+ while (isalnum(*p) || *p == '_')
+ *line++ = *p++;
+ *line = '\0';
+ break;
+ case INCLUDE:
+ case INCLUDENEXT:
+ debug(2,("%s, line %d: #include%s %s\n",
+ file->i_file, filep->f_line,
+ (ret == INCLUDE) ? "" : "_next", p));
+
+ /* Support ANSI macro substitution */
+ while (1) {
+ struct symtab **sym;
+
+ if (!*p || *p == '"' || *p == '<')
+ break;
+
+ sym = isdefined(p, file_red, NULL);
+ if (!sym)
+ break;
+
+ p = (*sym)->s_value;
+ debug(3,("%s : #includes SYMBOL %s = %s\n",
+ file->i_incstring,
+ (*sym) -> s_name,
+ (*sym) -> s_value));
+ /* mark file as having included a 'soft include' */
+ file->i_flags |= INCLUDED_SYM;
+ }
+
+ /*
+ * Separate the name of the include file.
+ */
+ while (*p && *p != '"' && *p != '<')
+ p++;
+ if (! *p)
+ return(-2);
+ if (*p++ == '"') {
+ if (ret == INCLUDE)
+ ret = INCLUDEDOT;
+ else
+ ret = INCLUDENEXTDOT;
+ while (*p && *p != '"')
+ *line++ = *p++;
+ } else
+ while (*p && *p != '>')
+ *line++ = *p++;
+ *line = '\0';
+ break;
+ case DEFINE:
+ /*
+ * copy the definition back to the beginning of the line.
+ */
+ strcpy (line, p);
+ break;
+ case ELSE:
+ case ENDIF:
+ case ELIF:
+ case PRAGMA:
+ case ERROR:
+ case IDENT:
+ case SCCS:
+ case EJECT:
+ case WARNING:
+ debug(0,("%s, line %d: #%s\n",
+ file->i_file, filep->f_line, directives[ret]));
+ /*
+ * nothing to do.
+ */
+ break;
+ }
+ return(ret);
+}
+
+struct symtab **
+fdefined(char *symbol, struct inclist *file, struct inclist **srcfile)
+{
+ struct inclist **ip;
+ struct symtab **val;
+ int i;
+ static int recurse_lvl = 0;
+
+ if (file->i_flags & DEFCHECKED)
+ return(NULL);
+ debug(2,("Looking for %s in %s\n", symbol, file->i_file));
+ file->i_flags |= DEFCHECKED;
+ if ((val = slookup(symbol, file)))
+ debug(1,("%s defined in %s as %s\n",
+ symbol, file->i_file, (*val)->s_value));
+ if (val == NULL && file->i_list)
+ {
+ for (ip = file->i_list, i=0; i < file->i_listlen; i++, ip++)
+ if (file->i_merged[i]==FALSE) {
+ val = fdefined(symbol, *ip, srcfile);
+ file->i_merged[i]=merge2defines(file,*ip);
+ if (val!=NULL) break;
+ }
+ }
+ else if (val != NULL && srcfile != NULL) *srcfile = file;
+ recurse_lvl--;
+ file->i_flags &= ~DEFCHECKED;
+
+ return(val);
+}
+
+struct symtab **
+isdefined(char *symbol, struct inclist *file, struct inclist **srcfile)
+{
+ struct symtab **val;
+
+ if ((val = slookup(symbol, &maininclist))) {
+ debug(1,("%s defined on command line\n", symbol));
+ if (srcfile != NULL) *srcfile = &maininclist;
+ return(val);
+ }
+ if ((val = fdefined(symbol, file, srcfile)))
+ return(val);
+ debug(1,("%s not defined in %s\n", symbol, file->i_file));
+ return(NULL);
+}
+
+/*
+ * Return type based on if the #if expression evaluates to 0
+ */
+static int
+zero_value(char *filename,
+ char *exp,
+ struct filepointer *filep,
+ struct inclist *file_red)
+{
+ if (cppsetup(filename, exp, filep, file_red))
+ return(IFFALSE);
+ else
+ return(IF);
+}
+
+void
+define2(char *name, char *val, struct inclist *file)
+{
+ int first, last, below;
+ register struct symtab **sp = NULL, **dest;
+ struct symtab *stab;
+
+ /* Make space if it's needed */
+ if (file->i_defs == NULL)
+ {
+ file->i_defs = (struct symtab **)
+ malloc(sizeof (struct symtab*) * SYMTABINC);
+ file->i_ndefs = 0;
+ }
+ else if (!(file->i_ndefs % SYMTABINC))
+ file->i_defs = (struct symtab **)
+ realloc(file->i_defs,
+ sizeof(struct symtab*)*(file->i_ndefs+SYMTABINC));
+
+ if (file->i_defs == NULL)
+ fatalerr("malloc()/realloc() failure in insert_defn()\n");
+
+ below = first = 0;
+ last = file->i_ndefs - 1;
+ while (last >= first)
+ {
+ /* Fast inline binary search */
+ register char *s1;
+ register char *s2;
+ register int middle = (first + last) / 2;
+
+ /* Fast inline strchr() */
+ s1 = name;
+ s2 = file->i_defs[middle]->s_name;
+ while (*s1++ == *s2++)
+ if (s2[-1] == '\0') break;
+
+ /* If exact match, set sp and break */
+ if (*--s1 == *--s2)
+ {
+ sp = file->i_defs + middle;
+ break;
+ }
+
+ /* If name > i_defs[middle] ... */
+ if (*s1 > *s2)
+ {
+ below = first;
+ first = middle + 1;
+ }
+ /* else ... */
+ else
+ {
+ below = last = middle - 1;
+ }
+ }
+
+ /* Search is done. If we found an exact match to the symbol name,
+ just replace its s_value */
+ if (sp != NULL)
+ {
+ debug(1,("redefining %s from %s to %s in file %s\n",
+ name, (*sp)->s_value, val, file->i_file));
+ free((*sp)->s_value);
+ (*sp)->s_value = copy(val);
+ return;
+ }
+
+ sp = file->i_defs + file->i_ndefs++;
+ dest = file->i_defs + below + 1;
+ while (sp > dest)
+ {
+ *sp = sp[-1];
+ sp--;
+ }
+ stab = (struct symtab *) malloc(sizeof (struct symtab));
+ if (stab == NULL)
+ fatalerr("malloc()/realloc() failure in insert_defn()\n");
+
+ debug(1,("defining %s to %s in file %s\n", name, val, file->i_file));
+ stab->s_name = copy(name);
+ stab->s_value = copy(val);
+ *sp = stab;
+}
+
+void
+define(char *def, struct inclist *file)
+{
+ char *val;
+
+ /* Separate symbol name and its value */
+ val = def;
+ while (isalnum(*val) || *val == '_')
+ val++;
+ if (*val)
+ *val++ = '\0';
+ while (*val == ' ' || *val == '\t')
+ val++;
+
+ if (!*val)
+ val = "1";
+ define2(def, val, file);
+}
+
+struct symtab **
+slookup(char *symbol, struct inclist *file)
+{
+ register int first = 0;
+ register int last = file->i_ndefs - 1;
+
+ if (file) while (last >= first)
+ {
+ /* Fast inline binary search */
+ register char *s1;
+ register char *s2;
+ register int middle = (first + last) / 2;
+
+ /* Fast inline strchr() */
+ s1 = symbol;
+ s2 = file->i_defs[middle]->s_name;
+ while (*s1++ == *s2++)
+ if (s2[-1] == '\0') break;
+
+ /* If exact match, we're done */
+ if (*--s1 == *--s2)
+ {
+ return file->i_defs + middle;
+ }
+
+ /* If symbol > i_defs[middle] ... */
+ if (*s1 > *s2)
+ {
+ first = middle + 1;
+ }
+ /* else ... */
+ else
+ {
+ last = middle - 1;
+ }
+ }
+ return(NULL);
+}
+
+static int
+merge2defines(struct inclist *file1, struct inclist *file2)
+{
+ int i;
+
+ if ((file1==NULL) || (file2==NULL) ||
+ !(file2->i_flags & FINISHED))
+ return 0;
+
+ for (i=0; i < file2->i_listlen; i++)
+ if (file2->i_merged[i]==FALSE)
+ return 0;
+
+ {
+ int first1 = 0;
+ int last1 = file1->i_ndefs - 1;
+
+ int first2 = 0;
+ int last2 = file2->i_ndefs - 1;
+
+ int first=0;
+ struct symtab** i_defs = NULL;
+ int deflen=file1->i_ndefs+file2->i_ndefs;
+
+ debug(2,("merging %s into %s\n",
+ file2->i_file, file1->i_file));
+
+ if (deflen>0)
+ {
+ /* make sure deflen % SYMTABINC == 0 is still true */
+ deflen += (SYMTABINC - deflen % SYMTABINC) % SYMTABINC;
+ i_defs=(struct symtab**)
+ malloc(deflen*sizeof(struct symtab*));
+ if (i_defs==NULL) return 0;
+ }
+
+ while ((last1 >= first1) && (last2 >= first2))
+ {
+ char *s1=file1->i_defs[first1]->s_name;
+ char *s2=file2->i_defs[first2]->s_name;
+
+ if (strcmp(s1,s2) < 0)
+ i_defs[first++]=file1->i_defs[first1++];
+ else if (strcmp(s1,s2) > 0)
+ i_defs[first++]=file2->i_defs[first2++];
+ else /* equal */
+ {
+ i_defs[first++]=file2->i_defs[first2++];
+ first1++;
+ }
+ }
+ while (last1 >= first1)
+ {
+ i_defs[first++]=file1->i_defs[first1++];
+ }
+ while (last2 >= first2)
+ {
+ i_defs[first++]=file2->i_defs[first2++];
+ }
+
+ if (file1->i_defs) free(file1->i_defs);
+ file1->i_defs=i_defs;
+ file1->i_ndefs=first;
+
+ return 1;
+ }
+}
+
+void
+undefine(char *symbol, struct inclist *file)
+{
+ register struct symtab **ptr;
+ struct inclist *srcfile;
+ while ((ptr = isdefined(symbol, file, &srcfile)) != NULL)
+ {
+ srcfile->i_ndefs--;
+ for (; ptr < srcfile->i_defs + srcfile->i_ndefs; ptr++)
+ *ptr = ptr[1];
+ }
+}
+
+int
+find_includes(struct filepointer *filep, struct inclist *file,
+ struct inclist *file_red, int recursion, boolean failOK)
+{
+ struct inclist *inclistp;
+ char **includedirsp;
+ register char *line;
+ register int type;
+ boolean recfailOK;
+
+ while ((line = getnextline(filep))) {
+ switch(type = deftype(line, filep, file_red, file, TRUE)) {
+ case IF:
+ doif:
+ type = find_includes(filep, file,
+ file_red, recursion+1, failOK);
+ while ((type == ELIF) || (type == ELIFFALSE) ||
+ (type == ELIFGUESSFALSE))
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ gobble(filep, file, file_red);
+ break;
+ case IFFALSE:
+ case IFGUESSFALSE:
+ doiffalse:
+ if (type == IFGUESSFALSE || type == ELIFGUESSFALSE)
+ recfailOK = TRUE;
+ else
+ recfailOK = failOK;
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ find_includes(filep, file,
+ file_red, recursion+1, recfailOK);
+ else
+ if (type == ELIF)
+ goto doif;
+ else
+ if ((type == ELIFFALSE) || (type == ELIFGUESSFALSE))
+ goto doiffalse;
+ break;
+ case IFDEF:
+ case IFNDEF:
+ if ((type == IFDEF && isdefined(line, file_red, NULL))
+ || (type == IFNDEF && !isdefined(line, file_red, NULL))) {
+ debug(1,(type == IFNDEF ?
+ "line %d: %s !def'd in %s via %s%s\n" : "",
+ filep->f_line, line,
+ file->i_file, file_red->i_file, ": doit"));
+ type = find_includes(filep, file,
+ file_red, recursion+1, failOK);
+ while (type == ELIF || type == ELIFFALSE || type == ELIFGUESSFALSE)
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ gobble(filep, file, file_red);
+ }
+ else {
+ debug(1,(type == IFDEF ?
+ "line %d: %s !def'd in %s via %s%s\n" : "",
+ filep->f_line, line,
+ file->i_file, file_red->i_file, ": gobble"));
+ type = gobble(filep, file, file_red);
+ if (type == ELSE)
+ find_includes(filep, file,
+ file_red, recursion+1, failOK);
+ else if (type == ELIF)
+ goto doif;
+ else if (type == ELIFFALSE || type == ELIFGUESSFALSE)
+ goto doiffalse;
+ }
+ break;
+ case ELSE:
+ case ELIFFALSE:
+ case ELIFGUESSFALSE:
+ case ELIF:
+ if (!recursion)
+ gobble(filep, file, file_red);
+ case ENDIF:
+ if (recursion)
+ return(type);
+ case DEFINE:
+ define(line, file);
+ break;
+ case UNDEF:
+ if (!*line) {
+ warning("%s", file_red->i_file);
+ if (file_red != file)
+ warning1(" (reading %s)", file->i_file);
+ warning1(", line %d: incomplete undef == \"%s\"\n",
+ filep->f_line, line);
+ break;
+ }
+ undefine(line, file_red);
+ break;
+ case INCLUDE:
+ case INCLUDEDOT:
+ case INCLUDENEXT:
+ case INCLUDENEXTDOT:
+ inclistp = inclistnext;
+ includedirsp = includedirsnext;
+ debug(2,("%s, reading %s, includes %s\n",
+ file_red->i_file, file->i_file, line));
+ add_include(filep, file, file_red, line, type, failOK);
+ inclistnext = inclistp;
+ includedirsnext = includedirsp;
+ break;
+ case ERROR:
+ case WARNING:
+ warning("%s", file_red->i_file);
+ if (file_red != file)
+ warning1(" (reading %s)", file->i_file);
+ warning1(", line %d: %s\n",
+ filep->f_line, line);
+ break;
+
+ case PRAGMA:
+ case IDENT:
+ case SCCS:
+ case EJECT:
+ break;
+ case -1:
+ warning("%s", file_red->i_file);
+ if (file_red != file)
+ warning1(" (reading %s)", file->i_file);
+ warning1(", line %d: unknown directive == \"%s\"\n",
+ filep->f_line, line);
+ break;
+ case -2:
+ warning("%s", file_red->i_file);
+ if (file_red != file)
+ warning1(" (reading %s)", file->i_file);
+ warning1(", line %d: incomplete include == \"%s\"\n",
+ filep->f_line, line);
+ break;
+ }
+ }
+ file->i_flags |= FINISHED;
+ debug(2,("finished with %s\n", file->i_file));
+ return(-1);
+}
diff --git a/nx-X11/config/makedepend/pr.c b/nx-X11/config/makedepend/pr.c
new file mode 100644
index 000000000..5d0e1c4da
--- /dev/null
+++ b/nx-X11/config/makedepend/pr.c
@@ -0,0 +1,124 @@
+/* $Xorg: pr.c,v 1.4 2001/02/09 02:03:16 xorgcvs Exp $ */
+/*
+
+Copyright (c) 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/config/makedepend/pr.c,v 1.4 2001/04/29 23:25:02 tsi Exp $ */
+
+#include "def.h"
+
+extern struct inclist inclist[ MAXFILES ],
+ *inclistp;
+extern char *objprefix;
+extern char *objsuffix;
+extern int width;
+extern boolean printed;
+extern boolean verbose;
+extern boolean show_where_not;
+
+void
+add_include(struct filepointer *filep, struct inclist *file,
+ struct inclist *file_red, char *include, int type,
+ boolean failOK)
+{
+ register struct inclist *newfile;
+ register struct filepointer *content;
+
+ /*
+ * First decide what the pathname of this include file really is.
+ */
+ newfile = inc_path(file->i_file, include, type);
+ if (newfile == NULL) {
+ if (failOK)
+ return;
+ if (file != file_red)
+ warning("%s (reading %s, line %d): ",
+ file_red->i_file, file->i_file, filep->f_line);
+ else
+ warning("%s, line %d: ", file->i_file, filep->f_line);
+ warning1("cannot find include file \"%s\"\n", include);
+ show_where_not = TRUE;
+ newfile = inc_path(file->i_file, include, type);
+ show_where_not = FALSE;
+ }
+
+ if (newfile) {
+ included_by(file, newfile);
+ if (!(newfile->i_flags & SEARCHED)) {
+ newfile->i_flags |= SEARCHED;
+ content = getfile(newfile->i_file);
+ find_includes(content, newfile, file_red, 0, failOK);
+ freefile(content);
+ }
+ }
+}
+
+static void
+pr(struct inclist *ip, char *file, char *base)
+{
+ static char *lastfile;
+ static int current_len;
+ register int len, i;
+ char buf[ BUFSIZ ];
+
+ printed = TRUE;
+ len = strlen(ip->i_file)+1;
+ if (current_len + len > width || file != lastfile) {
+ lastfile = file;
+ sprintf(buf, "\n%s%s%s: %s", objprefix, base, objsuffix,
+ ip->i_file);
+ len = current_len = strlen(buf);
+ }
+ else {
+ buf[0] = ' ';
+ strcpy(buf+1, ip->i_file);
+ current_len += len;
+ }
+ fwrite(buf, len, 1, stdout);
+
+ /*
+ * If verbose is set, then print out what this file includes.
+ */
+ if (! verbose || ip->i_list == NULL || ip->i_flags & NOTIFIED)
+ return;
+ ip->i_flags |= NOTIFIED;
+ lastfile = NULL;
+ printf("\n# %s includes:", ip->i_file);
+ for (i=0; i<ip->i_listlen; i++)
+ printf("\n#\t%s", ip->i_list[ i ]->i_incstring);
+}
+
+void
+recursive_pr_include(struct inclist *head, char *file, char *base)
+{
+ int i;
+
+ if (head->i_flags & MARKED)
+ return;
+ head->i_flags |= MARKED;
+ if (head->i_file != file)
+ pr(head, file, base);
+ for (i=0; i<head->i_listlen; i++)
+ recursive_pr_include(head->i_list[ i ], file, base);
+}
diff --git a/nx-X11/config/pswrap/Imakefile b/nx-X11/config/pswrap/Imakefile
new file mode 100644
index 000000000..98f845d62
--- /dev/null
+++ b/nx-X11/config/pswrap/Imakefile
@@ -0,0 +1,27 @@
+XCOMM $XFree86: xc/config/pswrap/Imakefile,v 1.8tsi Exp $
+
+ FRIENDSDEF = -DFRIENDSFILE='"<DPS/dpsfriends.h>"'
+ DEFINES = -DXENVIRONMENT
+ DEPLIBS =
+ YFLAGS = -d
+EXTRA_LIBRARIES = LexLib
+
+SRCS = main.c pswdict.c pswfile.c \
+ systemnames.c psw.c pswstring.c pswsemantics.c
+
+OBJS = main.o pswparser.o lexer.o pswdict.o pswfile.o \
+ systemnames.o psw.o pswstring.o pswsemantics.o
+
+#if CrossCompiling
+ComplexHostProgramTarget(pswrap)
+#else
+ComplexProgramTarget(pswrap)
+#endif
+
+pswraponly:: $(PROGRAM)
+
+SpecialObjectRule(pswfile.o,pswfile.c,$(FRIENDSDEF))
+
+LexFile(lexer)
+
+YaccFile(pswparser,$(YFLAGS))
diff --git a/nx-X11/config/pswrap/lexer.l b/nx-X11/config/pswrap/lexer.l
new file mode 100644
index 000000000..fdd6d03c2
--- /dev/null
+++ b/nx-X11/config/pswrap/lexer.l
@@ -0,0 +1,814 @@
+%{
+/*
+ * lexer.l
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+/* $XFree86: xc/config/pswrap/lexer.l,v 1.10 2001/10/28 03:32:03 tsi Exp $ */
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "pswpriv.h"
+#include "pswparser.h"
+
+/* flex of EMX seems to be too old */
+#if defined(FLEX_SCANNER) && !defined(YY_FLEX_LEX_COMPAT) && !defined(__UNIXOS2__)
+int yylineno = 1;
+#endif
+
+static int parens = 0; /* current paren balancing */
+static char *sbody; /* cur pointer into string_temp */
+static int curleng = 0; /* current scanned string length */
+static int strlineno; /* start line of current string */
+
+static int nonComment = true; /* are we outside C comments? */
+static int newLine = true; /* are we starting a new line? */
+static int hexstringerrs = 0; /* found an error in this hex string */
+
+int errorCount = 0; /* number of non-fatal errors */
+
+#ifdef PSWDEBUG
+int lexdebug = 1; /* debug flag */
+#define DEBUGP(x) {if (lexdebug) { fprintf x ; };}
+#else /* PSWDEBUG */
+#define DEBUGP(x)
+#endif /* PSWDEBUG */
+
+#undef YYLMAX
+#define YYLMAX 16384
+
+/* ErrIntro prints a standard intro for error messages;
+ * change it if your system uses something else. We have many options:
+ *
+ * to match Macintosh: #define FMT "File \"%s\"; Line %d # "
+ * to match BSD cc: #define FMT "\"%s\", line %d: "
+ * to match gcc: #define FMT "%s:%d: "
+ * to match Mips cc: #define FMT "pswrap: Error: %s, line %d: "
+ */
+#define INTRO "# In function %s -\n"
+
+#ifdef macintosh
+#define FMT "File \"%s\"; Line %d # "
+#else /* macintosh */
+#define FMT "\"%s\", line %d: "
+#endif /* macintosh */
+
+void ErrIntro(int line)
+{
+ if (! reportedPSWName && currentPSWName) {
+ reportedPSWName = 1;
+ fprintf(stderr,INTRO,currentPSWName);
+ }
+ fprintf(stderr,FMT,ifile,line);
+ errorCount++;
+}
+
+
+void yyerror(char *errmsg)
+{
+ ErrIntro(yylineno);
+ fprintf(stderr,"%s near text \"%s\"\n",errmsg,yytext);
+}
+%}
+
+%o 3500
+%a 2500
+
+%START PS STR HEX DEF SUB
+
+DIGIT ([0-9])
+HEXDIGIT ([a-fA-F0-9])
+RADIXDIGIT ([a-zA-Z0-9])
+LETTER ([a-zA-Z])
+SIGN ([+-])
+EXP ([eE]{SIGN}?{DIGIT}+)
+W ([ \t\n\r])
+
+%%
+
+<PS>^defineps { /* inside a wrap - just a PS token */
+ if (nonComment) {
+ newLine = false;
+ yylval.object = psw_malloc(strlen(yytext) + 1);
+ strcpy(yylval.object, yytext);
+ DEBUGP((stderr,"PSNAME ->%s\n",yytext));
+ return PSNAME;
+ }
+}
+
+<DEF>^defineps { /* treat as a C name inside the def part */
+ if (nonComment) {
+ yylval.object = psw_malloc(strlen(yytext) + 1);
+ strcpy(yylval.object, yytext);
+ DEBUGP((stderr,"CNAME ->%s\n",yytext));
+ return CNAME;
+ }
+}
+
+<STR>^defineps { /* part of string text */
+ register int i = yyleng;
+ register unsigned char *c = (unsigned char *) yytext;
+
+ if (yyleng + curleng >= maxstring) {
+ stringerr(1);
+ BEGIN PS;
+ *sbody = '\0';
+ return PSSTRING;
+ }
+ curleng += yyleng;
+ for (; i > 0; --i) *sbody++ = *c++;
+}
+
+^{W}*defineps { /* start of a wrap definition */
+ if (nonComment) {
+ BEGIN DEF;
+ DEBUGP((stderr,"DEFINEPS\n"));
+ return DEFINEPS;
+ } else ECHO;
+}
+
+<PS>endps { /* end of a wrap */
+ if (nonComment){
+ if (newLine) {
+ newLine = false;
+ DEBUGP((stderr,"ENDPS\n"));
+ BEGIN 0;
+ return ENDPS;
+ } else {
+ DEBUGP((stderr,"PSNAME %s\n",yytext));
+ yylval.object = psw_malloc(strlen(yytext) + 1);
+ strcpy(yylval.object, yytext);
+ return PSNAME;
+ }
+ }
+}
+
+<DEF>^endps { /* treat as a C name inside the def part? */
+ if (nonComment) {
+ yylval.object = psw_malloc(strlen(yytext) + 1);
+ strcpy(yylval.object, yytext);
+ DEBUGP((stderr,"CNAME ->%s\n",yytext));
+ return CNAME;
+ }
+}
+
+<STR>^defineps { /* part of string text */
+ register int i = yyleng;
+ register unsigned char *c = (unsigned char *) yytext;
+
+ if (yyleng + curleng >= maxstring) {
+ stringerr(1);
+ BEGIN PS;
+ *sbody = '\0';
+ return PSSTRING;
+ }
+ curleng += yyleng;
+ for (; i > 0; --i) *sbody++ = *c++;
+}
+
+endps { /* BOGUS end of a wrap */
+ if (nonComment) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"endps without matching defineps\n");
+ } else ECHO;
+}
+
+%{
+ /* real definition stuff */
+%}
+
+<DEF>"/*" { /* C comments on */
+ nonComment = false;
+}
+
+<DEF>"*/" { /* C comments off */
+ nonComment = true;
+}
+
+<DEF>"(" { /* formals start */
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->(\n"));
+ return '(';
+ }
+}
+
+<DEF>")" { /* formals end */
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->)\n"));
+ BEGIN PS;
+ return ')';
+ }
+}
+
+<DEF>[|,;[\]*:] { /* special single chars */
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->%c\n",yytext[0]));
+ return (yytext[0]);
+ }
+}
+
+%{
+ /* formals type names */
+%}
+
+<DEF>"static" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->static\n"));
+ return STATIC;
+ }
+}
+
+<DEF>"boolean" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->boolean\n"));
+ return BOOLEAN;
+ }
+}
+
+<DEF>"char" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->char\n"));
+ return CHAR;
+ }
+}
+
+<DEF>"int" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->int\n"));
+ return INT;
+ }
+}
+
+<DEF>"short" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->short\n"));
+ return SHORT;
+ }
+}
+
+<DEF>"long" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->long\n"));
+ return LONG;
+ }
+}
+
+<DEF>"unsigned" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->unsigned\n"));
+ return UNSIGNED;
+ }
+}
+
+<DEF>"float" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->float\n"));
+ return FLOAT;
+ }
+}
+
+<DEF>"double" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->double\n"));
+ return DOUBLE;
+ }
+}
+
+<DEF>"userobject" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->userobject\n"));
+ return USEROBJECT;
+ }
+}
+
+<DEF>"numstring" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->numstring\n"));
+ return NUMSTRING;
+ }
+}
+
+<DEF>"DPSContext" {
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->DPScontext\n"));
+ return PSCONTEXT;
+ }
+}
+
+%{
+ /* C format numbers in formals part */
+%}
+
+<DEF>[1-9]{DIGIT}* { /* base 10 number */
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->CINTEGER %s\n",yytext));
+ yylval.intobj = atoi((char *) yytext);
+ return CINTEGER;
+ }
+}
+
+<DEF>0{DIGIT}* { /* octal number (and zero) */
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->CINTEGER %s\n",yytext));
+ /* I have no idea why the cast is needed in the next line,
+ but it seems to make the compiler happy on alpha */
+ sscanf((char *) yytext,"%lo",&yylval.intobj);
+ return CINTEGER;
+ }
+}
+
+<DEF>0[xX]{HEXDIGIT}+ { /* hex number */
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->CINTEGER %s\n",yytext));
+ /* See previous comment... */
+ sscanf((char *) yytext,"0x%lx",&yylval.intobj);
+ return CINTEGER;
+ }
+}
+
+<DEF>[a-zA-Z_][a-zA-Z0-9_]* { /* C identifier */
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->CNAME %s\n",yytext));
+ yylval.object = psw_malloc(strlen(yytext) + 1);
+ strcpy(yylval.object, yytext);
+ return CNAME;
+ }
+}
+
+<DEF>{W}+ {
+}
+
+<DEF>[^a-zA-Z0-9_|,;[\]*:\(\)/ \t\n\r]+ { /* all else - ERROR */
+ if (nonComment) {
+ DEBUGP((stderr,"DEF ->JUNK %s\n",yytext));
+ ErrIntro(yylineno);
+ fprintf(stderr,"invalid characters '%s' in definition\n",
+ yytext);
+ }
+}
+
+
+%{
+ /* body part - PostScript code */
+%}
+
+<PS>\%.* { /* a PS comment, ignore */
+ if (nonComment) {
+ newLine = false;
+ DEBUGP((stderr,"comment %s\n",yytext));
+ /* yylval = yytext; return PSCOMMENT; */
+ }
+}
+
+<PS>{SIGN}?{DIGIT}+ { /* a decimal integer */
+ if (nonComment) {
+ newLine = false;
+ DEBUGP((stderr,"PSINTEGER ->%s\n",yytext));
+ yylval.intobj = atoi((char *) yytext);
+ return PSINTEGER;
+ }
+}
+
+<PS>{DIGIT}+#{RADIXDIGIT}+ { /* a radix number */
+#define MAX_ULONG ((unsigned long) -1)
+ unsigned base = 0;
+ unsigned char *s = (unsigned char *) yytext;
+ register unsigned long x, limit;
+ register unsigned long i = 0;
+
+ if (nonComment) {
+ newLine = false;
+ DEBUGP((stderr,"PSINTEGER radix->%s\n",yytext));
+ while (*s != '#') {
+ base *= 10;
+ base += *s++ - '0';
+ if (base > 32) break;
+ }
+
+ if ((base < 2) || (base > 36)) {goto error;}
+ else {
+ limit = MAX_ULONG / base;
+ s++; /* skip # sign */
+ while (*s != '\0') {
+ if (i > limit) goto error;
+ i *= base;
+ if (isdigit(*s)) { x = *s - '0';}
+ else { x = (*s | 040) - ('a'-10);}
+ if (x >= base) goto error;
+ if (x > (MAX_ULONG - i)) goto error;
+ i += x;
+ s++;
+ }
+ }
+ yylval.intobj = i;
+ return PSINTEGER;
+
+ error:;
+ ErrIntro(yylineno);
+ fprintf(stderr,"invalid radix number %s\n",yytext);
+ yylval.intobj = 0; /* ERROR */
+ return PSINTEGER;
+ }
+}
+
+<PS>(({SIGN}?{DIGIT}+(\.{DIGIT}*)?{EXP}?)|({SIGN}?{DIGIT}*\.{DIGIT}+{EXP}?)) {
+ /* a float */
+ if (nonComment) {
+ newLine = false;
+ DEBUGP((stderr,"PSREAL ->%s\n",yytext));
+ yylval.object = psw_malloc(strlen(yytext) + 1);
+ strcpy(yylval.object,yytext);
+ return PSREAL;
+ }
+}
+
+<PS>"(" { /* start PS string */
+ if (nonComment) {
+ newLine = false;
+ BEGIN STR;
+ parens=1;
+ sbody = string_temp;
+ curleng = 0;
+ strlineno = yylineno;
+ *sbody = '\0';
+ }
+}
+
+%{
+ /* inside PS strings */
+%}
+
+<STR>"(" { /* balancing parens */
+ if (yyleng + curleng >= maxstring) {
+ stringerr(1);
+ BEGIN PS;
+ *sbody = '\0';
+ return PSSTRING;
+ }
+ curleng += yyleng;
+ parens++;
+ *sbody++ = '(';
+}
+
+<STR>")" { /* balancing parens or end string */
+ if ((--parens) == 0) {
+ BEGIN PS;
+ *sbody = '\0';
+ yylval.object = psw_malloc(strlen(string_temp) + 1);
+ strcpy(yylval.object, string_temp);
+ DEBUGP((stderr,"PSSTRING ->%s\n",string_temp));
+ return PSSTRING;
+ }
+ else if (yyleng + curleng >= maxstring) {
+ stringerr(1);
+ BEGIN PS;
+ *sbody = '\0';
+ return PSSTRING;
+ }
+ curleng += yyleng;
+ *sbody++ = ')';
+}
+
+<STR>"\\"[0-7]([0-7]?)([0-7]?) { /* quoted octal byte */
+ if (4 + curleng >= maxstring) {
+ stringerr(1);
+ BEGIN PS;
+ *sbody = '\0';
+ return PSSTRING;
+ }
+ curleng += 4;
+ sprintf(sbody,"\\%3.3s",(yytext + 1));
+ while (*sbody) {
+ if (*sbody == ' ') *sbody = '0';
+ sbody++;
+ }
+}
+
+
+<STR>"\\\n" { /* ignore quoted newline */
+}
+
+<STR>"\\\\" { /* keep quoted backslashes in */
+ if (yyleng + curleng >= maxstring) {
+ stringerr(1);
+ BEGIN PS;
+ *sbody = '\0';
+ return PSSTRING;
+ }
+ *sbody++ = '\\';
+ *sbody++ = '\\';
+ curleng += 2;
+}
+
+
+<STR>("\\".) { /* other quoted char, including parens */
+ if (yyleng + curleng >= maxstring) {
+ stringerr(1);
+ BEGIN PS;
+ *sbody = '\0';
+ return PSSTRING;
+ }
+ switch (yytext[1]) {
+ case 'b':
+ *sbody++ = '\b';
+ break;
+ case 'f':
+ *sbody++ = '\f';
+ break;
+ case 'n':
+ *sbody++ = '\012';
+ break;
+ case 'r':
+ *sbody++ = '\015';
+ break;
+ case 't':
+ *sbody++ = '\t';
+ break;
+ default:
+ *sbody++ = yytext[1];
+ break;
+ }
+ curleng++;
+}
+
+
+<STR>"\n" { /* newline in a string */
+ if (yyleng + curleng >= maxstring) {
+ stringerr(1);
+ BEGIN PS;
+ *sbody = '\0';
+ return PSSTRING;
+ }
+ curleng += yyleng;
+
+ *sbody++ = '\n';
+}
+
+<STR>[^()\\\n]+ { /* anything else */
+ register int i = yyleng;
+ register unsigned char *c = (unsigned char *) yytext;
+
+ if (yyleng + curleng >= maxstring) {
+ stringerr(1);
+ BEGIN PS;
+ *sbody = '\0';
+ return PSSTRING;
+ }
+ curleng += yyleng;
+ for (; i > 0; --i) *sbody++ = *c++;
+}
+
+%{
+ /* hexidecimal strings "< >" */
+%}
+
+<PS>"<" { /* begin hex string */
+ if (nonComment) {
+ newLine = false;
+ BEGIN HEX;
+ sbody = string_temp;
+ *sbody = '\0';
+ curleng = 0;
+ strlineno = yylineno;
+ hexstringerrs = 0;
+ }
+}
+
+<HEX>{W}+ { /* hex whitespace */
+ /* ignore */
+}
+
+<HEX>[0-9A-Fa-f]+ { /* hex string data */
+ if (yyleng + curleng >= maxstring) {
+ stringerr(2);
+ *sbody = '\0';
+ BEGIN PS;
+ return PSHEXSTRING;
+ }
+ curleng += yyleng;
+ strcpy(sbody,yytext);
+ sbody += yyleng;
+}
+
+<HEX>">" { /* end hex string */
+ BEGIN PS;
+ *sbody = '\0';
+ DEBUGP((stderr,"PSHEXSTRING ->%s\n",string_temp));
+ yylval.object = psw_malloc(strlen(string_temp) + 1);
+ strcpy(yylval.object, string_temp);
+ return PSHEXSTRING;
+}
+
+<HEX>[^a-fA-F0-9> \t\n\r]+ { /* ERROR */
+ if (hexstringerrs == 0) { /* only complain once per string */
+ ErrIntro(yylineno);
+ fprintf(stderr,"invalid characters in hex string '%s'\n",yytext);
+ hexstringerrs++;
+ }
+}
+
+
+%{
+ /* straight postscript */
+%}
+
+<PS>"<<" { /* just a PS token (for level 2 compatablity) */
+ if (nonComment) {
+ newLine = false;
+ yylval.object = psw_malloc(strlen(yytext) + 1);
+ strcpy(yylval.object, yytext);
+ DEBUGP((stderr,"PSNAME ->%s\n",yytext));
+ return PSNAME;
+ }
+}
+
+<PS>">>" { /* just a PS token (for level 2 compatablity) */
+ if (nonComment) {
+ newLine = false;
+ yylval.object = psw_malloc(strlen(yytext) + 1);
+ strcpy(yylval.object, yytext);
+ DEBUGP((stderr,"PSNAME ->%s\n",yytext));
+ return PSNAME;
+ }
+}
+
+<PS>[\[\]\{\}] { /* PS self delimiter */
+ if (nonComment) {
+ newLine = false;
+ DEBUGP((stderr,"PS ->%s\n",yytext));
+ return (yytext[0]);
+ }
+}
+
+<PS>"true"|"false" { /* boolean */
+ if (nonComment) {
+ newLine = false;
+ DEBUGP((stderr,"PSBOOLEAN %s\n",yytext));
+ yylval.intobj = (*yytext == 't');
+ return PSBOOLEAN;
+ }
+}
+
+<PS>"/"[^ <>\(\)\[\]\{\}\%\/\t\n\r]* { /* literal name */
+ if (nonComment) {
+ newLine = false;
+ DEBUGP((stderr,"PSLITNAME %s\n",yytext));
+ yylval.object = psw_malloc(strlen(yytext));
+ strcpy(yylval.object, yytext+1);
+ return PSLITNAME;
+ }
+}
+
+<PS>[^ <>\(\)\[\]\{\}\%\/\\\t\n\r]+ { /* executable name */
+ if (nonComment) {
+ newLine = false;
+ DEBUGP((stderr,"PSNAME %s\n",yytext));
+ yylval.object = psw_malloc(strlen(yytext) + 1);
+ strcpy(yylval.object, yytext);
+ return PSNAME;
+ }
+}
+
+<PS>"*/" { /* special case */
+ if (nonComment) {
+ newLine = false;
+ unput('/');
+ yylval.object = psw_malloc(2);
+ strcpy(yylval.object, "*");
+ return PSNAME;
+ }
+}
+
+<PS>"\\"[^ <>\(\)\[\]\{\}\%\/\\\t\n\r]+/"[" { /* \name[index] */
+ if (nonComment) {
+ DEBUGP((stderr,"\\PSNAME %s\n",yytext));
+ yylval.object = psw_malloc(strlen(yytext));
+ strcpy(yylval.object, yytext+1);
+ BEGIN SUB;
+ return PSSUBNAME;
+ }
+}
+
+<SUB>[\[][^ \t\]]*[\]] { /* [index] */
+ if (nonComment) {
+ int len = strlen(yytext);
+ DEBUGP((stderr,"PSINDEX %s\n",yytext));
+ if (len == 2) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"parameter index expression empty\n");
+ yylval.object = "0";
+ }
+ else {
+ yylval.object = psw_malloc(len);
+ strncpy(yylval.object, yytext+1, len-2);
+ yylval.object[len-2] = '\0';
+ }
+ BEGIN PS;
+ return PSINDEX;
+ }
+}
+
+<SUB>[\[][^\]]*[\]] { /* error */
+ if (nonComment) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"parameter index expression error\n");
+ yylval.object = "0";
+ BEGIN PS;
+ return PSINDEX;
+ }
+}
+
+<PS>[\)\>\\]+ { /* ERROR */
+ if (nonComment) {
+ newLine = false;
+ DEBUGP((stderr,"PS JUNK ->%s\n",yytext));
+ ErrIntro(yylineno);
+ fprintf(stderr,"invalid characters '%s'\n",yytext);
+ }
+}
+
+<PS>[ \t\r]+ { }
+
+<PS>[\n]+ {
+ newLine = true;
+}
+
+[ \t]+ { /* passthru stuff */
+ ECHO;
+}
+
+\n {
+ outlineno++;
+ ECHO;
+};
+
+"/*" { /* C comments on */
+ nonComment = false;
+ ECHO;
+}
+
+"*/" { /* C comments off */
+ if (!nonComment) {
+ nonComment = true;
+ ECHO;
+ }
+}
+
+%%
+
+int yywrap (void) {
+ if (!feof(yyin))
+ return (0);
+/* The following appears not to work with flex. As it is error
+ handling code, we just comment it out. */
+#if !defined(FLEX_SCANNER)
+ if (yybgin != (yysvec+1)) { /* make sure we are in state 0 */
+ ErrIntro(yylineno);
+ fprintf(stderr,"end of input file/missing endps\n");
+ }
+#endif
+ return (1);
+}
+
+void stringerr(int type)
+{
+ ErrIntro(strlineno);
+ fprintf(stderr,"%sstring too long (caught at line %d)\n",
+ ((type==1)?"":"hex "),yylineno);
+ errorCount++;
+ return;
+}
diff --git a/nx-X11/config/pswrap/main.c b/nx-X11/config/pswrap/main.c
new file mode 100644
index 000000000..0f7227a6c
--- /dev/null
+++ b/nx-X11/config/pswrap/main.c
@@ -0,0 +1,225 @@
+/*
+ * main.c
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+/* $XFree86: xc/config/pswrap/main.c,v 1.4 2000/06/07 19:50:47 tsi Exp $ */
+
+#include <stdio.h>
+
+#ifdef XENVIRONMENT
+#include <X11/Xos.h>
+#else
+#include <string.h>
+#endif
+
+#define SLASH '/'
+#include <ctype.h>
+#include <stdlib.h>
+#include "pswpriv.h"
+
+#define MIN_MAXSTRING 80 /* min allowable value of maxstring */
+
+/* global data */
+char *prog; /* program name */
+char *special_h = NULL; /* -f option */
+char *hfile = NULL; /* name of -h file */
+char *ofile = NULL; /* name of -o file */
+char *ifile = NULL; /* name of input file */
+int gotInFile = 0; /* got an explicit input file name */
+int doANSI = 0; /* got -a (ansi) flag for -h file */
+int pad = 0; /* got -p (padding) flag */
+boolean noUserNames = false; /* got -n (don't use usernames) flag */
+int reentrant = 0; /* automatic vars for generated BOS */
+int bigFile = 0; /* got -b flag => call free */
+FILE *header; /* stream for -h file output */
+char headid[200]; /* id for header file #include */
+int maxstring = 2000; /* -s max string length to scan */
+char *string_temp; /* string buffer of above size */
+int outlineno = 1; /* output line number */
+int nWraps = 0; /* total number of wraps */
+#ifdef __MACH__
+char *shlibInclude = NULL; /* special file to be #included at top of */
+ /* file. Used only when building shlibs */
+#endif /* __MACH__ */
+
+static void Usage(void)
+{
+ fprintf(stderr,"Usage: pswrap [options] [input-file]\n");
+ fprintf(stderr," -a produce ANSI C procedure prototypes\n");
+ fprintf(stderr," -b process a big file\n");
+ fprintf(stderr," -f filename include special header\n");
+ fprintf(stderr," -h filename specify header filename\n");
+ fprintf(stderr," -o filename specify output C filename\n");
+ fprintf(stderr," -r make wraps re-entrant\n");
+ fprintf(stderr," -s length set maximum string length\n");
+ exit(1);
+}
+
+static void ScanArgs(int argc, char *argv[])
+{
+ char *slash; /* index of last / in hfile */
+ char *c; /* pointer into headid for conversion */
+ int i = 0;
+
+ prog = argv[i++];
+ slash = rindex(prog,SLASH);
+ if (slash)
+ prog = slash + 1;
+ while (i < argc) {
+ if (*argv[i] != '-') {
+ if (ifile != NULL) {
+ fprintf(stderr, "%s: Only one input file can be specified.\n", prog);
+ Usage();
+ } else {
+ ifile = argv[i];
+ }
+ } else {
+ switch (*(argv[i]+1)) {
+ case 'a':
+ doANSI++;
+ reentrant++;
+ break;
+ case 'b':
+ bigFile++;
+ break;
+#ifdef PSWDEBUG
+ case 'd':
+ lexdebug++;
+ break;
+#endif /* PSWDEBUG */
+ case 'f':
+ special_h = argv[++i];
+ break;
+ case 'h':
+ hfile = argv[++i];
+ slash = rindex(hfile,SLASH);
+ strcpy(headid, slash ? slash+1 : hfile);
+ for (c = headid; *c != '\0'; c++) {
+ if (*c == '.') *c = '_';
+ else if (isascii(*c) && islower(*c)) *c = toupper(*c);
+ }
+ break;
+ case 'o':
+ ofile = argv[++i];
+ break;
+ case 'r':
+ reentrant++;
+ break;
+ case 's':
+ if ((maxstring = atoi(argv[++i])) < MIN_MAXSTRING) {
+ fprintf(stderr,"%s: -s %d is the minimum\n", prog, MIN_MAXSTRING);
+ maxstring = MIN_MAXSTRING;
+ }
+ break;
+ case 'w':
+ break;
+#ifdef __MACH__
+ case 'S':
+ shlibInclude = argv[++i];
+ break;
+#endif /* __MACH__ */
+ case 'n':
+ noUserNames = true;
+ break;
+ case 'p':
+ pad++;
+ break;
+ default:
+ fprintf(stderr, "%s: bad option '-%c'\n", prog, *(argv[i]+1));
+ Usage();
+ break;
+ } /* switch */
+ } /* else */
+ i++;
+ } /* while */
+} /* ScanArgs */
+
+int main(int argc, char *argv[])
+{
+ int retval; /* return from yyparse */
+
+ ScanArgs(argc, argv);
+
+ if (ifile == NULL)
+ ifile = "stdin";
+ else {
+ gotInFile = 1;
+ if (freopen(ifile,"r",stdin) == NULL) {
+ fprintf(stderr, "%s: can't open %s for input\n", prog, ifile);
+ exit(1);
+ }
+ }
+ if ((string_temp = (char *) malloc((unsigned) (maxstring+1))) == 0) {
+ fprintf(stderr, "%s: can't allocate %d char string; try a smaller -s value\n", prog, maxstring);
+ exit(1);
+ }
+ if (ofile == NULL)
+ ofile = "stdout";
+ else {
+#ifdef __MACH__
+ (void)unlink(ofile);
+#endif /* __MACH__ */
+ if (freopen(ofile,"w",stdout) == NULL) {
+ fprintf(stderr, "%s: can't open %s for output\n", prog, ofile);
+ exit(1);
+ }
+ }
+ InitOFile();
+
+ if (hfile != NULL) {
+#ifdef __MACH__
+ (void)unlink(hfile);
+#endif /* __MACH__ */
+ if ((header = fopen(hfile,"w")) == NULL) {
+ fprintf(stderr, "%s: can't open %s for output\n", prog, hfile);
+ exit(1);
+ }
+ }
+ if (header != NULL) InitHFile();
+
+ InitWellKnownPSNames();
+
+ if ((retval = yyparse()) != 0)
+ fprintf(stderr,"%s: error in parsing %s\n",prog,ifile);
+ else if (errorCount != 0) {
+ fprintf(stderr,"%s: errors were encountered\n",prog);
+ retval = errorCount;
+ }
+
+ if (hfile != NULL) FinishHFile();
+
+ exit (retval);
+}
diff --git a/nx-X11/config/pswrap/psw.c b/nx-X11/config/pswrap/psw.c
new file mode 100644
index 000000000..f50f87a8b
--- /dev/null
+++ b/nx-X11/config/pswrap/psw.c
@@ -0,0 +1,1961 @@
+/*
+ * psw.c
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+/* $XFree86: xc/config/pswrap/psw.c,v 1.5 2000/06/07 21:36:56 tsi Exp $ */
+
+/***********/
+/* Imports */
+/***********/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef XENVIRONMENT
+#include <X11/Xos.h>
+#else
+#include <string.h>
+#endif
+
+#include "pswdict.h"
+#include "pswpriv.h"
+#include "pswsemantics.h"
+
+#define DPS_HEADER_SIZE 4
+#define DPS_LONG_HEADER_SIZE 8
+#define DPS_BINOBJ_SIZE 8 /* sizeof(DPSBinObjGeneric) */
+#define WORD_ALIGN 3
+#define HNUMTOKEN 149
+#define NUMSTR_HEADER_SIZE 4
+#define MAXSTRINGS 256 /* maximum number of non-duplcated strings */
+
+#define datafil stdout /* send statics to stdout (with code) */
+
+/********************/
+/* Global Variables */
+/********************/
+
+/* Wrap-specific globals */
+
+static char *ctxName;
+
+static TokenList nameTokens;
+static int nNames;
+static TokenList namedInputArrays, namedInputStrings;
+static TokenList literalStrings;
+static boolean writable; /* encoding is not constant */
+static boolean twoStatics; /* true if strings are separate from objects */
+static boolean large;
+static int dpsHeaderSize;
+static int stringBytes;
+
+/**************************/
+/* Procedure Declarations */
+/**************************/
+
+
+/**********************/
+/* Utility procedures */
+
+
+#define CantHappen() { fprintf(stderr, "CantHappen"); abort(); }
+
+#define Assert(b) if (!(b)) { CantHappen(); }
+
+#define SafeStrCpy(dst,src) \
+ dst = psw_malloc(strlen(src)+1) , \
+ strcpy(dst, src)
+
+static long NumArgs(Args args)
+{
+ register long n = 0;
+ register Arg arg;
+ register Item item;
+ for (arg = args; arg; arg = arg->next)
+ for (item = arg->items; item; item = item->next)
+ n++;
+ return n;
+}
+
+static int NumTokens(Body body)
+{
+ register int n = 0;
+ while (body) { n++; body = body->next; }
+ return n;
+}
+
+static TokenList ConsToken (Token t, TokenList ll)
+{
+ TokenList tt = (TokenList) psw_calloc(sizeof(TokenListRec), 1);
+ tt->token = t;
+ tt->next = ll;
+ return tt;
+}
+
+static TokenList ConsNameToken (Token t, TokenList ll)
+{
+ TokenList temp, tt = (TokenList) psw_calloc(sizeof(TokenListRec), 1);
+
+ tt->token = t;
+ tt->next = ll;
+ if(ll == NULL)
+ return (tt);
+ temp = ll;
+ while((temp->next != NULL) && strcmp((char *)(temp->token->val), (char *)(t->val)))
+ temp = temp->next;
+ tt->next = temp->next;
+ temp->next = tt;
+ return (ll);
+}
+
+static boolean IsCharType(Type t)
+{
+ return (t == T_CHAR || t == T_UCHAR);
+}
+
+static boolean IsNumStrType(Type t)
+{
+ return (t == T_NUMSTR
+ || t == T_FLOATNUMSTR
+ || t == T_LONGNUMSTR
+ || t == T_SHORTNUMSTR);
+}
+
+static boolean IsPadNumStrType(Type t)
+{
+ return (t == T_NUMSTR || t == T_SHORTNUMSTR);
+}
+
+/*************************/
+/* Type-code conversions */
+
+static char *TypeToText(Type type)
+{
+ switch ((int) type) {
+ case T_CONTEXT:
+ return "DPSContext";
+ case T_BOOLEAN:
+ return "int";
+ case T_FLOAT:
+ return "float";
+ case T_DOUBLE:
+ return "double";
+ case T_CHAR:
+ return "char";
+ case T_UCHAR:
+ return "unsigned char";
+ case T_USEROBJECT:
+ case T_INT:
+ return "int";
+ case T_LONGINT:
+ return "long int";
+ case T_SHORTINT:
+ return "short int";
+ case T_ULONGINT:
+ return "unsigned long int";
+ case T_USHORTINT:
+ return "unsigned short int";
+ case T_UINT:
+ return "unsigned int";
+ case T_NUMSTR:
+ return "int";
+ case T_FLOATNUMSTR:
+ return "float";
+ case T_LONGNUMSTR:
+ return "long int";
+ case T_SHORTNUMSTR:
+ return "short int";
+ default:
+ CantHappen();
+ }
+ /*NOTREACHED*/
+}
+
+static char *CTypeToDPSType(int type)
+{
+ switch (type) {
+ case T_BOOLEAN:
+ return("DPS_BOOL");
+ case T_INT:
+ case T_LONGINT:
+ case T_SHORTINT:
+ case T_UINT:
+ case T_ULONGINT:
+ case T_USHORTINT:
+ case T_USEROBJECT:
+ return("DPS_INT");
+ case T_FLOAT:
+ case T_DOUBLE:
+ return("DPS_REAL");
+ case T_CHAR:
+ case T_UCHAR:
+ return("DPS_STRING");
+ default: CantHappen();
+ }
+ /*NOTREACHED*/
+}
+
+static char *CTypeToResultType(int type)
+{
+ switch (type) {
+ case T_BOOLEAN:
+ return("dps_tBoolean");
+ case T_USEROBJECT:
+ case T_INT:
+ return("dps_tInt");
+ case T_LONGINT:
+ return("dps_tLong");
+ case T_SHORTINT:
+ return("dps_tShort");
+ case T_UINT:
+ return("dps_tUInt");
+ case T_ULONGINT:
+ return("dps_tULong");
+ case T_USHORTINT:
+ return("dps_tUShort");
+ case T_FLOAT:
+ return("dps_tFloat");
+ case T_DOUBLE:
+ return("dps_tDouble");
+ case T_CHAR:
+ return("dps_tChar");
+ case T_UCHAR:
+ return("dps_tUChar");
+ case T_NUMSTR:
+ return("dps_tInt");
+ case T_FLOATNUMSTR:
+ return("dps_tFloat");
+ case T_LONGNUMSTR:
+ return("dps_tLong");
+ case T_SHORTNUMSTR:
+ return("dps_tShort");
+ default: CantHappen();
+ }
+ /*NOTREACHED*/
+}
+
+static void FreeTokenList(TokenList tokenList)
+{
+ register TokenList tl;
+ if (bigFile)
+ while (tokenList) {
+ tl = tokenList->next;
+ free((char *)tokenList);
+ tokenList = tl;
+ }
+}
+
+
+/********************************************/
+/* Support procedures that generate no code */
+
+static void SetNameTag(Token t)
+{
+ PSWDictValue tag;
+ Assert(t->type == T_NAME || t->type == T_LITNAME);
+ tag = PSWDictLookup(wellKnownPSNames, (char *)(t->val));
+ if (tag == -1) { /* this is not a well-known name */
+ if (noUserNames)
+ t->wellKnownName = false;
+ else {
+ nameTokens = ConsNameToken(t, nameTokens);
+ nNames++;
+ }
+ }
+ else { /* a well-known (system) name */
+ t->wellKnownName = true;
+ t->body.cnst = tag;
+ }
+}
+
+/* If the wrap has result parameters, DPSAwaitReturnValues
+ must be told when execution if the body is complete. The
+ following boilerplate is tacked on to the end of the body
+ for this purpose by AppendResultFlush:
+ 0 doneTag printobject flush
+ where doneTag = (last result parameter tag + 1).
+*/
+static Body AppendResultFlush(Body body, long n)
+{
+ Token t, token;
+ char *ss;
+
+ if (body == NULL) return NULL;
+ for (t = body; t->next; t = t->next) ;
+
+ token = PSWToken(T_INT, 0L);
+ token->next = PSWToken(T_INT, (char *)(long)n);
+
+ SafeStrCpy(ss, "printobject");
+ token->next->next = PSWToken(T_NAME, ss);
+
+ SafeStrCpy(ss, "flush");
+ token->next->next->next = PSWToken(T_NAME, ss);
+
+ t->next = token;
+ return body;
+}
+
+
+/*****************************************/
+/* Support procedures that generate code */
+
+static void EmitArgPrototypes(FILE *stm, Header hdr)
+{
+ register Arg arg;
+ register Item item;
+ for (arg = hdr->inArgs; arg; arg = arg->next) {
+ fprintf(stm, "%s ", TypeToText(arg->type));
+ for (item = arg->items; item; item = item->next) {
+ if (item->starred) fprintf(stm, "*");
+ fprintf(stm, item->name);
+ if (item->subscripted) fprintf(stm, "[]");
+ if (item->next) fprintf(stm, ", ");
+ }
+ fprintf(stm, "; ");
+ }
+ for (arg = hdr->outArgs; arg; arg = arg->next) {
+ fprintf(stm, "%s ", TypeToText(arg->type));
+ for (item = arg->items; item; item = item->next) {
+ if (item->starred) fprintf(stm, "*");
+ fprintf(stm, item->name);
+ if (item->subscripted) fprintf(stm, "[]");
+ if (item->next) fprintf(stm, ", ");
+ }
+ fprintf(stm, "; ");
+ }
+}
+
+/* use default promotions in prototypes unless it's a pointer/array */
+static char *TypeToDefault(int type)
+{
+ char *result = TypeToText(type);
+ switch (type) {
+ case T_FLOAT: result = "double"; break;
+ case T_USHORTINT: result = "unsigned"; break;
+ case T_SHORTINT: result = "int"; break;
+ }
+ return result;
+}
+
+static void EmitANSIPrototypes(FILE *stm, Header hdr)
+{
+ register Arg arg;
+ register Item item;
+ register char *type;
+
+ if ((hdr->inArgs == NULL) && (hdr->outArgs == NULL)) {
+ fprintf(stm, " void "); return;
+ }
+ for (arg = hdr->inArgs; arg; arg = arg->next) {
+ type = TypeToText(arg->type);
+ for (item = arg->items; item; item = item->next) {
+ if (arg->type == T_CONTEXT) ctxName = item->name;
+ fprintf(stm, "%s%s %s%s",
+ (item->starred || item-> subscripted) ? "const " : "",
+ (item->starred || item-> subscripted) ? type : TypeToDefault(arg->type),
+ item->starred ? "*" : "", item->name);
+ if (item->subscripted) fprintf(stm, "[]");
+ if (item->next) fprintf(stm, ", ");
+ }
+ if (arg->next) fprintf(stm, ", ");
+ }
+ if (hdr->inArgs && hdr->outArgs) fprintf(stm, ", ");
+ for (arg = hdr->outArgs; arg; arg = arg->next) {
+ type = TypeToText(arg->type);
+ for (item = arg->items; item; item = item->next) {
+ fprintf(stm, "%s %s%s",
+ (item->starred || item-> subscripted) ? type : TypeToDefault(arg->type),
+ item->starred ? "*" : "",
+ item->name);
+ if (item->subscripted) fprintf(stm, "[]");
+ if (item->next) fprintf(stm, ", ");
+ }
+ if (arg->next) fprintf(stm, ", ");
+ }
+}
+
+/* Procedures for generating type declarations in the body */
+
+static void StartBinObjSeqDef(void)
+{
+ /* start type defn of binobjseq */
+ printf(" typedef struct {\n");
+ printf(" unsigned char tokenType;\n");
+ if(large) {
+ printf(" unsigned char sizeFlag;\n");
+ printf(" unsigned short topLevelCount;\n");
+ printf(" unsigned int nBytes;\n\n");
+ outlineno++;
+ } else {
+ printf(" unsigned char topLevelCount;\n");
+ printf(" unsigned short nBytes;\n\n");
+ }
+ outlineno += 5;
+}
+
+static void EmitFieldType(Token t)
+{
+ if ((t->type == T_FLOAT)
+ || (t->type == T_NAME && t->namedFormal
+ && (!t->namedFormal->subscripted)
+ && (t->namedFormal->type == T_FLOAT || t->namedFormal->type == T_DOUBLE))
+ || ((t->type == T_SUBSCRIPTED) && ((t->namedFormal->type == T_FLOAT)
+ || (t->namedFormal->type == T_DOUBLE))))
+ {
+ printf(" DPSBinObjReal");
+ } else {
+ printf(" DPSBinObjGeneric");
+ }
+ printf (" obj%d;\n", t->tokenIndex); outlineno++;
+}
+
+static int CheckSize(Body body)
+{
+ Adr nextAdr;
+ register TokenList bodies = NULL;
+ register TokenList tl;
+ boolean firstBody = true;
+ PSWDict wrapDict;
+ int strCount = 0;
+
+ bodies = ConsToken(body, (TokenList) NULL); /* the work list */
+
+ wrapDict = CreatePSWDict(MAXSTRINGS); /* dictionary of strings in the wrap */
+
+ nextAdr.cnst = 0;
+ nextAdr.var = NULL;
+ namedInputArrays = NULL;
+ namedInputStrings = NULL;
+ literalStrings = NULL;
+
+ while (bodies) {
+ register Token t;
+ register TokenList c = bodies;
+ bodies = c->next;
+
+ if (firstBody) firstBody = false;
+ else {
+ c->token->body = nextAdr;
+ c->token = (Body)c->token->val;
+ }
+ for (t = c->token; t; t = t->next) {
+ /* foreach token in this body */
+ nextAdr.cnst += DPS_BINOBJ_SIZE;
+
+
+ switch (t->type) {
+ case T_STRING: /* token is a string literal */
+ case T_HEXSTRING: /* token is a hexstring literal */
+ if (t->namedFormal == NULL) {
+ if ((t->type == T_STRING) ? PSWStringLength(t->val)
+ : PSWHexStringLength(t->val))
+ literalStrings = ConsToken(t, literalStrings);
+ }
+ else {
+ Assert(IsCharType(t->namedFormal->type));
+ namedInputStrings = ConsToken(t, namedInputStrings);
+ }
+ break;
+
+ case T_NAME:
+ if (t->namedFormal != NULL) {
+ if (IsCharType(t->namedFormal->type) ||
+ IsNumStrType(t->namedFormal->type))
+ namedInputStrings = ConsToken(t, namedInputStrings);
+ else
+ if (t->namedFormal->subscripted)
+ namedInputArrays = ConsToken(t, namedInputArrays);
+ } else {
+ if (noUserNames) {
+ SetNameTag(t);
+ if (!t->wellKnownName)
+ literalStrings = ConsToken(t, literalStrings);
+ }
+ }
+ break;
+
+ case T_LITNAME:
+ if (t->namedFormal != NULL) {
+ namedInputStrings = ConsToken(t, namedInputStrings);
+ writable = true;
+ } else {
+ if (noUserNames) {
+ SetNameTag(t);
+ if (!t->wellKnownName)
+ literalStrings = ConsToken(t, literalStrings);
+ }
+ }
+ break;
+
+ case T_SUBSCRIPTED:
+ case T_FLOAT:
+ case T_INT:
+ case T_BOOLEAN:
+ break;
+
+ case T_ARRAY:
+ bodies = ConsToken(t, bodies);
+ break;
+ case T_PROC:
+ bodies = ConsToken(t, bodies);
+ break;
+ default:
+ CantHappen();
+ } /* switch */
+ } /* for */
+ free(c);
+ } /* while */
+
+
+ for (tl = namedInputArrays; tl; tl = tl->next) {
+ Token t = tl->token;
+ if (t->namedFormal->subscript->constant)
+ nextAdr.cnst += t->namedFormal->subscript->val * DPS_BINOBJ_SIZE;
+ }
+
+ for (tl = literalStrings; tl; tl = tl->next) {
+ Token t = tl->token;
+ int ln;
+ if (PSWDictLookup(wrapDict, (char *)t->val) == -1) {
+ if (strCount <= MAXSTRINGS) {
+ PSWDictEnter(wrapDict, t->val, 0);
+ strCount++;
+ }
+ if (t->type == T_STRING || t->type == T_NAME || t->type == T_LITNAME)
+ ln = PSWStringLength((char *)t->val);
+ else
+ ln = PSWHexStringLength((char *)t->val);
+ nextAdr.cnst += ln;
+ }
+ }
+
+ /* process name and litname tokens that reference formal string arguments */
+ for (tl = namedInputStrings; tl; tl = tl->next) {
+ Token t = tl->token;
+ if (t->namedFormal->subscripted && t->namedFormal->subscript->constant) {
+ if (IsNumStrType(t->namedFormal->type))
+ nextAdr.cnst += NUMSTR_HEADER_SIZE;
+ else
+ if(pad) {
+ int length;
+ length = t->namedFormal->subscript->val + WORD_ALIGN;
+ length &= ~WORD_ALIGN;
+ nextAdr.cnst += length;
+ } else
+ nextAdr.cnst += t->namedFormal->subscript->val;
+ }
+ }
+
+ DestroyPSWDict(wrapDict);
+ if (nextAdr.cnst > 0xffff)
+ return(1);
+ else
+ return(0);
+
+} /* CheckSize */
+
+static void BuildTypesAndAssignAddresses(
+ Body body, Adr *sz, long int *nObjs, unsigned *psize)
+{
+ long int objN = 0;
+ Adr nextAdr;
+ register TokenList bodies = NULL;
+ register TokenList tl;
+ boolean firstBody = true;
+ PSWDict wrapDict;
+ int strCount = 0;
+
+ bodies = ConsToken(body, (TokenList) NULL); /* the work list */
+
+ wrapDict = CreatePSWDict(MAXSTRINGS); /* dictionary of strings in the wrap */
+
+ nextAdr.cnst = 0;
+ nextAdr.var = NULL;
+ namedInputArrays = NULL;
+ namedInputStrings = NULL;
+ literalStrings = NULL;
+ writable = false;
+ stringBytes = 0;
+
+ /* emit boilerplate for the binobjseq record type */
+ StartBinObjSeqDef();
+
+ while (bodies) {
+ register Token t;
+ register TokenList c = bodies;
+ bodies = c->next;
+
+ if (firstBody) firstBody = false;
+ else {
+ c->token->body = nextAdr;
+ c->token = (Body)c->token->val;
+ }
+ for (t = c->token; t; t = t->next) {
+ /* foreach token in this body */
+ t->adr = nextAdr;
+ nextAdr.cnst += DPS_BINOBJ_SIZE;
+ t->tokenIndex = objN++;
+
+ /* emit the token type as the next record field */
+ EmitFieldType(t);
+
+ switch (t->type) {
+ case T_STRING: /* token is a string literal */
+ case T_HEXSTRING: /* token is a hexstring literal */
+ if (t->namedFormal == NULL) {
+ if ((t->type == T_STRING) ? PSWStringLength(t->val)
+ : PSWHexStringLength(t->val))
+ literalStrings = ConsToken(t, literalStrings);
+ }
+ else {
+ Assert(IsCharType(t->namedFormal->type));
+ namedInputStrings = ConsToken(t, namedInputStrings);
+ if (!(t->namedFormal->subscripted && t->namedFormal->subscript->constant))
+ writable = true;
+ }
+ break;
+
+ case T_NAME:
+ if (t->namedFormal == NULL) {
+ SetNameTag(t);
+ if(noUserNames) {
+ if (!t->wellKnownName)
+ literalStrings = ConsToken(t, literalStrings);
+ }
+ } else
+ if (IsCharType(t->namedFormal->type)
+ || IsNumStrType(t->namedFormal->type)) {
+ namedInputStrings = ConsToken(t, namedInputStrings);
+ if (!(t->namedFormal->subscripted
+ && t->namedFormal->subscript->constant))
+ writable = true;
+ } else
+ if (t->namedFormal->subscripted) {
+ namedInputArrays = ConsToken(t, namedInputArrays);
+ if (!(t->namedFormal->subscript->constant))
+ writable = true;
+ } else
+ writable = true;
+ break;
+
+ case T_LITNAME:
+ Assert(t->namedFormal == NULL || IsCharType(t->namedFormal->type));
+ if (t->namedFormal == NULL) {
+ SetNameTag(t);
+ if (noUserNames) {
+ if (!t->wellKnownName)
+ literalStrings = ConsToken(t, literalStrings);
+ }
+ } else {
+ namedInputStrings = ConsToken(t, namedInputStrings);
+ writable = true;
+ }
+ break;
+
+ case T_SUBSCRIPTED:
+ writable = true;
+ break;
+ case T_FLOAT:
+ case T_INT:
+ case T_BOOLEAN:
+ break;
+
+ case T_ARRAY:
+ bodies = ConsToken(t, bodies);
+ break;
+ case T_PROC:
+ bodies = ConsToken(t, bodies);
+ break;
+ default:
+ CantHappen();
+ } /* switch */
+ } /* for */
+ free(c);
+ } /* while */
+
+ *psize = nextAdr.cnst;
+
+ if(nNames)
+ writable = true; /* SetNameTag couldn't find the name */
+
+ if (namedInputArrays && literalStrings) {
+ twoStatics = true;
+ printf(" } _dpsQ;\n\n");
+ printf(" typedef struct {\n");
+ outlineno += 3;
+ }
+ else twoStatics = false;
+
+ for (tl = namedInputArrays; tl; tl = tl->next) {
+ Token t = tl->token;
+ Assert(t && t->type == T_NAME && t->namedFormal);
+ Assert(t->namedFormal->subscripted && !t->namedFormal->starred);
+
+ /* this input array token requires its own write binobjs call */
+ t->body = nextAdr;
+ if (t->namedFormal->subscript->constant)
+ nextAdr.cnst += t->namedFormal->subscript->val * DPS_BINOBJ_SIZE;
+ }
+
+ for (tl = literalStrings; tl; tl = tl->next) {
+ Token t = tl->token;
+ int ln;
+ PSWDictValue loc;
+
+ loc = PSWDictLookup(wrapDict, (char *)t->val);
+ if (loc == -1) {
+ t->body = nextAdr;
+ if (strCount <= MAXSTRINGS) {
+ PSWDictEnter(wrapDict, (char *)t->val, nextAdr.cnst);
+ strCount++;
+ }
+ if (t->type == T_STRING || t->type == T_NAME || t->type == T_LITNAME)
+ ln = PSWStringLength((char *)t->val);
+ else
+ ln = PSWHexStringLength((char *)t->val);
+ nextAdr.cnst += ln;
+ stringBytes += ln;
+
+ /* emit the string type as the next record field */
+ printf(" char obj%ld[%d];\n", objN++, ln); outlineno++;
+ } else {
+ t->body = nextAdr;
+ t->body.cnst = loc;
+ }
+ }
+
+ /* process name and litname tokens that reference formal string arguments */
+ for (tl = namedInputStrings; tl; tl = tl->next) {
+ Token t = tl->token;
+ t->body = nextAdr;
+ if (t->namedFormal->subscripted && t->namedFormal->subscript->constant) {
+ if (IsNumStrType(t->namedFormal->type)) {
+ nextAdr.cnst += NUMSTR_HEADER_SIZE;
+ writable = true;
+ } else
+ if(pad) {
+ int length;
+ length = t->namedFormal->subscript->val + WORD_ALIGN;
+ length &= ~WORD_ALIGN;
+ nextAdr.cnst += length;
+ } else
+ nextAdr.cnst += t->namedFormal->subscript->val;
+ }
+ }
+
+ /* emit boilerplate to end the last record type */
+ if (twoStatics) printf(" } _dpsQ1;\n");
+ else printf(" } _dpsQ;\n");
+ outlineno++;
+
+ *nObjs = objN;
+ /* total number of objects plus string bodies in objrecs */
+
+ *sz = nextAdr;
+ DestroyPSWDict(wrapDict);
+} /* BuildTypesAndAssignAddresses */
+
+
+/* Procedures for generating static declarations for local types */
+
+static void StartStatic(boolean first)
+{
+ /* start static def for bin obj seq or for array data (aux) */
+ if (first) {
+ if(reentrant && writable) {
+ if(doANSI)
+ printf(" static const _dpsQ _dpsStat = {\n");
+ else
+ printf(" static _dpsQ _dpsStat = {\n");
+ } else {
+ if (doANSI)
+ printf(" static const _dpsQ _dpsF = {\n");
+ else
+ printf(" static _dpsQ _dpsF = {\n");
+ }
+ } else {
+ if(doANSI)
+ printf(" static const _dpsQ1 _dpsF1 = {\n");
+ else
+ printf(" static _dpsQ1 _dpsF1 = {\n");
+ }
+
+ outlineno++;
+}
+
+static void FirstStatic(int nTopObjects, Adr *sz)
+{
+ char *numFormat = "DPS_DEF_TOKENTYPE";
+
+ outlineno++;
+ if(large) {
+ fprintf(datafil, " %s, 0, %d, ", numFormat, nTopObjects);
+ fprintf(datafil, "%ld,\n", sz->cnst + dpsHeaderSize);
+ } else {
+ fprintf(datafil, " %s, %d, ", numFormat, nTopObjects);
+ fprintf(datafil, "%ld,\n", sz->cnst + dpsHeaderSize);
+ }
+}
+
+static void EndStatic(boolean first)
+{
+ /* end static template defn */
+ if (first)
+ printf(" }; /* _dpsQ */\n");
+ else
+ printf(" }; /* _dpsQ1 */\n");
+ outlineno++;
+}
+
+/* char that separates object attributes */
+#define ATT_SEP '|'
+
+static void EmitFieldConstructor(Token t)
+{
+ char *comment = NULL, *commentName = NULL;
+ fprintf(datafil, " {");
+
+ switch (t->type) {
+ case T_BOOLEAN:
+ fprintf(datafil, "DPS_LITERAL%cDPS_BOOL, 0, 0, %d", ATT_SEP, (int)(long)t->val);
+ break;
+ case T_INT:
+ fprintf(datafil, "DPS_LITERAL%cDPS_INT, 0, 0, %d", ATT_SEP, (int)(long)t->val);
+ break;
+ case T_FLOAT:
+ fprintf(datafil, "DPS_LITERAL%cDPS_REAL, 0, 0, %s", ATT_SEP, (char *)t->val);
+ break;
+
+ case T_ARRAY:
+ fprintf(datafil, "DPS_LITERAL%cDPS_ARRAY, 0, %d, %ld", ATT_SEP,
+ NumTokens((Body) (t->val)), t->body.cnst);
+ break;
+ case T_PROC:
+ fprintf(datafil, "DPS_EXEC%cDPS_ARRAY, 0, %d, %ld", ATT_SEP,
+ NumTokens((Body) (t->val)), t->body.cnst);
+ break;
+
+ case T_STRING:
+ case T_HEXSTRING:
+ if (t->namedFormal == NULL) {
+ int ln;
+ if (t->type == T_STRING)
+ ln = PSWStringLength((char *)t->val);
+ else ln = PSWHexStringLength((char *)t->val);
+ fprintf(datafil, "DPS_LITERAL%cDPS_STRING, 0, %d, %ld", ATT_SEP,
+ ln, t->body.cnst);
+ } else {
+ Item item = t->namedFormal;
+ if (item->subscripted && item->subscript->constant) {
+ fprintf(datafil, "DPS_LITERAL%cDPS_STRING, 0, %d, %ld",
+ ATT_SEP,item->subscript->val, t->body.cnst);
+ comment = "param[const]: ";
+ } else {
+ fprintf(datafil, "DPS_LITERAL%cDPS_STRING, 0, 0, %ld",
+ ATT_SEP,t->body.cnst);
+ comment = "param ";
+ }
+ commentName = (char *)t->val;
+ }
+ break;
+
+ case T_LITNAME:
+ commentName = (char *)t->val;
+ if (t->wellKnownName) {
+ fprintf(datafil, "DPS_LITERAL%cDPS_NAME, 0, DPSSYSNAME, %ld", ATT_SEP, t->body.cnst);
+ }
+ else if (t->namedFormal == NULL) {
+ int ln;
+ if (noUserNames) {
+ ln = PSWStringLength((char *)t->val);
+ fprintf(datafil, "DPS_LITERAL%cDPS_NAME, 0, %d, %ld", ATT_SEP, ln, t->body.cnst);
+ } else
+ fprintf(datafil, "DPS_LITERAL%cDPS_NAME, 0, 0, 0", ATT_SEP);
+ }
+ else {
+ fprintf(datafil, "DPS_LITERAL%cDPS_NAME, 0, 0, %ld", ATT_SEP, t->body.cnst);
+ comment = "param ";
+ }
+ break;
+
+ case T_NAME:
+ commentName = (char *)t->val;
+ if (t->wellKnownName) {
+ fprintf(datafil, "DPS_EXEC%cDPS_NAME, 0, DPSSYSNAME, %ld", ATT_SEP, t->body.cnst);
+ }
+ else if (t->namedFormal == NULL) {
+ int ln;
+ if (noUserNames) {
+ ln = PSWStringLength((char *)t->val);
+ fprintf(datafil, "DPS_EXEC%cDPS_NAME, 0, %d, %ld", ATT_SEP,
+ ln, t->body.cnst);
+ } else
+ fprintf(datafil, "DPS_EXEC%cDPS_NAME, 0, 0, 0", ATT_SEP);
+ }
+ else {
+ Item item = t->namedFormal;
+ if (IsCharType(item->type)) {
+ if (item->subscripted && t->namedFormal->subscript->constant) {
+ fprintf(datafil, "DPS_EXEC%cDPS_NAME, 0, %d, %ld", ATT_SEP,
+ t->namedFormal->subscript->val, t->body.cnst);
+ comment = "param[const]: ";
+ }
+ else {
+ fprintf(datafil, "DPS_EXEC%cDPS_NAME, 0, 0, %ld", ATT_SEP, t->body.cnst);
+ comment = "param ";
+ }
+ }
+ else {
+ if (item->subscripted) {
+ if (t->namedFormal->subscript->constant) {
+ if(IsNumStrType(item->type))
+ fprintf(datafil, "DPS_LITERAL%cDPS_STRING, 0, %d, %ld",
+ ATT_SEP, t->namedFormal->subscript->val
+ + NUMSTR_HEADER_SIZE, t->body.cnst);
+ else
+ fprintf(datafil, "DPS_LITERAL%cDPS_ARRAY, 0, %d, %ld",
+ ATT_SEP, t->namedFormal->subscript->val,
+ t->body.cnst);
+ comment = "param[const]: ";
+ } else {
+ if(IsNumStrType(item->type))
+ fprintf(datafil, "DPS_LITERAL%cDPS_STRING, 0, 0, %ld",
+ ATT_SEP, t->body.cnst);
+ else
+ fprintf(datafil, "DPS_LITERAL%cDPS_ARRAY, 0, 0, %ld", ATT_SEP,
+ t->body.cnst);
+ comment = "param[var]: ";
+ }
+ }
+ else {
+ char *dt = CTypeToDPSType(item->type);
+ fprintf(datafil, "DPS_LITERAL%c%s, 0, 0, 0", ATT_SEP, dt);
+ comment = "param: ";
+ }
+ }
+ }
+ break;
+ case T_SUBSCRIPTED: {
+ Item item = t->namedFormal;
+ char *dt = CTypeToDPSType(item->type);
+
+ /* Assert(t->namedFormal) */
+ fprintf(datafil, "DPS_LITERAL%c%s, 0, 0, 0", ATT_SEP, dt);
+ comment = "indexed param: ";
+ commentName = (char *)t->val;
+ }
+ break;
+
+ default:
+ CantHappen();
+ } /* switch */
+
+ if (comment == NULL) {
+ if (commentName == NULL) fprintf(datafil, "},\n");
+ else fprintf(datafil, "}, /* %s */\n", commentName);
+ }
+ else {
+ if (commentName == NULL) fprintf(datafil, "}, /* %s */\n", comment);
+ else fprintf(datafil, "}, /* %s%s */\n", comment, commentName);
+ }
+ outlineno++;
+} /* EmitFieldConstructor */
+
+static void ConstructStatics(Body body, Adr *sz, int nObjs)
+{
+ int objN = 0;
+ register TokenList strings = NULL, bodies = NULL;
+ register TokenList tl;
+ boolean isNamedInputArrays = false;
+ PSWDict wrapDict;
+ int strCount = 0;
+
+ wrapDict = CreatePSWDict(MAXSTRINGS); /* dictionary of strings in the wrap */
+
+ bodies = ConsToken(body, (TokenList) NULL); /* the work list */
+
+ /* emit boilerplate for the binobjseq static */
+ StartStatic(true);
+ FirstStatic(NumTokens(body), sz);
+
+ while (bodies) {
+ register Token t;
+ TokenList c = bodies;
+ bodies = c->next;
+
+ for (t = c->token; t; t = t->next) {
+ /* foreach token in this body */
+
+ /* emit the next record field constructor */
+ EmitFieldConstructor(t);
+ objN++;
+
+ switch (t->type) {
+ case T_STRING: /* token is a string literal */
+ if ((t->namedFormal == NULL) && PSWStringLength(t->val))
+ strings = ConsToken(t, strings);
+ break;
+
+ case T_HEXSTRING: /* token is a hexstring literal */
+ if ((t->namedFormal == NULL) && PSWHexStringLength(t->val))
+ strings = ConsToken(t, strings);
+ break;
+
+ case T_NAME:
+ if (t->namedFormal == NULL) {
+ if (noUserNames) {
+ if (!t->wellKnownName)
+ strings = ConsToken(t, strings);
+ }
+ } else
+ if ((t->namedFormal->subscripted)
+ && (!IsCharType(t->namedFormal->type))
+ && (!IsNumStrType(t->namedFormal->type))
+ )
+ isNamedInputArrays = true;
+ break;
+
+ case T_LITNAME:
+ if (noUserNames) {
+ if (!t->namedFormal && !t->wellKnownName)
+ strings = ConsToken(t, strings);
+ break;
+ }
+ case T_FLOAT:
+ case T_INT:
+ case T_BOOLEAN:
+ case T_SUBSCRIPTED:
+ break;
+
+ case T_ARRAY:
+ case T_PROC:
+ bodies = ConsToken((Body)t->val, bodies);
+ break;
+ default:
+ CantHappen();
+ } /* switch */
+ } /* for */
+ free(c);
+ } /* while */
+
+ if (strings && isNamedInputArrays) {
+ EndStatic(true);
+ StartStatic(false);
+ }
+
+ for (tl = strings; tl; tl = tl->next) {
+ Token t = tl->token;
+ if (PSWDictLookup(wrapDict, (char *)t->val) == -1) {
+ if (strCount <= MAXSTRINGS) {
+ PSWDictEnter(wrapDict, (char *)t->val, 0);
+ strCount++;
+ }
+ printf(" {");
+ if (t->type == T_STRING || t->type == T_NAME || t->type == T_LITNAME)
+ PSWOutputStringChars((char *)t->val);
+ else
+ PSWOutputHexStringChars((char *)t->val);
+ printf("},\n"); outlineno++;
+ objN++;
+ }
+ }
+
+ FreeTokenList(strings); strings = NULL;
+
+ EndStatic(! twoStatics); /* end the last static record */
+
+ Assert(objN == nObjs);
+
+ DestroyPSWDict(wrapDict);
+} /* ConstructStatics */
+
+
+/* Procedures for managing the result table */
+
+static void EmitResultTagTableDecls(Args outArgs)
+{
+ register Arg arg;
+ register Item item;
+ int count = 0;
+
+ if(reentrant) {
+ for (arg = outArgs; arg; arg = arg->next)
+ for (item = arg->items; item; item = item->next)
+ count++;
+ printf(" DPSResultsRec _dpsR[%d];\n", count); outlineno++;
+ count = 0;
+ if(doANSI)
+ printf(" static const DPSResultsRec _dpsRstat[] = {\n");
+ else
+ printf(" static DPSResultsRec _dpsRstat[] = {\n");
+ outlineno++;
+ } else {
+ printf(" static DPSResultsRec _dpsR[] = {\n"); outlineno++;
+ }
+ for (arg = outArgs; arg; arg = arg->next) {
+ for (item = arg->items; item; item = item->next) {
+ if (item->subscripted) {
+ printf(" { %s },\n",CTypeToResultType(item->type));
+ }
+ else { /* not subscripted */
+ printf(" { %s, -1 },\n",CTypeToResultType(item->type));
+ }
+ outlineno++;
+ }
+ }
+ printf(" };\n"); outlineno++;
+ for (arg = outArgs; arg; arg = arg->next) {
+ for (item = arg->items; item; item = item->next) {
+ if(reentrant) {
+ printf(" _dpsR[%d] = _dpsRstat[%d];\n", count, count);
+ outlineno++;
+ }
+ if (item->subscripted) {
+ Subscript s = item->subscript;
+ if (!(s->constant)) {
+ printf(" _dpsR[%d].count = %s;\n",count, s->name);
+ } else {
+ printf(" _dpsR[%d].count = %d;\n",count, s->val);
+ }
+ outlineno++;
+ } else { /* not subscripted */
+ if (IsCharType(item->type)) {
+ printf(" _dpsR[%d].count = -1;\n",count);
+ outlineno++;
+ }
+ }
+ printf(" _dpsR[%d].value = (char *)%s;\n",count++,item->name);
+ outlineno++;
+ }
+ }
+ printf("\n"); outlineno++;
+}
+
+static void EmitResultTagTableAssignments(Args outArgs)
+{
+ printf(" DPSSetResultTable(%s, _dpsR, %ld);\n", ctxName, NumArgs(outArgs));
+ outlineno++;
+}
+
+/* Procedure for acquiring name tags */
+
+static void EmitNameTagAcquisition(void)
+{
+ register TokenList n;
+ int i;
+ char *last_str;
+
+ last_str = (char *) psw_malloc((unsigned) (maxstring+1));
+
+ printf(" {\n");
+ if(!doANSI) {
+ printf(" static int _dpsT = 1;\n\n");
+ printf(" if (_dpsT) {\n");
+ outlineno += 4;
+ } else {
+ printf("if (_dpsCodes[0] < 0) {\n");
+ outlineno += 2;
+ }
+ if(doANSI)
+ printf(" static const char * const _dps_names[] = {\n");
+ else
+ printf(" static char *_dps_names[] = {\n");
+ outlineno ++;
+
+ for (n = nameTokens; n!= NULL; n = n->next) {
+ if (strcmp(last_str,(char *)n->token->val)) {
+ strcpy(last_str,(char *)n->token->val);
+ printf("\t\"%s\"", (char *)n->token->val);
+ } else {
+ printf("\t(char *) 0 ");
+ }
+ if (n->next) {printf(",\n"); outlineno++;}
+ }
+ printf("};\n"); outlineno++;
+ printf(" int *_dps_nameVals[%d];\n",nNames);outlineno++;
+ if (!doANSI) {
+ if (!writable) {
+ printf(" register DPSBinObjRec *_dpsP = (DPSBinObjRec *) &_dpsF.obj0;\n");
+ outlineno++;
+ } else {
+ if (reentrant) {
+ printf(" _dpsP = (DPSBinObjRec *) &_dpsStat.obj0;\n");
+ outlineno++;
+ }
+ }
+ }
+ i = 0;
+ if (doANSI) {
+ for(i=0; i<nNames; i++) {
+ printf(" _dps_nameVals[%d] = &_dpsCodes[%d];\n",i,i);
+ outlineno ++;
+ }
+ } else {
+ for (n = nameTokens; n!= NULL; n = n->next) {
+ printf(" _dps_nameVals[%d] = (int *)&_dpsP[%d].val.nameVal;\n",
+ i++, n->token->tokenIndex);
+ outlineno++;
+ }
+ }
+ printf("\n DPSMapNames(%s, %d, (char **) _dps_names, _dps_nameVals);\n",
+ ctxName, nNames);
+ outlineno += 2;
+ if (reentrant && writable && !doANSI) {
+ printf(" _dpsP = (DPSBinObjRec *) &_dpsF.obj0;\n");
+ outlineno++;
+ }
+ if (!doANSI) {
+ printf(" _dpsT = 0;\n");
+ outlineno ++;
+ }
+ printf(" }\n }\n\n");
+ outlineno += 3;
+} /* EmitNameTagAcquisition */
+
+
+/* Miscellaneous procedures */
+
+static void EmitLocals(unsigned sz)
+{
+ if(reentrant && writable) {
+ printf(" _dpsQ _dpsF; /* local copy */\n");
+ outlineno++;
+ }
+ if (ctxName == NULL) {
+ printf(" register DPSContext _dpsCurCtxt = DPSPrivCurrentContext();\n");
+ ctxName = "_dpsCurCtxt";
+ outlineno++;
+ }
+ if(pad) {
+ printf(" char pad[3];\n");
+ outlineno++;
+ }
+ if (writable) {
+ printf(" register DPSBinObjRec *_dpsP = (DPSBinObjRec *)&_dpsF.obj0;\n");
+ if(doANSI && nNames) {
+ printf(" static int _dpsCodes[%d] = {-1};\n",nNames);
+ outlineno++;
+ }
+ outlineno++;
+ if (namedInputArrays || namedInputStrings) {
+ printf(" register int _dps_offset = %d;\n",
+ twoStatics ? sz : sz + stringBytes);
+ outlineno++;
+ }
+ }
+}
+
+static boolean AllLiterals(Body body)
+{
+ Token t;
+
+ for (t = body; t; t = t->next) {
+ switch (t->type) {
+
+ case T_NAME:
+ if (t->namedFormal == NULL) return false;
+ break;
+
+ case T_ARRAY:
+ if (!AllLiterals((Body)t->val)) return false;
+ break;
+
+ case T_PROC:
+ case T_FLOAT:
+ case T_INT:
+ case T_BOOLEAN:
+ case T_LITNAME:
+ case T_HEXSTRING:
+ case T_STRING:
+ case T_SUBSCRIPTED:
+ break;
+
+ default:
+ CantHappen();
+ } /* switch */
+ } /* for */
+ return true;
+} /* AllLiterals */
+
+static void FlattenSomeArrays(Body body, boolean inSquiggles)
+{
+ Token t;
+ for (t = body; t; t = t->next) {
+ switch (t->type) {
+
+ case T_ARRAY:
+ if (!AllLiterals((Body)t->val)) {
+ Token t1, b, tlsq, trsq;
+ char *s;
+ t1 = t->next;
+ b = (Body)t->val;
+ SafeStrCpy(s, "[");
+ tlsq = PSWToken(T_NAME, s);
+ SafeStrCpy(s, "]");
+ trsq = PSWToken(T_NAME, s);
+ tlsq->sourceLine = t->sourceLine;
+ trsq->sourceLine = t->sourceLine;
+ *t = *tlsq;
+ t->next = b;
+ trsq->next = t1;
+ if (b == NULL) t->next = trsq;
+ else {
+ Token last;
+ for (last = b; last->next; last = last->next) ;
+ last->next = trsq;
+ }
+ }
+ else FlattenSomeArrays((Body)t->val, inSquiggles);
+ break;
+
+ case T_PROC:
+ FlattenSomeArrays((Body)t->val, true);
+ /* flatten all arrays below here */
+ break;
+
+ case T_NAME:
+ case T_FLOAT:
+ case T_INT:
+ case T_BOOLEAN:
+ case T_LITNAME:
+ case T_HEXSTRING:
+ case T_STRING:
+ case T_SUBSCRIPTED:
+ case T_NUMSTR:
+ case T_FLOATNUMSTR:
+ case T_LONGNUMSTR:
+ case T_SHORTNUMSTR:
+ break;
+
+ default:
+ CantHappen();
+ } /* switch */
+ } /* for */
+} /* FlattenSomeArrays */
+
+
+static void FixupOffsets(void)
+{
+ register TokenList tl; Token t;
+ register Item item;
+ int stringOffset = 0;
+ PSWDict wrapDict;
+ int strCount = 0;
+
+ wrapDict = CreatePSWDict(MAXSTRINGS); /* dictionary of wrap strings */
+
+ for (tl = namedInputArrays; tl; tl = tl->next) {
+ t = tl->token; item = t->namedFormal;
+ printf(" _dpsP[%d].val.arrayVal = _dps_offset;\n",t->tokenIndex);
+ printf(" _dps_offset += ");
+ if (item->subscript->constant)
+ printf("%d * sizeof(DPSBinObjGeneric);\n",item->subscript->val);
+ else
+ printf("%s * sizeof(DPSBinObjGeneric);\n",item->subscript->name);
+ outlineno += 2;
+ } /* named input arrays */
+
+ for (tl = namedInputStrings; tl; tl = tl->next) {
+ t = tl->token; item = t->namedFormal;
+ printf(" _dpsP[%d].val.stringVal = _dps_offset;\n",t->tokenIndex);
+ printf(" _dps_offset += ");
+ if (item->subscripted) {
+ if (item->subscript->constant) {
+ if(IsNumStrType(t->namedFormal->type)) {
+ if(pad & IsPadNumStrType(t->namedFormal->type))
+ printf("((%d * sizeof(%s)) + %d) & ~%d;\n",
+ item->subscript->val,TypeToText(t->namedFormal->type),
+ NUMSTR_HEADER_SIZE+WORD_ALIGN, WORD_ALIGN);
+ else
+ printf("(%d * sizeof(%s)) + %d;\n",
+ item->subscript->val,TypeToText(t->namedFormal->type),
+ NUMSTR_HEADER_SIZE);
+ } else
+ if(pad) {
+ int val = item->subscript->val;
+ val += WORD_ALIGN;
+ val &= ~WORD_ALIGN;
+ printf("%d;\n", val);
+ } else
+ printf("%d;\n",item->subscript->val);
+ } else {
+ if(IsNumStrType(t->namedFormal->type)) {
+ if(pad & IsPadNumStrType(t->namedFormal->type))
+ printf("((%s * sizeof(%s)) + %d) & ~%d;\n",
+ item->subscript->name,TypeToText(t->namedFormal->type),
+ NUMSTR_HEADER_SIZE+WORD_ALIGN, WORD_ALIGN);
+ else
+ printf("(%s * sizeof(%s)) + %d;\n",
+ item->subscript->name,TypeToText(t->namedFormal->type),
+ NUMSTR_HEADER_SIZE);
+ } else
+ if(pad)
+ printf("(%s + %d) & ~%d;\n",
+ item->subscript->name, WORD_ALIGN, WORD_ALIGN);
+ else
+ printf("%s;\n",item->subscript->name);
+ }
+ } else
+ if(pad)
+ printf("(_dpsP[%d].length + %d) & ~%d;\n",
+ t->tokenIndex, WORD_ALIGN, WORD_ALIGN);
+ else
+ printf("_dpsP[%d].length;\n",t->tokenIndex);
+ outlineno += 2;
+ } /* named input strings */
+
+ if (namedInputArrays) {
+ PSWDictValue strOffset;
+ for (tl = literalStrings; tl; tl = tl->next) {
+ t = tl->token;
+ strOffset = PSWDictLookup(wrapDict, (char *)t->val);
+ if (strOffset == -1) {
+ if (strCount <= MAXSTRINGS) {
+ PSWDictEnter(wrapDict, (char *)t->val, stringOffset);
+ strCount++;
+ }
+ if (stringOffset == 0)
+ printf(" _dpsP[%d].val.stringVal = _dps_offset;\n",
+ t->tokenIndex);
+ else
+ printf(" _dpsP[%d].val.stringVal = _dps_offset + %d;\n",
+ t->tokenIndex,stringOffset);
+ outlineno++;
+ stringOffset +=
+ (t->type == T_STRING || t->type == T_NAME || t->type == T_LITNAME)
+ ? PSWStringLength((char *)t->val)
+ : PSWHexStringLength((char *)t->val);
+ } else {
+ if (strOffset == 0)
+ printf(" _dpsP[%d].val.stringVal = _dps_offset;\n",
+ t->tokenIndex);
+ else
+ printf(" _dpsP[%d].val.stringVal = _dps_offset + %d;\n",
+ t->tokenIndex, (int) strOffset);
+ outlineno++;
+ }
+ } /* literalStrings */
+ if (stringOffset) {
+ printf(" _dps_offset += %d;\n",stringOffset);
+ outlineno++;
+ }
+ }
+ DestroyPSWDict(wrapDict);
+} /* FixupOffsets */
+
+
+static int EmitValueAssignments(Body body, Item item)
+{
+ register Token t;
+ int gotit = 0;
+
+ for (t = body; t; t = t->next) {
+ switch (t->type) {
+ case T_STRING:
+ case T_HEXSTRING:
+ case T_LITNAME:
+ if (t->namedFormal && t->namedFormal == item) {
+ printf("\n _dpsP[%d].length =",t->tokenIndex);
+ outlineno++;
+ gotit++;
+ }
+ break;
+ case T_NAME:
+ if (t->namedFormal && t->namedFormal == item) {
+ if ((item->subscripted && !item->subscript->constant) ||
+ (item->starred && IsCharType(item->type)) ||
+ IsNumStrType(item->type)) {
+ printf("\n _dpsP[%d].length =",t->tokenIndex);
+ outlineno++;
+ gotit++;
+ }
+ switch (item->type) {
+ case T_BOOLEAN:
+ if (!item->subscripted) {
+ printf("\n _dpsP[%d].val.booleanVal =",
+ t->tokenIndex);
+ gotit++; outlineno++;
+ }
+ break;
+ case T_INT:
+ case T_LONGINT:
+ case T_SHORTINT:
+ case T_UINT:
+ case T_ULONGINT:
+ case T_USHORTINT:
+ case T_USEROBJECT:
+ if (!item->subscripted) {
+ printf("\n _dpsP[%d].val.integerVal =",
+ t->tokenIndex);
+ gotit++; outlineno++;
+ }
+ break;
+ case T_FLOAT:
+ case T_DOUBLE:
+ if (!item->subscripted) {
+ printf("\n _dpsP[%d].val.realVal =",
+ t->tokenIndex);
+ gotit++; outlineno++;
+ }
+ break;
+ case T_CHAR:
+ case T_UCHAR: /* the executable name is an arg */
+ case T_NUMSTR:
+ case T_FLOATNUMSTR:
+ case T_LONGNUMSTR:
+ case T_SHORTNUMSTR:
+ break;
+ default: CantHappen();
+ }
+ }
+ break;
+
+ case T_SUBSCRIPTED:
+ case T_FLOAT:
+ case T_INT:
+ case T_BOOLEAN:
+ break;
+
+ case T_ARRAY:
+ case T_PROC:
+ /* recurse */
+ gotit += EmitValueAssignments((Body) (t->val),item);
+ break;
+ default:
+ CantHappen();
+ } /* switch */
+ } /* token */
+ return (gotit);
+} /* EmitValueAssignments */
+
+
+static void EmitElementValueAssignments(Body body, Item item)
+{
+ register Token t;
+
+ for (t = body; t; t = t->next) {
+ if (t->type != T_SUBSCRIPTED) continue;
+ if (t->namedFormal == item) {
+ switch (item->type) {
+ case T_BOOLEAN:
+ printf("\n _dpsP[%d].val.booleanVal = (int)(0 != %s[%s]);",
+ t->tokenIndex, item->name, t->body.var);
+ outlineno++;
+ break;
+ case T_INT:
+ case T_LONGINT:
+ case T_SHORTINT:
+ case T_UINT:
+ case T_ULONGINT:
+ case T_USHORTINT:
+ printf("\n _dpsP[%d].val.integerVal = %s[%s];",
+ t->tokenIndex, item->name, t->body.var);
+ outlineno++;
+ break;
+ case T_FLOAT:
+ case T_DOUBLE:
+ printf("\n _dpsP[%d].val.realVal = %s[%s];",
+ t->tokenIndex, item->name, t->body.var);
+ outlineno++;
+ break;
+ case T_CHAR:
+ case T_UCHAR:
+ CantHappen();
+ break;
+ default: CantHappen();
+ }
+ }
+ } /* token */
+} /* EmitElementValueAssignments */
+
+
+static void ScanParamsAndEmitValues(Body body, Args args)
+{
+ register Arg arg; /* a list of parameters */
+ register Item item; /* a parameter */
+ int gotit; /* flag that we found some token with this length */
+
+ /* for each arg */
+ for (arg = args; arg; arg = arg->next) {
+ /* for each arg item */
+ for (item = arg->items; item; item = item->next) {
+ if (item->type == T_CONTEXT) continue;
+ gotit = EmitValueAssignments(body,item);
+ if (gotit != 0) {
+ if (item->subscripted) {
+ if (item->subscript->constant) {
+ if(IsNumStrType(item->type))
+ printf(" (%d * sizeof(%s)) + %d;",item->subscript->val,
+ TypeToText(item->type), NUMSTR_HEADER_SIZE);
+ else
+ printf(" %d;",item->subscript->val);
+ } else {
+ if(IsNumStrType(item->type))
+ printf(" (%s * sizeof(%s)) + %d;",item->subscript->name,
+ TypeToText(item->type), NUMSTR_HEADER_SIZE);
+ else
+ printf(" %s;",item->subscript->name);
+ }
+ } else switch(item->type) {
+ case T_CHAR:
+ case T_UCHAR:
+ printf(" strlen(%s);",item->name);
+ break;
+ case T_INT:
+ case T_LONGINT:
+ case T_SHORTINT:
+ case T_UINT:
+ case T_ULONGINT:
+ case T_USHORTINT:
+ case T_FLOAT:
+ case T_DOUBLE:
+ case T_USEROBJECT:
+ printf(" %s;",item->name);
+ break;
+ case T_BOOLEAN:
+ printf(" (int) (0 != %s);",item->name);
+ break;
+ default: CantHappen();
+ } /* switch */
+ } /* gotit */
+ if (item->subscripted) {
+ EmitElementValueAssignments(body,item);
+ }
+ } /* item */
+ } /* arg */
+ printf("\n"); outlineno++;
+}
+
+static void EmitMappedNames(void)
+{
+register TokenList n;
+int i=0;
+ for (n = nameTokens; n!= NULL; n = n->next) {
+ printf(" _dpsP[%d].val.nameVal = _dpsCodes[%d];\n",
+ n->token->tokenIndex, i++);
+ outlineno++;
+ }
+}
+
+static void WriteObjSeq(unsigned sz)
+{
+ register TokenList tl;
+
+ printf(" DPSBinObjSeqWrite(%s,(char *) &_dpsF,%d);\n",
+ ctxName, (twoStatics ? sz : sz + stringBytes) + dpsHeaderSize);
+ outlineno++;
+
+ for (tl = namedInputArrays; tl; tl = tl->next) {
+ Token t = tl->token;
+ printf(" DPSWriteTypedObjectArray(%s, %s, (char *)%s, ",
+ ctxName,
+ CTypeToResultType(t->namedFormal->type),
+ t->namedFormal->name);
+ if (t->namedFormal->subscript->constant)
+ printf("%d);\n", t->namedFormal->subscript->val);
+ else
+ printf("%s);\n", t->namedFormal->subscript->name);
+ outlineno++;
+ }
+
+ for (tl = namedInputStrings; tl; tl = tl->next) {
+ Token t = tl->token;
+ if(IsNumStrType(t->namedFormal->type)) {
+ printf(" DPSWriteNumString(%s, %s, (char *) %s, ", ctxName,
+ CTypeToResultType(t->namedFormal->type), t->namedFormal->name);
+ if (t->namedFormal->subscript->constant)
+ printf("%d, ", t->namedFormal->subscript->val);
+ else
+ printf("%s, ", t->namedFormal->subscript->name);
+ if (t->namedFormal->scaled) {
+ if (t->namedFormal->scale->constant)
+ printf("%d);\n", t->namedFormal->scale->val);
+ else
+ printf("%s);\n", t->namedFormal->scale->name);
+ } else printf("0);\n");
+ outlineno ++;
+ } else {
+ printf(" DPSWriteStringChars(%s, (char *)%s, ",
+ ctxName, t->namedFormal->name);
+ if (!t->namedFormal->subscripted) {
+ printf("_dpsP[%d].length);\n", t->tokenIndex);
+ if(pad) {
+ printf(" DPSWriteStringChars(%s, (char *)pad, ~(_dpsP[%d].length + %d) & %d);\n",
+ ctxName,t->tokenIndex,WORD_ALIGN,WORD_ALIGN);
+ outlineno ++;
+ }
+ } else
+ if (t->namedFormal->subscript->constant) {
+ int val = t->namedFormal->subscript->val;
+ printf("%d);\n", val);
+ if(pad){
+ val = ~(val + WORD_ALIGN) & WORD_ALIGN;
+ if(val) {
+ printf(" DPSWriteStringChars(%s, (char *)pad, %d);\n",
+ ctxName,val);
+ outlineno ++;
+ }
+ }
+ } else {
+ printf("%s);\n", t->namedFormal->subscript->name);
+ if(pad) {
+ printf(" DPSWriteStringChars(%s, (char *)pad, ~(%s + %d) & %d);\n",
+ ctxName,t->namedFormal->subscript->name,
+ WORD_ALIGN,WORD_ALIGN);
+ outlineno ++;
+ }
+ }
+ outlineno ++;
+ }
+ }
+
+ if (twoStatics) {
+ printf(" DPSWriteStringChars(%s,(char *) &_dpsF1,%d);\n",
+ ctxName,stringBytes);
+ outlineno++;
+ }
+} /* WriteObjSeq */
+
+
+/*************************************************************/
+/* Public procedures, called by the semantic action routines */
+
+void EmitPrototype(Header hdr)
+{
+ /* emit procedure prototype to the output .h file, if any */
+
+ fprintf(header, "\n");
+ fprintf(header, "extern void %s(", hdr->name);
+ if (doANSI) EmitANSIPrototypes(header, hdr);
+ else if (hdr->inArgs || hdr->outArgs) {
+ fprintf(header, " /* ");
+ EmitArgPrototypes(header, hdr);
+ fprintf(header, "*/ ");
+ }
+ fprintf(header, ");\n");
+}
+
+void EmitBodyHeader(Header hdr)
+{
+ /* emit procedure header */
+ register Arg arg;
+ register Item item;
+
+ nameTokens = NULL;
+ nNames = 0;
+ ctxName = NULL;
+
+ if (hdr->isStatic) printf("static ");
+ printf("void %s(", hdr->name);
+
+ if (doANSI) {
+ EmitANSIPrototypes(stdout,hdr);
+ printf(")\n");
+ outlineno++;
+ }
+ else { /* not ANSI */
+ for (arg = hdr->inArgs; arg; arg = arg->next) {
+ for (item = arg->items; item; item = item->next) {
+ if (arg->type == T_CONTEXT) ctxName = item->name;
+ printf(item->name);
+ if (item->next) printf(", ");
+ }
+ if (arg->next || hdr->outArgs) printf(", ");
+ } /* inArgs */
+ for (arg = hdr->outArgs; arg; arg = arg->next) {
+ for (item = arg->items; item; item = item->next) {
+ printf(item->name);
+ if (item->next) printf(", ");
+ }
+ if (arg->next) printf(", ");
+ } /* outArgs */
+ printf(")\n"); outlineno++;
+ if (hdr->inArgs || hdr->outArgs) {
+ EmitArgPrototypes(stdout, hdr);
+ printf("\n");
+ outlineno++;
+ }
+ }
+} /* EmitBodyHeader */
+
+void EmitBody(Tokens body, Header hdr)
+{
+ Args arg, outArgs = hdr->outArgs;
+ Item item;
+ long int nObjs;
+ unsigned structSize;
+ /* total number of objects plus string bodies in objrecs.
+ Not including array arg expansions */
+ Adr sizeAdr;
+
+ if(NumTokens(body) == 0)
+ return; /* empty wrap */
+
+ if (outArgs) body = AppendResultFlush(body, NumArgs(outArgs));
+
+ FlattenSomeArrays(body, false);
+
+ if ((large = (((NumTokens(body) > 0xff)) || CheckSize(body))) != 0)
+ dpsHeaderSize = DPS_LONG_HEADER_SIZE;
+ else
+ dpsHeaderSize = DPS_HEADER_SIZE;
+
+ /* check for char * input args */
+ for (arg = hdr->inArgs; arg && !large; arg = arg->next) {
+ for (item = arg->items; item; item = item->next) {
+ if ((arg->type == T_CHAR) && item->starred) {
+ /* if arg is char * then need to use large format since
+ size of arg is unknown */
+ large = true;
+ dpsHeaderSize = DPS_LONG_HEADER_SIZE;
+ }
+ }
+ }
+
+ BuildTypesAndAssignAddresses(body, &sizeAdr, &nObjs, &structSize);
+ /* also constructs namedInputArrays, namedInputStrings and literalStrings */
+
+ ConstructStatics(body, &sizeAdr, nObjs);
+
+ EmitLocals(structSize);
+
+ if (outArgs) EmitResultTagTableDecls(outArgs);
+
+ if (nameTokens) {
+ EmitNameTagAcquisition();
+ }
+
+ if(reentrant && writable) {
+ printf(" _dpsF = _dpsStat; /* assign automatic variable */\n");
+ outlineno++;
+ }
+ if(writable) {
+ ScanParamsAndEmitValues(body,hdr->inArgs);
+ }
+
+ if(doANSI && nameTokens) {
+ EmitMappedNames();
+ FreeTokenList(nameTokens);
+ nameTokens = NULL;
+ }
+
+ /* Fixup offsets and the total size */
+
+ if (writable && (namedInputArrays || namedInputStrings)) {
+ FixupOffsets();
+ printf("\n _dpsF.nBytes = _dps_offset+%d;\n", dpsHeaderSize);
+ outlineno += 2;
+ }
+
+ if (outArgs) EmitResultTagTableAssignments(outArgs);
+
+ WriteObjSeq(structSize);
+
+ FreeTokenList(namedInputArrays); namedInputArrays = NULL;
+ FreeTokenList(namedInputStrings); namedInputStrings = NULL;
+ FreeTokenList(literalStrings); literalStrings = NULL;
+
+ if (outArgs)
+ printf(" DPSAwaitReturnValues(%s);\n", ctxName);
+ else
+ printf(" DPSSYNCHOOK(%s)\n", ctxName);
+ outlineno++;
+
+#ifdef NeXT
+ if (pad) {
+ printf(" if (0) *pad = 0; /* quiets compiler warnings */\n"); /* gets rid of "unused variable" warnings */
+ outlineno++;
+ }
+#endif
+} /* EmitBody */
+
+static void AllocFailure(void)
+{
+ ErrIntro(yylineno);
+ fprintf(stderr, "pswrap is out of storage; ");
+ if (bigFile)
+ fprintf(stderr, "try splitting the input file\n");
+ else
+ fprintf(stderr, "try -b switch\n");
+ exit(1);
+}
+
+char *psw_malloc(s) int s; {
+ char *temp;
+ if ((temp = malloc((unsigned) s)) == NULL)
+ AllocFailure();
+ return(temp);
+}
+
+char *psw_calloc(n,s) int n,s; {
+ char *temp;
+ if ((temp = calloc((unsigned) n, (unsigned) s)) == NULL)
+ AllocFailure();
+ return(temp);
+}
+
+void
+FreeBody(body) Body body; {
+ register Token t, nexttoken;
+
+ for (t = body; t; t = nexttoken) {
+ nexttoken = t->next;
+ if (t->adr.var) free(t->adr.var);
+ switch (t->type) {
+ case T_STRING:
+ case T_NAME:
+ case T_LITNAME:
+ case T_HEXSTRING:
+ free (t->val);
+ break;
+ case T_FLOAT:
+ case T_INT:
+ case T_BOOLEAN:
+ break;
+ case T_SUBSCRIPTED:
+ free (t->val); free(t->body.var);
+ break;
+ case T_ARRAY:
+ case T_PROC:
+ FreeBody((Body) (t->val));
+ break;
+ default:
+ CantHappen();
+ }
+ free (t);
+ }
+}
diff --git a/nx-X11/config/pswrap/psw.h b/nx-X11/config/pswrap/psw.h
new file mode 100644
index 000000000..612fb5db4
--- /dev/null
+++ b/nx-X11/config/pswrap/psw.h
@@ -0,0 +1,92 @@
+/*
+ * psw.h
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+
+#ifndef PSW_H
+#define PSW_H
+
+/* C types */
+
+#define T_BOOLEAN 101
+#define T_FLOAT 102
+#define T_DOUBLE 103
+#define T_CHAR 104
+#define T_UCHAR 105
+#define T_INT 106
+#define T_UINT 107
+#define T_LONGINT 108
+#define T_SHORTINT 109
+#define T_ULONGINT 110
+#define T_USHORTINT 111
+#define T_USEROBJECT 112
+#define T_NUMSTR 113
+#define T_FLOATNUMSTR 114
+#define T_LONGNUMSTR 115
+#define T_SHORTNUMSTR 116
+
+
+/* PostScript types */
+
+#define T_STRING 91
+#define T_HEXSTRING 92
+#define T_NAME 93
+#define T_LITNAME 94
+#define T_ARRAY 95
+#define T_PROC 96
+#define T_CONTEXT 97
+#define T_SUBSCRIPTED 98
+
+/* Other PostScript types:
+
+ T_FLOAT is used for real
+ T_INT is used for integer
+ T_BOOLEAN is used for boolean
+ T_USEROBJECT is used for userobjects
+
+*/
+
+/* psw.c */
+extern char *psw_malloc(int);
+extern char *psw_calloc(int, int);
+
+/* pswstring.c */
+extern int PSWStringLength(char *);
+extern int PSWHexStringLength(char *);
+extern void PSWOutputStringChars(char *);
+extern void PSWOutputHexStringChars(char *);
+
+#endif /* PSW_H */
diff --git a/nx-X11/config/pswrap/pswdict.c b/nx-X11/config/pswrap/pswdict.c
new file mode 100644
index 000000000..3c72fbeea
--- /dev/null
+++ b/nx-X11/config/pswrap/pswdict.c
@@ -0,0 +1,180 @@
+/*
+ * pswdict.c
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+
+/***********/
+/* Imports */
+/***********/
+
+#include <stdlib.h>
+
+#include "pswtypes.h"
+#include "pswdict.h"
+#include "psw.h"
+
+#ifdef XENVIRONMENT
+#include <X11/Xos.h>
+#else
+#include <string.h>
+#endif
+
+/********************/
+/* Types */
+/********************/
+
+typedef struct _t_EntryRec {
+ struct _t_EntryRec *next;
+ char *name;
+ PSWDictValue value;
+} EntryRec, *Entry;
+
+ /* The concrete definition for a dictionary */
+typedef struct _t_PSWDictRec {
+ int nEntries;
+ Entry *entries;
+} PSWDictRec;
+
+PSWDict atoms;
+
+/**************************/
+/* Procedure Declarations */
+/**************************/
+
+/* Creates and returns a new dictionary. nEntries is a hint. */
+PSWDict CreatePSWDict(int nEntries)
+{
+ PSWDict d = (PSWDict)psw_calloc(sizeof(PSWDictRec), 1);
+ d->nEntries = nEntries;
+ d->entries = (Entry *)psw_calloc(sizeof(EntryRec), d->nEntries);
+ return d;
+}
+
+/* Destroys a dictionary */
+void DestroyPSWDict(PSWDict dict)
+{
+ free(dict->entries);
+ free(dict);
+}
+
+static int Hash(char *name, int nEntries)
+{
+ register int val = 0;
+ while (*name) val += *name++;
+ if (val < 0) val = -val;
+ return (val % nEntries);
+}
+
+static Entry Probe(PSWDict d, int x, char *name)
+{
+ register Entry e;
+ for (e = (d->entries)[x]; e; e = e->next) {
+ if (strcmp(name, e->name) == 0) break;
+ }
+ return e;
+}
+
+static Entry PrevProbe(Entry *prev, PSWDict d, int x, char *name)
+{
+ register Entry e;
+ *prev = NULL;
+ for (e = (d->entries)[x]; e; e = e->next) {
+ if (strcmp(name, e->name) == 0) break;
+ *prev = e;
+ }
+ return e;
+}
+
+/* -1 => not found */
+PSWDictValue PSWDictLookup(PSWDict dict, char *name)
+{
+ Entry e;
+ e = Probe(dict, Hash(name, dict->nEntries), name);
+ if (e == NULL) return -1;
+ return e->value;
+}
+
+/* 0 => normal return (not found)
+ -1 => found. If found, value is replaced. */
+PSWDictValue PSWDictEnter(PSWDict dict, char *name, PSWDictValue value)
+{
+ Entry e;
+ int x = Hash(name, dict->nEntries);
+ e = Probe(dict, x, name);
+ if (e) {
+ e->value = value;
+ return -1;
+ }
+ e = (Entry)psw_calloc(sizeof(EntryRec), 1);
+ e->next = (dict->entries)[x]; (dict->entries)[x] = e;
+ e->value = value;
+ e->name = MakeAtom(name);
+ return 0;
+}
+
+/* -1 => not found. If found, value is returned. */
+PSWDictValue PSWDictRemove(PSWDict dict, char *name)
+{
+ Entry e, prev;
+ PSWDictValue value;
+ int x = Hash(name, dict->nEntries);
+
+ e = PrevProbe(&prev, dict, x, name);
+ if (e == NULL) return -1;
+ value = e->value;
+ if (prev == NULL) (dict->entries)[x] = e->next; else prev->next = e->next;
+ free(e);
+ return value;
+}
+
+PSWAtom MakeAtom(char *name)
+{
+ Entry e;
+ int x = Hash(name, 511);
+ char *newname;
+
+ if (atoms == NULL) atoms = CreatePSWDict(511);
+ e = Probe(atoms, x, name);
+ if (e == NULL) {
+ e = (Entry)psw_calloc(sizeof(EntryRec), 1);
+ e->next = (atoms->entries)[x]; (atoms->entries)[x] = e;
+ e->value = 0;
+ newname = psw_malloc(strlen(name)+1);
+ strcpy(newname, name);
+ e->name = newname;
+ }
+ return e->name;
+}
diff --git a/nx-X11/config/pswrap/pswdict.h b/nx-X11/config/pswrap/pswdict.h
new file mode 100644
index 000000000..dcbfbb13b
--- /dev/null
+++ b/nx-X11/config/pswrap/pswdict.h
@@ -0,0 +1,76 @@
+/*
+ * pswdict.h
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+
+#ifndef PSWDICT_H
+#define PSWDICT_H
+
+typedef struct _t_PSWDictRec *PSWDict;
+/* Opaque designator for a dictionary */
+
+typedef long int PSWDictValue; /* non-negative */
+typedef char *PSWAtom;
+
+/* PROCEDURES */
+
+/* NOTES
+ The name parameters defined below are NULL-terminated C strings.
+ None of the name parameters are handed off, i.e. the caller is
+ responsible for managing their storage. */
+
+extern PSWDict CreatePSWDict(int /* nEntries */);
+/* nEntries is a hint. Creates and returns a new dictionary */
+
+extern void DestroyPSWDict(PSWDict /* dict */);
+/* Destroys a dictionary */
+
+extern PSWDictValue PSWDictLookup(PSWDict /* dict */, char * /* name */);
+/* -1 => not found. */
+
+extern PSWDictValue PSWDictEnter
+ (PSWDict /* dict */, char * /* name */, PSWDictValue /* value */);
+/* 0 => normal return (not found)
+ -1 => found. If found, the old value gets replaced with the new one. */
+
+extern PSWDictValue PSWDictRemove(PSWDict /* dict */, char * /* name */);
+/* -1 => not found. If found, value is returned. */
+
+extern PSWAtom MakeAtom(char * /* name */);
+
+extern PSWDict wellKnownPSNames;
+
+#endif /* PSWDICT_H */
diff --git a/nx-X11/config/pswrap/pswfile.c b/nx-X11/config/pswrap/pswfile.c
new file mode 100644
index 000000000..e4f24a641
--- /dev/null
+++ b/nx-X11/config/pswrap/pswfile.c
@@ -0,0 +1,87 @@
+/*
+ * pswfile.c
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+/* $XFree86: xc/config/pswrap/pswfile.c,v 1.5tsi Exp $ */
+
+#include <stdio.h>
+#include "pswversion.h"
+#include "pswpriv.h"
+
+#ifdef __MACH__
+extern char *shlibInclude;
+#endif /* __MACH__ */
+
+static int EmitVersion(FILE *f, char *infname, char *outfname)
+{
+ fprintf(f,"/* %s generated from %s\n",outfname,infname);
+ fprintf(f," by %s %s %s\n */\n\n",PSW_OS,prog,PSW_VERSION);
+ return 4; /* number of output lines */
+}
+
+void InitHFile(void)
+{
+ (void) EmitVersion(header, ifile, hfile);
+ fprintf(header,"#ifndef %s\n#define %s\n",headid,headid);
+}
+
+void FinishHFile(void)
+{
+ fprintf(header,"\n#endif /* %s */\n",headid);
+ fclose(header);
+}
+
+void InitOFile(void)
+{
+ outlineno += EmitVersion(stdout, ifile, ofile);
+#ifdef __MACH__
+ if( shlibInclude ) {
+ printf("#ifdef SHLIB\n");
+ printf("#include \"%s\"\n", shlibInclude );
+ printf("#endif\n");
+ outlineno += 3;
+ }
+#endif /* __MACH__ */
+ printf("#include %s\n", FRIENDSFILE);
+ printf("#include <string.h>\n");
+ outlineno += 3; /* UPDATE this if you add more prolog */
+ if (special_h) {
+ printf("#include \"%s\"\n\n", special_h);
+ outlineno ++;
+ }
+ printf("#line 1 \"%s\"\n",ifile);
+ outlineno++;
+}
diff --git a/nx-X11/config/pswrap/pswparser.y b/nx-X11/config/pswrap/pswparser.y
new file mode 100644
index 000000000..795113947
--- /dev/null
+++ b/nx-X11/config/pswrap/pswparser.y
@@ -0,0 +1,278 @@
+/*
+ * pswparser.y
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+/* $XFree86: xc/config/pswrap/pswparser.y,v 1.4 2000/05/18 23:46:08 dawes Exp $ */
+
+/*
+ * Not all yaccs understand this.
+ *
+%expect 1
+ */
+
+%{
+
+#include "pswpriv.h"
+#include "pswsemantics.h"
+
+%}
+
+/* yylval type (from lexer and on stack) */
+
+%union {
+ char *object;
+ long intobj;
+ Token token;
+ Item item;
+ Header header;
+ int flag;
+ Arg arg;
+ Subscript subscript;
+}
+
+
+%token <object> DEFINEPS ENDPS STATIC
+%token <object> PSCONTEXT
+%token <object> BOOLEAN FLOAT DOUBLE UNSIGNED SHORT LONG INT CHAR USEROBJECT
+%token <object> NUMSTRING
+%token <object> CNAME
+%token <intobj> CINTEGER
+
+%token <object> PSNAME PSLITNAME PSREAL PSBOOLEAN PSSTRING PSHEXSTRING
+%token <intobj> PSINTEGER
+%token <object> PSSUBNAME PSINDEX
+
+%token <object> '(' ')' '|' ';' ',' '*' '[' ']' '{' '}' ':'
+
+%type <token> Token Tokens Body
+%type <item> Items Item
+%type <header> Header
+%type <flag> Def Type
+%type <arg> InArgs Args ContextArg SubArgs Arg
+%type <subscript> Subscript
+
+%start Module
+
+%%
+
+Module:
+ /* empty */
+ | Module Definition
+ ;
+
+Definition:
+ Header Body ENDPS
+ { FinalizePSWrapDef($1, $2); yyerrok; }
+ | error ENDPS
+ { yyerrok; }
+ ;
+
+Body:
+ /* nothing */
+ { $$ = 0; }
+ | Tokens
+ /* { $$ = $1; }*/
+ ;
+
+Tokens:
+ Token
+ { $$ = AppendPSWToken($1, 0L); }
+ | Tokens Token
+ { $$ = AppendPSWToken($2, $1); yyerrok; }
+ /* | error
+ { $$ = 0; } */
+ ;
+
+Header:
+ Def ')'
+ { $$ = PSWHeader($1, 0, 0); yyerrok; }
+ | Def InArgs ')'
+ { $$ = PSWHeader($1, $2, 0); yyerrok; }
+ | Def InArgs '|' Args ')'
+ { $$ = PSWHeader($1, $2, $4); yyerrok; }
+ | Def '|' Args ')'
+ { $$ = PSWHeader($1, 0, $3); yyerrok; }
+ ;
+
+Def:
+ DEFINEPS CNAME '('
+ { PSWName($2); $$ = 0; yyerrok; }
+ | DEFINEPS STATIC CNAME '('
+ { PSWName($3); $$ = 1; yyerrok; }
+ | DEFINEPS error '('
+ { PSWName("error"); $$ = 0; yyerrok; }
+ ;
+
+Semi:
+ /* nothing */
+ | ';' { yyerrok; }
+ ;
+
+InArgs:
+ ContextArg Semi
+ /* { $$ = $1; } */
+ | Args
+ /* { $$ = $1; } */
+ | ContextArg ';' Args
+ { $$ = ConsPSWArgs($1, $3); }
+ ;
+
+ContextArg:
+ PSCONTEXT CNAME
+ { $$ = PSWArg(T_CONTEXT, PSWItem($2)); }
+ ;
+
+Args:
+ SubArgs Semi
+ /* { $$ = $1; }*/
+ ;
+
+SubArgs:
+ Arg
+ /* { $$ = $1; }*/
+ | SubArgs ';' Arg
+ { yyerrok; $$ = AppendPSWArgs($3, $1); }
+ | SubArgs error
+ | SubArgs error Arg
+ { yyerrok; $$ = AppendPSWArgs($3, $1); }
+ | SubArgs ';' error
+ ;
+
+Arg: Type Items
+ { $$ = PSWArg($1, $2); yyerrok; }
+ ;
+
+Items:
+ Item
+ /* { $$ = $1; } */
+ | Items ',' Item
+ { yyerrok; $$ = AppendPSWItems($3, $1); }
+ | error { $$ = 0; }
+ | Items error
+ | Items error Item
+ { yyerrok; $$ = AppendPSWItems($3, $1); }
+ | Items ',' error
+ ;
+
+Item:
+ '*' CNAME
+ { $$ = PSWStarItem($2); }
+ | CNAME '[' Subscript ']'
+ { $$ = PSWSubscriptItem($1, $3); }
+ | CNAME '[' Subscript ']' ':' CNAME
+ { $$ = PSWScaleItem($1, $3, $6, 0); }
+ | CNAME '[' Subscript ']' ':' CINTEGER
+ { $$ = PSWScaleItem($1, $3, NULL, $6); }
+ | CNAME
+ { $$ = PSWItem($1); }
+ ;
+
+Subscript:
+ CNAME
+ { $$ = PSWNameSubscript($1); }
+ | CINTEGER
+ { $$ = PSWIntegerSubscript($1); }
+ ;
+
+Type:
+ BOOLEAN
+ { $$ = T_BOOLEAN; }
+ | FLOAT
+ { $$ = T_FLOAT; }
+ | DOUBLE
+ { $$ = T_DOUBLE; }
+ | CHAR
+ { $$ = T_CHAR; }
+ | UNSIGNED CHAR
+ { $$ = T_UCHAR; }
+ | INT
+ { $$ = T_INT; }
+ | LONG INT
+ { $$ = T_LONGINT; }
+ | LONG
+ { $$ = T_LONGINT; }
+ | SHORT INT
+ { $$ = T_SHORTINT; }
+ | SHORT
+ { $$ = T_SHORTINT; }
+ | UNSIGNED
+ { $$ = T_UINT; }
+ | UNSIGNED LONG
+ { $$ = T_ULONGINT; }
+ | UNSIGNED INT
+ { $$ = T_UINT; }
+ | UNSIGNED LONG INT
+ { $$ = T_ULONGINT; }
+ | UNSIGNED SHORT
+ { $$ = T_USHORTINT; }
+ | UNSIGNED SHORT INT
+ { $$ = T_USHORTINT; }
+ | USEROBJECT
+ { $$ = T_USEROBJECT; }
+ | NUMSTRING
+ { $$ = T_NUMSTR; }
+ | INT NUMSTRING
+ { $$ = T_NUMSTR; }
+ | FLOAT NUMSTRING
+ { $$ = T_FLOATNUMSTR; }
+ | LONG NUMSTRING
+ { $$ = T_LONGNUMSTR; }
+ | SHORT NUMSTRING
+ { $$ = T_SHORTNUMSTR; }
+ ;
+
+Token:
+ PSINTEGER
+ { $$ = PSWToken(T_INT, (char *)$1); }
+ | PSREAL
+ { $$ = PSWToken(T_FLOAT, $1); }
+ | PSBOOLEAN
+ { $$ = PSWToken(T_BOOLEAN, $1); }
+ | PSSTRING
+ { $$ = PSWToken(T_STRING, $1); }
+ | PSHEXSTRING
+ { $$ = PSWToken(T_HEXSTRING, $1); }
+ | PSNAME
+ { $$ = PSWToken(T_NAME, $1); }
+ | PSLITNAME
+ { $$ = PSWToken(T_LITNAME, $1); }
+ | PSSUBNAME PSINDEX
+ { $$ = PSWToken2(T_SUBSCRIPTED, $1, $2); }
+ | '[' Body ']'
+ { $$ = PSWToken(T_ARRAY, (char *)$2); }
+ | '{' Body '}'
+ { $$ = PSWToken(T_PROC, (char *)$2); }
+ ;
diff --git a/nx-X11/config/pswrap/pswpriv.h b/nx-X11/config/pswrap/pswpriv.h
new file mode 100644
index 000000000..18f1cb97b
--- /dev/null
+++ b/nx-X11/config/pswrap/pswpriv.h
@@ -0,0 +1,177 @@
+/*
+ * pswpriv.h
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+/* $XFree86: xc/config/pswrap/pswpriv.h,v 1.6 2000/06/07 21:58:25 tsi Exp $ */
+
+#ifndef PSWPRIV_H
+#define PSWPRIV_H
+
+#include <stdio.h>
+
+#include "pswtypes.h"
+#include "psw.h"
+
+/********************/
+/* Types */
+/********************/
+
+typedef struct _t_ItemRec *Item;
+/* Forward type designator */
+
+typedef struct {
+ boolean constant;
+ int val; /* valid if constant */
+ char *name; /* valid if not constant */
+ } SubscriptRec, *Subscript, ScaleRec, *Scale;
+
+typedef int Type;
+
+typedef struct _t_ItemRec { /* see above */
+ struct _t_ItemRec *next;
+ char *name;
+ boolean starred, subscripted, scaled;
+ Subscript subscript; /* valid if subscripted */
+ Scale scale;
+
+ /* the fields below are filled in by PSWHeader */
+ boolean isoutput; /* true if this is an output parameter */
+ long int tag; /* valid if output is true; the index of
+ this output parameter. starting from 0. */
+ Type type; /* copied from parent Arg */
+ int sourceLine;
+ } ItemRec;
+
+typedef Item Items;
+
+typedef struct _t_ArgRec {
+ struct _t_ArgRec *next;
+ Type type;
+ Items items;
+ } ArgRec, *Arg;
+
+typedef Arg Args;
+
+typedef struct {
+ boolean isStatic;
+ char *name;
+ Args inArgs, outArgs;
+ } HeaderRec, *Header;
+
+typedef struct {
+ long cnst;
+ char *var;
+ } Adr, *PAdr;
+
+typedef struct _t_TokenRec {
+ struct _t_TokenRec *next;
+ Type type;
+ Adr adr; /* of this token in the binary object sequence. */
+ char *val; /* loopholed */
+ int tokenIndex;
+ boolean wellKnownName; /* valid if type is T_NAME or T_LITNAME */
+ int sourceLine;
+ Item namedFormal;
+ /* non-NIL if this token is a reference to a formal.
+ (T_STRING, T_HEXSTRING, T_NAME, and T_LITNAME) */
+ Adr body;
+ /* Meaning depends on the token type, as follows:
+ simple => unused
+ array or proc => adr of body in binobjseq
+ string or hexstring => adr of body in binobjseq
+ name or litname => adr of namestring or array in binobjseq (named arg)
+ or cnst = the nametag (well-known name)
+ or cnst = 0 (name index filled in at runtime)
+ subscripted => index for element
+ */
+} TokenRec, *Token;
+
+typedef Token Tokens;
+
+typedef Tokens Body;
+
+typedef struct _t_TokenListRec {
+ struct _t_TokenListRec *next;
+ Token token;
+ } TokenListRec, *TokenList;
+
+extern FILE *header;
+extern boolean noUserNames; /* -n flag */
+extern char *currentPSWName;
+extern char *hfile;
+extern char *ifile; /* input file name for error messages */
+extern char *ofile;
+extern char *prog;
+extern char *special_h; /* -f option */
+extern char *string_temp; /* buffer of that size for scanning strings */
+extern char headid[];
+extern int bigFile;
+extern int doANSI; /* -a flag */
+extern int maxstring; /* max PS string length to scan (-s) */
+extern int lexdebug; /* debug flag for lexer */
+extern int errorCount; /* non-fatal errs */
+extern int outlineno; /* line number in output file */
+extern int pad; /* -p flag */
+extern int reentrant;
+extern int reportedPSWName;
+extern int yylineno; /* current line number in pswrap source file */
+
+/* lexer.l */
+extern int yylex(void);
+extern void stringerr(int); /* report string overflow */
+
+/* psw.c */
+extern void EmitPrototype(Header);
+extern void EmitBodyHeader(Header);
+extern void EmitBody(Tokens, Header);
+extern void FreeBody(Body);
+
+/* pswfile.c */
+extern void FinishHFile(void);
+extern void InitHFile(void);
+extern void InitOFile(void);
+
+/* pswparser.y */
+extern int yyparse (void);
+
+/* systemnames.c */
+extern void InitWellKnownPSNames(void);
+
+/* yyerror.c */
+extern void ErrIntro(int);
+extern void yyerror(char *);
+
+#endif /* PSWPRIV_H */
diff --git a/nx-X11/config/pswrap/pswrap.man b/nx-X11/config/pswrap/pswrap.man
new file mode 100644
index 000000000..17d7f05f7
--- /dev/null
+++ b/nx-X11/config/pswrap/pswrap.man
@@ -0,0 +1,141 @@
+.\" Id: pswrap.man,v 6.1 1994/05/18 23:21:11 asente Exp $
+.na
+.nh
+.TH PSWRAP 1 "4 Apr 1994" "Adobe Systems"
+.SH NAME
+pswrap \- creates C procedures from segments of PostScript language code
+
+.SH SYNOPSIS
+.B pswrap
+[
+.B \-apr
+] [
+.B \-o
+.I outputCfile
+] [
+.B \-h
+.I outputHfile
+] [
+.B \-s
+.I maxstring
+]
+.I inputfile
+
+.SH DESCRIPTION
+.LP
+.B pswrap
+reads input from
+.I inputfile
+and creates C-callable procedures, known as wraps, that send PostScript
+language code to the PostScript interpreter.
+.I inputfile
+contains segments of PostScript language code wrapped with a C-like
+procedure syntax.
+.LP
+Wraps are the most efficient way for an application to communicate with the
+PostScript interpreter. For complete documentation of
+.B pswrap
+and the language it accepts, see "pswrap Reference Manual"
+in \fIProgramming the Display PostScript System with X.\fR
+.LP
+
+.SH OPTIONS
+.LP
+.TP
+.I inputfile
+A file that contains one or more wrap definitions.
+.B pswrap
+transforms the definitions in
+.I inputfile
+into C procedures. If no input file is specified, the standard
+input (which can be redirected from a file or pipe) is used. The input file
+can include text other than wrap definitions.
+.B pswrap
+converts wrap definitions to C procedures and passes the other text
+through unchanged. Therefore, it is possible to intersperse C-language
+source code with wrap definitions in the input file.
+.RS
+.LP
+.I Note:
+Although C code is allowed in a pswrap input file, it is not allowed
+within a wrap body. In particular, no CPP macros (for example, #define) are
+allowed inside a wrap.
+.RE
+.TP
+.B \-a
+Generates ANSI C procedure prototypes for procedure definitions in
+.I outputCfile
+and, optionally,
+.I outputHfile.
+The
+.B \-a
+option allows compilers that recognize the
+ANSI C standard to do more complete type checking of parameters. The
+.B \-a
+option also causes
+.B pswrap
+to generate const declarations.
+.RS
+.LP
+.I Note:
+ANSI C procedure prototype syntax is not recognized by most non-ANSI C
+compilers, including many compilers based on the Portable C Compiler. Use the
+.B \-a
+option only in conjunction with a compiler that conforms to the ANSI C Standard.
+.RE
+.TP
+.BI \-h " outputHFile"
+Generates a header file that contains extern declarations for non-static
+wraps. This file can be used in #include statements in modules that use
+wraps. If the
+.B \-a
+option is specified, the declarations in the header file
+are ANSI C procedure prototypes. If the
+.B \-h
+option is omitted, a header file is not produced.
+.TP
+.BI \-o " outputCFile"
+Specifies the file to which the generated wraps and passed-through text are
+written. If omitted, the standard output is used. If the
+.B \-a
+option is also specified, the procedure definitions generated by
+.B pswrap
+are in ANSI C procedure prototype syntax.
+.TP
+.B \-p
+Specifies that strings passed by wraps are padded so that each data object
+begins on a long-word (4-byte) boundary. This option allows wraps to run on
+architectures that restrict data alignment to 4-byte boundaries and
+improves performance on some other architectures.
+.TP
+.B \-r
+Generates reentrant code for wraps shared by more than one process (as in
+shared libraries). Reentrant code can be called recursively or by more than
+one thread. The
+.B \-r
+option causes
+.B pswrap
+to generate extra code, so use it only when necessary.
+.TP
+.BI \-s " maxstring"
+Sets the maximum allowable length of a PostScript string object or
+hexadecimal string object in the wrap body input. A syntax error is reported if a
+string is not terminated with ) or > within
+.I maxstring
+characters.
+.I maxstring
+cannot be set lower than 80; the default is 200.
+
+.SH SEE ALSO
+\fIProgramming the Display PostScript System with X\fR
+(Addison-Wesley Publishing Company, Inc., 1993).
+
+.SH AUTHOR
+Adobe Systems Incorporated
+
+.SH NOTES
+PostScript and Display PostScript are trademarks
+of Adobe Systems Incorporated which may be registered
+in certain jurisdictions.
+.PP
+Copyright (c) 1988-1994 Adobe Systems Incorporated. All rights reserved.
diff --git a/nx-X11/config/pswrap/pswsemantics.c b/nx-X11/config/pswrap/pswsemantics.c
new file mode 100644
index 000000000..caaff800e
--- /dev/null
+++ b/nx-X11/config/pswrap/pswsemantics.c
@@ -0,0 +1,551 @@
+/*
+ * pswsemantics.c
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+
+/***********/
+/* Imports */
+/***********/
+
+#include <stdlib.h>
+#include <stdio.h>
+
+#ifdef XENVIRONMENT
+#include <X11/Xos.h>
+#else
+#include <string.h>
+#endif
+
+#include "pswdict.h"
+#include "pswpriv.h"
+#include "pswsemantics.h"
+
+/***********************/
+/* Module-wide globals */
+/***********************/
+
+char *currentPSWName = NULL;
+int reportedPSWName = 0;
+
+static PSWDict currentDict = NULL;
+
+
+/*************************************************/
+/* Procedures called by the parser's annotations */
+/*************************************************/
+
+static boolean IsCharType(Type t)
+{
+ return (t == T_CHAR || t == T_UCHAR);
+}
+
+static boolean IsNumStrType(Type t)
+{
+ return (t == T_NUMSTR
+ || t == T_FLOATNUMSTR
+ || t == T_LONGNUMSTR
+ || t == T_SHORTNUMSTR);
+}
+
+void PSWName(char *s)
+{
+ currentPSWName = psw_malloc(strlen(s)+1);
+ strcpy(currentPSWName, s);
+ reportedPSWName = 0;
+}
+
+ /* Generate the code for this wrap now */
+void FinalizePSWrapDef(Header hdr, Body body)
+{
+ if (header && ! hdr->isStatic) EmitPrototype(hdr);
+
+ printf("#line %d \"%s\"\n", ++outlineno, ofile);
+ EmitBodyHeader(hdr);
+
+ printf("{\n"); outlineno++;
+ EmitBody(body, hdr);
+ printf("}\n"); outlineno++;
+ printf("#line %d \"%s\"\n", yylineno, ifile); outlineno++;
+
+ /* release storage for this wrap */
+ /* Omit if you have lots of memory and want pswrap lean and mean */
+ if (bigFile) {
+ register Arg arg, nextarg; register Item item, nextitem;
+ for(arg = hdr->inArgs; arg; arg = nextarg) {
+ nextarg = arg->next;
+ for(item = arg->items; item; item = nextitem) {
+ nextitem = item->next;
+ if (item->subscripted) {
+ if (!item->subscript->constant) free(item->subscript->name);
+ free(item->subscript);
+ if(item->scaled) {
+ if (!item->scale->constant) free(item->scale->name);
+ free(item->scale);
+ }
+ }
+ free(item->name); free(item);
+ }
+ free(arg);
+ }
+ for(arg = hdr->outArgs; arg; arg = nextarg) {
+ nextarg = arg->next;
+ for(item = arg->items; item; item = nextitem) {
+ nextitem = item->next;
+ if (item->subscripted) {
+ if (!item->subscript->constant) free(item->subscript->name);
+ free(item->subscript);
+ }
+ free(item->name); free(item);
+ }
+ free(arg);
+ }
+ free(hdr->name); free(hdr);
+ FreeBody(body);
+ }
+
+ DestroyPSWDict(currentDict);
+ currentDict = NULL;
+ currentPSWName = NULL;
+ reportedPSWName = 0;
+}
+
+ /* Complete construction of the Header tree and make some semantic checks */
+Header PSWHeader(boolean isStatic, Args inArgs, Args outArgs)
+{
+ char *name = currentPSWName;
+ register Arg arg, prevArg;
+ register Item item, prevItem;
+ int nextTag = 0;
+
+ Header hdr = (Header)psw_calloc(sizeof(HeaderRec), 1);
+ hdr->isStatic = isStatic;
+ hdr->name = name;
+
+ currentDict = CreatePSWDict(511);
+
+ prevArg = NULL;
+ for (arg = inArgs; arg; arg = arg->next) { /* foreach input arg */
+ prevItem = NULL;
+ for (item = arg->items; item; item = item->next) {
+ if (IsCharType(arg->type)
+ && !(item->starred || item->subscripted)) {
+ ErrIntro(item->sourceLine);
+ fprintf(stderr,
+ "char input parameter %s must be starred or subscripted\n",
+ item->name);
+ /* remove item from list */
+ if (prevItem) {prevItem->next = item->next;}
+ else if (item == arg->items) {arg->items = item->next;};
+ /* free(item); XXX? */
+ continue;
+ }
+ if(item->scaled && !IsNumStrType(arg->type)) {
+ ErrIntro(item->sourceLine);
+ fprintf(stderr,"only numstring parameters may be scaled\n");
+ }
+ if (IsNumStrType(arg->type)
+ && (item->starred || !item->subscripted)) {
+ ErrIntro(item->sourceLine);
+ fprintf(stderr,
+ "numstring parameter %s may only be subscripted\n",
+ item->name);
+ /* remove item from list */
+ if (prevItem) {prevItem->next = item->next;}
+ else if (item == arg->items) {arg->items = item->next;};
+ /* free(item); XXX? */
+ continue;
+ }
+ if (arg->type != T_CONTEXT) {
+ if (PSWDictLookup(currentDict, item->name) != -1) {
+ ErrIntro(item->sourceLine);
+ fprintf(stderr,"parameter %s reused\n", item->name);
+ if (prevItem) {prevItem->next = item->next;}
+ else if (item == arg->items) {arg->items = item->next;};
+ /* free this ? */
+ continue;
+ }
+ PSWDictEnter(currentDict, item->name, (PSWDictValue) item);
+ item->isoutput = false;
+ item->type = arg->type;
+ prevItem = item;
+ }
+ }
+ if (arg->items == NULL) {
+ if (prevArg) { prevArg->next = arg->next;}
+ else if (arg == inArgs) {inArgs = arg->next;}
+ continue;
+ }
+ prevArg = arg;
+ }
+
+ prevArg = NULL;
+ for (arg = outArgs; arg; arg = arg->next) { /* foreach output arg */
+ prevItem = NULL;
+ for (item = arg->items; item; item = item->next) {
+ if (arg->type == T_USEROBJECT) {
+ ErrIntro(item->sourceLine);
+ fprintf(stderr,"output parameter %s can not be of type userobject\n",
+ item->name);
+ /* remove item from list */
+ if (prevItem) {prevItem->next = item->next;}
+ else if (item == arg->items) {arg->items = item->next;};
+ /* free(item); XXX */
+ continue;
+ }
+ if (arg->type == T_NUMSTR || arg->type == T_FLOATNUMSTR
+ || arg->type == T_LONGNUMSTR || arg->type == T_SHORTNUMSTR) {
+ ErrIntro(item->sourceLine);
+ fprintf(stderr,"output parameter %s can not be of type numstring\n",
+ item->name);
+ /* remove item from list */
+ if (prevItem) {prevItem->next = item->next;}
+ else if (item == arg->items) {arg->items = item->next;};
+ /* free(item); XXX */
+ continue;
+ }
+ if (!(item->starred || item->subscripted)) {
+ ErrIntro(item->sourceLine);
+ fprintf(stderr,"output parameter %s must be starred or subscripted\n",
+ item->name);
+ /* remove item from list */
+ if (prevItem) {prevItem->next = item->next;}
+ else if (item == arg->items) {arg->items = item->next;};
+ /* free(item); XXX */
+ continue;
+ }
+ if (PSWDictLookup(currentDict, item->name) != -1) {
+ ErrIntro(item->sourceLine);
+ fprintf(stderr,"parameter %s reused\n", item->name);
+ /* remove item from list */
+ if (prevItem) {prevItem->next = item->next;}
+ else if (item == arg->items) {arg->items = item->next;};
+ /* free the storage? XXX */
+ continue;
+ }
+ PSWDictEnter(currentDict, item->name, (PSWDictValue) item);
+ item->isoutput = true;
+ item->type = arg->type;
+ item->tag = nextTag++;
+ prevItem = item;
+ } /* inside for loop */
+ if (arg->items == NULL) {
+ if (prevArg) {
+ prevArg->next = arg->next;
+ } else if (arg == outArgs) {
+ outArgs = arg->next;
+ }
+ continue;
+ }
+ prevArg = arg;
+ } /* outside for loop */
+
+ /* now go looking for subscripts that name an input arg */
+ for (arg = inArgs; arg; arg = arg->next) { /* foreach input arg */
+ for (item = arg->items; item; item = item->next) {
+ if (item->subscripted && !item->subscript->constant) {
+ PSWDictValue v = PSWDictLookup(currentDict, item->subscript->name);
+ if (v != -1) {
+ Item subItem = (Item)v;
+ if (subItem->isoutput) {
+ ErrIntro(subItem->sourceLine);
+ fprintf(stderr,"output parameter %s used as a subscript\n",
+ subItem->name);
+ continue;
+ }
+ if (subItem->type != T_INT) {
+ ErrIntro(subItem->sourceLine);
+ fprintf(stderr,
+ "input parameter %s used as a subscript is not an int\n",
+ subItem->name);
+ continue;
+ }
+ }
+ }
+ }
+ }
+
+ for (arg = outArgs; arg; arg = arg->next) { /* foreach output arg */
+ for (item = arg->items; item; item = item->next) {
+ if (item->subscripted && !item->subscript->constant) {
+ PSWDictValue v = PSWDictLookup(currentDict, item->subscript->name);
+ if (v != -1) {
+ Item subItem = (Item)v;
+ if (subItem->isoutput) {
+ ErrIntro(subItem->sourceLine);
+ fprintf(stderr,"output parameter %s used as a subscript\n",
+ subItem->name);
+ continue;
+ }
+ if (subItem->type != T_INT) {
+ ErrIntro(subItem->sourceLine);
+ fprintf(stderr,
+ "input parameter %s used as a subscript is not an int\n",
+ subItem->name);
+ continue;
+ }
+ }
+ }
+ }
+ }
+
+ hdr->inArgs = inArgs;
+ hdr->outArgs = outArgs;
+
+ return hdr;
+}
+
+Token PSWToken(Type type, char *val)
+{
+ register Token token = (Token)psw_calloc(sizeof(TokenRec), 1);
+
+ token->next = NULL;
+ token->type = type;
+ token->val = val;
+ token->sourceLine = yylineno;
+
+ switch (type) {
+ case T_STRING:
+ case T_NAME:
+ case T_LITNAME: {
+ Item dictVal = (Item) PSWDictLookup(currentDict, (char *)val);
+ if ((PSWDictValue) dictVal != -1) {
+ if ((type != T_NAME) && (dictVal->isoutput)) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"output parameter %s used as %s\n",
+ dictVal->name,
+ (type == T_STRING) ? "string": "literal name");
+ } else
+ if ((type != T_NAME) && !IsCharType(dictVal->type)) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"non-char input parameter %s used as %s\n",
+ dictVal->name,
+ (type == T_STRING) ? "string": "literal name");
+ } else
+ token->namedFormal = dictVal; /* ok, so assign a value */
+ }
+ break;
+ }
+ default:
+ break;
+ }
+
+ return token;
+}
+
+Token PSWToken2(Type type, char *val, char *ind)
+{
+ register Token token = (Token)psw_calloc(sizeof(TokenRec), 1);
+ Item dictVal = (Item) PSWDictLookup(currentDict, val);
+ Item dvi;
+
+ token->next = NULL;
+ token->type = type;
+ token->val = val;
+ token->sourceLine = yylineno;
+
+ /* Assert(type == T_SUBSCRIPTED); */
+ if (((PSWDictValue) dictVal == -1) || (dictVal->isoutput)) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"%s not an input parameter\n", val);
+ }
+ else if (!dictVal->subscripted) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"%s not an array\n", val);
+ }
+ else if (dictVal->type >= T_NUMSTR) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"cannot subscript numstring %s\n", val);
+ }
+ else if (IsCharType(dictVal->type)) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"%s not a scalar type\n", val);
+ }
+ else {
+ dvi = (Item) PSWDictLookup(currentDict, (char *)ind);
+ if (((PSWDictValue) dvi != -1)
+ && ((dvi->isoutput) || IsCharType(dvi->type))) {
+ ErrIntro(yylineno);
+ fprintf(stderr,"%s wrong type\n",(char *) ind);
+ }
+ else {
+ token->body.var = (char *) ind;
+ token->namedFormal = dictVal; /* ok, so assign a value */
+ return token;
+ }
+ }
+
+ /* ERRORS fall through */
+ free(token);
+ return (PSWToken(T_NAME,val));
+}
+
+Arg PSWArg(Type type, Items items)
+{
+ register Arg arg = (Arg)psw_calloc(sizeof(ArgRec), 1);
+ arg->next = NULL;
+ arg->type = type;
+ arg->items = items;
+ return arg;
+}
+
+Item PSWItem(char *name)
+{
+ register Item item = (Item)psw_calloc(sizeof(ItemRec), 1);
+ item->next = NULL;
+ item->name = name;
+ item->sourceLine = yylineno;
+ return item;
+}
+
+Item PSWStarItem(char *name)
+{
+ register Item item = (Item)psw_calloc(sizeof(ItemRec), 1);
+ item->next = NULL;
+ item->name = name;
+ item->starred = true;
+ item->sourceLine = yylineno;
+ return item;
+}
+
+Item PSWSubscriptItem(char *name, Subscript subscript)
+{
+ register Item item = (Item)psw_calloc(sizeof(ItemRec), 1);
+ item->next = NULL;
+ item->name = name;
+ item->subscript = subscript;
+ item->subscripted = true;
+ item->sourceLine = yylineno;
+ return item;
+}
+
+Item PSWScaleItem(char *name, Subscript subscript, char *nameval, int val)
+{
+ Item item;
+ Scale scale = (Scale)psw_calloc(sizeof(ScaleRec), 1);
+ item = PSWSubscriptItem(name, subscript);
+ item->scaled = true;
+ if(nameval)
+ scale->name = nameval;
+ else {
+ scale->constant = true;
+ scale->val = val;
+ }
+ item->scale = scale;
+ return(item);
+}
+
+Subscript PSWNameSubscript(char *name)
+{
+ Subscript subscript = (Subscript)psw_calloc(sizeof(SubscriptRec), 1);
+ subscript->name = name;
+ return subscript;
+}
+
+Subscript PSWIntegerSubscript(int val)
+{
+ Subscript subscript = (Subscript)psw_calloc(sizeof(SubscriptRec), 1);
+ subscript->constant = true;
+ subscript->val = val;
+ return subscript;
+}
+
+Args ConsPSWArgs(Arg arg, Args args)
+{
+ arg->next = args;
+ return arg;
+}
+
+Tokens AppendPSWToken(Token token, Tokens tokens)
+{
+ register Token t;
+ static Token firstToken, lastToken; /* cache ptr to last */
+
+ if ((token->type == T_NAME) && (token->namedFormal)) {
+ if( token->namedFormal->isoutput) {
+ Token oldtoken;
+ char *pos = "printobject";
+ char *ss = psw_malloc(strlen(pos) + 1);
+ strcpy(ss, pos);
+ free(token->val);
+ oldtoken = token;
+ token = PSWToken(T_INT, (char *) token->namedFormal->tag);
+ free((char *)oldtoken);
+ token->next = PSWToken(T_NAME, ss);
+ } else
+ if (token->namedFormal->type == T_USEROBJECT) {
+ char *pos = "execuserobject";
+ char *ss = psw_malloc(strlen(pos) + 1);
+ strcpy(ss, pos);
+ token->next = PSWToken(T_NAME, ss);
+ }
+ }
+
+ if (tokens == NULL) {
+ firstToken = lastToken = token;
+ return token;
+ }
+
+ if (tokens != firstToken)
+ firstToken = lastToken = tokens;
+ for (t = lastToken; t->next; t = t->next);
+ lastToken = t->next = token;
+
+ return tokens;
+}
+
+Args AppendPSWArgs(Arg arg, Args args)
+{
+ register Arg a;
+ arg->next = NULL;
+ if (args == NULL) return arg;
+
+ for (a = args; a->next; a = a->next);
+
+ a->next = arg;
+ return args;
+}
+
+Items AppendPSWItems(Item item, Items items)
+{
+ register Item t;
+ item->next = NULL;
+ if (items == NULL) return item;
+
+ for (t = items; t->next; t = t->next);
+
+ t->next = item;
+ return items;
+}
diff --git a/nx-X11/config/pswrap/pswsemantics.h b/nx-X11/config/pswrap/pswsemantics.h
new file mode 100644
index 000000000..b2e0a1a41
--- /dev/null
+++ b/nx-X11/config/pswrap/pswsemantics.h
@@ -0,0 +1,63 @@
+/*
+ * pswsemantics.h
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+
+#ifndef PSWSEMANTICS_H
+#define PSWSEMANTICS_H
+
+#include "pswpriv.h"
+
+/* PROCEDURES */
+
+extern Arg PSWArg(Type, Items);
+extern Args AppendPSWArgs(Arg, Args);
+extern Args ConsPSWArgs(Arg, Args);
+extern Header PSWHeader(boolean, Args, Args);
+extern Item PSWItem(char *);
+extern Item PSWScaleItem(char *, Subscript, char *, int);
+extern Item PSWStarItem(char *);
+extern Item PSWSubscriptItem(char *, Subscript);
+extern Items AppendPSWItems(Item, Items);
+extern Subscript PSWIntegerSubscript(int);
+extern Subscript PSWNameSubscript(char *);
+extern Token PSWToken(Type, char *);
+extern Token PSWToken2(Type, char *, char *);
+extern Tokens AppendPSWToken(Token, Tokens);
+extern void FinalizePSWrapDef(Header, Body);
+extern void PSWName(char *);
+
+#endif /* PSWSEMANTICS_H */
diff --git a/nx-X11/config/pswrap/pswstring.c b/nx-X11/config/pswrap/pswstring.c
new file mode 100644
index 000000000..3a4d5084a
--- /dev/null
+++ b/nx-X11/config/pswrap/pswstring.c
@@ -0,0 +1,140 @@
+/*
+ * pswstring.c
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+/* $XFree86$ */
+
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+
+#include "pswpriv.h"
+#include "psw.h"
+
+#define outfil stdout
+#define MAX_PER_LINE 16
+
+int PSWStringLength(char *s)
+{
+ register char *c = s;
+ register int len = 0;
+
+ while (*c != '\0') { /* skip \\ and \ooo */
+ if (*c++ == '\\') {
+ if (*c++ != '\\') c += 2;
+ }
+ len++;
+ }
+ return (len);
+}
+
+void PSWOutputStringChars(char *s)
+{
+ register char *c = s;
+ register char b;
+ register int perline = 0;
+
+ while (*c != '\0') {
+ putc('\'',outfil);
+ switch (b = *c++) {
+ case '\\':
+ putc('\\',outfil);
+ fputc(b = *c++,outfil);
+ if (b != '\\') {putc(*c++,outfil);putc(*c++,outfil);}
+ break;
+ case '\'':
+ fprintf(outfil,"\\'");
+ break;
+ case '\"':
+ fprintf(outfil,"\\\"");
+ break;
+ case '\b':
+ fprintf(outfil,"\\b");
+ break;
+ case '\f':
+ fprintf(outfil,"\\f");
+ break;
+/* avoid funny interpretations of \n, \r by MPW */
+ case '\012':
+ fprintf(outfil,"\\012"); perline++;
+ break;
+ case '\015':
+ fprintf(outfil,"\\015"); perline++;
+ break;
+ case '\t':
+ fprintf(outfil,"\\t");
+ break;
+ default:
+ putc(b,outfil); perline--;
+ break;
+ }
+ putc('\'',outfil);
+ if (*c != '\0') {
+ if (++perline >= MAX_PER_LINE) {
+ fprintf(outfil,",\n ");
+ outlineno++;
+ }
+ else {putc(',',outfil);}
+ perline %= MAX_PER_LINE;
+ }
+ }
+}
+
+
+int PSWHexStringLength(char *s)
+{
+ return ((int) (strlen(s)+1)/2);
+}
+
+void PSWOutputHexStringChars(register char *s)
+{
+ register int perline = 0;
+ char tmp[3];
+
+ tmp[2] ='\0';
+ while ((tmp[0] = *s++)!= '\0') {
+ tmp[1] = *s ? *s++ : '\0';
+ fprintf(outfil,"0x%s",tmp);
+ if (*s != '\0') {
+ if (++perline >= MAX_PER_LINE) {
+ fprintf(outfil,",\n ");
+ outlineno++;
+ }
+ else {putc(',',outfil);}
+ perline %= MAX_PER_LINE;
+ }
+ } /* while */
+}
diff --git a/nx-X11/config/pswrap/pswtypes.h b/nx-X11/config/pswrap/pswtypes.h
new file mode 100644
index 000000000..cfa64f083
--- /dev/null
+++ b/nx-X11/config/pswrap/pswtypes.h
@@ -0,0 +1,49 @@
+/*
+ * pswtypes.h
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+/* $XFree86$ */
+
+#ifndef PSWTYPES_H
+#define PSWTYPES_H
+
+#include <stddef.h>
+
+#define false 0
+#define true 1
+typedef short boolean;
+
+#endif /* PSWTYPES_H */
diff --git a/nx-X11/config/pswrap/pswversion.h b/nx-X11/config/pswrap/pswversion.h
new file mode 100644
index 000000000..c28c3f174
--- /dev/null
+++ b/nx-X11/config/pswrap/pswversion.h
@@ -0,0 +1,42 @@
+/*
+ * pswversion.h
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+/* $XFree86$ */
+
+#define PSW_VERSION "V1.009 X11"
+
+#define PSW_OS "unix"
diff --git a/nx-X11/config/pswrap/sysname_gen.c b/nx-X11/config/pswrap/sysname_gen.c
new file mode 100644
index 000000000..10624aafc
--- /dev/null
+++ b/nx-X11/config/pswrap/sysname_gen.c
@@ -0,0 +1,429 @@
+/*
+ * sysnames_gen.c
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+
+ wellKnownPSNames = CreatePSWDict(431);
+
+ PSWDictEnter(wellKnownPSNames,"abs", 0);
+ PSWDictEnter(wellKnownPSNames,"add", 1);
+ PSWDictEnter(wellKnownPSNames,"aload", 2);
+ PSWDictEnter(wellKnownPSNames,"anchorsearch", 3);
+ PSWDictEnter(wellKnownPSNames,"and", 4);
+ PSWDictEnter(wellKnownPSNames,"arc", 5);
+ PSWDictEnter(wellKnownPSNames,"arcn", 6);
+ PSWDictEnter(wellKnownPSNames,"arct", 7);
+ PSWDictEnter(wellKnownPSNames,"arcto", 8);
+ PSWDictEnter(wellKnownPSNames,"array", 9);
+ PSWDictEnter(wellKnownPSNames,"ashow", 10);
+ PSWDictEnter(wellKnownPSNames,"astore", 11);
+ PSWDictEnter(wellKnownPSNames,"awidthshow", 12);
+ PSWDictEnter(wellKnownPSNames,"begin", 13);
+ PSWDictEnter(wellKnownPSNames,"bind", 14);
+ PSWDictEnter(wellKnownPSNames,"bitshift", 15);
+ PSWDictEnter(wellKnownPSNames,"ceiling", 16);
+ PSWDictEnter(wellKnownPSNames,"charpath", 17);
+ PSWDictEnter(wellKnownPSNames,"clear", 18);
+ PSWDictEnter(wellKnownPSNames,"cleartomark", 19);
+ PSWDictEnter(wellKnownPSNames,"clip", 20);
+ PSWDictEnter(wellKnownPSNames,"clippath", 21);
+ PSWDictEnter(wellKnownPSNames,"closepath", 22);
+ PSWDictEnter(wellKnownPSNames,"concat", 23);
+ PSWDictEnter(wellKnownPSNames,"concatmatrix", 24);
+ PSWDictEnter(wellKnownPSNames,"copy", 25);
+ PSWDictEnter(wellKnownPSNames,"count", 26);
+ PSWDictEnter(wellKnownPSNames,"counttomark", 27);
+ PSWDictEnter(wellKnownPSNames,"currentcmykcolor", 28);
+ PSWDictEnter(wellKnownPSNames,"currentdash", 29);
+ PSWDictEnter(wellKnownPSNames,"currentdict", 30);
+ PSWDictEnter(wellKnownPSNames,"currentfile", 31);
+ PSWDictEnter(wellKnownPSNames,"currentfont", 32);
+ PSWDictEnter(wellKnownPSNames,"currentgray", 33);
+ PSWDictEnter(wellKnownPSNames,"currentgstate", 34);
+ PSWDictEnter(wellKnownPSNames,"currenthsbcolor", 35);
+ PSWDictEnter(wellKnownPSNames,"currentlinecap", 36);
+ PSWDictEnter(wellKnownPSNames,"currentlinejoin", 37);
+ PSWDictEnter(wellKnownPSNames,"currentlinewidth", 38);
+ PSWDictEnter(wellKnownPSNames,"currentmatrix", 39);
+ PSWDictEnter(wellKnownPSNames,"currentpoint", 40);
+ PSWDictEnter(wellKnownPSNames,"currentrgbcolor", 41);
+ PSWDictEnter(wellKnownPSNames,"currentshared", 42);
+ PSWDictEnter(wellKnownPSNames,"curveto", 43);
+ PSWDictEnter(wellKnownPSNames,"cvi", 44);
+ PSWDictEnter(wellKnownPSNames,"cvlit", 45);
+ PSWDictEnter(wellKnownPSNames,"cvn", 46);
+ PSWDictEnter(wellKnownPSNames,"cvr", 47);
+ PSWDictEnter(wellKnownPSNames,"cvrs", 48);
+ PSWDictEnter(wellKnownPSNames,"cvs", 49);
+ PSWDictEnter(wellKnownPSNames,"cvx", 50);
+ PSWDictEnter(wellKnownPSNames,"def", 51);
+ PSWDictEnter(wellKnownPSNames,"defineusername", 52);
+ PSWDictEnter(wellKnownPSNames,"dict", 53);
+ PSWDictEnter(wellKnownPSNames,"div", 54);
+ PSWDictEnter(wellKnownPSNames,"dtransform", 55);
+ PSWDictEnter(wellKnownPSNames,"dup", 56);
+ PSWDictEnter(wellKnownPSNames,"end", 57);
+ PSWDictEnter(wellKnownPSNames,"eoclip", 58);
+ PSWDictEnter(wellKnownPSNames,"eofill", 59);
+ PSWDictEnter(wellKnownPSNames,"eoviewclip", 60);
+ PSWDictEnter(wellKnownPSNames,"eq", 61);
+ PSWDictEnter(wellKnownPSNames,"exch", 62);
+ PSWDictEnter(wellKnownPSNames,"exec", 63);
+ PSWDictEnter(wellKnownPSNames,"exit", 64);
+ PSWDictEnter(wellKnownPSNames,"file", 65);
+ PSWDictEnter(wellKnownPSNames,"fill", 66);
+ PSWDictEnter(wellKnownPSNames,"findfont", 67);
+ PSWDictEnter(wellKnownPSNames,"flattenpath", 68);
+ PSWDictEnter(wellKnownPSNames,"floor", 69);
+ PSWDictEnter(wellKnownPSNames,"flush", 70);
+ PSWDictEnter(wellKnownPSNames,"flushfile", 71);
+ PSWDictEnter(wellKnownPSNames,"for", 72);
+ PSWDictEnter(wellKnownPSNames,"forall", 73);
+ PSWDictEnter(wellKnownPSNames,"ge", 74);
+ PSWDictEnter(wellKnownPSNames,"get", 75);
+ PSWDictEnter(wellKnownPSNames,"getinterval", 76);
+ PSWDictEnter(wellKnownPSNames,"grestore", 77);
+ PSWDictEnter(wellKnownPSNames,"gsave", 78);
+ PSWDictEnter(wellKnownPSNames,"gstate", 79);
+ PSWDictEnter(wellKnownPSNames,"gt", 80);
+ PSWDictEnter(wellKnownPSNames,"identmatrix", 81);
+ PSWDictEnter(wellKnownPSNames,"idiv", 82);
+ PSWDictEnter(wellKnownPSNames,"idtransform", 83);
+ PSWDictEnter(wellKnownPSNames,"if", 84);
+ PSWDictEnter(wellKnownPSNames,"ifelse", 85);
+ PSWDictEnter(wellKnownPSNames,"image", 86);
+ PSWDictEnter(wellKnownPSNames,"imagemask", 87);
+ PSWDictEnter(wellKnownPSNames,"index", 88);
+ PSWDictEnter(wellKnownPSNames,"ineofill", 89);
+ PSWDictEnter(wellKnownPSNames,"infill", 90);
+ PSWDictEnter(wellKnownPSNames,"initviewclip", 91);
+ PSWDictEnter(wellKnownPSNames,"inueofill", 92);
+ PSWDictEnter(wellKnownPSNames,"inufill", 93);
+ PSWDictEnter(wellKnownPSNames,"invertmatrix", 94);
+ PSWDictEnter(wellKnownPSNames,"itransform", 95);
+ PSWDictEnter(wellKnownPSNames,"known", 96);
+ PSWDictEnter(wellKnownPSNames,"le", 97);
+ PSWDictEnter(wellKnownPSNames,"length", 98);
+ PSWDictEnter(wellKnownPSNames,"lineto", 99);
+ PSWDictEnter(wellKnownPSNames,"load", 100);
+ PSWDictEnter(wellKnownPSNames,"loop", 101);
+ PSWDictEnter(wellKnownPSNames,"lt", 102);
+ PSWDictEnter(wellKnownPSNames,"makefont", 103);
+ PSWDictEnter(wellKnownPSNames,"matrix", 104);
+ PSWDictEnter(wellKnownPSNames,"maxlength", 105);
+ PSWDictEnter(wellKnownPSNames,"mod", 106);
+ PSWDictEnter(wellKnownPSNames,"moveto", 107);
+ PSWDictEnter(wellKnownPSNames,"mul", 108);
+ PSWDictEnter(wellKnownPSNames,"ne", 109);
+ PSWDictEnter(wellKnownPSNames,"neg", 110);
+ PSWDictEnter(wellKnownPSNames,"newpath", 111);
+ PSWDictEnter(wellKnownPSNames,"not", 112);
+ PSWDictEnter(wellKnownPSNames,"null", 113);
+ PSWDictEnter(wellKnownPSNames,"or", 114);
+ PSWDictEnter(wellKnownPSNames,"pathbbox", 115);
+ PSWDictEnter(wellKnownPSNames,"pathforall", 116);
+ PSWDictEnter(wellKnownPSNames,"pop", 117);
+ PSWDictEnter(wellKnownPSNames,"print", 118);
+ PSWDictEnter(wellKnownPSNames,"printobject", 119);
+ PSWDictEnter(wellKnownPSNames,"put", 120);
+ PSWDictEnter(wellKnownPSNames,"putinterval", 121);
+ PSWDictEnter(wellKnownPSNames,"rcurveto", 122);
+ PSWDictEnter(wellKnownPSNames,"read", 123);
+ PSWDictEnter(wellKnownPSNames,"readhexstring", 124);
+ PSWDictEnter(wellKnownPSNames,"readline", 125);
+ PSWDictEnter(wellKnownPSNames,"readstring", 126);
+ PSWDictEnter(wellKnownPSNames,"rectclip", 127);
+ PSWDictEnter(wellKnownPSNames,"rectfill", 128);
+ PSWDictEnter(wellKnownPSNames,"rectstroke", 129);
+ PSWDictEnter(wellKnownPSNames,"rectviewclip", 130);
+ PSWDictEnter(wellKnownPSNames,"repeat", 131);
+ PSWDictEnter(wellKnownPSNames,"restore", 132);
+ PSWDictEnter(wellKnownPSNames,"rlineto", 133);
+ PSWDictEnter(wellKnownPSNames,"rmoveto", 134);
+ PSWDictEnter(wellKnownPSNames,"roll", 135);
+ PSWDictEnter(wellKnownPSNames,"rotate", 136);
+ PSWDictEnter(wellKnownPSNames,"round", 137);
+ PSWDictEnter(wellKnownPSNames,"save", 138);
+ PSWDictEnter(wellKnownPSNames,"scale", 139);
+ PSWDictEnter(wellKnownPSNames,"scalefont", 140);
+ PSWDictEnter(wellKnownPSNames,"search", 141);
+ PSWDictEnter(wellKnownPSNames,"selectfont", 142);
+ PSWDictEnter(wellKnownPSNames,"setbbox", 143);
+ PSWDictEnter(wellKnownPSNames,"setcachedevice", 144);
+ PSWDictEnter(wellKnownPSNames,"setcachedevice2", 145);
+ PSWDictEnter(wellKnownPSNames,"setcharwidth", 146);
+ PSWDictEnter(wellKnownPSNames,"setcmykcolor", 147);
+ PSWDictEnter(wellKnownPSNames,"setdash", 148);
+ PSWDictEnter(wellKnownPSNames,"setfont", 149);
+ PSWDictEnter(wellKnownPSNames,"setgray", 150);
+ PSWDictEnter(wellKnownPSNames,"setgstate", 151);
+ PSWDictEnter(wellKnownPSNames,"sethsbcolor", 152);
+ PSWDictEnter(wellKnownPSNames,"setlinecap", 153);
+ PSWDictEnter(wellKnownPSNames,"setlinejoin", 154);
+ PSWDictEnter(wellKnownPSNames,"setlinewidth", 155);
+ PSWDictEnter(wellKnownPSNames,"setmatrix", 156);
+ PSWDictEnter(wellKnownPSNames,"setrgbcolor", 157);
+ PSWDictEnter(wellKnownPSNames,"setshared", 158);
+ PSWDictEnter(wellKnownPSNames,"shareddict", 159);
+ PSWDictEnter(wellKnownPSNames,"show", 160);
+ PSWDictEnter(wellKnownPSNames,"showpage", 161);
+ PSWDictEnter(wellKnownPSNames,"stop", 162);
+ PSWDictEnter(wellKnownPSNames,"stopped", 163);
+ PSWDictEnter(wellKnownPSNames,"store", 164);
+ PSWDictEnter(wellKnownPSNames,"string", 165);
+ PSWDictEnter(wellKnownPSNames,"stringwidth", 166);
+ PSWDictEnter(wellKnownPSNames,"stroke", 167);
+ PSWDictEnter(wellKnownPSNames,"strokepath", 168);
+ PSWDictEnter(wellKnownPSNames,"sub", 169);
+ PSWDictEnter(wellKnownPSNames,"systemdict", 170);
+ PSWDictEnter(wellKnownPSNames,"token", 171);
+ PSWDictEnter(wellKnownPSNames,"transform", 172);
+ PSWDictEnter(wellKnownPSNames,"translate", 173);
+ PSWDictEnter(wellKnownPSNames,"truncate", 174);
+ PSWDictEnter(wellKnownPSNames,"type", 175);
+ PSWDictEnter(wellKnownPSNames,"uappend", 176);
+ PSWDictEnter(wellKnownPSNames,"ucache", 177);
+ PSWDictEnter(wellKnownPSNames,"ueofill", 178);
+ PSWDictEnter(wellKnownPSNames,"ufill", 179);
+ PSWDictEnter(wellKnownPSNames,"undef", 180);
+ PSWDictEnter(wellKnownPSNames,"upath", 181);
+ PSWDictEnter(wellKnownPSNames,"userdict", 182);
+ PSWDictEnter(wellKnownPSNames,"ustroke", 183);
+ PSWDictEnter(wellKnownPSNames,"viewclip", 184);
+ PSWDictEnter(wellKnownPSNames,"viewclippath", 185);
+ PSWDictEnter(wellKnownPSNames,"where", 186);
+ PSWDictEnter(wellKnownPSNames,"widthshow", 187);
+ PSWDictEnter(wellKnownPSNames,"write", 188);
+ PSWDictEnter(wellKnownPSNames,"writehexstring", 189);
+ PSWDictEnter(wellKnownPSNames,"writeobject", 190);
+ PSWDictEnter(wellKnownPSNames,"writestring", 191);
+ PSWDictEnter(wellKnownPSNames,"wtranslation", 192);
+ PSWDictEnter(wellKnownPSNames,"xor", 193);
+ PSWDictEnter(wellKnownPSNames,"xshow", 194);
+ PSWDictEnter(wellKnownPSNames,"xyshow", 195);
+ PSWDictEnter(wellKnownPSNames,"yshow", 196);
+ PSWDictEnter(wellKnownPSNames,"FontDirectory", 197);
+ PSWDictEnter(wellKnownPSNames,"SharedFontDirectory", 198);
+ PSWDictEnter(wellKnownPSNames,"Courier", 199);
+ PSWDictEnter(wellKnownPSNames,"Courier-Bold", 200);
+ PSWDictEnter(wellKnownPSNames,"Courier-BoldOblique", 201);
+ PSWDictEnter(wellKnownPSNames,"Courier-Oblique", 202);
+ PSWDictEnter(wellKnownPSNames,"Helvetica", 203);
+ PSWDictEnter(wellKnownPSNames,"Helvetica-Bold", 204);
+ PSWDictEnter(wellKnownPSNames,"Helvetica-BoldOblique", 205);
+ PSWDictEnter(wellKnownPSNames,"Helvetica-Oblique", 206);
+ PSWDictEnter(wellKnownPSNames,"Symbol", 207);
+ PSWDictEnter(wellKnownPSNames,"Times-Bold", 208);
+ PSWDictEnter(wellKnownPSNames,"Times-BoldItalic", 209);
+ PSWDictEnter(wellKnownPSNames,"Times-Italic", 210);
+ PSWDictEnter(wellKnownPSNames,"Times-Roman", 211);
+ PSWDictEnter(wellKnownPSNames,"execuserobject", 212);
+ PSWDictEnter(wellKnownPSNames,"=", 256);
+ PSWDictEnter(wellKnownPSNames,"==", 257);
+ PSWDictEnter(wellKnownPSNames,"ISOLatin1Encoding", 258);
+ PSWDictEnter(wellKnownPSNames,"StandardEncoding", 259);
+ PSWDictEnter(wellKnownPSNames,"[", 260);
+ PSWDictEnter(wellKnownPSNames,"]", 261);
+ PSWDictEnter(wellKnownPSNames,"atan", 262);
+ PSWDictEnter(wellKnownPSNames,"banddevice", 263);
+ PSWDictEnter(wellKnownPSNames,"bytesavailable", 264);
+ PSWDictEnter(wellKnownPSNames,"cachestatus", 265);
+ PSWDictEnter(wellKnownPSNames,"closefile", 266);
+ PSWDictEnter(wellKnownPSNames,"colorimage", 267);
+ PSWDictEnter(wellKnownPSNames,"condition", 268);
+ PSWDictEnter(wellKnownPSNames,"copypage", 269);
+ PSWDictEnter(wellKnownPSNames,"cos", 270);
+ PSWDictEnter(wellKnownPSNames,"countdictstack", 271);
+ PSWDictEnter(wellKnownPSNames,"countexecstack", 272);
+ PSWDictEnter(wellKnownPSNames,"cshow", 273);
+ PSWDictEnter(wellKnownPSNames,"currentblackgeneration", 274);
+ PSWDictEnter(wellKnownPSNames,"currentcacheparams", 275);
+ PSWDictEnter(wellKnownPSNames,"currentcolorscreen", 276);
+ PSWDictEnter(wellKnownPSNames,"currentcolortransfer", 277);
+ PSWDictEnter(wellKnownPSNames,"currentcontext", 278);
+ PSWDictEnter(wellKnownPSNames,"currentflat", 279);
+ PSWDictEnter(wellKnownPSNames,"currenthalftone", 280);
+ PSWDictEnter(wellKnownPSNames,"currenthalftonephase", 281);
+ PSWDictEnter(wellKnownPSNames,"currentmiterlimit", 282);
+ PSWDictEnter(wellKnownPSNames,"currentobjectformat", 283);
+ PSWDictEnter(wellKnownPSNames,"currentpacking", 284);
+ PSWDictEnter(wellKnownPSNames,"currentscreen", 285);
+ PSWDictEnter(wellKnownPSNames,"currentstrokeadjust", 286);
+ PSWDictEnter(wellKnownPSNames,"currenttransfer", 287);
+ PSWDictEnter(wellKnownPSNames,"currentundercolorremoval", 288);
+ PSWDictEnter(wellKnownPSNames,"defaultmatrix", 289);
+ PSWDictEnter(wellKnownPSNames,"definefont", 290);
+ PSWDictEnter(wellKnownPSNames,"deletefile", 291);
+ PSWDictEnter(wellKnownPSNames,"detach", 292);
+ PSWDictEnter(wellKnownPSNames,"deviceinfo", 293);
+ PSWDictEnter(wellKnownPSNames,"dictstack", 294);
+ PSWDictEnter(wellKnownPSNames,"echo", 295);
+ PSWDictEnter(wellKnownPSNames,"erasepage", 296);
+ PSWDictEnter(wellKnownPSNames,"errordict", 297);
+ PSWDictEnter(wellKnownPSNames,"execstack", 298);
+ PSWDictEnter(wellKnownPSNames,"executeonly", 299);
+ PSWDictEnter(wellKnownPSNames,"exp", 300);
+ PSWDictEnter(wellKnownPSNames,"false", 301);
+ PSWDictEnter(wellKnownPSNames,"filenameforall", 302);
+ PSWDictEnter(wellKnownPSNames,"fileposition", 303);
+ PSWDictEnter(wellKnownPSNames,"fork", 304);
+ PSWDictEnter(wellKnownPSNames,"framedevice", 305);
+ PSWDictEnter(wellKnownPSNames,"grestoreall", 306);
+ PSWDictEnter(wellKnownPSNames,"handleerror", 307);
+ PSWDictEnter(wellKnownPSNames,"initclip", 308);
+ PSWDictEnter(wellKnownPSNames,"initgraphics", 309);
+ PSWDictEnter(wellKnownPSNames,"initmatrix", 310);
+ PSWDictEnter(wellKnownPSNames,"instroke", 311);
+ PSWDictEnter(wellKnownPSNames,"inustroke", 312);
+ PSWDictEnter(wellKnownPSNames,"join", 313);
+ PSWDictEnter(wellKnownPSNames,"kshow", 314);
+ PSWDictEnter(wellKnownPSNames,"ln", 315);
+ PSWDictEnter(wellKnownPSNames,"lock", 316);
+ PSWDictEnter(wellKnownPSNames,"log", 317);
+ PSWDictEnter(wellKnownPSNames,"mark", 318);
+ PSWDictEnter(wellKnownPSNames,"monitor", 319);
+ PSWDictEnter(wellKnownPSNames,"noaccess", 320);
+ PSWDictEnter(wellKnownPSNames,"notify", 321);
+ PSWDictEnter(wellKnownPSNames,"nulldevice", 322);
+ PSWDictEnter(wellKnownPSNames,"packedarray", 323);
+ PSWDictEnter(wellKnownPSNames,"quit", 324);
+ PSWDictEnter(wellKnownPSNames,"rand", 325);
+ PSWDictEnter(wellKnownPSNames,"rcheck", 326);
+ PSWDictEnter(wellKnownPSNames,"readonly", 327);
+ PSWDictEnter(wellKnownPSNames,"realtime", 328);
+ PSWDictEnter(wellKnownPSNames,"renamefile", 329);
+ PSWDictEnter(wellKnownPSNames,"renderbands", 330);
+ PSWDictEnter(wellKnownPSNames,"resetfile", 331);
+ PSWDictEnter(wellKnownPSNames,"reversepath", 332);
+ PSWDictEnter(wellKnownPSNames,"rootfont", 333);
+ PSWDictEnter(wellKnownPSNames,"rrand", 334);
+ PSWDictEnter(wellKnownPSNames,"run", 335);
+ PSWDictEnter(wellKnownPSNames,"scheck", 336);
+ PSWDictEnter(wellKnownPSNames,"setblackgeneration", 337);
+ PSWDictEnter(wellKnownPSNames,"setcachelimit", 338);
+ PSWDictEnter(wellKnownPSNames,"setcacheparams", 339);
+ PSWDictEnter(wellKnownPSNames,"setcolorscreen", 340);
+ PSWDictEnter(wellKnownPSNames,"setcolortransfer", 341);
+ PSWDictEnter(wellKnownPSNames,"setfileposition", 342);
+ PSWDictEnter(wellKnownPSNames,"setflat", 343);
+ PSWDictEnter(wellKnownPSNames,"sethalftone", 344);
+ PSWDictEnter(wellKnownPSNames,"sethalftonephase", 345);
+ PSWDictEnter(wellKnownPSNames,"setmiterlimit", 346);
+ PSWDictEnter(wellKnownPSNames,"setobjectformat", 347);
+ PSWDictEnter(wellKnownPSNames,"setpacking", 348);
+ PSWDictEnter(wellKnownPSNames,"setscreen", 349);
+ PSWDictEnter(wellKnownPSNames,"setstrokeadjust", 350);
+ PSWDictEnter(wellKnownPSNames,"settransfer", 351);
+ PSWDictEnter(wellKnownPSNames,"setucacheparams", 352);
+ PSWDictEnter(wellKnownPSNames,"setundercolorremoval", 353);
+ PSWDictEnter(wellKnownPSNames,"sin", 354);
+ PSWDictEnter(wellKnownPSNames,"sqrt", 355);
+ PSWDictEnter(wellKnownPSNames,"srand", 356);
+ PSWDictEnter(wellKnownPSNames,"stack", 357);
+ PSWDictEnter(wellKnownPSNames,"status", 358);
+ PSWDictEnter(wellKnownPSNames,"statusdict", 359);
+ PSWDictEnter(wellKnownPSNames,"true", 360);
+ PSWDictEnter(wellKnownPSNames,"ucachestatus", 361);
+ PSWDictEnter(wellKnownPSNames,"undefinefont", 362);
+ PSWDictEnter(wellKnownPSNames,"usertime", 363);
+ PSWDictEnter(wellKnownPSNames,"ustrokepath", 364);
+ PSWDictEnter(wellKnownPSNames,"version", 365);
+ PSWDictEnter(wellKnownPSNames,"vmreclaim", 366);
+ PSWDictEnter(wellKnownPSNames,"vmstatus", 367);
+ PSWDictEnter(wellKnownPSNames,"wait", 368);
+ PSWDictEnter(wellKnownPSNames,"wcheck", 369);
+ PSWDictEnter(wellKnownPSNames,"xcheck", 370);
+ PSWDictEnter(wellKnownPSNames,"yield", 371);
+ PSWDictEnter(wellKnownPSNames,"defineuserobject", 372);
+ PSWDictEnter(wellKnownPSNames,"undefineuserobject", 373);
+ PSWDictEnter(wellKnownPSNames,"UserObjects", 374);
+ PSWDictEnter(wellKnownPSNames,"cleardictstack", 375);
+ PSWDictEnter(wellKnownPSNames,"A", 376);
+ PSWDictEnter(wellKnownPSNames,"B", 377);
+ PSWDictEnter(wellKnownPSNames,"C", 378);
+ PSWDictEnter(wellKnownPSNames,"D", 379);
+ PSWDictEnter(wellKnownPSNames,"E", 380);
+ PSWDictEnter(wellKnownPSNames,"F", 381);
+ PSWDictEnter(wellKnownPSNames,"G", 382);
+ PSWDictEnter(wellKnownPSNames,"H", 383);
+ PSWDictEnter(wellKnownPSNames,"I", 384);
+ PSWDictEnter(wellKnownPSNames,"J", 385);
+ PSWDictEnter(wellKnownPSNames,"K", 386);
+ PSWDictEnter(wellKnownPSNames,"L", 387);
+ PSWDictEnter(wellKnownPSNames,"M", 388);
+ PSWDictEnter(wellKnownPSNames,"N", 389);
+ PSWDictEnter(wellKnownPSNames,"O", 390);
+ PSWDictEnter(wellKnownPSNames,"P", 391);
+ PSWDictEnter(wellKnownPSNames,"Q", 392);
+ PSWDictEnter(wellKnownPSNames,"R", 393);
+ PSWDictEnter(wellKnownPSNames,"S", 394);
+ PSWDictEnter(wellKnownPSNames,"T", 395);
+ PSWDictEnter(wellKnownPSNames,"U", 396);
+ PSWDictEnter(wellKnownPSNames,"V", 397);
+ PSWDictEnter(wellKnownPSNames,"W", 398);
+ PSWDictEnter(wellKnownPSNames,"X", 399);
+ PSWDictEnter(wellKnownPSNames,"Y", 400);
+ PSWDictEnter(wellKnownPSNames,"Z", 401);
+ PSWDictEnter(wellKnownPSNames,"a", 402);
+ PSWDictEnter(wellKnownPSNames,"b", 403);
+ PSWDictEnter(wellKnownPSNames,"c", 404);
+ PSWDictEnter(wellKnownPSNames,"d", 405);
+ PSWDictEnter(wellKnownPSNames,"e", 406);
+ PSWDictEnter(wellKnownPSNames,"f", 407);
+ PSWDictEnter(wellKnownPSNames,"g", 408);
+ PSWDictEnter(wellKnownPSNames,"h", 409);
+ PSWDictEnter(wellKnownPSNames,"i", 410);
+ PSWDictEnter(wellKnownPSNames,"j", 411);
+ PSWDictEnter(wellKnownPSNames,"k", 412);
+ PSWDictEnter(wellKnownPSNames,"l", 413);
+ PSWDictEnter(wellKnownPSNames,"m", 414);
+ PSWDictEnter(wellKnownPSNames,"n", 415);
+ PSWDictEnter(wellKnownPSNames,"o", 416);
+ PSWDictEnter(wellKnownPSNames,"p", 417);
+ PSWDictEnter(wellKnownPSNames,"q", 418);
+ PSWDictEnter(wellKnownPSNames,"r", 419);
+ PSWDictEnter(wellKnownPSNames,"s", 420);
+ PSWDictEnter(wellKnownPSNames,"t", 421);
+ PSWDictEnter(wellKnownPSNames,"u", 422);
+ PSWDictEnter(wellKnownPSNames,"v", 423);
+ PSWDictEnter(wellKnownPSNames,"w", 424);
+ PSWDictEnter(wellKnownPSNames,"x", 425);
+ PSWDictEnter(wellKnownPSNames,"y", 426);
+ PSWDictEnter(wellKnownPSNames,"z", 427);
+ PSWDictEnter(wellKnownPSNames,"setvmthreshold", 428);
+ PSWDictEnter(wellKnownPSNames,"<<", 429);
+ PSWDictEnter(wellKnownPSNames,">>", 430);
+
diff --git a/nx-X11/config/pswrap/systemnames.c b/nx-X11/config/pswrap/systemnames.c
new file mode 100644
index 000000000..af1dbb83a
--- /dev/null
+++ b/nx-X11/config/pswrap/systemnames.c
@@ -0,0 +1,47 @@
+/*
+ * systemnames.c
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+
+#include "pswpriv.h"
+#include "pswdict.h"
+
+PSWDict wellKnownPSNames;
+
+void InitWellKnownPSNames(void)
+{
+#include "sysname_gen.c"
+}
diff --git a/nx-X11/config/pswrap/yyerror.c b/nx-X11/config/pswrap/yyerror.c
new file mode 100644
index 000000000..56044b4b4
--- /dev/null
+++ b/nx-X11/config/pswrap/yyerror.c
@@ -0,0 +1,77 @@
+/*
+ * yyerror.c
+ *
+ * (c) Copyright 1988-1994 Adobe Systems Incorporated.
+ * All rights reserved.
+ *
+ * Permission to use, copy, modify, distribute, and sublicense this software
+ * and its documentation for any purpose and without fee is hereby granted,
+ * provided that the above copyright notices appear in all copies and that
+ * both those copyright notices and this permission notice appear in
+ * supporting documentation and that the name of Adobe Systems Incorporated
+ * not be used in advertising or publicity pertaining to distribution of the
+ * software without specific, written prior permission. No trademark license
+ * to use the Adobe trademarks is hereby granted. If the Adobe trademark
+ * "Display PostScript"(tm) is used to describe this software, its
+ * functionality or for any other purpose, such use shall be limited to a
+ * statement that this software works in conjunction with the Display
+ * PostScript system. Proper trademark attribution to reflect Adobe's
+ * ownership of the trademark shall be given whenever any such reference to
+ * the Display PostScript system is made.
+ *
+ * ADOBE MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR
+ * ANY PURPOSE. IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
+ * ADOBE DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
+ * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NON- INFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL ADOBE BE LIABLE
+ * TO YOU OR ANY OTHER PARTY FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE, STRICT LIABILITY OR ANY OTHER ACTION ARISING OUT OF OR IN
+ * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. ADOBE WILL NOT
+ * PROVIDE ANY TRAINING OR OTHER SUPPORT FOR THE SOFTWARE.
+ *
+ * Adobe, PostScript, and Display PostScript are trademarks of Adobe Systems
+ * Incorporated which may be registered in certain jurisdictions
+ *
+ * Author: Adobe Systems Incorporated
+ */
+
+#include <stdio.h>
+#include <ctype.h>
+
+#include "pswpriv.h"
+
+/* ErrIntro prints a standard intro for error messages;
+ * change it if your system uses something else. We have many options:
+ *
+ * to match Macintosh: #define FMT "File \"%s\"; Line %d # "
+ * to match BSD cc: #define FMT "\"%s\", line %d: "
+ * to match gcc: #define FMT "%s:%d: "
+ * to match Mips cc: #define FMT "pswrap: Error: %s, line %d: "
+ */
+
+
+#define INTRO "# In function %s -\n"
+
+#ifdef macintosh
+#define FMT "File \"%s\"; Line %d # "
+#else /* macintosh */
+#define FMT "\"%s\", line %d: "
+#endif /* macintosh */
+
+void ErrIntro(int line)
+{
+ if (! reportedPSWName && currentPSWName) {
+ reportedPSWName = 1;
+ fprintf(stderr,INTRO,currentPSWName);
+ }
+ fprintf(stderr,FMT,ifile,line);
+ errorCount++;
+}
+
+
+void yyerror(char *errmsg)
+{
+ ErrIntro(yylineno);
+ fprintf(stderr,"%s near text \"%s\"\n",errmsg,yytext);
+}
diff --git a/nx-X11/config/util/Imakefile b/nx-X11/config/util/Imakefile
new file mode 100644
index 000000000..016751d06
--- /dev/null
+++ b/nx-X11/config/util/Imakefile
@@ -0,0 +1,168 @@
+XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+
+
+
+XCOMM $XFree86: xc/config/util/Imakefile,v 3.49 2003/10/21 17:41:45 tsi Exp $
+
+CCMDEP_PROG = ccmakedep
+
+#ifdef ExportListGenSource
+EXPORTLISTGEN = exportlistgen
+#endif
+
+#if defined(Win32Architecture) && !defined(CrossCompiling)
+CMKDIRHIER = mkdirhier.exe
+#endif
+
+GCCMDEP_PROG = gccmakedep
+
+#if HasSymLinks
+#if CrossCompiling
+LNDIR_PROG = HostProgramTargetName(lndir)
+#else
+LNDIR_PROG = ProgramTargetName(lndir)
+#endif
+#endif
+
+#if CrossCompiling
+MAKESTRS_PROG = HostProgramTargetName(makestrs)
+REVPATH_PROG = HostProgramTargetName(revpath)
+#else
+MAKESTRS_PROG = ProgramTargetName(makestrs)
+REVPATH_PROG = ProgramTargetName(revpath)
+#endif
+
+#if BuildRman
+RMAN_PROG = HostProgramTargetName(rman)
+#endif
+
+PROGRAMS = $(RMAN_PROG) $(LNDIR_PROG) $(MAKESTRS_PROG) \
+ $(REVPATH_PROG) $(EXPORTLISTGEN) $(CMKDIRHIER)
+DEPLIBS =
+#ifndef Win32Architecture
+ EXTRA_LIBRARIES =
+#endif
+#ifdef LinuxArchitecture
+ PREPROCESSCMD_MKDEPEND = PreProcessCmd StandardCppDefines $(PROJECT_DEFINES)
+#else
+ PREPROCESSCMD_MKDEPEND = $(PREPROCESSCMD)
+#endif
+
+XCOMM Some compilers generate fatal errors if an -L directory does
+XCOMM not exist. Since BUILDLIBDIR may not exist yet suppress its use.
+ LDPRELIB =
+ LDPRELIBS =
+#if CrossCompiling
+ LDPOSTLIBS =
+ LDPOSTLIB =
+#endif
+
+all:: xmkmf mergelib $(CCMDEP_PROG) $(GCCMDEP_PROG) $(PROGRAMS)
+
+makedependonly:: $(CCMDEP_PROG) $(GCCMDEP_PROG)
+
+#if HasGcc
+GCCCMD = $(CC)
+#else
+GCCCMD = gcc
+#endif
+
+#if CrossCompiling
+includes:: HostProgramTargetName(makestrs)
+#else
+includes:: ProgramTargetName(makestrs)
+#endif
+
+#ifdef ExportListGenSource
+CppScriptTarget(exportlistgen,ExportListGenSource,-DCXXFILT=$(CXXFILT),)
+InstallNamedProg(exportlistgen,exportlistgen,$(BINDIR))
+#endif
+
+CppScriptTarget(xmkmf,xmkmf.cpp,-DCONFIGDIRSPEC='"'"-I$(CONFIGDIR)"'"',$(ICONFIGFILES))
+CppScriptTarget(ccmakedep,mdepend.cpp,-DPREPROC='"'"$(PREPROCESSCMD_MKDEPEND)"'"',$(ICONFIGFILES))
+CppScriptTarget(mergelib,mergelib.cpp,"-DARCMD=$(AR)" "-DRANLIB=$(RANLIB)",$(ICONFIGFILES))
+CppScriptTarget(gccmakedep,gccmdep.cpp,-DCCCMD='"'"$(GCCCMD)"'"' -DRMCMD='"'"$(RM)"'"' -DLNCMD='"'"$(LN)"'"' -DMVCMD='"'"$(MV)"'"',$(ICONFIGFILES))
+
+#ifndef OpenBSDArchitecture
+#if HasSymLinks
+#if CrossCompiling
+SimpleHostProgramTarget_2(lndir)
+#else
+AllTarget(lndir)
+SimpleProgramTarget_2(lndir)
+#endif
+#endif
+#endif
+
+#if defined(Win32Architecture) && !defined(CrossCompiling)
+AllTarget(ProgramTargetName(mkdirhier))
+SimpleProgramTarget_3(mkdirhier)
+#endif
+
+#if CrossCompiling
+AllTarget(HostProgramTargetName(makestrs))
+SimpleHostProgramTarget_1(makestrs)
+AllTarget(HostProgramTargetName(revpath))
+SimpleHostProgramTarget_4(revpath)
+#else
+AllTarget(ProgramTargetName(makestrs))
+SimpleProgramTarget_1(makestrs)
+AllTarget(ProgramTargetName(revpath))
+SimpleProgramTarget_4(revpath)
+#endif
+
+#if BuildRman
+rmanonly:: $(RMAN_PROG)
+
+VOLLIST="1:2:3:4:5:6:7:8:9:o:l:n:p"
+MANTITLEPRINTF="%s(%s) manual page"
+MANREFPRINTF="%s.%s.html"
+RMANVERSION="3.0.8+X.Org"
+#if CrossCompiling
+AllTarget(HostProgramTargetName(rman))
+SimpleHostProgramTarget_3(rman)
+#else
+AllTarget(ProgramTargetName(rman))
+SimpleProgramTarget_5(rman)
+#endif
+SpecialCObjectRule(rman,NullParameter,-DVOLLIST='$(VOLLIST)' -DMANTITLEPRINTF='$(MANTITLEPRINTF)' -DMANREFPRINTF='$(MANREFPRINTF)' -DPOLYGLOTMANVERSION='$(RMANVERSION)' -DXOrg)
+LinkSourceFile(rman.c,$(TOP)/extras/rman)
+LinkFile(rman.man,$(TOP)/extras/rman/rman.1)
+#endif
+
+InstallManPage(xmkmf,$(MANDIR))
+
+InstallNamedProg(xmkmf,xmkmf,$(BINDIR))
+InstallNamedProg(mkdirhier.sh,mkdirhier,$(BINDIR))
+InstallManPage(mkdirhier,$(MANDIR))
+InstallNamedProg(gccmakedep,gccmakedep,$(BINDIR))
+InstallManPage(gccmakedep,$(MANDIR))
+#if defined(QNX4Architecture) || defined(NTOArchitecture)
+InstallNamedProg(install.sh,install,$(BINDIR))
+#endif
+InstallDriverSDKNamedProg(mkdirhier.sh,mkdirhier.sh,$(DRIVERSDKDIR)/config/util)
+InstallDriverSDKNamedProg(gccmakedep,gccmakedep,$(DRIVERSDKDIR)/config/util)
+InstallNamedProg(mergelib,mergelib,$(BINDIR))
+InstallManPage(mergelib,$(MANDIR))
+InstallNamedProg(makeg.sh,makeg,$(BINDIR))
+InstallManPage(makeg,$(MANDIR))
+InstallNamedProg(cleanlinks.sh,cleanlinks,$(BINDIR))
+InstallManPage(cleanlinks,$(MANDIR))
+#if HasPerl
+InstallNamedProg(mkhtmlindex.pl,mkhtmlindex,$(BINDIR))
+#else
+InstallNamedProg(mkhtmlindex.sh,mkhtmlindex,$(BINDIR))
+#endif
+InstallManPage(mkhtmlindex,$(MANDIR))
+InstallNamedProg(ccmakedep,ccmakedep,$(BINDIR))
+InstallManPage(ccmakedep,$(MANDIR))
+InstallDriverSDKNamedProg(ccmakedep,ccmakedep,$(DRIVERSDKDIR)/config/util)
+#if SystemV || SystemV4
+InstallNamedProg(bsdinst.sh,bsdinst,$(BINDIR))
+InstallDriverSDKNamedProg(bsdinst.sh,bsdinst.sh,$(DRIVERSDKDIR)/config/util)
+#endif
+
+InstallDriverSDKNamedProg(revpath,revpath,$(DRIVERSDKDIR)/config/util)
+#ifdef OS2Architecture
+InstallNamedProg(makedef.cmd,makedef.cmd,$(BINDIR))
+#endif
diff --git a/nx-X11/config/util/Makefile.ini b/nx-X11/config/util/Makefile.ini
new file mode 100644
index 000000000..17d8d74d6
--- /dev/null
+++ b/nx-X11/config/util/Makefile.ini
@@ -0,0 +1,20 @@
+# $Xorg: Makefile.ini,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+#
+# A way to get lndir built the first time, before you have imake up
+# and running. You may well have to specify OSFLAGS=-D<something> to
+# get it to compile, which values are embedded in config files. What
+# you would pass as BOOTSTRAPCFLAGS might work.
+
+OSFLAGS =
+CC = cc
+CDEBUGFLAGS = -O
+INCLUDES = -I.
+CFLAGS = $(OSFLAGS) $(CDEBUGFLAGS) $(INCLUDES)
+SHELL = /bin/sh
+RM = rm -f
+LN = ln -s
+
+lndir:
+ $(LN) ../../include X11
+ $(CC) -o lndir $(CFLAGS) lndir.c
+ $(RM) X11
diff --git a/nx-X11/config/util/aminstall.sh b/nx-X11/config/util/aminstall.sh
new file mode 100644
index 000000000..19a8a4d5a
--- /dev/null
+++ b/nx-X11/config/util/aminstall.sh
@@ -0,0 +1,74 @@
+#!/bin/sh
+# $Xorg: aminstall.sh,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+# aminstall - transfer cross-compiled files to system running Amoeba.
+# Usage: aminstall binary-directory [-s stksz] unix-source amoeba-dest
+
+#
+# Default soap mask for files
+#
+SPMASK=0xFF:2:2
+export SPMASK
+PROG=$0
+USAGE="Usage: $PROG binary-directory unix-source amoeba-dest"
+
+#
+# Argument check
+#
+case $# in
+3|5) ;;
+*) echo $USAGE >&2
+ exit 1
+ ;;
+esac
+
+bindir=$1
+stksz=
+case $2 in
+-s) if [ $# -ne 5 ]
+ then
+ echo $USAGE >&2
+ exit 1
+ fi
+ stksz="-s $3"
+ shift
+ shift
+ ;;
+esac
+
+unxfile=$2
+dest=$3
+
+#
+# Change /public .... into /super (just for installation)
+#
+stripped=`echo $dest | sed 's:^/public::'`
+if [ X$dest != X$stripped ]; then
+ dest=/super$stripped
+fi
+
+#
+# If the file already exists, then delete it
+#
+INFO=`$bindir/std_info $dest 2>&1`
+case $INFO in
+*"not found"*) ;;
+*failed*) ;;
+*bytes*) $bindir/del -f $dest
+ ;;
+/??????) echo $PROG: cannot install over directory 1>&2
+ exit
+ ;;
+*) $bindir/del -d $dest
+ ;;
+esac
+
+#
+# Transfer the file to Amoeba
+#
+$bindir/../bin.scripts/ainstall $stksz $unxfile $dest > /dev/null 2>&1
+if [ $? -ne 0 ]
+then
+ echo "This is not binary - using tob"
+ $bindir/tob $unxfile $dest
+fi
+
diff --git a/nx-X11/config/util/bsdinst.sh b/nx-X11/config/util/bsdinst.sh
new file mode 100644
index 000000000..fc2673c13
--- /dev/null
+++ b/nx-X11/config/util/bsdinst.sh
@@ -0,0 +1,168 @@
+#!/bin/sh
+
+# $XFree86: xc/config/util/bsdinst.sh,v 3.3 1996/12/23 05:56:13 dawes Exp $
+#
+# This accepts bsd-style install arguments and makes the appropriate calls
+# to the System V install.
+# $Xorg: bsdinst.sh,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+
+flags=""
+dst=""
+src=""
+dostrip=""
+owner=""
+group=""
+mode=""
+bargs=$*
+
+while [ x$1 != x ]; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -m) flags="$flags $1 $2 "
+ mode="$2"
+ shift
+ shift
+ continue;;
+
+ -o) flags="$flags -u $2 "
+ owner="$2"
+ shift
+ shift
+ continue;;
+
+ -g) flags="$flags $1 $2 "
+ group="$2"
+ shift
+ shift
+ continue;;
+
+ -s) dostrip="strip"
+ shift
+ continue;;
+
+ *) if [ x$src = x ]
+ then
+ src=$1
+ else
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x$src = x ]
+then
+ echo "$0: no input file specified"
+ exit 1
+fi
+
+if [ x$dst = x ]
+then
+ echo "$0: no destination specified"
+ exit 1
+fi
+
+if [ -x /usr/ucb/install ]
+then
+ if [ -d "$dst" ]
+ then
+ dst=$dst/`basename "$src"`
+ fi
+ case "$group" in
+ "")
+ bargs="-g other $bargs"
+ ;;
+ esac
+ /usr/ucb/install $bargs
+ if [ x$dostrip = xstrip -a -x /usr/bin/mcs ]
+ then
+ /usr/bin/mcs -d $dst
+ fi
+ exit 0
+fi
+
+case "$mode" in
+"")
+ ;;
+*)
+ case "$owner" in
+ "")
+ flags="$flags -u root"
+ ;;
+ esac
+ ;;
+esac
+
+
+# set up some variable to be used later
+
+rmcmd=""
+srcdir="."
+
+# if the destination isn't a directory we'll need to copy it first
+
+if [ ! -d $dst ]
+then
+ dstbase=`basename $dst`
+ cp $src /tmp/$dstbase
+ rmcmd="rm -f /tmp/$dstbase"
+ src=$dstbase
+ srcdir=/tmp
+ dst="`echo $dst | sed 's,^\(.*\)/.*$,\1,'`"
+ if [ x$dst = x ]
+ then
+ dst="."
+ fi
+fi
+
+
+# If the src file has a directory, copy it to /tmp to make install happy
+
+srcbase=`basename $src`
+
+if [ "$src" != "$srcbase" ] && [ "$src" != "./$srcbase" ]
+then
+ cp $src /tmp/$srcbase
+ src=$srcbase
+ srcdir=/tmp
+ rmcmd="rm -f /tmp/$srcbase"
+fi
+
+# do the actual install
+
+if [ -f /usr/sbin/install ]
+then
+ installcmd=/usr/sbin/install
+elif [ -f /etc/install ]
+then
+ installcmd=/etc/install
+else
+ installcmd=install
+fi
+
+# This rm is commented out because some people want to be able to
+# install through symbolic links. Uncomment it if it offends you.
+# rm -f $dst/$srcbase
+(cd $srcdir ; $installcmd -f $dst $flags $src)
+
+if [ x$dostrip = xstrip ]
+then
+ strip $dst/$srcbase
+ if [ -x /usr/bin/mcs ]
+ then
+ /usr/bin/mcs -d $dst/$srcbase
+ fi
+fi
+
+if [ x$mode != x ]
+then
+ chmod $mode $dst/$srcbase
+fi
+
+# and clean up
+
+$rmcmd
+
diff --git a/nx-X11/config/util/buildos2.cmd b/nx-X11/config/util/buildos2.cmd
new file mode 100644
index 000000000..cd5baa24f
--- /dev/null
+++ b/nx-X11/config/util/buildos2.cmd
@@ -0,0 +1 @@
+make CC="gcc -D__UNIXOS2__" BOOTSTRAPCFLAGS=-Zexe World 2>&1 | tee World.log
diff --git a/nx-X11/config/util/ccmakedep.man b/nx-X11/config/util/ccmakedep.man
new file mode 100644
index 000000000..20d9e82f8
--- /dev/null
+++ b/nx-X11/config/util/ccmakedep.man
@@ -0,0 +1,142 @@
+.TH ccmakedep 1 __xorgversion__
+.SH NAME
+ccmakedep \- create dependencies in makefiles using a C compiler
+.SH SYNOPSIS
+.B ccmakedep
+[
+.BI cpp-flags
+] [
+.BI \-w width
+] [
+.BI \-s magic-string
+] [
+.BI \-f makefile
+] [
+.BI \-o object-suffix
+] [
+.B \-v
+] [
+.B \-a
+] [
+.BI \-cc compiler
+] [
+\-\^\-
+.I options
+\-\^\-
+]
+.I sourcefile
+\^.\|.\|.
+.SH DESCRIPTION
+The
+.B ccmakedep
+program calls a C compiler to preprocess each
+.IR sourcefile ,
+and uses the output to construct
+.I makefile
+rules describing their dependencies.
+These rules instruct
+.BR make (1)
+on which object files must be recompiled when a dependency has changed.
+.PP
+By default,
+.B ccmakedep
+places its output in the file named
+.I makefile
+if it exists, otherwise
+.I Makefile.
+An alternate makefile may be specified with the
+.B \-f
+option.
+It first searches the makefile for a line beginning with
+.sp
+\& # DO NOT DELETE
+.sp
+or one provided with the
+.B \-s
+option, as a delimiter for the dependency output.
+If it finds it, it will delete everything following this up to the end of
+the makefile and put the output after this line.
+If it doesn't find it, the program will append the string to the makefile
+and place the output after that.
+.SH EXAMPLE
+Normally,
+.B ccmakedep
+will be used in a makefile target so that typing 'make depend' will bring
+the dependencies up to date for the makefile.
+For example,
+.nf
+ SRCS\0=\0file1.c\0file2.c\0.\|.\|.
+ CFLAGS\0=\0\-O\0\-DHACK\0\-I\^.\^.\^/foobar\0\-xyz
+ depend:
+ ccmakedep\0\-\^\-\0$(CFLAGS)\0\-\^\-\0$(SRCS)
+.fi
+.SH OPTIONS
+The program will ignore any option that it does not understand, so you may
+use the same arguments that you would for
+.BR cc (1),
+including
+.B \-D
+and
+.B \-U
+options to define and undefine symbols and
+.B \-I
+to set the include path.
+.TP
+.B \-a
+Append the dependencies to the file instead of replacing existing
+dependencies.
+.TP
+.BI \-cc compiler
+Use this compiler to generate dependencies.
+.TP
+.BI \-f makefile
+Filename.
+This allows you to specify an alternate makefile in which
+.B ccmakedep
+can place its output.
+Specifying \(lq\-\(rq as the file name (that is,
+.BR \-f\- )
+sends the output to standard output instead of modifying an existing file.
+.TP
+.BI \-s string
+Starting string delimiter.
+This option permits you to specify a different string for
+.B ccmakedep
+to look for in the makefile.
+The default is \(lq# DO NOT DELETE\(rq.
+.TP
+.BI \-v
+Be verbose: display the C compiler command before running it.
+.TP
+.BI \-\^\- " options " \-\^\-
+If
+.B ccmakedep
+encounters a double hyphen (\-\^\-) in the argument list, then any
+unrecognized arguments following it will be silently ignored.
+A second double hyphen terminates this special treatment.
+In this way,
+.B ccmakedep
+can be made to safely ignore esoteric compiler arguments that might
+normally be found in a CFLAGS
+.B make
+macro (see the
+.B EXAMPLE
+section above).
+.BR \-D ,
+.BR \-I ,
+and
+.B \-U
+options appearing between the pair of double hyphens are still processed
+normally.
+.SH "SEE ALSO"
+.BR cc (1),
+.BR make (1),
+.BR makedepend (1),
+.BR ccmakedep (1).
+.SH AUTHOR
+.B ccmakedep
+was written by the X Consortium.
+.PP
+Colin Watson wrote this manual page, originally for the Debian Project,
+based partly on the manual page for
+.BR makedepend (1).
diff --git a/nx-X11/config/util/checktree.c b/nx-X11/config/util/checktree.c
new file mode 100644
index 000000000..8bebdc5a3
--- /dev/null
+++ b/nx-X11/config/util/checktree.c
@@ -0,0 +1,339 @@
+/* $Xorg: checktree.c,v 1.4 2001/02/09 02:03:16 xorgcvs Exp $ */
+
+/*
+
+Copyright (c) 1993, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+*/
+/* $XFree86: xc/config/util/checktree.c,v 1.3 2001/07/29 05:01:10 tsi Exp $ */
+
+#include <X11/Xos.h>
+#include <stdio.h>
+#include <sys/stat.h>
+#include <sys/param.h>
+#include <errno.h>
+
+#ifndef X_NOT_POSIX
+#include <dirent.h>
+#else
+#ifdef SYSV
+#include <dirent.h>
+#else
+#ifdef USG
+#include <dirent.h>
+#else
+#include <sys/dir.h>
+#ifndef dirent
+#define dirent direct
+#endif
+#endif
+#endif
+#endif
+
+#ifdef S_IFLNK
+#define Stat lstat
+#else
+#define Stat stat
+#endif
+
+#define CHARSALLOWED \
+"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_."
+
+#define fmode_bits_minset 0444
+#define fmode_bits_maxset 0777
+#define fmode_bits_write 0222
+#define dmode_bits_minset 0775
+
+int dorcs = 1; /* check RCS file */
+int do83 = 1; /* check for 8+3 clash */
+int doro = 1; /* disallow writable (checked out) files */
+int dodot = 1; /* disallow .files */
+int dotwiddle = 1; /* disallow file~ */
+
+int dontcare(fn)
+ char *fn;
+{
+ char *cp;
+
+ if (fn[strlen(fn) - 1] == '~')
+ return 1;
+ cp = strrchr(fn, '.');
+ return cp && (!strcmp(cp + 1, "Z") || !strcmp(cp + 1, "PS"));
+}
+
+checkfile(fullname, fn, fs)
+ char *fullname, *fn;
+ struct stat *fs;
+{
+ char *cp;
+ int maxlen = 12;
+ int len, mode;
+
+ if (dodot && fn[0] == '.') {
+ printf("dot file: %s\n", fullname);
+ return;
+ }
+ for (len = 0, cp = fn; *cp; len++, cp++) {
+ if (!strchr(CHARSALLOWED, *cp)) {
+ if (dotwiddle || *cp != '~' || cp[1])
+ printf ("bad character: %s\n", fullname);
+ break;
+ }
+ }
+ if (len > maxlen && !dontcare(fn))
+ printf("too long (%d): %s\n", len, fullname);
+#ifdef S_IFLNK
+ if ((fs->st_mode & S_IFLNK) == S_IFLNK) {
+ printf("symbolic link: %s\n", fullname);
+ return;
+ }
+#endif
+ mode = fs->st_mode & (~S_IFMT);
+ if ((fs->st_mode & S_IFDIR) == S_IFDIR) {
+ maxlen = 14;
+ if ((mode & dmode_bits_minset) != dmode_bits_minset)
+ printf("directory mode 0%o not minimum 0%o: %s\n",
+ mode, dmode_bits_minset, fullname);
+ } else if ((fs->st_mode & S_IFREG) != S_IFREG)
+ printf("not a regular file: %s\n", fullname);
+ else {
+ if ((mode & fmode_bits_minset) != fmode_bits_minset)
+ printf("file mode 0%o not minimum 0%o: %s\n",
+ fs->st_mode, fmode_bits_minset, fullname);
+ if (fs->st_nlink != 1)
+ printf("%d links instead of 1: %s\n", fs->st_nlink, fullname);
+ if (doro && (mode & fmode_bits_write) && !dontcare(fn))
+ printf("writable: %s\n", fullname);
+ }
+ if ((mode & ~fmode_bits_maxset) != 0)
+ printf("mode 0%o outside maximum set 0%o: %s\n",
+ mode, fmode_bits_maxset, fullname);
+}
+
+void
+checkrcs(dir, p)
+ char *dir;
+ char *p;
+{
+ DIR *df;
+ struct dirent *dp;
+ struct stat fs;
+ int i;
+
+ if (!(df = opendir(dir))) {
+ fprintf(stderr, "cannot open: %s\n", dir);
+ return;
+ }
+ while (dp = readdir(df)) {
+ i = strlen(dp->d_name);
+ if (dp->d_name[i - 1] == 'v' && dp->d_name[i - 2] == ',') {
+ strcpy(p, dp->d_name);
+ p[i - 2] = '\0';
+ if (Stat(dir, &fs) < 0) {
+ strcpy(p, "RCS/");
+ strcat(p, dp->d_name);
+ printf("not used: %s\n", dir);
+ }
+ }
+ }
+ closedir(df);
+}
+
+int
+Strncmp(cp1, cp2, n)
+ char *cp1, *cp2;
+ int n;
+{
+ char c1, c2;
+
+ for (; --n >= 0 && *cp1 && *cp2; cp1++, cp2++) {
+ if (*cp1 != *cp2) {
+ c1 = *cp1;
+ c2 = *cp2;
+ if (c1 >= 'A' && c1 <= 'Z')
+ c1 += 'a' - 'A';
+ else if (c1 == '-')
+ c1 = '_';
+ if (c2 >= 'A' && c2 <= 'Z')
+ c2 += 'a' - 'A';
+ else if (c2 == '-')
+ c2 = '_';
+ if (c1 != c2)
+ return (int)c1 - (int)c2;
+ }
+ }
+ if (n < 0)
+ return 0;
+ return (int)*cp1 - (int)*cp2;
+}
+
+int
+fncomp(n1, n2)
+ char **n1, **n2;
+{
+ int i, res;
+ char *cp1, *cp2;
+ char c1, c2;
+
+ i = Strncmp(*n1, *n2, 8);
+ if (!i) {
+ cp1 = strrchr(*n1, '.');
+ cp2 = strrchr(*n2, '.');
+ if (cp1 || cp2) {
+ if (!cp1)
+ return -1;
+ if (!cp2)
+ return 1;
+ i = Strncmp(cp1 + 1, cp2 + 1, 3);
+ }
+ }
+ return i;
+}
+
+void
+checkdir(dir)
+ char *dir;
+{
+ DIR *df;
+ struct dirent *dp;
+ char *p;
+ struct stat fs;
+ char *s, **names;
+ int i, max;
+
+ if (!(df = opendir(dir))) {
+ fprintf(stderr, "cannot open: %s\n", dir);
+ return;
+ }
+ p = dir + strlen(dir);
+ if (p[-1] != '/')
+ *p++ = '/';
+ i = 0;
+ max = 0;
+ names = NULL;
+ while (dp = readdir(df)) {
+ strcpy(p, dp->d_name);
+ if (Stat(dir, &fs) < 0) {
+ perror(dir);
+ continue;
+ }
+ if ((fs.st_mode & S_IFDIR) == S_IFDIR) {
+ if (dp->d_name[0] == '.' &&
+ (dp->d_name[1] == '\0' || (dp->d_name[1] == '.' &&
+ dp->d_name[2] == '\0')))
+ continue;
+ if (!strcmp (dp->d_name, "RCS")) {
+ if (dorcs)
+ checkrcs(dir, p);
+ continue;
+ }
+ if (!strcmp (dp->d_name, "SCCS"))
+ continue;
+ if (!strcmp (dp->d_name, "CVS.adm"))
+ continue;
+ checkfile(dir, p, &fs);
+ checkdir(dir);
+ continue;
+ }
+ checkfile(dir, p, &fs);
+ if (dorcs && !dontcare(dp->d_name)) {
+ strcpy(p, "RCS/");
+ strcat(p, dp->d_name);
+ strcat(p, ",v");
+ if (Stat(dir, &fs) < 0) {
+ strcpy(p, dp->d_name);
+ printf("no RCS: %s\n", dir);
+ }
+ }
+ if (do83) {
+ s = (char *)malloc(strlen(dp->d_name) + 1);
+ strcpy(s, dp->d_name);
+ if (i >= max) {
+ max += 25;
+ if (names)
+ names = (char **)realloc((char *)names,
+ (max + 1) * sizeof(char *));
+ else
+ names = (char **)malloc((max + 1) * sizeof(char *));
+ }
+ names[i++] = s;
+ }
+ }
+ closedir(df);
+ if (do83) {
+ qsort((char *)names, i, sizeof(char *), fncomp);
+ max = i - 1;
+ *p = '\0';
+ for (i = 0; i < max; i++) {
+ if (!fncomp(&names[i], &names[i + 1]))
+ printf("8+3 clash: %s%s and %s\n",
+ dir, names[i], names[i + 1]);
+ free(names[i]);
+ }
+ if (names) {
+ free(names[i]);
+ free((char *)names);
+ }
+ }
+}
+
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ char buf[2048];
+
+ argc--;
+ argv++;
+ while (argc > 0) {
+ if (!strcmp(*argv, "-rcs")) {
+ dorcs = 0;
+ argc--;
+ argv++;
+ } else if (!strcmp(*argv, "-83")) {
+ do83 = 0;
+ argc--;
+ argv++;
+ } else if (!strcmp(*argv, "-ro")) {
+ doro = 0;
+ argc--;
+ argv++;
+ } else if (!strcmp(*argv, "-dot")) {
+ dodot = 0;
+ argc--;
+ argv++;
+ } else if (!strcmp(*argv, "-twiddle")) {
+ dotwiddle = 0;
+ argc--;
+ argv++;
+ } else
+ break;
+ }
+ if (!argc) {
+ strcpy(buf, ".");
+ checkdir(buf);
+ } else
+ while (--argc >= 0) {
+ strcpy(buf, *argv++);
+ checkdir(buf);
+ }
+}
diff --git a/nx-X11/config/util/chownxterm.c b/nx-X11/config/util/chownxterm.c
new file mode 100644
index 000000000..868f99c3d
--- /dev/null
+++ b/nx-X11/config/util/chownxterm.c
@@ -0,0 +1,79 @@
+/* $Xorg: chownxterm.c,v 1.4 2001/02/09 02:03:16 xorgcvs Exp $ */
+/*
+
+Copyright (c) 1993, 1994, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+
+/*
+ * chownxterm --- make xterm suid root
+ *
+ * By Stephen Gildea, December 1993
+ */
+
+
+#define XTERM_PATH "/x11/programs/xterm/xterm"
+
+#include <stdio.h>
+#include <errno.h>
+
+char *prog_name;
+
+void help()
+{
+ if (setgid(getgid()) == -1)
+ exit(1);
+ if (setuid(getuid()) == -1)
+ exit(1);
+ printf("chown-xterm makes %s suid root\n", XTERM_PATH);
+ printf("This is necessary on Ultrix for /dev/tty operation.\n");
+ exit(0);
+}
+
+void print_error(err_string)
+ char *err_string;
+{
+ if (setgid(getgid()) == -1)
+ exit(1);
+ if (setuid(getuid()) == -1)
+ exit(1);
+ fprintf(stderr, "%s: \"%s\"", prog_name, err_string);
+ perror(" failed");
+ exit(1);
+}
+
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ prog_name = argv[0];
+ if (argc >= 2 && strcmp(argv[1], "-help") == 0) {
+ help();
+ } else {
+ if (chown(XTERM_PATH, 0, -1) != 0)
+ print_error("chown root " XTERM_PATH);
+ if (chmod(XTERM_PATH, 04555) != 0)
+ print_error("chmod 4555 " XTERM_PATH);
+ }
+ exit(0);
+}
diff --git a/nx-X11/config/util/cleanlinks.man b/nx-X11/config/util/cleanlinks.man
new file mode 100644
index 000000000..d550ef5a4
--- /dev/null
+++ b/nx-X11/config/util/cleanlinks.man
@@ -0,0 +1,29 @@
+.TH cleanlinks 1 __vendorversion__
+.SH NAME
+cleanlinks \- remove dangling symbolic links and empty directories
+.SH SYNOPSIS
+.B cleanlinks
+.SH DESCRIPTION
+The
+.I cleanlinks
+program searches the directory tree descended from the current directory for
+symbolic links whose targets do not exist, and removes them.
+It then removes all empty directories in that directory tree.
+.PP
+.I cleanlinks
+is useful for cleaning up a shadow link tree created with
+.BR lndir (1)
+after files have been removed from the real directory.
+.SH DIAGNOSTICS
+A message will be printed upon encountering each dangling symlink and empty
+directory.
+.SH SEE ALSO
+.BR lndir (1).
+.SH AUTHOR
+.PP
+The version of the
+.I cleanlinks
+included in this X.Org Foundation release was originally written
+by David Dawes wrote as a part of XFree86.
+.PP
+Colin Watson wrote this manual page, originally for the Debian Project.
diff --git a/nx-X11/config/util/cleanlinks.sh b/nx-X11/config/util/cleanlinks.sh
new file mode 100644
index 000000000..4e1a8ead9
--- /dev/null
+++ b/nx-X11/config/util/cleanlinks.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Copyright © 2000, 2003 by The XFree86 Project, Inc
+#
+# Remove dangling symlinks and empty directories from a shadow link tree
+# (created with lndir).
+#
+# Author: David Dawes <dawes@xfree86.org>
+#
+# $XFree86: xc/config/util/cleanlinks.sh,v 1.2 2003/04/15 03:05:16 dawes Exp $
+
+find . -type l -print |
+(
+ read i
+ while [ X"$i" != X ]; do
+ if [ ! -f "$i" ]; then
+ echo $i is a dangling symlink, removing
+ rm -f "$i"
+ fi
+ read i
+ done
+)
+
+echo Removing empty directories ...
+#find . -type d -depth -print | xargs rmdir > /dev/null 2>&1
+find . -type d -depth -empty -print -exec rmdir {} \;
+exit 0
diff --git a/nx-X11/config/util/crayar.sh b/nx-X11/config/util/crayar.sh
new file mode 100644
index 000000000..6296de51d
--- /dev/null
+++ b/nx-X11/config/util/crayar.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+lib=$1
+shift
+if cray2; then
+ bld cr $lib `lorder $* | tsort`
+else
+ ar clq $lib $*
+fi
+
diff --git a/nx-X11/config/util/elistgen.hp b/nx-X11/config/util/elistgen.hp
new file mode 100644
index 000000000..fe22e794e
--- /dev/null
+++ b/nx-X11/config/util/elistgen.hp
@@ -0,0 +1,202 @@
+XCOMM!/bin/sh
+XCOMM $Xorg: elistgen.hp,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+XCOMM
+XCOMM #########################################################################
+XCOMM Construct shared-library export lists for HP-UX based on standardized
+XCOMM export list description file
+XCOMM
+XCOMM Usage: exportlistgen libfoo.sl libfoo.elist > libfoo.lopt
+XCOMM
+XCOMM libfoo.sl => shared library of interest
+XCOMM libfoo.elist => Meta description of necessary export list.
+XCOMM
+XCOMM The output may then be passed to the linker to reconstruct the
+XCOMM shared library. For unknown reasons naming only exported symbols
+XCOMM with "+e" does not work for debuggable C++ code, even though "nm"
+XCOMM reports no difference between the resulting libraries. The linker
+XCOMM complains that "first non-inline virtual function" is not defined for
+XCOMM vtables. We instead hide internal symbols with "-h" as a work-around.
+XCOMM
+XCOMM Author: Aloke Gupta 5/25/94.
+XCOMM (c) Copyright 1996 Digital Equipment Corporation.
+XCOMM (c) Copyright 1994,1996 Hewlett-Packard Company.
+XCOMM (c) Copyright 1996 International Business Machines Corp.
+XCOMM (c) Copyright 1996 Sun Microsystems, Inc.
+XCOMM (c) Copyright 1996 Novell, Inc.
+XCOMM (c) Copyright 1996 FUJITSU LIMITED.
+XCOMM (c) Copyright 1996 Hitachi.
+XCOMM
+XCOMM #########################################################################
+
+XCOMM Utility programs
+FILTER=CXXFILT # C++ symbol demangler
+AWK=awk # awk
+PATH=/usr/bin:/bin:/usr/ucb # For nm, cat, pr, expand, awk, c++filt
+
+XCOMM Temporary files
+EXPORTLIST=/tmp/elistgen1.$$ # list of export symbols from "libfoo.elist"
+NMLIST=/tmp/elistgen2.$$ # name list from libfoo.sl
+FILTLIST=/tmp/elistgen3.$$ # demangled (C++) version of NMLIST
+
+XCOMM Print useful information at the top of the output
+echo "#" `date`
+echo "# This linker options list was produced by" $0
+echo "# Input export list description taken from:" $2
+echo "# Target library:" $1
+echo "# Target Operating System:" `uname -msrv`
+echo "# "
+
+XCOMM Extract the globally visible symbols from target library
+XCOMM The NMLIST generated here is later used to cross-check the symbols in the
+XCOMM supplied export-list.
+XCOMM
+nm -p $1 | $AWK '
+ / [cCTDB][S ] [^\$]/{print $3} # Text, Data, BSS, or Secondary symbols
+' > $NMLIST
+
+XCOMM Demangle the global library symbols. This operation is necessary to
+XCOMM convert mangled C++ symbols into their C++ notation.
+${FILTER:-cat} $NMLIST > $FILTLIST
+
+XCOMM
+XCOMM Cleanup the export-list description file.
+XCOMM Note that C++ symbols may have embedded spaces in them.
+XCOMM
+cat $2 | $AWK '
+ BEGIN {
+ csyms = 0; # C language symbols in libfoo.list
+ cplusplus = 0; # C++ language symbols in libfoo.list
+ isyms = 0; # C internal symbols in libfoo.elist
+ icplusplus = 0; # C++ internal symbols in libfoo.elist
+ implicit = ""; # Handling of implicit symbols.
+ }
+ $1 == "default" {
+ # A default clause suppresses warnings about implicit symbols.
+ if ($2 != "" && $2 != "force" && $2 != "public" &&
+ $2 != "private" && $2 != "internal") {
+ print "# Warning: illegal default clause:", $2 | "cat 1>&2";
+ next;
+ }
+ if (implicit != "")
+ print "# Warning: multiple default clauses." | "cat 1>&2";
+ implicit = $2;
+ next;
+ }
+ $1 == "force" || $1 == "public" || $1 == "private" {
+ csyms ++;
+ print $1 ";;" $2;
+ next;
+ }
+ $1 == "publicC++" || $1 == "privateC++" {
+ cplusplus ++;
+ string = $2;
+ for (n = 3; n <= NF; n++)
+ string = string " " $n;
+ print $1 ";;" string;
+ next;
+ }
+ $1 == "internal" {
+ isyms ++;
+ print $1 ";;" $2;
+ next;
+ }
+ $1 == "internalC++" {
+ icplusplus ++;
+ string = $2;
+ for (n = 3; n <= NF; n++)
+ string = string " " $n;
+ print $1 ";;" string;
+ next;
+ }
+ END {
+ printf("# Exporting %d C and %d C++ symbols, hiding %d and %d.\n",
+ csyms, cplusplus, isyms, icplusplus) | "cat 1>&2";
+ if (implicit != "") {
+ print "# Unspecified symbols are " implicit "." | "cat 1>&2";
+ print "default;;" implicit;
+ }
+ }
+' > $EXPORTLIST
+
+XCOMM Read in the above files and write result to stdout. The contents
+XCOMM of NMLIST and FILTLIST are used to construct a symbol lookup table.
+XCOMM The contents of EXPORTLIST are converted with the help of this table.
+XCOMM Use ";" as a delimiter in the symbol lookup table.
+XCOMM
+(pr -m -s";" -t -w1024 $NMLIST $FILTLIST| expand -t 1;cat $EXPORTLIST ) | $AWK '
+ BEGIN {
+ FS = ";";
+ implicit = 0;
+ }
+ NF == 2 {
+ # This is "pr" output, i.e., symbol translation table.
+ syms[$2] = $1;
+ next;
+ }
+ NF == 3 && $1 == "default" {
+ # Treatment of unspecified symbols.
+ if ($3 == "internal" || $3 == "internalC++")
+ implicit = 1;
+ else if ($3 == "private" || $3 == "privateC++")
+ implicit = 2;
+ else if ($3 == "public" || $3 == "publicC++")
+ implicit = 3;
+ else # $3 == "force"
+ implicit = 4;
+ next;
+ }
+ NF == 3 {
+ # Parse our instructions for this symbol.
+ if ($1 == "internal" || $1 == "internalC++")
+ export = 1;
+ else if ($1 == "private" || $1 == "privateC++")
+ export = 2;
+ else if ($1 == "public" || $1 == "publicC++")
+ export = 3;
+ else # $1 == "force"
+ export = 4;
+
+ # Process it.
+ if (length(syms[$3]) > 0) {
+ if (donelist[$3])
+ print "# Warning: Duplicate entry for", $3,
+ "in export list" | "cat 1>&2";
+ if (donelist[$3] < export)
+ donelist[$3] = export;
+ } else {
+ if (export == 4)
+ donelist[$3] = export;
+ else
+ print "# Warning:", $3,
+ "was not in the nm list for this library" | "cat 1>&2";
+ }
+ next;
+ }
+ END {
+ # Force implicit exporting of errno.
+ if (! donelist["errno"])
+ donelist["errno"] = 4;
+
+ # Complain about some implicit symbols.
+ for (i in syms) {
+ if (!donelist[i] && (length(syms[i]) > 0)) {
+ # Ignore automatic symbols generated by the C++ compiler.
+ if (implicit == 0 &&
+ (syms[i] !~ /^__noperfopt__/) &&
+ (syms[i] !~ /^__ptbl_vec__/) &&
+ (syms[i] !~ /^__vtbl__[0-9]*_/) &&
+ (syms[i] !~ /^__cfront_version_[0-9]*_xxxxxxxx$/))
+ print "# Warning:", syms[i],
+ "was not in the export list" | "cat 1>&2";
+ donelist[i] = implicit;
+ }
+ if ((donelist[i] > 1) && (length(syms[i]) > 0))
+ print "-e", syms[i];
+ }
+ }
+'
+
+XCOMM Clean up temporary files
+rm $EXPORTLIST
+rm $NMLIST
+rm $FILTLIST
diff --git a/nx-X11/config/util/elistgen.ibm b/nx-X11/config/util/elistgen.ibm
new file mode 100644
index 000000000..d36869656
--- /dev/null
+++ b/nx-X11/config/util/elistgen.ibm
@@ -0,0 +1,220 @@
+XCOMM!/bin/sh
+XCOMM $Xorg: elistgen.ibm,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+XCOMM
+XCOMM #########################################################################
+XCOMM Construct shared-library export lists for IBM-AIX based on standardized
+XCOMM export list description file
+XCOMM
+XCOMM Usage: elistgen libfoo.sl libfoo.elist > libfoo.lopt
+XCOMM
+XCOMM libfoo.a => shared library of interest
+XCOMM libfoo.elist => Meta description of necessary export list.
+XCOMM
+XCOMM The output file, "libfoo.lopt" may then be passed to the IBM linker to
+XCOMM reconstruct the shared library, libfoo.sl.
+XCOMM
+XCOMM Author: Yanling Qi 10/03/94, Last updated 10/03/94
+XCOMM (c) Copyright 1996 Digital Equipment Corporation.
+XCOMM (c) Copyright 1996 Hewlett-Packard Company.
+XCOMM (c) Copyright 1994,1996 International Business Machines Corp.
+XCOMM (c) Copyright 1996 Sun Microsystems, Inc.
+XCOMM (c) Copyright 1996 Novell, Inc.
+XCOMM (c) Copyright 1996 FUJITSU LIMITED.
+XCOMM (c) Copyright 1996 Hitachi.
+XCOMM
+XCOMM #########################################################################
+
+#define HASH #
+
+XCOMM Utility programs
+FILTER=CXXFILT # C++ symbol demangler
+AWK=awk # awk
+
+XCOMM For dump, cat, pr, expand, awk, c++filt
+PATH=/usr/bin:/bin:/usr/ucb:/usr/lpp/xlC/bin
+
+XCOMM Temporary files
+EXPORTLIST=/tmp/elistgen1.$$ # export directives from "libfoo.list"
+NMLIST=/tmp/elistgen2.$$ # name list from libfoo.sl
+FILTLIST=/tmp/elistgen3.$$ # demangled (C++) version of above
+
+XCOMM Print useful information
+echo "*" `date`
+echo "* This linker options list was produced by" $0
+echo "* Input export list description taken from:" $2
+echo "* Target library:" $1
+echo "* Target Operating System:" `uname`
+echo "*"
+
+XCOMM Extract the globally visible symbols from target library
+dump -g $1 | $AWK '$1 ~ /[0-9][0-9]/ && $2 !~ /^[\.]/ {print $2}' > $NMLIST
+
+XCOMM Demangle the global library symbols
+${FILTER:-cat} $NMLIST > $FILTLIST
+
+XCOMM
+XCOMM Clean up the export-list description file.
+XCOMM Note that C++ symbols may have embedded spaces in them.
+XCOMM
+$AWK '
+ BEGIN {
+ csyms = 0; # C language symbols in libfoo.list
+ cplusplus = 0; # C++ language symbols in libfoo.list
+ isyms = 0; # C internal symbols in libfoo.list
+ iplusplus = 0; # C++ internal symbols in libfoo.list
+ count = 0; # Running count of symbols
+ implicit = ""; # Handling of implicit symbols.
+ }
+ $1 == "default" {
+ HASH A default clause suppresses warnings about implicit symbols.
+ if ($2 != "" && $2 != "force" && $2 != "public" &&
+ $2 != "private" && $2 != "internal") {
+ print "# Warning: illegal default clause:", $2 | "cat 1>&2";
+ next;
+ }
+ if (implicit != "")
+ print "# Warning: multiple default clauses." | "cat 1>&2";
+ implicit = $2;
+ next;
+ }
+ $1 == "force" || $1 == "public" || $1 == "private" {
+ csyms ++;
+ symbol[count++] = $1 ";;" $2;
+ next;
+ }
+ $1 == "publicC++" || $1 == "privateC++" {
+ HASH forceC++ is unsupported because we only know how to demangle,
+ HASH not how to mangle symbols, and the final ld input file must
+ HASH be mangled.
+ cplusplus ++;
+ string = $2;
+ for (n = 3; n <= NF; n++)
+ string = string " " $n;
+ symbol[count++] = $1 ";;" string;
+ next;
+ }
+ $1 == "internal" {
+ isyms ++;
+ symbol[count++] = $1 ";;" $2;
+ next;
+ }
+ $1 == "internalC++" {
+ iplusplus ++;
+ string = ";;" $2;
+ for (n = 3; n <= NF; n++)
+ string = string " " $n;
+ symbol[count++] = $1 ";;" string;
+ next;
+ }
+ $1 == "#line" || $1 == "#" {
+ HASH cpp will have removed comments, but may have added other stuff.
+ next;
+ }
+ NF > 0 {
+ print "# Warning: unrecognized directive:", $0 | "cat 1>&2";
+ next;
+ }
+ END {
+ printf("# Exporting %d C and %d C++ symbols, hiding %d and %d.\n",
+ csyms, cplusplus, isyms, iplusplus) | "cat 1>&2";
+ if (implicit != "") {
+ print "# Unspecified symbols are " implicit "." | "cat 1>&2";
+ print "default;;" implicit;
+ }
+ for (i in symbol)
+ print symbol[i];
+ }
+' $2 > $EXPORTLIST
+
+XCOMM
+XCOMM Read in the above files and write result to stdout. Use the
+XCOMM delimiter ";" to identify the entries in the symbol lookup table.
+XCOMM
+(pr -m -s";" -t -w1024 $NMLIST $FILTLIST | expand -t 1; cat $EXPORTLIST) | $AWK '
+ BEGIN {
+ FS = ";";
+ implicit = 0;
+ }
+ NF == 2 {
+ HASH This is "pr" output, i.e., symbol translation table
+ r2=$2
+ gsub(/ /,"",r2); # Remove spaces because c++filt is unpredictable
+ syms[r2] = $1;
+ r1=$1;
+ gsub(/ /,"",r1);
+ mangled[r1] = 1; # Save the mangling because the export lists
+ HASH sometimes use it instead of a prototype.
+ next;
+ }
+ NF == 3 && $1 == "default" {
+ HASH Treatment of unspecified symbols.
+ if ($3 == "internal")
+ implicit = 1;
+ else if ($3 == "private" || $3 == "privateC++")
+ implicit = 2;
+ else if ($3 == "public" || $3 == "publicC++")
+ implicit = 3;
+ else # $3 == "force"
+ implicit = 4;
+ next;
+ }
+ NF == 3 {
+ HASH Generate canonical demangled form as an alternate symbol.
+ alt=$3;
+ gsub(/ \.\.\./,",...",alt); # change " ..." to ",..." to match c++filt
+ gsub(/ /,"",alt); # remove all spaces
+ gsub(/\(void\)/,"()",alt); # change "(void)" to "()" to match c++filt
+
+ HASH Parse our instructions for this symbol.
+ if ($1 == "internal" || $1 == "internalC++")
+ export = 1;
+ else if ($1 == "private" || $1 == "privateC++")
+ export = 2;
+ else if ($1 == "public" || $1 == "publicC++")
+ export = 3;
+ else # $1 == "force"
+ export = 4;
+
+ HASH Process it.
+ if ((length(syms[alt]) > 0) || mangled[alt]) {
+ HASH This symbol is present in the library.
+ if (donelist[alt])
+ print "# Warning: Duplicate entry for", $3,
+ "in export list" | "cat 1>&2";
+ if (donelist[alt] < export) {
+ if (export > 1)
+ print syms[alt];
+ donelist[alt] = export;
+ }
+ } else {
+ HASH Print forced-export symbols without complaining.
+ if (export == 4) {
+ print alt;
+ donelist[alt] = export;
+ } else {
+ print "# Warning:", $3,
+ "was not in the nm list for this library" | "cat 1>&2";
+ }
+ }
+
+ next;
+ }
+ END {
+ HASH Process implicit symbols.
+ for (i in syms) {
+ if ((! donelist[i]) && (length(syms[i]) > 0)) {
+ HASH Do not complain about C++ virtual function tables.
+ if (implicit == 0 && syms[i] !~ /^__vft[0-9]*_/)
+ print "# Warning:", syms[i],
+ "was not in the export list" | "cat 1>&2";
+ if (implicit > 1)
+ print syms[i];
+ }
+ }
+ }
+'
+
+XCOMM Clean up temporary files
+rm $EXPORTLIST
+rm $NMLIST
+rm $FILTLIST
diff --git a/nx-X11/config/util/elistgen.sun b/nx-X11/config/util/elistgen.sun
new file mode 100644
index 000000000..f9af50ad1
--- /dev/null
+++ b/nx-X11/config/util/elistgen.sun
@@ -0,0 +1,267 @@
+XCOMM!/bin/sh -f
+XCOMM $Xorg: elistgen.sun,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+XCOMM
+XCOMM ########################################################################
+XCOMM Construct shared-library scoping mapfile for Solaris based on standardized
+XCOMM export list description file
+XCOMM
+XCOMM Usage: exportlistgen libfoo.so libfoo.elist > mapfile.scope
+XCOMM
+XCOMM libfoo.so => shared library of interest
+XCOMM libfoo.elist => Meta description of necessary export list.
+XCOMM
+XCOMM The output file, "mapfile.scope" may then be passed to the Solaris
+XCOMM linker to reconstruct the shared library, libfoo.so.
+XCOMM
+XCOMM ########################################################################
+XCOMM
+XCOMM $XFree86: xc/config/util/elistgen.sun,v 1.7 2001/01/17 16:39:01 dawes Exp $
+
+XCOMM Utility programs
+FILTER=CXXFILT # C++ symbol demangler
+AWK=nawk # Awk
+
+XCOMM For nm, cat, pr, sed, awk, c++filt
+PATH=/usr/bin:/bin:/usr/ccs/bin:/usr/ucb:$PATH
+
+XCOMM Try to detect broken versions of c++filt.
+if [ `echo _okay | ${FILTER:-cat}` != "_okay" ]; then
+ if [ -x /opt/SUNWspro/bin/c++filt ]; then
+ echo "# Your $FILTER is broken -- using /opt/SUNWspro/bin/c++filt."
+ FILTER=/opt/SUNWspro/bin/c++filt
+ else
+ echo "# ERROR: no working $FILTER available."
+ exit 1
+ fi;
+fi;
+
+XCOMM Temporary files
+EXPORTLIST=/tmp/elistgen1.$$ # export directives from "libfoo.list"
+NMLIST=/tmp/elistgen2.$$ # name list from libfoo.sl
+FILTLIST=/tmp/elistgen3.$$ # demangled (C++) version of above
+
+XCOMM Print useful information at the top of the output
+echo "#" `date`
+echo "# This scoping mapfile was produced by" $0
+echo "# Export list description taken from:" $2
+echo "# Target library:" $1
+echo "# Target Operating System:" `uname -msrv`
+echo "# "
+
+XCOMM Extract the globally visible symbols from target library
+XCOMM The NMLIST generated here is later used to cross-check the symbols in the
+XCOMM nm stopped working on Solaris 2.5, use dump instead.
+nm -p $1 | $AWK '/ [ TDBS] /{print $3}' > $NMLIST
+XCOMM /usr/ccs/bin/dump -t -v $1 | $AWK '/(FUNC|OBJT).(GLOB|WEAK)/{print $8}' > $NMLIST
+
+XCOMM Extract the globally visible symbols from target library
+XCOMM The NMLIST generated here is later used to cross-check the symbols in the
+${FILTER:-cat} < $NMLIST > $FILTLIST
+
+XCOMM Clean up the export-list description file. Sort the directives.
+$AWK '
+ BEGIN {
+ csyms = 0; # C public symbols in libfoo.list
+ cplusplus = 0; # C++ public symbols in libfoo.list
+ isyms = 0; # C internal symbols in libfoo.list
+ iplusplus = 0; # C++ internal symbols in libfoo.list
+ implicit = ""; # Handling of implicit symbols
+ }
+ $1 == "default" {
+ # A default clause suppresses warnings about implicit symbols.
+ if ($2 != "" && $2 != "force" && $2 != "public" && $2 != "private" && $2 != "internal") {
+ print "# Warning: illegal default clause:", $2 | "cat 1>&2";
+ next;
+ }
+ if (implicit != "")
+ print "# Warning: multiple default clauses." | "cat 1>&2";
+ implicit = $2;
+ next;
+ }
+ $1 == "force" {
+ csyms ++;
+ print $1 ";;" $2;
+ next;
+ }
+ $1 == "public" {
+ csyms ++;
+ print $1 ";;" $2;
+ next;
+ }
+ $1 == "publicC++" {
+ cplusplus ++;
+ string = $2;
+ for (n = 3; n <= NF; n++)
+ string = string " " $n;
+ print $1 ";;" string;
+ next;
+ }
+ $1 == "private" {
+ csyms ++;
+ print $1 ";;" $2;
+ next;
+ }
+ $1 == "privateC++" {
+ cplusplus ++;
+ string = $2;
+ for (n = 3; n <= NF; n++)
+ string = string " " $n;
+ print $1 ";;" string;
+ next;
+ }
+ $1 == "internal" {
+ isyms ++;
+ print $1 ";;" $2;
+ next;
+ }
+ $1 == "internalC++" {
+ iplusplus ++;
+ string = $2;
+ for (n = 3; n <= NF; n++)
+ string = string " " $n;
+ print $1 ";;" string;
+ next;
+ }
+ $1 == "#line" || $1 == "#" {
+ # cpp will have removed comments, but may have added other stuff.
+ next;
+ }
+ NF > 0 {
+ print "# Warning: unrecognized directive:", $0 | "cat 1>&2";
+ next;
+ }
+ END {
+ printf("# Exporting %d C and %d C++ symbols, hiding %d and %d.\n", csyms, cplusplus, isyms, iplusplus) | "cat 1>&2";
+ if (implicit != "") {
+ print "# Unspecified symbols are " implicit "." | "cat 1>&2";
+ print "default;;" implicit;
+ }
+ }
+' $2 1>$EXPORTLIST
+
+
+XCOMM Read in the above files and write result to stdout. The contents
+XCOMM of NMLIST and FILTLIST are used to construct a symbol lookup table.
+XCOMM The contents of EXPORTLIST are converted with the help of this table.
+XCOMM Use ";" as a delimiter in the symbol lookup table.
+(pr -m -s";" -t -w1024 $NMLIST $FILTLIST | sed 's/ / /g'; cat $EXPORTLIST) | $AWK '
+ BEGIN {
+ FS = ";";
+ implicit = 0;
+ }
+ NF == 2 {
+ # This is "pr" output, i.e., symbol translation table
+ r2=$2;
+ gsub(/static /,"",r2); # remove keyword "static" as above
+ gsub(/ /,"",r2); # Remove spaces because c++filt is unpredictable
+ syms[r2] = $1;
+ r1=$1;
+ gsub(/ /,"",r1);
+ mangled[r1] = 1; # Save the mangling because the export lists
+ # sometimes use it instead of a prototype.
+ next;
+ }
+ NF == 3 && $1 == "default" {
+ # Treatment of unspecified symbols.
+ if ($3 == "internal" || $3 == "internalC++")
+ implicit = 1;
+ else if ($3 == "private" || $3 == "privateC++")
+ implicit = 2;
+ else if ($3 == "public" || $3 == "publicC++")
+ implicit = 3;
+ else # $3 == "force"
+ implicit = 4;
+ next;
+ }
+ NF == 3 {
+ # Generate canonical demangled form as an alternate symbol.
+ alt=$3;
+ gsub(/ \.\.\./,",...",alt); # change " ..." to ",..." to match c++filt
+ gsub(/ /,"",alt); # remove all spaces
+
+ # An export directive. Parse our instructions for this symbol.
+ if ($1 == "internal" || $1 == "internalC++")
+ export = 1;
+ else if ($3 == "private" || $3 == "privateC++")
+ export = 2;
+ else if ($3 == "public" || $3 == "publicC++")
+ export = 3;
+ else # $3 == "force"
+ export = 4;
+
+ # Process it.
+ if ((length(syms[alt]) > 0) || mangled[alt]) {
+ # This symbol is present in the library.
+ if (donelist[alt])
+ print "# Warning: Duplicate entry for", $3,
+ "in export list" | "cat 1>&2";
+ if (donelist[alt] < export) {
+ donelist[alt] = export;
+ }
+ } else {
+ # Print forced-export symbols without complaining.
+ if (export == 4) {
+ donelist[alt] = export;
+ } else {
+ print "# Warning:", $3,
+ "was not in the nm list for this library" | "cat 1>&2";
+ }
+ }
+
+ next;
+ }
+ END {
+ # Ignore magic linker symbols.
+ if (implicit == 0) {
+ if (!donelist["_DYNAMIC"])
+ donelist["_DYNAMIC"] = 1;
+ if (!donelist["_GLOBAL_OFFSET_TABLE_"])
+ donelist["_GLOBAL_OFFSET_TABLE_"] = 1;
+ if (!donelist["_PROCEDURE_LINKAGE_TABLE_"])
+ donelist["_PROCEDURE_LINKAGE_TABLE_"] = 1;
+ if (!donelist["_edata"])
+ donelist["_edata"] = 1;
+ if (!donelist["_end"])
+ donelist["_end"] = 1;
+ if (!donelist["_etext"])
+ donelist["_etext"] = 1;
+ }
+
+ # Process implicit symbols.
+ for (i in syms) {
+ if (donelist[i] == 0 && length(syms[i]) > 0) {
+ if (implicit == 0) {
+ # Ignore magic symbols introduced by the C++ compiler.
+ if ((syms[i] !~ /^__vtbl__[0-9]*_/) && (syms[i] !~ /^__ptbl_vec__/))
+ print "# Warning:", syms[i], "was not in the export list" | "cat 1>&2";
+ } else {
+ donelist[i] = implicit;
+ }
+ }
+ }
+
+ # Generate the linker file.
+ print "";
+ print "SUNW.1.1 {";
+ print " global:";
+ for (i in syms)
+ if (donelist[i] >= 2 && length(syms[i]) > 0)
+ print " " syms[i] ";";
+ print " local:";
+ print " *;";
+ print "};";
+
+ print "";
+ print "SUNW_private.1.1 {";
+ print " global:";
+ for (i in syms)
+ if (donelist[i] == 1 && length(syms[i]) > 0)
+ print " " syms[i] ";";
+ print "} SUNW.1.1;"
+ }
+'
+
+XCOMM Clean up temporary files
+rm $EXPORTLIST
+rm $NMLIST
+rm $FILTLIST
diff --git a/nx-X11/config/util/elistgen.usl b/nx-X11/config/util/elistgen.usl
new file mode 100644
index 000000000..f17bcdb22
--- /dev/null
+++ b/nx-X11/config/util/elistgen.usl
@@ -0,0 +1,221 @@
+XCOMM!/bin/sh
+XCOMM $Xorg: elistgen.usl,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+XCOMM
+XCOMM #########################################################################
+XCOMM Construct shared-library export lists for Novell based on standardized
+XCOMM export list description file
+XCOMM
+XCOMM Usage: exportlistgen libFoo.so libFoo.elist > libFoo.lopt
+XCOMM
+XCOMM libFoo.so => shared library of interest
+XCOMM libFoo.elist => Meta description of necessary export list.
+XCOMM
+XCOMM The output file, "libFoo.lopt" may then be passed to the linker to
+XCOMM reconstruct the shared library.
+XCOMM
+XCOMM (c) Copyright 1996 Digital Equipment Corporation.
+XCOMM (c) Copyright 1996 Hewlett-Packard Company.
+XCOMM (c) Copyright 1996 International Business Machines Corp.
+XCOMM (c) Copyright 1996 Sun Microsystems, Inc.
+XCOMM (c) Copyright 1996 Novell, Inc.
+XCOMM (c) Copyright 1996 FUJITSU LIMITED.
+XCOMM (c) Copyright 1996 Hitachi.
+XCOMM
+XCOMM #########################################################################
+XCOMM
+XCOMM $XFree86$
+
+XCOMM Utility programs
+FILTER=CXXFILT # C++ symbol demangler
+AWK=awk # awk
+
+XCOMM For nm, cat, pr, sed, awk, c++filt
+PATH=/usr/bin:/bin:/usr/ucb:/usr/ccs/bin
+
+XCOMM Temporary files
+EXPORTLIST=/tmp/elistgen1.$$ # list of export symbols from "libfoo.elist"
+NMLIST=/tmp/elistgen2.$$ # name list from libfoo.sl
+FILTLIST=/tmp/elistgen3.$$ # demangled (C++) version of NMLIST
+
+XCOMM Print useful information at the top of the output
+echo "#" `date`
+echo "# This linker options list was produced by" $0
+echo "# Input export list description taken from:" $2
+echo "# Target library:" $1
+echo "# Target Operating System:" `uname -msrv`
+echo "# "
+
+XCOMM Extract the globally visible symbols from target library.
+XCOMM The NMLIST generated here is later used to cross-check the symbols in the
+XCOMM supplied export-list.
+nm -p $1 | $AWK '
+ / [TD] [^\$]/{print $3} # Text, Data, BSS, or Secondary symbols
+' > $NMLIST
+
+XCOMM Demangle the global library symbols. This operation is necessary to convert
+XCOMM mangled C++ symbols into their C++ notation.
+${FILTER:-cat} $NMLIST > $FILTLIST
+
+XCOMM Clean up the export-list description file.
+XCOMM Note that C++ symbols may have embedded spaces in them.
+cat $2 | $AWK '
+ BEGIN {
+ csyms = 0; # C language symbols in libfoo.list
+ cplusplus = 0; # C++ language symbols in libfoo.list
+ isyms = 0; # C internal symbols in libfoo.elist
+ iplusplus = 0; # C++ internal symbols in libfoo.elist
+ implicit = ""; # Handling of implicit symbols
+ }
+ $1 == "default" {
+ # A default clause suppresses warnings about implicit symbols.
+ if ($2 != "" && $2 != "force" && $2 != "public" &&
+ $2 != "private" && $2 != "internal") {
+ print "# Warning: illegal default clause:", $2 | "cat 1>&2";
+ next;
+ }
+ if (implicit != "")
+ print "# Warning: multiple default clauses." | "cat 1>&2";
+ implicit = $2;
+ next;
+ }
+ $1 == "force" || $1 == "public" || $1 == "private" {
+ csyms ++;
+ print $1 ";;" $2;
+ next;
+ }
+ $1 == "publicC++" || $1 == "privateC++" {
+ cplusplus ++;
+ string = $2;
+ for (n = 3; n <= NF; n++) {
+ string = string " " $n;
+ }
+ print $1 ";;" string;
+ next;
+ }
+ $1 == "internal" {
+ isyms ++;
+ print $1 ";;" $2;
+ next;
+ }
+ $1 == "internalC++" {
+ iplusplus ++;
+ string = $2;
+ for (n = 3; n <= NF; n++) {
+ string = string " " $n;
+ }
+ print $1 ";;" string;
+ next;
+ }
+ $1 == "#line" || $1 == "#" {
+ # cpp will have removed comments, but may have added other stuff.
+ next;
+ }
+ NF > 0 {
+ print "# Warning: unrecognized directive:", $0 | "cat 1>&2";
+ next;
+ }
+ END {
+ printf("# Exporting %d C and %d C++ symbols, hiding %d and %d.\n",
+ csyms, cplusplus, isyms, iplusplus) | "cat 1>&2";
+ if (implicit != "") {
+ print "# Unspecified symbols are " implicit "." | "cat 1>&2";
+ print "default;;" implicit;
+ }
+ }
+' > $EXPORTLIST
+
+XCOMM Read in the above files and write result to stdout. The contents
+XCOMM of NMLIST and FILTLIST are used to construct a symbol lookup table.
+XCOMM The contents of EXPORTLIST are converted with the help of this table.
+XCOMM Use ";" as a delimiter in the symbol lookup table.
+(pr -m -s";" -t -w1024 $NMLIST $FILTLIST | sed 's/ / /g'; cat $EXPORTLIST) | $AWK '
+ BEGIN {
+ FS = ";";
+ implicit = 0;
+ }
+ NF == 2 {
+ # This is "pr" output, i.e., symbol translation table
+ syms[$2] = $1;
+ next;
+ }
+ NF == 3 && $1 == "default" {
+ # Treatment of unspecified symbols.
+ if ($3 == "internal")
+ implicit = 1;
+ else if ($3 == "private" || $3 == "privateC++")
+ implicit = 2;
+ else if ($3 == "public" || $3 == "publicC++")
+ implicit = 3;
+ else # $3 == "force"
+ implicit = 4;
+ next;
+ }
+ NF == 3 {
+ # Parse our instructions for this symbol.
+ if ($1 == "internal" || $1 == "internalC++")
+ export = 1;
+ else if ($1 == "private" || $1 == "privateC++")
+ export = 2;
+ else if ($1 == "public" || $1 == "publicC++")
+ export = 3;
+ else # $1 == "force"
+ export = 4;
+
+ # Process it.
+ if (length(syms[$3]) > 0) {
+ # This symbol is present in the library.
+ if (donelist[$3])
+ print "# Warning: Duplicate entry for", $3,
+ "in export list" | "cat 1>&2";
+ if (donelist[$3] < export) {
+ if (export > 1)
+ print syms[$3];
+ donelist[$3] = export;
+ }
+ } else {
+ # Do not complain about unknown forced-export symbols.
+ if (export == 4) {
+ print $3;
+ donelist[$3] = export;
+ } else
+ print "# Warning:", $3,
+ "was not in the nm list for this library" | "cat 1>&2";
+ }
+
+ next;
+ }
+ END {
+ # Ignore built-in linker symbols.
+ if (implicit == 0) {
+ if (!donelist["_DYNAMIC"])
+ donelist["_DYNAMIC"] = 1;
+ if (!donelist["_GLOBAL_OFFSET_TABLE_"])
+ donelist["_GLOBAL_OFFSET_TABLE_"] = 1;
+ if (!donelist["_edata"])
+ donelist["_edata"] = 1;
+ if (!donelist["_end"])
+ donelist["_end"] = 1;
+ if (!donelist["_etext"])
+ donelist["_etext"] = 1;
+ }
+
+ # Process implicit symbols.
+ for (i in syms) {
+ if (!donelist[i] && (length(syms[i]) > 0)) {
+ # Ignore C++ compiler symbols
+ if (implicit == 0 &&
+ (syms[i] !~ /^__vtbl__[0-9]*_/) &&
+ (syms[i] !~ /^__cpp_unixware_[0-9]*$/))
+ print "# Warning:", syms[i],
+ "was not in the export list" | "cat 1>&2";
+ if (implicit > 1)
+ print syms[i];
+ }
+ }
+ }
+'
+
+XCOMM Clean up temporary files
+rm $EXPORTLIST
+rm $NMLIST
+rm $FILTLIST
diff --git a/nx-X11/config/util/gccmakedep.man b/nx-X11/config/util/gccmakedep.man
new file mode 100644
index 000000000..5a97a3ebb
--- /dev/null
+++ b/nx-X11/config/util/gccmakedep.man
@@ -0,0 +1,126 @@
+.TH gccmakedep 1 __vendorversion__
+.SH NAME
+gccmakedep \- create dependencies in makefiles using 'gcc -M'
+.SH SYNOPSIS
+.B gccmakedep
+[
+.BI \-s separator
+] [
+.BI \-f makefile
+] [
+.BI \-a
+] [
+\-\^\-
+.I options
+\-\^\-
+]
+.I sourcefile
+\&.\|.\|.
+.SH DESCRIPTION
+The
+.B gccmakedep
+program calls 'gcc -M' to output
+.I makefile
+rules describing the dependencies of each
+.IR sourcefile ,
+so that
+.BR make (1)
+knows which object files must be recompiled when a dependency has changed.
+.PP
+By default,
+.B gccmakedep
+places its output in the file named
+.I makefile
+if it exists, otherwise
+.I Makefile.
+An alternate makefile may be specified with the
+.B \-f
+option.
+It first searches the makefile for a line beginning with
+.sp
+\& # DO NOT DELETE
+.sp
+or one provided with the
+.B \-s
+option, as a delimiter for the dependency output.
+If it finds it, it will delete everything following this up to the end of
+the makefile and put the output after this line.
+If it doesn't find it, the program will append the string to the makefile
+and place the output after that.
+.SH EXAMPLE
+Normally,
+.B gccmakedep
+will be used in a makefile target so that typing 'make depend' will bring
+the dependencies up to date for the makefile.
+For example,
+.nf
+ SRCS\0=\0file1.c\0file2.c\0.\|.\|.
+ CFLAGS\0=\0\-O\0\-DHACK\0\-I\^.\^.\^/foobar\0\-xyz
+ depend:
+ gccmakedep\0\-\^\-\0$(CFLAGS)\0\-\^\-\0$(SRCS)
+.fi
+.SH OPTIONS
+The program will ignore any option that it does not understand, so you may
+use the same arguments that you would for
+.BR gcc (1),
+including
+.B \-D
+and
+.B \-U
+options to define and undefine symbols and
+.B \-I
+to set the include path.
+.TP
+.B \-a
+Append the dependencies to the file instead of replacing existing
+dependencies.
+.TP
+.BI \-f makefile
+Filename.
+This allows you to specify an alternate makefile in which
+.B gccmakedep
+can place its output.
+Specifying \(lq\-\(rq as the file name (that is,
+.BR \-f\- )
+sends the output to standard output instead of modifying an existing file.
+.TP
+.BI \-s string
+Starting string delimiter.
+This option permits you to specify a different string for
+.B gccmakedep
+to look for in the makefile.
+The default is \(lq# DO NOT DELETE\(rq.
+.TP
+.BI \-\^\- " options " \-\^\-
+If
+.B gccmakedep
+encounters a double hyphen (\-\^\-) in the argument list, then any
+unrecognized arguments following it will be silently ignored.
+A second double hyphen terminates this special treatment.
+In this way,
+.B gccmakedep
+can be made to safely ignore esoteric compiler arguments that might
+normally be found in a CFLAGS
+.B make
+macro (see the
+.B EXAMPLE
+section above).
+.BR \-D ,
+.BR \-I ,
+and
+.B \-U
+options appearing between the pair of double hyphens are still processed
+normally.
+.SH "SEE ALSO"
+.BR gcc (1),
+.BR make (1),
+.BR makedepend (1).
+.SH AUTHOR
+The version of the
+.B gccmakedep
+included in this X.Org Foundation release was originally
+written by the XFree86 Project based on code supplied by Hongjiu Lu.
+.PP
+Colin Watson wrote this manual page, originally for the Debian Project,
+based partly on the manual page for
+.BR makedepend (1).
diff --git a/nx-X11/config/util/gccmdep.cpp b/nx-X11/config/util/gccmdep.cpp
new file mode 100644
index 000000000..ff4b12a3d
--- /dev/null
+++ b/nx-X11/config/util/gccmdep.cpp
@@ -0,0 +1,126 @@
+XCOMM!/bin/sh
+
+XCOMM
+XCOMM makedepend which uses 'gcc -M'
+XCOMM
+XCOMM $XFree86: xc/config/util/gccmdep.cpp,v 3.10tsi Exp $
+XCOMM
+XCOMM Based on mdepend.cpp and code supplied by Hongjiu Lu <hjl@nynexst.com>
+XCOMM
+
+TMP=mdep$$.tmp
+CC=CCCMD
+RM=RMCMD
+LN=LNCMD
+MV=MVCMD
+
+${RM} ${TMP}
+
+trap "${RM} ${TMP}*; exit 1" 1 2 15
+trap "${RM} ${TMP}*; exit 0" 1 2 13
+
+files=
+makefile=
+endmarker=
+magic_string='# DO NOT DELETE'
+append=n
+args=
+
+while [ $# != 0 ]; do
+ if [ "$endmarker"x != x -a "$endmarker" = "$1" ]; then
+ endmarker=
+ else
+ case "$1" in
+ -D*|-I*|-U*)
+ args="$args '$1'"
+ ;;
+ -g*|-O*)
+ ;;
+ *)
+ if [ "$endmarker"x = x ]; then
+ case $1 in
+XCOMM ignore these flags
+ -w|-o|-cc)
+ shift
+ ;;
+ -v)
+ ;;
+ -s)
+ magic_string="$2"
+ shift
+ ;;
+ -f*)
+ if [ "$1" = "-f-" ]; then
+ makefile="-"
+ elif [ "$1" = "-f" ]; then
+ makefile="$2"
+ shift
+ else
+ echo "$1" | sed 's/^\-f//' >${TMP}arg
+ makefile="`cat ${TMP}arg`"
+ rm -f ${TMP}arg
+ fi
+ ;;
+ --*)
+ endmarker=`echo $1 | sed 's/^\-\-//'`
+ if [ "$endmarker"x = x ]; then
+ endmarker="--"
+ fi
+ ;;
+ -a)
+ append=y
+ ;;
+ -*)
+ echo "Unknown option '$1' ignored" 1>&2
+ ;;
+ *)
+ files="$files $1"
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ fi
+ shift
+done
+
+if [ x"$files" = x ]; then
+XCOMM Nothing to do
+ exit 0
+fi
+
+case "$makefile" in
+ '')
+ if [ -r makefile ]; then
+ makefile=makefile
+ elif [ -r Makefile ]; then
+ makefile=Makefile
+ else
+ echo 'no makefile or Makefile found' 1>&2
+ exit 1
+ fi
+ ;;
+esac
+
+if [ X"$makefile" != X- ]; then
+ if [ x"$append" = xn ]; then
+ sed -e "/^$magic_string/,\$d" < $makefile > $TMP
+ echo "$magic_string" >> $TMP
+ else
+ cp $makefile $TMP
+ fi
+fi
+
+CMD="$CC -M $args $files"
+if [ X"$makefile" != X- ]; then
+ CMD="$CMD >> $TMP"
+fi
+eval $CMD
+if [ X"$makefile" != X- ]; then
+ $RM ${makefile}.bak
+ $MV $makefile ${makefile}.bak
+ $MV $TMP $makefile
+fi
+
+$RM ${TMP}*
+exit 0
diff --git a/nx-X11/config/util/indir.cmd b/nx-X11/config/util/indir.cmd
new file mode 100644
index 000000000..2c86690aa
--- /dev/null
+++ b/nx-X11/config/util/indir.cmd
@@ -0,0 +1,28 @@
+/* OS/2 rexx script to emulate the "cd dir; command" mechanism in make
+ * which does not work with stupid CMD.EXE
+ *
+ * $XFree86: xc/config/util/indir.cmd,v 3.1 1996/01/24 21:56:12 dawes Exp $
+ */
+curdir = directory()
+line = fixbadprefix(ARG(1))
+w1 = TRANSLATE(WORD(line,1),'\','/')
+new = directory(w1)
+/*IF (SUBSTR(w1,1,2) = '..') | (POS(w1,new) > 0) THEN DO*/
+ subword(line,2)
+ old = directory(curdir)
+/*END
+ELSE DO
+ say 'Directory 'new' does not exist, ignoring command (nonfatal)'
+END*/
+EXIT
+
+/* somehow make or cmd manages to convert a relative path ..\..\. to ..... */
+fixbadprefix:
+count = 1
+str = ARG(1)
+DO WHILE SUBSTR(str,count,3) = '...'
+ count = count+1
+ str = INSERT('\',str,count)
+ count = count+2
+END
+RETURN str
diff --git a/nx-X11/config/util/install.sh b/nx-X11/config/util/install.sh
new file mode 100644
index 000000000..7b2d40b85
--- /dev/null
+++ b/nx-X11/config/util/install.sh
@@ -0,0 +1,108 @@
+#!/bin/sh
+
+#
+# install - install a program, script, or datafile
+#
+# $Xorg: install.sh,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+doit="${DOITPROG:-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG:-mv}"
+cpprog="${CPPROG:-cp}"
+chmodprog="${CHMODPROG:-chmod}"
+chownprog="${CHOWNPROG:-chown}"
+chgrpprog="${CHGRPPROG:-chgrp}"
+stripprog="${STRIPPROG:-strip}"
+rmprog="${RMPROG:-rm}"
+
+instcmd="$mvprog"
+chmodcmd=""
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+src=""
+dst=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+fi
+
+if [ x"$dst" = x ]
+then
+ echo "install: no destination specified"
+ exit 1
+fi
+
+
+# if destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+if [ -d $dst ]
+then
+ dst="$dst"/`basename $src`
+fi
+
+
+# get rid of the old one and mode the new one in
+
+$doit $rmcmd $dst
+$doit $instcmd $src $dst
+
+
+# and set any options; do chmod last to preserve setuid bits
+
+if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; fi
+if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; fi
+if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; fi
+if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; fi
+
+exit 0
diff --git a/nx-X11/config/util/lndir.c b/nx-X11/config/util/lndir.c
new file mode 100644
index 000000000..cd1d983b0
--- /dev/null
+++ b/nx-X11/config/util/lndir.c
@@ -0,0 +1,391 @@
+/* $Xorg: lndir.c,v 1.5 2001/02/09 02:03:17 xorgcvs Exp $ */
+/* Create shadow link tree (after X11R4 script of the same name)
+ Mark Reinhold (mbr@lcs.mit.edu)/3 January 1990 */
+
+/*
+Copyright (c) 1990, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/config/util/lndir.c,v 3.18 2003/06/24 15:44:45 eich Exp $ */
+
+/* From the original /bin/sh script:
+
+ Used to create a copy of the a directory tree that has links for all
+ non-directories (except, by default, those named BitKeeper, RCS, SCCS
+ or CVS.adm). If you are building the distribution on more than one
+ machine, you should use this technique.
+
+ If your master sources are located in /usr/local/src/X and you would like
+ your link tree to be in /usr/local/src/new-X, do the following:
+
+ % mkdir /usr/local/src/new-X
+ % cd /usr/local/src/new-X
+ % lndir ../X
+*/
+
+#include <X11/Xos.h>
+#include <X11/Xfuncproto.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+#if !defined(MINIX) && !defined(Lynx)
+#include <sys/param.h>
+#endif
+#include <errno.h>
+
+#ifndef X_NOT_POSIX
+#include <dirent.h>
+#else
+#ifdef SYSV
+#include <dirent.h>
+#else
+#ifdef USG
+#include <dirent.h>
+#else
+#include <sys/dir.h>
+#ifndef dirent
+#define dirent direct
+#endif
+#endif
+#endif
+#endif
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 2048
+#endif
+
+#include <stdarg.h>
+
+int silent = 0; /* -silent */
+int ignore_links = 0; /* -ignorelinks */
+int with_revinfo = 0; /* -withrevinfo */
+
+char *rcurdir;
+char *curdir;
+
+static void
+quit (int code, char * fmt, ...)
+{
+ va_list args;
+ va_start(args, fmt);
+ vfprintf (stderr, fmt, args);
+ va_end(args);
+ putc ('\n', stderr);
+ exit (code);
+}
+
+static void
+quiterr (int code, char *s)
+{
+ perror (s);
+ exit (code);
+}
+
+static void
+msg (char * fmt, ...)
+{
+ va_list args;
+ if (curdir) {
+ fprintf (stderr, "%s:\n", curdir);
+ curdir = 0;
+ }
+ va_start(args, fmt);
+ vfprintf (stderr, fmt, args);
+ va_end(args);
+ putc ('\n', stderr);
+}
+
+static void
+mperror (char *s)
+{
+ if (curdir) {
+ fprintf (stderr, "%s:\n", curdir);
+ curdir = 0;
+ }
+ perror (s);
+}
+
+
+static int
+equivalent(char *lname, char *rname, char **p)
+{
+ char *s;
+
+ if (!strcmp(lname, rname))
+ return 1;
+ for (s = lname; *s && (s = strchr(s, '/')); s++) {
+ while (s[1] == '/') {
+ strcpy(s+1, s+2);
+ if (*p) (*p)--;
+ }
+ }
+ return !strcmp(lname, rname);
+}
+
+
+/* Recursively create symbolic links from the current directory to the "from"
+ directory. Assumes that files described by fs and ts are directories. */
+static int
+dodir (char *fn, /* name of "from" directory, either absolute or
+ relative to cwd */
+ struct stat *fs,
+ struct stat *ts, /* stats for the "from" directory and cwd */
+ int rel) /* if true, prepend "../" to fn before using */
+{
+ DIR *df;
+ struct dirent *dp;
+ char buf[MAXPATHLEN + 1], *p;
+ char symbuf[MAXPATHLEN + 1];
+ char basesym[MAXPATHLEN + 1];
+ struct stat sb, sc;
+ int n_dirs;
+ int symlen;
+ int basesymlen = -1;
+ char *ocurdir;
+
+ if ((fs->st_dev == ts->st_dev) && (fs->st_ino == ts->st_ino)) {
+ msg ("%s: From and to directories are identical!", fn);
+ return 1;
+ }
+
+ if (rel)
+ strcpy (buf, "../");
+ else
+ buf[0] = '\0';
+ strcat (buf, fn);
+
+ if (!(df = opendir (buf))) {
+ msg ("%s: Cannot opendir", buf);
+ return 1;
+ }
+
+ p = buf + strlen (buf);
+ if (*(p - 1) != '/')
+ *p++ = '/';
+ n_dirs = fs->st_nlink;
+ while ((dp = readdir (df))) {
+ if (dp->d_name[strlen(dp->d_name) - 1] == '~')
+ continue;
+#ifdef __DARWIN__
+ /* Ignore these Mac OS X Finder data files */
+ if (!strcmp(dp->d_name, ".DS_Store") ||
+ !strcmp(dp->d_name, "._.DS_Store"))
+ continue;
+#endif
+ strcpy (p, dp->d_name);
+
+ if (n_dirs > 0) {
+ if (lstat (buf, &sb) < 0) {
+ mperror (buf);
+ continue;
+ }
+
+#ifdef S_ISDIR
+ if(S_ISDIR(sb.st_mode))
+#else
+ if ((sb.st_mode & S_IFMT) == S_IFDIR)
+#endif
+ {
+ /* directory */
+ n_dirs--;
+ if (dp->d_name[0] == '.' &&
+ (dp->d_name[1] == '\0' || (dp->d_name[1] == '.' &&
+ dp->d_name[2] == '\0')))
+ continue;
+ if (!with_revinfo) {
+ if (!strcmp (dp->d_name, "BitKeeper"))
+ continue;
+ if (!strcmp (dp->d_name, "RCS"))
+ continue;
+ if (!strcmp (dp->d_name, "SCCS"))
+ continue;
+ if (!strcmp (dp->d_name, "CVS"))
+ continue;
+ if (!strcmp (dp->d_name, "CVS.adm"))
+ continue;
+ if (!strcmp (dp->d_name, ".svn"))
+ continue;
+ }
+ ocurdir = rcurdir;
+ rcurdir = buf;
+ curdir = silent ? buf : (char *)0;
+ if (!silent)
+ printf ("%s:\n", buf);
+ if ((stat (dp->d_name, &sc) < 0) && (errno == ENOENT)) {
+ if (mkdir (dp->d_name, 0777) < 0 ||
+ stat (dp->d_name, &sc) < 0) {
+ mperror (dp->d_name);
+ curdir = rcurdir = ocurdir;
+ continue;
+ }
+ }
+ if (readlink (dp->d_name, symbuf, sizeof(symbuf) - 1) >= 0) {
+ msg ("%s: is a link instead of a directory", dp->d_name);
+ curdir = rcurdir = ocurdir;
+ continue;
+ }
+ if (chdir (dp->d_name) < 0) {
+ mperror (dp->d_name);
+ curdir = rcurdir = ocurdir;
+ continue;
+ }
+ dodir (buf, &sb, &sc, (buf[0] != '/'));
+ if (chdir ("..") < 0)
+ quiterr (1, "..");
+ curdir = rcurdir = ocurdir;
+ continue;
+ }
+ }
+
+ /* non-directory */
+ symlen = readlink (dp->d_name, symbuf, sizeof(symbuf) - 1);
+ if (symlen >= 0)
+ symbuf[symlen] = '\0';
+
+ /* The option to ignore links exists mostly because
+ checking for them slows us down by 10-20%.
+ But it is off by default because this really is a useful check. */
+ if (!ignore_links) {
+ /* see if the file in the base tree was a symlink */
+ basesymlen = readlink(buf, basesym, sizeof(basesym) - 1);
+ if (basesymlen >= 0)
+ basesym[basesymlen] = '\0';
+ }
+
+ if (symlen >= 0) {
+ /* Link exists in new tree. Print message if it doesn't match. */
+ if (!equivalent (basesymlen>=0 ? basesym : buf, symbuf,
+ basesymlen>=0 ? (char **) 0 : &p))
+ msg ("%s: %s", dp->d_name, symbuf);
+ } else {
+ char *sympath;
+
+ if (basesymlen>=0) {
+ if ((buf[0] == '.') && (buf[1] == '.') && (buf[2] == '/') &&
+ (basesym[0] == '.') && (basesym[1] == '.') &&
+ (basesym[2] == '/')) {
+ /* It becomes very tricky here. We have
+ ../../bar/foo symlinked to ../xxx/yyy. We
+ can't just use ../xxx/yyy. We have to use
+ ../../bar/foo/../xxx/yyy. */
+
+ int i;
+ char *start, *end;
+
+ strcpy (symbuf, buf);
+ /* Find the first char after "../" in symbuf. */
+ start = symbuf;
+ do {
+ start += 3;
+ } while ((start[0] == '.') && (start[1] == '.') &&
+ (start[2] == '/'));
+
+ /* Then try to eliminate "../"s in basesym. */
+ i = 0;
+ end = strrchr (symbuf, '/');
+ if (start < end) {
+ do {
+ i += 3;
+ end--;
+ while ((*end != '/') && (end != start))
+ end--;
+ if (end == start)
+ break;
+ } while ((basesym[i] == '.') &&
+ (basesym[i + 1] == '.') &&
+ (basesym[i + 2] == '/'));
+ }
+ if (*end == '/')
+ end++;
+ strcpy (end, &basesym[i]);
+ sympath = symbuf;
+ }
+ else
+ sympath = basesym;
+ }
+ else
+ sympath = buf;
+ if (symlink (sympath, dp->d_name) < 0)
+ mperror (dp->d_name);
+ }
+ }
+
+ closedir (df);
+ return 0;
+}
+
+int
+main (int ac, char *av[])
+{
+ char *prog_name = av[0];
+ char *fn, *tn;
+ struct stat fs, ts;
+
+ while (++av, --ac) {
+ if (strcmp(*av, "-silent") == 0)
+ silent = 1;
+ else if (strcmp(*av, "-ignorelinks") == 0)
+ ignore_links = 1;
+ else if (strcmp(*av, "-withrevinfo") == 0)
+ with_revinfo = 1;
+ else if (strcmp(*av, "--") == 0) {
+ ++av, --ac;
+ break;
+ }
+ else
+ break;
+ }
+
+ if (ac < 1 || ac > 2)
+ quit (1, "usage: %s [-silent] [-ignorelinks] fromdir [todir]",
+ prog_name);
+
+ fn = av[0];
+ if (ac == 2)
+ tn = av[1];
+ else
+ tn = ".";
+
+ /* to directory */
+ if (stat (tn, &ts) < 0)
+ quiterr (1, tn);
+#ifdef S_ISDIR
+ if (!(S_ISDIR(ts.st_mode)))
+#else
+ if (!(ts.st_mode & S_IFMT) == S_IFDIR)
+#endif
+ quit (2, "%s: Not a directory", tn);
+ if (chdir (tn) < 0)
+ quiterr (1, tn);
+
+ /* from directory */
+ if (stat (fn, &fs) < 0)
+ quiterr (1, fn);
+#ifdef S_ISDIR
+ if (!(S_ISDIR(fs.st_mode)))
+#else
+ if (!(fs.st_mode & S_IFMT) == S_IFDIR)
+#endif
+ quit (2, "%s: Not a directory", fn);
+
+ exit (dodir (fn, &fs, &ts, 0));
+}
diff --git a/nx-X11/config/util/lndir.man b/nx-X11/config/util/lndir.man
new file mode 100644
index 000000000..244e8a58f
--- /dev/null
+++ b/nx-X11/config/util/lndir.man
@@ -0,0 +1,119 @@
+.\" $Xorg: lndir.man,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $
+.\"
+.\" Copyright (c) 1993, 1994, 1998 The Open Group
+.\"
+.\" Permission to use, copy, modify, distribute, and sell this software and its
+.\" documentation for any purpose is hereby granted without fee, provided that
+.\" the above copyright notice appear in all copies and that both that
+.\" copyright notice and this permission notice appear in supporting
+.\" documentation.
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of The Open Group shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from The Open Group.
+.\"
+.\"
+.\" $XFree86: xc/config/util/lndir.man,v 1.3tsi Exp $
+.\"
+.TH LNDIR 1 __xorgversion__
+.SH NAME
+lndir \- create a shadow directory of symbolic links to another directory tree
+.SH SYNOPSIS
+.B lndir
+[
+.B \-silent
+] [
+.B \-ignorelinks
+] [
+.B \-withrevinfo
+]
+.I \|fromdir\|
+[
+.I todir
+]
+.SH DESCRIPTION
+The
+.I lndir
+program makes a shadow copy
+.I todir
+of a directory tree
+.I fromdir,
+except that the shadow is not
+populated with real files but instead with symbolic links pointing at
+the real files in the
+.I fromdir
+directory tree. This is usually useful for maintaining source code for
+different machine architectures. You create a shadow directory
+containing links to the real source, which you will have usually
+mounted from a remote machine. You can build in the shadow tree, and
+the object files will be in the shadow directory, while the
+source files in the shadow directory are just symlinks to the real
+files.
+.PP
+This scheme has the advantage that if you update the source, you need not
+propagate the change to the other architectures by hand, since all
+source in all shadow directories are symlinks to the real thing: just cd
+to the shadow directory and recompile away.
+.PP
+The
+.I todir
+argument is optional and defaults to the current directory. The
+.I fromdir
+argument may be relative (e.g., ../src) and is relative to
+.I todir
+(not the current directory).
+.PP
+.\" CVS.adm is used by the Concurrent Versions System.
+Note that BitKeeper, RCS, SCCS, .svn, CVS and CVS.adm directories are
+shadowed only if the \fB\-withrevinfo\fP flag is specified.
+.PP
+If you add files, simply run
+.I lndir
+again. New files will be silently added. Old files will be
+checked that they have the correct link.
+.PP
+Deleting files is a more painful problem; the symlinks will
+just point into never never land.
+.PP
+If a file in \fIfromdir\fP is a symbolic link, \fIlndir\fP will make
+the same link in \fItodir\fP rather than making a link back to the
+(symbolic link) entry in \fIfromdir.\fP The \fB\-ignorelinks\fP flag
+changes this behavior.
+.SH OPTIONS
+.IP \-silent
+Normally \fIlndir\fP outputs the name of each subdirectory as it
+descends into it. The \fB\-silent\fP option suppresses these status
+messages.
+.IP \-ignorelinks
+Causes the program to not treat symbolic links in \fIfromdir\fP
+specially. The link created in \fItodir\fP will point back to the
+corresponding (symbolic link) file in \fIfromdir\fP.
+If the link is to a directory, this is almost certainly the wrong thing.
+.IP
+This option exists mostly to emulate the behavior the C version of
+\fIlndir\fP had in X11R6. Its use is not recommended.
+.IP \-withrevinfo
+Causes any BitKeeper, RCS, SCCS, .svn, CVS and CVS.adm subdirectories to be
+treated as any other directory, rather than ignored.
+.SH DIAGNOSTICS
+The program displays the name of each subdirectory it enters, followed
+by a colon. The \fB\-silent\fP option suppresses these messages.
+.PP
+A warning message is displayed if the symbolic link cannot be created.
+The usual problem is that a regular file of the same name already
+exists.
+.PP
+If the link already exists but doesn't point to the correct file, the
+program prints the link name and the location where it does point.
diff --git a/nx-X11/config/util/makedef.cmd b/nx-X11/config/util/makedef.cmd
new file mode 100644
index 000000000..9d5d6decf
--- /dev/null
+++ b/nx-X11/config/util/makedef.cmd
@@ -0,0 +1,620 @@
+/* This is OS/2 REXX */
+/* $XFree86: xc/config/util/makedef.cmd,v 1.4 2003/11/12 00:10:24 dawes Exp $
+ *
+ * This file was taken from Odin32 project, modified to suit
+ * XFree86 4.x build process and then modified to suit
+ * the X.org monolithic build process for X11R6.7
+ *
+ * Generate *os2.def linker definition files for OS/2
+ */
+
+if RxFuncQuery('SysLoadFuncs')=1 THEN
+DO
+ call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs';
+ call SysLoadFuncs;
+END
+
+/*
+ * Set default parameter values.
+ */
+sLibrary = '';
+sDBFile = '';
+sOrdinals = 0;
+sASDFeatureId = '';
+sCountryCode = '';
+sDateTime = left(' 'date()' 'time(), 26);
+sDescription = 'X.Org 6.9';
+sFixPakVer = '';
+sHostname = strip(substr(VALUE('HOSTNAME',,'OS2ENVIRONMENT'), 1, 11));
+sLanguageCode = '';
+sMiniVer = '';
+sVendor = 'X.Org';
+sVersion = '6.9';
+
+
+/*
+ * Parse parameters.
+ */
+parse arg sArgs
+if (sArgs = '') then
+do
+ call syntax;
+ exit(1);
+end
+
+do while (sArgs <> '')
+ sArgs = strip(sArgs);
+ if (substr(sArgs, 1, 1) = '-' | substr(sArgs, 1, 1) = '/') then
+ do /*
+ * Option.
+ */
+ ch = translate(substr(sArgs, 2, 1));
+ if (pos(ch, 'ACDHLMNOPRTV') < 1) then
+ do
+ say 'invalid option:' substr(sArgs, 1, 2);
+ call syntax;
+ exit(2);
+ end
+
+ /* get value and advance sArgs to next or to end. */
+ if (substr(sArgs, 3, 1) = '"') then
+ do
+ iNext = pos('"', sArgs, 4);
+ fQuote = 1;
+ end
+ else
+ do
+ iNext = pos(' ', sArgs, 3);
+ if (iNext <= 0) then
+ iNext = length(sArgs);
+ fQuote = 0;
+ end
+
+ if (iNext > 3 | ch = 'R') then
+ do
+ sValue = substr(sArgs, 3 + fQuote, iNext - 3 - fQuote);
+ sArgs = strip(substr(sArgs, iNext+1));
+ /*say 'iNext:' iNext 'sValue:' sValue 'sArgs:' sArgs; */
+
+ /* check if we're gonna search for something in an file. */
+ if (sValue <> '' & pos('#define=', sValue) > 0) then
+ sValue = LookupDefine(sValue);
+ end
+ else
+ do
+ say 'syntax error near' substr(sArgs, 1, 2)'.';
+ call syntax;
+ exit(3);
+ end
+
+
+ /* set value */
+ select
+ when (ch = 'A') then /* ASD Feature Id */
+ sASDFeatureId = sValue;
+
+ when (ch = 'C') then /* Country code */
+ sCountryCode = sValue;
+
+ when (ch = 'D') then /* Description */
+ sDescription = sValue;
+
+ when (ch = 'H') then /* Hostname */
+ sHostname = sValue;
+
+ when (ch = 'L') then /* Language code */
+ sLanguageCode = sValue;
+
+ when (ch = 'M') then /* MiniVer */
+ sMiniVer = sValue;
+
+ when (ch = 'N') then /* Vendor */
+ sVendor = sValue;
+
+ when (ch = 'O') then /* Ordinals */
+ sOrdinals = 1;
+
+ when (ch = 'R') then /* Vendor */
+ sDescription = ReadDescription(sValue, sDefFile);
+
+ when (ch = 'P') then /* Fixpak version */
+ sFixPakVer = sValue;
+
+ when (ch = 'T') then /* Date Time */
+ sDateTime = sValue;
+
+ when (ch = 'V') then /* Version */
+ sVersion = sValue;
+
+ /* Otherwise it's an illegal option */
+ otherwise:
+ say 'invalid option:' substr(sArgs, 1, 2);
+ call syntax;
+ exit(2);
+ end /* select */
+ end
+ else
+ do /*
+ * Table file name, typically xc/config/cf/os2def.db
+ */
+ if (sLibrary <> '') then
+ do
+ say 'Syntax error: Can''t specify more than two files!';
+ exit(4);
+ end
+ if (sDBFile = '') then
+ parse value sArgs with sDBFile' 'sArgs
+ else
+ parse value sArgs with sLibrary' 'sArgs
+ sArgs = strip(sArgs);
+ end
+end
+
+/* check that a definition file was specified. */
+if (sLibrary = '') then
+do
+ say 'Syntax error: Will have to specify a library stem.';
+ call syntax;
+ exit(5);
+end
+
+
+/*
+ * Trim strings to correct lengths.
+ */
+sVendor = strip(substr(sVendor, 1, 31));
+if (substr(sDateTime, 1, 1) <> ' ') then
+ sDateTime = ' ' || sDateTime;
+sDateTime = left(sDateTime, 26);
+sHostname = strip(substr(sHostname, 1, 11));
+sMiniVer = strip(substr(sMiniVer, 1, 11));
+sDescription = strip(substr(sDescription, 1, 80));
+sCountryCode = strip(substr(sCountryCode, 1, 4));
+sLanguageCode = strip(substr(sLanguageCode, 1, 4));
+sASDFeatureId = strip(substr(sASDFeatureId, 1, 11));
+sFixPakVer = strip(substr(sFixPakVer, 1, 11));
+
+/* load database file, only accept lines for the specified sLibrary */
+ordHash.0 = 0
+sRealName = ''
+sInitTerm = 0
+
+rc = LoadDBFile(sDBFile,sLibrary)
+
+/* engage gcc to parse the corresponding -def.cpp file */
+'@gcc -E -D__UNIXOS2__ 'sLibrary'-def.cpp >tmpos2.def'
+
+/* Signature */
+sEnhSign = '##1##'
+
+/*
+ * Build description string.
+ */
+sDescription = '@#'sVendor':'sVersion'#@'sEnhSign||,
+ sDateTime||sHostname||,
+ ':'sASDFeatureId':'sLanguageCode':'sCountryCode':'sMiniVer||,
+ '::'sFixPakVer'@@'sDescription;
+
+/*
+ * Update .def-file.
+ */
+rc = UpdateDefFile(sLibrary,sDescription,sRealName,sOrdinals,sInitTerm);
+call SysFileDelete('tmpos2.def')
+
+exit(rc);
+
+LoadDBFile: procedure expose ordHash. sRealname sInitTerm
+ parse arg dbfile,libname;
+
+ rc = stream(dbfile, 'c', 'open read');
+ if (pos('READY', rc) <> 1) then
+ do
+ say 'error: failed to open 'dbfile;
+ exit(-1);
+ end
+ do while (lines(dbfile) > 0)
+ line = translate(strip(linein(dbfile)),' ',' ');
+ if pos(';',line) > 0 then iterate;
+ if pos('LIBRARY',line) > 0 then do
+ if word(line,2) = libname then do
+ sRealname = word(line,3)
+ if word(line,4) <> '' then
+ sInitTerm = 1
+ end
+ iterate
+ end
+ if word(line,1) = libname then do
+ name = word(line,2)
+ ordHash.name = word(line,3)
+ end
+ end
+ rc = stream(dbfile,'c','close')
+ return rc
+
+/**
+ * Display script syntax.
+ */
+syntax: procedure
+ say 'Syntax: MakeDef.cmd [options] <dbfile> <libname> [options]'
+ say ' <dbfile> Ordinals database.'
+ say ' <libname> Library stem'
+ say 'Options:'
+ say ' -A<string> ASD Feature Id.'
+ say ' -C<string> Country code.'
+ say ' -D<string> Description.'
+ say ' -O<string> Ordinals definition file.'
+ say ' -R[deffile] Read description from .def file.'
+ say ' -H<string> Hostname.'
+ say ' -L<string> Language code.'
+ say ' -M<string> MiniVer.'
+ say ' -N<string> Vendor.'
+ say ' -P<string> Fixpak version.'
+ say ' -T<string> Date Time.'
+ say ' -V<string> Version.'
+ say '<string> could be a double quoted string or a single word.'
+ say ' You could also reference #defines in C/C++ include files.'
+ say ' The string should then have this form:'
+ say ' "#define=<DEFINE_NAME>,<includefile.h>"'
+ say '';
+
+ return;
+
+
+/**
+ * Search for a #define in an C/C++ header or source file.
+ *
+ * @returns String containing the defined value
+ * found for the define in the header file.
+ * Quits on fatal errors.
+ * @param A string on the form: "#define=DEFINETOFIND,includefile.h"
+ * @remark Write only code... - let's hope it works.
+ */
+LookupDefine: procedure
+ parse arg '#'sDefine'='sMacro','sIncludeFile
+
+ /*
+ * Validate parameters.
+ */
+ sMacro = strip(sMacro);
+ sIncludeFile = strip(sIncludeFile);
+ if (sMacro = '') then
+ do
+ say 'syntax error: #define=<DEFINE_NAME>,<includefile.h>.';
+ say ' <DEFINE_NAME> was empty.';
+ exit(-20);
+ end
+ if (sIncludeFile = '') then
+ do
+ say 'syntax error: #define=<DEFINE_NAME>,<includefile.h>.';
+ say ' <includefile.h> was empty.';
+ exit(-20);
+ end
+
+
+ sIllegal = translate(translate(sMacro),,
+ '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!',,
+ 'ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890_');
+
+ if (strip(translate(sIllegal, ' ', '!')) <> '') then
+ do
+ say 'syntax error: #define=<DEFINE_NAME>,<includefile.h>.';
+ say ' <DEFINE_NAME> contains illegal charater(s).'
+ say ' 'sMacro;
+ say ' 'translate(sIllegal, ' ', '!');
+ exit(-20);
+ end
+
+ /*
+ * Open include file.
+ */
+ sRc = stream(sIncludeFile, 'c', 'open read');
+ if (pos('READY', sRc) <> 1) then
+ do /* search INCLUDE variable */
+ sFile = SysSearchPath('INCLUDE', sIncludeFile);
+ if (sFile = '') then
+ do
+ say 'Can''t find include file 'sIncludeFile'.';
+ exit(-20);
+ end
+ sIncludeFile = sFile;
+
+ sRc = stream(sIncludeFile, 'c', 'open read');
+ if (pos('READY', sRc) <> 1) then
+ do
+ say 'Failed to open include file' sIncludeFile'.';
+ exit(-20);
+ end
+ end
+
+ /*
+ * Search the file line by line.
+ * We'll check for lines starting with a hash (#) char.
+ * Then check that the word after the hash is 'define'.
+ * Then match the next word with the macro name.
+ * Then then get the next rest of the line to comment or continuation char.
+ * (continuation is not supported)
+ * Finally strip quotes.
+ */
+ sValue = '';
+ do while (lines(sIncludeFile) > 0)
+ sLine = strip(linein(sIncludeFile));
+ if (sLine = '') then
+ iterate;
+ if (substr(sLine, 1, 1) <> '#') then
+ iterate;
+ sLine = substr(sLine, 2);
+ if (word(sLine, 1) <> 'define') then
+ iterate;
+ sLine = strip(substr(sLine, wordpos(sLine, 1) + length('define')+1));
+ if ( substr(sLine, 1, length(sMacro)) <> sMacro,
+ | substr(sLine, length(sMacro)+1, 1) <> ' ') then
+ iterate;
+ sLine = strip(substr(sLine, length(sMacro) + 1));
+ if (sLine = '') then
+ do
+ say 'error: #define' sMacro' is empty.';
+ call stream sIncludeFile, 'c', 'close';
+ exit(-20);
+ end
+
+ chQuote = substr(sLine, 1, 1);
+ if (chQuote = '"' | chQuote = "'") then
+ do /* quoted string */
+ iLastQuote = 0;
+ do forever
+ iLast = pos(chQuote, sLine, 2);
+ if (iLast <= 0) then
+ leave;
+ if (substr(sLine, iLast, 1) = '\') then
+ iterate;
+ iLastQuote = iLast;
+ leave;
+ end
+
+ if (iLastQuote <= 0) then
+ do
+ say 'C/C++ syntax error in 'sIncludefile': didn''t find end quote.';
+ call stream sIncludeFile, 'c', 'close';
+ exit(-20);
+ end
+
+ call stream sIncludeFile, 'c', 'close';
+ sValue = substr(sLine, 2, iLastQuote - 2);
+ say 'Found 'sMacro'='sValue;
+ return sValue;
+ end
+ else
+ do
+ iCommentCPP = pos('//',sLine);
+ iCommentC = pos('/*',sLine);
+ if (iCommentC > 0 & iCommentCPP > 0 & iCommentC > iCommentCPP) then
+ iComment = iCommentCPP;
+ else if (iCommentC > 0 & iCommentCPP > 0 & iCommentC < iCommentCPP) then
+ iComment = iCommentC;
+ else if (iCommentCPP > 0) then
+ iComment = iCommentCPP;
+ else if (iCommentC > 0) then
+ iComment = iCommentC;
+ else
+ iComment = 0;
+
+ if (iComment > 0) then
+ sValue = strip(substr(sLine, 1, iComment-1));
+ else
+ sValue = strip(sLine);
+
+ if (sValue <> '') then
+ do
+ if (substr(sValue, length(sValue)) = '\') then
+ do
+ say 'Found continuation char: Multiline definitions are not supported!\n';
+ call stream sIncludeFile, 'c', 'close';
+ exit(-20);
+ end
+ end
+
+ if (sValue = '') then
+ say 'warning: The #define has no value.';
+
+ call stream sIncludeFile, 'c', 'close';
+ say 'Found 'sMacro'='sValue;
+ return sValue;
+ end
+ end
+
+ call stream sIncludeFile, 'c', 'close';
+ say 'error: didn''t find #define' sMacro'.';
+ exit(-20);
+
+
+
+/**
+ * Reads the description line for a .def-file.
+ * @returns The Description string, with quotes removed.
+ * Empty string is acceptable.
+ * On error we'll terminate the script.
+ * @param sDefFile Filename of .def-file to read the description from.
+ * @param sDefFile2 Used if sDefFile is empty.
+ * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
+ */
+ReadDescription: procedure;
+ parse arg sDefFile, sDefFile2
+
+ /*
+ * Validate parameters.
+ */
+ if (sDefFile = '') then
+ sDefFile = sDefFile2;
+ if (sDefFile = '') then
+ do
+ say 'error: no definition file to get description from.'
+ exit(-1);
+ end
+
+ /*
+ * Open file
+ */
+ rc = stream(sDefFile, 'c', 'open read');
+ if (pos('READY', rc) <> 1) then
+ do
+ say 'error: failed to open deffile file.';
+ exit(-1);
+ end
+
+
+ /*
+ * Search for the 'DESCRIPTION' line.
+ */
+ do while (lines(sDefFile) > 0)
+ sLine = strip(linein(sDefFile));
+ if (sLine = '') then
+ iterate;
+ if (translate(word(sLine, 1)) <> 'DESCRIPTION') then
+ iterate;
+ sLine = strip(substr(sLine, wordpos(sLine, 1) + length('DESCRIPTION')+1));
+
+ ch = substr(sLine, 1, 1);
+ if (ch <> "'" & ch <> '"') then
+ do
+ say 'syntax error: description line in' sDefFile 'is misformed.';
+ call stream sDefFile, 'c', 'close';
+ exit(-10);
+ end
+
+ iEnd = pos(ch, sLine, 2);
+ if (iEnd <= 0) then
+ do
+ say 'syntax error: description line in' sDefFile 'is misformed.';
+ call stream sDefFile, 'c', 'close';
+ exit(-10);
+ end
+
+ call stream sDefFile, 'c', 'close';
+ sValue = substr(sLine, 2, iEnd - 2);
+ say 'Found Description:' sValue;
+ return sValue;
+ end
+
+ call stream sDefFile, 'c', 'close';
+ say 'info: Didn''t find description line in' sDefFile'.';
+ return '';
+
+AddCodeDataSection: procedure
+ parse arg outfile;
+ call lineout outfile,"CODE PRELOAD";
+ call lineout outfile,"DATA MULTIPLE NONSHARED";
+ return '';
+
+findOrdinal: procedure expose ordHash.
+ parse arg line,sOrdinal;
+ line = strip(line,,' ');
+ line = word(translate(strip(line),' ','='),1)
+ if (sOrdinal) then do
+ ordinal = ordHash.line;
+ if (ordinal = 'ORDHASH.'line) then do
+ say 'Oops: DB lacks ordinal for symbol "'line'" Create one!'
+ return ' 'line
+ end
+ else
+ return ' 'line' @ 'ordinal
+ end
+ else
+ return ' 'line
+/**
+ * This is a function which reads sLibrary into an
+ * internal array and changes the DESCRIPTION text if found.
+ * If DESCRIPTION isn't found, it is added at the end.
+ * The array is written to sDBFile.
+ * @returns 0 on succes.
+ * Errorcode on error.
+ * @param sLibrary library stem
+ * @param sDescription New description string.
+ * @param sRealname real 8.3 name of library
+ * @param sOrdinals flag to denote generation of ordinals
+ * @param sInitTerm flag to denote adding INITINSTANCE/TERM... qualifiers
+ * @author knut st. osmundsen (knut.stange.osmundsen@mynd.no)
+ * @author heavily modified by Platon & Holger
+ */
+UpdateDefFile: procedure expose ordHash.;
+ parse arg sLibrary, sDescription, sRealname, sOrdinals, sInitTerm
+
+ initterm = ''
+ if sInitTerm = 1 then initterm = 'INITINSTANCE TERMINSTANCE'
+
+ /* Open input file. */
+ infile = 'tmpos2.def'
+ rc = stream(infile, 'c', 'open read');
+ if (pos('READY', rc) <> 1) then do
+ say 'error: failed to open' infile 'file.';
+ return 110;
+ end
+ /* open output file. */
+ if sOrdinals = 1 then
+ outfile = sLibrary'o_os2.def'
+ else
+ outfile = sLibrary'os2.def'
+ call SysFileDelete(outfile)
+ rc = stream(outfile, 'c', 'open write');
+ if (pos('READY', rc) <> 1) then do
+ say 'error: failed to open outputfile' outfile 'file.';
+ return 110;
+ end
+ call lineout outfile, '; Created by makedef.cmd on' date() time()'. Do not edit.', 1;
+
+ /*
+ * Search for the specific lines.
+ */
+ fDescription = 0;
+ fExports = 0;
+ fWinLib = 0;
+ do while (lines(infile) > 0)
+ line = strip(linein(infile));
+ line = strip(line,,' ');
+ if line = '' then iterate;
+ if pos('#',line) = 1 then iterate;
+ if pos(';',line) = 1 then iterate;
+ if pos('/*',line) = 1 then iterate;
+
+ firstsym = translate(word(line,1))
+ if firstsym = 'LIBRARY' then do
+ call lineout outfile,'LIBRARY 'sRealName' 'initterm
+ iterate
+ end
+ if firstsym = 'VERSION' then do
+ call lineout outfile, 'DESCRIPTION "'sDescription sLibrary'"'
+ fDescription = 1;
+ AddCodeDataSection(outfile);
+ end
+ if (firstsym = 'EXPORTS') then do
+ call lineout outfile,'EXPORTS'
+ fExports = 1;
+ iterate;
+ end
+ if (fExports) then do
+ call lineout outfile, findOrdinal(line,sOrdinals);
+ iterate;
+ end
+ end
+
+ /*
+ * Add description is none was found.
+ */
+ if (\fDescription) then
+ do
+ call lineout outfile,"DESCRIPTION '"||sDescription sLibrary||"'";
+ AddCodeDataSection(outfile);
+ end
+
+ /*
+ * Close input file and open output file.
+ */
+ call stream outfile, 'c', 'close';
+ call stream infile, 'c', 'close';
+ if sOrdinals = 1 then do
+ call SysFileDelete('dll.name');
+ call stream 'dll.name', 'c', 'open write';
+ call charout 'dll.name', sRealName".dll";
+ call stream 'dll.name', 'c'. 'close';
+ end
+ return 0;
+
diff --git a/nx-X11/config/util/makeg.man b/nx-X11/config/util/makeg.man
new file mode 100644
index 000000000..815031d94
--- /dev/null
+++ b/nx-X11/config/util/makeg.man
@@ -0,0 +1,64 @@
+.\" $Xorg: makeg.man,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $
+.\" Copyright (c) 1996, 1998 The Open Group
+.\"
+.\" Permission to use, copy, modify, distribute, and sell this software and its
+.\" documentation for any purpose is hereby granted without fee, provided that
+.\" the above copyright notice appear in all copies and that both that
+.\" copyright notice and this permission notice appear in supporting
+.\" documentation.
+.\"
+.\" The above copyright notice and this permission notice shall be
+.\" included in all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+.\" EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+.\" IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+.\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+.\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+.\" OTHER DEALINGS IN THE SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of The Open Group shall
+.\" not be used in advertising or otherwise to promote the sale, use or
+.\" other dealings in this Software without prior written authorization
+.\" from The Open Group.
+.\"
+.\"
+.\" $XFree86: xc/config/util/makeg.man,v 1.2 2001/01/27 18:19:55 dawes Exp $
+.\"
+.TH MAKEG 1 __xorgversion__
+.SH NAME
+makeg \- make a debuggable executable
+.SH SYNOPSIS
+.B makeg
+[
+.I make-options .\|.\|.
+] [
+.I targets .\|.\|.
+]
+.SH DESCRIPTION
+The
+.I makeg
+script runs
+.I make,
+passing it variable settings to create a debuggable target when used
+with a Makefile generated by
+.I imake.
+For example, it arranges for the C compiler to be called with the
+.B \-g
+option.
+.SH ENVIRONMENT
+.TP 8
+.B MAKE
+The
+.I make
+program to use. Default ``make''.
+.TP 8
+.B GDB
+Set to a non-null value if using the
+.I gdb
+debugger on Solaris 2, which requires additional debugging options to
+be passed to the compiler.
+.SH "SEE ALSO"
+.I make (1),
+.I imake (1)
diff --git a/nx-X11/config/util/makeg.sh b/nx-X11/config/util/makeg.sh
new file mode 100644
index 000000000..38be8c9e2
--- /dev/null
+++ b/nx-X11/config/util/makeg.sh
@@ -0,0 +1,13 @@
+#! /bin/sh
+# makeg - run "make" with options necessary to make a debuggable executable
+# $Xorg: makeg.sh,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+
+# set GDB=1 in your environment if using gdb on Solaris 2.
+
+make="${MAKE-make}"
+flags="CDEBUGFLAGS=-g CXXDEBUGFLAGS=-g"
+
+# gdb on Solaris needs the stabs included in the executable
+test "${GDB+yes}" = yes && flags="$flags -xs"
+
+exec "$make" $flags LDSTRIPFLAGS= ${1+"$@"}
diff --git a/nx-X11/config/util/makestrs.c b/nx-X11/config/util/makestrs.c
new file mode 100644
index 000000000..af4b69619
--- /dev/null
+++ b/nx-X11/config/util/makestrs.c
@@ -0,0 +1,752 @@
+/* $XdotOrg: xc/config/util/makestrs.c,v 1.4 2005/05/24 15:58:51 ago Exp $ */
+
+/*
+
+Copyright (c) 1991, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+*/
+/* $XFree86: xc/config/util/makestrs.c,v 3.6 2001/07/25 15:04:41 dawes Exp $ */
+
+/* Constructs string definitions */
+
+#include <stdio.h>
+#include <X11/Xos.h>
+#include <stdlib.h>
+#include <unistd.h>
+#if defined(macII) && !defined(__STDC__) /* stdlib.h fails to define these */
+char *malloc();
+#endif /* macII */
+
+typedef struct _TableEnt {
+ struct _TableEnt* next;
+ char* left;
+ char* right;
+ int offset;
+} TableEnt;
+
+typedef struct _Table {
+ struct _Table* next;
+ TableEnt* tableent;
+ TableEnt* tableentcurrent;
+ TableEnt** tableenttail;
+ char* name;
+ int offset;
+} Table;
+
+typedef struct _File {
+ struct _File* next;
+ FILE* tmpl;
+ char* name;
+ Table* table;
+ Table* tablecurrent;
+ Table** tabletail;
+} File;
+
+static File* file = NULL;
+static File* filecurrent = NULL;
+static File** filetail = &file;
+static char* conststr;
+static char* prefixstr = NULL;
+static char* featurestr = NULL;
+static char* ctmplstr = NULL;
+static char* fileprotstr;
+static char* externrefstr;
+static char* externdefstr;
+
+#ifndef FALSE
+# define FALSE 0
+# define TRUE !(FALSE)
+#endif
+
+static int solaris_abi_names = FALSE;
+
+#define X_DEFAULT_ABI 0
+#define X_ARRAYPER_ABI 1
+#define X_INTEL_ABI 2
+#define X_INTEL_ABI_BC 3
+#define X_SPARC_ABI 4
+#define X_FUNCTION_ABI 5
+
+#define X_MAGIC_STRING "<<<STRING_TABLE_GOES_HERE>>>"
+
+/* Wrapper for fopen()
+ * Prepend filename with an includedir which can be specified on the
+ * commandline. Needed to separate source and build directories.
+ */
+static char* includedir = NULL;
+static FILE *ifopen(const char *file, const char *mode)
+{
+ size_t len;
+ char *buffer;
+ FILE *ret;
+
+ if (includedir == NULL)
+ return fopen(file, mode);
+
+ len = strlen(file) + strlen(includedir) + 1;
+ buffer = (char*)malloc(len + 1);
+ if (buffer == NULL)
+ return NULL;
+
+ strcpy(buffer, includedir);
+ strcat(buffer, "/");
+ strcat(buffer, file);
+
+ ret = fopen(buffer, mode);
+
+ free(buffer);
+ return ret;
+}
+
+static void WriteHeaderProlog (FILE *f, File *phile)
+{
+ Table* t;
+ TableEnt* te;
+
+ (void) fprintf (f, "#ifdef %s\n", featurestr);
+ for (t = phile->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next) {
+ if (strcmp (te->left, "RAtom") == 0) {
+ (void) fprintf (f,
+ "#ifndef %s%s\n#define %s%s \"%s\"\n#endif\n",
+ prefixstr, te->left, prefixstr, te->left, te->right);
+ } else {
+ (void) fprintf (f,
+ "#define %s%s \"%s\"\n",
+ prefixstr, te->left, te->right);
+ }
+ }
+ (void) fprintf (f, "%s", "#else\n");
+}
+
+static void IntelABIWriteHeader (FILE *f, File *phile)
+{
+ Table* t;
+ TableEnt* te;
+
+ WriteHeaderProlog (f, phile);
+
+ for (t = phile->table; t; t = t->next) {
+ (void) fprintf (f, "%s %sConst char %s[];\n",
+ externrefstr, conststr ? conststr : fileprotstr, t->name);
+ for (te = t->tableent; te; te = te->next)
+ (void) fprintf (f,
+ "#ifndef %s%s\n#define %s%s ((char*)&%s[%d])\n#endif\n",
+ prefixstr, te->left, prefixstr, te->left, t->name, te->offset);
+ }
+
+ (void) fprintf (f, "#endif /* %s */\n", featurestr);
+}
+
+static void SPARCABIWriteHeader (FILE *f, File *phile)
+{
+ Table* t;
+ TableEnt* te;
+
+ for (t = phile->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next)
+ (void) fprintf (f, "#define %s%s \"%s\"\n",
+ prefixstr, te->left, te->right);
+}
+
+static void FunctionWriteHeader (FILE *f, File *phile)
+{
+ Table* t;
+ TableEnt* te;
+
+ WriteHeaderProlog (f, phile);
+
+ (void) fprintf (f, "%s %sConst char* %s();\n",
+ externrefstr, conststr ? conststr : fileprotstr,
+ phile->table->name);
+
+ for (t = phile->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next)
+ (void) fprintf (f,
+ "#ifndef %s%s\n#define %s%s (%s(%d))\n#endif\n",
+ prefixstr, te->left, prefixstr, te->left, phile->table->name,
+ te->offset);
+
+ (void) fprintf (f, "#endif /* %s */\n", featurestr);
+}
+
+static void ArrayperWriteHeader (FILE *f, File *phile)
+{
+ Table* t;
+ TableEnt* te;
+
+ WriteHeaderProlog (f, phile);
+
+ for (t = phile->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next)
+ (void) fprintf (f,
+ "#ifndef %s%s\n%s %sConst char %s%s[];\n#endif\n",
+ prefixstr, te->left,
+ externrefstr, conststr ? conststr : fileprotstr,
+ prefixstr, te->left);
+
+ (void) fprintf (f, "#endif /* %s */\n", featurestr);
+}
+
+static void DefaultWriteHeader (FILE *f, File *phile)
+{
+ Table* t;
+ TableEnt* te;
+
+ WriteHeaderProlog (f, phile);
+
+ (void) fprintf (f, "%s %sConst char %s[];\n",
+ externrefstr, conststr ? conststr : fileprotstr,
+ phile->table->name);
+
+ for (t = phile->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next)
+ (void) fprintf (f,
+ "#ifndef %s%s\n#define %s%s ((char*)&%s[%d])\n#endif\n",
+ prefixstr, te->left, prefixstr, te->left, phile->table->name,
+ te->offset);
+
+ (void) fprintf (f, "#endif /* %s */\n", featurestr);
+}
+
+static void CopyTmplProlog (FILE *tmpl, FILE *f)
+{
+ char buf[1024];
+ static char* magic_string = X_MAGIC_STRING;
+ int magic_string_len = strlen (magic_string);
+
+ while (fgets (buf, sizeof buf, tmpl)) {
+ if (strncmp (buf, magic_string, magic_string_len) == 0) {
+ return;
+ }
+ (void) fputs (buf, f);
+ }
+}
+
+static void CopyTmplEpilog (FILE *tmpl, FILE *f)
+{
+ char buf[1024];
+
+ while (fgets (buf, sizeof buf, tmpl))
+ (void) fputs (buf, f);
+}
+
+static char* abistring[] = {
+ "Default", "Array per string", "Intel", "Intel BC", "SPARC", "Function" };
+
+static void WriteHeader (char *tagline, File *phile, int abi)
+{
+ FILE* f;
+ char* tmp;
+ static void (*headerproc[])(FILE *f, File *phile) = {
+ DefaultWriteHeader, ArrayperWriteHeader,
+ IntelABIWriteHeader, IntelABIWriteHeader,
+ SPARCABIWriteHeader, FunctionWriteHeader };
+
+ if ((f = fopen (phile->name, "w+")) == NULL) exit (1);
+
+ if (phile->tmpl) CopyTmplProlog (phile->tmpl, f);
+
+ (void) fprintf (f,
+ "%s\n%s\n/* %s ABI version -- Do not edit */\n",
+ "/* $Xorg: makestrs.c,v 1.6 2001/02/09 02:03:17 xorgcvs Exp $ */",
+ "/* This file is automatically generated. */",
+ abistring[abi]);
+
+ if (tagline) (void) fprintf (f, "/* %s */\n\n", tagline);
+
+ /* do the right thing for Motif, i.e. avoid _XmXmStrDefs_h_ */
+ if (strcmp (prefixstr, "Xm") == 0) {
+ if ((fileprotstr = malloc (strlen (phile->name) + 3)) == NULL)
+ exit (1);
+ (void) sprintf (fileprotstr, "_%s_", phile->name);
+ } else {
+ if ((fileprotstr = malloc (strlen (phile->name) + strlen (prefixstr) + 3)) == NULL)
+ exit (1);
+ (void) sprintf (fileprotstr, "_%s%s_", prefixstr, phile->name);
+ }
+
+ for (tmp = fileprotstr; *tmp; tmp++) if (*tmp == '.') *tmp = '_';
+
+ (*headerproc[abi])(f, phile);
+
+ if (phile->tmpl) CopyTmplEpilog (phile->tmpl, f);
+
+ (void) free (fileprotstr);
+ (void) fclose (phile->tmpl);
+ (void) fclose (f);
+}
+
+static void WriteSourceLine (TableEnt *te, int abi, int fudge)
+{
+ char* c;
+
+ for (c = te->right; *c; c++) (void) printf ("'%c',", *c);
+ (void) printf ("%c", '0');
+ if (te->next || fudge) (void) printf ("%c", ',');
+ (void) printf ("%s", "\n");
+}
+
+static char* const_string = "%s %sConst char %s[] = {\n";
+
+static void IntelABIWriteSource (int abi)
+{
+ File* phile;
+
+ for (phile = file; phile; phile = phile->next) {
+ Table* t;
+ TableEnt* te;
+
+ for (t = phile->table; t; t = t->next) {
+ (void) printf (const_string, externdefstr,
+ conststr ? conststr : "", t->name);
+ for (te = t->tableent; te; te = te->next)
+ WriteSourceLine (te, abi, 0);
+ (void) printf ("%s\n\n", "};");
+ }
+ }
+}
+
+static void IntelABIBCWriteSource (int abi)
+{
+ File* phile;
+
+ for (phile = file; phile; phile = phile->next) {
+ Table* t;
+ TableEnt* te;
+
+ (void) printf (const_string, externdefstr,
+ conststr ? conststr : "", phile->table->name);
+
+ for (t = phile->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next)
+ WriteSourceLine (te, abi, t->next ? 1 : 0);
+ (void) printf ("%s\n\n", "};");
+
+ if (phile->table->next) {
+ (void) printf (const_string, externdefstr,
+ conststr ? conststr : "", phile->table->next->name);
+ for (t = phile->table->next; t; t = t->next)
+ for (te = t->tableent; te; te = te->next)
+ WriteSourceLine (te, abi, 0);
+ (void) printf ("%s\n\n", "};");
+ }
+ }
+}
+
+static void FunctionWriteSource (int abi)
+{
+ File* phile;
+
+ for (phile = file; phile; phile = phile->next) {
+ Table* t;
+ TableEnt* te;
+
+ (void) printf ("static %sConst char _%s[] = {\n",
+ conststr ? conststr : "", phile->table->name);
+
+ for (t = phile->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next)
+ WriteSourceLine (te, abi, t->next ? 1 : 0);
+ (void) printf ("%s\n\n", "};");
+
+ (void) printf ("%sConst char* %s(index)\n int index;\n{\n return &_%s[index];\n}\n\n",
+ conststr ? conststr : "",
+ phile->table->name, phile->table->name);
+ }
+}
+
+static void ArrayperWriteSource (int abi)
+{
+ File* phile;
+ static int done_atom;
+
+ for (phile = file; phile; phile = phile->next) {
+ Table* t;
+ TableEnt* te;
+
+ for (t = phile->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next) {
+ if (strcmp (te->left, "RAtom") == 0) {
+ if (done_atom) return;
+ done_atom = 1;
+ }
+ (void) printf ("%s %sConst char %s%s[] = \"%s\";\n",
+ externdefstr, conststr ? conststr : "",
+ prefixstr,
+ te->left, te->right);
+ }
+ }
+}
+
+static void DefaultWriteSource (int abi)
+{
+ File* phile;
+
+ for (phile = file; phile; phile = phile->next) {
+ Table* t;
+ TableEnt* te;
+
+ (void) printf (const_string, externdefstr, conststr ? conststr : "",
+ phile->table->name);
+
+ for (t = phile->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next)
+ WriteSourceLine (te, abi, t->next ? 1 : 0);
+ (void) printf ("%s\n\n", "};");
+ }
+}
+
+static void WriteSource(char *tagline, int abi)
+{
+ static void (*sourceproc[])(int) = {
+ DefaultWriteSource, ArrayperWriteSource,
+ IntelABIWriteSource, IntelABIBCWriteSource,
+ DefaultWriteSource, FunctionWriteSource };
+
+ FILE* tmpl;
+
+ if (ctmplstr) {
+ tmpl = ifopen (ctmplstr, "r");
+
+ if (tmpl) CopyTmplProlog (tmpl, stdout);
+ else {
+ (void) fprintf (stderr, "Expected template %s, not found\n",
+ ctmplstr);
+ exit (1);
+ }
+ } else
+ tmpl = NULL;
+
+
+ (void) printf ("%s\n%s\n/* %s ABI version -- Do not edit */\n",
+ "/* $Xorg: makestrs.c,v 1.6 2001/02/09 02:03:17 xorgcvs Exp $ */",
+ "/* This file is automatically generated. */",
+ abistring[abi]);
+
+ if (tagline) (void) printf ("/* %s */\n\n", tagline);
+
+ (*sourceproc[abi])(abi);
+
+ if (tmpl) CopyTmplEpilog (tmpl, stdout);
+}
+
+static void DoLine(char *buf)
+{
+#define X_NO_TOKEN 0
+#define X_FILE_TOKEN 1
+#define X_TABLE_TOKEN 2
+#define X_PREFIX_TOKEN 3
+#define X_FEATURE_TOKEN 4
+#define X_EXTERNREF_TOKEN 5
+#define X_EXTERNDEF_TOKEN 6
+#define X_CTMPL_TOKEN 7
+#define X_HTMPL_TOKEN 8
+#define X_CONST_TOKEN 9
+
+ int token;
+ char lbuf[1024];
+ static char* file_str = "#file";
+ static char* table_str = "#table";
+ static char* prefix_str = "#prefix";
+ static char* feature_str = "#feature";
+ static char* externref_str = "#externref";
+ static char* externdef_str = "#externdef";
+ static char* ctmpl_str = "#ctmpl";
+ static char* htmpl_str = "#htmpl";
+ static char* const_str = "#const";
+
+ if (strncmp (buf, file_str, strlen (file_str)) == 0)
+ token = X_FILE_TOKEN;
+ else if (strncmp (buf, table_str, strlen (table_str)) == 0)
+ token = X_TABLE_TOKEN;
+ else if (strncmp (buf, prefix_str, strlen (prefix_str)) == 0)
+ token = X_PREFIX_TOKEN;
+ else if (strncmp (buf, feature_str, strlen (feature_str)) == 0)
+ token = X_FEATURE_TOKEN;
+ else if (strncmp (buf, externref_str, strlen (externref_str)) == 0)
+ token = X_EXTERNREF_TOKEN;
+ else if (strncmp (buf, externdef_str, strlen (externdef_str)) == 0)
+ token = X_EXTERNDEF_TOKEN;
+ else if (strncmp (buf, ctmpl_str, strlen (ctmpl_str)) == 0)
+ token = X_CTMPL_TOKEN;
+ else if (strncmp (buf, htmpl_str, strlen (htmpl_str)) == 0)
+ token = X_HTMPL_TOKEN;
+ else if (strncmp (buf, const_str, strlen (const_str)) == 0)
+ token = X_CONST_TOKEN;
+ else
+ token = X_NO_TOKEN;
+
+ switch (token) {
+ case X_FILE_TOKEN:
+ {
+ File* phile;
+
+ if ((phile = (File*) malloc (sizeof(File))) == NULL)
+ exit(1);
+ if ((phile->name = malloc (strlen (buf + strlen (file_str)) + 1)) == NULL)
+ exit(1);
+ (void) strcpy (phile->name, buf + strlen (file_str) + 1);
+ phile->table = NULL;
+ phile->tablecurrent = NULL;
+ phile->tabletail = &phile->table;
+ phile->next = NULL;
+ phile->tmpl = NULL;
+
+ *filetail = phile;
+ filetail = &phile->next;
+ filecurrent = phile;
+ }
+ break;
+ case X_TABLE_TOKEN:
+ {
+ Table* table;
+ if ((table = (Table*) malloc (sizeof(Table))) == NULL)
+ exit(1);
+ if ((table->name = malloc (strlen (buf + strlen (table_str)) + 1)) == NULL)
+ exit(1);
+ (void) strcpy (table->name, buf + strlen (table_str) + 1);
+ if (solaris_abi_names) {
+ if (strcmp(table->name, "XtStringsR6") == 0) {
+ strcpy(table->name, "XtR6Strings");
+ } else if (strcmp(table->name, "XtShellStringsR6") == 0) {
+ strcpy(table->name, "XtR6ShellStrings");
+ }
+ }
+ table->tableent = NULL;
+ table->tableentcurrent = NULL;
+ table->tableenttail = &table->tableent;
+ table->next = NULL;
+ table->offset = 0;
+
+ *filecurrent->tabletail = table;
+ filecurrent->tabletail = &table->next;
+ filecurrent->tablecurrent = table;
+ }
+ break;
+ case X_PREFIX_TOKEN:
+ if ((prefixstr = malloc (strlen (buf + strlen (prefix_str)) + 1)) == NULL)
+ exit(1);
+ (void) strcpy (prefixstr, buf + strlen (prefix_str) + 1);
+ break;
+ case X_FEATURE_TOKEN:
+ if ((featurestr = malloc (strlen (buf + strlen (feature_str)) + 1)) == NULL)
+ exit(1);
+ (void) strcpy (featurestr, buf + strlen (feature_str) + 1);
+ break;
+ case X_EXTERNREF_TOKEN:
+ if ((externrefstr = malloc (strlen (buf + strlen (externref_str)) + 1)) == NULL)
+ exit(1);
+ (void) strcpy (externrefstr, buf + strlen (externref_str) + 1);
+ break;
+ case X_EXTERNDEF_TOKEN:
+ if ((externdefstr = malloc (strlen (buf + strlen (externdef_str)) + 1)) == NULL)
+ exit(1);
+ (void) strcpy (externdefstr, buf + strlen (externdef_str) + 1);
+ break;
+ case X_CTMPL_TOKEN:
+ if ((ctmplstr = malloc (strlen (buf + strlen (ctmpl_str)) + 1)) == NULL)
+ exit(1);
+ (void) strcpy (ctmplstr, buf + strlen (ctmpl_str) + 1);
+ break;
+ case X_HTMPL_TOKEN:
+ if ((filecurrent->tmpl = ifopen (buf + strlen (htmpl_str) + 1, "r")) == NULL) {
+ (void) fprintf (stderr,
+ "Expected template %s, not found\n", htmpl_str);
+ exit (1);
+ }
+ break;
+ case X_CONST_TOKEN:
+ if ((conststr = malloc (strlen (buf + strlen (const_str)) + 1)) == NULL)
+ exit(1);
+ (void) strcpy (conststr, buf + strlen (const_str) + 1);
+ break;
+ default:
+ {
+ char* right;
+ TableEnt* tableent;
+ int llen;
+ int rlen;
+ int len;
+
+ if ((right = index(buf, ' ')))
+ *right++ = 0;
+ else
+ right = buf + 1;
+ if (buf[0] == 'H') {
+ strcpy (lbuf, prefixstr);
+ strcat (lbuf, right);
+ right = lbuf;
+ }
+
+ llen = len = strlen(buf) + 1;
+ rlen = strlen(right) + 1;
+ if (right != buf + 1) len += rlen;
+ if ((tableent = (TableEnt*)malloc(sizeof(TableEnt) + len)) == NULL)
+ exit(1);
+ tableent->left = (char *)(tableent + 1);
+ strcpy(tableent->left, buf);
+ if (llen != len) {
+ tableent->right = tableent->left + llen;
+ strcpy(tableent->right, right);
+ } else {
+ tableent->right = tableent->left + 1;
+ }
+ tableent->next = NULL;
+
+ *filecurrent->tablecurrent->tableenttail = tableent;
+ filecurrent->tablecurrent->tableenttail = &tableent->next;
+ filecurrent->tablecurrent->tableentcurrent = tableent;
+ }
+ break;
+ }
+}
+
+static void IntelABIIndexEntries (File *file)
+{
+ Table* t;
+ TableEnt* te;
+
+ for (t = file->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next) {
+ te->offset = t->offset;
+ t->offset += strlen (te->right);
+ t->offset++;
+ }
+}
+
+static void DefaultIndexEntries (File *file)
+{
+ Table* t;
+ TableEnt* te;
+ int offset = 0;
+
+ for (t = file->table; t; t = t->next)
+ for (te = t->tableent; te; te = te->next) {
+ te->offset = offset;
+ offset += strlen (te->right);
+ offset++;
+ }
+}
+
+static void IndexEntries (File *file, int abi)
+{
+ switch (abi) {
+ case X_SPARC_ABI:
+ break;
+ case X_INTEL_ABI:
+ case X_INTEL_ABI_BC:
+ IntelABIIndexEntries (file);
+ break;
+ default:
+ DefaultIndexEntries (file);
+ break;
+ }
+}
+
+static char* DoComment (char *line)
+{
+ char* tag;
+ char* eol;
+ char* ret;
+ int len;
+
+ /* assume that the first line with two '$' in it is the RCS tag line */
+ if ((tag = index (line, '$')) == NULL) return NULL;
+ if ((eol = index (tag + 1, '$')) == NULL) return NULL;
+ len = eol - tag;
+ if ((ret = malloc (len)) == NULL)
+ exit (1);
+ (void) strncpy (ret, tag + 1, len - 1);
+ ret[len - 2] = 0;
+ return ret;
+}
+
+int main(int argc, char *argv[])
+{
+ int len, i;
+ char* tagline = NULL;
+ File* phile;
+ FILE *f;
+ char buf[1024];
+ int abi =
+#ifndef ARRAYPERSTR
+ X_DEFAULT_ABI;
+#else
+ X_ARRAYPER_ABI;
+#endif
+
+ f = stdin;
+ if (argc > 1) {
+ for (i = 1; i < argc; i++) {
+ if (strcmp (argv[i], "-f") == 0) {
+ if (++i < argc)
+ f = fopen (argv[i], "r");
+ else
+ return 1;
+ }
+ if (strcmp (argv[i], "-i") == 0) {
+ if (++i < argc)
+ includedir = argv[i];
+ else
+ return 1;
+ }
+ if (strcmp (argv[i], "-sparcabi") == 0)
+ abi = X_SPARC_ABI;
+ if (strcmp (argv[i], "-intelabi") == 0)
+ abi = X_INTEL_ABI;
+ if (strcmp (argv[i], "-functionabi") == 0)
+ abi = X_FUNCTION_ABI;
+ if (strcmp (argv[i], "-earlyR6bc") == 0 && abi == X_INTEL_ABI)
+ abi = X_INTEL_ABI_BC;
+ if (strcmp (argv[i], "-arrayperabi") == 0)
+ abi = X_ARRAYPER_ABI;
+#ifdef ARRAYPERSTR
+ if (strcmp (argv[i], "-defaultabi") == 0)
+ abi = X_DEFAULT_ABI;
+#endif
+ if (strcmp (argv[i], "-solarisabinames") == 0)
+ solaris_abi_names = TRUE;
+ }
+ }
+
+ if (f == NULL) return 1;
+ while (fgets(buf, sizeof buf, f)) {
+ if (!buf[0] || buf[0] == '\n')
+ continue;
+ if (buf[0] == '!') {
+ if (tagline) continue;
+ tagline = DoComment (buf);
+ continue;
+ }
+ if (buf[(len = strlen (buf) - 1)] == '\n') buf[len] = '\0';
+ DoLine(buf);
+ }
+ for (phile = file; phile; phile = phile->next) {
+ if (abi != X_ARRAYPER_ABI) IndexEntries (phile, abi);
+ WriteHeader (tagline, phile, abi);
+ }
+ WriteSource(tagline, abi);
+ return 0;
+}
+
diff --git a/nx-X11/config/util/makestrs.man b/nx-X11/config/util/makestrs.man
new file mode 100644
index 000000000..cd9684114
--- /dev/null
+++ b/nx-X11/config/util/makestrs.man
@@ -0,0 +1,219 @@
+.\" $Xorg: makestrs.man,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $
+.\" Copyright (c) 1993, 1994, 1998 The Open Group
+.\"
+.\" Permission to use, copy, modify, distribute, and sell this software and its
+.\" documentation for any purpose is hereby granted without fee, provided that
+.\" the above copyright notice appear in all copies and that both that
+.\" copyright notice and this permission notice appear in supporting
+.\" documentation.
+.\"
+.\" The above copyright notice and this permission notice shall be included in
+.\" all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+.\" THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+.\" SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of The Open Group shall not
+.\" be used in advertising or otherwise to promote the sale, use or other
+.\" dealing in this Software without prior written authorization from The
+.\" Open Group.
+.\"
+.\" $XFree86: xc/config/util/makestrs.man,v 3.8 2001/12/14 19:53:22 dawes Exp $
+.\"
+.TH MAKESTRS 1 __xorgversion__
+.SH NAME
+makestrs \- makes string table C source and header(s)
+.SH SYNOPSIS
+.B makestrs [-f source] [-i includedir] [-abioptions ...]
+.SH DESCRIPTION
+The
+.I makestrs
+command creates string table C source files and headers.
+If
+.I -f
+.I source
+is not specified
+.I makestrs
+will read from
+.I stdin.
+The C source file is always written to
+.I stdout.
+.I makestrs
+creates one or more C header files as specified in the source file.
+The following options may be specified:
+.I -sparcabi,
+.I -intelabi,
+.I -functionabi,
+.I -arrayperabi,
+and
+.I -defaultabi.
+.LP
+.I -sparcabi
+is used on SPARC platforms conforming to the SPARC
+Compliance Definition, i.e. SVR4/Solaris.
+.LP
+.I -intelabi
+is used on Intel platforms conforming to the System
+V Application Binary Interface, i.e. SVR4.
+.LP
+.I -earlyR6abi
+may be used in addition to
+.I -intelabi
+for situations
+where the vendor wishes to maintain binary compatibility between
+X11R6 public-patch 11 (and earlier) and X11R6 public-patch 12 (and later).
+.LP
+.I -functionabi
+generates a functional abi to the string table. This
+mechanism imposes a severe performance penalty and it's recommended
+that you not use it.
+.LP
+.I -arrayperabi
+results in a separate array for each string. This is
+the default behavior if makestrs was compiled with -DARRAYPERSTR
+(it almost never is).
+.LP
+.I -defaultabi
+forces the generation of the "normal" string table even
+if makestrs was compiled with -DARRAYPERSTR. Since makestrs is almost
+never compiled with -DARRAYPERSTR this is the default behavior if
+no abioptions are specified.
+.LP
+.I -i includedir
+forces the reading of templates from the includedir instead of the local
+directory. This is useful to have separate source and build directories.
+.SH SYNTAX
+The syntax for string-list file is (items in square brackets are optional):
+.RS 4
+\&#prefix <text>
+.RE
+.RS 4
+\&#feature <text>
+.RE
+.RS 4
+\&#externref <text>
+.RE
+.RS 4
+\&#externdef [<text>]
+.RE
+.RS 4
+[#ctempl <text>]
+.RE
+.LP
+.RS 4
+\&#file <filename>
+.RE
+.RS 4
+\&#table <tablename>
+.RE
+.RS 4
+[#htempl]
+.RE
+.RS 4
+<text>
+.RE
+.RS 4
+...
+.RE
+.RS 4
+<text>
+.RE
+.RS 4
+[#table <tablename>
+.RE
+.RS 4
+<text>
+.RE
+.RS 4
+...
+.RE
+.RS 4
+<text>
+.RE
+.RS 4
+ ...
+.RE
+.RS 4
+\&#table <tablename>
+.RE
+.RS 4
+ ...]
+.RE
+.RS 4
+[#file <filename>
+.RE
+.RS 4
+ ...]
+.RE
+.LP
+In words you may have one or more #file directives. Each #file may have
+one or more #table directives.
+.LP
+The #prefix directive determines the string that makestr will prefix
+to each definition.
+.LP
+The #feature directive determines the string that makestr will use
+for the feature-test macro, e.g. X[TM]STRINGDEFINES.
+.LP
+The #externref directive determines the string that makestr will use
+for the extern clause, typically this will be "extern" but Motif wants
+it to be "externalref"
+.LP
+The #externdef directive determines the string that makestr will use
+for the declaration, typically this will be the null string (note that
+makestrs requires a trailing space in this case, i.e. "#externdef "),
+and Motif will use "externaldef(_xmstrings).
+.LP
+The #ctmpl directive determines the name of the file used as a template
+for the C source file that is generated
+.LP
+Each #file <filename> directive will result in a corresponding header
+file by that name containing the appropriate definitions as specified
+by command line options. A single C source file containing the
+declarations for the definitions in all the headers will be printed
+to stdout.
+.LP
+The #htmpl directive determines the name of the file used as a template
+for the C header file that is generated.
+.LP
+Each #table <tablename> directive will be processed in accordance with
+the ABI. On most platforms all tables will be catenated into a single
+table with the name of the first table for that file. To conform to
+the Intel ABI separate tables will be generated with the names indicated.
+.LP
+The template files specified by the #ctmpl and #htmpl directives
+are processed by copying line for line from the template file to
+the appropriate output file. The line containing the string
+.I <<<STRING_TABLE_GOES_HERE>>>
+is not copied to the output file. The appropriate data is then
+copied to the output file and then the remainder of the template
+file is copied to the output file.
+.SH BUGS
+makestrs is not very forgiving of syntax errors. Sometimes you need
+a trailing space after # directives, other times they will mess you
+up. No warning messages are emitted.
+.SH SEE ALSO
+SPARC Compliance Definition 2.2., SPARC International Inc.,
+535 Middlefield Road, Suite 210, Menlo Park, CA 94025
+.LP
+System V Application Binary Interface, Third Edition,
+ISBN 0-13-100439-5
+UNIX Press, PTR Prentice Hall, 113 Sylvan Avenue, Englewood Cliffs,
+NJ 07632
+.LP
+System V Application Binary Interface, Third Edition, Intel386
+Architecture Processor Supplement
+ISBN 0-13-104670-5
+UNIX Press, PTR Prentice Hall, 113 Sylvan Avenue, Englewood Cliffs,
+NJ 07632
+.LP
+System V Application Binary Interface, Third Edition, SPARC
+Architecture Processor Supplement
+ISBN 0-13-104696-9
+UNIX Press, PTR Prentice Hall, 113 Sylvan Avenue, Englewood Cliffs,
+NJ 07632
diff --git a/nx-X11/config/util/mdepend.cpp b/nx-X11/config/util/mdepend.cpp
new file mode 100644
index 000000000..35cab0b22
--- /dev/null
+++ b/nx-X11/config/util/mdepend.cpp
@@ -0,0 +1,286 @@
+XCOMM!/bin/sh
+XCOMM
+XCOMM $Xorg: mdepend.cpp,v 1.3 2000/08/17 19:41:52 cpqbld Exp $
+XCOMM $XdotOrg: xc/config/util/mdepend.cpp,v 1.4 2005/08/26 05:01:37 daniels Exp $
+XCOMM
+XCOMM Do the equivalent of the 'makedepend' program, but do it right.
+XCOMM
+XCOMM Usage:
+XCOMM
+XCOMM makedepend [cpp-flags] [-w width] [-s magic-string] [-f makefile]
+XCOMM [-o object-suffix] [-v] [-a] [-cc compiler] [-d dependencyflag]
+XCOMM
+XCOMM Notes:
+XCOMM
+XCOMM The C compiler used can be overridden with the environment
+XCOMM variable "CC" or the command line flag -cc.
+XCOMM
+XCOMM The "-v" switch of the "makedepend" program is not supported.
+XCOMM
+XCOMM
+XCOMM This script should
+XCOMM work on both USG and BSD systems. However, when System V.4 comes out,
+XCOMM USG users will probably have to change "silent" to "-s" instead of
+XCOMM "-" (at least, that is what the documentation implies).
+XCOMM
+XCOMM $XFree86: xc/config/util/mdepend.cpp,v 3.9 2001/04/26 20:55:10 dawes Exp $
+XCOMM
+
+CC=PREPROC
+
+silent='-'
+
+TMP=`pwd`/.mdep$$
+
+rm -rf ${TMP}
+if ! mkdir -p ${TMP}; then
+ echo "$0: cannot create ${TMP}, exit." >&2
+fi
+
+CPPCMD=${TMP}/a
+DEPENDLINES=${TMP}/b
+TMPMAKEFILE=${TMP}/c
+MAGICLINE=${TMP}/d
+ARGS=${TMP}/e
+
+trap "rm -rf ${TMP}; exit 1" 1 2 15
+trap "rm -rf ${TMP}; exit 0" 1 2 13
+
+echo " \c" > $CPPCMD
+if [ `wc -c < $CPPCMD` -eq 1 ]
+then
+ c="\c"
+ n=
+else
+ c=
+ n="-n"
+fi
+
+echo $n "$c" >$ARGS
+
+files=
+makefile=
+magic_string='# DO NOT DELETE'
+objsuffix='.o'
+width=78
+endmarker=""
+verbose=n
+append=n
+compilerlistsdepends=n
+
+while [ $# != 0 ]
+do
+ if [ "$endmarker"x != x ] && [ "$endmarker" = "$1" ]; then
+ endmarker=""
+ else
+ case "$1" in
+ -D*|-I*|-U*)
+ echo $n " '$1'$c" >> $ARGS
+ ;;
+
+ -g|-O) # ignore so we can just pass $(CFLAGS) in
+ ;;
+
+ *)
+ if [ "$endmarker"x = x ]; then
+ case "$1" in
+ -w)
+ width="$2"
+ shift
+ ;;
+ -s)
+ magic_string="$2"
+ shift
+ ;;
+ -f*)
+ if [ "$1" = "-f-" ]; then
+ makefile="-"
+ elif [ "$1" = "-f" ]; then
+ makefile="$2"
+ shift
+ else
+ echo "$1" | sed 's/^\-f//' >${TMP}arg
+ makefile="`cat ${TMP}arg`"
+ rm -f ${TMP}arg
+ fi
+ ;;
+ -o)
+ objsuffix="$2"
+ shift
+ ;;
+
+ --*)
+ echo "$1" | sed 's/^\-\-//' >${TMP}end
+ endmarker="`cat ${TMP}end`"
+ rm -f ${TMP}end
+ if [ "$endmarker"x = x ]; then
+ endmarker="--"
+ fi
+ ;;
+ -v)
+ verbose="y"
+ ;;
+
+ -a)
+ append="y"
+ ;;
+
+ -cc)
+ CC="$2"
+ shift
+ ;;
+
+ # Flag to tell compiler to output dependencies directly
+ # For example, with Sun compilers, -xM or -xM1 or
+ # with gcc, -M
+ -d)
+ compilerlistsdepends="y"
+ compilerlistdependsflag="$2"
+ shift
+ ;;
+
+ -*)
+ echo "Unknown option '$1' ignored" 1>&2
+ ;;
+ *)
+ files="$files $1"
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ fi
+ shift
+done
+echo ' $*' >> $ARGS
+
+if [ "$compilerlistsdepends"x = "y"x ] ; then
+ CC="$CC $compilerlistdependsflag"
+fi
+
+echo "#!/bin/sh" > $CPPCMD
+echo "exec $CC `cat $ARGS`" >> $CPPCMD
+chmod +x $CPPCMD
+rm $ARGS
+
+case "$makefile" in
+ '')
+ if [ -r makefile ]
+ then
+ makefile=makefile
+ elif [ -r Makefile ]
+ then
+ makefile=Makefile
+ else
+ echo 'no makefile or Makefile found' 1>&2
+ exit 1
+ fi
+ ;;
+ -)
+ makefile=$TMPMAKEFILE
+ ;;
+esac
+
+if [ "$verbose"x = "y"x ]; then
+ cat $CPPCMD
+fi
+
+echo '' > $DEPENDLINES
+
+if [ "$compilerlistsdepends"x = "y"x ] ; then
+ for i in $files
+ do
+ $CPPCMD $i >> $DEPENDLINES
+ done
+else
+for i in $files
+do
+ $CPPCMD $i \
+ | sed -n "/^#/s;^;$i ;p"
+done \
+ | sed -e 's|/[^/.][^/]*/\.\.||g' -e 's|/\.[^.][^/]*/\.\.||g' \
+ -e 's|"||g' -e 's| \./| |' \
+ | awk '{
+ if ($1 != $4 && $2 != "#ident" && $2 != "#pragma")
+ {
+ numparts = split( $1, ofileparts, "\." )
+ ofile = ""
+ for ( i = 1; i < numparts; i = i+1 )
+ {
+ if (i != 1 )
+ ofile = ofile "."
+ ofile = ofile ofileparts[i]
+ }
+ print ofile "'"$objsuffix"'", $4
+ }
+ }' \
+ | sort -u \
+ | awk '
+ {
+ newrec = rec " " $2
+ if ($1 != old1)
+ {
+ old1 = $1
+ if (rec != "")
+ print rec
+ rec = $1 ": " $2
+ }
+ else if (length (newrec) > '"$width"')
+ {
+ print rec
+ rec = $1 ": " $2
+ }
+ else
+ rec = newrec
+ }
+ END \
+ {
+ if (rec != "")
+ print rec
+ }' \
+ | egrep -v '^[^:]*:[ ]*$' >> $DEPENDLINES
+fi
+
+trap "" 1 2 13 15 # Now we are committed
+case "$makefile" in
+ $TMPMAKEFILE)
+ ;;
+ *)
+ rm -f $makefile.bak
+ cp $makefile $makefile.bak
+ echo "Appending dependencies to $makefile"
+ ;;
+esac
+
+XCOMM
+XCOMM If not -a, append the magic string and a blank line so that
+XCOMM /^$magic_string/+1,\$d can be used to delete everything from after
+XCOMM the magic string to the end of the file. Then, append a blank
+XCOMM line again and then the dependencies.
+XCOMM
+if [ "$append" = "n" ]
+then
+ cat >> $makefile << END_OF_APPEND
+
+$magic_string
+
+END_OF_APPEND
+ ed $silent $makefile << END_OF_ED_SCRIPT
+/^$magic_string/+1,\$d
+w
+q
+END_OF_ED_SCRIPT
+ echo '' >>$makefile
+fi
+
+cat $DEPENDLINES >>$makefile
+
+case "$makefile" in
+ $TMPMAKEFILE)
+ cat $TMPMAKEFILE
+ ;;
+
+esac
+
+rm -rf ${TMP}*
+exit 0
diff --git a/nx-X11/config/util/mergelib.cpp b/nx-X11/config/util/mergelib.cpp
new file mode 100644
index 000000000..1c7cc6470
--- /dev/null
+++ b/nx-X11/config/util/mergelib.cpp
@@ -0,0 +1,105 @@
+XCOMM!/bin/sh
+XCOMM
+XCOMM $Xorg: mergelib.cpp,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $
+XCOMM
+XCOMM Copyright (c) 1989, 1998 The Open Group
+XCOMM
+XCOMM Permission to use, copy, modify, distribute, and sell this software and
+XCOMM its documentation for any purpose is hereby granted without fee, provided
+XCOMM that the above copyright notice appear in all copies and that both that
+XCOMM copyright notice and this permission notice appear in supporting
+XCOMM documentation.
+XCOMM
+XCOMM The above copyright notice and this permission notice shall be included in
+XCOMM all copies or substantial portions of the Software.
+XCOMM
+XCOMM THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+XCOMM IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+XCOMM FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+XCOMM OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+XCOMM AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+XCOMM CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+XCOMM
+XCOMM Except as contained in this notice, the name of The Open Group shall not be
+XCOMM used in advertising or otherwise to promote the sale, use or other dealings
+XCOMM in this Software without prior written authorization from The Open Group.
+XCOMM
+XCOMM Author: Jim Fulton, MIT X Consortium
+XCOMM
+XCOMM mergelib - merge one library into another; this is commonly used by X
+XCOMM to add the extension library into the base Xlib.
+XCOMM
+
+usage="usage: $0 to-library from-library [object-filename-prefix]"
+objprefix=_
+
+case $# in
+ 2) ;;
+ 3) objprefix=$3 ;;
+ *) echo "$usage" 1>&2; exit 1 ;;
+esac
+
+tolib=$1
+fromlib=$2
+
+if [ ! -f $fromlib ]; then
+ echo "$0: no such from-library $fromlib" 1>&2
+ exit 1
+fi
+
+if [ ! -f $tolib ]; then
+ echo "$0: no such to-library $tolib" 1>&2
+ exit 1
+fi
+
+
+XCOMM
+XCOMM Create a temp directory, and figure out how to reference the
+XCOMM object files from it (i.e. relative vs. absolute path names).
+XCOMM
+
+tmpdir=tmp.$$
+origdir=..
+
+XCOMM Remove directory if we fail
+trap "rm -rf $tmpdir; exit 1" 1 2 15
+trap "rm -rf $tmpdir; exit 0" 1 2 13
+
+mkdir $tmpdir
+
+XCOMM Security: if $tmpdir exists before mkdir exit immediately
+if [ $? -gt 0 -o ! -d $tmpdir ]; then
+ echo "$0: unable to create temporary directory $tmpdir" 1>&2
+ exit 1
+fi
+
+case "$fromlib" in
+ /?*) upfrom= ;;
+ *) upfrom=../ ;;
+esac
+
+case "$tolib" in
+ /?*) upto= ;;
+ *) upto=../ ;;
+esac
+
+
+XCOMM
+XCOMM In the temp directory, extract all of the object files and prefix
+XCOMM them with some symbol to avoid name clashes with the base library.
+XCOMM
+cd $tmpdir || exit 1
+ar x ${upfrom}$fromlib
+for i in *.o; do
+ mv $i ${objprefix}$i
+done
+
+
+XCOMM
+XCOMM Merge in the object modules, ranlib (if appropriate) and cleanup
+XCOMM
+ARCMD ${upto}$tolib *.o
+RANLIB ${upto}$tolib
+cd $origdir
+rm -rf $tmpdir
+
diff --git a/nx-X11/config/util/mergelib.man b/nx-X11/config/util/mergelib.man
new file mode 100644
index 000000000..768516648
--- /dev/null
+++ b/nx-X11/config/util/mergelib.man
@@ -0,0 +1,28 @@
+.\" $XFree86$
+.\" shorthand for double quote that works everywhere.
+.ds q \N'34'
+.TH MERGELIB 1 __xorgversion__
+.SH NAME
+mergelib \- merge one library into another
+.SH SYNOPSIS
+.B mergelib
+.I to-library
+.I from-library
+.RI [ object-filename-prefix ]
+.SH DESCRIPTION
+The
+.I mergelib
+program merges objects from one library into another.
+The names of object files in
+.I from-library
+will be prefixed by
+.I object-filename-prefix
+(\*q_\*q by default) to avoid name clashes.
+The merged library will be left in
+.IR to-library .
+.SH AUTHOR
+Jim Fulton wrote the
+.I mergelib
+program for the X Consortium.
+.PP
+Colin Watson wrote this manual page, originally for the Debian Project.
diff --git a/nx-X11/config/util/mkdirhier.c b/nx-X11/config/util/mkdirhier.c
new file mode 100644
index 000000000..61207b541
--- /dev/null
+++ b/nx-X11/config/util/mkdirhier.c
@@ -0,0 +1,80 @@
+/* $Xorg: mkdirhier.c,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $ */
+/*
+
+Copyright (C) 1996, 1998 The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
+OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
+ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall
+not be used in advertising or otherwise to promote the sale, use or
+other dealings in this Software without prior written authorization
+from The Open Group.
+
+*/
+/* $XFree86$ */
+
+/*
+ * Simple mkdirhier program for Windows NT
+ */
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifndef __UNIXOS2__
+#include <direct.h>
+#else
+#include <dirent.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+
+char *
+next_sep(char *path)
+{
+ while (*path)
+ if (*path == '/' || *path == '\\')
+ return path;
+ else
+ path++;
+ return NULL;
+}
+
+int
+main(int argc, char *argv[])
+{
+ char *dirname, *next, *prev;
+ char buf[1024];
+ struct _stat sb;
+
+ if (argc < 2)
+ exit(1);
+ dirname = argv[1];
+
+ prev = dirname;
+ while (next = next_sep(prev)) {
+ strncpy(buf, dirname, next - dirname);
+ buf[next - dirname] = '\0';
+ /* if parent dir doesn't exist yet create it */
+ if (_stat(buf, &sb))
+ _mkdir(buf); /* no error checking to avoid barfing on C: */
+ prev = next + 1;
+ }
+ if (_mkdir(dirname) == -1) {
+ perror("mkdirhier failed");
+ exit(1);
+ }
+ exit(0);
+}
diff --git a/nx-X11/config/util/mkdirhier.cmd b/nx-X11/config/util/mkdirhier.cmd
new file mode 100644
index 000000000..9ee8fa791
--- /dev/null
+++ b/nx-X11/config/util/mkdirhier.cmd
@@ -0,0 +1,54 @@
+/* OS/2 REXX SCRIPT */
+/* $XFree86: xc/config/util/mkdirhier.cmd,v 3.1 1996/02/09 08:18:04 dawes Exp $ */
+
+CALL RxFuncAdd 'SysMkDir', 'RexxUtil', 'SysMkDir'
+
+IF ARG() = 0 THEN DO
+ SAY "mkdirhier: usage: mkdirhier directory ..."
+ EXIT 1
+END
+
+curdir=DIRECTORY()
+drive=DELSTR(curdir,3)
+
+status=""
+PARSE ARG all
+
+DO i=1 TO WORDS(all)
+ direc = TRANSLATE(WORD(all,i),'/','\')
+ SELECT
+ WHEN direc = "" THEN DO
+ SAY "mkdirhier: empty directory name"
+ status=1
+ ITERATE
+ END
+ WHEN POS('0a'x,direc) > 0 THEN DO
+ SAY "mkdirhier: directory name contains a newline: '" direc "'"
+ status=1
+ ITERATE
+ END
+ OTHERWISE NOP
+ END
+ IF POS(":",direc) = 0 THEN direc = INSERT(drive,direc)
+
+ dirbuf.0 = direc
+ DO k=1 TO 1000
+ direc1 = STRIP(direc,"t","/")
+ dpath1 = FILESPEC("path",direc1)
+ dirbuf.k=FILESPEC("drive",direc1)||STRIP(dpath1,"t","/")
+ IF POS("/",dirbuf.k) = 0 THEN LEAVE k
+ direc=dirbuf.k
+ END
+ DO m=k-1 TO 0 BY -1
+ dospath = TRANSLATE(dirbuf.m,'\','/')
+ targetdir=DIRECTORY(dospath)
+ IF targetdir = dospath THEN
+ NOP
+ ELSE
+ CALL SysMkDir(dospath)
+ CALL DIRECTORY curdir
+ END
+END
+
+
+EXIT status
diff --git a/nx-X11/config/util/mkdirhier.man b/nx-X11/config/util/mkdirhier.man
new file mode 100644
index 000000000..4ad475e62
--- /dev/null
+++ b/nx-X11/config/util/mkdirhier.man
@@ -0,0 +1,42 @@
+.\" $Xorg: mkdirhier.man,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $
+.\" Copyright (c) 1993, 1994, 1998 The Open Group
+.\"
+.\" Permission to use, copy, modify, distribute, and sell this software and its
+.\" documentation for any purpose is hereby granted without fee, provided that
+.\" the above copyright notice appear in all copies and that both that
+.\" copyright notice and this permission notice appear in supporting
+.\" documentation.
+.\"
+.\" The above copyright notice and this permission notice shall be included in
+.\" all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+.\" THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+.\" SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of The Open Group shall not
+.\" be used in advertising or otherwise to promote the sale, use or other
+.\" dealing in this Software without prior written authorization from The
+.\" Open Group.
+.\"
+.\" $XFree86: xc/config/util/mkdirhier.man,v 1.2 2001/01/27 18:19:55 dawes Exp $
+.\"
+.TH MKDIRHIER 1 __xorgversion__
+.SH NAME
+mkdirhier \- makes a directory hierarchy
+.SH SYNOPSIS
+.B mkdirhier
+directory ...
+.SH DESCRIPTION
+The
+.I mkdirhier
+command creates the specified directories. Unlike
+.I mkdir
+if any of the parent directories of the specified directory
+do not exist, it creates them as well.
+.SH "SEE ALSO"
+mkdir(1)
diff --git a/nx-X11/config/util/mkdirhier.sh b/nx-X11/config/util/mkdirhier.sh
new file mode 100644
index 000000000..09b89ee9d
--- /dev/null
+++ b/nx-X11/config/util/mkdirhier.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+# $Xorg: mkdirhier.sh,v 1.3 2000/08/17 19:41:53 cpqbld Exp $
+# Courtesy of Paul Eggert
+
+newline='
+'
+IFS=$newline
+
+case ${1--} in
+-*) echo >&2 "mkdirhier: usage: mkdirhier directory ..."; exit 1
+esac
+
+status=
+
+for directory
+do
+ case $directory in
+ '')
+ echo >&2 "mkdirhier: empty directory name"
+ status=1
+ continue;;
+ *"$newline"*)
+ echo >&2 "mkdirhier: directory name contains a newline: \`\`$directory''"
+ status=1
+ continue;;
+ ///*) prefix=/;; # See Posix 2.3 "path".
+ //*) prefix=//;;
+ /*) prefix=/;;
+ -*) prefix=./;;
+ *) prefix=
+ esac
+
+ IFS=/
+ set x $directory
+ case $2 in
+ */*) # IFS parsing is broken
+ IFS=' '
+ set x `echo $directory | tr / ' '`
+ ;;
+ esac
+ IFS=$newline
+ shift
+
+ for filename
+ do
+ path=$prefix$filename
+ prefix=$path/
+ shift
+
+ test -d "$path" || {
+ paths=$path
+ for filename
+ do
+ if [ -n "$filename" -a "$filename" != "." ]; then
+ path=$path/$filename
+ paths=$paths$newline$path
+ fi
+ done
+
+ mkdir $paths || status=$?
+
+ break
+ }
+ done
+ done
+
+exit $status
diff --git a/nx-X11/config/util/mkhtmlindex.man b/nx-X11/config/util/mkhtmlindex.man
new file mode 100644
index 000000000..fc8a4276b
--- /dev/null
+++ b/nx-X11/config/util/mkhtmlindex.man
@@ -0,0 +1,32 @@
+.TH mkhtmlindex 1 __vendorversion__
+.SH NAME
+mkhtmlindex \- generate index files for HTML man pages
+.SH SYNOPSIS
+.B mkhtmlindex
+.I htmlmandir
+.SH DESCRIPTION
+The
+.I mkhtmlindex
+program generates index files for a directory of HTML-formatted manual
+pages.
+It searches for files whose names are of the form \(lqname.1.html\(rq,
+and outputs index files \(lqmanindex1.html\(rq, \(lqmanindex.2.html\(rq,
+and so on, one for each manual volume.
+Empty index files will be removed.
+Names and descriptions are found by scanning the first
+.I <H2>
+section of each page.
+.SH OPTIONS
+.I mkhtmlindex
+takes only one argument: the directory to process.
+.SH NOTES
+This utility is currently rather specific to X manual pages.
+In particular, the format of the index files it outputs is not configurable,
+nor is the HTML formatting it expects of manual pages.
+.SH AUTHOR
+The version of the
+.I mkhtmlindex
+included in this X.Org Foundation release was originally written
+by David Dawes wrote as a part of XFree86.
+.PP
+Colin Watson wrote this manual page, originally for the Debian Project.
diff --git a/nx-X11/config/util/mkhtmlindex.pl b/nx-X11/config/util/mkhtmlindex.pl
new file mode 100644
index 000000000..10030910e
--- /dev/null
+++ b/nx-X11/config/util/mkhtmlindex.pl
@@ -0,0 +1,103 @@
+#!/usr/bin/perl
+#
+# $XFree86: xc/config/util/mkhtmlindex.pl,v 1.2 2001/03/15 19:02:31 dawes Exp $
+#
+# Copyright © 2000,2001 by VA Linux Systems, Inc.
+#
+# Generate index files for HTML man pages.
+#
+# Author: David Dawes <dawes@xfree86.org>
+#
+
+#
+# Best viewed with tabs set to 4
+#
+
+if ($#ARGV ne 0) {
+ print STDERR "Usage: mkhtmlindex.pl htmlmandir\n";
+ exit 1;
+}
+
+$dir = $ARGV[0];
+
+if (! -d $dir) {
+ print STDERR "$dir is not a directory\n";
+ exit 1;
+}
+
+@vollist = ("1", "2", "3", "4", "5", "6", "7", "8", "9", "o", "l", "n", "p");
+
+$indexprefix = "manindex";
+
+foreach $vol (@vollist) {
+ $empty = "yes";
+ $indexname="$dir/$indexprefix$vol.html";
+
+ # print "Processing volume $vol\n";
+
+ open(mindex, ">$indexname") || die "Can't create $indexname";
+ opendir(dir, "$dir") || die "Can't open $dir";
+
+ print mindex <<EOF;
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<TITLE>X.Org Manual pages: Section $vol</TITLE>
+</HEAD>
+<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
+
+<H1>X.Org Manual pages: Section $vol</H1>
+<P>
+<UL>
+EOF
+
+ foreach $file (sort readdir dir) {
+ if ($file =~ "\.$vol\.html") {
+ open(file, "<$dir/$file") || die "Can't open $dir/$file";
+ while (<file>) {
+ chop;
+ if (/^<[hH]2>/) {
+ if (! /<\/[hH]2>$/) {
+ while (<file> && ! /<\/[hH]2>$/) {
+ ;
+ }
+ }
+ $heading = "";
+ while (<file>) {
+ if (/^<[hH]2>/) {
+ last;
+ }
+ $heading = "$heading" . "$_";
+ }
+ if ($heading) {
+ undef $empty;
+ $heading =~ s/--/-/;
+ ($name, $descr) = split(/-/, $heading, 2);
+ $file =~ /(.*)\.$vol\.html/;
+ $fname = $1;
+ $descr =~ s/<[pP]>//g;
+ print mindex
+ "<LI><A href=\"$file\">$fname</A> - $descr</LI>";
+ }
+ last;
+ }
+ }
+ close file;
+ }
+ }
+
+ print mindex <<EOF;
+</UL>
+<P>
+</BODY>
+</HTML>
+EOF
+
+ close mindex;
+ closedir dir;
+ if (defined $empty) {
+ # print "Removing empty $indexname\n";
+ unlink $indexname;
+ }
+}
diff --git a/nx-X11/config/util/mkhtmlindex.sh b/nx-X11/config/util/mkhtmlindex.sh
new file mode 100644
index 000000000..ab1c894ea
--- /dev/null
+++ b/nx-X11/config/util/mkhtmlindex.sh
@@ -0,0 +1,60 @@
+#!/bin/sh
+#
+# $XFree86: xc/config/util/mkhtmlindex.sh,v 1.3 2000/08/26 04:30:49 dawes Exp $
+#
+# Copyright © 2000 by Precision Insight, Inc.
+#
+# Generate index files for the HTML man pages
+#
+# Author: David Dawes <dawes@xfree86.org>
+#
+
+VOLLIST="1 2 3 4 5 6 7 8 9 o l n p"
+INDEX="manindex"
+
+if [ $# != 1 ]; then
+ echo Usage: $0 htmlmandir
+ exit 1
+fi
+
+if [ ! -d $1 ]; then
+ echo $1 is not a directory
+ exit 1
+fi
+
+cd $1
+
+for s in $VOLLIST; do
+ list="`ls *.$s.html 2> /dev/null`" || : # ignore failed glob expansion
+ if [ X"$list" != X ]; then
+ file=$INDEX$s.html
+ rm -f $file
+ cat <<EOF > $file
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<HTML>
+<HEAD>
+<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
+<TITLE>X.Org Manual pages: Section $s</TITLE>
+</HEAD>
+<BODY BGCOLOR="#efefef" TEXT="black" LINK="blue" VLINK="#551A8B" ALINK="red">
+
+<H1>X.Org Manual pages: Section $s</H1>
+<P>
+<UL>
+EOF
+ for i in $list; do
+ title="`sed -e '/^[^0-9A-Za-z]/d' -e '/^$/' -e '/^Name/d' -e q $i`"
+ name="`echo \"$title\" | sed -e 's/ - .*//'`"
+ desc="`echo \"$title\" | sed -e 's/[^-]* - //' -e 's/<P>//'`"
+ echo "<LI><A href=\"$i\">$name</A> - $desc</LI>" >> $file
+ done
+ cat <<EOF >> $file
+</UL>
+<P>
+</BODY>
+</HTML>
+EOF
+ fi
+done
+
+exit 0
diff --git a/nx-X11/config/util/mkshadow/Imakefile b/nx-X11/config/util/mkshadow/Imakefile
new file mode 100644
index 000000000..e8a879d97
--- /dev/null
+++ b/nx-X11/config/util/mkshadow/Imakefile
@@ -0,0 +1,5 @@
+XCOMM $Xorg: Imakefile,v 1.3 2000/08/17 19:41:53 cpqbld Exp $
+ SRCS = mkshadow.c savedir.c wildmat.c
+ OBJS = mkshadow.o savedir.o wildmat.o
+
+ComplexProgramTarget(mkshadow)
diff --git a/nx-X11/config/util/mkshadow/README b/nx-X11/config/util/mkshadow/README
new file mode 100644
index 000000000..eea4b8b89
--- /dev/null
+++ b/nx-X11/config/util/mkshadow/README
@@ -0,0 +1,38 @@
+The mkshadow programs makes a "shadow tree" of a directory tree.
+It logically copies all of the "MASTER" directory into ".".
+However, ordinary files, and RCS/SCCS directories are "copied"
+by creating a sybolic link to the corresponding file in MASTER.
+
+The wildmat.c file is by Rich Salz, and from comp.sources.misc, volume 17.
+The savedir.c file is lightly modified from the version written
+by David MacKenzie for GNU fileutils; the Free Software Foundation
+has graciously agreed to waive their usual copyright so this
+program can be distributed by the X Consortium.
+
+If you have problems compiling savedir.c, try setting the DIRENT make
+variable as suggested in the Makefile.
+
+ * Usage: mkshadow [-X exclude_file] [-x exclude_pattern] ... MASTER
+ * Makes the current directory be a "shadow copy" of MASTER.
+ * Sort of like a recursive copy of MASTER to .
+ * However, symbolic links are used instead of actually
+ * copying (non-directory) files.
+ * Also, directories named RCS or SCCS are shared (with a symbolic link).
+ * Warning messages are printed for files (and directories) in .
+ * that don't match a corresponding file in MASTER (though
+ * symbolic links are silently removed).
+ * Also, a warning message is printed for non-directory files
+ * under . that are not symbolic links.
+ *
+ * Files and directories can be excluded from the sharing
+ * with the -X and -x flags. The flag `-x pattern' (or `-xpattern')
+ * means that mkshadow should ignore any file whose name matches
+ * the pattern. The pattern is a "globbing" pattern, i.e. the
+ * characters *?[^-] are interpreted as by the shell.
+ * If the pattern contains a '/' is is matched against the complete
+ * current path (relative to '.'); otherwise, it is matched
+ * against the last component of the path.
+ * A `-X filename' flag means to read a set of exclusion patterns
+ * from the named file, one pattern to a line.
+
+Author: Per Bothner. bothner@cygnus.com. November 1990, 1993.
diff --git a/nx-X11/config/util/mkshadow/mkshadow.c b/nx-X11/config/util/mkshadow/mkshadow.c
new file mode 100644
index 000000000..d9c5eb841
--- /dev/null
+++ b/nx-X11/config/util/mkshadow/mkshadow.c
@@ -0,0 +1,378 @@
+/* $Xorg: mkshadow.c,v 1.3 2000/08/17 19:41:53 cpqbld Exp $ */
+/* mkshadow.c - make a "shadow copy" of a directory tree with symlinks.
+ Copyright 1990, 1993 Free Software Foundation, Inc.
+
+ Permission to use, copy, modify, and distribute this program for
+ any purpose and without fee is hereby granted, provided that this
+ copyright and permission notice appear on all copies, and that
+ notice be given that copying and distribution is by permission of
+ the Free Software Foundation. The Free Software Foundation makes
+ no representations about the suitability of this software for any
+ purpose. It is provided "as is" without expressed or implied
+ warranty.
+
+ (The FSF has modified its usual distribution terms, for this file,
+ as a courtesy to the X project.) */
+
+/*
+ * Usage: mkshadow [-X exclude_file] [-x exclude_pattern] ... MASTER [SHADOW]
+ * Makes SHADOW be a "shadow copy" of MASTER. SHADOW defaults to the current
+ * directory. Sort of like a recursive copy of MASTER to SHADOW.
+ * However, symbolic links are used instead of actually
+ * copying (non-directory) files.
+ * Also, directories named RCS or SCCS are shared (with a symbolic link).
+ * Warning messages are printed for files (and directories) in .
+ * that don't match a corresponding file in MASTER (though
+ * symbolic links are silently removed).
+ * Also, a warning message is printed for non-directory files
+ * under SHADOW that are not symbolic links.
+ *
+ * Files and directories can be excluded from the sharing
+ * with the -X and -x flags. The flag `-x pattern' (or `-xpattern')
+ * means that mkshadow should ignore any file whose name matches
+ * the pattern. The pattern is a "globbing" pattern, i.e. the
+ * characters *?[^-] are interpreted as by the shell.
+ * If the pattern contains a '/' is is matched against the complete
+ * current path (relative to '.'); otherwise, it is matched
+ * against the last component of the path.
+ * A `-X filename' flag means to read a set of exclusion patterns
+ * from the named file, one pattern to a line.
+ *
+ * Originally written by Per Bothner at University of Wisconsin-Madison,
+ * inspired by the lndir script distributed with X11.
+ * Modified by Per Bothner <bothner@cygnus.com> November 1993
+ * to more-or-less follow Posix.
+ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#ifdef BSD
+#include <strings.h>
+#define strchr index
+#else
+#include <string.h>
+#endif
+#include <sys/stat.h>
+#if defined(S_IFDIR) && !defined(S_ISDIR)
+#define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
+#endif
+#if defined(S_IFLNK) && !defined(S_ISLNK)
+#define S_ISLNK(mode) (((mode) & S_IFMT) == S_IFLNK)
+#endif
+#ifndef S_ISLNK
+#define lstat stat
+#endif
+#ifndef MAXPATHLEN
+#define MAXPATHLEN 1024
+#endif
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
+extern char * savedir();
+
+fatal(msg)
+ char *msg;
+{
+ if (errno) perror(msg ? msg : "");
+ else if (msg) fprintf(stderr, "mkshadow: %s\n", msg);
+ exit(-1);
+}
+
+/* When handling symbolic links to relative directories,
+ * we need to prepend "../" to the "source".
+ * We preallocate MAX_DEPTH repetations of "../" using a simple trick.
+ */
+#define MAX_DEPTH 20
+#define PREPEND_BUFFER_SIZE (MAX_DEPTH*3)
+char master_buffer[MAXPATHLEN+PREPEND_BUFFER_SIZE] =
+ "../../../../../../../../../../../../../../../../../../../../";
+/* The logical start of the master_buffer is defined by
+ * master_start, which skips the fixed prepend area.
+ */
+#define master_start (master_buffer+PREPEND_BUFFER_SIZE)
+char shadow_buffer[MAXPATHLEN];
+
+void bad_args(msg)
+{
+ if (msg) fprintf(stderr, "%s\n", msg);
+ fprintf (stderr, "usage: mkshadow [-X exclude_file] [-x exclude_pattern]");
+ fprintf (stderr, " master [shadow]\n");
+ exit(-1);
+}
+
+int exclude_count = 0;
+char **exclude_patterns = NULL;
+int exclude_limit = 0;
+
+void add_exclude(pattern)
+ char *pattern;
+{
+ if (exclude_limit == 0) {
+ exclude_limit = 100;
+ exclude_patterns = (char**)malloc(exclude_limit * sizeof(char*));
+ } else if (exclude_count + 1 >= exclude_limit) {
+ exclude_limit += 100;
+ exclude_patterns = (char**)realloc(exclude_patterns,
+ exclude_limit * sizeof(char*));
+ }
+ exclude_patterns[exclude_count] = pattern;
+ exclude_count++;
+}
+
+void add_exclude_file(name)
+ char *name;
+{
+ char buf[MAXPATHLEN];
+ FILE *file = fopen(name, "r");
+ if (file == NULL) fatal("failed to find -X (exclude) file");
+ for (;;) {
+ int len;
+ char *str = fgets(buf, MAXPATHLEN, file);
+ if (str == NULL) break;
+ len = strlen(str);
+ if (len && str[len-1] == '\n') str[--len] = 0;
+ if (!len) continue;
+ str = (char*)malloc(len+1);
+ strcpy(str, buf);
+ add_exclude(str);
+ }
+ fclose(file);
+}
+
+main(argc, argv)
+ char **argv;
+{
+ char *master_name = NULL;
+ char *shadow_name = NULL;
+ int i;
+ for (i = 1; i < argc; i++) {
+ if (argv[i][0] == '-') {
+ switch(argv[i][1]) {
+ case 'X':
+ if (argv[i][2]) add_exclude_file(&argv[i][2]);
+ else if (++i >= argc) bad_args(NULL);
+ else add_exclude_file(argv[i]);
+ break;
+ case 'x':
+ if (argv[i][2]) add_exclude(&argv[i][2]);
+ else if (++i >= argc) bad_args(NULL);
+ else add_exclude(argv[i]);
+ break;
+ default:
+ bad_args(NULL);
+ }
+ } else if (master_name == NULL)
+ master_name = argv[i];
+ else if (shadow_name == NULL)
+ shadow_name = argv[i];
+ else bad_args (NULL);
+ }
+
+ if (master_name == NULL) bad_args(NULL);
+ if (shadow_name == NULL)
+ shadow_name = ".";
+ else if ((shadow_name[0] != '.' || shadow_name[1])
+ && master_name[0] != '/') {
+ fprintf(stderr, "Shadowing a relative directory pathname to a \n");
+ fprintf(stderr, "shadow other than '.' is not supported!\n");
+ exit(-1);
+ }
+ strcpy(shadow_buffer, shadow_name);
+ strcpy(master_start, master_name);
+ DoCopy(master_start, shadow_buffer, 0);
+ return 0;
+}
+
+int compare_strings(ptr1, ptr2)
+ char **ptr1, **ptr2;
+{
+ return strcmp(*ptr1, *ptr2);
+}
+
+void MakeLink(master, current, depth)
+ char *master;
+ char *current;
+ int depth;
+{
+ if (master[0] != '/') {
+ /* Source directory was specified with a relative pathname. */
+ if (master != master_start) {
+ fatal("Internal bug: bad string buffer use");
+ }
+ /* Pre-pend "../" depth times. This compensates for
+ * the directories we've entered. */
+ master -= 3 * depth;
+ }
+ if (symlink(master, current)) {
+ fprintf(stderr, "Failed to create symbolic link %s->%s\n",
+ current, master);
+ exit (-1);
+ }
+}
+
+
+/* Get a sorted NULL_terminator array of (char*) using 'names'
+ * (created by save_dir) as data.
+ */
+char ** get_name_pointers(names)
+ char *names;
+{
+ int n_names = 0;
+ int names_buf_size = 64;
+ char *namep;
+ char ** pointers = (char**)malloc(names_buf_size * sizeof(char*));
+ if (!names || !pointers) fatal("virtual memory exhausted");
+
+ for (namep = names; *namep; namep += strlen(namep) + 1) {
+ if (n_names + 1 >= names_buf_size) {
+ names_buf_size *= 2;
+ pointers = (char**)realloc(pointers,
+ names_buf_size * sizeof(char*));
+ if (!pointers) fatal("virtual memory exhausted");
+ }
+ pointers[n_names++] = namep;
+ }
+ pointers[n_names] = 0;
+ qsort(pointers, n_names, sizeof(char*), compare_strings);
+ return pointers;
+}
+
+/* Recursively shadow the directory whose name is in MASTER
+ * (which is == MASTER_START) into the destination directory named CURRENT.
+ */
+
+DoCopy(master, current, depth)
+ char *master; /* The source directory. */
+ char *current; /* The destination directory. */
+ int depth;
+{
+ struct stat stat_master, stat_current;
+ char **master_pointer, **current_pointer;
+ char **master_names, **current_names;
+ char *master_end, *current_end;
+ char *master_name_buf, *current_name_buf;
+ master_end = master + strlen(master);
+ current_end = current + strlen(current);
+
+ /* Get rid of terminal '/' */
+ if (master_end[-1] == '/' && master != master_end - 1)
+ *--master_end = 0;
+ if (current_end[-1] == '/' && current != current_end - 1)
+ *--current_end = 0;
+
+ if (depth >= MAX_DEPTH) {
+ fprintf(stderr,
+ "Nesting too deep (depth %d at %s). Probable circularity.\n",
+ depth, master);
+ exit(-1);
+ }
+
+ master_name_buf = savedir(master, 500);
+ if (master_name_buf == NULL) {
+ fprintf(stderr, "Not enough memory or no such directory: %s\n",
+ master);
+ exit(-1);
+ }
+ current_name_buf = savedir(current, 500);
+ if (current_name_buf == NULL) {
+ fprintf(stderr, "Not enough memory or no such directory: %s\n",
+ current);
+ exit(-1);
+ }
+
+ master_names = get_name_pointers(master_name_buf);
+ current_names = get_name_pointers(current_name_buf);
+
+ master_pointer = master_names;
+ current_pointer = current_names;
+ for (;;) {
+ int cmp, ipat;
+ int in_master, in_current;
+ char *cur_name;
+ if (*master_pointer == NULL && *current_pointer == NULL)
+ break;
+ if (*master_pointer == NULL) cmp = 1;
+ else if (*current_pointer == NULL) cmp = -1;
+ else cmp = strcmp(*master_pointer, *current_pointer);
+ if (cmp < 0) { /* file only exists in master directory */
+ in_master = 1; in_current = 0;
+ } else if (cmp == 0) { /* file exists in both directories */
+ in_master = 1; in_current = 1;
+ } else { /* file only exists in current directory */
+ in_current = 1; in_master = 0;
+ }
+ cur_name = in_master ? *master_pointer : *current_pointer;
+ sprintf(master_end, "/%s", cur_name);
+ sprintf(current_end, "/%s", cur_name);
+ for (ipat = 0; ipat < exclude_count; ipat++) {
+ char *pat = exclude_patterns[ipat];
+ char *cur;
+ if (strchr(pat, '/')) cur = current + 2; /* Skip initial "./" */
+ else cur = cur_name;
+ if (wildmat(cur, pat)) goto skip;
+ }
+ if (in_master)
+ if (lstat(master, &stat_master) != 0) fatal("stat failed");
+ if (in_current)
+ if (lstat(current, &stat_current) != 0) fatal("stat failed");
+ if (in_current && !in_master) {
+ if (S_ISLNK(stat_current.st_mode))
+ if (unlink(current)) {
+ fprintf(stderr, "Failed to remove symbolic link %s.\n",
+ current);
+ }
+ else
+ fprintf(stderr, "Removed symbolic link %s.\n",
+ current);
+ else {
+ fprintf(stderr,
+ "The file %s does not exist in the master tree.\n",
+ current);
+ }
+ }
+ else if (S_ISDIR(stat_master.st_mode)
+ && strcmp(cur_name, "RCS") != 0
+ && strcmp(cur_name, "SCCS") != 0) {
+ if (!in_current) {
+ if (mkdir(current, 0775)) fatal("mkdir failed");
+ }
+ else if (stat(current, &stat_current)) fatal("stat failed");
+ if (!in_current || stat_current.st_dev != stat_master.st_dev
+ || stat_current.st_ino != stat_master.st_ino)
+ DoCopy(master, current, depth+1);
+ else
+ fprintf(stderr, "Link %s is the same as directory %s.\n",
+ current, master);
+ }
+ else {
+ if (!in_current)
+ MakeLink(master, current, depth);
+ else if (!S_ISLNK(stat_current.st_mode)) {
+ fprintf(stderr, "Existing file %s is not a symbolic link.\n",
+ current);
+ } else {
+ if (stat(current, &stat_current) || stat(master, &stat_master))
+ fatal("stat failed");
+ if (stat_current.st_dev != stat_master.st_dev
+ || stat_current.st_ino != stat_master.st_ino) {
+ fprintf(stderr, "Fixing incorrect symbolic link %s.\n",
+ current);
+ if (unlink(current)) {
+ fprintf(stderr, "Failed to remove symbolic link %s.\n",
+ current);
+ }
+ else
+ MakeLink(master, current, depth);
+ }
+ }
+ }
+ skip:
+ if (in_master) master_pointer++;
+ if (in_current) current_pointer++;
+ }
+
+ free(master_names); free(current_names);
+ free(master_name_buf); free(current_name_buf);
+}
diff --git a/nx-X11/config/util/mkshadow/savedir.c b/nx-X11/config/util/mkshadow/savedir.c
new file mode 100644
index 000000000..6629f5a8d
--- /dev/null
+++ b/nx-X11/config/util/mkshadow/savedir.c
@@ -0,0 +1,119 @@
+/* $Xorg: savedir.c,v 1.3 2000/08/17 19:41:53 cpqbld Exp $ */
+/* savedir.c -- save the list of files in a directory in a string
+ Copyright 1990, 1993 Free Software Foundation, Inc.
+
+ Permission to use, copy, modify, and distribute this program for
+ any purpose and without fee is hereby granted, provided that this
+ copyright and permission notice appear on all copies, and that
+ notice be given that copying and distribution is by permission of
+ the Free Software Foundation. The Free Software Foundation makes
+ no representations about the suitability of this software for any
+ purpose. It is provided "as is" without expressed or implied
+ warranty.
+
+ (The FSF has modified its usual distribution terms, for this file,
+ as a courtesy to the X project.) */
+
+/* $XFree86$ */
+
+/* Written by David MacKenzie <djm@ai.mit.edu>.
+ Modified to use <dirent.h> by default. Per Bothner <bothner@cygnus.com>. */
+
+#include <sys/types.h>
+#if !defined(DIRECT) && !defined(BSD)
+#include <dirent.h>
+#define NLENGTH(direct) (strlen((direct)->d_name))
+#else
+#undef dirent
+#define dirent direct
+#define NLENGTH(direct) ((direct)->d_namlen)
+#ifdef BSD
+#include <sys/dir.h>
+#else
+#ifdef SYSNDIR
+#include <sys/ndir.h>
+#else
+#include <ndir.h>
+#endif
+#endif
+#endif
+
+#if defined(VOID_CLOSEDIR) || defined(BSD)
+/* Fake a return value. */
+#define CLOSEDIR(d) (closedir (d), 0)
+#else
+#define CLOSEDIR(d) closedir (d)
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <stddef.h>
+
+char *stpcpy ();
+
+/* Return a freshly allocated string containing the filenames
+ in directory DIR, separated by '\0' characters;
+ the end is marked by two '\0' characters in a row.
+ NAME_SIZE is the number of bytes to initially allocate
+ for the string; it will be enlarged as needed.
+ Return NULL if DIR cannot be opened or if out of memory. */
+
+char *
+savedir (dir, name_size)
+ char *dir;
+ unsigned name_size;
+{
+ DIR *dirp;
+ struct dirent *dp;
+ char *name_space;
+ char *namep;
+
+ dirp = opendir (dir);
+ if (dirp == NULL)
+ return NULL;
+
+ name_space = (char *) malloc (name_size);
+ if (name_space == NULL)
+ {
+ closedir (dirp);
+ return NULL;
+ }
+ namep = name_space;
+
+ while ((dp = readdir (dirp)) != NULL)
+ {
+ /* Skip "." and ".." (some NFS filesystems' directories lack them). */
+ if (dp->d_name[0] != '.'
+ || (dp->d_name[1] != '\0'
+ && (dp->d_name[1] != '.' || dp->d_name[2] != '\0')))
+ {
+ unsigned size_needed = (namep - name_space) + NLENGTH (dp) + 2;
+
+ if (size_needed > name_size)
+ {
+ char *new_name_space;
+
+ while (size_needed > name_size)
+ name_size += 1024;
+
+ new_name_space = realloc (name_space, name_size);
+ if (new_name_space == NULL)
+ {
+ closedir (dirp);
+ return NULL;
+ }
+ namep += new_name_space - name_space;
+ name_space = new_name_space;
+ }
+ strcpy (namep, dp->d_name);
+ namep += strlen (namep) + 1;
+ }
+ }
+ *namep = '\0';
+ if (CLOSEDIR (dirp))
+ {
+ free (name_space);
+ return NULL;
+ }
+ return name_space;
+}
diff --git a/nx-X11/config/util/mkshadow/wildmat.c b/nx-X11/config/util/mkshadow/wildmat.c
new file mode 100644
index 000000000..8e0c179eb
--- /dev/null
+++ b/nx-X11/config/util/mkshadow/wildmat.c
@@ -0,0 +1,167 @@
+/* $Xorg: wildmat.c,v 1.3 2000/08/17 19:41:53 cpqbld Exp $ */
+/*
+**
+** Do shell-style pattern matching for ?, \, [], and * characters.
+** Might not be robust in face of malformed patterns; e.g., "foo[a-"
+** could cause a segmentation violation. It is 8bit clean.
+**
+** Written by Rich $alz, mirror!rs, Wed Nov 26 19:03:17 EST 1986.
+** Rich $alz is now <rsalz@bbn.com>.
+** April, 1991: Replaced mutually-recursive calls with in-line code
+** for the star character.
+**
+** Special thanks to Lars Mathiesen <thorinn@diku.dk> for the ABORT code.
+** This can greatly speed up failing wildcard patterns. For example:
+** pattern: -*-*-*-*-*-*-12-*-*-*-m-*-*-*
+** text 1: -adobe-courier-bold-o-normal--12-120-75-75-m-70-iso8859-1
+** text 2: -adobe-courier-bold-o-normal--12-120-75-75-X-70-iso8859-1
+** Text 1 matches with 51 calls, while text 2 fails with 54 calls. Without
+** the ABORT, then it takes 22310 calls to fail. Ugh. The following
+** explanation is from Lars:
+** The precondition that must be fulfilled is that DoMatch will consume
+** at least one character in text. This is true if *p is neither '*' nor
+** '\0'.) The last return has ABORT instead of FALSE to avoid quadratic
+** behaviour in cases like pattern "*a*b*c*d" with text "abcxxxxx". With
+** FALSE, each star-loop has to run to the end of the text; with ABORT
+** only the last one does.
+**
+** Once the control of one instance of DoMatch enters the star-loop, that
+** instance will return either TRUE or ABORT, and any calling instance
+** will therefore return immediately after (without calling recursively
+** again). In effect, only one star-loop is ever active. It would be
+** possible to modify the code to maintain this context explicitly,
+** eliminating all recursive calls at the cost of some complication and
+** loss of clarity (and the ABORT stuff seems to be unclear enough by
+** itself). I think it would be unwise to try to get this into a
+** released version unless you have a good test data base to try it out
+** on.
+*/
+
+#define TRUE 1
+#define FALSE 0
+#define ABORT -1
+
+
+ /* What character marks an inverted character class? */
+#define NEGATE_CLASS '^'
+ /* Is "*" a common pattern? */
+#define OPTIMIZE_JUST_STAR
+ /* Do tar(1) matching rules, which ignore a trailing slash? */
+#undef MATCH_TAR_PATTERN
+
+
+/*
+** Match text and p, return TRUE, FALSE, or ABORT.
+*/
+static int
+DoMatch(text, p)
+ register char *text;
+ register char *p;
+{
+ register int last;
+ register int matched;
+ register int reverse;
+
+ for ( ; *p; text++, p++) {
+ if (*text == '\0' && *p != '*')
+ return ABORT;
+ switch (*p) {
+ case '\\':
+ /* Literal match with following character. */
+ p++;
+ /* FALLTHROUGH */
+ default:
+ if (*text != *p)
+ return FALSE;
+ continue;
+ case '?':
+ /* Match anything. */
+ continue;
+ case '*':
+ while (*++p == '*')
+ /* Consecutive stars act just like one. */
+ continue;
+ if (*p == '\0')
+ /* Trailing star matches everything. */
+ return TRUE;
+ while (*text)
+ if ((matched = DoMatch(text++, p)) != FALSE)
+ return matched;
+ return ABORT;
+ case '[':
+ reverse = p[1] == NEGATE_CLASS ? TRUE : FALSE;
+ if (reverse)
+ /* Inverted character class. */
+ p++;
+ for (last = 0400, matched = FALSE; *++p && *p != ']'; last = *p)
+ /* This next line requires a good C compiler. */
+ if (*p == '-' ? *text <= *++p && *text >= last : *text == *p)
+ matched = TRUE;
+ if (matched == reverse)
+ return FALSE;
+ continue;
+ }
+ }
+
+#ifdef MATCH_TAR_PATTERN
+ if (*text == '/')
+ return TRUE;
+#endif /* MATCH_TAR_ATTERN */
+ return *text == '\0';
+}
+
+
+/*
+** User-level routine. Returns TRUE or FALSE.
+*/
+int
+wildmat(text, p)
+ char *text;
+ char *p;
+{
+#ifdef OPTIMIZE_JUST_STAR
+ if (p[0] == '*' && p[1] == '\0')
+ return TRUE;
+#endif /* OPTIMIZE_JUST_STAR */
+ return DoMatch(text, p) == TRUE;
+}
+
+
+
+#ifdef TEST
+#include <stdio.h>
+
+/* Yes, we use gets not fgets. Sue me. */
+extern char *gets();
+
+
+main()
+{
+ char p[80];
+ char text[80];
+
+ printf("Wildmat tester. Enter pattern, then strings to test.\n");
+ printf("A blank line gets prompts for a new pattern; a blank pattern\n");
+ printf("exits the program.\n");
+
+ for ( ; ; ) {
+ printf("\nEnter pattern: ");
+ (void)fflush(stdout);
+ if (gets(p) == NULL || p[0] == '\0')
+ break;
+ for ( ; ; ) {
+ printf("Enter text: ");
+ (void)fflush(stdout);
+ if (gets(text) == NULL)
+ exit(0);
+ if (text[0] == '\0')
+ /* Blank line; go back and get a new pattern. */
+ break;
+ printf(" %s\n", wildmat(text, p) ? "YES" : "NO");
+ }
+ }
+
+ exit(0);
+ /* NOTREACHED */
+}
+#endif /* TEST */
diff --git a/nx-X11/config/util/printver.c b/nx-X11/config/util/printver.c
new file mode 100644
index 000000000..2dbca7457
--- /dev/null
+++ b/nx-X11/config/util/printver.c
@@ -0,0 +1,29 @@
+
+/*
+ * A simple program to make it possible to print the XFree86 version and
+ * date info as defined in xf86Version.h and xf86Date.h very early in the
+ * build process.
+ */
+
+/* $XFree86: xc/config/util/printver.c,v 1.2 2003/02/26 09:21:33 dawes Exp $ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include "xf86Version.h"
+#include "xf86Date.h"
+
+int
+main()
+{
+#ifdef XF86_VERSION_MAJOR
+ printf(" version %d.%d.%d", XF86_VERSION_MAJOR, XF86_VERSION_MINOR,
+ XF86_VERSION_PATCH);
+ if (XF86_VERSION_SNAP != 0)
+ printf(".%d", XF86_VERSION_SNAP);
+#ifdef XF86_DATE
+ printf(" (%s)", XF86_DATE);
+#endif
+#endif
+ exit(0);
+}
+
diff --git a/nx-X11/config/util/revpath.c b/nx-X11/config/util/revpath.c
new file mode 100644
index 000000000..db88393cb
--- /dev/null
+++ b/nx-X11/config/util/revpath.c
@@ -0,0 +1,47 @@
+/*
+ * Copyright 1999 by The XFree86 Project, Inc.
+ */
+/* $XFree86: xc/config/util/revpath.c,v 1.2 1999/02/01 11:55:49 dawes Exp $ */
+
+/*
+ * Reverse a pathname. It returns a relative path that can be used to undo
+ * 'cd argv[1]'.
+ *
+ * It is impossible to do this in general, but this handles the cases that
+ * come up in imake. Maybe imake should use an absolute path for $(TOP)
+ * instead of a relative path so that this problem can be avoided?
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+int
+main(int argc, char *argv[])
+{
+ int levels = 0;
+ char *p;
+
+ /* Silently ignore invalid usage */
+ if (argc != 2)
+ exit(0);
+
+ /* Split the path and count the levels */
+ p = strtok(argv[1], "/");
+ while (p) {
+ if (strcmp(p, ".") == 0)
+ ;
+ else if (strcmp(p, "..") == 0)
+ levels--;
+ else
+ levels++;
+ p = strtok(NULL, "/");
+ }
+
+ while (levels-- > 0)
+ printf("../");
+
+ printf("\n");
+
+ exit(0);
+}
diff --git a/nx-X11/config/util/revpath.man b/nx-X11/config/util/revpath.man
new file mode 100644
index 000000000..5b9cace15
--- /dev/null
+++ b/nx-X11/config/util/revpath.man
@@ -0,0 +1,45 @@
+.\" $XFree86: xc/config/util/revpath.man,v 1.1 1999/01/03 03:58:14 dawes Exp $
+.TH REVPATH 1 __vendorversion__
+.SH NAME
+revpath \- generate a relative path that can be used to undo a change-directory
+.SH SYNOPSIS
+.B revpath
+.I path
+.SH DESCRIPTION
+The
+.I revpath
+program prints out a relative path that is the ``reverse'' or ``inverse'' of
+.IR path .
+Start with two directories
+.I top
+and
+.IR bottom ,
+with the latter below the former, and
+.I path
+is the location of
+.I bottom
+relative to
+.IR top .
+The output of
+.I revpath
+is the location of
+.I top
+relative to
+.IR bottom .
+The resulting path contains a trailing `/' character when the result is
+non-trivial.
+If
+.I path
+is equivalent to `.', the resulting output is empty.
+If
+.I path
+is invalid in some way (e.g., doesn't represent the path to a subdirectory)
+the output is also empty and no error messages are ever generated.
+.SH DIAGNOSTICS
+There are no diagnostics. Error conditions are silently ignored, and the
+exit status is always 0.
+.SH BUGS
+It isn't possible to reverse arbitrary relative paths.
+If any path element between the two end points of
+.I path
+is a symbolic link, the results will probably be incorrect.
diff --git a/nx-X11/config/util/syminst.sh b/nx-X11/config/util/syminst.sh
new file mode 100644
index 000000000..f9e1863d5
--- /dev/null
+++ b/nx-X11/config/util/syminst.sh
@@ -0,0 +1,90 @@
+#!/bin/sh
+
+#
+# syminst - install with a symbolic link back to the build tree
+#
+
+# set DOITPROG to echo to test this script
+
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+lnprog="${LNPROG-ln -s}"
+rmprog="${RMPROG-rm}"
+
+instcmd="$lnprog"
+rmcmd="$rmprog -f"
+srcdir=`pwd`/
+src=""
+dst=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) shift
+ continue;;
+
+ -m) shift
+ shift
+ continue;;
+
+ -o) shift
+ shift
+ continue;;
+
+ -g) shift
+ shift
+ continue;;
+
+ -s) shift
+ continue;;
+
+ -DIR) srcdir=`echo $2 | sed 's;/\./;/;g'`/
+ shift
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "syminst: no input file specified"
+ exit 1
+fi
+
+if [ x"$dst" = x ]
+then
+ echo "syminst: no destination specified"
+ exit 1
+fi
+
+
+# if destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+if [ -d $dst ]
+then
+ dst="$dst"/`basename $src`
+fi
+
+case $src in
+ /*) srcdir=""
+ instcmd=cp;;
+esac
+
+# get rid of the old one and mode the new one in
+
+$doit $rmcmd $dst
+$doit $instcmd $srcdir$src $dst
+
+exit 0
diff --git a/nx-X11/config/util/x11mf.sh b/nx-X11/config/util/x11mf.sh
new file mode 100644
index 000000000..2c44194d5
--- /dev/null
+++ b/nx-X11/config/util/x11mf.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+#
+# generate a Makefile within the build tree
+#
+# usage: x11mf [treedir]
+#
+
+if [ x$1 != x ]; then
+ tree=$1
+else
+ tree=/x11
+fi
+
+dir=`pwd`
+top=`(cd $tree; /bin/pwd)`
+intree=no
+
+case $dir in
+ $top*) intree=yes;;
+esac
+
+if [ $intree != yes ]; then
+ echo "$0: Must be underneath $tree"
+ exit 1
+fi
+
+(cd ..; make SUBDIRS=`basename $dir` Makefiles)
diff --git a/nx-X11/config/util/xmake.cmd b/nx-X11/config/util/xmake.cmd
new file mode 100644
index 000000000..24e14947f
--- /dev/null
+++ b/nx-X11/config/util/xmake.cmd
@@ -0,0 +1,5 @@
+/* REXX */
+/* $XFree86: xc/config/util/xmake.cmd,v 3.0 1996/01/24 21:56:17 dawes Exp $ */
+'@echo off'
+PARSE ARG a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
+x11make.exe 'MAKE=x11make.exe SHELL=' a1 a2 a3 a4 a5 a6 a7 a8 a9 a10
diff --git a/nx-X11/config/util/xmkmf.cpp b/nx-X11/config/util/xmkmf.cpp
new file mode 100644
index 000000000..3d03bde3f
--- /dev/null
+++ b/nx-X11/config/util/xmkmf.cpp
@@ -0,0 +1,70 @@
+XCOMM!/bin/sh
+
+XCOMM $XFree86: xc/config/util/xmkmf.cpp,v 1.3 2000/11/06 21:57:10 dawes Exp $
+XCOMM
+XCOMM make a Makefile from an Imakefile from inside or outside the sources
+XCOMM
+XCOMM $Xorg: xmkmf.cpp,v 1.3 2000/08/17 19:41:53 cpqbld Exp $
+
+usage="usage: $0 [-a] [top_of_sources_pathname [current_directory]]"
+
+configdirspec=CONFIGDIRSPEC
+topdir=
+curdir=.
+do_all=
+imake_defines=
+
+while [ $# -gt 0 ]
+do
+ case "$1" in
+ -D*)
+ imake_defines="$imake_defines $1"
+ shift
+ ;;
+ -a)
+ do_all="yes"
+ shift
+ ;;
+ *)
+ break
+ ;;
+ esac
+done
+
+case $# in
+ 0) ;;
+ 1) topdir=$1 ;;
+ 2) topdir=$1 curdir=$2 ;;
+ *) echo "$usage" 1>&2; exit 1 ;;
+esac
+
+case "$topdir" in
+ -*) echo "$usage" 1>&2; exit 1 ;;
+esac
+
+if [ -f Makefile ]; then
+ echo mv -f Makefile Makefile.bak
+ mv -f Makefile Makefile.bak
+fi
+
+if [ "$topdir" = "" ]; then
+ args="-DUseInstalled "$configdirspec
+else
+ args="-I$topdir/config/cf -DTOPDIR=$topdir -DCURDIR=$curdir"
+fi
+
+echo imake $imake_defines $args
+case "$do_all" in
+yes)
+ imake $imake_defines $args &&
+ echo "make Makefiles" &&
+ make Makefiles &&
+ echo "make includes" &&
+ make includes &&
+ echo "make depend" &&
+ make depend
+ ;;
+*)
+ imake $imake_defines $args
+ ;;
+esac
diff --git a/nx-X11/config/util/xmkmf.man b/nx-X11/config/util/xmkmf.man
new file mode 100644
index 000000000..8a4f234dd
--- /dev/null
+++ b/nx-X11/config/util/xmkmf.man
@@ -0,0 +1,89 @@
+.\" $Xorg: xmkmf.man,v 1.4 2001/02/09 02:03:17 xorgcvs Exp $
+.\" Copyright (c) 1993, 1994, 1998 The Open Group
+.\"
+.\" Permission to use, copy, modify, distribute, and sell this software and its
+.\" documentation for any purpose is hereby granted without fee, provided that
+.\" the above copyright notice appear in all copies and that both that
+.\" copyright notice and this permission notice appear in supporting
+.\" documentation.
+.\"
+.\" The above copyright notice and this permission notice shall be included in
+.\" all copies or substantial portions of the Software.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+.\" IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+.\" FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+.\" THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+.\" WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
+.\" OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+.\" SOFTWARE.
+.\"
+.\" Except as contained in this notice, the name of The Open Group shall not
+.\" be used in advertising or otherwise to promote the sale, use or other
+.\" dealing in this Software without prior written authorization from The
+.\" Open Group.
+.\"
+.\" $XFree86: xc/config/util/xmkmf.man,v 1.2 2001/01/27 18:19:55 dawes Exp $
+.\"
+.TH XMKMF 1 __xorgversion__
+.SH NAME
+xmkmf \- create a Makefile from an Imakefile
+.SH SYNOPSIS
+.B xmkmf
+[ -a ] [
+.I topdir
+[
+.I curdir
+] ]
+.SH DESCRIPTION
+The
+.I xmkmf
+command is the normal way to create a
+.I Makefile
+from an
+.I Imakefile
+shipped with third-party software.
+.PP
+When invoked with no arguments in a directory containing an
+.I Imakefile,
+the
+.I imake
+program is run with arguments appropriate for your system
+(configured into
+.I xmkmf
+when X was built) and generates a
+.I Makefile.
+.PP
+When invoked with the
+.I \-a
+option,
+.I xmkmf
+builds the
+.I Makefile
+in the current directory, and then automatically executes
+``make Makefiles'' (in case there are subdirectories),
+``make includes'',
+and ``make depend'' for you.
+This is the normal way to configure software that is outside
+the X Consortium build tree.
+.PP
+If working inside the X Consortium build tree (unlikely unless you
+are an X developer, and even then this option is never really used), the
+.I topdir
+argument should be specified as the relative pathname from the
+current directory to the top of the build tree. Optionally,
+.I curdir
+may be specified as a relative pathname from the top of the build
+tree to the current directory. It is necessary to supply
+.I curdir
+if the current directory has subdirectories, or the
+.I Makefile
+will not be able to build the subdirectories.
+If a
+.I topdir
+is given,
+.I xmkmf
+assumes nothing is installed on your system and looks for files in
+the build tree instead of using the installed versions.
+.SH "SEE ALSO"
+imake(1)