FreeBSD.cf 6.2 KB

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