OpenBSD.cf: don't include xorg.cf (leftover)
[oweals/cde.git] / cde / config / cf / ibm.cf
1 XCOMM platform:  $TOG: ibm.cf /main/82 1998/02/26 17:03:51 kaleb $
2
3 #ifndef OSName
4 # define OSName         DefaultOSName
5 #endif
6 #ifndef OSMajorVersion
7 # define OSMajorVersion DefaultOSMajorVersion
8 #endif
9 #ifndef OSMinorVersion
10 # define OSMinorVersion DefaultOSMinorVersion
11 #endif
12 #ifndef OSTeenyVersion
13 # ifdef DefaultOSTeenyVersion
14 #  define OSTeenyVersion        DefaultOSTeenyVersion
15 # elif (OSMajorVersion == 4) && (OSMinorVersion == 1)
16 #  define OSTeenyVersion        3
17 # else
18 #  define OSTeenyVersion        0
19 # endif
20 #endif
21 XCOMM operating system:  OSName (OSMajorVersion.OSMinorVersion.OSTeenyVersion)
22
23 #if OSMajorVersion > 3 || (OSMajorVersion == 3 && OSMinorVersion >= 2)
24 #define HasBSD44Sockets         YES
25 #define HasPutenv               YES
26 #define HasPlugin               YES
27 /*
28  * If you do not have threads support installed, put
29  * #define HasPosixThreads      NO
30  * in the BeforeVendorCF section of your site.def.
31  */
32 #if !defined(HasPosixThreads) && ((OSMajorVersion == 3 && (OSMinorVersion > 2 || (OSMinorVersion == 2 && OSTeenyVersion > 4))) || (OSMajorVersion == 4 && (OSMinorVersion > 1 || (OSMinorVersion == 1 && OSTeenyVersion > 1))))
33 #define HasPosixThreads         YES
34 #endif
35 #if HasPosixThreads
36 #ifndef ThreadedX
37 #define ThreadedX               YES
38 #define MTSafeAPIDefines        -DXUSE_MTSAFE_API -DXUSE_NETDB_R_API
39 #endif
40 #endif
41 #endif /* OS > 3.2 */
42
43 /*
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.
48  */
49
50 #if !HasGcc2ForCplusplus
51 # ifndef CplusplusCmd
52 #  if ThreadedX
53 #   define CplusplusCmd         xlC_r
54 #  else
55 #   define CplusplusCmd         xlC
56 #  endif
57 # endif
58 #endif
59
60 #ifndef CplusplusFilt
61 # define CplusplusFilt          /usr/lpp/xlC/bin/c++filt
62 #endif
63 #ifndef CplusplusLibC
64 # if ThreadedX
65 #  define CplusplusLibC         /usr/lpp/xlC/lib/libC.a
66 # else
67 #  define CplusplusLibC         /usr/lpp/xlC/lib/libC_r.a
68 # endif
69 #endif
70 #if !HasGcc2ForCplusplus
71 # ifndef CplusplusDependIncludes
72 #  define CplusplusDependIncludes -I/usr/lpp/xlC/include
73 # endif
74 #endif
75
76 /*
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.
83  */
84
85 .SUFFIXES:
86 .SUFFIXES: .o .c .y .l .s .sh .h .f .Y .L .cxx
87
88 #define NormalLibObjCplusplusCompile(options) test -r $*.C || $(LN) $*.CCsuf $*.C @@\
89         $(CXX) -c $(CXXFLAGS) options $*.C
90
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
95
96
97 #define BuildLibPathVar         LIBPATH
98 #define SystemV                 YES
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
105
106 /* IBM cpp has slightly non-standard line directives, but supports -P */
107 #define CppNoLineInfoOption     -P
108
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
113 #if ThreadedX
114 #define CcCmd                   xlc_r
115 #else
116 #define CcCmd                   xlc
117 #endif
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
130 #define CcCmd                   xlc
131 #define ThreadPreStdAPIDefines  -DXPRE_STANDARD_API
132 #define SystemMTDefines         -D_THREAD_SAFE
133 #define ThreadsLibraries        -lpthreads -lc_r
134 #endif  /* OSMajorVersion */
135
136 #define OPERATING_SYSTEM        AIX /* directory name under server/ddx/ibm/ */
137 #define InstallCmd              /usr/ucb/install
138 #include <ibmLib.rules>
139
140 #ifndef ManKeywordsTarget
141 #define ManKeywordsTarget(manpath)                                      @@\
142 man_keywords::                                                          @@\
143         /usr/lib/makewhatis $(DESTDIR)manpath
144 #endif
145
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\"
150
151 #define ArchitectureDefines     -DIBM_ARCHITECTURE
152
153 #define ExportListGenSource     elistgen.ibm
154
155 #define CdeProjectDefines \
156         -D_AIX -D__AIX -D__aix -D_aix -Daix -DMULTIBYTE -DNLS16 -DMESSAGE_CAT \
157         -DOSMAJORVERSION=OSMajorVersion -DOSMINORVERSION=OSMinorVersion -DAIX
158
159 /*
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.
162  */
163 #ifndef OptimizedCDebugFlags
164 #define OptimizedCDebugFlags    -O -D__STR31__ -DNDEBUG
165 #endif
166
167 #define CdeTicDefines   -DHAS_KNL -DHAS_KTAB