Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / config / cf / FreeBSD.cf
1 XCOMM platform:  $TOG: FreeBSD.cf /main/21 1997/10/05 20:42:34 kaleb $
2
3 #ifndef OSName
4 #define OSName                  DefaultOSName
5 #endif
6 #ifndef OSVendor
7 #define OSVendor                Walnut Creek CD-ROM
8 #endif
9 #ifndef OSMajorVersion
10 #define OSMajorVersion          DefaultOSMajorVersion
11 #endif
12 #ifndef OSMinorVersion
13 #define OSMinorVersion          DefaultOSMinorVersion
14 #endif
15 #ifndef OSTeenyVersion
16 #define OSTeenyVersion          DefaultOSTeenyVersion
17 #endif
18 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
19
20 #define HasPutenv               YES
21 #define HasBSD44Sockets         YES
22 #define HasZlib                 YES
23
24 #define CppCmd                  /usr/libexec/cpp -traditional
25 #define PreProcessCmd           /usr/libexec/cpp -traditional
26 #undef  InstallCmd
27 #define InstallCmd              /usr/bin/install
28
29 #define UseGas                  YES
30 #ifndef GccUsesGas
31 # define GccUsesGas             YES
32 #endif
33
34 #ifndef AsmDefines
35 #  define AsmDefines            -DUSE_GAS
36 #endif
37
38 #if GccUsesGas
39 # define GccGasOption           -DGCCUSESGAS
40 #else
41 # define GccGasOption           /**/
42 #endif
43
44 #ifndef HasGcc2
45 # define HasGcc2                YES
46 #endif
47
48 #define MkdirHierCmd            mkdir -p
49
50 #define CcCmd gcc
51 #ifndef DefaultCCOptions
52 #define DefaultCCOptions        -pipe
53 #endif
54
55 #if OSMajorVersion > 1
56 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME
57 #define XawI18nDefines          -DUSE_XWCHAR_STRING
58 #define HasMakefileSafeInclude  YES
59 #define IncludeMakefile(file)   @@# dependencies are in .depend
60 #define DependFileName          .depend
61 #if OSMinorVersion < 2
62 #ifndef ExtraLibraries
63 #define ExtraLibraries          -lgnumalloc
64 #endif
65 #else
66 #if OSTeenyVersion == 2
67 #define HasSetUserContext       YES
68 #endif
69 #ifndef ExtraLoadFlags
70 /* 
71  * This doesn't work the way it does on every other system. On FreeBSD it's
72  * only a "hint, not a demand", whatever that means. Note that this is not 
73  * what it says in the ld and ld.so man pages, which are rather vague on the
74  * matter.
75  *
76  * But we do know that if a) you do what the X Project team does and set your 
77  * ProjectRoot to something like "/X11", and b) you have other X libraries, 
78  * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your 
79  * ld.so.cache with ldconfig, then any programs linked with this "hint" will
80  * find that ld.so ignores the "hint" at runtime and loads the libraries in 
81  * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
82  * the run-path is only used as a last resort to find the libraries, after
83  * the LD_LIBRARY_PATH and ld.so.cache.
84  *
85  * N. B. to FreeBSD users who are not familiar with the semantics of the run-
86  * path on other systems. The run-path is akin to a per-program ld.so.cache. 
87  * If a program is linked with a run-path, that run-path should take 
88  * precedence over _everything_ else! In my opinion ldconfig and the 
89  * ld.so.cache should be deprecated immediately now that FreeBSD has run-
90  * paths. Any program that needs libraries that are outside the "well known" 
91  * locations should be linked with a run-path.
92  *
93  * All of which begs the question: If this option doesn't work in any useful
94  * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
95  * would fix ld.so so that run-paths are truly useful.
96  *
97  * Using run-paths is added with the intent that vendors who ship X for 
98  * FreeBSD should use it too. Once everyone uses it then there will be no 
99  * reason for FreeBSD to assume that it knows where X libraries are installed 
100  * and they can remove it from the list of directories they add to ld.so.cache 
101  * in their /etc/rc file.
102  */
103 #define ExtraLoadFlags          -Wl,-R,$(USRLIBDIRPATH)
104 #endif
105 #endif
106 #else
107 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
108 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
109 #ifndef ExtraLibraries
110 #define ExtraLibraries          /* -lmalloc */
111 #endif
112 #endif
113
114 /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
115 #ifndef DefaultGcc2i386Opt
116 #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
117 #define DefaultGcc2i386Opt -O2
118 #endif
119 #endif
120
121 #ifdef i386Architecture
122 # define OptimizedCDebugFlags DefaultGcc2i386Opt
123 #else
124 # define OptimizedCDebugFlags -O2
125 #endif
126
127 #define ServerExtraDefines      GccGasOption XFree86ServerDefines
128
129 #define StandardDefines         -DCSRG_BASED
130
131 #define TroffCmd                groff -Tps
132 #define SetTtyGroup             YES
133 #define HasNdbm                 YES
134 #define HasShm                  YES
135 #define HasWChar32              YES
136
137 #define HasLibCrypt             YES
138
139 #define AvoidNullMakeCommand    YES
140
141 #define HasPlugin               YES
142 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
143
144 #include <bsdLib.rules>
145
146 #ifdef i386Architecture
147 #include <xfree86.cf>
148 #endif