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