Add -fpermissive to linux standard c++ option define in linux.cf
[oweals/cde.git] / cde / config / cf / linux.cf
1 XCOMM platform:  $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $
2
3 #ifndef OSName
4 #define OSName                  DefaultOSName
5 #endif
6 #ifndef OSMajorVersion
7 #define OSMajorVersion          DefaultOSMajorVersion
8 #endif
9 #ifndef OSMinorVersion
10 #define OSMinorVersion          DefaultOSMinorVersion
11 #endif
12 #ifndef OSTeenyVersion
13 #define OSTeenyVersion          DefaultOSTeenyVersion
14 #endif
15
16 #ifndef LinuxDistribution 
17 #define LinuxDistribution       DefaultLinuxDistribution
18 /*
19   Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
20   Currently only LinuxSuSE will be figured out automatically.
21   Valid values are (from the list at www.linux.org in Oct. '97):
22     LinuxUnknown    (0)
23     LinuxSuSE       (1)
24     LinuxCaldera    (2)
25     LinuxCraftworks (3)
26     LinuxDebian     (4)
27     LinuxInfoMagic  (5)
28     LinuxKheops     (6)
29     LinuxPro        (7)
30     LinuxRedHat     (8)
31     LinuxSlackware  (9)
32     LinuxTurbo      (10)
33     LinuxWare       (11)
34     LinuxYggdrasil  (12)
35 */
36 #endif
37 #ifndef LinuxCLibMajorVersion
38 #define LinuxCLibMajorVersion   DefaultLinuxCLibMajorVersion
39 #endif
40 #ifndef LinuxCLibMinorVersion
41 #define LinuxCLibMinorVersion   DefaultLinuxCLibMinorVersion
42 #endif
43 #ifndef LinuxCLibTeenyVersion
44 #define LinuxCLibTeenyVersion   DefaultLinuxCLibTeenyVersion
45 #endif
46 #ifndef LinuxBinUtilsMajorVersion
47 #define LinuxBinUtilsMajorVersion       DefaultLinuxBinUtilsMajorVersion
48 #endif
49
50 XCOMM operating system:  OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
51 XCOMM libc:  (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
52 XCOMM binutils:  (LinuxBinUtilsMajorVersion)
53
54 #ifndef UseElfFormat
55 #if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
56 #define UseElfFormat            YES
57 #else
58 #define UseElfFormat            NO
59 #endif
60 #endif
61 #define BuildLibPathVar         LD_LIBRARY_PATH
62 #define HasGcc                  YES
63 #define HasGcc2                 YES
64 #define HasGcc2ForCplusplus     YES
65 #define GccUsesGas              YES
66 #define UseGas                  YES
67 #define GnuCpp                  YES
68 #define HasShadowPasswd         YES
69 #define HasPutenv               YES
70 #define HasShm                  YES
71 #define HasSockets              YES
72 #if (LinuxDistribution == LinuxRedHat)
73 #define HasZlib                 YES
74 #endif
75
76 #define AvoidNullMakeCommand    YES
77 #define StripInstalledPrograms  YES
78 #define CompressAllFonts        YES
79 #define Malloc0ReturnsNull      YES
80 #define NeedConstPrototypes     YES
81 #define NeedFunctionPrototypes  YES
82 #define NeedNestedPrototypes    YES
83 #define NeedVarargsPrototypes   YES
84 #define NeedWidePrototypes      NO
85 #define SetTtyGroup             YES
86
87 #if UseElfFormat
88 #if OSMajorVersion == 1 && OSMinorVersion < 2
89 #define CcCmd                   gcc -b i486-linuxelf
90 #define CplusplusCmd            g++ -b i486-linuxelf
91 #define AsCmd                   /usr/i486-linuxelf/bin/as
92 #define LdCmd                   ld -m elf_i386
93 #else
94 #define CcCmd                   gcc
95 #define CplusplusCmd            g++ 
96 #define AsCmd                   as
97 #define LdCmd                   ld
98 #endif
99 #define AsmDefines              -D__ELF__
100 #else
101 #define CcCmd                   gcc
102 #if OSMajorVersion == 1 && OSMinorVersion > 1
103 #define AsCmd                   /usr/i486-linuxaout/bin/as
104 #define LdCmd                   ld -m i386linux
105 #else
106 #define AsCmd                   as
107 #define LdCmd                   ld
108 #endif
109 #define AsmDefines              -DUSE_GAS -U__ELF__
110 #endif
111 #define MkdirHierCmd            mkdir -p
112 #define CppCmd                  /lib/cpp
113 #if OSMajorVersion >= 2
114 #define YaccCmd                 yacc
115 #else
116 #define YaccCmd                 bison -y
117 #endif
118 #define LexCmd                  flex -l
119 #define LexLib                  -lfl
120 #define PreProcessCmd           CcCmd -E
121 #define PostIncDir              DefaultGccIncludeDir
122 #define LdCombineFlags          -r
123 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
124 #define HasWChar32              YES
125 #define StandardCppDefines      -traditional StandardDefines
126 #define ExtensionOSDefines      -DXTESTEXT1
127
128 #if (LinuxDistribution == LinuxSuSE)
129 #define LinuxLocaleDefines      /**/
130 #else
131 #define LinuxLocaleDefines      -DX_LOCALE
132 #endif
133
134 #if LinuxCLibMajorVersion < 6
135 #define LinuxSourceDefines      -D_POSIX_SOURCE \
136                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
137 #ifndef HasLibCrypt
138 # define HasLibCrypt            NO
139 #endif
140 #else
141 #define LinuxSourceDefines      -D_POSIX_C_SOURCE=199309L \
142                                 -D_POSIX_SOURCE \
143                                 -D_BSD_SOURCE -D_SVID_SOURCE
144 #define HasPosixThreads         YES
145 #define ThreadedX               YES
146 #define HasThreadSafeAPI        YES
147 #define ThreadsLibraries        -lpthread
148 #define SystemMTDefines         -D_REENTRANT
149 #ifndef HasLibCrypt
150 # define HasLibCrypt            YES
151 #endif
152 #endif
153
154 XCOMM This is needed for CDE currently
155 #define CplusplusStandardDefines StandardDefines -fpermissive
156
157 #ifdef i386Architecture
158 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
159 #define LinuxMachineDefines     -D__i386__
160 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME
161 #define ServerExtraDefines      -DGCCUSESGAS XFree86ServerDefines
162 #if UseElfFormat
163 #define HasPlugin               YES
164 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
165 #endif
166 #endif /* i386Architecture */
167
168 #ifdef AlphaArchitecture
169 #define OptimizedCDebugFlags    -O2
170 #define LinuxMachineDefines     -D__alpha__
171 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME -DPART_NET
172 #define ServerExtraDefines      -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64
173 #endif /* AlphaArchitecture */
174
175 #ifdef Mc68020Architecture
176 #define OptimizedCDebugFlags    -O2
177 #define LinuxMachineDefines     -D__mc68000__
178 #define StandardCppDefines      -traditional StandardDefines
179 #define ServerOSDefines         XFree86ServerOSDefines -DDDXTIME -DPART_NET
180 #define ServerExtraDefines      -DGCCUSESGAS XFree86ServerDefines
181 #endif /* Mc68020Architecture */
182
183 #define StandardDefines         -Dlinux LinuxMachineDefines LinuxSourceDefines
184
185 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
186
187 /* Some of these man page defaults are overriden in the above OS sections */
188 #ifndef ManSuffix
189 # define ManSuffix      1x
190 #endif
191 #ifndef ManDir
192 # define ManDir         $(MANSOURCEPATH)1
193 #endif
194 #ifndef LibManSuffix
195 # define LibManSuffix   3x
196 #endif
197 #ifndef LibmanDir
198 # define LibmanDir      $(MANSOURCEPATH)3
199 #endif
200 #ifndef FileManSuffix
201 # define FileManSuffix  5x
202 #endif
203 #ifndef FileManDir
204 # define FileManDir     $(MANSOURCEPATH)5
205 #endif
206
207 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
208
209 #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
210 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
211
212 #include <lnxLib.rules>
213 #include <xfree86.cf>