]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
winbuild: support alternate nghttp2 static lib name
authorJay Satiro <raysatiro@yahoo.com>
Mon, 19 Jul 2021 17:59:06 +0000 (13:59 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 20 Jul 2021 06:16:15 +0000 (02:16 -0400)
- Support both nghttp2.lib and nghttp2_static.lib for static nghttp2.

nghttp2 briefly changed its static lib name to nghttp2_static, but then
made the _static suffix optional.

Ref: https://github.com/nghttp2/nghttp2/pull/1394
Ref: https://github.com/nghttp2/nghttp2/pull/1418
Ref: https://github.com/nghttp2/nghttp2/issues/1466

Reported-by: Pierre Yager
Fixes https://github.com/curl/curl/issues/7446
Closes https://github.com/curl/curl/pull/7447

winbuild/MakefileBuild.vc

index 4112b8fca3e6c58df60cf8003dd765c480c2f396..6f5b1d168d2b76f4b9f7aeeec4e32674128ccced 100644 (file)
@@ -157,7 +157,11 @@ NGHTTP2_CFLAGS   = /DUSE_NGHTTP2 /I"$(NGHTTP2_INC_DIR)"
 NGHTTP2_LIBS     = nghttp2.lib\r
 !ELSEIF "$(WITH_NGHTTP2)"=="static"\r
 NGHTTP2_CFLAGS   = /DUSE_NGHTTP2 /DNGHTTP2_STATICLIB /I"$(NGHTTP2_INC_DIR)"\r
+!IF EXISTS("$(NGHTTP2_LIB_DIR)\nghttp2_static.lib")\r
 NGHTTP2_LIBS     = nghttp2_static.lib\r
+!ELSE\r
+NGHTTP2_LIBS     = nghttp2.lib\r
+!ENDIF\r
 !ENDIF\r
 \r
 \r