tree-diff: convert diff_root_tree_sha1 to struct object_id
[git/debian.git] / config.mak.uname
blob192629f1431072f242f10a8528f1853b8bbaddeb
1 # Platform specific Makefile tweaks based on uname detection
3 uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
4 uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
5 uname_O := $(shell sh -c 'uname -o 2>/dev/null || echo not')
6 uname_R := $(shell sh -c 'uname -r 2>/dev/null || echo not')
7 uname_P := $(shell sh -c 'uname -p 2>/dev/null || echo not')
8 uname_V := $(shell sh -c 'uname -v 2>/dev/null || echo not')
10 ifdef MSVC
11         # avoid the MingW and Cygwin configuration sections
12         uname_S := Windows
13         uname_O := Windows
14 endif
16 # We choose to avoid "if .. else if .. else .. endif endif"
17 # because maintaining the nesting to match is a pain.  If
18 # we had "elif" things would have been much nicer...
20 ifeq ($(uname_S),OSF1)
21         # Need this for u_short definitions et al
22         BASIC_CFLAGS += -D_OSF_SOURCE
23         SOCKLEN_T = int
24         NO_STRTOULL = YesPlease
25         NO_NSEC = YesPlease
26 endif
27 ifeq ($(uname_S),Linux)
28         HAVE_ALLOCA_H = YesPlease
29         NO_STRLCPY = YesPlease
30         HAVE_PATHS_H = YesPlease
31         LIBC_CONTAINS_LIBINTL = YesPlease
32         HAVE_DEV_TTY = YesPlease
33         HAVE_CLOCK_GETTIME = YesPlease
34         HAVE_CLOCK_MONOTONIC = YesPlease
35         # -lrt is needed for clock_gettime on glibc <= 2.16
36         NEEDS_LIBRT = YesPlease
37         HAVE_GETDELIM = YesPlease
38         SANE_TEXT_GREP=-a
39 endif
40 ifeq ($(uname_S),GNU/kFreeBSD)
41         HAVE_ALLOCA_H = YesPlease
42         NO_STRLCPY = YesPlease
43         HAVE_PATHS_H = YesPlease
44         DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
45         LIBC_CONTAINS_LIBINTL = YesPlease
46 endif
47 ifeq ($(uname_S),UnixWare)
48         CC = cc
49         NEEDS_SOCKET = YesPlease
50         NEEDS_NSL = YesPlease
51         NEEDS_SSL_WITH_CRYPTO = YesPlease
52         NEEDS_LIBICONV = YesPlease
53         SHELL_PATH = /usr/local/bin/bash
54         NO_IPV6 = YesPlease
55         NO_HSTRERROR = YesPlease
56         BASIC_CFLAGS += -Kthread
57         BASIC_CFLAGS += -I/usr/local/include
58         BASIC_LDFLAGS += -L/usr/local/lib
59         INSTALL = ginstall
60         TAR = gtar
61         NO_STRCASESTR = YesPlease
62         NO_MEMMEM = YesPlease
63 endif
64 ifeq ($(uname_S),SCO_SV)
65         ifeq ($(uname_R),3.2)
66                 CFLAGS = -O2
67         endif
68         ifeq ($(uname_R),5)
69                 CC = cc
70                 BASIC_CFLAGS += -Kthread
71         endif
72         NEEDS_SOCKET = YesPlease
73         NEEDS_NSL = YesPlease
74         NEEDS_SSL_WITH_CRYPTO = YesPlease
75         NEEDS_LIBICONV = YesPlease
76         SHELL_PATH = /usr/bin/bash
77         NO_IPV6 = YesPlease
78         NO_HSTRERROR = YesPlease
79         BASIC_CFLAGS += -I/usr/local/include
80         BASIC_LDFLAGS += -L/usr/local/lib
81         NO_STRCASESTR = YesPlease
82         NO_MEMMEM = YesPlease
83         INSTALL = ginstall
84         TAR = gtar
85 endif
86 ifeq ($(uname_S),Darwin)
87         NEEDS_CRYPTO_WITH_SSL = YesPlease
88         NEEDS_SSL_WITH_CRYPTO = YesPlease
89         NEEDS_LIBICONV = YesPlease
90         # Note: $(uname_R) gives us the underlying Darwin version.
91         # - MacOS 10.0.* and MacOS 10.1.0 = Darwin 1.*
92         # - MacOS 10.x.* = Darwin (x+4).* for (1 <= x)
93         # i.e. "begins with [15678] and a dot" means "10.4.* or older".
94         ifeq ($(shell expr "$(uname_R)" : '[15678]\.'),2)
95                 OLD_ICONV = UnfortunatelyYes
96                 NO_APPLE_COMMON_CRYPTO = YesPlease
97         endif
98         ifeq ($(shell expr "$(uname_R)" : '[15]\.'),2)
99                 NO_STRLCPY = YesPlease
100         endif
101         ifeq ($(shell test "`expr "$(uname_R)" : '\([0-9][0-9]*\)\.'`" -ge 11 && echo 1),1)
102                 HAVE_GETDELIM = YesPlease
103         endif
104         NO_MEMMEM = YesPlease
105         USE_ST_TIMESPEC = YesPlease
106         HAVE_DEV_TTY = YesPlease
107         COMPAT_OBJS += compat/precompose_utf8.o
108         BASIC_CFLAGS += -DPRECOMPOSE_UNICODE
109         BASIC_CFLAGS += -DPROTECT_HFS_DEFAULT=1
110         HAVE_BSD_SYSCTL = YesPlease
111 endif
112 ifeq ($(uname_S),SunOS)
113         NEEDS_SOCKET = YesPlease
114         NEEDS_NSL = YesPlease
115         SHELL_PATH = /bin/bash
116         SANE_TOOL_PATH = /usr/xpg6/bin:/usr/xpg4/bin
117         HAVE_ALLOCA_H = YesPlease
118         NO_STRCASESTR = YesPlease
119         NO_MEMMEM = YesPlease
120         NO_MKDTEMP = YesPlease
121         NO_REGEX = YesPlease
122         NO_MSGFMT_EXTENDED_OPTIONS = YesPlease
123         HAVE_DEV_TTY = YesPlease
124         ifeq ($(uname_R),5.6)
125                 SOCKLEN_T = int
126                 NO_HSTRERROR = YesPlease
127                 NO_IPV6 = YesPlease
128                 NO_SOCKADDR_STORAGE = YesPlease
129                 NO_UNSETENV = YesPlease
130                 NO_SETENV = YesPlease
131                 NO_STRLCPY = YesPlease
132                 NO_STRTOUMAX = YesPlease
133                 GIT_TEST_CMP = cmp
134         endif
135         ifeq ($(uname_R),5.7)
136                 NEEDS_RESOLV = YesPlease
137                 NO_IPV6 = YesPlease
138                 NO_SOCKADDR_STORAGE = YesPlease
139                 NO_UNSETENV = YesPlease
140                 NO_SETENV = YesPlease
141                 NO_STRLCPY = YesPlease
142                 NO_STRTOUMAX = YesPlease
143                 GIT_TEST_CMP = cmp
144         endif
145         ifeq ($(uname_R),5.8)
146                 NO_UNSETENV = YesPlease
147                 NO_SETENV = YesPlease
148                 NO_STRTOUMAX = YesPlease
149                 GIT_TEST_CMP = cmp
150         endif
151         ifeq ($(uname_R),5.9)
152                 NO_UNSETENV = YesPlease
153                 NO_SETENV = YesPlease
154                 NO_STRTOUMAX = YesPlease
155                 GIT_TEST_CMP = cmp
156         endif
157         INSTALL = /usr/ucb/install
158         TAR = gtar
159         BASIC_CFLAGS += -D__EXTENSIONS__ -D__sun__
160 endif
161 ifeq ($(uname_O),Cygwin)
162         ifeq ($(shell expr "$(uname_R)" : '1\.[1-6]\.'),4)
163                 NO_D_TYPE_IN_DIRENT = YesPlease
164                 NO_STRCASESTR = YesPlease
165                 NO_MEMMEM = YesPlease
166                 NO_SYMLINK_HEAD = YesPlease
167                 NO_IPV6 = YesPlease
168                 OLD_ICONV = UnfortunatelyYes
169                 # There are conflicting reports about this.
170                 # On some boxes NO_MMAP is needed, and not so elsewhere.
171                 # Try commenting this out if you suspect MMAP is more efficient
172                 NO_MMAP = YesPlease
173         else
174                 NO_REGEX = UnfortunatelyYes
175         endif
176         HAVE_ALLOCA_H = YesPlease
177         NEEDS_LIBICONV = YesPlease
178         NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
179         NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
180         X = .exe
181         UNRELIABLE_FSTAT = UnfortunatelyYes
182         SPARSE_FLAGS = -isystem /usr/include/w32api -Wno-one-bit-signed-bitfield
183         OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
184 endif
185 ifeq ($(uname_S),FreeBSD)
186         NEEDS_LIBICONV = YesPlease
187         OLD_ICONV = YesPlease
188         NO_MEMMEM = YesPlease
189         BASIC_CFLAGS += -I/usr/local/include
190         BASIC_LDFLAGS += -L/usr/local/lib
191         DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
192         USE_ST_TIMESPEC = YesPlease
193         ifeq ($(shell expr "$(uname_R)" : '4\.'),2)
194                 PTHREAD_LIBS = -pthread
195                 NO_UINTMAX_T = YesPlease
196                 NO_STRTOUMAX = YesPlease
197         endif
198         PYTHON_PATH = /usr/local/bin/python
199         PERL_PATH = /usr/local/bin/perl
200         HAVE_PATHS_H = YesPlease
201         GMTIME_UNRELIABLE_ERRORS = UnfortunatelyYes
202         HAVE_BSD_SYSCTL = YesPlease
203         PAGER_ENV = LESS=FRX LV=-c MORE=FRX
204 endif
205 ifeq ($(uname_S),OpenBSD)
206         NO_STRCASESTR = YesPlease
207         NO_MEMMEM = YesPlease
208         USE_ST_TIMESPEC = YesPlease
209         NEEDS_LIBICONV = YesPlease
210         BASIC_CFLAGS += -I/usr/local/include
211         BASIC_LDFLAGS += -L/usr/local/lib
212         HAVE_PATHS_H = YesPlease
213         HAVE_BSD_SYSCTL = YesPlease
214 endif
215 ifeq ($(uname_S),MirBSD)
216         NO_STRCASESTR = YesPlease
217         NO_MEMMEM = YesPlease
218         USE_ST_TIMESPEC = YesPlease
219         NEEDS_LIBICONV = YesPlease
220         HAVE_PATHS_H = YesPlease
221         HAVE_BSD_SYSCTL = YesPlease
222 endif
223 ifeq ($(uname_S),NetBSD)
224         ifeq ($(shell expr "$(uname_R)" : '[01]\.'),2)
225                 NEEDS_LIBICONV = YesPlease
226         endif
227         BASIC_CFLAGS += -I/usr/pkg/include
228         BASIC_LDFLAGS += -L/usr/pkg/lib $(CC_LD_DYNPATH)/usr/pkg/lib
229         USE_ST_TIMESPEC = YesPlease
230         HAVE_PATHS_H = YesPlease
231         HAVE_BSD_SYSCTL = YesPlease
232 endif
233 ifeq ($(uname_S),AIX)
234         DEFAULT_PAGER = more
235         NO_STRCASESTR = YesPlease
236         NO_MEMMEM = YesPlease
237         NO_MKDTEMP = YesPlease
238         NO_STRLCPY = YesPlease
239         NO_NSEC = YesPlease
240         NO_REGEX = NeedsStartEnd
241         FREAD_READS_DIRECTORIES = UnfortunatelyYes
242         INTERNAL_QSORT = UnfortunatelyYes
243         NEEDS_LIBICONV = YesPlease
244         BASIC_CFLAGS += -D_LARGE_FILES
245         ifeq ($(shell expr "$(uname_V)" : '[1234]'),1)
246                 NO_PTHREADS = YesPlease
247         else
248                 PTHREAD_LIBS = -lpthread
249         endif
250         ifeq ($(shell expr "$(uname_V).$(uname_R)" : '5\.1'),3)
251                 INLINE = ''
252         endif
253         GIT_TEST_CMP = cmp
254 endif
255 ifeq ($(uname_S),GNU)
256         # GNU/Hurd
257         HAVE_ALLOCA_H = YesPlease
258         NO_STRLCPY = YesPlease
259         HAVE_PATHS_H = YesPlease
260         LIBC_CONTAINS_LIBINTL = YesPlease
261 endif
262 ifeq ($(uname_S),IRIX)
263         NO_SETENV = YesPlease
264         NO_UNSETENV = YesPlease
265         NO_STRCASESTR = YesPlease
266         NO_MEMMEM = YesPlease
267         NO_MKDTEMP = YesPlease
268         # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
269         # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
270         # git dies with a segmentation fault when trying to access the first
271         # entry of a reflog.  The conservative choice is made to always set
272         # NO_MMAP.  If you suspect that your compiler is not affected by this
273         # issue, comment out the NO_MMAP statement.
274         NO_MMAP = YesPlease
275         NO_REGEX = YesPlease
276         SNPRINTF_RETURNS_BOGUS = YesPlease
277         SHELL_PATH = /usr/gnu/bin/bash
278         NEEDS_LIBGEN = YesPlease
279 endif
280 ifeq ($(uname_S),IRIX64)
281         NO_SETENV = YesPlease
282         NO_UNSETENV = YesPlease
283         NO_STRCASESTR = YesPlease
284         NO_MEMMEM = YesPlease
285         NO_MKDTEMP = YesPlease
286         # When compiled with the MIPSpro 7.4.4m compiler, and without pthreads
287         # (i.e. NO_PTHREADS is set), and _with_ MMAP (i.e. NO_MMAP is not set),
288         # git dies with a segmentation fault when trying to access the first
289         # entry of a reflog.  The conservative choice is made to always set
290         # NO_MMAP.  If you suspect that your compiler is not affected by this
291         # issue, comment out the NO_MMAP statement.
292         NO_MMAP = YesPlease
293         NO_REGEX = YesPlease
294         SNPRINTF_RETURNS_BOGUS = YesPlease
295         SHELL_PATH = /usr/gnu/bin/bash
296         NEEDS_LIBGEN = YesPlease
297 endif
298 ifeq ($(uname_S),HP-UX)
299         INLINE = __inline
300         NO_IPV6 = YesPlease
301         NO_SETENV = YesPlease
302         NO_STRCASESTR = YesPlease
303         NO_MEMMEM = YesPlease
304         NO_STRLCPY = YesPlease
305         NO_MKDTEMP = YesPlease
306         NO_UNSETENV = YesPlease
307         NO_HSTRERROR = YesPlease
308         NO_SYS_SELECT_H = YesPlease
309         SNPRINTF_RETURNS_BOGUS = YesPlease
310         NO_NSEC = YesPlease
311         ifeq ($(uname_R),B.11.00)
312                 NO_INET_NTOP = YesPlease
313                 NO_INET_PTON = YesPlease
314         endif
315         ifeq ($(uname_R),B.10.20)
316                 # Override HP-UX 11.x setting:
317                 INLINE =
318                 SOCKLEN_T = size_t
319                 NO_PREAD = YesPlease
320                 NO_INET_NTOP = YesPlease
321                 NO_INET_PTON = YesPlease
322         endif
323         GIT_TEST_CMP = cmp
324 endif
325 ifeq ($(uname_S),Windows)
326         GIT_VERSION := $(GIT_VERSION).MSVC
327         pathsep = ;
328         HAVE_ALLOCA_H = YesPlease
329         NO_PREAD = YesPlease
330         NEEDS_CRYPTO_WITH_SSL = YesPlease
331         NO_LIBGEN_H = YesPlease
332         NO_POLL = YesPlease
333         NO_SYMLINK_HEAD = YesPlease
334         NO_IPV6 = YesPlease
335         NO_UNIX_SOCKETS = YesPlease
336         NO_SETENV = YesPlease
337         NO_STRCASESTR = YesPlease
338         NO_STRLCPY = YesPlease
339         NO_MEMMEM = YesPlease
340         # NEEDS_LIBICONV = YesPlease
341         NO_ICONV = YesPlease
342         NO_STRTOUMAX = YesPlease
343         NO_MKDTEMP = YesPlease
344         SNPRINTF_RETURNS_BOGUS = YesPlease
345         NO_SVN_TESTS = YesPlease
346         RUNTIME_PREFIX = YesPlease
347         NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
348         NO_NSEC = YesPlease
349         USE_WIN32_MMAP = YesPlease
350         # USE_NED_ALLOCATOR = YesPlease
351         UNRELIABLE_FSTAT = UnfortunatelyYes
352         OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
353         NO_REGEX = YesPlease
354         NO_GETTEXT = YesPlease
355         NO_PYTHON = YesPlease
356         BLK_SHA1 = YesPlease
357         ETAGS_TARGET = ETAGS
358         NO_INET_PTON = YesPlease
359         NO_INET_NTOP = YesPlease
360         NO_POSIX_GOODIES = UnfortunatelyYes
361         NATIVE_CRLF = YesPlease
362         DEFAULT_HELP_FORMAT = html
364         CC = compat/vcbuild/scripts/clink.pl
365         AR = compat/vcbuild/scripts/lib.pl
366         CFLAGS =
367         BASIC_CFLAGS = -nologo -I. -I../zlib -Icompat/vcbuild -Icompat/vcbuild/include -DWIN32 -D_CONSOLE -DHAVE_STRING_H -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE
368         COMPAT_OBJS = compat/msvc.o compat/winansi.o \
369                 compat/win32/pthread.o compat/win32/syslog.o \
370                 compat/win32/dirent.o
371         COMPAT_CFLAGS = -D__USE_MINGW_ACCESS -DNOGDI -DHAVE_STRING_H -Icompat -Icompat/regex -Icompat/win32 -DSTRIP_EXTENSION=\".exe\"
372         BASIC_LDFLAGS = -IGNORE:4217 -IGNORE:4049 -NOLOGO -SUBSYSTEM:CONSOLE
373         EXTLIBS = user32.lib advapi32.lib shell32.lib wininet.lib ws2_32.lib invalidcontinue.obj
374         PTHREAD_LIBS =
375         lib =
376         BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
377 ifndef DEBUG
378         BASIC_CFLAGS += -GL -Os -MD
379         BASIC_LDFLAGS += -LTCG
380         AR += -LTCG
381 else
382         BASIC_CFLAGS += -Zi -MDd
383 endif
384         X = .exe
385 endif
386 ifeq ($(uname_S),Interix)
387         NO_INITGROUPS = YesPlease
388         NO_IPV6 = YesPlease
389         NO_MEMMEM = YesPlease
390         NO_MKDTEMP = YesPlease
391         NO_STRTOUMAX = YesPlease
392         NO_NSEC = YesPlease
393         ifeq ($(uname_R),3.5)
394                 NO_INET_NTOP = YesPlease
395                 NO_INET_PTON = YesPlease
396                 NO_SOCKADDR_STORAGE = YesPlease
397         endif
398         ifeq ($(uname_R),5.2)
399                 NO_INET_NTOP = YesPlease
400                 NO_INET_PTON = YesPlease
401                 NO_SOCKADDR_STORAGE = YesPlease
402         endif
403 endif
404 ifeq ($(uname_S),Minix)
405         NO_IPV6 = YesPlease
406         NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
407         NO_NSEC = YesPlease
408         NEEDS_LIBGEN =
409         NEEDS_CRYPTO_WITH_SSL = YesPlease
410         NEEDS_IDN_WITH_CURL = YesPlease
411         NEEDS_SSL_WITH_CURL = YesPlease
412         NEEDS_RESOLV =
413         NO_HSTRERROR = YesPlease
414         NO_MMAP = YesPlease
415         NO_CURL =
416         NO_EXPAT =
417 endif
418 ifeq ($(uname_S),NONSTOP_KERNEL)
419         # Needs some C99 features, "inline" is just one of them.
420         # INLINE='' would just replace one set of warnings with another and
421         # still not compile in c89 mode, due to non-const array initializations.
422         CC = cc -c99
423         # Disable all optimization, seems to result in bad code, with -O or -O2
424         # or even -O1 (default), /usr/local/libexec/git-core/git-pack-objects
425         # abends on "git push". Needs more investigation.
426         CFLAGS = -g -O0
427         # We'd want it to be here.
428         prefix = /usr/local
429         # Our's are in ${prefix}/bin (perl might also be in /usr/bin/perl).
430         PERL_PATH = ${prefix}/bin/perl
431         PYTHON_PATH = ${prefix}/bin/python
433         # As detected by './configure'.
434         # Missdetected, hence commented out, see below.
435         #NO_CURL = YesPlease
436         # Added manually, see above.
437         NEEDS_SSL_WITH_CURL = YesPlease
438         HAVE_LIBCHARSET_H = YesPlease
439         HAVE_STRINGS_H = YesPlease
440         NEEDS_LIBICONV = YesPlease
441         NEEDS_LIBINTL_BEFORE_LIBICONV = YesPlease
442         NO_SYS_SELECT_H = UnfortunatelyYes
443         NO_D_TYPE_IN_DIRENT = YesPlease
444         NO_HSTRERROR = YesPlease
445         NO_STRCASESTR = YesPlease
446         NO_MEMMEM = YesPlease
447         NO_STRLCPY = YesPlease
448         NO_SETENV = YesPlease
449         NO_UNSETENV = YesPlease
450         NO_MKDTEMP = YesPlease
451         # Currently libiconv-1.9.1.
452         OLD_ICONV = UnfortunatelyYes
453         NO_REGEX = YesPlease
454         NO_PTHREADS = UnfortunatelyYes
456         # Not detected (nor checked for) by './configure'.
457         # We don't have SA_RESTART on NonStop, unfortunalety.
458         COMPAT_CFLAGS += -DSA_RESTART=0
459         # Apparently needed in compat/fnmatch/fnmatch.c.
460         COMPAT_CFLAGS += -DHAVE_STRING_H=1
461         NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
462         NO_NSEC = YesPlease
463         NO_PREAD = YesPlease
464         NO_MMAP = YesPlease
465         NO_POLL = YesPlease
466         NO_INTPTR_T = UnfortunatelyYes
467         # Bug report 10-120822-4477 submitted to HP NonStop development.
468         MKDIR_WO_TRAILING_SLASH = YesPlease
469         # RFE 10-120912-4693 submitted to HP NonStop development.
470         NO_SETITIMER = UnfortunatelyYes
471         SANE_TOOL_PATH = /usr/coreutils/bin:/usr/local/bin
472         SHELL_PATH = /usr/local/bin/bash
473         # as of H06.25/J06.14, we might better use this
474         #SHELL_PATH = /usr/coreutils/bin/bash
475 endif
476 ifneq (,$(findstring MINGW,$(uname_S)))
477         pathsep = ;
478         HAVE_ALLOCA_H = YesPlease
479         NO_PREAD = YesPlease
480         NEEDS_CRYPTO_WITH_SSL = YesPlease
481         NO_LIBGEN_H = YesPlease
482         NO_POLL = YesPlease
483         NO_SYMLINK_HEAD = YesPlease
484         NO_UNIX_SOCKETS = YesPlease
485         NO_SETENV = YesPlease
486         NO_STRCASESTR = YesPlease
487         NO_STRLCPY = YesPlease
488         NO_MEMMEM = YesPlease
489         NEEDS_LIBICONV = YesPlease
490         NO_STRTOUMAX = YesPlease
491         NO_MKDTEMP = YesPlease
492         NO_SVN_TESTS = YesPlease
493         NO_PERL_MAKEMAKER = YesPlease
494         RUNTIME_PREFIX = YesPlease
495         NO_ST_BLOCKS_IN_STRUCT_STAT = YesPlease
496         NO_NSEC = YesPlease
497         USE_WIN32_MMAP = YesPlease
498         USE_NED_ALLOCATOR = YesPlease
499         UNRELIABLE_FSTAT = UnfortunatelyYes
500         OBJECT_CREATION_USES_RENAMES = UnfortunatelyNeedsTo
501         NO_REGEX = YesPlease
502         NO_PYTHON = YesPlease
503         ETAGS_TARGET = ETAGS
504         NO_INET_PTON = YesPlease
505         NO_INET_NTOP = YesPlease
506         NO_POSIX_GOODIES = UnfortunatelyYes
507         DEFAULT_HELP_FORMAT = html
508         COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32
509         COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
510         COMPAT_OBJS += compat/mingw.o compat/winansi.o \
511                 compat/win32/pthread.o compat/win32/syslog.o \
512                 compat/win32/dirent.o
513         BASIC_CFLAGS += -DPROTECT_NTFS_DEFAULT=1
514         EXTLIBS += -lws2_32
515         GITLIBS += git.res
516         PTHREAD_LIBS =
517         RC = windres -O coff
518         NATIVE_CRLF = YesPlease
519         X = .exe
520         SPARSE_FLAGS = -Wno-one-bit-signed-bitfield
521 ifneq (,$(wildcard ../THIS_IS_MSYSGIT))
522         htmldir = doc/git/html/
523         prefix =
524         INSTALL = /bin/install
525         EXTLIBS += /mingw/lib/libz.a
526         NO_R_TO_GCC_LINKER = YesPlease
527         INTERNAL_QSORT = YesPlease
528         HAVE_LIBCHARSET_H = YesPlease
529         NO_GETTEXT = YesPlease
530         COMPAT_CLFAGS += -D__USE_MINGW_ACCESS
531 else
532         ifeq ($(shell expr "$(uname_R)" : '2\.'),2)
533                 # MSys2
534                 prefix = /usr/
535                 ifeq (MINGW32,$(MSYSTEM))
536                         prefix = /mingw32
537                 endif
538                 ifeq (MINGW64,$(MSYSTEM))
539                         prefix = /mingw64
540                 else
541                         COMPAT_CFLAGS += -D_USE_32BIT_TIME_T
542                         BASIC_LDFLAGS += -Wl,--large-address-aware
543                 endif
544                 CC = gcc
545                 COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO=0 -DDETECT_MSYS_TTY
546                 EXTLIBS += -lntdll
547                 INSTALL = /bin/install
548                 NO_R_TO_GCC_LINKER = YesPlease
549                 INTERNAL_QSORT = YesPlease
550                 HAVE_LIBCHARSET_H = YesPlease
551                 NO_GETTEXT =
552                 USE_GETTEXT_SCHEME = fallthrough
553                 USE_LIBPCRE= YesPlease
554                 NO_CURL =
555                 USE_NED_ALLOCATOR = YesPlease
556         else
557                 COMPAT_CFLAGS += -D__USE_MINGW_ANSI_STDIO
558                 NO_CURL = YesPlease
559         endif
560 endif
561 endif
562 ifeq ($(uname_S),QNX)
563         COMPAT_CFLAGS += -DSA_RESTART=0
564         EXPAT_NEEDS_XMLPARSE_H = YesPlease
565         HAVE_STRINGS_H = YesPlease
566         NEEDS_SOCKET = YesPlease
567         NO_GETPAGESIZE = YesPlease
568         NO_ICONV = YesPlease
569         NO_MEMMEM = YesPlease
570         NO_MKDTEMP = YesPlease
571         NO_NSEC = YesPlease
572         NO_PTHREADS = YesPlease
573         NO_R_TO_GCC_LINKER = YesPlease
574         NO_STRCASESTR = YesPlease
575         NO_STRLCPY = YesPlease
576 endif