imake/config changes to support more processors, including AMD64 (x86_64)
[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 #error "Only ELF format is supported on linux"
60 #endif
61 #endif
62 #define BuildLibPathVar         LD_LIBRARY_PATH
63 #define HasGcc                  YES
64 #define HasGcc2                 YES
65 #define HasGcc2ForCplusplus     YES
66 #define GccUsesGas              YES
67 #define UseGas                  YES
68 #define GnuCpp                  YES
69 #define HasShadowPasswd         YES
70 #define HasPutenv               YES
71 #define HasShm                  YES
72 #define HasSockets              YES
73 #if (LinuxDistribution == LinuxRedHat)
74 #define HasZlib                 YES
75 #endif
76
77 #define AvoidNullMakeCommand    YES
78 #define StripInstalledPrograms  YES
79 #define CompressAllFonts        YES
80 #define Malloc0ReturnsNull      YES
81 #define NeedConstPrototypes     YES
82 #define NeedFunctionPrototypes  YES
83 #define NeedNestedPrototypes    YES
84 #define NeedVarargsPrototypes   YES
85 #define NeedWidePrototypes      NO
86 #define SetTtyGroup             YES
87
88 #define CcCmd                   gcc -pipe
89 #define CplusplusCmd            g++ -pipe -fpermissive 
90 #define AsCmd                   as
91 #define LdCmd                   ld
92
93 #define AsmDefines              -D__ELF__
94
95 #define MkdirHierCmd            mkdir -p
96 #define CppCmd                  /lib/cpp
97 #if OSMajorVersion >= 2
98 #define YaccCmd                 yacc
99 #else
100 #define YaccCmd                 bison -y
101 #endif
102 #define LexCmd                  flex -l
103 #define LexLib                  -lfl
104 #define PreProcessCmd           CcCmd -E
105 #define PostIncDir              DefaultGccIncludeDir
106 #define LdCombineFlags          -r
107 #define XawI18nDefines          -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
108 #define HasWChar32              YES
109 #define StandardCppDefines      -traditional StandardDefines
110 #define ExtensionOSDefines      -DXTESTEXT1
111
112 #if (LinuxDistribution == LinuxSuSE)
113 #define LinuxLocaleDefines      /**/
114 #else
115 #define LinuxLocaleDefines      -DX_LOCALE
116 #endif
117
118 #if LinuxCLibMajorVersion < 6
119 # define LinuxSourceDefines     -D_POSIX_SOURCE \
120                                 -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
121 # ifndef HasLibCrypt
122 #  define HasLibCrypt           NO
123 # endif
124
125 #else
126 # define LinuxSourceDefines     -D_POSIX_C_SOURCE=199309L \
127                                 -D_POSIX_SOURCE \
128                                 -D_BSD_SOURCE -D_SVID_SOURCE -D_XOPEN_SOURCE \
129                                 -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
130                                 LinuxLocaleDefines
131 # define HasPosixThreads        YES
132 # define ThreadedX              YES
133 # define HasThreadSafeAPI       YES
134 # define ThreadsLibraries       -lpthread
135 # define SystemMTDefines                -D_REENTRANT
136 # ifndef HasLibCrypt
137 #  define HasLibCrypt           YES
138 # endif
139 #endif
140
141 #ifdef i386Architecture
142 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
143 #define LinuxMachineDefines     -D__i386__
144 /* For DtHelp TIFF processing routines. */
145 #define LSBBitOrder             YES
146
147 #if UseElfFormat
148 #define HasPlugin               YES
149 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
150 #endif
151 #endif /* i386Architecture */
152
153 #ifdef AMD64Architecture
154 #define OptimizedCDebugFlags    DefaultGcc2i386Opt
155 #define LinuxMachineDefines     -D__x86_64__ 
156 /* For DtHelp TIFF processing routines. */
157 #define LSBBitOrder             YES
158
159 #if UseElfFormat
160 #define HasPlugin               YES
161 #define VendorHasX11R6_3libXext YES     /* XC or XFree86 3.3.1 */
162 #endif
163 #endif /* AMD64Architecture */
164
165 #ifdef AlphaArchitecture
166 #define OptimizedCDebugFlags    -O2
167 #define LinuxMachineDefines     -D__alpha__
168 #endif /* AlphaArchitecture */
169
170 #ifdef Mc68020Architecture
171 #define OptimizedCDebugFlags    -O2
172 #define LinuxMachineDefines     -D__mc68000__
173 #define StandardCppDefines      -traditional 
174 #endif /* Mc68020Architecture */
175
176 #define StandardDefines         -Dlinux LinuxMachineDefines LinuxSourceDefines
177
178 #define ConnectionFlags         -DUNIXCONN -DTCPCONN
179
180 XCOMM This is needed for CDE currently
181 #define CplusplusStandardDefines StandardDefines 
182
183 /* Some of these man page defaults are overriden in the above OS sections */
184 #ifndef ManSuffix
185 # define ManSuffix      1x
186 #endif
187 #ifndef ManDir
188 # define ManDir         $(MANSOURCEPATH)1
189 #endif
190 #ifndef LibManSuffix
191 # define LibManSuffix   3x
192 #endif
193 #ifndef LibmanDir
194 # define LibmanDir      $(MANSOURCEPATH)3
195 #endif
196 #ifndef FileManSuffix
197 # define FileManSuffix  5x
198 #endif
199 #ifndef FileManDir
200 # define FileManDir     $(MANSOURCEPATH)5
201 #endif
202
203 #define ArchitectureDefines     -DLINUX_ARCHITECTURE
204
205 #define TtClientLibs $(TTLIB) $(XTOOLLIB) $(XLIB)
206 #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
207
208 #include <lnxLib.rules>
209 #include <xfree86.cf>