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