FreeBSD.cf 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. XCOMM platform: $TOG: FreeBSD.cf /main/21 1997/10/05 20:42:34 kaleb $
  2. #ifndef OSName
  3. #define OSName DefaultOSName
  4. #endif
  5. #ifndef OSVendor
  6. #define OSVendor FreeBSD Foundation
  7. #endif
  8. #ifndef OSMajorVersion
  9. #define OSMajorVersion DefaultOSMajorVersion
  10. #endif
  11. #ifndef OSMinorVersion
  12. #define OSMinorVersion DefaultOSMinorVersion
  13. #endif
  14. #ifndef OSTeenyVersion
  15. #define OSTeenyVersion DefaultOSTeenyVersion
  16. #endif
  17. XCOMM operating system: OSName (OSMajorVersion/**/./**/OSMinorVersion/**/./**/OSTeenyVersion)
  18. #define HasPutenv YES
  19. #define HasBSD44Sockets YES
  20. #define HasZlib YES
  21. #define HasXdmAuth YES
  22. #if OSMajorVersion >= 10 && defined(UseGcc)
  23. USE_GCC = UseGcc
  24. #endif
  25. #ifndef CppCmd
  26. #if OSMajorVersion >= 10 && defined(UseGcc)
  27. # define CppCmd /usr/local/bin/cpp$(USE_GCC)
  28. #else
  29. # define CppCmd /usr/bin/cpp
  30. #endif
  31. #endif
  32. #define PreProcessCmd CppCmd
  33. #if OSMajorVersion >= 10
  34. #define CppArgs -Wno-invalid-pp-token
  35. #define DirFailPrefix -
  36. #else
  37. #define CppArgs /**/
  38. #endif
  39. #ifndef StandardCppDefines
  40. #define StandardCppDefines -traditional CppArgs
  41. #endif
  42. #ifndef PerlCmd
  43. #define PerlCmd /usr/local/bin/perl
  44. #endif
  45. #undef InstallCmd
  46. #define InstallCmd /usr/bin/install
  47. #undef KornShell
  48. #define KornShell /usr/local/bin/ksh93
  49. #define UseGas YES
  50. #ifndef GccUsesGas
  51. # define GccUsesGas YES
  52. #endif
  53. #ifndef AsmDefines
  54. # define AsmDefines -DUSE_GAS
  55. #endif
  56. #if GccUsesGas
  57. # define GccGasOption -DGCCUSESGAS
  58. #else
  59. # define GccGasOption /**/
  60. #endif
  61. #ifndef HasGcc2
  62. # define HasGcc2 YES
  63. #endif
  64. /* Use installed X11 includes/libs on FreeBSD 11+ */
  65. #if (OSMajorVersion >= 11)
  66. #define UseInstalledX11 YES
  67. #endif
  68. /* For DtHelp TIFF processing routines. */
  69. #ifdef AMD64Architecture
  70. #define LSBBitOrder YES
  71. #endif
  72. #ifdef ARMArchitecture
  73. #define LSBBitOrder YES
  74. #endif
  75. #ifdef i386Architecture
  76. #define LSBBitOrder YES
  77. #endif
  78. #define MkdirHierCmd mkdir -p
  79. #ifndef CcCmd
  80. #if OSMajorVersion >= 10
  81. # if defined(UseGcc)
  82. # define CcCmd /usr/local/bin/gcc$(USE_GCC)
  83. # define CplusplusCmd /usr/local/bin/g++$(USE_GCC)
  84. # else
  85. # define CcCmd cc
  86. # define CplusplusCmd c++
  87. # endif
  88. #else
  89. # define CcCmd gcc
  90. # define CplusplusCmd g++
  91. #endif
  92. #endif
  93. #ifndef DefaultCCOptions
  94. #define DefaultCCOptions -pipe
  95. #endif
  96. #ifndef CplusplusLibC
  97. #define CplusplusLibC -lstdc++
  98. #endif
  99. #if OSMajorVersion > 1
  100. #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME
  101. #define XawI18nDefines -DUSE_XWCHAR_STRING
  102. #define HasMakefileSafeInclude YES
  103. #define IncludeMakefile(file) HASH_SIGN dependencies are in .depend
  104. #define DependFileName .depend
  105. #define DependDefines -D__cplusplus
  106. #if OSMajorVersion < 3
  107. #if OSMinorVersion < 2
  108. #ifndef ExtraLibraries
  109. #define ExtraLibraries -lgnumalloc
  110. #endif
  111. #else
  112. #if OSTeenyVersion == 2
  113. #define HasSetUserContext YES
  114. #endif
  115. #endif
  116. #ifndef ExtraLoadFlags
  117. /*
  118. * This doesn't work the way it does on every other system. On FreeBSD it's
  119. * only a "hint, not a demand", whatever that means. Note that this is not
  120. * what it says in the ld and ld.so man pages, which are rather vague on the
  121. * matter.
  122. *
  123. * But we do know that if a) you do what the X Project team does and set your
  124. * ProjectRoot to something like "/X11", and b) you have other X libraries,
  125. * e.g. in /usr/X11R6/lib, and you have added /usr/X11R6/lib to your
  126. * ld.so.cache with ldconfig, then any programs linked with this "hint" will
  127. * find that ld.so ignores the "hint" at runtime and loads the libraries in
  128. * the ld.so.cache, i.e.the wrong ones, instead! Empirically we find that
  129. * the run-path is only used as a last resort to find the libraries, after
  130. * the LD_LIBRARY_PATH and ld.so.cache.
  131. *
  132. * N. B. to FreeBSD users who are not familiar with the semantics of the run-
  133. * path on other systems. The run-path is akin to a per-program ld.so.cache.
  134. * If a program is linked with a run-path, that run-path should take
  135. * precedence over _everything_ else! In my opinion ldconfig and the
  136. * ld.so.cache should be deprecated immediately now that FreeBSD has run-
  137. * paths. Any program that needs libraries that are outside the "well known"
  138. * locations should be linked with a run-path.
  139. *
  140. * All of which begs the question: If this option doesn't work in any useful
  141. * way, why did they (FreeBSD) bother to add it? It would be nice if FreeBSD
  142. * would fix ld.so so that run-paths are truly useful.
  143. *
  144. * Using run-paths is added with the intent that vendors who ship X for
  145. * FreeBSD should use it too. Once everyone uses it then there will be no
  146. * reason for FreeBSD to assume that it knows where X libraries are installed
  147. * and they can remove it from the list of directories they add to ld.so.cache
  148. * in their /etc/rc file.
  149. */
  150. #define ExtraLoadFlags -Wl,-R,$(USRLIBDIRPATH)
  151. #endif
  152. #endif
  153. #else
  154. #define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DXNO_SYSCONF
  155. #define XawI18nDefines -DUSE_XWCHAR_STRING -DUSE_XMBTOWC
  156. #ifndef ExtraLibraries
  157. #define ExtraLibraries /* -lmalloc */
  158. #endif
  159. #endif
  160. /* The GCC strength-reduce bug is fixed for FreeBSD 2.1.5 and later */
  161. #ifndef DefaultGcc2i386Opt
  162. #if OSMajorVersion > 2 || (OSMajorVersion == 2 && OSMinorVersion > 1) || (OSMajorVersion == 2 && OSMinorVersion == 1 && OSTeenyVersion >= 5)
  163. #define DefaultGcc2i386Opt -O2 -fno-strict-aliasing -Wno-write-strings \
  164. -Wno-unused-result -Wno-deprecated-register
  165. #endif
  166. #endif
  167. #ifndef OptimizedCDebugFlags
  168. # if defined(i386Architecture) || defined(AMD64Architecture)
  169. # define OptimizedCDebugFlags DefaultGcc2i386Opt
  170. # else
  171. # define OptimizedCDebugFlags -O2 -fno-strict-aliasing
  172. # endif
  173. #endif
  174. #ifdef HasGcc2
  175. CXXDEPENDINCLUDE != CcCmd -v -x c++ /dev/null -fsyntax-only \
  176. 2>&1 | sed -n 's/^ \(\/.*[cg]++.*\)/-I\1/p'
  177. #define CplusplusDependIncludes $(CXXDEPENDINCLUDE)
  178. #endif
  179. /* beginning with svn version 254273 iconv functions are moved to libc */
  180. #if (OSMajorVersion >= 10)
  181. ICONVSYSLIB != if test -f /usr/local/include/iconv.h; then echo -liconv; else echo; fi
  182. #endif
  183. #define ServerExtraDefines GccGasOption XFree86ServerDefines
  184. #define StandardDefines -DCSRG_BASED
  185. #define StandardIncludes -I/usr/local/include
  186. #define BuildLibPathVar LD_LIBRARY_PATH
  187. #define DefaultUserPath /bin:/usr/bin:/usr/local/bin:$(BINDIR)
  188. #define DefaultSystemPath /sbin:/usr/sbin:/bin:/usr/bin:$(BINDIR)
  189. #define TroffCmd groff -Tps
  190. #define SetTtyGroup YES
  191. #define HasNdbm YES
  192. #define HasShm YES
  193. #define HasWChar32 YES
  194. #define HasLibCrypt YES
  195. #define AvoidNullMakeCommand YES
  196. #define HasPlugin YES
  197. #define VendorHasX11R6_3libXext YES /* XC or XFree86 3.3.1 */
  198. #define CDESharedRev 2
  199. #include <bsdLib.rules>