summaryrefslogtreecommitdiff
path: root/xc/config/cf/OpenBSD.cf
blob: 9d9aaa0d7de9e5eb98c57444baff051a68cd816d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
XCOMM platform:  $XFree86: xc/config/cf/OpenBSD.cf,v 3.75 2002/10/06 20:04:51 herrb Exp $
XCOMM

#ifndef OSName
#define OSName			DefaultOSName OSBinaryType
#endif
#ifndef OSMajorVersion
#define OSMajorVersion		DefaultOSMajorVersion
#endif
#ifndef OSMinorVersion
#define OSMinorVersion		DefaultOSMinorVersion
#endif
#ifndef OSTeenyVersion
#define OSTeenyVersion		DefaultOSTeenyVersion
#endif

#ifndef OSVendor
#define	OSVendor	/**/
#endif
XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)

#ifdef Ports

#define BinDir			/usr/local/bin
#define UsrLibDir		/usr/local/lib
#define ManDirectoryRoot	/usr/local/man
#define LdPreLib		-L/usr/X11R6/lib -L/usr/local/lib
#define XpmLibDir		/usr/X11R6/lib
#define XpmIncDir		/usr/X11R6/include
#define ConfigDir		/usr/X11R6/lib/X11/config
#define IncRoot			/usr/local/include
#define TopXInclude		-I/usr/X11R6/include
#define ImakeCmd		imake -DPorts
#define DocDir			/usr/local/share/doc

#endif

/*
 * C library features
 */
#define HasPoll			YES
#define HasNdbm         	YES
#define HasPutenv       	YES
#define HasSnprintf		YES
#define HasBSD44Sockets 	YES
#define Malloc0ReturnsNull	NO
#define SetTtyGroup     	YES
#define DBMLibrary		/**/
#define HasLibCrypt		NO
#define HasShm          	YES
#define HasWChar32		YES
#define HasMkstemp		YES
#define HasSetProcTitle		YES
#define HasZlib			YES
#ifndef HasKrbIV
#define HasKrbIV		YES
#endif
#define HasUsableFileMmap	YES

#define HasNCurses		YES
#define NCursesLibName		-lcurses
#if defined(TermcapLibrary)
#undef TermcapLibrary
#endif
#define TermcapLibrary		-lcurses

#define HasVarRun		YES
#define HasVarDb		YES
#define VarLibDir		VarDbDirectory

#define InstallXloadSetGID	NO

#ifndef HasLibPthread
#define HasLibPthread		NO
#endif

#ifndef HasIssetugid
# if (OSMajorVersion >= 2)
#  define HasIssetugid		YES
# endif
#endif

#ifndef HasMktemp
# if (OSMajorVersion > 2) || (OSMajorVersion == 2 && OSMinorVersion >= 1)
#  define HasMktemp		YES
# else
#  define HasMktemp		NO
# endif
#endif

/* OpenBSD >= 2.7 has getifaddrs() */
#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 7)
#define HasGetIfAddrs		YES
#endif

/* OpenBSD >= 2.8 has setusercontext() */
#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 7)
#define HasSetUserContext	YES
#endif

/* OpenBSD after 2.9 has BSD authentication */
#if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 9)
# define HasBSDAuth		YES
#endif

/* OpenBSD 3.0 and later has getpeereid() */
#if OSMajorVersion >= 3
# define HasGetpeereid		YES
#endif

/* OpenBSD 3.0 has APM with kqueue interface */
#if OSMajorVersion >= 3
# define HasApmKqueue		YES
#endif

/* OpenBSD 3.0 has libusb, next versions have libusbhid */
#if OSMajorVersion >= 3 
# define HasLibUsb		YES
# ifndef HasLibUsbHid
#  if OSMajorVersion == 3 && OSMinorVersion > 0 || OSMajorVersion > 3
#   define HasLibUsbHid		YES
#   define UsbHidLib 		-lusbhid
#  else
#   define HasLibUsbHid		NO
#   define UsbHidLib		-lusb
#  endif
# endif
#endif

/*
 * Compiler Features
 */
#define GccUsesGas		YES
#define UseGas			YES
#define GnuCpp			YES


