Add basic Xinerama support via new lib/DtXinerama
[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 UseInstalledX11
745               RGB = $(BINDIR)/rgb
746             FONTC = $(BINDIR)/bdftopcf
747         MKFONTDIR = $(BINDIR)/mkfontdir
748 #elif defined(X11ProjectRoot)
749               RGB = $(XPROJECTROOT)/bin/rgb
750             FONTC = $(XPROJECTROOT)/bin/bdftopcf
751         MKFONTDIR = $(XPROJECTROOT)/bin/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 SharedLibXp
937 #define SharedLibXp HasSharedLibraries
938 #endif
939 #ifndef NormalLibXp
940 #define NormalLibXp (!SharedLibXp | ForceNormalLib)
941 #endif
942 #ifndef DebugLibXp
943 #define DebugLibXp              NO      /* debugged Xp library */
944 #endif
945 #ifndef ProfileLibXp
946 #define ProfileLibXp            NO      /* profiled Xp library */
947 #endif
948          XPLIBSRC = $(LIBSRC)/Xp
949 #if SharedLibXp
950 #ifndef SharedXpRev
951 #define SharedXpRev 6.2
952 #endif
953 SharedLibReferences(XP,Xp,$(XPLIBSRC),SOXPREV,SharedXpRev)
954 #else
955 ProjectUnsharedLibReferences(XP,Xp,$(XPLIBSRC),XBuildLibDir)
956 #endif
957
958 #ifndef SharedLibXt
959 #define SharedLibXt HasSharedLibraries
960 #endif
961 #ifndef NormalLibXt
962 #define NormalLibXt (!SharedLibXt | ForceNormalLib)
963 #endif
964 #ifndef DebugLibXt
965 #define DebugLibXt              NO      /* debugged toolkit library */
966 #endif
967 #ifndef ProfileLibXt
968 #define ProfileLibXt            NO      /* profiled toolkit library */
969 #endif
970        TOOLKITSRC = $(LIBSRC)/Xt
971 #if SharedLibXt
972 #ifndef SharedXtRev
973 #define SharedXtRev 6.0
974 #endif
975 SharedDSLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),SOXTREV,SharedXtRev)
976 #else
977 ProjectUnsharedLibReferences(XTOOLONLY,Xt,$(TOOLKITSRC),XBuildLibDir)
978 #endif
979       DEPXTOOLLIB = $(DEPXTOOLONLYLIB) $(DEPSMLIB) $(DEPICELIB)
980          XTOOLLIB = $(XTOOLONLYLIB) $(SMLIB) $(ICELIB)
981      LINTXTOOLLIB = $(LINTXTOOLONLYLIB)
982
983 #ifndef SharedLibXa
984 #define SharedLibXa     (HasSharedLibraries & HasCplusplus)
985 #endif
986 #ifndef NormalLibXa
987 /* #define NormalLibXa  ((!SharedLibXa | ForceNormalLib) & HasCplusplus) */
988 #define NormalLibXa     YES /* needed for current tests, will correct later */
989 #endif
990 #ifndef DebugLibXa
991 #define DebugLibXa      NO      /* debugged audio library */
992 #endif
993 #ifndef ProfileLibXa
994 #define ProfileLibXa    NO      /* profiled audio library */
995 #endif
996        XALIBSRC = $(LIBSRC)/Xa
997 #if SharedLibXa
998 #ifndef SharedXaRev
999 #define SharedXaRev 1.0
1000 #endif
1001 SharedLibReferences(XA,Xa,$(XALIBSRC),SOXAREV,SharedXaRev)
1002 #else
1003 UnsharedLibReferences(XA,Xa,$(XALIBSRC))
1004 #endif
1005
1006 #ifndef SharedLibXaw
1007 #define SharedLibXaw HasSharedLibraries
1008 #endif
1009 #ifndef NormalLibXaw
1010 #define NormalLibXaw (!SharedLibXaw | ForceNormalLib)
1011 #endif
1012 #ifndef DebugLibXaw
1013 #define DebugLibXaw             NO      /* debugged widget library */
1014 #endif
1015 #ifndef ProfileLibXaw
1016 #define ProfileLibXaw           NO      /* profiled widget library */
1017 #endif
1018        AWIDGETSRC = $(LIBSRC)/Xaw
1019 #if SharedLibXaw
1020 #ifndef SharedXawRev
1021 #define SharedXawRev 6.1
1022 #endif
1023 SharedDSLibReferences(XAW,Xaw,$(AWIDGETSRC),SOXAWREV,SharedXawRev)
1024 #else
1025 ProjectUnsharedLibReferences(XAW,Xaw,$(AWIDGETSRC),XBuildLibDir)
1026 #endif
1027
1028 #ifndef SharedLibXi
1029 #define SharedLibXi HasSharedLibraries
1030 #endif
1031 #ifndef NormalLibXi
1032 #define NormalLibXi (!SharedLibXi | ForceNormalLib)
1033 #endif
1034 #ifndef DebugLibXi
1035 #define DebugLibXi              NO      /* debugged Xi library */
1036 #endif
1037 #ifndef ProfileLibXi
1038 #define ProfileLibXi            NO      /* profiled Xi library */
1039 #endif
1040          XILIBSRC = $(LIBSRC)/Xi
1041 #if SharedLibXi
1042 #ifndef SharedXiRev
1043 #define SharedXiRev 6.0
1044 #endif
1045 SharedLibReferences(XI,Xi,$(XILIBSRC),SOXINPUTREV,SharedXiRev)
1046 #else
1047 ProjectUnsharedLibReferences(XI,Xi,$(XILIBSRC),XBuildLibDir)
1048 #endif
1049
1050 #ifndef SharedLibXtst
1051 #define SharedLibXtst HasSharedLibraries
1052 #endif
1053 #ifndef NormalLibXtst
1054 #define NormalLibXtst (!SharedLibXtst | ForceNormalLib)
1055 #endif
1056 #ifndef DebugLibXtst
1057 #define DebugLibXtst            NO      /* debugged Xtst library */
1058 #endif
1059 #ifndef ProfileLibXtst
1060 #define ProfileLibXtst          NO      /* profiled Xtst library */
1061 #endif
1062       XTESTLIBSRC = $(LIBSRC)/Xtst
1063 #if SharedLibXtst
1064 #ifndef SharedXtstRev
1065 #define SharedXtstRev 6.1
1066 #endif
1067 SharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),SOXTESTREV,SharedXtstRev)
1068 #else
1069 ProjectUnsharedLibReferences(XTEST,Xtst,$(XTESTLIBSRC),XBuildLibDir)
1070 #endif
1071
1072 #ifndef SharedLibPex
1073 #define SharedLibPex HasSharedLibraries
1074 #endif
1075 #ifndef NormalLibPex
1076 #define NormalLibPex (!SharedLibPex | ForceNormalLib)
1077 #endif
1078 #ifndef DebugLibPex
1079 #define DebugLibPex             NO      /* debugged PEX5 library */
1080 #endif
1081 #ifndef ProfileLibPex
1082 #define ProfileLibPex           NO      /* profiled PEX5 library */
1083 #endif
1084         PEXLIBSRC = $(LIBSRC)/PEX5
1085 #if SharedLibPex
1086 #ifndef SharedPexRev
1087 #define SharedPexRev 6.0
1088 #endif
1089 SharedLibReferences(PEX,PEX5,$(PEXLIBSRC),SOPEXREV,SharedPexRev)
1090 #else
1091 ProjectUnsharedLibReferences(PEX,PEX5,$(PEXLIBSRC),XBuildLibDir)
1092 #endif
1093
1094 #ifndef SharedLibXie
1095 #define SharedLibXie HasSharedLibraries
1096 #endif
1097 #ifndef NormalLibXie
1098 #define NormalLibXie (!SharedLibXie | ForceNormalLib)
1099 #endif
1100 #ifndef DebugLibXie
1101 #define DebugLibXie             NO      /* debugged XIE library */
1102 #endif
1103 #ifndef ProfileLibXie
1104 #define ProfileLibXie           NO      /* profiled XIE library */
1105 #endif
1106         XIELIBSRC = $(LIBSRC)/XIE
1107 #if SharedLibXie
1108 #ifndef SharedXieRev
1109 #define SharedXieRev 6.0
1110 #endif
1111 SharedLibReferences(XIE,XIE,$(XIELIBSRC),SOXIEREV,SharedXieRev)
1112 #else
1113 ProjectUnsharedLibReferences(XIE,XIE,$(XIELIBSRC),XBuildLibDir)
1114 #endif
1115
1116 #ifndef SharedLibPhigs
1117 #define SharedLibPhigs NO       /* XXX - haven't made it sharable yet */
1118 #endif
1119 #ifndef NormalLibPhigs
1120 #define NormalLibPhigs (!SharedLibPhigs | ForceNormalLib)
1121 #endif
1122       PHIGSLIBSRC = $(LIBSRC)/PHIGS
1123 #if SharedLibPhigs
1124 #ifndef SharedPhigsRev
1125 #define SharedPhigsRev 6.0
1126 #endif
1127 SharedLibReferences(PHIGS,phigs,$(PHIGSLIBSRC),SOPHIGSREV,SharedPhigsRev)
1128 #else
1129 ProjectUnsharedLibReferences(PHIGS,phigs,$(PHIGSLIBSRC),XBuildLibDir)
1130 #endif
1131
1132 ProjectUnsharedLibReferences(XBSD,Xbsd,$(LIBSRC)/Xbsd,XBuildLibDir)
1133
1134 #ifndef SharedLibICE
1135 #define SharedLibICE HasSharedLibraries
1136 #endif
1137 #ifndef NormalLibICE
1138 #define NormalLibICE (!SharedLibICE | ForceNormalLib)
1139 #endif
1140 #ifndef DebugLibICE
1141 #define DebugLibICE             NO      /* debugged ICE library */
1142 #endif
1143 #ifndef ProfileLibICE
1144 #define ProfileLibICE           NO      /* profiled ICE library */
1145 #endif
1146            ICESRC = $(LIBSRC)/ICE
1147 #if SharedLibICE
1148 #ifndef SharedICERev
1149 #define SharedICERev 6.3
1150 #endif
1151 SharedLibReferences(ICE,ICE,$(ICESRC),SOICEREV,SharedICERev)
1152 #else
1153 ProjectUnsharedLibReferences(ICE,ICE,$(ICESRC),XBuildLibDir)
1154 #endif
1155
1156 #ifndef SharedLibSM
1157 #define SharedLibSM HasSharedLibraries
1158 #endif
1159 #ifndef NormalLibSM
1160 #define NormalLibSM (!SharedLibSM | ForceNormalLib)
1161 #endif
1162 #ifndef DebugLibSM
1163 #define DebugLibSM              NO      /* debugged SM library */
1164 #endif
1165 #ifndef ProfileLibSM
1166 #define ProfileLibSM            NO      /* profiled SM library */
1167 #endif
1168             SMSRC = $(LIBSRC)/SM
1169 #if SharedLibSM
1170 #ifndef SharedSMRev
1171 #define SharedSMRev 6.0
1172 #endif
1173 SharedLibReferences(SM,SM,$(SMSRC),SOSMREV,SharedSMRev)
1174 #else
1175 ProjectUnsharedLibReferences(SM,SM,$(SMSRC),XBuildLibDir)
1176 #endif
1177
1178 #ifndef SharedLibXkey
1179 #define SharedLibXkey HasSharedLibraries
1180 #endif
1181 #ifndef NormalLibXkey
1182 #define NormalLibXkey (!SharedLibXkey | ForceNormalLib)
1183 #endif
1184 #ifndef DebugLibXkey
1185 #define DebugLibXkey            NO      /* debugged Xkey library */
1186 #endif
1187 #ifndef ProfileLibXkey
1188 #define ProfileLibXkey          NO      /* profiled Xkey library */
1189 #endif
1190            XKEYSRC = $(LIBSRC)/Xkey
1191 #if SharedLibXkey
1192 #ifndef SharedXkeyRev
1193 #define SharedXkeyRev 6.0
1194 #endif
1195 SharedLibReferences(XKEY,Xkey,$(XKEYSRC),SOXKEYREV,SharedXkeyRev)
1196 #else
1197 ProjectUnsharedLibReferences(XKEY,Xkey,$(XKEYSRC),XBuildLibDir)
1198 #endif
1199
1200 #ifndef SharedLibFS
1201 #define SharedLibFS             NO      /* for now */
1202 #endif
1203 #ifndef NormalLibFS
1204 #define NormalLibFS (!SharedLibFS | ForceNormalLib)
1205 #endif
1206 #ifndef DebugLibFS
1207 #define DebugLibFS              NO      /* debugged FS library */
1208 #endif
1209 #ifndef ProfileLibFS
1210 #define ProfileLibFS            NO      /* profiled FS library */
1211 #endif
1212          FSLIBSRC = $(LIBSRC)/FS
1213 #if SharedLibFS
1214 #ifndef SharedFSRev
1215 #define SharedFSRev 6.0
1216 #endif
1217 SharedLibReferences(FS,FS,$(FSLIBSRC),SOFSREV,SharedFSRev)
1218 #else
1219 ProjectUnsharedLibReferences(FS,FS,$(FSLIBSRC),XBuildLibDir)
1220 #endif
1221
1222          FONTLIBSRC = $(LIBSRC)/font
1223 ProjectUnsharedLibReferences(FONT,font,$(FONTLIBSRC),XBuildLibDir)
1224
1225 #ifdef BuildXKBlib
1226     XKBFILELIBSRC = $(LIBSRC)/xkbfile
1227 ProjectUnsharedLibReferences(XKBFILE,xkbfile,$(XKBFILELIBSRC),XBuildLibDir)
1228 #ifndef XkbClientDepLibs
1229 #if UseXKBInClients
1230 #define XkbClientDepLibs $(DEPXKBFILELIB)
1231 #else
1232 #define XkbClientDepLibs /**/
1233 #endif
1234 #endif
1235 #ifndef XkbClientLibs
1236 #if UseXKBInClients
1237 #define XkbClientLibs $(XKBFILELIB)
1238 #else
1239 #define XkbClientLibs /**/
1240 #endif
1241 #endif
1242 #ifdef UseInstalled
1243      XKBCOMPCMD = $(BINDIR)/xkbcomp
1244 #else
1245      XKBCOMPSRC = $(PROGRAMSRC)/xkbcomp
1246      XKBCOMPCMD = $(CLIENTENVSETUP) $(XBUILDBINDIR)/xkbcomp
1247 #endif
1248 #else /* !BuildXKBlib */
1249 #ifndef XkbClientDepLibs
1250 #define XkbClientDepLibs
1251 #endif
1252 #ifndef XkbClientLibs
1253 #define XkbClientLibs
1254 #endif
1255 #endif /* BuildXKBlib */
1256
1257 #ifndef XawClientDepLibs
1258 #define XawClientDepLibs $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
1259 #endif
1260 #ifndef XawClientLibs
1261 #define XawClientLibs $(XAWLIB) $(XMULIB) $(XTOOLLIB) $(XLIB)
1262 #endif
1263
1264 #ifndef NeedDefaultDepLibs
1265 #define NeedDefaultDepLibs YES
1266 #endif
1267
1268 #if NeedDefaultDepLibs
1269 /*
1270  * Individual libraries should override this
1271  */
1272 #if HasSharedLibraries || defined(UseInstalled)
1273           DEPLIBS = $(DEPXAWLIB) $(DEPXMULIB) $(DEPXTOOLLIB) $(DEPXLIB)
1274 #else
1275           DEPLIBS = $(LOCAL_LIBRARIES)
1276 #endif
1277          DEPLIBS1 = $(DEPLIBS)
1278          DEPLIBS2 = $(DEPLIBS)
1279          DEPLIBS3 = $(DEPLIBS)
1280          DEPLIBS4 = $(DEPLIBS)
1281          DEPLIBS5 = $(DEPLIBS)
1282          DEPLIBS6 = $(DEPLIBS)
1283          DEPLIBS7 = $(DEPLIBS)
1284          DEPLIBS8 = $(DEPLIBS)
1285          DEPLIBS9 = $(DEPLIBS)
1286          DEPLIBS10 = $(DEPLIBS)
1287 #endif /* NeedDefaultDepLibs */
1288
1289
1290 /*
1291  * InstallAppDefaults - simple rules to install application default file
1292  */
1293 #ifndef InstallAppDefaults
1294 #define InstallAppDefaults(class) InstallAppDefaultsLong(class,class)
1295 #endif /* InstallAppDefaults */
1296
1297 /*
1298  * InstallAppDefaultsLong - general rule to install application default file
1299  * if the InstallAppDefFiles configuration parameter is set.
1300  */
1301 #ifndef InstallAppDefaultsLong
1302 #if InstallAppDefFiles
1303 #define InstallAppDefaultsLong(file,class)                              @@\
1304 LinkVarDirectory(app-defaults,.,app-defaults,.)                         @@\
1305 InstallNamedTarget(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
1306 #else
1307 #define InstallAppDefaultsLong(file,class)                              @@\
1308 LinkVarDirectory(app-defaults,.,app-defaults,.)                         @@\
1309 InstallNamedTargetNoClobber(install,file.ad,$(INSTAPPFLAGS),$(XAPPLOADDIR),class)
1310 #endif /* InstallAppDefFiles */
1311 #endif /* InstallAppDefaultsLong */
1312
1313 /*
1314  * MakeFontsDir - generate rules to build fonts.dir database.
1315  */
1316 #ifndef MakeFontsDir
1317 #define MakeFontsDir(deplist)                                           @@\
1318 all:: fonts.dir                                                         @@\
1319                                                                         @@\
1320 fonts.dir:  deplist                                                     @@\
1321         RunProgram(MKFONTDIR,.)                                         @@\
1322                                                                         @@\
1323 clean::                                                                 @@\
1324         RemoveFile(fonts.dir)
1325 #endif /* MakeFontsDir */
1326
1327
1328 /*
1329  * MakeFonts - generate rules to build font database.
1330  */
1331 #ifndef MakeFonts
1332 #define MakeFonts()                                                     @@\
1333 all::  $(OBJS)                                                          @@\
1334                                                                         @@\
1335 MakeFontsDir($(OBJS))                                                   @@\
1336                                                                         @@\
1337 clean::                                                                 @@\
1338         RemoveFiles(*.pcf *.pcf.Z *.pcf.gz)
1339 #endif /* MakeFonts */
1340
1341
1342 /*
1343  * InstallFontObjs - generate rules to install font files
1344  */
1345 #ifndef InstallFontObjs
1346 #define InstallFontObjs(objs,dest)                                      @@\
1347 InstallMultipleFlags(objs,dest,$(INSTDATFLAGS))                         @@\
1348                                                                         @@\
1349 InstallTarget(install,fonts.dir,$(INSTDATFLAGS),dest)
1350 #endif /* InstallFontObjs */
1351
1352
1353 /*
1354  * InstallFonts - generate rules to install font files
1355  */
1356 #ifndef InstallFonts
1357 #define InstallFonts(dest)                                              @@\
1358 InstallFontObjs($(OBJS),dest)
1359 #endif /* InstallFonts */
1360
1361
1362 /*
1363  * InstallFontAliases - generate rules to install font aliases databases. 
1364  */
1365 #ifndef InstallFontAliases
1366 #define InstallFontAliases(dest)                                        @@\
1367 InstallTarget(install,fonts.alias,$(INSTDATFLAGS),dest)
1368 #endif /* InstallFontAliases */
1369
1370 #ifndef FontSrc
1371 #define FontSrc(basename) basename.bdf
1372 #endif
1373
1374 #ifndef FontBaseObj
1375 #define FontBaseObj(basename)basename.pcf
1376 #endif
1377
1378 /*
1379  * InstallFontScale - generate rules to install font scale database.
1380  */
1381 #ifndef InstallFontScale
1382 #define InstallFontScale(dest)                                          @@\
1383 InstallTarget(install,fonts.scale,$(INSTDATFLAGS),dest)
1384 #endif /* InstallFontScale */
1385
1386 /*
1387  * UncompressedFontTarget
1388  */
1389 #ifndef UncompressedFontTarget
1390 #define UncompressedFontTarget(basename)                                @@\
1391 FontBaseObj(basename):  FontSrc(basename)                               @@\
1392         RunProgram(FONTC,$(FONTCFLAGS) $? -o $@)
1393 #endif /* UncompressedFontTarget */
1394
1395 /*
1396  * CompressedFontTarget
1397  */
1398 #ifndef GzipFontCompression
1399 #define GzipFontCompression NO
1400 #endif
1401
1402 #ifndef CompressedFontTarget
1403 #if GzipFontCompression
1404 #define CompressedFontTarget(basename)                                  @@\
1405 FontBaseObj(basename).gz:  FontSrc(basename)                            @@\
1406         RunProgram(FONTC,$(FONTCFLAGS) $?) | $(GZIPCMD) > $@
1407 #else
1408 #define CompressedFontTarget(basename)                                  @@\
1409 FontBaseObj(basename).Z:  FontSrc(basename)                             @@\
1410         RunProgram(FONTC,$(FONTCFLAGS) $?) | $(COMPRESS) > $@
1411 #endif
1412 #endif /* CompressedFontTarget */
1413
1414 #ifdef CompressAllFonts
1415 #define FontTarget(basename) CompressedFontTarget(basename)
1416 #if GzipFontCompression
1417 #define FontObj(basename) FontBaseObj(basename).gz
1418 #else
1419 #define FontObj(basename) FontBaseObj(basename).Z
1420 #endif
1421 #else
1422 #define FontTarget(basename) UncompressedFontTarget(basename)
1423 #define FontObj(basename) FontBaseObj(basename)
1424 #endif /* CompressAllFonts */
1425
1426 /*
1427  * MakeXkbDir
1428  */
1429 #ifndef MakeXkbDir
1430 #define MakeXkbDir(basedir,subdir)                                      @@\
1431 all::   Concat(subdir,.dir)                                             @@\
1432                                                                         @@\
1433 Concat(subdir,.dir):                                                    @@\
1434         $(XKBCOMPCMD) -lfhlpR -o Concat(subdir,.dir) '*'                @@\
1435                                                                         @@\
1436 InstallTarget(install,Concat(subdir,.dir),$(INSTDATFLAGS),basedir)      @@\
1437                                                                         @@\
1438 clean::                                                                 @@\
1439         $(RM) Concat(subdir,.dir)
1440 #endif
1441
1442 /*
1443  * PostProcessTroffPS - by default moves the working output into place,
1444  * but can be a hook for more complicated post-processing.
1445  */
1446 #ifndef PostProcessTroffPS
1447 #define PostProcessTroffPS(temp,real) $(MV) temp real
1448 #endif
1449
1450 #ifndef MakeSimpleDoc
1451 #define MakeSimpleDoc(file,srcs)                                        @@\
1452 all:: file.PS                                                           @@\
1453 .PRECIOUS: file.PS                                                      @@\
1454                                                                         @@\
1455 file.PS: srcs                                                           @@\
1456         -$(TROFF) $(MSMACROS) $(XDOCMACROS) srcs 2> index.raw > file.nPS \@@\
1457         && PostProcessTroffPS(file.nPS,$@)                              @@\
1458         @if grep '^[^1-9.]' index.raw; then exit 1; else test $$? = 1; fi @@\
1459                                                                         @@\
1460 file.txt: srcs                                                          @@\
1461         $(NROFF) $(MSMACROS) $(XDOCMACROS) srcs 2> index.raw > $@       @@\
1462                                                                         @@\
1463 clean::                                                                 @@\
1464         $(RM) index.raw file.nPS file.PS file.txt
1465 #endif
1466
1467 #ifndef MakeTblDoc
1468 #define MakeTblDoc(file,srcs)                                           @@\
1469 all:: file.PS                                                           @@\
1470 .PRECIOUS: file.PS                                                      @@\
1471                                                                         @@\
1472 file.PS: srcs                                                           @@\
1473         -$(TBL) $(XDOCMACROS) srcs | $(TROFF) $(MSMACROS) 2> index.raw > file.nPS \@@\
1474         && PostProcessTroffPS(file.nPS,$@)                              @@\
1475         @if grep '^[^1-9.]' index.raw; then exit 1; else test $$? = 1; fi @@\
1476                                                                         @@\
1477 file.txt: srcs                                                          @@\
1478         $(TBL) $(XDOCMACROS) srcs | $(NROFF) $(MSMACROS) 2> index.raw | $(COL) > $@     @@\
1479                                                                         @@\
1480 clean::                                                                 @@\
1481         $(RM) index.raw file.nPS file.PS file.txt
1482 #endif
1483
1484 #ifndef MakeEqnDoc
1485 #define MakeEqnDoc(file,srcs)                                           @@\
1486 all:: file.PS                                                           @@\
1487 .PRECIOUS: file.PS                                                      @@\
1488                                                                         @@\
1489 file.PS: srcs                                                           @@\
1490         -$(TBL) $(XDOCMACROS) srcs | $(EQN) | $(TROFF) $(MSMACROS) 2> index.raw > file.nPS \@@\
1491         && PostProcessTroffPS(file.nPS,$@)                              @@\
1492         @if grep '^[^1-9.]' index.raw; then exit 1; else test $$? = 1; fi @@\
1493                                                                         @@\
1494 file.txt: srcs                                                          @@\
1495         $(TBL) $(XDOCMACROS) srcs | $(NEQN) | $(NROFF) $(MSMACROS) 2> index.raw | $(COL) > $@ @@\
1496                                                                         @@\
1497 clean::                                                                 @@\
1498         $(RM) index.raw file.nPS file.PS file.txt
1499 #endif
1500
1501 #ifndef MakeDocIndex
1502 #define MakeDocIndex(file,srcs)                                         @@\
1503 all:: file.idx.PS                                                       @@\
1504                                                                         @@\
1505 file.idx.PS: srcs index.raw                                             @@\
1506         tail -1 index.raw > index.pageno                                @@\
1507         grep '^[1-9]' index.raw | sort -f '-t:' +1 -3 +0n -1n | awk -f $(DOCUTILSRC)/fixindex.awk | awk -f $(DOCUTILSRC)/block.awk > index.troff @@\
1508         cat srcs $(XIDXMACROS) index.troff | $(TROFF) -me > file.idx.nPS \@@\
1509         && $(MV) file.idx.nPS $@                                        @@\
1510         $(RM) index.troff index.pageno                                  @@\
1511                                                                         @@\
1512 clean::                                                                 @@\
1513         $(RM) index.troff index.pageno file.idx.nPS file.idx.PS
1514 #endif
1515
1516 #ifndef MakeLatexDoc
1517 #if HasLatex
1518 #define MakeLatexDoc(file,src)                                          @@\
1519 all:: file.PS                                                           @@\
1520                                                                         @@\
1521 file.dvi: src                                                           @@\
1522         $(LATEX) src                                                    @@\
1523                                                                         @@\
1524 file.PS: file.dvi                                                       @@\
1525         $(DVIPS) -o file.nPS file && $(MV) file.nPS $@                  @@\
1526                                                                         @@\
1527 clean::                                                                 @@\
1528         RemoveFiles(file.nPS file.PS file.dvi file.log)                 @@\
1529         RemoveFiles(file.aux file.toc file.lof file.lot)
1530 #else /* HasLatex */
1531 #define MakeLatexDoc(file,src)                                          @@\
1532 all::                                                                   @@\
1533 file.PS: src                                                            @@\
1534         @echo "cannot make file.PS: no latex on this system"; exit 1
1535 #endif /* HasLatex (else) */
1536 #endif /* MakeLatexDoc */