ibm.cf 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. XCOMM platform: $TOG: ibm.cf /main/82 1998/02/26 17:03:51 kaleb $
  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. # ifdef DefaultOSTeenyVersion
  13. # define OSTeenyVersion DefaultOSTeenyVersion
  14. # elif (OSMajorVersion == 4) && (OSMinorVersion == 1)
  15. # define OSTeenyVersion 3
  16. # else
  17. # define OSTeenyVersion 0
  18. # endif
  19. #endif
  20. XCOMM operating system: OSName (OSMajorVersion.OSMinorVersion.OSTeenyVersion)
  21. #if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion >= 2)
  22. #define HasBSD44Sockets YES
  23. #define HasPutenv YES
  24. #define HasPlugin YES
  25. /*
  26. * If you do not have threads support installed, put
  27. * #define HasPosixThreads NO
  28. * in the BeforeVendorCF section of your site.def.
  29. */
  30. #if !defined(HasPosixThreads) && ((OSMajorVersion == 3 && (OSMinorVersion > 2 || (OSMinorVersion == 2 && OSTeenyVersion > 4))) || (OSMajorVersion == 4 && (OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1))))
  31. #define HasPosixThreads YES
  32. #endif
  33. #if HasPosixThreads
  34. #ifndef ThreadedX
  35. #define ThreadedX YES
  36. #define MTSafeAPIDefines -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
  37. #endif
  38. #endif
  39. #endif /* OS > 3.2 */
  40. /*
  41. * For IBM platforms, we must define both the location of the compiler
  42. * and the location of its standard C++ library. The library location
  43. * is needed to resolve dependent library symbols if we build our own
  44. * C++ shared libraries.
  45. */
  46. #if !HasGcc2ForCplusplus
  47. # ifndef CplusplusCmd
  48. # if ThreadedX
  49. # define CplusplusCmd xlC_r
  50. # else
  51. # define CplusplusCmd xlC
  52. # endif
  53. # endif
  54. #endif
  55. #ifndef CplusplusFilt
  56. # define CplusplusFilt /usr/lpp/xlC/bin/c++filt
  57. #endif
  58. #ifndef CplusplusLibC
  59. # if ThreadedX
  60. # define CplusplusLibC /usr/lpp/xlC/lib/libC.a
  61. # else
  62. # define CplusplusLibC /usr/lpp/xlC/lib/libC_r.a
  63. # endif
  64. #endif
  65. #if !HasGcc2ForCplusplus
  66. # ifndef CplusplusDependIncludes
  67. # define CplusplusDependIncludes -I/usr/lpp/xlC/include
  68. # endif
  69. #endif
  70. /*
  71. * IBM's xlC refuses to compile files unless their names end in ".C".
  72. * As an alternative to this fix, one could edit /etc/xlC.cfg
  73. * to change the suffix accepted by the compiler, but we prefer not
  74. * requiring users to reconfigure their C++ compilers to make them work.
  75. * We also have to override the default SUFFIXES to defeat the use of
  76. * the builtin .C -> .o file, which doesn't use the right flags.
  77. */
  78. .SUFFIXES:
  79. .SUFFIXES: .o .c .y .l .s .sh .h .f .Y .L .cxx
  80. #define NormalLibObjCplusplusCompile(options) test -r $*.C || $(LN) $*.CCsuf $*.C @@\
  81. $(CXX) -c $(CXXFLAGS) options $*.C
  82. #define SpecialCplusplusObjectRule(baseobj,basedep,options) @@\
  83. baseobj.Osuf: basedep.CCsuf @@\
  84. test -r basedep.C || $(LN) basedep.CCsuf basedep.C @@\
  85. $(CXX) -c $(CXXFLAGS) options basedep.C
  86. #define BuildLibPathVar LIBPATH
  87. #define SystemV YES
  88. #define LdCombineFlags -r
  89. #define ExecableScripts YES
  90. #define Malloc0ReturnsNull YES
  91. #define CppCmd /usr/ccs/lib/cpp
  92. #define ExpandManNames YES
  93. #define ExtensionOSDefines -DXTESTEXT1
  94. /* IBM cpp has slightly non-standard line directives, but supports -P */
  95. #define CppNoLineInfoOption -P
  96. #if OSMajorVersion > 3
  97. #define StandardDefines -DSYSV -DAIXV3 -DAIXV4 -D_ALL_SOURCE
  98. #define XawI18nDefines -DHAS_WCHAR_H -DHAS_ISW_FUNCS
  99. #define ServerExtraDefines -D_IBM_LFT
  100. #if ThreadedX
  101. #define CcCmd xlc_r
  102. #else
  103. #define CcCmd xlc
  104. #endif
  105. #define SystemMTDefines /* xlc_r defines -D_THREAD_SAFE */
  106. #define ThreadsLibraries -lpthreads /* xlc_r does -lc_r */
  107. #define ThreadsCplusplusLibraries -lpthreads
  108. #define AvoidNullMakeCommand YES
  109. #define NullMakeCommand @ echo
  110. /* AIX 4 appends all MAKEFLAGS (even dups), so cannot pass on command line. */
  111. #define ConstructMFLAGS NO
  112. #define LdPreLib _Use(-L$(USRLIBDIR),-L$(BUILDLIBDIR))
  113. #define ExtraFilesToClean *.inp
  114. #else /* OSMajorVersion < 4 */
  115. #define StandardDefines -DSYSV -DAIXV3 -D_ALL_SOURCE
  116. #define ServerExtraDefines -D_IBM_HFT
  117. #define CcCmd xlc
  118. #define ThreadPreStdAPIDefines -DXPRE_STANDARD_API
  119. #define SystemMTDefines -D_THREAD_SAFE
  120. #define ThreadsLibraries -lpthreads -lc_r
  121. #endif /* OSMajorVersion */
  122. #define OPERATING_SYSTEM AIX /* directory name under server/ddx/ibm/ */
  123. #define InstallCmd /usr/ucb/install
  124. #include <ibmLib.rules>
  125. #ifndef ManKeywordsTarget
  126. #define ManKeywordsTarget(manpath) @@\
  127. man_keywords:: @@\
  128. /usr/lib/makewhatis $(DESTDIR)manpath
  129. #endif
  130. #define DtMailDefines \
  131. -DI_HAVE_NO_BOOL -DI_HAVE_SELECT_H \
  132. -DBIG_ENDIAN -DSTRCASECMP_NOT_DEFINED -DDO_ANONYMOUS_MAP -DSENDMAIL_LOCKS \
  133. -DMAILGROUP_REQUIRED -DMAIL_SPOOL_PATH=\"/var/spool/mail/%s\"
  134. #define ArchitectureDefines -DIBM_ARCHITECTURE
  135. #define ExportListGenSource elistgen.ibm
  136. #define CdeProjectDefines \
  137. -D_AIX -D__AIX -D__aix -D_aix -Daix -DMULTIBYTE -DNLS16 -DMESSAGE_CAT \
  138. -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion -DAIX
  139. /*
  140. * -D__STR31__ disables inlining of memcpy to work around optimization bug
  141. * in XLC v1.2.0.7. Bug report filed as PMR 8X196, branch 060.
  142. */
  143. #ifndef OptimizedCDebugFlags
  144. #define OptimizedCDebugFlags -O -D__STR31__ -DNDEBUG
  145. #endif
  146. #define CdeTicDefines -DHAS_KNL -DHAS_KTAB