#define NeedConstPrototypes	YES
#define NeedFunctionPrototypes	YES
#define NeedNestedPrototypes	YES
#define NeedVarargsPrototypes	YES
#define NeedWidePrototypes	NO

#define MkdirHierCmd		mkdir -p

#define CppCmd          	/usr/libexec/cpp
#define StandardCppOptions	-traditional
#define StandardCppDefines	/**/
#define PreProcessCmd   	CppCmd
#define PreIncDir		DefaultGccIncludeDir

#undef CcCmd
#define CcCmd 			gcc
#ifndef DefaultCCOptions
#if defined(UseInstalled)
#define DefaultCCOptions 	/**/
#else
#  ifdef  PpcArchitecture
#    define DefaultCCOptions	-ansi -fsigned-char -Dasm=__asm \
				GccWarningOptions
#  else
#    define DefaultCCOptions 	-ansi -Dasm=__asm GccWarningOptions
#  endif
#endif
#endif

#define GccGasOption 		-DGCCUSESGAS
#define AsmDefines 		-DUSE_GAS

#define StandardDefines	-DCSRG_BASED
#define XawI18nDefines	-DUSE_XWCHAR_STRING -DUSE_XMBTOWC

#ifndef ExtraLibraries
#define ExtraLibraries		/**/
#endif
#define UseGnuMalloc		NO

#define	AdmDir			/var/log

#define HasFlex			YES

/* OpenBSD doesn't have gperf in the base install */
#define DontRebuildGperfOutput	YES

/*
 * Make & install Features
 */

#define HasBsdMake		YES

#define BuildCyrillicFonts	YES
#define GzipFontCompression	YES
#define DefaultUserPath		/bin:/usr/bin:/usr/local/bin:$(BINDIR)
#define DefaultSystemPath	/sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)

#define InstUidFlags		-m 4755

#ifdef  InstallCmd
# undef  InstallCmd
# define InstallCmd 		/usr/bin/install
#endif

#ifndef ExtraFilesToClean
# define ExtraFilesToClean 	*.core
#endif

/*
 * Documentation formatting
 */
#define NeqnCmd			neqn -Tlatin1
#define NroffCmd		nroff -Tlatin1
#define	EqnCmd 			eqn -Tps
#define HasGroff		YES

#ifndef HasCookieMaker
#  define HasCookieMaker	YES
#  define MkCookieCmd \
	'dd if=/dev/urandom bs=16 count=1 2>/dev/null | hexdump -e \\"%08x\\"'
#endif


/*
 * Man pages need to be formatted when installed, so override the default
 * imake rules.
 */
#define ManSuffix	1
#define FileManSuffix	5
#define ManSourcePath	$(MANPATH)/cat

#define InstallManPageLongBase(file,destdir,dest)			@@\
all:: file.0								@@\
									@@\
file.0:: file.$(MANNEWSUFFIX)						@@\
	@if [ -f file.$(MANNEWSUFFIX) ]; \				@@\
	then \								@@\
	cat file.$(MANNEWSUFFIX) | $(NEQN) | $(TBL) | \			@@\
		$(NROFF) $(MANMACROS) | $(COL) > file.0; \		@@\
	fi 								@@\
									@@\
install.man::                                                           @@\
	MakeDir($(DESTDIR)destdir)					@@\
	-@if [ -f file.0 ]; \						@@\
	then \								@@\
	$(INSTALL) -c $(INSTMANFLAGS) file.0 $(DESTDIR)destdir/dest.0; \@@\
	fi								@@\
									@@\
clean::									@@\
	RemoveFile(file.0)

#define InstallManPageLong(file,destdir,dest)				@@\
BuildInstallHtmlManPage(file,dest,$(MANSUFFIX))				@@\
									@@\
CppManTarget(file, $(EXTRAMANDEFS))					@@\
									@@\
InstallManPageLongBase(file,destdir,dest)

#define InstallGenManPageLong(file,destdir,dest,suffix)			@@\
BuildInstallHtmlManPage(file,dest,suffix)				@@\
									@@\
CppManTarget(file, $(EXTRAMANDEFS))					@@\
									@@\
InstallManPageLongBase(file,destdir,dest)

