git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* How to force configure script to use curl ?
@ 2020-02-12 22:08 Philippe Blain
  2020-02-13 10:07 ` Christian Couder
  2020-02-14  6:17 ` Jeff King
  0 siblings, 2 replies; 6+ messages in thread
From: Philippe Blain @ 2020-02-12 22:08 UTC (permalink / raw)
  To: git

Hi,

I was trying to build Git yesterday on a Ubuntu 14 machine that was missing the package "libcurl4-gnutls-dev" necessary to build the http(s) remote helper [1]. 

Doing just

    ./configure 
    make

built Git without support for the http remote helper, as expected. 

However, doing 

    ./configure --with-curl
    make

did the same; it did not result in an error saying that the curl headers could not be found (which I expected). 

Is there a way to force the configure script to error out if it does not find curl (or any one of the optional dependencies that I happen to need for my build?)

Thanks,

Philippe. 

[1] this is one of the package suggested by the progit book :
https://git-scm.com/book/en/v2/Getting-Started-Installing-Git


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

* Re: How to force configure script to use curl ?
  2020-02-12 22:08 How to force configure script to use curl ? Philippe Blain
@ 2020-02-13 10:07 ` Christian Couder
  2020-02-14  6:17 ` Jeff King
  1 sibling, 0 replies; 6+ messages in thread
From: Christian Couder @ 2020-02-13 10:07 UTC (permalink / raw)
  To: Philippe Blain; +Cc: git

Hi,

On Wed, Feb 12, 2020 at 11:09 PM Philippe Blain
<levraiphilippeblain@gmail.com> wrote:

> I was trying to build Git yesterday on a Ubuntu 14 machine that was missing the package "libcurl4-gnutls-dev" necessary to build the http(s) remote helper [1].
>
> Doing just
>
>     ./configure
>     make
>
> built Git without support for the http remote helper, as expected.
>
> However, doing
>
>     ./configure --with-curl
>     make
>
> did the same; it did not result in an error saying that the curl headers could not be found (which I expected).
>
> Is there a way to force the configure script to error out if it does not find curl (or any one of the optional dependencies that I happen to need for my build?)

Using the configure script is not needed. Building Git using just a
make command can work.

You might want to try it and see if it fails as you expect when
libcurl4-gnutls-dev is not installed.

In the top level Makefile you can see all the variables that can be
set to customize the build.

These days the configure infrastructure is not as well maintained as
the Makefile.

Best,
Christian.

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

* Re: How to force configure script to use curl ?
  2020-02-12 22:08 How to force configure script to use curl ? Philippe Blain
  2020-02-13 10:07 ` Christian Couder
@ 2020-02-14  6:17 ` Jeff King
  2020-02-14 16:31   ` Junio C Hamano
  2020-02-14 16:49   ` Philippe Blain
  1 sibling, 2 replies; 6+ messages in thread
From: Jeff King @ 2020-02-14  6:17 UTC (permalink / raw)
  To: Philippe Blain; +Cc: git

On Wed, Feb 12, 2020 at 05:08:06PM -0500, Philippe Blain wrote:

> Is there a way to force the configure script to error out if it does
> not find curl (or any one of the optional dependencies that I happen
> to need for my build?)

I don't think so. It would probably be possible for configure.ac to
behave this way. Looking at the code, I think GIT_PARSE_WITH would have
to record the affirmative for "--with" instead of just canceling a
previous "--without", and then the part that does curl auto-detection
would need to complain if it doesn't find curl at that point.

But our use of autoconf is not very extensive, and in fact most
developers do not use it at all. If you know you want curl, you're
better off just overriding it explicitly with the Makefile knob:

  make NO_CURL=

or:

  echo NO_CURL= >>config.mak
  make

Either of those will override the NO_CURL setting done by the configure
script (you can see the full list of knobs set by configure in
config.mak.autogen).

-Peff

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

