git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / 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, back to index

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

git@vger.kernel.org list mirror (unofficial, one of many)

Archives are clonable:
	git clone --mirror https://public-inbox.org/git
	git clone --mirror http://ou63pmih66umazou.onion/git
	git clone --mirror http://czquwvybam4bgbro.onion/git
	git clone --mirror http://hjrcffqmbrq6wope.onion/git

Example config snippet for mirrors

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.version-control.git
	nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git
	nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git
	nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git
	nntp://news.gmane.io/gmane.comp.version-control.git

 note: .onion URLs require Tor: https://www.torproject.org/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git