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