#define InstallMultipleMan(list,dest)                                   @@\
install.man:: 								@@\
	MakeDir($(DESTDIR)dest)						@@\
	case '${MFLAGS}' in *[i]*) set +e;; esac; \			@@\
	for i in list; do \                                             @@\
	  (MNAME=`echo $$i | cut -f1 -d.`; \				@@\
	  set -x; \							@@\
	  cat $$i | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \		@@\
		| $(COL) > $${MNAME}.0; \				@@\
	  $(INSTALL) -c $(INSTMANFLAGS) $${MNAME}.0 \			@@\
			$(DESTDIR)dest/$${MNAME}.0; \			@@\
	  $(RM) $${MNAME}.0); \						@@\
	done

#define InstallMultipleManSuffix(list,dest,suff)                        @@\
install.man:: 								@@\
	MakeDir($(DESTDIR)dest)						@@\
	case '${MFLAGS}' in *[i]*) set +e;; esac; \			@@\
	for i in list; do \                                             @@\
	  (set -x; \							@@\
	  cat $$i.suff | $(NEQN) | $(TBL) | $(NROFF) $(MANMACROS) \	@@\
		| $(COL) > $$i.0; \					@@\
	  $(INSTALL) -c $(INSTMANFLAGS) $$i.0	 \			@@\
		$(DESTDIR)dest/$$i.0; \					@@\
	  $(RM) $$i.0 ); \						@@\
	done

#define InstallManPageAliasesBase(file,destdir,aliases)			@@\
install.man:: 								@@\
	@case '${MFLAGS}' in *[i]*) set +e;; esac; \                    @@\
	for i in aliases; do \                                          @@\
		(set -x; \						@@\
		$(RM) $(DESTDIR)destdir/$$i.0;\  			@@\
		(cd $(DESTDIR)/destdir; $(LN) file.0 $$i.0);\ 		@@\
		); \							@@\
	done

#define InstallManPageAliases(file,destdir,aliases)			@@\
InstallHtmlManPageAliases(file,aliases,$(MANSUFFIX))			@@\
									@@\
InstallManPageAliasesBase(file,destdir,aliases)

#define InstallGenManPageAliases(file,destdir,suffix,aliases)		@@\
InstallHtmlManPageAliases(file,aliases,suffix)				@@\
									@@\
InstallManPageAliasesBase(file,destdir,aliases)


/*
 * InstallFontAliases - generate rules to install font aliases
 *                      databases without comments for X11R5 servers
 */
#ifndef InstallFontAliasesNoComment
#define InstallFontAliasesNoComment(dest)				@@\
install:: fonts.alias							@@\
	$(RM) _fonts.alias 						@@\
	sed -e '/^!/d' -e '/^$$/d' < fonts.alias > _fonts.alias		@@\
	MakeDir($(DESTDIR)dest)						@@\
	$(INSTALL) $(INSTALLFLAGS) $(INSTALLDATFLAGS) _fonts.alias \	@@\
	$(DESTDIR)dest/fonts.alias					@@\
	$(RM) _fonts.alias
#endif /* InstallFontAliasesNoComment */

/*
 * OpenBSD specific Imake Config files
 */
#ifndef LocalConfigFiles
#define LocalConfigFiles \
	OpenBSDLib.rules
#endif

/*
 * Architecture specific sections - put all architecture dependent
 * options and setting here into the correct section
 */


/*
 * Definitions for the alpha architecture
 */
#ifdef AlphaArchitecture

# define OptimizedCDebugFlags	-O2

# define HasWeakSymbols		NO

# if (OSMajorVersion >= 3)
#  define UseElfFormat		YES
# else
#  define HasSharedLibraries	NO
#  define SharedLibXThrStub	NO
# endif

# define XF86Server		NO

/* Definitions for building the XFree86 server */
# if XF86Server
#   define ServerOSDefines	XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT
#   define ServerExtraDefines	GccGasOption -D_XSERVER64 XFree86ServerDefines
#   ifndef DoLoadableServer
#     define DoLoadableServer	YES
#   endif
#   ifndef XFree86ConsoleDefines
#     define XFree86ConsoleDefines -DWSCONS_SUPPORT
#   endif

# endif /* XF86Server */

# include <xfree86.cf>

#endif /* AlphaArchitecture */


/*
 * Definitions for the i386 architecture
 */
#ifdef i386Architecture

