{"thread":{"id":"52792","subject":"How to force configure script to use curl ?","startedAt":"2020-02-12T22:08:12Z","lastAt":"2020-02-14T16:49:30Z","messageCount":6,"participants":["Philippe Blain","Christian Couder","Jeff King","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"391624","messageId":"A0910AA2-D24B-4DF5-8D39-8E2D8B56955B@gmail.com","threadId":"52792","inReplyTo":null,"subject":"How to force configure script to use curl ?","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2020-02-12T22:08:06Z","receivedAt":"2020-02-12T22:08:12Z","isPatch":false,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hi,\n\nI 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]. \n\nDoing just\n\n    ./configure \n    make\n\nbuilt Git without support for the http remote helper, as expected. \n\nHowever, doing \n\n    ./configure --with-curl\n    make\n\ndid the same; it did not result in an error saying that the curl headers could not be found (which I expected). \n\nIs 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?)\n\nThanks,\n\nPhilippe. \n\n[1] this is one of the package suggested by the progit book :\nhttps://git-scm.com/book/en/v2/Getting-Started-Installing-Git\n\n"},{"id":"391652","messageId":"CAP8UFD3Xi_56qqiDstquHZ9i=RDF_ka7NJMniiw5cvcrV90oLA@mail.gmail.com","threadId":"52792","inReplyTo":"A0910AA2-D24B-4DF5-8D39-8E2D8B56955B@gmail.com","subject":"Re: How to force configure script to use curl ?","fromName":"Christian Couder","fromEmail":"christian.couder@gmail.com","sentAt":"2020-02-13T10:07:28Z","receivedAt":"2020-02-13T10:07:43Z","isPatch":false,"sender":{"key":"christian.couder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/208954?v=4"},"body":"Hi,\n\nOn Wed, Feb 12, 2020 at 11:09 PM Philippe Blain\n<levraiphilippeblain@gmail.com> wrote:\n\n> 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].\n>\n> Doing just\n>\n>     ./configure\n>     make\n>\n> built Git without support for the http remote helper, as expected.\n>\n> However, doing\n>\n>     ./configure --with-curl\n>     make\n>\n> did the same; it did not result in an error saying that the curl headers could not be found (which I expected).\n>\n> 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?)\n\nUsing the configure script is not needed. Building Git using just a\nmake command can work.\n\nYou might want to try it and see if it fails as you expect when\nlibcurl4-gnutls-dev is not installed.\n\nIn the top level Makefile you can see all the variables that can be\nset to customize the build.\n\nThese days the configure infrastructure is not as well maintained as\nthe Makefile.\n\nBest,\nChristian.\n"},{"id":"391738","messageId":"20200214061714.GA605125@coredump.intra.peff.net","threadId":"52792","inReplyTo":"A0910AA2-D24B-4DF5-8D39-8E2D8B56955B@gmail.com","subject":"Re: How to force configure script to use curl ?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-02-14T06:17:14Z","receivedAt":"2020-02-14T06:17:17Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Wed, Feb 12, 2020 at 05:08:06PM -0500, Philippe Blain wrote:\n\n> Is there a way to force the configure script to error out if it does\n> not find curl (or any one of the optional dependencies that I happen\n> to need for my build?)\n\nI don't think so. It would probably be possible for configure.ac to\nbehave this way. Looking at the code, I think GIT_PARSE_WITH would have\nto record the affirmative for \"--with\" instead of just canceling a\nprevious \"--without\", and then the part that does curl auto-detection\nwould need to complain if it doesn't find curl at that point.\n\nBut our use of autoconf is not very extensive, and in fact most\ndevelopers do not use it at all. If you know you want curl, you're\nbetter off just overriding it explicitly with the Makefile knob:\n\n  make NO_CURL=\n\nor:\n\n  echo NO_CURL= >>config.mak\n  make\n\nEither of those will override the NO_CURL setting done by the configure\nscript (you can see the full list of knobs set by configure in\nconfig.mak.autogen).\n\n-Peff\n"},{"id":"391763","messageId":"xmqqh7ztp1tz.fsf@gitster-ct.c.googlers.com","threadId":"52792","inReplyTo":"20200214061714.GA605125@coredump.intra.peff.net","subject":"Re: How to force configure script to use curl ?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2020-02-14T16:31:52Z","receivedAt":"2020-02-14T16:32:04Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jeff King <peff@peff.net> writes:\n\n> But our use of autoconf is not very extensive, and in fact most\n> developers do not use it at all. If you know you want curl, you're\n> better off just overriding it explicitly with the Makefile knob:\n>\n>   make NO_CURL=\n>\n> or:\n>\n>   echo NO_CURL= >>config.mak\n>   make\n>\n> Either of those will override the NO_CURL setting done by the configure\n> script (you can see the full list of knobs set by configure in\n> config.mak.autogen).\n\nHeh, I didn't even know that things were expected to work if you\nfurther tweak ./configure generated settings.  \n\nYou are correct to point out that our use of autoconf is merely is\nan afterthought ;-), and the list of knobs near the top of Makefile\nis more authoritative and fresh than what configure.in knows about.\n\nThanks.\n\n"},{"id":"391764","messageId":"20200214164357.GA652734@coredump.intra.peff.net","threadId":"52792","inReplyTo":"xmqqh7ztp1tz.fsf@gitster-ct.c.googlers.com","subject":"Re: How to force configure script to use curl ?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2020-02-14T16:43:57Z","receivedAt":"2020-02-14T16:44:00Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Fri, Feb 14, 2020 at 08:31:52AM -0800, Junio C Hamano wrote:\n\n> > Either of those will override the NO_CURL setting done by the configure\n> > script (you can see the full list of knobs set by configure in\n> > config.mak.autogen).\n> \n> Heh, I didn't even know that things were expected to work if you\n> further tweak ./configure generated settings.\n\nI always assume the order of includes was intentional to provide a\npriority from low to high:\n\n  - platform defaults in config.mak.uname\n\n  - auto-detected defaults in config.mak.autogen\n\n  - explict user-provided settings in config.mak\n\n  - command-line overrides when you're trying to debug something. ;)\n\nThe last one is due to \"make\" being sensible, but the rest come from our\norder in the Makefile.\n\n-Peff\n"},{"id":"391765","messageId":"EF7D86BC-9EF7-4333-A786-2EC7DCF72C74@gmail.com","threadId":"52792","inReplyTo":"20200214061714.GA605125@coredump.intra.peff.net","subject":"Re: How to force configure script to use curl ?","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2020-02-14T16:49:25Z","receivedAt":"2020-02-14T16:49:30Z","isPatch":false,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hi Peff,\n\nThanks for a very sensible suggestion!\n\nPhilippe. \n\n> Le 14 févr. 2020 à 01:17, Jeff King <peff@peff.net> a écrit :\n> \n>> On Wed, Feb 12, 2020 at 05:08:06PM -0500, Philippe Blain wrote:\n>> \n>> Is there a way to force the configure script to error out if it does\n>> not find curl (or any one of the optional dependencies that I happen\n>> to need for my build?)\n> \n> I don't think so. It would probably be possible for configure.ac to\n> behave this way. Looking at the code, I think GIT_PARSE_WITH would have\n> to record the affirmative for \"--with\" instead of just canceling a\n> previous \"--without\", and then the part that does curl auto-detection\n> would need to complain if it doesn't find curl at that point.\n> \n> But our use of autoconf is not very extensive, and in fact most\n> developers do not use it at all. If you know you want curl, you're\n> better off just overriding it explicitly with the Makefile knob:\n> \n>  make NO_CURL=\n> \n> or:\n> \n>  echo NO_CURL= >>config.mak\n>  make\n> \n> Either of those will override the NO_CURL setting done by the configure\n> script (you can see the full list of knobs set by configure in\n> config.mak.autogen).\n> \n> -Peff\n"}]}