linux.cf 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  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 UseInstalledX11 YES
  68. #define BuildLibPathVar LD_LIBRARY_PATH
  69. #define HasGcc YES
  70. #define HasGcc2 YES
  71. #define HasGcc2ForCplusplus YES
  72. #define GccUsesGas YES
  73. #define UseGas YES
  74. #define GnuCpp YES
  75. #define HasShadowPasswd YES
  76. #define HasPutenv YES
  77. #define HasShm YES
  78. #define HasSockets YES
  79. #define HasMakefileSafeInclude YES
  80. #define DependFileName .depend
  81. #define DependCmd $(CC) -E -MM -MG
  82. #ifdef IncludeMakefile
  83. # undef IncludeMakefile
  84. #endif
  85. #define IncludeMakefile(file) -include file
  86. #if (LinuxDistribution == LinuxRedHat)
  87. # define HasZlib YES
  88. #endif
  89. #define AvoidNullMakeCommand YES
  90. #define StripInstalledPrograms YES
  91. #define CompressAllFonts YES
  92. #define Malloc0ReturnsNull YES
  93. #define NeedConstPrototypes YES
  94. #define NeedFunctionPrototypes YES
  95. #define NeedNestedPrototypes YES
  96. #define NeedVarargsPrototypes YES
  97. #define NeedWidePrototypes NO
  98. #define SetTtyGroup YES
  99. #define CcCmd gcc -g -pipe
  100. #define CplusplusCmd g++ -g -pipe -fpermissive
  101. #define AsCmd as
  102. #define LdCmd ld
  103. #define CplusplusLibC -lstdc++
  104. #define AsmDefines -D__ELF__
  105. #define MkdirHierCmd mkdir -p
  106. #define CppCmd /lib/cpp
  107. #if OSMajorVersion >= 2
  108. # define YaccCmd yacc
  109. #else
  110. # define YaccCmd bison -y
  111. #endif
  112. #define LexCmd flex -l
  113. #define LexLib -lfl
  114. #define PreProcessCmd CcCmd -E
  115. #define PostIncDir DefaultGccIncludeDir
  116. #define LdCombineFlags -r
  117. #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
  118. #define HasWChar32 YES
  119. #define StandardCppDefines -traditional -nostdinc StandardDefines
  120. #define ExtensionOSDefines -DXTESTEXT1
  121. #define LinuxLocaleDefines /**/
  122. #define DefaultCCOptions -ansi
  123. XCOMM Lets try XdmAuth instead of the ancient MIT/DES auth
  124. #define HasXdmAuth YES
  125. XCOMM If you have the tirpc library on your system, and you have the
  126. XCOMM libtirpc-dev installed, then define HasTIRPCLib to YES in either
  127. XCOMM your host.def or site.def file. Using the tirpc lib should
  128. XCOMM allow running rpcbind in secure mode (ie: without the -i option).
  129. XCOMM The default is NO.
  130. #ifndef HasTIRPCLib
  131. # define HasTIRPCLib NO
  132. #endif
  133. #if HasTIRPCLib
  134. TIRPCLIB = -ltirpc
  135. #else
  136. TIRPCLIB =
  137. #endif
  138. #if !defined(DefaultGcc2i386Opt)
  139. # define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings
  140. #endif
  141. #if LinuxCLibMajorVersion < 6
  142. # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
  143. -D_BSD_SOURCE -D_SVID_SOURCE LinuxLocaleDefines
  144. # ifndef HasLibCrypt
  145. # define HasLibCrypt NO
  146. # endif
  147. #else
  148. # define LinuxSourceDefines -D_POSIX_SOURCE -D_DEFAULT_SOURCE \
  149. -D_BSD_SOURCE -D_SVID_SOURCE \
  150. -D__NO_STRING_INLINES -D__NO_MATH_INLINES \
  151. LinuxLocaleDefines
  152. # define HasPosixThreads YES
  153. # define ThreadedX YES
  154. # define HasThreadSafeAPI YES
  155. # define ThreadsLibraries -lpthread
  156. # define SystemMTDefines -D_REENTRANT
  157. # ifndef HasLibCrypt
  158. # define HasLibCrypt YES
  159. # endif
  160. #endif
  161. #ifdef SparcArchitecture
  162. # define LinuxMachineDefines -Dsparc
  163. # if UseElfFormat
  164. # define HasPlugin YES
  165. # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
  166. # endif
  167. #endif /* SparcArchitecture */
  168. #ifdef ARMArchitecture
  169. # ifndef OptimizedCDebugFlags
  170. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  171. # endif
  172. # define LinuxMachineDefines -D__arm__
  173. # define LSBBitOrder YES
  174. # if UseElfFormat
  175. # define HasPlugin YES
  176. # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
  177. # endif
  178. #endif /* ARMArchitecture */
  179. #ifdef i386Architecture
  180. # ifndef OptimizedCDebugFlags
  181. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  182. # endif
  183. # define LinuxMachineDefines -D__i386__
  184. /* For DtHelp TIFF processing routines. */
  185. # define LSBBitOrder YES
  186. # if UseElfFormat
  187. # define HasPlugin YES
  188. # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
  189. # endif
  190. #endif /* i386Architecture */
  191. #ifdef AMD64Architecture
  192. # ifndef OptimizedCDebugFlags
  193. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  194. # endif
  195. # define LinuxMachineDefines -D__x86_64__
  196. /* For DtHelp TIFF processing routines. */
  197. # define LSBBitOrder YES
  198. # if UseElfFormat
  199. # define HasPlugin YES
  200. # define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
  201. # endif
  202. #endif /* AMD64Architecture */
  203. #ifdef PpcArchitecture
  204. # ifndef OptimizedCDebugFlags
  205. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  206. # endif
  207. # define LinuxMachineDefines -D__powerpc__
  208. #endif /* PpcArchitecture */
  209. #ifdef AlphaArchitecture
  210. # ifndef OptimizedCDebugFlags
  211. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  212. # endif
  213. # define LinuxMachineDefines -D__alpha__
  214. #endif /* AlphaArchitecture */
  215. #ifdef Mc68020Architecture
  216. # ifndef OptimizedCDebugFlags
  217. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  218. # endif
  219. # define LinuxMachineDefines -D__mc68000__
  220. # define StandardCppDefines -traditional
  221. #endif /* Mc68020Architecture */
  222. #define StandardDefines -Dlinux LinuxMachineDefines LinuxSourceDefines
  223. #define ConnectionFlags -DUNIXCONN -DTCPCONN
  224. XCOMM This is needed for CDE currently
  225. #define CplusplusStandardDefines StandardDefines
  226. /* Some of these man page defaults are overriden in the above OS sections */
  227. #ifndef ManSuffix
  228. # define ManSuffix 1x
  229. #endif
  230. #ifndef ManDir
  231. # define ManDir $(MANSOURCEPATH)1
  232. #endif
  233. #ifndef LibManSuffix
  234. # define LibManSuffix 3x
  235. #endif
  236. #ifndef LibmanDir
  237. # define LibmanDir $(MANSOURCEPATH)3
  238. #endif
  239. #ifndef FileManSuffix
  240. # define FileManSuffix 5x
  241. #endif
  242. #ifndef FileManDir
  243. # define FileManDir $(MANSOURCEPATH)5
  244. #endif
  245. #define ArchitectureDefines -DLINUX_ARCHITECTURE
  246. #define TtClientLibs $(TTLIB) $(TIRPCLIB) $(XTOOLLIB) $(XLIB)
  247. #define TtClientDepLibs $(DEPTTLIB) $(DEPXTOOLLIB) $(DEPXLIB)
  248. #include <lnxDep.rules>
  249. #include <lnxLib.rules>