From: "martin f. krafft" <madduck@madduck.net>
To: git@vger.kernel.org
Subject: [PATCH] fall back to mozilla's sha.h if openssl/sha.h is not available
Date: Sat, 14 Jul 2007 11:25:18 +0200 [thread overview]
Message-ID: <11844051182286-git-send-email-madduck@madduck.net> (raw)
Uses $(CPP) to attempt to preprocess an include <openssl/sha.h> directive. If
that fails, NO_OPENSSL is defined, causing the Makefile to fall back to using
mozilla's SHA implementation.
This should possibly go to configure.ac, but maybe *also* to Makefile to make
from-source compilations easier. git HEAD already comes with a Makefile (rather
than a Makefile.in), so I just ran it while testing out patches. I introduced
the test because I thought the computer could find out about libssl for me,
rather than myself having to forget to specify NO_OPENSSL every time.
Signed-off-by: martin f. krafft <madduck@madduck.net>
---
Makefile | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index d7541b4..1676343 100644
--- a/Makefile
+++ b/Makefile
@@ -532,6 +532,12 @@ ifndef NO_CURL
endif
endif
+HAS_OPENSSL := $(shell echo "\#include <openssl/sha.h>" \
+ | $(CPP) -o/dev/null - 2>/dev/null || echo no)
+ifeq "$(HAS_OPENSSL)" "no"
+ NO_OPENSSL = "openssl_sha.h_not_found"
+endif
+
ifndef NO_OPENSSL
OPENSSL_LIBSSL = -lssl
ifdef OPENSSLDIR
--
1.5.3.rc1.9.gf029
next reply other threads:[~2007-07-14 10:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-14 9:25 martin f. krafft [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-07-14 9:24 [PATCH] fall back to mozilla's sha.h if openssl/sha.h is not available martin f. krafft
2007-07-14 14:23 ` Alex Riesen
2007-07-14 14:50 ` martin f krafft
2007-07-14 15:12 ` Alex Riesen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=11844051182286-git-send-email-madduck@madduck.net \
--to=madduck@madduck.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).