[ 
https://issues.apache.org/jira/browse/DISPATCH-1950?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17279535#comment-17279535
 ] 

ASF GitHub Bot commented on DISPATCH-1950:
------------------------------------------

kgiusti commented on a change in pull request #1017:
URL: https://github.com/apache/qpid-dispatch/pull/1017#discussion_r570471612



##########
File path: cmake/Findlibnghttp2.cmake
##########
@@ -17,16 +17,31 @@
 # under the License.
 #
 
+# Sets LIBNGHTTP2_VERSION_STRING from nghttp2ver.h
+
 find_library(NGHTTP2_LIBRARIES
   NAMES libnghttp2 nghttp2
 )
 
 find_path(NGHTTP2_INCLUDE_DIRS
-  NAMES "nghttp2/nghttp2.h"
+  NAMES "nghttp2/nghttp2.h" "nghttp2/nghttp2ver.h"
   HINTS "${CMAKE_INSTALL_PREFIX}/include"
   PATHS "/usr/include"
 )
 
-include(FindPackageHandleStandardArgs)
+if(NGHTTP2_INCLUDE_DIRS AND EXISTS 
"${NGHTTP2_INCLUDE_DIRS}/nghttp2/nghttp2ver.h")
+  # Extract the version info from nghttp2ver.h and set it in 
LIBNGHTTP2_VERSION_STRING
+  file(STRINGS "${NGHTTP2_INCLUDE_DIRS}/nghttp2/nghttp2ver.h" 
libnghttp2_version_str
+    REGEX "^#define[ \t]+NGHTTP2_VERSION[ \t]+\"[^\"]+\"")
+  string(REGEX REPLACE "^#define[ \t]+NGHTTP2_VERSION[ \t]+\"([^\"]+)\".*" 
"\\1"
+    LIBNGHTTP2_VERSION_STRING "${libnghttp2_version_str}")
+  unset(libnghttp2_version_str)
+endif()
+
+if (LIBNGHTTP2_VERSION_STRING AND libnghttp2_FIND_VERSION AND 
(LIBNGHTTP2_VERSION_STRING VERSION_LESS libnghttp2_FIND_VERSION))
+  message(STATUS "Found libnghttp2 version ${LIBNGHTTP2_VERSION_STRING} but at 
least ${libnghttp2_FIND_VERSION} is required. http2 support is disabled")

Review comment:
       probably should be message(WARNING.. not STATUS

##########
File path: cmake/Findlibnghttp2.cmake
##########
@@ -17,16 +17,31 @@
 # under the License.
 #
 
+# Sets LIBNGHTTP2_VERSION_STRING from nghttp2ver.h
+
 find_library(NGHTTP2_LIBRARIES
   NAMES libnghttp2 nghttp2
 )
 
 find_path(NGHTTP2_INCLUDE_DIRS
-  NAMES "nghttp2/nghttp2.h"
+  NAMES "nghttp2/nghttp2.h" "nghttp2/nghttp2ver.h"
   HINTS "${CMAKE_INSTALL_PREFIX}/include"
   PATHS "/usr/include"
 )
 
-include(FindPackageHandleStandardArgs)
+if(NGHTTP2_INCLUDE_DIRS AND EXISTS 
"${NGHTTP2_INCLUDE_DIRS}/nghttp2/nghttp2ver.h")
+  # Extract the version info from nghttp2ver.h and set it in 
LIBNGHTTP2_VERSION_STRING
+  file(STRINGS "${NGHTTP2_INCLUDE_DIRS}/nghttp2/nghttp2ver.h" 
libnghttp2_version_str
+    REGEX "^#define[ \t]+NGHTTP2_VERSION[ \t]+\"[^\"]+\"")
+  string(REGEX REPLACE "^#define[ \t]+NGHTTP2_VERSION[ \t]+\"([^\"]+)\".*" 
"\\1"
+    LIBNGHTTP2_VERSION_STRING "${libnghttp2_version_str}")
+  unset(libnghttp2_version_str)
+endif()
+
+if (LIBNGHTTP2_VERSION_STRING AND libnghttp2_FIND_VERSION AND 
(LIBNGHTTP2_VERSION_STRING VERSION_LESS libnghttp2_FIND_VERSION))
+  message(STATUS "Found libnghttp2 version ${LIBNGHTTP2_VERSION_STRING} but at 
least ${libnghttp2_FIND_VERSION} is required. http2 support is disabled")

Review comment:
       nevermind - I see STATUS is used elsewhere...




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


> Knock down the minimum required version of the nghttp2 library to 1.33.0
> ------------------------------------------------------------------------
>
>                 Key: DISPATCH-1950
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-1950
>             Project: Qpid Dispatch
>          Issue Type: Bug
>            Reporter: Ganesh Murthy
>            Assignee: Ganesh Murthy
>            Priority: Major
>             Fix For: 1.15.0
>
>
> # Currently the minimum required version of libnghttp2 is set to 1.4. This is 
> wrong, it is supposed to be 1.40.0. But we want to to get it further down to 
> 1.33.0 cause this version is widely available.
>  # Also, make sure the http2_adaptor.c really does not compile if the 
> available library version if less than 1.33.0. Instead http2_adaptor_none.c 
> should compile. Right now, http2_adaptor.c complies if any version of 
> libnghttp2 is found.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to