winbuild: support alternate nghttp2 static lib name

- 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
This commit is contained in:
Jay Satiro 2021-07-19 13:59:06 -04:00
parent 95434681bf
commit 6b84f53686
1 changed files with 4 additions and 0 deletions

View File

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