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
From a5d7ec184826fb39f61e90f48b29b5783bca66a8 Mon Sep 17 00:00:00 2001
From: Daniel Stenberg <[email protected]>
Date: Tue, 22 Apr 2014 00:24:44 +0200
Subject: [PATCH] configure: use the nghttp2 path correctly with pkg-config
When --with-nghttp2 was used (without a given path), the
PKG_CONFIG_LIBDIR varialbe could get clobbered and ruin a proper
detection of the library.
Reported-by: Dilyan Palauzov
Bug: http://curl.haxx.se/mail/lib-2014-04/0159.html
---
configure.ac | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac
index 1467d69..0874d2e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2737,13 +2737,12 @@ AC_HELP_STRING([--without-nghttp2],[Disable nghttp2 usage]),
case "$OPT_H2" in
no)
dnl --without-nghttp2 option used
- want_idn="no"
+ want_h2="no"
AC_MSG_RESULT([no])
;;
default)
dnl configure option not specified
want_h2="no"
- want_h2_path="default"
AC_MSG_RESULT([no])
;;
yes)
@@ -2755,31 +2754,30 @@ case "$OPT_H2" in
*)
dnl --with-nghttp2 option used with path
want_h2="yes"
- want_h2_path="$withval"
+ want_h2_path="$withval/lib/pkgconfig"
AC_MSG_RESULT([yes ($withval)])
;;
esac
curl_h2_msg="disabled (--with-nghttp2)"
-if test X"$OPT_H2" != Xno; then
+if test X"$want_h2" != Xno; then
dnl backup the pre-nghttp2 variables
CLEANLDFLAGS="$LDFLAGS"
CLEANCPPFLAGS="$CPPFLAGS"
CLEANLIBS="$LIBS"
- h2pcdir=${want_h2_path}/lib/pkgconfig
- CURL_CHECK_PKGCONFIG(libnghttp2, $h2pcdir)
+ CURL_CHECK_PKGCONFIG(libnghttp2, $want_h2_path)
if test "$PKGCONFIG" != "no" ; then
- LIB_H2=`CURL_EXPORT_PCDIR([$h2pcdir])
+ LIB_H2=`CURL_EXPORT_PCDIR([$want_h2_path])
$PKGCONFIG --libs-only-l libnghttp2`
AC_MSG_NOTICE([-l is $LIB_H2])
- CPP_H2=`CURL_EXPORT_PCDIR([$h2pcdir]) dnl
+ CPP_H2=`CURL_EXPORT_PCDIR([$want_h2_path]) dnl
$PKGCONFIG --cflags-only-I libnghttp2`
AC_MSG_NOTICE([-I is $CPP_H2])
- LD_H2=`CURL_EXPORT_PCDIR([$h2pcdir])
+ LD_H2=`CURL_EXPORT_PCDIR([$want_h2_path])
$PKGCONFIG --libs-only-L libnghttp2`
AC_MSG_NOTICE([-L is $LD_H2])
--
1.9.2
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html