git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Brandon Casey <brandon.casey.ctr@nrlssc.navy.mil>
Cc: Jakub Narebski <jnareb@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: configure: is NEEDS_SSL_WITH_CRYPTO test correct?
Date: Tue, 21 Jul 2009 11:49:29 -0700	[thread overview]
Message-ID: <7vk521g9c6.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <TV3HaUyeB7DH8euAZskzz1ryGof9Nj4sfUP9TBnI8xKT3cuwWrFLpQ@cipher.nrlssc.navy.mil> (Brandon Casey's message of "Tue\, 21 Jul 2009 10\:29\:32 -0500")

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.

  reply	other threads:[~2009-07-21 18:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-21 15:29 configure: is NEEDS_SSL_WITH_CRYPTO test correct? Brandon Casey
2009-07-21 18:49 ` Junio C Hamano [this message]
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

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=7vk521g9c6.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=brandon.casey.ctr@nrlssc.navy.mil \
    --cc=git@vger.kernel.org \
    --cc=jnareb@gmail.com \
    /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).