linux.cf 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296
  1. XCOMM platform: $TOG: linux.cf /main/47 1998/04/17 11:32:51 mgreess $
  2. #ifndef OSName
  3. # define OSName DefaultOSName
  4. #endif
  5. #ifndef OSMajorVersion
  6. # define OSMajorVersion DefaultOSMajorVersion
  7. #endif
  8. #ifndef OSMinorVersion
  9. # define OSMinorVersion DefaultOSMinorVersion
  10. #endif
  11. #ifndef OSTeenyVersion
  12. # define OSTeenyVersion DefaultOSTeenyVersion
  13. #endif
  14. #ifndef LinuxDistribution
  15. #define LinuxDistribution DefaultLinuxDistribution
  16. /*
  17. Add "#define LinuxDistribution Linux<mumble>" to your site.def or host.def.
  18. Currently only LinuxSuSE will be figured out automatically.
  19. Valid values are (from the list at www.linux.org in Oct. 1997):
  20. LinuxUnknown (0)
  21. LinuxSuSE (1)
  22. LinuxCaldera (2)
  23. LinuxCraftworks (3)
  24. LinuxDebian (4)
  25. LinuxInfoMagic (5)
  26. LinuxKheops (6)
  27. LinuxPro (7)
  28. LinuxRedHat (8)
  29. LinuxSlackware (9)
  30. LinuxTurbo (10)
  31. LinuxWare (11)
  32. LinuxYggdrasil (12)
  33. */
  34. #endif
  35. #ifndef DefaultLinuxCLibMajorVersion
  36. # define DefaultLinuxCLibMajorVersion 6
  37. #endif
  38. #ifndef DefaultLinuxCLibMinorVersion
  39. # define DefaultLinuxCLibMinorVersion 0
  40. #endif
  41. #ifndef DefaultLinuxCLibTeenyVersion
  42. # define DefaultLinuxCLibTeenyVersion 0
  43. #endif
  44. #ifndef LinuxCLibMajorVersion
  45. # define LinuxCLibMajorVersion DefaultLinuxCLibMajorVersion
  46. #endif
  47. #ifndef LinuxCLibMinorVersion
  48. # define LinuxCLibMinorVersion DefaultLinuxCLibMinorVersion
  49. #endif
  50. #ifndef LinuxCLibTeenyVersion
  51. # define LinuxCLibTeenyVersion DefaultLinuxCLibTeenyVersion
  52. #endif
  53. #ifndef LinuxBinUtilsMajorVersion
  54. # define LinuxBinUtilsMajorVersion DefaultLinuxBinUtilsMajorVersion
  55. #endif
  56. XCOMM operating system: OSName (OSMajorVersion./**/OSMinorVersion./**/OSTeenyVersion)
  57. XCOMM libc: (LinuxCLibMajorVersion./**/LinuxCLibMinorVersion./**/LinuxCLibTeenyVersion)
  58. XCOMM binutils: (LinuxBinUtilsMajorVersion)
  59. #ifndef UseElfFormat
  60. # if OSMajorVersion > 1 || (OSMajorVersion == 1 && OSMinorVersion > 1)
  61. # define UseElfFormat YES
  62. # else
  63. # define UseElfFormat NO
  64. # error "Only ELF format is supported on linux"
  65. # endif
  66. #endif
  67. #define BuildLibPathVar LD_LIBRARY_PATH
  68. #define HasGcc YES
  69. #define HasGcc2 YES
  70. #define HasGcc2ForCplusplus YES
  71. #define GccUsesGas YES
  72. #define UseGas YES
  73. #define GnuCpp YES
  74. #define HasShadowPasswd YES
  75. #define HasPutenv YES
  76. #define HasShm YES
  77. #define HasSockets YES
  78. #define HasMakefileSafeInclude YES
  79. #define DependFileName .depend
  80. #define DependCmd $(CC) -E -MM -MG
  81. #ifdef IncludeMakefile
  82. # undef IncludeMakefile
  83. #endif
  84. #define IncludeMakefile(file) -include file
  85. #if (LinuxDistribution == LinuxRedHat)
  86. # define HasZlib YES
  87. #endif
  88. #define AvoidNullMakeCommand YES
  89. #define StripInstalledPrograms NO
  90. #define CompressAllFonts YES
  91. #define Malloc0ReturnsNull YES
  92. #define NeedConstPrototypes YES
  93. #define NeedFunctionPrototypes YES
  94. #define NeedNestedPrototypes YES
  95. #define NeedVarargsPrototypes YES
  96. #define NeedWidePrototypes NO
  97. #define SetTtyGroup YES
  98. #define CcCmd gcc -g -pipe
  99. #define CplusplusCmd g++ -g -pipe
  100. #define AsCmd as
  101. #define LdCmd ld
  102. #define CplusplusLibC -lstdc++
  103. #define AsmDefines -D__ELF__
  104. #define MkdirHierCmd mkdir -p
  105. #define CppCmd /lib/cpp
  106. #if OSMajorVersion >= 2
  107. # define YaccCmd yacc
  108. #else
  109. # define YaccCmd bison -y
  110. #endif
  111. #define LexCmd flex -l
  112. #define LexLib -lfl
  113. #define PreProcessCmd CcCmd -E
  114. #define PostIncDir DefaultGccIncludeDir
  115. #define LdCombineFlags -r
  116. #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
  117. #define HasWChar32 YES
  118. #define StandardCppDefines -traditional -nostdinc StandardDefines
  119. #define ExtensionOSDefines -DXTESTEXT1
  120. #define LinuxLocaleDefines /**/
  121. #define DefaultCCOptions -ansi
  122. XCOMM Lets try XdmAuth instead of the ancient MIT/DES auth
  123. #define HasXdmAuth YES
  124. XCOMM TIRPC is enabled by default now on Linux. The libtirpc-dev package is
  125. XCOMM required for this support. If you cannot use tirpc for some reason,
  126. XCOMM can disable it by defining HasTIRPCLib to NO in either
  127. XCOMM your host.def or site.def file. Not using the TIRPC lib will require
  128. XCOMM that you run rpcbind in insecure mode (ie: with the -i option).
  129. XCOMM The default is YES.
  130. #ifndef HasTIRPCLib
  131. # define HasTIRPCLib YES
  132. #endif
  133. #if HasTIRPCLib
  134. TIRPCLIB = -ltirpc
  135. TIRPCINC = -I/usr/include/tirpc
  136. #else
  137. TIRPCLIB =
  138. TIRPCINC =
  139. #endif
  140. #if !defined(DefaultGcc2i386Opt)
  141. # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
  142. -Wno-unused-result
  143. #endif
  144. #if LinuxCLibMajorVersion < 6
  145. # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
  146. -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
  147. # ifndef HasLibCrypt
  148. # define HasLibCrypt NO
  149. # endif
  150. #else
  151. # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
  152. -D_BSD_SOURCE -D_SVID_SOURCE \
  153. -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
  154. LinuxLocaleDefines
  155. # define HasPosixThreads YES
  156. # define ThreadedX YES
  157. # define HasThreadSafeAPI YES
  158. # define ThreadsLibraries -lpthread
  159. # define SystemMTDefines -D_REENTRANT
  160. # ifndef HasLibCrypt
  161. # define HasLibCrypt YES
  162. # endif
  163. #endif
  164. #ifdef SparcArchitecture
  165. # define LinuxMachineDefines -Dsparc
  166. # if UseElfFormat
  167. # define HasPlugin YES
  168. # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
  169. # endif
  170. #endif /* SparcArchitecture */
  171. #ifdef ARMArchitecture
  172. # ifndef OptimizedCDebugFlags
  173. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  174. # endif
  175. # define LinuxMachineDefines -D__arm__
  176. # define LSBBitOrder YES
  177. # if UseElfFormat
  178. # define HasPlugin YES
  179. # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
  180. # endif
  181. #endif /* ARMArchitecture */
  182. #ifdef i386Architecture
  183. # ifndef OptimizedCDebugFlags
  184. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  185. # endif
  186. # define LinuxMachineDefines -D__i386__
  187. /* For DtHelp TIFF processing routines. */
  188. # define LSBBitOrder YES
  189. # if UseElfFormat
  190. # define HasPlugin YES
  191. # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
  192. # endif
  193. #endif /* i386Architecture */
  194. #ifdef AMD64Architecture
  195. # ifndef OptimizedCDebugFlags
  196. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  197. # endif
  198. # define LinuxMachineDefines -D__x86_64__
  199. /* For DtHelp TIFF processing routines. */
  200. # define LSBBitOrder YES
  201. # if UseElfFormat
  202. # define HasPlugin YES
  203. # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
  204. # endif
  205. #endif /* AMD64Architecture */
  206. #ifdef PpcArchitecture
  207. # ifndef OptimizedCDebugFlags
  208. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  209. # endif
  210. # define LinuxMachineDefines -D__powerpc__
  211. #endif /* PpcArchitecture */
  212. #ifdef AlphaArchitecture
  213. # ifndef OptimizedCDebugFlags
  214. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  215. # endif
  216. # define LinuxMachineDefines -D__alpha__
  217. #endif /* AlphaArchitecture */
  218. #ifdef Mc68020Architecture
  219. # ifndef OptimizedCDebugFlags
  220. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  221. # endif
  222. # define LinuxMachineDefines -D__mc68000__
  223. # define StandardCppDefines -traditional
  224. #endif /* Mc68020Architecture */
  225. #define StandardDefines -D__linux__ LinuxMachineDefines LinuxSourceDefines
  226. #define ConnectionFlags -DUNIXCONN -DTCPCONN
  227. XCOMM This is needed for CDE currently
  228. #define CplusplusStandardDefines StandardDefines
  229. /* Some of these man page defaults are overriden in the above OS sections */
  230. #ifndef ManSuffix
  231. # define ManSuffix 1x
  232. #endif
  233. #ifndef ManDir
  234. # define ManDir $(MANSOURCEPATH)1
  235. #endif
  236. #ifndef LibManSuffix
  237. # define LibManSuffix 3x
  238. #endif
  239. #ifndef LibmanDir
  240. # define LibmanDir $(MANSOURCEPATH)3
  241. #endif
  242. #ifndef FileManSuffix
  243. # define FileManSuffix 5x
  244. #endif
  245. #ifndef FileManDir
  246. # define FileManDir $(MANSOURCEPATH)5
  247. #endif
  248. #define ArchitectureDefines -DLINUX_ARCHITECTURE
  249. #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
  250. #define SharedTtReqs $(TIRPCLIB) $(LDPRELIBS) SharedXReqs $(CXXLIB)
  251. #include <lnxDep.rules>
  252. #include <lnxLib.rules>