Convert uses of XKeycodeToKeysym (deprecated) to XkbKeycodeToKeysym
[oweals/cde.git] / cde / config / cf / X11.tmpl
1 XCOMM ----------------------------------------------------------------------
2 XCOMM X Window System Build Parameters and Rules
3 XCOMM $TOG: X11.tmpl /main/308 1998/06/16 15:14:24 msr $
4
5 /***************************************************************************
6  *                                                                         *
7  *                            DEFAULT DEFINITIONS                          *
8  *                                                                         *
9  * The following section contains defaults for things that can             *
10  * overridden in the various *.cf and site.def files.  DO NOT EDIT!        *
11  *                                                                         *
12  **************************************************************************/
13
14 #define ProjectX                604     /* do *not* change this line */
15
16 /* The following project-specific rules are defined at the end of this file:
17  *
18  * InstallAppDefaults           (class)
19  * InstallAppDefaultsLong       (file,class)
20  * MakeFontsDir                 (deplist)
21  * MakeFonts                    ()
22  * InstallFontObjs              (objs,dest)
23  * InstallFonts                 (dest)
24  * InstallFontAliases           (dest)
25  * FontSrc                      (basename)
26  * FontBaseObj                  (basename)
27  * InstallFontScale             (dest)
28  * UncompressedFontTarget       (basename)
29  * CompressedFontTarget         (basename)
30  * FontTarget                   (basename)
31  * FontObj                      (basename)
32  * MakeXkbDir                   (basedir,subdir)
33  */
34
35 /*
36  * X-specific things
37  */
38 #ifndef HasXServer
39 #define HasXServer              YES
40 #endif
41 #ifndef BuildServer
42 #define BuildServer             HasXServer
43 #endif
44 #ifndef BuildFontServer
45 #define BuildFontServer         YES
46 #endif
47 #ifndef BuildFonts
48 #define BuildFonts              (BuildServer | BuildFontServer)
49 #endif
50 #ifndef HasXAudio
51 #define HasXAudio               NO
52 #endif
53 #ifndef BuildXAudio
54 #define BuildXAudio             (HasXAudio & HasCplusplus)
55 #endif
56 #ifndef HasXAServer
57 #define HasXAServer             NO
58 #endif
59 #ifndef BuildXAServer
60 #define BuildXAServer           (HasXAServer & HasCplusplus)
61 #endif
62 #ifndef BuildPhigs
63 #define BuildPhigs              NO
64 #endif
65 #ifndef BuildPexExt
66 #define BuildPexExt             NO
67 #endif
68 #ifndef BuildXInputExt
69 #define BuildXInputExt          NO
70 #endif
71 #ifndef BuildEVI
72 #define BuildEVI                YES
73 #endif
74 #ifndef BuildDBE
75 #define BuildDBE                YES
76 #endif
77 #ifndef BuildDIS
78 #define BuildDIS                NO
79 #endif
80 #ifndef BuildDPMS
81 #define BuildDPMS               YES
82 #endif
83 #ifndef BuildLowMem
84 #define BuildLowMem             NO
85 #endif
86 #ifndef BuildLBX
87 #define BuildLBX                YES
88 #endif
89 #ifndef BuildXIE
90         /*
91          * Turn off building XIE if you are building for low memory
92          * footprint
93          */
94 #if BuildLowMem
95 #define BuildXIE                NO
96 #else
97 #define BuildXIE                YES
98 #endif
99 #endif
100 #ifndef BuildXKB
101 #define BuildXKB                YES
102 #endif
103 #ifndef BuildXKBlib
104 #define BuildXKBlib             YES
105 #endif
106         /*
107          * WARNING: Setting UseXKBInClients to YES cause incompatibilities
108          *          between many clients (such as xterm) and pre-XKB shared
109          *          libraries.
110          */
111 #ifndef UseXKBInClients
112 #define UseXKBInClients         NO      /* use XKB in "normal" clients? */
113 #endif
114 #ifndef BuildMultibuffer
115 #define BuildMultibuffer        NO
116 #endif
117 #ifndef BuildRECORD
118 #define BuildRECORD             YES
119 #endif
120 #ifndef BuildXinerama
121 #define BuildXinerama           NO
122 #endif
123 #ifndef BuildXCSecurity
124 #define BuildXCSecurity         YES
125 #endif
126 #ifndef BuildAppgroup
127 #define BuildAppgroup           YES
128 #endif
129 #ifndef BuildCup
130 #define BuildCup                YES
131 #endif
132         /*
133          * Turn off building PEX if you are building for low memory
134          * footprint
135          */
136 #if BuildLowMem
137 #define BuildPexExt             NO
138 #endif
139 #ifndef HasPlugin
140 #define HasPlugin               NO
141 #endif
142 #ifndef BuildPlugin
143 #define BuildPlugin             HasPlugin
144 #endif
145 #ifndef XprtServer
146 #define XprtServer              BuildServer
147 #endif
148 #ifndef BuildXprint
149 #if XprtServer
150 #define BuildXprint             YES
151 #else
152 #define BuildXprint             NO
153 #endif
154 #endif
155 #ifndef InstallLibManPages
156 #define InstallLibManPages      YES
157 #endif
158 #ifndef InstallXtermSetUID
159 #define InstallXtermSetUID      YES     /* xterm needs to be set uid */
160 #endif
161 #ifndef InstallXinitConfig
162 #define InstallXinitConfig      NO      /* install sample xinit config */
163 #endif
164 #ifndef InstallXdmConfig
165 #define InstallXdmConfig        NO      /* install sample xdm config */
166 #endif
167 #ifndef XdmServersType                  /* what Xservers files to use */
168 #if BuildServer
169 #define XdmServersType ws
170 #else
171 #define XdmServersType fs
172 #endif
173 #endif
174 #ifndef InstallFSConfig
175 #define InstallFSConfig         NO      /* install sample fs config */
176 #endif
177 #ifndef InstallAppDefFiles
178 #define InstallAppDefFiles      YES     /* install application defaults */
179 #endif
180 #ifndef ThreadedX
181 #if HasPosixThreads || HasCThreads
182 #define ThreadedX               YES     /* multi-threaded libraries */
183 #else
184 #define ThreadedX               NO
185 #endif
186 #endif
187 #ifndef ThreadedProject
188 #define ThreadedProject ThreadedX
189 #endif
190 #ifndef HasWChar32
191 #define HasWChar32              SystemV4
192 #endif
193 #ifndef HasXdmAuth
194 #define HasXdmAuth              NO      /* if you can not use XDM-AUTH* */
195 #endif
196 #ifndef PrimaryScreenResolution
197 #define PrimaryScreenResolution 72              /* a common resolution */
198 #endif
199 #ifndef DefaultFontPath
200         /*
201          * Turn off building Speedo and Type1 fonts if you are building for
202          * low memory footprint
203          */
204 #if BuildLowMem
205 #define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/
206 #else
207 #if PrimaryScreenResolution < 88                /* (75 + 100) / 2 */
208 #define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/
209 #else
210 #define DefaultFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,$(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/
211 #endif
212 #endif
213 #endif
214 #ifndef DefaultFSFontPath
215         /*
216          * Define a default fontpath for Font Server independent of that
217          * for X server if building the X server for low memory footprint
218          */
219 #if BuildLowMem
220 #if PrimaryScreenResolution < 88                /* (75 + 100) / 2 */
221 #define DefaultFSFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,
222 $(FONTDIR)/75dpi/,$(FONTDIR)/100dpi/
223 #else
224 #define DefaultFSFontPath $(FONTDIR)/misc/,$(FONTDIR)/Speedo/,$(FONTDIR)/Type1/,
225 $(FONTDIR)/100dpi/,$(FONTDIR)/75dpi/
226 #endif
227 #else
228 #define DefaultFSFontPath DefaultFontPath
229 #endif
230 #endif
231 #ifndef DefaultRGBDatabase
232 #define DefaultRGBDatabase $(LIBDIR)/rgb
233 #endif
234 #ifndef UseRgbTxt
235 #define UseRgbTxt               NO      /* default is to compile with dbm */
236 #endif
237 #ifndef FontCompilerFlags
238 #define FontCompilerFlags -t
239 #endif
240 #ifndef ConnectionFlags
241 #if HasStreams
242 #define ConnectionFlags -DSTREAMSCONN
243 #else
244 #if HasDECnet
245 #define ConnectionFlags -DTCPCONN -DUNIXCONN -DDNETCONN
246 #else
247 #define ConnectionFlags -DTCPCONN -DUNIXCONN
248 #endif
249 #endif
250 #endif
251 #ifndef ProjectThreadsDefines
252 #define ProjectThreadsDefines -DXTHREADS
253 #endif
254 #ifndef FontOSDefines
255 #define FontOSDefines /**/
256 #endif
257 #ifndef FontDefines
258 #define FontDefines -DFONT_SNF -DFONT_BDF -DFONT_PCF -DCOMPRESSED_FONTS FontOSDefines
259 #endif
260 #ifndef XawI18nDefines
261 #if SystemV4
262 #define XawI18nDefines -DHAS_WCTYPE_H
263 #else
264 #define XawI18nDefines -DUSE_XWCHAR_STRING
265 #endif
266 #endif
267 #if Malloc0ReturnsNull
268 #ifndef XMalloc0ReturnsNullDefines
269 #define XMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines
270 #endif
271 #ifndef XtMalloc0ReturnsNullDefines
272 #define XtMalloc0ReturnsNullDefines Malloc0ReturnsNullDefines
273 #endif
274 #endif
275 #ifndef ExtensionOSDefines
276 #define ExtensionOSDefines /**/
277 #endif
278 #ifndef ExtensionDefines
279 #ifndef PexDefines
280 #if BuildPexExt
281 #define PexDefines -DPEXEXT
282 #else
283 #define PexDefines /**/
284 #endif
285 #endif
286 #ifndef ShmDefines
287 #if HasShm
288 #define ShmDefines -DMITSHM
289 #else
290 #define ShmDefines /**/
291 #endif
292 #endif
293 #ifndef XInputDefines
294 #if BuildXInputExt
295 #define XInputDefines -DXINPUT
296 #else
297 #define XInputDefines /**/
298 #endif
299 #endif
300 #ifndef XineramaDefines
301 #if BuildXinerama
302 #define XineramaDefines -DPANORAMIX
303 #else
304 #define XineramaDefines /**/
305 #endif
306 #endif
307 #ifndef XieDefines
308 #if BuildXIE
309 #define XieDefines -DXIE
310 #else
311 #define XieDefines /**/
312 #endif
313 #endif
314 #ifndef PrintOnlyServer
315 #define PrintOnlyServer YES
316 #endif
317 #ifndef XprintDefines
318 #if BuildXprint
319 #if PrintOnlyServer
320 #define XprintDefines -DPIXPRIV
321 #else
322 #define XprintDefines -DXPRINT -DPIXPRIV
323 #endif
324 #else
325 #define XprintDefines /**/
326 #endif
327 #endif
328 #ifndef XkbDefines
329 #if BuildXKB
330 #define XkbDefines -DXKB
331 #else
332 #define XkbDefines /**/
333 #endif
334 #endif
335 #ifndef XkbClientDefines
336 #if UseXKBInClients
337 #define XkbClientDefines -DXKB
338 #else
339 #define XkbClientDefines /**/
340 #endif
341 #endif
342 #ifndef XkbServerDefines
343 #define XkbServerDefines /**/
344 #endif
345 #ifndef LbxDefines
346 #if BuildLBX
347 #define LbxDefines -DLBX
348 #else
349 #define LbxDefines /**/
350 #endif
351 #endif
352 #ifndef BigReqDefines
353 #define BigReqDefines -DBIGREQS
354 #endif
355
356 #ifndef EVIDefines
357 #if BuildEVI
358 #define EVIDefines -DEVI
359 #else
360 #define EVIDefines /**/
361 #endif
362 #endif
363
364 #ifndef DBEDefines
365 #if BuildDBE
366 #define DBEDefines -DDBE
367 #else
368 #define DBEDefines /**/
369 #endif
370 #endif
371
372 #ifndef PervasiveDBEDefines
373 #define PervasiveDBEDefines /* -DNEED_DBE_BUF_BITS -DNEED_DBE_BUF_VALIDATE */
374 #endif
375
376 #ifndef MultibufferDefines
377 #if BuildMultibuffer
378 #define MultibufferDefines -DMULTIBUFFER
379 #else
380 #define MultibufferDefines /**/
381 #endif
382 #endif
383
384 #ifndef VidTuneExtensionDefines
385 #define VidTuneExtensionDefines /**/
386 #endif
387
388 #ifndef RECORDDefines
389 #if BuildRECORD
390 #define RECORDDefines -DXRECORD
391 #else
392 #define RECORDDefines /**/
393 #endif
394 #endif
395
396 #ifndef AppgroupDefines
397 #if BuildAppgroup
398 #define AppgroupDefines -DXAPPGROUP
399 #else
400 #define AppgroupDefines /**/
401 #endif
402 #endif
403
404 #ifndef XCSecurityDefines
405 #if BuildXCSecurity
406 #define XCSecurityDefines -DXCSECURITY
407 #else
408 #define XCSecurityDefines /**/
409 #endif
410 #endif
411
412 #ifndef CupDefines
413 #if BuildCup
414 #define CupDefines -DTOGCUP
415 #else
416 #define CupDefines /**/
417 #endif
418 #endif
419
420 #ifndef LowMemDefines
421 #if BuildLowMem
422 #define LowMemDefines -DLOWMEMFTPT
423 #else
424 #define LowMemDefines /**/
425 #endif
426 #endif
427
428 #ifndef DPMSDefines
429 #if BuildDPMS
430 #define DPMSDefines -DDPMSExtension
431 #else
432 #define DPMSDefines /**/
433 #endif
434 #endif
435
436 #ifndef SitePervasiveExtensionDefines
437 #define SitePervasiveExtensionDefines /**/
438 #endif
439 #ifndef PervasiveExtensionDefines
440 #define PervasiveExtensionDefines \
441         -DSHAPE XInputDefines XkbDefines LbxDefines AppgroupDefines \
442         XCSecurityDefines CupDefines PervasiveDBEDefines DPMSDefines \
443         LowMemDefines XprintDefines XineramaDefines SitePervasiveExtensionDefines
444 #endif
445 #ifndef SiteExtensionDefines
446 #define SiteExtensionDefines /**/
447 #endif
448 #ifndef BaseExtensionDefines
449 #define BaseExtensionDefines \
450         MultibufferDefines -DMITMISC -DXTEST -DXSYNC -DXCMISC RECORDDefines \
451         PexDefines ShmDefines XieDefines BigReqDefines VidTuneExtensionDefines \
452         DBEDefines DPMSDefines EVIDefines SiteExtensionDefines
453 #endif
454 #define ExtensionDefines BaseExtensionDefines ExtensionOSDefines
455 #endif /* ExtensionDefines */
456
457 #ifndef HasStrcasecmp
458 #define HasStrcasecmp YES
459 #endif
460
461 #ifndef StrcasecmpDefines
462 # if HasStrcasecmp
463 #  define StrcasecmpDefines /**/
464 # else
465 #  define StrcasecmpDefines -DNEED_STRCASECMP
466 # endif
467 #endif
468
469 #ifndef ServerXdmcpDefines
470 #define ServerXdmcpDefines -DXDMCP
471 #endif
472 #ifndef ServerOSDefines
473 #define ServerOSDefines /**/
474 #endif
475 #if HasKrb5
476 #ifndef Krb5Defines
477 #define Krb5Defines -DK5AUTH
478 #endif
479 #else
480 #define Krb5Defines /**/
481 #endif
482 #ifndef ServerExtraDefines
483 #define ServerExtraDefines /* -DPIXPRIV */
484 #endif
485 #ifndef ServerAssertDefines
486 #define ServerAssertDefines -DNDEBUG
487 #endif
488 #ifndef ServerDefines
489 #define ServerDefines StandardDefines PervasiveExtensionDefines ServerExtraDefines ServerAssertDefines
490 #endif
491 #ifndef PexDipexDefines
492 #define PexDipexDefines /**/
493 #endif
494 #ifndef PexDdpexDefines
495 #define PexDdpexDefines /**/
496 #endif
497 #ifndef PexPhigsDefines
498 #ifndef PexShmIPC
499 #define PexShmIPC HasShm
500 #endif
501 #if PexShmIPC
502 #define PexPhigsDefines /**/
503 #else
504 #define PexPhigsDefines -DPEX_API_SOCKET_IPC
505 #endif
506 #endif
507 #ifndef PexClientDefines
508 #define PexClientDefines -DPEX_SI_PHIGS
509 #endif
510 #ifndef PhigsInclude
511 #ifdef UseInstalled
512 #define PhigsInclude -I$(INCDIR)/X11
513 #else
514 #define PhigsInclude -I$(BUILDINCDIR)
515 #endif
516 #endif
517 #ifndef PexCDebugFlags
518 #define PexCDebugFlags DebuggableCDebugFlags
519 #endif
520 #ifndef PexCCOptions
521 #ifdef LibraryCCOptions
522 #define PexCCOptions LibraryCCOptions
523 #else
524 #define PexCCOptions DefaultCCOptions
525 #endif
526 #endif
527 #ifndef DefaultFSConfigFile
528 #define DefaultFSConfigFile $(LIBDIR)/fs/config
529 #endif
530 #ifndef BinDir
531 #ifdef ProjectRoot
532 #define BinDir Concat(ProjectRoot,/bin)
533 #else
534 #define BinDir /usr/bin/X11
535 #endif
536 #endif
537 #ifndef BuildIncRoot
538 #define BuildIncRoot $(TOP)/exports
539 #endif
540 #ifndef BuildIncDir
541 #define BuildIncDir $(BUILDINCROOT)/include
542 #endif
543 #ifndef BuildIncTop
544 #define BuildIncTop ../..       /* relative to BuildIncDir */
545 #endif
546 #ifndef XTop
547 # if ImportX11
548 #  define XTop $(TOP)/imports/x11
549 # else
550 #  define XTop $(TOP)
551 # endif
552 #endif
553 #ifndef XBuildIncRoot
554 # if ImportX11
555 #  define XBuildIncRoot $(XTOP)
556 # else
557 #  define XBuildIncRoot $(XTOP)/exports
558 # endif
559 #endif
560 #ifndef XBuildIncDir
561 # define XBuildIncDir   $(XBUILDINCROOT)/include/X11
562 #endif
563 #ifndef XBuildIncTop
564 # define XBuildIncTop   ../../..
565 #endif
566 #ifndef XBuildBinDir
567 # define XBuildBinDir   $(XBUILDINCROOT)/bin
568 #endif
569 #ifndef BuildBinDir
570 #define BuildBinDir $(TOP)/exports/bin
571 #endif
572 #ifndef BuildBinTop
573 #define BuildBinTop ../..       /* relative to BuildBinDir */
574 #endif
575 #ifndef BuildLibDir
576 #define BuildLibDir $(TOP)/exports/lib
577 #endif
578 #ifndef BuildLibTop
579 #define BuildLibTop ../..       /* relative to BuildLibDir */
580 #endif
581 #ifndef LibDir
582 #define LibDir $(USRLIBDIR)/X11
583 #endif
584 #ifndef ConfigDir
585 #define ConfigDir $(LIBDIR)/config
586 #endif
587 #ifndef FontDir
588 #define FontDir $(LIBDIR)/fonts
589 #endif
590 #ifndef AdmDir
591 #define AdmDir /usr/adm
592 #endif
593 #ifndef XinitDir
594 #define XinitDir $(LIBDIR)/xinit
595 #endif
596 #ifndef XdmDir
597 #define XdmDir $(LIBDIR)/xdm
598 #endif
599 #ifndef XdmConfigurationSubdirectory            /* under xdm sources */
600 #define XdmConfigurationSubdirectory config
601 #endif
602 #ifndef TwmDir
603 #define TwmDir $(LIBDIR)/twm
604 #endif
605 #ifndef XsmDir
606 #define XsmDir $(LIBDIR)/xsm
607 #endif
608 #ifndef NlsDir
609 #define NlsDir $(LIBDIR)/nls
610 #endif
611 #ifndef XLocaleDir
612 #define XLocaleDir $(LIBDIR)/locale
613 #endif
614 #ifndef PexApiDir
615 #define PexApiDir $(LIBDIR)/PEX
616 #endif
617 #ifndef LbxproxyDir
618 #define LbxproxyDir $(LIBDIR)/lbxproxy
619 #endif
620 #ifndef LbxproxyConfigSubdir            /* under lbxproxy sources */
621 #define LbxproxyConfigSubdir config
622 #endif
623 #ifndef ProxyManagerDir
624 #define ProxyManagerDir $(LIBDIR)/proxymngr
625 #endif
626 #ifndef ServerConfigDir
627 #define ServerConfigDir $(LIBDIR)/xserver
628 #endif
629 #ifndef XPrintDir
630 #define XPrintDir ServerConfigDir
631 #endif
632 #ifndef VarDirectory
633 #define VarDirectory /var/X11
634 #endif
635 #ifndef InstallSecurityConfig
636 #define InstallSecurityConfig YES       /* Install sample security policy */
637 #endif
638 #ifndef XFileSearchPathBase
639 /* avoid SCCS keyword */
640 #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)
641 #endif
642 #ifndef XFileSearchPathDefault
643 #ifdef XAppLoadDir
644 /* avoid SCCS keyword */
645 #define XFileSearchPathDefault XAppLoadDir/Concat(%N%C,%S):XAppLoadDir/%N%S:XFileSearchPathBase
646 #else
647 #define XFileSearchPathDefault XFileSearchPathBase
648 #endif
649 #endif
650 #ifndef XAppLoadDir
651 #define XAppLoadDir $(LIBDIR)/app-defaults
652 #endif
653 #ifndef XtErrorPrefix
654 #define XtErrorPrefix /* as empty string */
655 #endif
656 #ifndef XtExtraDefines
657 #define XtExtraDefines /* as empty string */
658 #endif
659 #ifndef XtWarningPrefix
660 #define XtWarningPrefix /* as empty string */
661 #endif
662 #ifndef OsNameDefines
663 #define OsNameDefines /* as nothing */
664 #endif
665 #ifndef DefaultUserPath                 /* for xdm */
666 #define DefaultUserPath :/bin:/usr/bin:$(BINDIR):/usr/ucb
667 #endif
668 #ifndef DefaultSystemPath               /* for xdm */
669 #define DefaultSystemPath /etc:/bin:/usr/bin:$(BINDIR):/usr/ucb
670 #endif
671 #ifndef DefaultSystemShell              /* for xdm to set in SHELL */
672 #define DefaultSystemShell BourneShell
673 #endif
674 #ifndef ContribDir
675 #define ContribDir $(XTOP)/../contrib   /* contrib is outside core tree */
676 #endif
677 #ifndef UnsupportedDir
678 #define UnsupportedDir $(XTOP)/unsupported
679 #endif
680 #ifndef AllocateLocalDefines
681 #define AllocateLocalDefines /**/
682 #endif
683
684 #ifndef ForceNormalLib
685 #define ForceNormalLib (HasGcc && !HasGcc2)
686 #endif
687
688 #ifndef ResourceConfigurationManagement 
689 #define ResourceConfigurationManagement YES
690 #endif
691
692 #ifndef XtPopdownConformance 
693 #define XtPopdownConformance YES
694 #endif
695
696 XCOMM -----------------------------------------------------------------------
697 XCOMM X Window System make variables; these need to be coordinated with rules
698
699 /*
700  * This list must be reflected in the DIRS_TO_BUILD list in the top-level
701  * Makefile.
702  */
703              XTOP = XTop
704            BINDIR = BinDir              /* programs */
705      BUILDINCROOT = BuildIncRoot        /* base of build loc */
706       BUILDINCDIR = BuildIncDir         /* built headers */
707       BUILDINCTOP = BuildIncTop         /* top relative to BUILDINCDIR */
708       BUILDLIBDIR = BuildLibDir         /* built libraries */
709       BUILDLIBTOP = BuildLibTop         /* top relative to BUILDLIBDIR */
710       BUILDBINDIR = BuildBinDir         /* built binaries */
711       BUILDBINTOP = BuildBinTop         /* top relative to BUILDBINDIR */
712     XBUILDINCROOT = XBuildIncRoot       /* base of X build loc */
713      XBUILDINCDIR = XBuildIncDir
714      XBUILDINCTOP = XBuildIncTop
715      XBUILDBINDIR = XBuildBinDir
716            INCDIR = $(INCROOT)          /* header files */
717            ADMDIR = AdmDir              /* server log files */
718            LIBDIR = LibDir              /* rgb, XErrorDB, etc. */
719    TOP_X_INCLUDES = TopXInclude
720
721 #ifdef VarDirectory
722            VARDIR = VarDirectory
723 #endif
724           FONTDIR = FontDir             /* font directories */
725          XINITDIR = XinitDir            /* xinit config files */
726            XDMDIR = XdmDir              /* xdm config files */
727            TWMDIR = TwmDir              /* twm config files */
728            XSMDIR = XsmDir              /* xsm config files */
729            NLSDIR = NlsDir              /* nls files */
730        XLOCALEDIR = XLocaleDir          /* locale files */
731         PEXAPIDIR = PexApiDir           /* PEX support files */
732       LBXPROXYDIR = LbxproxyDir         /* lbxproxy files */
733   PROXYMANAGERDIR = ProxyManagerDir     /* proxy manager config files */
734         XPRINTDIR = XPrintDir           /* print config file root */
735       XAPPLOADDIR = XAppLoadDir         /* application default resource dir */
736        FONTCFLAGS = FontCompilerFlags
737
738      INSTAPPFLAGS = $(INSTDATFLAGS)     /* XXX - this should go away - XXX */
739
740 #ifdef X11ProjectRoot
741      XPROJECTROOT = X11ProjectRoot
742 #endif
743
744 #if defined(X11ProjectRoot)
745               RGB = $(XPROJECTROOT)/bin/rgb
746             FONTC = $(XPROJECTROOT)/bin/bdftopcf
747         MKFONTDIR = $(XPROJECTROOT)/bin/mkfontdir
748 #elif UseInstalledX11
749               RGB = $(BINDIR)/rgb
750             FONTC = $(BINDIR)/bdftopcf
751         MKFONTDIR = $(BINDIR)/mkfontdir
752 #else
753               RGB = $(CLIENTENVSETUP) $(XBUILDBINDIR)/rgb
754             FONTC = $(CLIENTENVSETUP) $(XBUILDBINDIR)/bdftopcf
755         MKFONTDIR = $(CLIENTENVSETUP) $(XBUILDBINDIR)/mkfontdir
756 #endif
757
758        DOCUTILSRC = $(XTOP)/doc/util
759        XDOCMACROS = $(DOCUTILSRC)/macros.t
760        XIDXMACROS = $(DOCUTILSRC)/indexmacros.t
761        PROGRAMSRC = $(TOP)/programs
762            LIBSRC = $(XTOP)/lib
763           FONTSRC = $(XTOP)/fonts
764        INCLUDESRC = BuildIncDir
765       XINCLUDESRC = $(INCLUDESRC)/X11
766         SERVERSRC = $(XTOP)/programs/Xserver
767        CONTRIBSRC = ContribDir
768    UNSUPPORTEDSRC = UnsupportedDir
769            DOCSRC = $(XTOP)/doc
770            RGBSRC = $(XTOP)/programs/rgb
771       BDFTOPCFSRC = $(PROGRAMSRC)/bdftopcf
772      MKFONTDIRSRC = $(PROGRAMSRC)/mkfontdir
773     FONTSERVERSRC = $(PROGRAMSRC)/xfs
774        FONTINCSRC = $(XTOP)/include/fonts
775         EXTINCSRC = $(XTOP)/include/extensions
776      TRANSCOMMSRC = $(LIBSRC)/xtrans
777    TRANS_INCLUDES = -I$(TRANSCOMMSRC)
778 #ifdef BuildLibPathVar
779 # ifdef SystemBuildLibPath
780   SYSTEMENVLIBDIR = SystemBuildLibPath
781 # endif
782        XENVLIBDIR = X11BuildLibPath
783    CLIENTENVSETUP = BuildLibPathVar=BuildLibPath
784 #else
785    CLIENTENVSETUP = 
786 #endif
787
788 #ifndef ShLibIncludeFile
789 /* need this to make ANSI-style preprocessors happy */
790 #define ShLibIncludeFile <noop.rules>
791 #endif
792
793 #include ShLibIncludeFile
794
795 #ifndef XBuildLibDir
796 # define XBuildLibDir   BuildLibDir
797 #endif
798
799 #ifndef SharedLibX11
800 #define SharedLibX11 HasSharedLibraries
801 #endif
802 #ifndef NormalLibX11
803 #define NormalLibX11 (!SharedLibX11 | ForceNormalLib)
804 #endif
805 #ifndef DebugLibX11
806 #define DebugLibX11             NO      /* debugged X library */
807 #endif
808 #ifndef ProfileLibX11
809 #define ProfileLibX11           NO      /* profiled X library */
810 #endif
811           XLIBSRC = $(LIBSRC)/X11
812 #if SharedLibX11
813 #ifndef SharedX11Rev
814 #define SharedX11Rev 6.1
815 #endif
816 SharedLibReferences(XONLY,X11,$(XLIBSRC),SOXLIBREV,SharedX11Rev)
817 #else
818 ProjectUnsharedLibReferences(XONLY,X11,$(XLIBSRC),XBuildLibDir)
819 #endif
820          XLIBONLY = $(XONLYLIB)
821
822 #ifndef SharedLibXext
823 #define SharedLibXext HasSharedLibraries
824 #endif
825 #ifndef NormalLibXext
826 #define NormalLibXext (!SharedLibXext | ForceNormalLib)
827 #endif
828 #ifndef DebugLibXext
829 #define DebugLibXext            NO      /* debugged Xext library */
830 #endif
831 #ifndef ProfileLibXext
832 #define ProfileLibXext          NO      /* profiled Xext library */
833 #endif
834       XEXTLIBSRC = $(LIBSRC)/Xext
835 #if SharedLibXext
836 #ifndef SharedXextRev
837 #define SharedXextRev 6.4
838 #endif
839 SharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),SOXEXTREV,SharedXextRev)
840 #else
841 ProjectUnsharedLibReferences(EXTENSION,Xext,$(XEXTLIBSRC),XBuildLibDir)
842 #endif
843 LINTEXTENSIONLIB = $(LINTEXTENSION)
844           DEPXLIB = $(DEPEXTENSIONLIB) $(DEPXONLYLIB)
845              XLIB = $(EXTENSIONLIB) $(XONLYLIB)
846          LINTXLIB = $(LINTXONLYLIB)
847
848 #ifndef SharedLibXau
849 #define SharedLibXau NO         /* don't need shared form */
850 #endif
851 #ifndef NormalLibXau
852 #define NormalLibXau (!SharedLibXau | ForceNormalLib)
853 #endif
854 #ifndef DebugLibXau
855 #define DebugLibXau             NO      /* debugged auth library */
856 #endif
857 #ifndef ProfileLibXau
858 #define ProfileLibXau           NO      /* profiled auth library */
859 #endif
860          XAUTHSRC = $(LIBSRC)/Xau
861 #if SharedLibXau
862 #ifndef SharedXauRev
863 #define SharedXauRev 6.0
864 #endif
865 SharedLibReferences(XAUTH,Xau,$(XAUTHSRC),SOXAUTHREV,SharedXauRev)
866 #else
867 ProjectUnsharedLibReferences(XAUTH,Xau,$(XAUTHSRC),XBuildLibDir)
868 #endif
869
870 #ifndef SharedLibXdmcp
871 #define SharedLibXdmcp NO       /* don't need shared form */
872 #endif
873 #ifndef NormalLibXdmcp
874 #define NormalLibXdmcp (!SharedLibXdmcp | ForceNormalLib)
875 #endif
876 #ifndef DebugLibXdmcp
877 #define DebugLibXdmcp           NO      /* debugged XDMCP library */
878 #endif
879 #ifndef ProfileLibXdmcp
880 #define ProfileLibXdmcp         NO      /* profiled XDMCP library */
881 #endif
882       XDMCPLIBSRC = $(LIBSRC)/Xdmcp
883 #if SharedLibXdmcp
884 #ifndef SharedXdmcpRev
885 #define SharedXdmcpRev 6.0
886 #endif
887 SharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),SOXDMCPREV,SharedXdmcpRev)
888 #else
889 ProjectUnsharedLibReferences(XDMCP,Xdmcp,$(XDMCPLIBSRC),XBuildLibDir)
890 #endif
891
892 #ifndef SharedLibXmu
893 #define SharedLibXmu HasSharedLibraries
894 #endif
895 #ifndef NormalLibXmu
896 #define NormalLibXmu (!SharedLibXmu | ForceNormalLib)
897 #endif
898 #ifndef DebugLibXmu
899 #define DebugLibXmu             NO      /* debugged Xmu library */
900 #endif
901 #ifndef ProfileLibXmu
902 #define ProfileLibXmu           NO      /* profiled Xmu library */
903 #endif
904            XMUSRC = $(LIBSRC)/Xmu
905 #if SharedLibXmu
906 #ifndef SharedXmuRev
907 #define SharedXmuRev 6.0
908 #endif
909 SharedDSLibReferences(XMU,Xmu,$(XMUSRC),SOXMUREV,SharedXmuRev)
910 #else
911 ProjectUnsharedLibReferences(XMU,Xmu,$(XMUSRC),XBuildLibDir)
912 #endif
913
914 #ifndef SharedOldX
915 #define SharedOldX HasSharedLibraries
916 #endif
917 #ifndef NormalOldX
918 #define NormalOldX (!SharedOldX | ForceNormalLib)
919 #endif
920 #ifndef DebugOldX
921 #define DebugOldX               NO      /* debugged old X library */
922 #endif
923 #ifndef ProfileOldX
924 #define ProfileOldX             NO      /* profiled old X library */
925 #endif
926        OLDXLIBSRC = $(LIBSRC)/oldX
927 #if SharedOldX
928 #ifndef SharedOldXRev
929 #define SharedOldXRev 6.0
930 #endif
931 SharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),SOOLDXREV,SharedOldXRev)
932 #else
933 ProjectUnsharedLibReferences(OLDX,oldX,$(OLDXLIBSRC),XBuildLibDir)
934 #endif
935
936 #ifndef SharedLibXt
937 #define SharedLibXt HasSharedLibraries
938 #endif
939 #ifndef NormalLibXt
940 #define NormalLibXt (!SharedLibXt | ForceNormalLib)
941 #endif
942 #ifndef DebugLibXt
943 #define DebugLibXt              NO      /* debugged toolkit library */
944 #endif
945 #ifndef ProfileLibXt
946 #define ProfileLibXt            NO      /* profiled toolkit library */
947 #endif
948        TOOLKITSRC = $(LIBSRC)/Xt
949 #if SharedLibXt
950 #ifndef SharedXtRev
951 #define SharedXtRev 6.0
952 #endif
953 SharedDSLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),SOXTREV,SharedXtRev)
954 #else
955 ProjectUnsharedLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),XBuildLibDir)
956 #endif
957       DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB)
958          XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB)
959      LINTXTOOLLIB = $(LINTXTOOLONLYLIB)
960
961 #ifndef SharedLibXa
962 #define SharedLibXa     (HasSharedLibraries & HasCplusplus)
963 #endif
964 #ifndef NormalLibXa
965 /* #define NormalLibXa  ((!SharedLibXa | ForceNormalLib) & HasCplusplus) */
966 #define NormalLibXa     YES /* needed for current tests, will correct later */
967 #endif
968 #ifndef DebugLibXa
969 #define DebugLibXa      NO      /* debugged audio library */
970 #endif
971 #ifndef ProfileLibXa
972 #define ProfileLibXa    NO      /* profiled audio library */
973 #endif
974        XALIBSRC = $(LIBSRC)/Xa
975 #if SharedLibXa
976 #ifndef SharedXaRev
977 #define SharedXaRev 1.0
978 #endif
979 SharedLibReferences(XA,Xa,$(XALIBSRC),SOXAREV,SharedXaRev)
980 #else
981 UnsharedLibReferences(XA,Xa,$(XALIBSRC))
982 #endif
983
984 #ifndef SharedLibXaw
985 #define SharedLibXaw HasSharedLibraries
986 #endif
987 #ifndef NormalLibXaw
988 #define NormalLibXaw (!SharedLibXaw | ForceNormalLib)
989 #endif
990 #ifndef DebugLibXaw
991 #define DebugLibXaw             NO      /* debugged widget library */
992 #endif
993 #ifndef ProfileLibXaw
994 #define ProfileLibXaw           NO      /* profiled widget library */
995 #endif
996        AWIDGETSRC = $(LIBSRC)/Xaw
997 #if SharedLibXaw
998 #ifndef SharedXawRev
999 #define SharedXawRev 6.1
1000 #endif
1001 SharedDSLibReferences(XAW,Xaw,$(AWIDGETSRC),SOXAWREV,SharedXawRev)
1002 #else
1003 ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGETSRC),XBuildLibDir)
1004 #endif
1005
1006 #ifndef SharedLibXi
1007 #define SharedLibXi HasSharedLibraries
1008 #endif
1009 #ifndef NormalLibXi
1010 #define NormalLibXi (!SharedLibXi | ForceNormalLib)
1011 #endif
1012 #ifndef DebugLibXi
1013 #define DebugLibXi              NO      /* debugged Xi library */
1014 #endif
1015 #ifndef ProfileLibXi
1016 #define ProfileLibXi            NO      /* profiled Xi library */
1017 #endif
1018          XILIBSRC = $(LIBSRC)/Xi
1019 #if SharedLibXi
1020 #ifndef SharedXiRev
1021 #define SharedXiRev 6.0
1022 #endif
1023 SharedLibReferences(XI,Xi,$(XILIBSRC),SOXINPUTREV,SharedXiRev)
1024 #else
1025 ProjectUnsharedLibReferences(XI,Xi,$(XILIBSRC),XBuildLibDir)
1026 #endif
1027
1028 #ifndef SharedLibXtst
1029 #define SharedLibXtst HasSharedLibraries
1030 #endif
1031 #ifndef NormalLibXtst
1032 #define NormalLibXtst (!SharedLibXtst | ForceNormalLib)
1033 #endif
1034 #ifndef DebugLibXtst
1035 #define DebugLibXtst            NO      /* debugged Xtst library */
1036 #endif
1037 #ifndef ProfileLibXtst
1038 #define ProfileLibXtst          NO      /* profiled Xtst library */
1039 #endif
1040       XTESTLIBSRC = $(LIBSRC)/Xtst
1041 #if SharedLibXtst
1042 #ifndef SharedXtstRev
1043 #define SharedXtstRev 6.1
1044 #endif
1045 SharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev)
1046 #else
1047 ProjectUnsharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),XBuildLibDir)
1048 #endif
1049
1050 #ifndef SharedLibPex
1051 #define SharedLibPex HasSharedLibraries
1052 #endif
1053 #ifndef NormalLibPex
1054 #define NormalLibPex (!SharedLibPex | ForceNormalLib)
1055 #endif
1056 #ifndef DebugLibPex
1057 #define DebugLibPex             NO      /* debugged PEX5 library */
1058 #endif
1059 #ifndef ProfileLibPex
1060 #define ProfileLibPex           NO      /* profiled PEX5 library */
1061 #endif
1062         PEXLIBSRC = $(LIBSRC)/PEX5
1063 #if SharedLibPex
1064 #ifndef SharedPexRev
1065 #define SharedPexRev 6.0
1066 #endif
1067 SharedLibReferences(PEX,PEX5,$(PEXLIBSRC),SOPEXREV,SharedPexRev)
1068 #else
1069 ProjectUnsharedLibReferences(PEX,PEX5,$(PEXLIBSRC),XBuildLibDir)
1070 #endif
1071
1072 #ifndef SharedLibXie
1073 #define SharedLibXie HasSharedLibraries
1074 #endif
1075 #ifndef NormalLibXie
1076 #define NormalLibXie (!SharedLibXie | ForceNormalLib)
1077 #endif
1078 #ifndef DebugLibXie
1079 #define DebugLibXie             NO      /* debugged XIE library */
1080 #endif
1081 #ifndef ProfileLibXie
1082 #define ProfileLibXie           NO      /* profiled XIE library */
1083 #endif
1084         XIELIBSRC = $(LIBSRC)/XIE
1085 #if SharedLibXie
1086 #ifndef SharedXieRev
1087 #define SharedXieRev 6.0
1088 #endif
1089 SharedLibReferences(XIE,XIE,$(XIELIBSRC),SOXIEREV,SharedXieRev)
1090 #else
1091 ProjectUnsharedLibReferences(XIE,XIE,$(XIELIBSRC),XBuildLibDir)
1092 #endif
1093
1094 #ifndef SharedLibPhigs
1095 #define SharedLibPhigs NO       /* XXX - haven't made it sharable yet */
1096 #endif
1097 #ifndef NormalLibPhigs
1098 #define NormalLibPhigs (!SharedLibPhigs | ForceNormalLib)
1099 #endif
1100       PHIGSLIBSRC = $(LIBSRC)/PHIGS
1101 #if SharedLibPhigs
1102 #ifndef SharedPhigsRev
1103 #define SharedPhigsRev 6.0
1104 #endif
1105 SharedLibReferences(PHIGS,phigs,$(PHIGSLIBSRC),SOPHIGSREV,SharedPhigsRev)
1106 #else
1107 ProjectUnsharedLibReferences(PHIGS,phigs,$(PHIGSLIBSRC),XBuildLibDir)
1108 #endif
1109
1110 ProjectUnsharedLibReferences(XBSD,Xbsd,$(LIBSRC)/Xbsd,XBuildLibDir)
1111
1112 #ifndef SharedLibICE
1113 #define SharedLibICE HasSharedLibraries
1114 #endif
1115 #ifndef NormalLibICE
1116 #define NormalLibICE (!SharedLibICE | ForceNormalLib)
1117 #endif
1118 #ifndef DebugLibICE
1119 #define DebugLibICE             NO      /* debugged ICE library */
1120 #endif
1121 #ifndef ProfileLibICE
1122 #define ProfileLibICE           NO      /* profiled ICE library */
1123 #endif
1124            ICESRC = $(LIBSRC)/ICE
1125 #if SharedLibICE
1126 #ifndef SharedICERev
1127 #define SharedICERev 6.3
1128 #endif
1129 SharedLibReferences(ICE,ICE,$(ICESRC),SOICEREV,SharedICERev)
1130 #else
1131 ProjectUnsharedLibReferences(ICE,ICE,$(ICESRC),XBuildLibDir)
1132 #endif
1133
1134 #ifndef SharedLibSM
1135 #define SharedLibSM HasSharedLibraries
1136 #endif
1137 #ifndef NormalLibSM
1138 #define NormalLibSM (!SharedLibSM | ForceNormalLib)
1139 #endif
1140 #ifndef DebugLibSM
1141 #define DebugLibSM              NO      /* debugged SM library */
1142 #endif
1143 #ifndef ProfileLibSM
1144 #define ProfileLibSM            NO      /* profiled SM library */
1145 #endif
1146             SMSRC = $(LIBSRC)/SM
1147 #if SharedLibSM
1148 #ifndef SharedSMRev
1149 #define SharedSMRev 6.0
1150 #endif
1151 SharedLibReferences(SM,SM,$(SMSRC),SOSMREV,SharedSMRev)
1152 #else
1153 ProjectUnsharedLibReferences(SM,SM,$(SMSRC),XBuildLibDir)
1154 #endif
1155
1156 #ifndef SharedLibXkey
1157 #define SharedLibXkey HasSharedLibraries
1158 #endif
1159 #ifndef NormalLibXkey
1160 #define NormalLibXkey (!SharedLibXkey | ForceNormalLib)
1161 #endif
1162 #ifndef DebugLibXkey
1163 #define DebugLibXkey            NO      /* debugged Xkey library */
1164 #endif
1165 #ifndef ProfileLibXkey
1166 #define ProfileLibXkey          NO      /* profiled Xkey library */
1167 #endif
1168            XKEYSRC = $(LIBSRC)/Xkey
1169 #if SharedLibXkey
1170 #ifndef SharedXkeyRev
1171 #define SharedXkeyRev 6.0
1172 #endif
1173 SharedLibReferences(XKEY,Xkey,$(XKEYSRC),SOXKEYREV,SharedXkeyRev)
1174 #else
1175 ProjectUnsharedLibReferences(XKEY,Xkey,$(XKEYSRC),XBuildLibDir)
1176 #endif
1177
1178 #ifndef SharedLibFS
1179 #define SharedLibFS             NO      /* for now */
1180 #endif
1181 #ifndef NormalLibFS
1182 #define NormalLibFS (!SharedLibFS | ForceNormalLib)
1183 #endif
1184 #ifndef DebugLibFS
1185 #define DebugLibFS              NO      /* debugged FS library */
1186 #endif
1187 #ifndef ProfileLibFS
1188 #define ProfileLibFS            NO      /* profiled FS library */
1189 #endif
1190          FSLIBSRC = $(LIBSRC)/FS
1191 #if SharedLibFS
1192 #ifndef SharedFSRev
1193 #define SharedFSRev 6.0
1194 #endif
1195 SharedLibReferences(FS,FS,$(FSLIBSRC),SOFSREV,SharedFSRev)
1196 #else
1197 ProjectUnsharedLibReferences(FS,FS,$(FSLIBSRC),XBuildLibDir)
1198 #endif
1199
1200          FONTLIBSRC = $(LIBSRC)/font
1201 ProjectUnsharedLibReferences(FONT,font,$(FONTLIBSRC),XBuildLibDir)
1202
1203 #ifdef BuildXKBlib
1204     XKBFILELIBSRC = $(LIBSRC)/xkbfile
1205 ProjectUnsharedLibReferences(XKBFILE,xkbfile,$(XKBFILELIBSRC),XBuildLibDir)
1206 #ifndef XkbClientDepLibs
1207 #if UseXKBInClients
1208 #define XkbClientDepLibs $(DEPXKBFILELIB)
1209 #else
1210 #define XkbClientDepLibs /**/
1211 #endif
1212 #endif
1213 #ifndef XkbClientLibs
1214 #if UseXKBInClients
1215 #define XkbClientLibs $(XKBFILELIB)
1216 #else
1217 #define XkbClientLibs /**/
1218 #endif
1219 #endif
1220 #ifdef UseInstalled
1221      XKBCOMPCMD = $(BINDIR)/xkbcomp
1222 #else
1223      XKBCOMPSRC = $(PROGRAMSRC)/xkbcomp
1224      XKBCOMPCMD = $(CLIENTENVSETUP) $(XBUILDBINDIR)/xkbcomp
1225 #endif
1226 #else /* !BuildXKBlib */
1227 #ifndef XkbClientDepLibs
1228 #define XkbClientDepLibs
1229 #endif
1230 #ifndef XkbClientLibs
1231 #define XkbClientLibs
1232 #endif
1233 #endif /* BuildXKBlib */
1234
1235 #ifndef XawClientDepLibs
1236 #define XawClientDepLibs $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
1237 #endif
1238 #ifndef XawClientLibs
1239 #define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
1240 #endif
1241
1242 #ifndef NeedDefaultDepLibs
1243 #define NeedDefaultDepLibs YES
1244 #endif
1245
1246 #if NeedDefaultDepLibs
1247 /*
1248  * Individual libraries should override this
1249  */
1250 #if HasSharedLibraries || defined(UseInstalled)
1251           DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
1252 #else
1253           DEPLIBS = $(LOCAL_LIBRARIES)
1254 #endif
1255          DEPLIBS1 = $(DEPLIBS)
1256          DEPLIBS2 = $(DEPLIBS)
1257          DEPLIBS3 = $(DEPLIBS)
1258          DEPLIBS4 = $(DEPLIBS)
1259          DEPLIBS5 = $(DEPLIBS)
1260          DEPLIBS6 = $(DEPLIBS)
1261          DEPLIBS7 = $(DEPLIBS)
1262          DEPLIBS8 = $(DEPLIBS)
1263          DEPLIBS9 = $(DEPLIBS)
1264          DEPLIBS10 = $(DEPLIBS)
1265 #endif /* NeedDefaultDepLibs */
1266
1267
1268 /*
1269  * InstallAppDefaults - simple rules to install application default file
1270  */
1271 #ifndef InstallAppDefaults
1272 #define InstallAppDefaults(class) InstallAppDefaultsLong(class,class)
1273 #endif /* InstallAppDefaults */
1274
1275 /*
1276  * InstallAppDefaultsLong - general rule to install application default file
1277  * if the InstallAppDefFiles configuration parameter is set.
1278  */
1279 #ifndef InstallAppDefaultsLong
1280 #if InstallAppDefFiles
1281 #define InstallAppDefaultsLong(file,class)                              @@\
1282 LinkVarDirectory(app-defaults,.,app-defaults,.)                         @@\
1283 InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
1284 #else
1285 #define InstallAppDefaultsLong(file,class)                              @@\
1286 LinkVarDirectory(app-defaults,.,app-defaults,.)                         @@\
1287 InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
1288 #endif /* InstallAppDefFiles */
1289 #endif /* InstallAppDefaultsLong */
1290
1291 /*
1292  * MakeFontsDir - generate rules to build fonts.dir database.
1293  */
1294 #ifndef MakeFontsDir
1295 #define MakeFontsDir(deplist)                                           @@\
1296 all:: fonts.dir                                                         @@\
1297                                                                         @@\
1298 fonts.dir:  deplist                                                     @@\
1299         RunProgram(MKFONTDIR,.)                                         @@\
1300                                                                         @@\
1301 clean::                                                                 @@\
1302         RemoveFile(fonts.dir)
1303 #endif /* MakeFontsDir */
1304
1305
1306 /*
1307  * MakeFonts - generate rules to build font database.
1308  */
1309 #ifndef MakeFonts
1310 #define MakeFonts()                                                     @@\
1311 all::  $(OBJS)                                                          @@\
1312                                                                         @@\
1313 MakeFontsDir($(OBJS))                                                   @@\
1314                                                                         @@\
1315 clean::                                                                 @@\
1316         RemoveFiles(*.pcf *.pcf.Z *.pcf.gz)
1317 #endif /* MakeFonts */
1318
1319
1320 /*
1321  * InstallFontObjs - generate rules to install font files
1322  */
1323 #ifndef InstallFontObjs
1324 #define InstallFontObjs(objs,dest)                                      @@\
1325 InstallMultipleFlags(objs,dest,$(INSTDATFLAGS))                         @@\
1326                                                                         @@\
1327 InstallTarget(install,fonts.dir,$(INSTDATFLAGS),dest)
1328 #endif /* InstallFontObjs */
1329
1330
1331 /*
1332  * InstallFonts - generate rules to install font files
1333  */
1334 #ifndef InstallFonts
1335 #define InstallFonts(dest)                                              @@\
1336 InstallFontObjs($(OBJS),dest)
1337 #endif /* InstallFonts */
1338
1339
1340 /*
1341  * InstallFontAliases - generate rules to install font aliases databases. 
1342  */
1343 #ifndef InstallFontAliases
1344 #define InstallFontAliases(dest)                                        @@\
1345 InstallTarget(install,fonts.alias,$(INSTDATFLAGS),dest)
1346 #endif /* InstallFontAliases */
1347
1348 #ifndef FontSrc
1349 #define FontSrc(basename) basename.bdf
1350 #endif
1351
1352 #ifndef FontBaseObj
1353 #define FontBaseObj(basename)basename.pcf
1354 #endif
1355
1356 /*
1357  * InstallFontScale - generate rules to install font scale database.
1358  */
1359 #ifndef InstallFontScale
1360 #define InstallFontScale(dest)                                          @@\
1361 InstallTarget(install,fonts.scale,$(INSTDATFLAGS),dest)
1362 #endif /* InstallFontScale */
1363
1364 /*
1365  * UncompressedFontTarget
1366  */
1367 #ifndef UncompressedFontTarget
1368 #define UncompressedFontTarget(basename)                                @@\
1369 FontBaseObj(basename):  FontSrc(basename)                               @@\
1370         RunProgram(FONTC,$(FONTCFLAGS) $? -o $@)
1371 #endif /* UncompressedFontTarget */
1372
1373 /*
1374  * CompressedFontTarget
1375  */
1376 #ifndef GzipFontCompression
1377 #define GzipFontCompression NO
1378 #endif
1379
1380 #ifndef CompressedFontTarget
1381 #if GzipFontCompression
1382 #define CompressedFontTarget(basename)                                  @@\
1383 FontBaseObj(basename).gz:  FontSrc(basename)                            @@\
1384         RunProgram(FONTC,$(FONTCFLAGS) $?) | $(GZIPCMD) > $@
1385 #else
1386 #define CompressedFontTarget(basename)                                  @@\
1387 FontBaseObj(basename).Z:  FontSrc(basename)                             @@\
1388         RunProgram(FONTC,$(FONTCFLAGS) $?) | $(COMPRESS) > $@
1389 #endif
1390 #endif /* CompressedFontTarget */
1391
1392 #ifdef CompressAllFonts
1393 #define FontTarget(basename) CompressedFontTarget(basename)
1394 #if GzipFontCompression
1395 #define FontObj(basename) FontBaseObj(basename).gz
1396 #else
1397 #define FontObj(basename) FontBaseObj(basename).Z
1398 #endif
1399 #else
1400 #define FontTarget(basename) UncompressedFontTarget(basename)
1401 #define FontObj(basename) FontBaseObj(basename)
1402 #endif /* CompressAllFonts */
1403
1404 /*
1405  * MakeXkbDir
1406  */
1407 #ifndef MakeXkbDir
1408 #define MakeXkbDir(basedir,subdir)                                      @@\
1409 all::   Concat(subdir,.dir)                                             @@\
1410                                                                         @@\
1411 Concat(subdir,.dir):                                                    @@\
1412         $(XKBCOMPCMD) -lfhlpR -o Concat(subdir,.dir) '*'                @@\
1413                                                                         @@\
1414 InstallTarget(install,Concat(subdir,.dir),$(INSTDATFLAGS),basedir)      @@\
1415                                                                         @@\
1416 clean::                                                                 @@\
1417         $(RM) Concat(subdir,.dir)
1418 #endif
1419
1420 /*
1421  * PostProcessTroffPS - by default moves the working output into place,
1422  * but can be a hook for more complicated post-processing.
1423  */
1424 #ifndef PostProcessTroffPS
1425 #define PostProcessTroffPS(temp,real) $(MV) temp real
1426 #endif
1427
1428 #ifndef MakeSimpleDoc
1429 #define MakeSimpleDoc(file,srcs)                                        @@\
1430 all:: file.PS                                                           @@\
1431 .PRECIOUS: file.PS                                                      @@\
1432                                                                         @@\
1433 file.PS: srcs                                                           @@\
1434         -$(TROFF) $(MSMACROS) $(XDOCMACROS) srcs 2> index.raw > file.nPS \@@\
1435         && PostProcessTroffPS(file.nPS,$@)                              @@\
1436         @if grep '^[^1-9.]' index.raw; then exit 1; else test $$? = 1; fi @@\
1437                                                                         @@\
1438 file.txt: srcs                                                          @@\
1439         $(NROFF) $(MSMACROS) $(XDOCMACROS) srcs 2> index.raw > $@       @@\
1440                                                                         @@\
1441 clean::                                                                 @@\
1442         $(RM) index.raw file.nPS file.PS file.txt
1443 #endif
1444
1445 #ifndef MakeTblDoc
1446 #define MakeTblDoc(file,srcs)                                           @@\
1447 all:: file.PS                                                           @@\
1448 .PRECIOUS: file.PS                                                      @@\
1449                                                                         @@\
1450 file.PS: srcs                                                           @@\
1451         -$(TBL) $(XDOCMACROS) srcs | $(TROFF) $(MSMACROS) 2> index.raw > file.nPS \@@\
1452         && PostProcessTroffPS(file.nPS,$@)                              @@\
1453         @if grep '^[^1-9.]' index.raw; then exit 1; else test $$? = 1; fi @@\
1454                                                                         @@\
1455 file.txt: srcs                                                          @@\
1456         $(TBL) $(XDOCMACROS) srcs | $(NROFF) $(MSMACROS) 2> index.raw | $(COL) > $@     @@\
1457                                                                         @@\
1458 clean::                                                                 @@\
1459         $(RM) index.raw file.nPS file.PS file.txt
1460 #endif
1461
1462 #ifndef MakeEqnDoc
1463 #define MakeEqnDoc(file,srcs)                                           @@\
1464 all:: file.PS                                                           @@\
1465 .PRECIOUS: file.PS                                                      @@\
1466                                                                         @@\
1467 file.PS: srcs                                                           @@\
1468         -$(TBL) $(XDOCMACROS) srcs | $(EQN) | $(TROFF) $(MSMACROS) 2> index.raw > file.nPS \@@\
1469         && PostProcessTroffPS(file.nPS,$@)                              @@\
1470         @if grep '^[^1-9.]' index.raw; then exit 1; else test $$? = 1; fi @@\
1471                                                                         @@\
1472 file.txt: srcs                                                          @@\
1473         $(TBL) $(XDOCMACROS) srcs | $(NEQN) | $(NROFF) $(MSMACROS) 2> index.raw | $(COL) > $@ @@\
1474                                                                         @@\
1475 clean::                                                                 @@\
1476         $(RM) index.raw file.nPS file.PS file.txt
1477 #endif
1478
1479 #ifndef MakeDocIndex
1480 #define MakeDocIndex(file,srcs)                                         @@\
1481 all:: file.idx.PS                                                       @@\
1482                                                                         @@\
1483 file.idx.PS: srcs index.raw                                             @@\
1484         tail -1 index.raw > index.pageno                                @@\
1485         grep '^[1-9]' index.raw | sort -f '-t:' +1 -3 +0n -1n | awk -f $(DOCUTILSRC)/fixindex.awk | awk -f $(DOCUTILSRC)/block.awk > index.troff @@\
1486         cat srcs $(XIDXMACROS) index.troff | $(TROFF) -me > file.idx.nPS \@@\
1487         && $(MV) file.idx.nPS $@                                        @@\
1488         $(RM) index.troff index.pageno                                  @@\
1489                                                                         @@\
1490 clean::                                                                 @@\
1491         $(RM) index.troff index.pageno file.idx.nPS file.idx.PS
1492 #endif
1493
1494 #ifndef MakeLatexDoc
1495 #if HasLatex
1496 #define MakeLatexDoc(file,src)                                          @@\
1497 all:: file.PS                                                           @@\
1498                                                                         @@\
1499 file.dvi: src                                                           @@\
1500         $(LATEX) src                                                    @@\
1501                                                                         @@\
1502 file.PS: file.dvi                                                       @@\
1503         $(DVIPS) -o file.nPS file && $(MV) file.nPS $@                  @@\
1504                                                                         @@\
1505 clean::                                                                 @@\
1506         RemoveFiles(file.nPS file.PS file.dvi file.log)                 @@\
1507         RemoveFiles(file.aux file.toc file.lof file.lot)
1508 #else /* HasLatex */
1509 #define MakeLatexDoc(file,src)                                          @@\
1510 all::                                                                   @@\
1511 file.PS: src                                                            @@\
1512         @echo "cannot make file.PS: no latex on this system"; exit 1
1513 #endif /* HasLatex (else) */
1514 #endif /* MakeLatexDoc */