--- a/configure
+++ b/configure
@@ -21551,6 +21551,7 @@
 if test "x$with_sha1" = xlibcrypto; then
 	if test "x$HAVE_LIBCRYPTO" = xyes; then
 		SHA1_LIBS=-lcrypto
+		SHA1_CFLAGS="$OPENSSL_CFLAGS"
 	else
 		SHA1_LIBS="$OPENSSL_LIBS"
 		SHA1_CFLAGS="$OPENSSL_CFLAGS"

Use OPENSSL_CFLAGS even if -lcrypto is used directly
Use OPENSSL_CFLAGS even if -lcrypto is used directly

OpenSSL headers are used even when the full set of OpenSSL libraries is
not used.
