diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 57 |
1 files changed, 53 insertions, 4 deletions
@@ -191,6 +191,10 @@ all:: # Define NO_TRUSTABLE_FILEMODE if your filesystem may claim to support # the executable mode bit, but doesn't really do so. # +# Define NEEDS_MODE_TRANSLATION if your OS strays from the typical file type +# bits in mode values (e.g. z/OS defines I_SFMT to 0xFF000000 as opposed to the +# usual 0xF000). +# # Define NO_IPV6 if you lack IPv6 support and getaddrinfo(). # # Define NO_UNIX_SOCKETS if your system does not offer unix sockets. @@ -339,6 +343,20 @@ all:: # return NULL when it receives a bogus time_t. # # Define HAVE_CLOCK_GETTIME if your platform has clock_gettime in librt. +# +# Define HAVE_CLOCK_MONOTONIC if your platform has CLOCK_MONOTONIC in librt. +# +# Define NO_HMAC_CTX_CLEANUP if your OpenSSL is version 0.9.6b or earlier to +# cleanup the HMAC context with the older HMAC_cleanup function. +# +# Define USE_PARENS_AROUND_GETTEXT_N to "yes" if your compiler happily +# compiles the following initialization: +# +# static const char s[] = ("FOO"); +# +# and define it to "no" if you need to remove the parentheses () around the +# constant. The default is "auto", which means to use parentheses if your +# compiler is detected to support it. GIT-VERSION-FILE: FORCE @$(SHELL_PATH) ./GIT-VERSION-GEN @@ -946,6 +964,14 @@ ifneq (,$(SOCKLEN_T)) BASIC_CFLAGS += -Dsocklen_t=$(SOCKLEN_T) endif +ifeq (yes,$(USE_PARENS_AROUND_GETTEXT_N)) + BASIC_CFLAGS += -DUSE_PARENS_AROUND_GETTEXT_N=1 +else +ifeq (no,$(USE_PARENS_AROUND_GETTEXT_N)) + BASIC_CFLAGS += -DUSE_PARENS_AROUND_GETTEXT_N=0 +endif +endif + ifeq ($(uname_S),Darwin) ifndef NO_FINK ifeq ($(shell test -d /sw/lib && echo y),y) @@ -995,6 +1021,9 @@ ifdef HAVE_ALLOCA_H BASIC_CFLAGS += -DHAVE_ALLOCA_H endif +IMAP_SEND_BUILDDEPS = +IMAP_SEND_LDFLAGS = $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO) + ifdef NO_CURL BASIC_CFLAGS += -DNO_CURL REMOTE_CURL_PRIMARY = @@ -1023,12 +1052,21 @@ else REMOTE_CURL_NAMES = $(REMOTE_CURL_PRIMARY) $(REMOTE_CURL_ALIASES) PROGRAM_OBJS += http-fetch.o PROGRAMS += $(REMOTE_CURL_NAMES) - curl_check := $(shell (echo 070908; curl-config --vernum) 2>/dev/null | sort -r | sed -ne 2p) + curl_check := $(shell (echo 070908; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p) ifeq "$(curl_check)" "070908" ifndef NO_EXPAT PROGRAM_OBJS += http-push.o endif endif + curl_check := $(shell (echo 072200; curl-config --vernum | sed -e '/^70[BC]/s/^/0/') 2>/dev/null | sort -r | sed -ne 2p) + ifeq "$(curl_check)" "072200" + USE_CURL_FOR_IMAP_SEND = YesPlease + endif + ifdef USE_CURL_FOR_IMAP_SEND + BASIC_CFLAGS += -DUSE_CURL_FOR_IMAP_SEND + IMAP_SEND_BUILDDEPS = http.o + IMAP_SEND_LDFLAGS += $(CURL_LIBCURL) + endif ifndef NO_EXPAT ifdef EXPATDIR BASIC_CFLAGS += -I$(EXPATDIR)/include @@ -1059,6 +1097,9 @@ ifndef NO_OPENSSL ifdef NEEDS_CRYPTO_WITH_SSL OPENSSL_LIBSSL += -lcrypto endif + ifdef NO_HMAC_CTX_CLEANUP + BASIC_CFLAGS += -DNO_HMAC_CTX_CLEANUP + endif else BASIC_CFLAGS += -DNO_OPENSSL BLK_SHA1 = 1 @@ -1230,6 +1271,10 @@ endif ifdef NO_TRUSTABLE_FILEMODE BASIC_CFLAGS += -DNO_TRUSTABLE_FILEMODE endif +ifdef NEEDS_MODE_TRANSLATION + COMPAT_CFLAGS += -DNEEDS_MODE_TRANSLATION + COMPAT_OBJS += compat/stat.o +endif ifdef NO_IPV6 BASIC_CFLAGS += -DNO_IPV6 endif @@ -1382,6 +1427,10 @@ ifdef HAVE_CLOCK_GETTIME EXTLIBS += -lrt endif +ifdef HAVE_CLOCK_MONOTONIC + BASIC_CFLAGS += -DHAVE_CLOCK_MONOTONIC +endif + ifeq ($(TCLTK_PATH),) NO_TCLTK = NoThanks endif @@ -1880,7 +1929,7 @@ gettext.sp gettext.s gettext.o: GIT-PREFIX gettext.sp gettext.s gettext.o: EXTRA_CPPFLAGS = \ -DGIT_LOCALE_PATH='"$(localedir_SQ)"' -http-push.sp http.sp http-walker.sp remote-curl.sp: SPARSE_FLAGS += \ +http-push.sp http.sp http-walker.sp remote-curl.sp imap-send.sp: SPARSE_FLAGS += \ -DCURL_DISABLE_TYPECHECK ifdef NO_EXPAT @@ -1901,9 +1950,9 @@ endif git-%$X: %.o GIT-LDFLAGS $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(LIBS) -git-imap-send$X: imap-send.o GIT-LDFLAGS $(GITLIBS) +git-imap-send$X: imap-send.o $(IMAP_SEND_BUILDDEPS) GIT-LDFLAGS $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ - $(LIBS) $(OPENSSL_LINK) $(OPENSSL_LIBSSL) $(LIB_4_CRYPTO) + $(LIBS) $(IMAP_SEND_LDFLAGS) git-http-fetch$X: http.o http-walker.o http-fetch.o GIT-LDFLAGS $(GITLIBS) $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \ |