]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
configure: fix nghttp2 library name for static builds
authort.artikov <t.artikov@2gis.ru>
Thu, 8 Jul 2021 20:11:14 +0000 (03:11 +0700)
committerJay Satiro <raysatiro@yahoo.com>
Fri, 16 Jul 2021 17:34:39 +0000 (13:34 -0400)
Don't hardcode the nghttp2 library name,
because it can vary, be "nghttp2_static" for example.

Fixes https://github.com/curl/curl/issues/7367
Closes https://github.com/curl/curl/pull/7368

configure.ac

index 9dffa6b2f2dd66345465a06b3517b2f8f2265992..dc8e416e4579200fb2673f92b42ff68ebc58f917 100644 (file)
@@ -2541,10 +2541,11 @@ 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"}
 
     # use nghttp2_session_set_local_window_size to require nghttp2
     # >= 1.12.0
-    AC_CHECK_LIB(nghttp2, nghttp2_session_set_local_window_size,
+    AC_CHECK_LIB($LIB_H2_NAME, nghttp2_session_set_local_window_size,
       [
        AC_CHECK_HEADERS(nghttp2/nghttp2.h,
           curl_h2_msg="enabled (nghttp2)"