imakemdep.h revision 1114aea8
1/*
2
3Copyright (c) 1993, 1994, 1998  The Open Group
4
5Permission to use, copy, modify, distribute, and sell this software and its
6documentation for any purpose is hereby granted without fee, provided that
7the above copyright notice appear in all copies and that both that
8copyright notice and this permission notice appear in supporting
9documentation.
10
11The above copyright notice and this permission notice shall be included in
12all copies or substantial portions of the Software.
13
14THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
21Except as contained in this notice, the name of The Open Group shall not be
22used in advertising or otherwise to promote the sale, use or other dealings
23in this Software without prior written authorization from The Open Group.
24
25*/
26
27
28/*
29 * This file contains machine-dependent constants for the imake utility.
30 * When porting imake, read each of the steps below and add in any necessary
31 * definitions.  In general you should *not* edit ccimake.c or imake.c!
32 */
33
34#ifdef __UNIXOS2__
35# define lstat stat
36#endif
37
38#ifdef CCIMAKE
39/*
40 * Step 1:  imake_ccflags
41 *     Define any special flags that will be needed to get imake.c to compile.
42 *     These will be passed to the compile along with the contents of the
43 *     make variable BOOTSTRAPCFLAGS.
44 */
45# if defined(clipper) || defined(__clipper__)
46#  define imake_ccflags "-O -DSYSV -DBOOTSTRAPCFLAGS=-DSYSV"
47# endif
48
49# ifdef hpux
50#  ifdef hp9000s800
51#   define imake_ccflags "-DSYSV"
52#  else
53#   define imake_ccflags "-Wc,-Nd4000,-Ns3000 -DSYSV"
54#  endif
55# endif
56
57# if defined(macII) || defined(_AUX_SOURCE)
58#  define imake_ccflags "-DmacII -DSYSV"
59# endif
60
61# ifdef stellar
62#  define imake_ccflags "-DSYSV"
63# endif
64
65/*
66 * SCO UnixWare and OpenServer 6 are both System V Release 5 based OSes.
67 * The native C compiler doesn't assert __UNIXWARE__ but gcc does, so
68 * we don't redefine it if we are using gcc (as it sets it to a specific
69 * value). On OpenServer 6, which is a multi-ABI world, if you attempt
70 * to build with -Kosr, then the C compiler will assert __OPENSERVER__
71 * and set it to the value 507.  That indicates an OSR5 compile, and
72 * is handled below.
73 */
74
75# if defined(__UNIXWARE__) || defined(__USLC__) || defined(Oki) || defined(NCR)
76#  ifdef imake_ccflags
77#   undef imake_ccflags
78#  endif
79#  ifdef __UNIXWARE__
80#   ifndef __GNUC__
81#    define imake_ccflags "-Xa -DSVR4 -DSVR5 -D__UNIXWARE__"
82#   else
83#    define imake_ccflags "-Xa -DSVR4 -DSVR5"
84#   endif
85#  else
86#   define imake_ccflags "-Xa -DSVR4"
87#  endif
88# endif
89
90/* SCO may define __USLC__ so put this after the USL check */
91# if defined(M_UNIX) || defined(_SCO_DS) || defined(__OPENSERVER__)
92#  ifdef imake_ccflags
93#   undef imake_ccflags
94#  endif
95#  define imake_ccflags "-DSYSV -DSCO325 -D__SCO__"
96# endif
97
98# ifdef sony
99#  if defined(SYSTYPE_SYSV) || defined(_SYSTYPE_SYSV)
100#   define imake_ccflags "-DSVR4"
101#  else
102#   include <sys/param.h>
103#   if NEWSOS < 41
104#    define imake_ccflags "-Dbsd43 -DNOSTDHDRS"
105#   else
106#    if NEWSOS < 42
107#     define imake_ccflags "-Dbsd43"
108#    endif
109#   endif
110#  endif
111# endif
112# ifdef _CRAY
113#  define imake_ccflags "-DSYSV -DUSG"
114# endif
115
116# if defined(_IBMR2) || defined(aix)
117#  define imake_ccflags "-Daix -DSYSV"
118# endif
119
120# ifdef Mips
121#  if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
122#   define imake_ccflags "-DBSD43"
123#  else
124#   define imake_ccflags "-DSYSV"
125#  endif
126# endif
127
128# ifdef is68k
129#  define imake_ccflags "-Dluna -Duniosb"
130# endif
131
132# ifdef SYSV386
133#  ifdef SVR4
134#   define imake_ccflags "-Xa -DSVR4"
135#  else
136#   define imake_ccflags "-DSYSV"
137#  endif
138# endif
139
140# ifdef SVR4
141#  ifdef i386
142#   define imake_ccflags "-Xa -DSVR4"
143#  endif
144# endif
145
146# ifdef SYSV
147#  ifdef i386
148#   define imake_ccflags "-DSYSV"
149#  endif
150# endif
151
152# if defined(Lynx) || defined(__Lynx__)
153#  define imake_ccflags "-DLynx"
154# endif /* Lynx */
155
156# ifdef __convex__
157#  define imake_ccflags "-fn -tm c1"
158# endif
159
160# ifdef apollo
161#  define imake_ccflags "-DX_NOT_POSIX"
162# endif
163
164# ifdef WIN32
165#  ifdef __GNUC__
166#   define imake_ccflags "-D__STDC__"
167#  else
168#   if _MSC_VER < 1000
169#    define imake_ccflags "-nologo -batch -D__STDC__"
170#   else
171#    define imake_ccflags "-nologo -D__STDC__"
172#   endif
173#  endif
174# endif
175
176# ifdef __uxp__
177#  define imake_ccflags "-DSVR4 -DANSICPP"
178# endif
179
180# ifdef __sxg__
181#  define imake_ccflags "-DSYSV -DUSG -DNOSTDHDRS"
182# endif
183
184# ifdef _SEQUENT_
185#  define imake_ccflags "-Xa -DSVR4"
186# endif
187
188# if defined(SX) || defined(PC_UX)
189#  define imake_ccflags "-DSYSV"
190# endif
191
192# ifdef nec_ews_svr2
193#  define imake_ccflags "-DUSG"
194# endif
195
196# if defined(nec_ews_svr4) || defined(_nec_ews_svr4) || defined(_nec_up) || defined(_nec_ft)
197#  define imake_ccflags "-DSVR4"
198# endif
199
200# if defined(MACH) && !defined(__GNU__)
201#  define imake_ccflags "-DNOSTDHDRS"
202# endif
203
204/* this is for OS/2 under UNIXOS2. This won't work with DOS */
205# if defined(__UNIXOS2__)
206#  define imake_ccflags "-DBSD43"
207# endif
208
209# if defined(__QNX__) && !defined(__QNXNTO__)
210#  define imake_ccflags "-D__QNX__ -D_i386"
211# endif
212
213# if defined(__QNXNTO__)
214#  define imake_ccflags "-D__QNXNTO__"
215# endif
216
217#else /* not CCIMAKE */
218# ifndef MAKEDEPEND
219/*
220 * Step 2:  dup2
221 *     If your OS doesn't have a dup2() system call to duplicate one file
222 *     descriptor onto another, define such a mechanism here (if you don't
223 *     already fall under the existing category(ies).
224 */
225#  if defined(SYSV) && !defined(_CRAY) && !defined(Mips) && !defined(_SEQUENT_) && !defined(__SCO__)
226#   define	dup2(fd1,fd2)	((fd1 == fd2) ? fd1 : (close(fd2), \
227					       fcntl(fd1, F_DUPFD, fd2)))
228#  endif
229
230
231/*
232 * Step 3:  FIXUP_CPP_WHITESPACE
233 *     If your cpp collapses tabs in macro expansions into a single space and
234 *     replaces escaped newlines with a space, define this symbol.  This will
235 *     cause imake to attempt to patch up the generated Makefile by looking
236 *     for lines that have colons in them (this is why the rules file escapes
237 *     all colons).  One way to tell if you need this is to see whether or not
238 *     your Makefiles have no tabs in them and lots of @@ strings.
239 */
240#  if defined(sun) || defined(SYSV) || defined(SVR4) || defined(hcx) || defined(WIN32) || defined(__SCO__) || (defined(AMOEBA) && defined(CROSS_COMPILE)) || defined(__QNX__) || defined(__sgi) || defined(__UNIXOS2__) || defined(__UNIXWARE__)
241#   define FIXUP_CPP_WHITESPACE
242#  endif
243#  ifdef WIN32
244#   define REMOVE_CPP_LEADSPACE
245#   define INLINE_SYNTAX
246#   define MAGIC_MAKE_VARS
247#  endif
248#  ifdef __minix_vmd
249#   define FIXUP_CPP_WHITESPACE
250#  endif
251
252#  if defined(Lynx)
253/* On LynxOS 2.4.0 imake gets built with the old "legacy"
254 * /bin/cc which has a rather pedantic builtin preprocessor.
255 * Using a macro which is not #defined (as in Step 5
256 * below) flags an *error*
257 */
258#   define __NetBSD_Version__ 0
259#  endif
260
261/*
262 * Step 4:  USE_CC_E, DEFAULT_CC, DEFAULT_CPP
263 *     If you want to use cc -E instead of cpp, define USE_CC_E.
264 *     If use cc -E but want a different compiler, define DEFAULT_CC.
265 *     If the cpp you need is not in /lib/cpp, define DEFAULT_CPP.
266 */
267#  if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
268
269#   if defined(__APPLE__)
270#    define DEFAULT_CPP "/usr/bin/cpp"
271#    define DEFAULT_CC "cc"
272#   endif
273#   if defined(Lynx) || defined(__Lynx__)
274#    define DEFAULT_CC "gcc"
275#    define USE_CC_E
276#   endif
277#   ifdef hpux
278#    define USE_CC_E
279#   endif
280#   ifdef WIN32
281#    define USE_CC_E
282#    ifdef __GNUC__
283#     define DEFAULT_CC "gcc"
284#    else
285#     define DEFAULT_CC "cl"
286#    endif
287#   endif
288#   ifdef apollo
289#    define DEFAULT_CPP "/usr/lib/cpp"
290#   endif
291#   if defined(clipper) || defined(__clipper__)
292#    define DEFAULT_CPP "/usr/lib/cpp"
293#   endif
294#   if defined(_IBMR2) && !defined(DEFAULT_CPP)
295#    define DEFAULT_CPP "/usr/ccs/lib/cpp"
296#   endif
297#   if defined(sun) && (defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__))
298#    define DEFAULT_CPP "/usr/ccs/lib/cpp"
299#   endif
300#   ifdef __bsdi__
301#    define DEFAULT_CPP "/usr/bin/cpp"
302#   endif
303#   ifdef __uxp__
304#    define DEFAULT_CPP "/usr/ccs/lib/cpp"
305#   endif
306#   ifdef __sxg__
307#    define DEFAULT_CPP "/usr/lib/cpp"
308#   endif
309#   ifdef _CRAY
310#    define DEFAULT_CPP "/lib/pcpp"
311#   endif
312#   if defined(__386BSD__)
313#    define DEFAULT_CPP "/usr/libexec/cpp"
314#   endif
315#   if defined(__FreeBSD__)  || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
316#    define USE_CC_E
317#   endif
318#   if defined(__sgi) && defined(__ANSI_CPP__)
319#    define USE_CC_E
320#   endif
321#   if defined(MACH) && !defined(__GNU__)
322#    define USE_CC_E
323#   endif
324#   ifdef __minix_vmd
325#    define DEFAULT_CPP "/usr/lib/cpp"
326#   endif
327#   if defined(__UNIXOS2__)
328/* expects cpp in PATH */
329#    define DEFAULT_CPP "cpp"
330#   endif
331#   ifdef __CYGWIN__
332#    define DEFAULT_CC "gcc"
333#    define DEFAULT_CPP "/usr/bin/cpp"
334#   endif
335#   if defined (__QNX__)
336#    ifdef __QNXNTO__
337#     define DEFAULT_CPP "/usr/bin/cpp"
338#    else
339#     define DEFAULT_CPP "/usr/X11R6/bin/cpp"
340#    endif
341#   endif
342#   if defined(__GNUC__) && !defined(USE_CC_E)
343#    define USE_CC_E
344#    ifndef DEFAULT_CC
345#     define DEFAULT_CC "gcc"
346#    endif
347#   endif
348
349#  endif /* !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP) */
350/*
351 * Step 5:  cpp_argv
352 *     The following table contains the flags that should be passed
353 *     whenever a Makefile is being generated.  If your preprocessor
354 *     doesn't predefine any unique symbols, choose one and add it to the
355 *     end of this table.  Then, do the following:
356 *
357 *         a.  Use this symbol in Imake.cf when setting MacroFile.
358 *         b.  Put this symbol in the definition of BootstrapCFlags in your
359 *             <platform>.cf file.
360 *         c.  When doing a make World, always add "BOOTSTRAPCFLAGS=-Dsymbol"
361 *             to the end of the command line.
362 *
363 *     Note that you may define more than one symbol (useful for platforms
364 *     that support multiple operating systems).
365 */
366
367#  define	ARGUMENTS 50	/* number of arguments in various arrays */
368#  if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
369const char *cpp_argv[ARGUMENTS] = {
370	"cc",		/* replaced by the actual program to exec */
371	"-I.",		/* add current directory to include path */
372#   if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 103080000
373#    ifdef unix
374	"-Uunix",	/* remove unix symbol so that filename unix.c okay */
375#    endif
376#   endif
377#   if defined(__386BSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || \
378    defined(__FreeBSD__) || defined(__DragonFly__) || defined(MACH) || \
379    defined(linux) || defined(__GNU__) || defined(__bsdi__) || \
380    defined(__GNUC__) || defined(__GLIBC__)
381#    ifdef __i386__
382	"-D__i386__",
383#     if defined(__GNUC__) && (__GNUC__ >= 3)
384	"-m32",
385#     endif
386#    endif
387#    ifdef __i486__
388	"-D__i486__",
389#    endif
390#    ifdef __i586__
391	"-D__i586__",
392#    endif
393#    ifdef __i686__
394	"-D__i686__",
395#    endif
396#    ifdef __k6__
397	"-D__k6__",
398#    endif
399#    ifdef __ia64__
400	"-D__ia64__",
401#    endif
402#    ifdef __amd64__
403	"-D__amd64__",
404#    endif
405#    ifdef __x86_64__
406	"-D__amd64__",
407#    endif
408#    ifdef __s390__
409	"-D__s390__",
410#    endif
411#    ifdef __alpha__
412	"-D__alpha__",
413#    endif
414#    ifdef __arm__
415	"-D__arm__",
416#    endif
417#    ifdef __s390x__
418       "-D__s390x__",
419#    endif
420#    ifdef __sparc__
421	"-D__sparc__",
422#    endif
423#    ifdef __m68k__
424	"-D__m68k__",
425#    endif
426#    ifdef __hppa__
427	"-D__hppa__",
428#    endif
429#    ifdef __sh__
430	"-D__sh__",
431#    endif
432#    ifdef __sh3__
433	"-D__sh3__",
434#    endif
435#    ifdef __SH3__
436	"-D__SH3__",
437#    endif
438#    ifdef __SH4__
439	"-D__SH4__",
440#    endif
441#    ifdef __SH4NOFPU__
442	"-D__SH4_NOFPU__",
443#    endif
444#    ifdef __GNUC__
445	"-traditional",
446#    endif
447#   endif
448#   ifdef M4330
449	"-DM4330",	/* Tektronix */
450#   endif
451#   ifdef M4310
452	"-DM4310",	/* Tektronix */
453#   endif
454#   if defined(macII) || defined(_AUX_SOURCE)
455	"-DmacII",	/* Apple A/UX */
456#   endif
457#   if defined(USL) || defined(__UNIXWARE__) || \
458	(defined(__USLC__) && !defined(_SCO_DS))
459	"-D__UNIXWARE__",	/* SCO UnixWare 7 */
460#   endif
461#   ifdef sony
462	"-Dsony",	/* Sony */
463#    if !defined(SYSTYPE_SYSV) && !defined(_SYSTYPE_SYSV) && NEWSOS < 42
464	"-Dbsd43",
465#    endif
466#   endif
467#   ifdef _IBMR2
468	"-D_IBMR2",	/* IBM RS-6000 (we ensured that aix is defined above */
469#    ifndef aix
470#     define aix		/* allow BOOTSTRAPCFLAGS="-D_IBMR2" */
471#    endif
472#   endif /* _IBMR2 */
473#   ifdef aix
474	"-Daix",	/* AIX instead of AOS */
475#    ifndef ibm
476#     define ibm		/* allow BOOTSTRAPCFLAGS="-Daix" */
477#    endif
478#   endif /* aix */
479#   ifdef ibm
480	"-Dibm",	/* IBM PS/2 and RT under both AOS and AIX */
481#   endif
482#   ifdef luna
483	"-Dluna",	/* OMRON luna 68K and 88K */
484#    ifdef luna1
485	"-Dluna1",
486#    endif
487#    ifdef luna88k		/* need not on UniOS-Mach Vers. 1.13 */
488	"-traditional", /* for some older version            */
489#    endif			/* instead of "-DXCOMM=\\#"          */
490#    ifdef uniosb
491	"-Duniosb",
492#    endif
493#    ifdef uniosu
494	"-Duniosu",
495#    endif
496#   endif /* luna */
497#   ifdef _CRAY		/* Cray */
498	"-Ucray",
499#   endif
500#   ifdef Mips
501	"-DMips",	/* Define and use Mips for Mips Co. OS/mach. */
502#    if defined(SYSTYPE_BSD) || defined(BSD) || defined(BSD43)
503	"-DBSD43",	/* Mips RISCOS supports two environments */
504#    else
505	"-DSYSV",	/* System V environment is the default */
506#    endif
507#   endif /* Mips */
508#   ifdef MOTOROLA
509	"-DMOTOROLA",    /* Motorola Delta Systems */
510#    ifdef SYSV
511	"-DSYSV",
512#    endif
513#    ifdef SVR4
514	"-DSVR4",
515#    endif
516#   endif /* MOTOROLA */
517#   if defined(M_UNIX) || defined(sco) || defined(__SCO__) || \
518	defined(_SCO_DS) || defined(__OPENSERVER__)
519	"-D__SCO__",
520	"-DSYSV",
521#   endif
522#   ifdef i386
523	"-Di386",
524#    ifdef SVR4
525	"-DSVR4",
526#    endif
527#    ifdef SYSV
528	"-DSYSV",
529#     ifdef ISC
530	"-DISC",
531#      ifdef ISC40
532	"-DISC40",       /* ISC 4.0 */
533#      else
534#       ifdef ISC202
535	"-DISC202",      /* ISC 2.0.2 */
536#       else
537#        ifdef ISC30
538	"-DISC30",       /* ISC 3.0 */
539#        else
540	"-DISC22",       /* ISC 2.2.1 */
541#        endif
542#       endif
543#      endif
544#     endif
545#     if (_SCO_DS - 0 == 1)
546    "-DSCO325",
547#     endif
548#     if (_SCO_DS - 0 > 1)
549    "-DSCO5V6",
550#     endif
551#    endif
552#    ifdef ESIX
553	"-DESIX",
554#    endif
555#    ifdef ATT
556	"-DATT",
557#    endif
558#    ifdef DELL
559	"-DDELL",
560#    endif
561#   endif
562#   ifdef SYSV386           /* System V/386 folks, obsolete */
563	"-Di386",
564#    ifdef SVR4
565	"-DSVR4",
566#    endif
567#    ifdef ISC
568	"-DISC",
569#     ifdef ISC40
570	"-DISC40",       /* ISC 4.0 */
571#     else
572#      ifdef ISC202
573	"-DISC202",      /* ISC 2.0.2 */
574#      else
575#       ifdef ISC30
576	"-DISC30",       /* ISC 3.0 */
577#       else
578	"-DISC22",       /* ISC 2.2.1 */
579#       endif
580#      endif
581#     endif
582#    endif
583#    if (_SCO_DS - 0 == 1)
584	"-DSCO325",
585#    endif
586#    if (_SCO_DS - 0 > 1)
587    "-DSCO5V6",
588#    endif
589#    ifdef ESIX
590	"-DESIX",
591#    endif
592#    ifdef ATT
593	"-DATT",
594#    endif
595#    ifdef DELL
596	"-DDELL",
597#    endif
598#   endif
599#   ifdef __osf__
600	"-D__osf__",
601#    ifdef __mips__
602	"-D__mips__",
603#    endif
604#    ifdef __alpha
605	"-D__alpha",
606#    endif
607#    ifdef __amiga__
608	"-D__amiga__",
609#    endif
610#    ifdef __alpha__
611	"-D__alpha__",
612#    endif
613#    ifdef __i386__
614	"-D__i386__",
615#    endif
616#    ifdef __GNUC__
617	"-traditional",
618#    endif
619#   endif
620#   ifdef Oki
621	"-DOki",
622#   endif
623#   ifdef sun
624#    if defined(SVR4) || defined(__svr4__) || defined(__SVR4) || defined(__sol__)
625	"-DSVR4",
626#    endif
627#    ifdef __sparcv9
628	"-D__sparcv9",
629#    endif
630#    ifdef __amd64
631	"-D__amd64",
632#    endif
633#   endif
634#   ifdef WIN32
635	"-DWIN32",
636#    ifndef __GNUC__
637	"-nologo",
638#     if _MSC_VER < 1000
639	"-batch",
640#     endif
641#    endif
642	"-D__STDC__",
643#   endif
644#   ifdef NCR
645	"-DNCR",	/* NCR */
646#   endif
647#   ifdef linux
648        "-Dlinux",
649#   endif
650#   if defined(__CYGWIN__)
651        "-traditional",
652#   endif
653#   if defined(Lynx) || defined(__Lynx__)
654        "-traditional",
655#    if 0
656        "-DLYNX",		/* do we really need this?? */
657#    endif
658	"-DLynx",
659#    ifdef ppc
660	"-Dppc",
661#    endif
662#    ifdef ppc64
663	"-Dppc64",
664#    endif
665#    if defined(m68k)  || defined(M68k) || defined(m68040)
666	"-Dm68k",
667	"-DM68k",
668#    endif
669#    ifdef uSPARC1
670	"-Dsparc",
671#    endif
672#   endif
673#   ifdef __uxp__
674	"-D__uxp__",
675#   endif
676#   ifdef __sxg__
677	"-D__sxg__",
678#   endif
679#   ifdef nec_ews_svr2
680	"-Dnec_ews_svr2",
681#   endif
682#   ifdef AMOEBA
683	"-DAMOEBA",
684#    ifdef CROSS_COMPILE
685	"-DCROSS_COMPILE",
686#     ifdef CROSS_i80386
687	"-Di80386",
688#     endif
689#     ifdef CROSS_sparc
690	"-Dsparc",
691#     endif
692#     ifdef CROSS_mc68000
693	"-Dmc68000",
694#     endif
695#    else
696#     ifdef i80386
697	"-Di80386",
698#     endif
699#     ifdef sparc
700	"-Dsparc",
701#     endif
702#     ifdef mc68000
703	"-Dmc68000",
704#     endif
705#    endif
706#   endif
707#   if defined(__sgi) && defined(__ANSI_CPP__)
708	"-cckr",
709#   endif
710#   ifdef __minix_vmd
711	"-Dminix",
712#   endif
713
714#   if defined(__UNIXOS2__)
715	"-traditional",
716	"-Demxos2",
717#   endif
718#   ifdef MetroLink
719	"-DMetroLink",
720#    ifdef SVR4
721	"-DSVR4",
722#    endif
723#   endif
724#   ifdef __powerpc__
725	"-D__powerpc__",
726#   endif
727#   ifdef __powerpc64__
728	"-D__powerpc64__",
729#   endif
730#   ifdef PowerMAX_OS
731	"-DPowerMAX_OS",
732#   endif
733#   if defined (__QNX__) && !defined(__QNXNTO__)
734        "-traditional",
735        "-D__QNX__",
736#   endif
737
738#   if defined(__QNXNTO__)
739        "-traditional",
740        "-D__QNXNTO__",
741#    if defined(i386)
742        "-Di386",
743#    endif
744#    if defined(__i386__)
745        "-D__i386__",
746#    endif
747#    if defined(PPC)
748        "-DPPC",
749#    endif
750#    if defined(MIPS)
751        "-DMIPS",
752#    endif
753#   endif
754
755#   if defined(__APPLE__)
756        "-D__APPLE__",
757        "-D__DARWIN__",
758#    ifdef __ppc__
759        "-D__ppc__",
760#    endif
761#    ifdef __ppc64__
762        "-D__ppc64__",
763#    endif
764#    ifdef __i386__
765        "-D__i386__",
766#    endif
767#   endif
768};
769#  endif /* CROSSCOMPILE */
770
771
772/*
773 * Step 6: DEFAULT_OS_MAJOR_REV, DEFAULT_OS_MINOR_REV, DEFAULT_OS_TEENY_REV,
774 *	and DEFAULT_OS_NAME.
775 *	If your system provides a way to generate the default major,
776 *	minor, teeny, or system names at runtime add commands below.
777 *	The syntax of the _REV strings is 'f fmt' where 'f' is an argument
778 *	you would give to uname, and "fmt" is a scanf() format string.
779 *	Supported uname arguments are "snrvm", and if you specify multiple
780 *	arguments they will be separated by spaces.  No more than 5 arguments
781 *	may be given.  Unlike uname() order of arguments matters.
782 *
783 *	DEFAULT_OS_MAJOR_REV_FROB, DEFAULT_OS_MINOR_REV_FROB,
784 *	DEFAULT_OS_TEENY_REV_FROB, and DEFAULT_OS_NAME_FROB can be used to
785 *	modify the results of the use of the various strings.
786 */
787#  if !defined CROSSCOMPILE || defined CROSSCOMPILE_CPP
788#   if defined(aix)
789/* uname -v returns "x" (e.g. "4"), and uname -r returns "y" (e.g. "1") */
790#    define DEFAULT_OS_MAJOR_REV	"v %[0-9]"
791#    define DEFAULT_OS_MINOR_REV	"r %[0-9]"
792/* No information available to generate default OSTeenyVersion value. */
793#    define DEFAULT_OS_NAME	"srvm %[^\n]"
794#   elif defined(sun) || defined(sgi) || defined(ultrix) || defined(__uxp__) || defined(sony)
795/* uname -r returns "x.y[.z]", e.g. "5.4" or "4.1.3" */
796#    define DEFAULT_OS_MAJOR_REV	"r %[0-9]"
797#    define DEFAULT_OS_MINOR_REV	"r %*d.%[0-9]"
798#    define DEFAULT_OS_TEENY_REV	"r %*d.%*d.%[0-9]"
799#    define DEFAULT_OS_NAME	"srvm %[^\n]"
800#   elif defined(hpux)
801/* uname -r returns "W.x.yz", e.g. "B.10.01" */
802#    define DEFAULT_OS_MAJOR_REV	"r %*[^.].%[0-9]"
803#    define DEFAULT_OS_MINOR_REV	"r %*[^.].%*d.%1s"
804#    define DEFAULT_OS_TEENY_REV	"r %*[^.].%*d.%*c%[0-9]"
805#    define DEFAULT_OS_NAME	"srvm %[^\n]"
806#   elif defined(USL) || defined(__USLC__) || defined(__UNIXWARE__) || \
807	defined(__SCO__) || defined(__OPENSERVER__) || defined(_SCO_DS)
808/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
809#    define DEFAULT_OS_MAJOR_REV	"v %[0-9]"
810#    define DEFAULT_OS_MINOR_REV	"v %*d.%1s"
811#    define DEFAULT_OS_TEENY_REV	"v %*d.%*c%[.0-9]"
812#    define DEFAULT_OS_NAME	"srvm %[^\n]"
813#   elif defined(__APPLE__)
814/* uname -v returns "x.yz" or "x.y.z", e.g. "2.02" or "2.1.2". */
815#    define DEFAULT_OS_MAJOR_REV	"r %[0-9]"
816#    define DEFAULT_OS_MINOR_REV	"r %*d.%[0-9]"
817#    define DEFAULT_OS_TEENY_REV	"r %*d.%*d.%[0-9]" /* this will just get 0 */
818#    define DEFAULT_OS_NAME	"s %[^\n]"
819#   elif defined(__osf__)
820/* uname -r returns "Wx.y", e.g. "V3.2" or "T4.0" */
821#    define DEFAULT_OS_MAJOR_REV	"r %*[^0-9]%[0-9]"
822#    define DEFAULT_OS_MINOR_REV	"r %*[^.].%[0-9]"
823#    define DEFAULT_OS_NAME	"srvm %[^\n]"
824#   elif defined(__uxp__)
825/* NOTE: "x.y[.z]" above handles UXP/DF.  This is a sample alternative. */
826/* uname -v returns "VxLy Yzzzzz ....", e.g. "V20L10 Y95021 Increment 5 ..." */
827#    define DEFAULT_OS_MAJOR_REV	"v V%[0-9]"
828#    define DEFAULT_OS_MINOR_REV	"v V%*dL%[0-9]"
829#    define DEFAULT_OS_NAME	"srvm %[^\n]"
830#   elif defined(linux) || defined(__bsdi__)
831#    define DEFAULT_OS_MAJOR_REV	"r %[0-9]"
832#    define DEFAULT_OS_MINOR_REV	"r %*d.%[0-9]"
833#    define DEFAULT_OS_TEENY_REV	"r %*d.%*d.%[0-9]"
834#    define DEFAULT_OS_NAME	"srm %[^\n]"
835#    if defined(linux) && defined  (CROSSCOMPILE_CPP)
836#     define CROSS_UTS_SYSNAME "Linux"
837#     include <linux/version.h>
838#     define CROSS_UTS_RELEASE UTS_RELEASE
839#    endif
840#   elif defined(__CYGWIN__)
841#    define DEFAULT_OS_MAJOR_REV	"r %[0-9]"
842#    define DEFAULT_OS_MINOR_REV	"r %*d.%[0-9]"
843#    define DEFAULT_OS_TEENY_REV	"r %*d.%*d.%[0-9]"
844#    define DEFAULT_OS_NAME	"srm %[^\n]"
845#    if defined(__CYGWIN__) && defined  (CROSSCOMPILE_CPP)
846#     define CROSS_UTS_SYSNAME "Cygwin"
847#     include <cygwin/version.h>
848#     define CROSS_UTS_RELEASE "1.3.12"
849#    endif
850#   elif defined(__GNU__)
851#    define DEFAULT_OS_MAJOR_REV	"r %[0-9]"
852#    define DEFAULT_OS_MINOR_REV	"r %*d.%[0-9]"
853#    define DEFAULT_OS_NAME	"srm %[^\n]"
854#   elif defined(ISC)
855/* ISC all Versions ? */
856/* uname -r returns "x.y", e.g. "3.2" ,uname -v returns "x" e.g. "2" */
857#    define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
858#    define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
859#    define DEFAULT_OS_TEENY_REV   "v %[0-9]"
860/* # define DEFAULT_OS_NAME        "srm %[^\n]" */ /* Not useful on ISC */
861#   elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__)
862/* BSD/OS too? */
863/* uname -r returns "x.y[.z]-mumble", e.g. "2.1.5-RELEASE" or "2.2-0801SNAP" */
864#    define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
865#    define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
866#    define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]"
867#    define DEFAULT_OS_NAME        "srm %[^\n]"
868#    if defined(__FreeBSD__) || defined(__DragonFly__)
869/* Use an alternate way to find the teeny version for -STABLE, -SNAP versions */
870#     ifndef CROSSCOMPILE_CPP
871#      define DEFAULT_OS_TEENY_REV_FROB(buf, size)			\
872      do {								\
873	if (*buf == 0) {						\
874		int __mib[2];						\
875		size_t __len;						\
876		int __osrel;						\
877									\
878		__mib[0] = CTL_KERN;					\
879		__mib[1] = KERN_OSRELDATE;				\
880		__len = sizeof(__osrel);				\
881		sysctl(__mib, 2, &__osrel, &__len, NULL, 0);		\
882		if (__osrel < 210000) {					\
883			if (__osrel < 199607)				\
884				buf[0] = '0';				\
885			else if (__osrel < 199612)			\
886				buf[0] = '5';				\
887			else if (__osrel == 199612)			\
888				buf[0] = '6';				\
889			else						\
890				buf[0] = '8'; /* guess */		\
891		} else {						\
892			buf[0] = ((__osrel / 1000) % 10) + '0';		\
893		}							\
894		buf[1] = 0;						\
895	}								\
896     } while (0)
897#     endif
898#    else
899   /* OpenBSD - Add DEFAULT_MACHINE_ARCHITECTURE */
900#     define DEFAULT_MACHINE_ARCHITECTURE "m %[^\n]"
901#    endif
902#   elif defined(__NetBSD__)
903/*
904 * uname -r returns "x.y([ABCD...]|_mumble)", e.g.:
905 *	1.2	1.2_BETA	1.2A	1.2B
906 *
907 * That means that we have to do something special to turn the
908 * TEENY revision into a form that we can use (i.e., a string of
909 * decimal digits).
910 *
911 * We also frob the name DEFAULT_OS_NAME so that it looks like the
912 * 'standard' NetBSD name for the version, e.g. "NetBSD/i386 1.2B" for
913 * NetBSD 1.2B on an i386.
914 */
915#    define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
916#    define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
917#    define DEFAULT_OS_TEENY_REV   "r %*d.%*d%[A-Z]"
918#    define DEFAULT_OS_TEENY_REV_FROB(buf, size)				\
919    do {								\
920	int	teeny = 0;						\
921	char	*ptr = (buf);						\
922									\
923	while (*ptr >= 'A' && *ptr <= 'Z') /* sanity check */		\
924	    teeny = teeny * 26 + (int)(*ptr++ - 'A');			\
925									\
926	snprintf((buf), (size), "%d", teeny + 1);			\
927    } while (0)
928#    define DEFAULT_OS_NAME        "smr %[^\n]"
929#    define DEFAULT_OS_NAME_FROB(buf, size)				\
930    do {								\
931	char *__sp;							\
932	if ((__sp = strchr((buf), ' ')) != NULL)			\
933		*__sp = '/';						\
934    } while (0)
935#   elif defined(__Lynx__) || defined(Lynx)
936/* Lynx 2.4.0 /bin/cc doesn't like #elif */
937#    define DEFAULT_OS_MAJOR_REV   "r %[0-9]"
938#    define DEFAULT_OS_MINOR_REV   "r %*d.%[0-9]"
939#    define DEFAULT_OS_TEENY_REV   "r %*d.%*d.%[0-9]"
940#    define DEFAULT_OS_NAME        "srm %[^\n]"
941#   elif defined(_SEQUENT_)
942/* uname -v returns 'Vx.y.z', e.g. 'V4.4.2' */
943#    define DEFAULT_OS_MAJOR_REV	"v V%[0-9]"
944#    define DEFAULT_OS_MINOR_REV	"v V%*d.%[0-9]"
945#    define DEFAULT_OS_TEENY_REV	"v V%*d.%*d.%[0-9]"
946#    define DEFAULT_OS_NAME	"s %[^\n]"
947#   endif
948#  endif /* !defined CROSSCOMPILE || defined CROSSCOMPILE_CPP */
949
950#  if defined (CROSSCOMPILE_CPP)
951#   ifndef CROSS_UTS_SYSNAME
952char *cross_uts_sysname = "";
953#   else
954char *cross_uts_sysname = CROSS_UTS_SYSNAME;
955#   endif
956#   ifndef CROSS_UTS_RELEASE
957char* cross_uts_release = "";
958#   else
959char* cross_uts_release = CROSS_UTS_RELEASE;
960#   endif
961#   ifndef CROSS_UTS_MACHINE
962char *cross_uts_machine = "";
963#   else
964char *cross_uts_machine = CROSS_UTS_MACHINE;
965#   endif
966#   ifndef CROSS_UTS_VERSION
967char * cross_uts_version = "";
968#   else
969char * cross_uts_version = CROSS_UTS_VERSION;
970#   endif
971#   ifdef DEFAULT_OS_NAME
972char *defaultOsName = DEFAULT_OS_NAME;
973#   else
974char *defaultOsName = NULL;
975#   endif
976#   ifdef DEFAULT_OS_MAJOR_REV
977char *defaultOsMajorRev = DEFAULT_OS_MAJOR_REV;
978#   else
979char *defaultOsMajorRev = NULL;
980#   endif
981#   ifdef DEFAULT_OS_MINOR_REV
982char *defaultOsMinorRev = DEFAULT_OS_MINOR_REV;
983#   else
984char *defaultOsMinorRev = NULL;
985#   endif
986#   ifdef DEFAULT_OS_TEENY_REV
987char *defaultOsTeenyRev = DEFAULT_OS_TEENY_REV;
988#   else
989char *defaultOsTeenyRev = NULL;
990#   endif
991#   ifdef DEFAULT_MACHINE_ARCHITECTURE
992char *defaultMachineArchitecture = DEFAULT_MACHINE_ARCHITECTURE;
993#   else
994char *defaultMachineArchitecture = NULL;
995#   endif
996#   ifdef DEFAULT_OS_NAME_FROB
997void defaultOsNameFrob(char *buf, int size)
998{DEFAULT_OS_NAME_FROB(buf,size)}
999#   else
1000void (*defaultOsNameFrob)(char *buf, int size) = NULL;
1001#   endif
1002#   ifdef DEFAULT_OS_MAJOR_REV_FROB
1003void defaultOsMajorRevFrob(char *buf, int size)
1004{DEFAULT_OS_MAJOR_REV_FROB(buf,size)}
1005#   else
1006void (*defaultOsMajorRevFrob)(char *buf, int size) = NULL;
1007#   endif
1008#   ifdef DEFAULT_OS_MINOR_REV_FROB
1009void defaultOsMinorRevFrob(char *buf, int size)
1010{DEFAULT_OS_MINOR_REV_FROB(buf,size)}
1011#   else
1012void (*defaultOsMinorRevFrob)(char *buf, int size) = NULL;
1013#   endif
1014#   ifdef DEFAULT_OS_TEENY_REV_FROB
1015void defaultOsTeenyRevFrob(char *buf, int size)
1016{DEFAULT_OS_TEENY_REV_FROB(buf,size)}
1017#   else
1018void (*defaultOsTeenyRevFrob)(char *buf, int size) = NULL;
1019#   endif
1020#  endif /* CROSSCOMPILE_CPP */
1021
1022# else /* else MAKEDEPEND */
1023#  if !defined (CROSSCOMPILE) || defined (CROSSCOMPILE_CPP)
1024/*
1025 * Step 7:  predefs
1026 *     If your compiler and/or preprocessor define any specific symbols, add
1027 *     them to the the following table.  The definition of struct symtab is
1028 *     in util/makedepend/def.h.
1029 */
1030#   undef DEF_EVALUATE
1031#   undef DEF_STRINGIFY
1032#   define DEF_EVALUATE(__x) #__x
1033#   define DEF_STRINGIFY(_x) DEF_EVALUATE(_x)
1034struct symtab	predefs[] = {
1035#   ifdef apollo
1036	{"apollo", "1"},
1037#   endif
1038#   if defined(clipper) || defined(__clipper__)
1039	{"clipper", "1"},
1040	{"__clipper__", "1"},
1041	{"clix", "1"},
1042	{"__clix__", "1"},
1043#   endif
1044#   ifdef ibm032
1045	{"ibm032", "1"},
1046#   endif
1047#   ifdef ibm
1048	{"ibm", "1"},
1049#   endif
1050#   ifdef aix
1051	{"aix", "1"},
1052#   endif
1053#   ifdef sun
1054	{"sun", "1"},
1055#   endif
1056#   ifdef sun2
1057	{"sun2", "1"},
1058#   endif
1059#   ifdef sun3
1060	{"sun3", "1"},
1061#   endif
1062#   ifdef sun4
1063	{"sun4", "1"},
1064#   endif
1065#   ifdef sparc
1066	{"sparc", "1"},
1067#   endif
1068#   ifdef __sparc
1069	{"__sparc", "1"},
1070#   endif
1071#   ifdef __sparcv9
1072	{"__sparcv9", "1"},
1073#   endif
1074#   ifdef __sparc__
1075	{"__sparc__", "1"},
1076#   endif
1077#   ifdef __sparcv9__
1078	{"__sparcv9__", "1"},
1079#   endif
1080#   ifdef hpux
1081	{"hpux", "1"},
1082#   endif
1083#   ifdef __hpux
1084	{"__hpux", "1"},
1085#   endif
1086#   ifdef __hp9000s800
1087	{"__hp9000s800", "1"},
1088#   endif
1089#   ifdef __hp9000s700
1090	{"__hp9000s700", "1"},
1091#   endif
1092#   ifdef vax
1093	{"vax", "1"},
1094#   endif
1095#   ifdef VMS
1096	{"VMS", "1"},
1097#   endif
1098#   ifdef cray
1099	{"cray", "1"},
1100#   endif
1101#   ifdef CRAY
1102	{"CRAY", "1"},
1103#   endif
1104#   ifdef _CRAY
1105	{"_CRAY", "1"},
1106#   endif
1107#   ifdef att
1108	{"att", "1"},
1109#   endif
1110#   ifdef mips
1111	{"mips", "1"},
1112#   endif
1113#   ifdef __mips__
1114	{"__mips__", "1"},
1115#   endif
1116#   ifdef ultrix
1117	{"ultrix", "1"},
1118#   endif
1119#   ifdef stellar
1120	{"stellar", "1"},
1121#   endif
1122#   ifdef mc68000
1123	{"mc68000", "1"},
1124#   endif
1125#   ifdef mc68020
1126	{"mc68020", "1"},
1127#   endif
1128#   ifdef __GNUC__
1129	{"__GNUC__", DEF_STRINGIFY(__GNUC__)},
1130#   endif
1131#   ifdef __STRICT_ANSI__
1132	{"__STRICT_ANSI__", "1"},
1133#   endif
1134#   ifdef __STDC__
1135	{"__STDC__", DEF_STRINGIFY(__STDC__)},
1136#   endif
1137#   ifdef __HIGHC__
1138	{"__HIGHC__", "1"},
1139#   endif
1140#   ifdef __OPENSERVER__
1141	{"__OPENSERVER__", DEF_STRINGIFY(__OPENSERVER__)},
1142#   endif
1143#   ifdef _SCO_DS
1144	{"_SCO_DS", DEF_STRINGIFY(_SCO_DS)},
1145#   endif
1146#   ifdef _SCO_DS_LL
1147	{"_SCO_DS_LL", DEF_STRINGIFY(_SCO_DS_LL)},
1148#   endif
1149#   ifdef __SCO_VERSION__
1150	{"__SCO_VERSION__", DEF_STRINGIFY(__SCO_VERSION__)},
1151#   endif
1152#   ifdef __UNIXWARE__
1153	{"__UNIXWARE__", DEF_STRINGIFY(__UNIXWARE__)},
1154#   endif
1155#   ifdef __USLC__
1156	{"__USLC__", DEF_STRINGIFY(__USLC__)},
1157#   endif
1158#   ifdef CMU
1159	{"CMU", "1"},
1160#   endif
1161#   ifdef luna
1162	{"luna", "1"},
1163#    ifdef luna1
1164	{"luna1", "1"},
1165#    endif
1166#    ifdef luna2
1167	{"luna2", "1"},
1168#    endif
1169#    ifdef luna88k
1170	{"luna88k", "1"},
1171#    endif
1172#    ifdef uniosb
1173	{"uniosb", "1"},
1174#    endif
1175#    ifdef uniosu
1176	{"uniosu", "1"},
1177#    endif
1178#   endif
1179#   ifdef ieeep754
1180	{"ieeep754", "1"},
1181#   endif
1182#   ifdef is68k
1183	{"is68k", "1"},
1184#   endif
1185#   ifdef m68k
1186        {"m68k", "1"},
1187#   endif
1188#   ifdef M68k
1189        {"M68k", "1"},
1190#   endif
1191#   ifdef __m68k__
1192	{"__m68k__", "1"},
1193#   endif
1194#   ifdef m88k
1195        {"m88k", "1"},
1196#   endif
1197#   ifdef __m88k__
1198	{"__m88k__", "1"},
1199#   endif
1200#   ifdef bsd43
1201	{"bsd43", "1"},
1202#   endif
1203#   ifdef hcx
1204	{"hcx", "1"},
1205#   endif
1206#   ifdef sony
1207	{"sony", "1"},
1208#    ifdef SYSTYPE_SYSV
1209	{"SYSTYPE_SYSV", "1"},
1210#    endif
1211#    ifdef _SYSTYPE_SYSV
1212	{"_SYSTYPE_SYSV", "1"},
1213#    endif
1214#   endif
1215#   ifdef __OSF__
1216	{"__OSF__", "1"},
1217#   endif
1218#   ifdef __osf__
1219	{"__osf__", "1"},
1220#   endif
1221#   ifdef __amiga__
1222	{"__amiga__", "1"},
1223#   endif
1224#   ifdef __alpha
1225	{"__alpha", "1"},
1226#   endif
1227#   ifdef __alpha__
1228	{"__alpha__", "1"},
1229#   endif
1230#   ifdef __DECC
1231	{"__DECC",  "1"},
1232#   endif
1233#   ifdef __decc
1234	{"__decc",  "1"},
1235#   endif
1236#   ifdef __unix__
1237	{"__unix__", "1"},
1238#   endif
1239#   ifdef __uxp__
1240	{"__uxp__", "1"},
1241#   endif
1242#   ifdef __sxg__
1243	{"__sxg__", "1"},
1244#   endif
1245#   ifdef _SEQUENT_
1246	{"_SEQUENT_", "1"},
1247	{"__STDC__", "1"},
1248#   endif
1249#   ifdef __bsdi__
1250	{"__bsdi__", "1"},
1251#   endif
1252#   ifdef nec_ews_svr2
1253	{"nec_ews_svr2", "1"},
1254#   endif
1255#   ifdef nec_ews_svr4
1256	{"nec_ews_svr4", "1"},
1257#   endif
1258#   ifdef _nec_ews_svr4
1259	{"_nec_ews_svr4", "1"},
1260#   endif
1261#   ifdef _nec_up
1262	{"_nec_up", "1"},
1263#   endif
1264#   ifdef SX
1265	{"SX", "1"},
1266#   endif
1267#   ifdef nec
1268	{"nec", "1"},
1269#   endif
1270#   ifdef _nec_ft
1271	{"_nec_ft", "1"},
1272#   endif
1273#   ifdef PC_UX
1274	{"PC_UX", "1"},
1275#   endif
1276#   ifdef sgi
1277	{"sgi", "1"},
1278#   endif
1279#   ifdef __sgi
1280	{"__sgi", "1"},
1281#   endif
1282#   ifdef _MIPS_FPSET
1283	{"_MIPS_FPSET", DEF_STRINGIFY(_MIPS_FPSET)},
1284#   endif
1285#   ifdef _MIPS_ISA
1286	{"_MIPS_ISA", DEF_STRINGIFY(_MIPS_ISA)},
1287#   endif
1288#   ifdef _MIPS_SIM
1289	{"_MIPS_SIM", DEF_STRINGIFY(_MIPS_SIM)},
1290#   endif
1291#   ifdef _MIPS_SZINT
1292	{"_MIPS_SZINT", DEF_STRINGIFY(_MIPS_SZINT)},
1293#   endif
1294#   ifdef _MIPS_SZLONG
1295	{"_MIPS_SZLONG", DEF_STRINGIFY(_MIPS_SZLONG)},
1296#   endif
1297#   ifdef _MIPS_SZPTR
1298	{"_MIPS_SZPTR", DEF_STRINGIFY(_MIPS_SZPTR)},
1299#   endif
1300#   ifdef __DragonFly__
1301	{"__DragonFly__", "1"},
1302#   endif
1303#   ifdef __FreeBSD__
1304	{"__FreeBSD__", "1"},
1305#   endif
1306#   ifdef __OpenBSD__
1307	{"__OpenBSD__", "1"},
1308#   endif
1309#   ifdef __NetBSD__
1310	{"__NetBSD__", "1"},
1311#   endif
1312#   ifdef __GNU__
1313	{"__GNU__", "1"},
1314#   endif
1315#   ifdef __ELF__
1316	{"__ELF__", "1"},
1317#   endif
1318#   ifdef __UNIXOS2__
1319	{"__UNIXOS2__", "1"},
1320#   endif
1321#   if defined(__QNX__)
1322        {"__QNX__", "1"},
1323#   endif
1324#   ifdef __QNXNTO__
1325        {"__QNXNTO__", "1"},
1326#   endif
1327#   ifdef __powerpc__
1328	{"__powerpc__", "1"},
1329#   endif
1330#   ifdef __powerpc64__
1331	{"__powerpc64__", "1"},
1332#   endif
1333#   ifdef PowerMAX_OS
1334	{"PowerMAX_OS", "1"},
1335#   endif
1336#   ifdef ia64
1337	{"ia64", "1"},
1338#   endif
1339#   ifdef __ia64__
1340	{"__ia64__", "1"},
1341#   endif
1342#   if defined (amd64) || defined (x86_64)
1343	{"amd64", "1"},
1344	{"x86_64", "1"},
1345#   endif
1346#   if defined (__amd64__) || defined (__x86_64__)
1347	{"__amd64__", "1"},
1348	{"__x86_64__", "1"},
1349#   endif
1350#   if defined (__amd64) || defined(__x86_64)
1351	{"__amd64", "1"},
1352	{"__x86_64", "1"},
1353#   endif
1354#   ifdef __x86
1355	{"__x86", "1"},
1356#   endif
1357#   ifdef __i386
1358	{"__i386", "1"},
1359#   endif
1360#   ifdef __i386__
1361	{"__i386__", "1"},
1362#   endif
1363#   ifdef __i486__
1364	{"__i486__", "1"},
1365#   endif
1366#   ifdef __i586__
1367	{"__i586__", "1"},
1368#   endif
1369#   ifdef __i686__
1370	{"__i686__", "1"},
1371#   endif
1372#   ifdef __k6__
1373	{"__k6__", "1"},
1374#   endif
1375#   ifdef i386
1376	{"i386", "1"},
1377#   endif
1378#   ifdef i486
1379	{"i486", "1"},
1380#   endif
1381#   ifdef i586
1382	{"i586", "1"},
1383#   endif
1384#   ifdef i686
1385	{ "i686", "1"},
1386#   endif
1387#   ifdef k6
1388	{"k6", "1"},
1389#   endif
1390#   ifdef sparc
1391	{"sparc", "1"},
1392#   endif
1393#   ifdef __sparc__
1394	{"__sparc__", "1"},
1395#   endif
1396#   ifdef __s390__
1397	{"__s390__", "1"},
1398#   endif
1399#   ifdef __hppa__
1400	{"__hppa__", "1"},
1401#   endif
1402#   ifdef __sh__
1403	{"__sh__", "1"},
1404#   endif
1405#   ifdef __sh3_
1406	{"__sh3__", "1"},
1407#   endif
1408#   ifdef __SH3__
1409	{"__SH3__", "1"},
1410#   endif
1411#   ifdef __SH4__
1412	{"__SH4__", "1"},
1413#   endif
1414#   ifdef __SH4NOFPU__
1415	{"__SH4NOFPU__", "1"},
1416#   endif
1417#   if defined(__ppc__)
1418        {"__ppc__", "1"},
1419#   endif
1420#   if defined(__ppc64__)
1421        {"__ppc64__", "1"},
1422#   endif
1423#   if defined(__BIG_ENDIAN__)
1424      {"__BIG_ENDIAN__", "1"},
1425#   endif
1426#   if defined(__LITTLE_ENDIAN__)
1427      {"__LITTLE_ENDIAN__", "1"},
1428#   endif
1429#   if defined (__CHAR_BIT__)
1430	{"__CHAR_BIT__", DEF_STRINGIFY(__CHAR_BIT__)},
1431#   endif
1432#   if defined (__BUILTIN_VA_STRUCT)
1433	{"__BUILTIN_VA_STRUCT", "1"},
1434#   endif
1435#   if defined (__BUILTIN_VA_ARG_INCR)
1436	{"__BUILTIN_VA_ARG_INCR", "1"},
1437#   endif
1438	/* add any additional symbols before this line */
1439	{NULL, NULL}
1440};
1441#   undef DEF_EVALUATE
1442#   undef DEF_STRINGIFY
1443#  endif /* CROSSCOMPILE */
1444# endif /* MAKEDEPEND */
1445
1446# ifndef MAKEDEPEND
1447#  if  defined (CROSSCOMPILE_CPP)
1448#   ifdef USE_CC_E
1449boolean crosscompile_use_cc_e = TRUE;
1450#    ifdef DEFAULT_CC
1451char* crosscompile_cpp = DEFAULT_CC;
1452#    else
1453char* crosscompile_cpp = "cc";
1454#    endif
1455#   else
1456boolean crosscompile_use_cc_e = FALSE;
1457#    ifdef DEFAULT_CPP
1458char* crosscompile_cpp = DEFAULT_CPP;
1459#    else
1460char* crosscompile_cpp = "cpp";
1461#    endif
1462#   endif
1463#   ifdef FIXUP_CPP_WHITESPACE
1464boolean fixup_whitespace = TRUE;
1465#   else
1466boolean fixup_whitespace = FALSE;
1467#   endif
1468#   ifdef REMOVE_CPP_LEADSPACE
1469boolean remove_cpp_leadspace = TRUE;
1470#   else
1471boolean remove_cpp_leadspace = FALSE;
1472#   endif
1473#   ifdef INLINE_SYNTAX
1474boolean inline_syntax = TRUE;
1475#   else
1476boolean inline_syntax = FALSE;
1477#   endif
1478#   ifdef MAGIC_MAKE_VARS
1479boolean magic_make_vars = TRUE;
1480#   else
1481boolean magic_make_vars = FALSE;
1482#   endif
1483
1484typedef enum {
1485  unknown,
1486  freeBSD,
1487  netBSD,
1488  LinuX,
1489  emx,
1490  win32,
1491  dragonfly
1492} System;
1493
1494#   if defined(linux) || defined(__GLIBC__)
1495System sys = LinuX;
1496#   elif defined __FreeBSD__
1497System sys = freebsd;
1498#   elif defined __NetBSD__
1499System sys = netBSD;
1500#   elif defined __EMX__
1501System sys = emx;
1502#   elif defined WIN32
1503System sys = win32;
1504#   elif defined __DragonFly__
1505System sys = dragonfly;
1506#   else
1507System sys = unknown;
1508#   endif
1509
1510#   if defined __GNUC__
1511int gnu_c = __GNUC__;
1512int gnu_c_minor = __GNUC_MINOR__;
1513#   else
1514int gnu_c = 0;
1515int gnu_c_minor = -1;
1516#   endif
1517#   if defined(linux) || defined(__GLIBC__)
1518#    include <features.h>
1519int glibc_major = __GLIBC__ + 4;
1520int glibc_minor = __GLIBC_MINOR__;
1521#   else
1522int glibc_major = 0;
1523int glibc_minor = -1;
1524#   endif
1525#  endif /* !CROSSCOMPILE || CROSSCOMPILE_CPP */
1526
1527# endif /* MAKEDEPEND */
1528
1529#endif /* CCIMAKE */
1530