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