cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl 7.36.0, configure.ac, pkg-config and nghttp2

From: Dilyan Palauzov <Dilyan.Palauzov_at_aegee.org>
Date: Tue, 22 Apr 2014 15:23:25 +0200

Hello,

with this patch applied on top of git/master, running "./configure
--with-nghttp2" finds libnghttp2.

Howerver, running just "./configure" does not activate libnghttp2.
For the person configuring curl, it shall be clear by looking from
"./configure --help" which options are unnecessary to achieve certain
configuration, and which are needed to tweak something. This snippet
makes it clearer:

diff --git a/configure.ac b/configure.ac
index 0874d2e..95e49d0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2732,7 +2732,7 @@ AC_MSG_CHECKING([whether to build with nghttp2])
  OPT_H2="no"
  AC_ARG_WITH(nghttp2,
  AC_HELP_STRING([--with-nghttp2=PATH],[Enable nghttp2 usage])
-AC_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
+AC_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage [default]]),
    [OPT_H2=$withval])
  case "$OPT_H2" in
    no)

This practice shall be applied consistently over all options: Is with
"./configure" --enable-debug or --disable-debug active, and so on.

Kind regards
   Dilyan

----- Message from Daniel Stenberg <daniel_at_haxx.se> ---------
     Date: Tue, 22 Apr 2014 00:30:18 +0200 (CEST)
     From: Daniel Stenberg <daniel_at_haxx.se>
Reply-To: libcurl development <curl-library_at_cool.haxx.se>
  Subject: Re: curl 7.36.0, configure.ac, pkg-config and nghttp2
       To: libcurl development <curl-library_at_cool.haxx.se>

> On Mon, 21 Apr 2014, Dilyan Palauzov wrote:
>
>> Running curl 7.36.0/configure --with-nghttp2 calls
>> CURL_CHECK_PKGCONFIG("libnghttp2", "/lib/pkgconfig") from
>> acinclude.m4, which effectively sets PKG_CONFIG_LIBDIR via
>> CURL_EXPORT_PCDIR to "/lib/pkgconfig", so that "pkg-config" isn't
>> looking anymore in /usr/lib64/pkgconfig and failes to find (there)
>> libnghttp2, even if it is perfectly correct installed.
>
> Ack, the configure script wronly passes in a bad path when
> --with-nghttp2 is used without a path - I suspect that is still an
> exception. Please see my attached patch for a fix that I believe is
> correct. Please let me know if it works for you too!
>
> And btw, you might want curl from git or a daily snapshot and
> nghttp2 from git to be fairly sure they both build and work
> together...
>
> Thanks for your report!
>
> --
>
> / daniel.haxx.se

----- End message from Daniel Stenberg <daniel_at_haxx.se> -----

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-04-22