* Re: How to force configure script to use curl ?
  2020-02-14  6:17 ` Jeff King
@ 2020-02-14 16:31   ` Junio C Hamano
  2020-02-14 16:43     ` Jeff King
  2020-02-14 16:49   ` Philippe Blain
  1 sibling, 1 reply; 6+ messages in thread
From: Junio C Hamano @ 2020-02-14 16:31 UTC (permalink / raw)
  To: Jeff King; +Cc: Philippe Blain, git

Jeff King <peff@peff.net> writes:

> But our use of autoconf is not very extensive, and in fact most
> developers do not use it at all. If you know you want curl, you're
> better off just overriding it explicitly with the Makefile knob:
>
>   make NO_CURL=
>
> or:
>
>   echo NO_CURL= >>config.mak
>   make
>
> Either of those will override the NO_CURL setting done by the configure
> script (you can see the full list of knobs set by configure in
> config.mak.autogen).

Heh, I didn't even know that things were expected to work if you
further tweak ./configure generated settings.  

You are correct to point out that our use of autoconf is merely is
an afterthought ;-), and the list of knobs near the top of Makefile
is more authoritative and fresh than what configure.in knows about.

Thanks.


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

* Re: How to force configure script to use curl ?
  2020-02-14 16:31   ` Junio C Hamano
@ 2020-02-14 16:43     ` Jeff King
  0 siblings, 0 replies; 6+ messages in thread
From: Jeff King @ 2020-02-14 16:43 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Philippe Blain, git

On Fri, Feb 14, 2020 at 08:31:52AM -0800, Junio C Hamano wrote:

> > Either of those will override the NO_CURL setting done by the configure
> > script (you can see the full list of knobs set by configure in
> > config.mak.autogen).
> 
> Heh, I didn't even know that things were expected to work if you
> further tweak ./configure generated settings.

I always assume the order of includes was intentional to provide a
priority from low to high:

  - platform defaults in config.mak.uname

  - auto-detected defaults in config.mak.autogen

  - explict user-provided settings in config.mak

  - command-line overrides when you're trying to debug something. ;)

The last one is due to "make" being sensible, but the rest come from our
order in the Makefile.

-Peff

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

* Re: How to force configure script to use curl ?
  2020-02-14  6:17 ` Jeff King
  2020-02-14 16:31   ` Junio C Hamano
@ 2020-02-14 16:49   ` Philippe Blain
  1 sibling, 0 replies; 6+ messages in thread
From: Philippe Blain @ 2020-02-14 16:49 UTC (permalink / raw)
  To: Jeff King; +Cc: git

Hi Peff,

Thanks for a very sensible suggestion!

Philippe. 

> Le 14 févr. 2020 à 01:17, Jeff King <peff@peff.net> a écrit :
> 
>> On Wed, Feb 12, 2020 at 05:08:06PM -0500, Philippe Blain wrote:
>> 
>> Is there a way to force the configure script to error out if it does
>> not find curl (or any one of the optional dependencies that I happen
>> to need for my build?)
> 
> I don't think so. It would probably be possible for configure.ac to
> behave this way. Looking at the code, I think GIT_PARSE_WITH would have
> to record the affirmative for "--with" instead of just canceling a
> previous "--without", and then the part that does curl auto-detection
> would need to complain if it doesn't find curl at that point.
> 
> But our use of autoconf is not very extensive, and in fact most
> developers do not use it at all. If you know you want curl, you're
> better off just overriding it explicitly with the Makefile knob:
> 
>  make NO_CURL=
> 
> or:
> 
>  echo NO_CURL= >>config.mak
>  make
> 
> Either of those will override the NO_CURL setting done by the configure
> script (you can see the full list of knobs set by configure in
> config.mak.autogen).
> 
> -Peff

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

end of thread, other threads:[~2020-02-14 16:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-12 22:08 How to force configure script to use curl ? Philippe Blain
2020-02-13 10:07 ` Christian Couder
2020-02-14  6:17 ` Jeff King
2020-02-14 16:31   ` Junio C Hamano
2020-02-14 16:43     ` Jeff King
2020-02-14 16:49   ` Philippe Blain

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).