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