git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* configure: is NEEDS_SSL_WITH_CRYPTO test correct?
@ 2009-07-21 15:29 Brandon Casey
  2009-07-21 18:49 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Brandon Casey @ 2009-07-21 15:29 UTC (permalink / raw)
  To: Junio C Hamano, Jakub Narebski; +Cc: Git Mailing List


>From configure.ac, but re-nested:

AC_CHECK_LIB([crypto], [SHA1_Init],
   [NEEDS_SSL_WITH_CRYPTO=],
   [AC_CHECK_LIB([ssl], [SHA1_Init],
      [NEEDS_SSL_WITH_CRYPTO=YesPlease NEEDS_SSL_WITH_CRYPTO=],
      [NO_OPENSSL=YesPlease])])

should it rather be:

AC_CHECK_LIB([crypto], [SHA1_Init],
   [NEEDS_SSL_WITH_CRYPTO=],
   [AC_CHECK_LIB([ssl], [SHA1_Init],
      [NEEDS_SSL_WITH_CRYPTO=YesPlease],
      [NEEDS_SSL_WITH_CRYPTO= NO_OPENSSL=YesPlease])])

Notice the pairing of "action" parameters to the inner AC_CHECK_LIB().
The first one seems to set, and then unset NEEDS_SSL_WITH_CRYPTO.  Not
sure what is going on there.  Was the unsetting of NEEDS_SSL_WITH_CRYPTO
supposed to go into the action-if-not-found section?

-brandon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: configure: is NEEDS_SSL_WITH_CRYPTO test correct?
  2009-07-21 15:29 configure: is NEEDS_SSL_WITH_CRYPTO test correct? Brandon Casey
@ 2009-07-21 18:49 ` Junio C Hamano
  2009-07-22 22:20   ` [PATCH] configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing Brandon Casey
  2009-07-22 22:20   ` Brandon Casey
  0 siblings, 2 replies; 4+ messages in thread
From: Junio C Hamano @ 2009-07-21 18:49 UTC (permalink / raw)
  To: Brandon Casey; +Cc: Jakub Narebski, Git Mailing List

Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil> writes:

> From configure.ac, but re-nested:
>
> AC_CHECK_LIB([crypto], [SHA1_Init],
>    [NEEDS_SSL_WITH_CRYPTO=],
>    [AC_CHECK_LIB([ssl], [SHA1_Init],
>       [NEEDS_SSL_WITH_CRYPTO=YesPlease NEEDS_SSL_WITH_CRYPTO=],
>       [NO_OPENSSL=YesPlease])])

Yuck.

> should it rather be:
>
> AC_CHECK_LIB([crypto], [SHA1_Init],
>    [NEEDS_SSL_WITH_CRYPTO=],
>    [AC_CHECK_LIB([ssl], [SHA1_Init],
>       [NEEDS_SSL_WITH_CRYPTO=YesPlease],
>       [NEEDS_SSL_WITH_CRYPTO= NO_OPENSSL=YesPlease])])

We expect to find SHA1_Init in -lcrypto, and if we find it there we do not
do anything funky.  If we do not find it in -lcrypto, we try -lssl and if
we find it then we know we do need -lssl when saying -lcrypto.  Otherwise
we do not seem to have OpenSSL.

That is how I read your version, and it makes perfect sense to me.

> Notice the pairing of "action" parameters to the inner AC_CHECK_LIB().
> The first one seems to set, and then unset NEEDS_SSL_WITH_CRYPTO.  Not
> sure what is going on there.  Was the unsetting of NEEDS_SSL_WITH_CRYPTO
> supposed to go into the action-if-not-found section?

Thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing
  2009-07-21 18:49 ` Junio C Hamano
@ 2009-07-22 22:20   ` Brandon Casey
  2009-07-22 22:20   ` Brandon Casey
  1 sibling, 0 replies; 4+ messages in thread
From: Brandon Casey @ 2009-07-22 22:20 UTC (permalink / raw)
  To: gitster; +Cc: git, jnareb, Brandon Casey

From: Brandon Casey <drafnel@gmail.com>

The empty assignment NEEDS_SSL_WITH_CRYPTO= was mistakenly paired with the
assignment NEEDS_SSL_WITH_CRYPTO=YesPlease in the "action-if-found"
parameter of the AC_CHECK_LIB macro.  The empty assignment was intended for
the "action-if-not-found" section, since in that case, the necessary sha1
hash function was not found and the internal sha1 implementation will be
used instead.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
---


If you haven't already fixed this, here's a patch to do so.

-brandon


 configure.ac |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index ba44cf2..3f1922d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -342,9 +342,8 @@ GIT_STASH_FLAGS($OPENSSLDIR)
 AC_CHECK_LIB([crypto], [SHA1_Init],
 [NEEDS_SSL_WITH_CRYPTO=],
 [AC_CHECK_LIB([ssl], [SHA1_Init],
- [NEEDS_SSL_WITH_CRYPTO=YesPlease
-  NEEDS_SSL_WITH_CRYPTO=],
- [NO_OPENSSL=YesPlease])])
+ [NEEDS_SSL_WITH_CRYPTO=YesPlease],
+ [NEEDS_SSL_WITH_CRYPTO= NO_OPENSSL=YesPlease])])
 
 GIT_UNSTASH_FLAGS($OPENSSLDIR)
 
-- 
1.6.3.1.24.g152f4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH] configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing
  2009-07-21 18:49 ` Junio C Hamano
  2009-07-22 22:20   ` [PATCH] configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing Brandon Casey
@ 2009-07-22 22:20   ` Brandon Casey
  1 sibling, 0 replies; 4+ messages in thread
From: Brandon Casey @ 2009-07-22 22:20 UTC (permalink / raw)
  To: gitster; +Cc: git, jnareb, Brandon Casey

From: Brandon Casey <drafnel@gmail.com>

The empty assignment NEEDS_SSL_WITH_CRYPTO= was mistakenly paired with the
assignment NEEDS_SSL_WITH_CRYPTO=YesPlease in the "action-if-found"
parameter of the AC_CHECK_LIB macro.  The empty assignment was intended for
the "action-if-not-found" section, since in that case, the necessary sha1
hash function was not found and the internal sha1 implementation will be
used instead.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
---


If you haven't already fixed this, here's a patch to do so.

-brandon


 configure.ac |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index ba44cf2..3f1922d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -342,9 +342,8 @@ GIT_STASH_FLAGS($OPENSSLDIR)
 AC_CHECK_LIB([crypto], [SHA1_Init],
 [NEEDS_SSL_WITH_CRYPTO=],
 [AC_CHECK_LIB([ssl], [SHA1_Init],
- [NEEDS_SSL_WITH_CRYPTO=YesPlease
-  NEEDS_SSL_WITH_CRYPTO=],
- [NO_OPENSSL=YesPlease])])
+ [NEEDS_SSL_WITH_CRYPTO=YesPlease],
+ [NEEDS_SSL_WITH_CRYPTO= NO_OPENSSL=YesPlease])])
 
 GIT_UNSTASH_FLAGS($OPENSSLDIR)
 
-- 
1.6.3.1.24.g152f4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-22 22:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-21 15:29 configure: is NEEDS_SSL_WITH_CRYPTO test correct? Brandon Casey
2009-07-21 18:49 ` Junio C Hamano
2009-07-22 22:20   ` [PATCH] configure.ac: properly unset NEEDS_SSL_WITH_CRYPTO when sha1 func is missing Brandon Casey
2009-07-22 22:20   ` Brandon Casey

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).