curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

7.78.0: configure: tweak nghttp2 library name fix

From: Christian Weisgerber via curl-library <curl-library_at_cool.haxx.se>
Date: Wed, 21 Jul 2021 21:38:22 +0200

This commit for curl 7.78.0...

configure: fix nghttp2 library name for static builds
https://github.com/curl/curl/commit/29c7cf79e8b44cfe98306a41a766d10e98c13d2b

... introduced a problem by assuming that LIB_H2 does not have any
leading whitespace. At least OpenBSD's native pkg-config can produce
such whitespace, though:

$ pkg-config --libs-only-l libnghttp2
 -lnghttp2

As a result, the configure check for libnghttp2 will erroneously
fail.

Similar variable manipulation elsewhere in configure.ac uses sed,
so I suggest to use the same idiom here:

--- configure.ac.orig
+++ configure.ac
_at__at_ -2541,7 +2541,7 _at__at_ if test X"$want_h2" != Xno; then
     LDFLAGS="$LDFLAGS $LD_H2"
     CPPFLAGS="$CPPFLAGS $CPP_H2"
     LIBS="$LIB_H2 $LIBS"
- LIB_H2_NAME=${LIB_H2#"-l"}
+ LIB_H2_NAME=`echo $LIB_H2 | $SED -e 's/-l//'`
 
     # use nghttp2_session_set_local_window_size to require nghttp2
     # >= 1.12.0

-- 
Christian "naddy" Weisgerber                          naddy_at_mips.inka.de
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2021-07-21