summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 28818ff)
raw | patch | inline | side by side (parent: 28818ff)
author | Petr Baudis <pasky@suse.cz> | |
Fri, 29 Jul 2005 15:50:51 +0000 (17:50 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sat, 30 Jul 2005 00:21:52 +0000 (17:21 -0700) |
Support for completely OpenSSL-less builds. FSF considers distributing GPL
binaries with OpenSSL linked in as a legal problem so this is trouble
e.g. for Debian, or some people might not want to install OpenSSL
anyway. If you
make NO_OPENSSL=1
you get completely OpenSSL-less build, disabling --merge-order and using
Mozilla's SHA1 implementation.
Ported from Cogito.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
binaries with OpenSSL linked in as a legal problem so this is trouble
e.g. for Debian, or some people might not want to install OpenSSL
anyway. If you
make NO_OPENSSL=1
you get completely OpenSSL-less build, disabling --merge-order and using
Mozilla's SHA1 implementation.
Ported from Cogito.
Signed-off-by: Petr Baudis <pasky@ucw.cz>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Makefile | patch | blob | history | |
rev-list.c | patch | blob | history |
diff --git a/Makefile b/Makefile
index f11fddd1ff3e000f9449059b6a892ae605591913..d7d4182e09cdc3b16b7db31754889db5d6c2380e 100644 (file)
--- a/Makefile
+++ b/Makefile
pack.h pkt-line.h refs.h
LIB_OBJS=read-cache.o sha1_file.o usage.o object.o commit.o tree.o blob.o \
tag.o date.o index.o diff-delta.o patch-delta.o entry.o path.o \
- epoch.o refs.o csum-file.o pack-check.o pkt-line.o connect.o ident.o
+ refs.o csum-file.o pack-check.o pkt-line.o connect.o ident.o
LIB_H += rev-cache.h
LIB_OBJS += rev-cache.o
LIBS = $(LIB_FILE)
LIBS += -lz
+ifndef NO_OPENSSL
+ LIB_OBJS += epoch.o
+else
+ CFLAGS += '-DNO_OPENSSL'
+ MOZILLA_SHA1=1
+endif
ifdef MOZILLA_SHA1
SHA1_HEADER="mozilla-sha1/sha1.h"
LIB_OBJS += mozilla-sha1/sha1.o
diff --git a/rev-list.c b/rev-list.c
index 846aa2f79e3c90cf69eadec276b1b56165bc4601..83a604ae9bc382953ebd0167fd86bbc813ce9156 100644 (file)
--- a/rev-list.c
+++ b/rev-list.c
sort_in_topological_order(&list);
show_commit_list(list);
} else {
+#ifndef NO_OPENSSL
if (sort_list_in_merge_order(list, &process_commit)) {
- die("merge order sort failed\n");
+ die("merge order sort failed\n");
}
+#else
+ die("merge order sort unsupported, OpenSSL not linked");
+#endif
}
return 0;