# ifndef DoLoadableServer
#  define DoLoadableServer	YES
# endif

/* To use the NetBSD Aperture driver */
# ifndef HasNetBSDApertureDriver
#  define HasNetBSDApertureDriver	YES
# endif

/* 2.7 and later have support for setting MTRRs */
# ifndef HasMTRRSupport
#  if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 6)
#   define HasMTRRSupport		YES
#  else
#   define HasMTRRSupport		NO
#  endif
# endif

# ifndef DefaultGcc2i386Opt
#   if (OSMajorVersion == 2 && OSMinorVersion >= 3) || OSMajorVersion > 2
      /* The GCC strength-reduce bug is fixed for OpenBSD 2.3 and later */
#     define DefaultGcc2i386Opt	-O2
#   endif
# endif
# define OptimizedCDebugFlags	DefaultGcc2i386Opt
# define ServerOSDefines	XFree86ServerOSDefines -DDDXTIME
# define ServerExtraSysLibs	-li386
# define LdPostLib		/**/
# define ServerExtraDefines GccGasOption XFree86ServerDefines
# ifndef XFree86ConsoleDefines
#   define XFree86ConsoleDefines -DWSCONS_SUPPORT -DPCVT_SUPPORT
# endif

#define JoystickSupport	NO

/* Support for USB Mices */
# ifndef UsbMouseSupport
#  if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 6)
#   define UsbMouseSupport		YES
#  endif
# endif


/* A hack to work around an optimization problem with gcc 2.95.2 */
# if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion >= 6)
#  define GccOptBug295
# endif

/* No MMX support in OpenBSD/a.out gas */
# if !UseElfFormat
#   define HasMMXSupport		NO
# endif

# if KDriveXServer
#  include <kdrive.cf>
# else 
#  include <xfree86.cf>
# endif

#endif /* i386Architecture */


/*
 * Definitions for the m68k architecture (currently amiga, hp300,
 * mac68k, mvme68k, sun3)
 */
#ifdef Mc68020Architecture

/*
 * Function CSE makes gas -k not recognize external function calls as lazily
 * resolvable symbols, thus sometimes making ld.so report undefined symbol
 * errors on symbols found in shared library members that would never be
 * called.  Ask niklas@openbsd.org for details.
 */

# define PositionIndependentCFlags -fpic -fno-function-cse
# define HasWeakSymbols		NO
# define BuildGlxExt		NO
# define BuildGLXLibrary	YES
 
#endif /* Mc68020Architecture */


/*
 * Definitions for the amiga architecture
 */
#ifdef AmigaArchitecture

# include <xf86.rules>
# ifndef BuildServer
#  define BuildServer		NO
# endif

# define ServerExtraDefines	-DXFree86Server

#endif /* AmigaArchitecture */


/*
 * Definitions for the hp300 architecture
 */
#ifdef Hp300Architecture

# ifndef BuildServer
#  define BuildServer		NO
# endif
/* For the X11R5 server */
# define CompressAllFonts	NO
# define InstallFontAliases	InstallFontAliasesNoComment
# define UseRgbTxt		NO

# define ServerExtraDefines	-DXFree86Server

#include <xfree86.cf>

#endif /* Hp300Architecture */


/*
 * Definitions for the mac68k architecture
 */
#ifdef Mac68kArchitecture


# ifndef BuildServer
#  define BuildServer		NO
# endif

# define ServerExtraDefines	-DXFree86Server

# include <xfree86.cf>

#endif /* mac68kArchitecture */


/*
 * Definitions for the mvme68k architecture
 */
#ifdef Mvme68kArchitecture

# ifndef BuildServer
#  define BuildServer		NO
# endif

# define ServerExtraDefines	-DXFree86Server

# include <xfree86.cf>

#endif /* Mvme68kArchitecture */


/*
 * Definitions for the sun3 architecture
 */
#ifdef Sun3Architecture

# include <xf86.rules>

# define OptimizedCDebugFlags  -O2
# define ServerOSDefines       -DDDXOSINIT
# define BootstrapCFlags       -Dsun3
# define UnalignedReferencesAllowed	YES /* changes _XtCopyArgs() */
/* Note: -ansi turns off -Dmc68000 */
# define ServerExtraDefines    GccGasOption -Dmc68000 -Dmc68020 -DXFree86Server

