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