summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@osdl.org>2005-09-19 01:30:50 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-09-19 15:49:39 (GMT)
commitef34af24dc457f7a3ccfd8047e3d21e07f3f55e4 (patch)
treeca37686692dbfcd93e17fa19f423ec1be8505e21 /Makefile
parent727132834e6be48a93c1bd6458a29d474ce7d5d5 (diff)
downloadgit-ef34af24dc457f7a3ccfd8047e3d21e07f3f55e4.zip
git-ef34af24dc457f7a3ccfd8047e3d21e07f3f55e4.tar.gz
git-ef34af24dc457f7a3ccfd8047e3d21e07f3f55e4.tar.bz2
[PATCH] strcasestr compatibility replacement
Some C libraries lack strcasestr(); add a stupid replacement to help folks with such. [jc: original Linus posting, updated with his "also need <ctype.h>", updated further with a fix from Joachim B Haga <cjhaga@fys.uio.no>"] Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 877e0b8..957fadc 100644
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,8 @@
# Define NO_CURL if you do not have curl installed. git-http-pull is not
# built, and you cannot use http:// and https:// transports.
#
+# Define NO_STRCASESTR if you don't have strcasestr.
+#
# Define PPC_SHA1 environment variable when running make to make use of
# a bundled SHA1 routine optimized for PowerPC.
#
@@ -203,6 +205,10 @@ ifdef NEEDS_NSL
LIBS += -lnsl
SIMPLE_LIB += -lnsl
endif
+ifdef NO_STRCASESTR
+ DEFINES += -Dstrcasestr=gitstrcasestr
+ LIB_OBJS += compat/strcasestr.o
+endif
DEFINES += '-DSHA1_HEADER=$(SHA1_HEADER)'