# ifndef Xsun24Server
#  define Xsun24Server		NO
# endif
# ifndef XsunServer
#  define XsunServer		YES
# endif
# ifndef XsunMonoServer
#  define XsunMonoServer	NO
# endif

#define XkbServerDefines  -DXKB_ALWAYS_USES_SOFT_REPEAT

# ifndef BuildPexExt
#  define BuildPexExt 		(XsunServer || Xsun24Server)
# endif

#endif /* Sun3Architecture */


/*
 * Definitions for the mips architecture (currently arc, pmax)
 */
#ifdef MipsArchitecture

 /*
  * Mips ELF shared libs need some special handling.
  */
# define PositionIndependentCFlags
# define SharedLibraryLoadFlags -x -shared --whole-archive -soname `echo $@ | sed 's/\.[0-9]*$$//'`
# define SharedXtReqs -L$(BUILDLIBDIR) $(XLIBONLY) $(SMLIB) $(ICELIB)
# define SharedXmuReqs $(LDPRELIB) $(XTOOLONLYLIB) $(XONLYLIB) $(EXTENSIONLIB)

#endif /* MipsArchitecture */


/*
 * Definitions for the arc architecture
 */
#ifdef ArcArchitecture

#  define ServerExtraDefines GccGasOption XFree86ServerDefines
#  ifndef XFree86ConsoleDefines
#    define XFree86ConsoleDefines -DPCCONS_SUPPORT
#  endif

# include <xfree86.cf>

#endif /* ArcArchitecture */


/*
 * Definitions for the pmax architecture
 */
#ifdef PmaxArchitecture

# include <xf86.rules>
# ifndef BuildServer
#  define BuildServer		NO
# endif
/* For the X11R5 server */
# define CompressAllFonts	NO
# define InstallFontAliases	InstallFontAliasesNoComment
# define UseRgbTxt		NO

#endif /* PmaxArchitecture */

/*
 * Definitions for the PowerPC architecture 
 */
#ifdef PpcArchitecture

# define OptimizedCDebugFlags 	-O2
# define XkbServerDefines	-DXKB_ALWAYS_USES_SOFT_REPEAT
# ifndef XFree86ConsoleDefines
#   define XFree86ConsoleDefines	-DWSCONS_SUPPORT
# endif

# define UseElfFormat		YES
# define HasWeakSymbols		NO

# if XFree86Devel
#   define GccWarningOptions -Wall -Wpointer-arith -Wstrict-prototypes \
			  -Wmissing-prototypes -Wmissing-declarations \
			  -Wnested-externs
# else
#   define GccWarningOptions -Wall -Wpointer-arith
# endif

# ifndef XF86Server
#   define XF86Server		YES
# endif

/* Definitions for building the XFree86 server */
# if XF86Server
#   define ServerOSDefines	XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT
#   define ServerExtraDefines	GccGasOption XFree86ServerDefines
#   ifndef DoLoadableServer
#     define DoLoadableServer	YES
#   endif
#   ifndef XF86CardDrivers
#    define XF86CardDrivers	ati mga glint s3virge sis savage\
				trident chips tdfx \
				DevelDrivers vga \
				XF86OSCardDrivers XF86ExtraCardDrivers
#   endif
#   ifndef DevelDrivers 
#    define DevelDrivers nv
#   endif

    /* Support for USB Mices */
#   ifndef UsbMouseSupport
#     define UsbMouseSupport		YES
#   endif

# endif /* XF86Server */

# include <xfree86.cf>

#endif /* PpcArchitecture */

/*
 * Definitions for the sparc architecture
 */
#ifdef SparcArchitecture

# define OptimizedCDebugFlags	-O2
# define ServerOSDefines 	-DDDXOSINIT
# define ServerExtraDefines	-DAVOID_GLYPHBLT -DPIXPRIV  -DXFree86Server \
				ServerSnprintfDefines DebugDefines \
				-DX_BYTE_ORDER=ByteOrder
# define BuildXF86MiscExt	NO
# define BuildMITMiscExt	NO

# ifndef Xsun24Server
#  define Xsun24Server		YES
# endif
# ifndef XsunServer
#  define XsunServer		YES
# endif
# ifndef XsunMonoServer
#  define XsunMonoServer	YES
# endif

# define XkbServerDefines	-DXKB_ALWAYS_USES_SOFT_REPEAT

# ifndef BuildPexExt
#  define BuildPexExt		(XsunServer || Xsun24Server)
# endif

# define BuildXF86VidModeExt	NO
# define BuildXF86DGA		NO
# define BuildXInputExt		NO
# include <xfree86.cf>

#endif /* SparcArchitecture */

/*
 * Definitions for the sparc64 architecture
 */

#ifdef Sparc64Architecture

# define OptimizedCDebugFlags	-O2

# define HasWeakSymbols		NO
# define UseElfFormat		YES

# ifndef XF86Server
#  define XF86Server		YES
# endif

# define ServerExtraDefines	GccGasOption -D_XSERVER64 XFree86ServerDefines
# define ServerOSDefines	XFree86ServerOSDefines -DDDXTIME -DDDXOSINIT
# define XkbServerDefines  -DXKB_ALWAYS_USES_SOFT_REPEAT

# if XF86Server
#   ifndef DoLoadableServer
#     define DoLoadableServer	NO
#   endif
#   define XFree86ConsoleDefines -DWSCONS_SUPPORT
# endif

# include <xfree86.cf>

#endif /* Sparc64Architecture */

/* End or architecture specific section */

/*
 * Generic settings for all architectures
 * which can be overridden by architecture specific sections above
 */

#ifndef ServerOSDefines
#  define ServerOSDefines 	/**/
#endif

#ifndef ServerExtraDefines
#  define ServerExtraDefines GccGasOption
#endif

#ifndef HasWeakSymbols
# define HasWeakSymbols YES
#endif

/*
 * Multi-thread safe libs 
 */	
#if HasWeakSymbols == YES && (OSMajorVersion == 2 && OSMinorVersion >= 6 || OSMajorVersion >= 3)
# define HasPosixThreads	YES
# define ThreadedX		YES
# define SystemMTDefines	-D_REENTRANT
# if HasLibPthread
#  define ThreadsLibraries	-lpthread
# else
#  define BuildThreadStubLibrary  YES 
#  define NeedUIThrStubs          YES 
#  define ThreadsCompileFlags	-pthread
#  define ThreadsLibraries	-pthread
# endif
#endif

/* Set this to YES when getpwuid_r is added to libc_r */
#define HasThreadSafeAPI	NO


#ifndef DoLoadableServer
#define DoLoadableServer	NO
#endif

#ifndef XVirtualFramebufferServer
# undef BuildServer
# define BuildServer			YES
# define XVirtualFramebufferServer	YES
#endif

#ifndef XnestServer
# undef BuildServer
# define BuildServer			YES
# define XnestServer			YES
#endif

#ifndef BuildScreenSaverLibrary
# define BuildScreenSaverLibrary	YES
#endif

#ifndef ForceNormalLib
# define ForceNormalLib			YES
#endif

#ifndef CompressAllFonts
# define CompressAllFonts		YES
#endif

#ifndef SharedLibXdmGreet
# define SharedLibXdmGreet		NO
#endif

/*
 * XFree86 uses its own (more portable) database routines to speed up
 * the RGB database lookups
 * However, if you want to use ndbm anyway, you can set that to NO in
 * host.def
 */
#ifndef UseRgbTxt
# define UseRgbTxt			YES
#endif

#ifndef OSBinaryType
# if UseElfFormat
#  define OSBinaryType			[ELF]
# else
#  define OSBinaryType			/**/
# endif
#endif

#ifndef HasDlopen
# define HasDlopen		YES
#endif

#ifndef DlLibrary
# if (OSMajorVersion < 3 || OSMajorVersion == 3 && OSMinorVersion == 0)\
    && UseElfFormat
#  define DlLibrary -ldl
# else
#  define DlLibrary /**/
# endif
#endif

#  if !defined(GccWarningOptions)
#    define GccWarningOptions 		-Wall -Wpointer-arith
#  endif

/* This must come last */
#if OSMajorVersion == 2 && OSMinorVersion >= 8 || OSMajorVersion > 2
# include <OpenBSDLib.rules>
#else
# include <bsdLib.rules>
#endif