httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kot...@apache.org
Subject svn commit: r1771827 - in /httpd/httpd/trunk: CMakeLists.txt modules/filters/config.m4
Date Tue, 29 Nov 2016 00:00:28 GMT
Author: kotkov
Date: Tue Nov 29 00:00:28 2016
New Revision: 1771827

URL: http://svn.apache.org/viewvc?rev=1771827&view=rev
Log:
mod_brotli: Update makefiles to use the library layout of the official
Brotli repository.

With the recent update (https://github.com/google/brotli/pull/464), the
official repository now produces pkg-config metadata files (brotli.pc),
and has a fixed library layout (libbrotlicommon/libbrotlienc/libbrotlidec)
on both Windows and Linux.  Expect this layout in the makefiles, and take
advantage of the pkg-config metadata, if it's available.

Modified:
    httpd/httpd/trunk/CMakeLists.txt
    httpd/httpd/trunk/modules/filters/config.m4

Modified: httpd/httpd/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CMakeLists.txt?rev=1771827&r1=1771826&r2=1771827&view=diff
==============================================================================
--- httpd/httpd/trunk/CMakeLists.txt (original)
+++ httpd/httpd/trunk/CMakeLists.txt Tue Nov 29 00:00:28 2016
@@ -58,8 +58,8 @@ ELSE()
   SET(default_nghttp2_libraries "${CMAKE_INSTALL_PREFIX}/lib/nghttp2.lib")
 ENDIF()
 
-IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/brotli_enc.lib")
-  SET(default_brotli_libraries "${CMAKE_INSTALL_PREFIX}/lib/brotli_enc.lib" "${CMAKE_INSTALL_PREFIX}/lib/brotli_common.lib")
+IF(EXISTS "${CMAKE_INSTALL_PREFIX}/lib/brotlienc.lib")
+  SET(default_brotli_libraries "${CMAKE_INSTALL_PREFIX}/lib/brotlienc.lib" "${CMAKE_INSTALL_PREFIX}/lib/brotlicommon.lib")
 ELSE()
   SET(default_brotli_libraries)
 ENDIF()

Modified: httpd/httpd/trunk/modules/filters/config.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/config.m4?rev=1771827&r1=1771826&r2=1771827&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/filters/config.m4 (original)
+++ httpd/httpd/trunk/modules/filters/config.m4 Tue Nov 29 00:00:28 2016
@@ -159,18 +159,20 @@ const uint8_t *o = BrotliEncoderTakeOutp
       [AC_MSG_RESULT(yes)
        ap_brotli_found=yes
        ap_brotli_cflags="-I${ap_brotli_base}/include"
-       ap_brotli_libs="-L${ap_brotli_base}/lib -lbrotlienc"],
+       ap_brotli_libs="-L${ap_brotli_base}/lib -lbrotlienc -lbrotlicommon"],
       [AC_MSG_RESULT(no)]
     )
     CPPFLAGS=$ap_save_cppflags
   else
     if test -n "$PKGCONFIG"; then
-      AC_MSG_CHECKING([for Brotli library via pkg-config])
-      if $PKGCONFIG --exists "libbrotlienc"; then
+      AC_MSG_CHECKING([for Brotli library >= 1.0.0 via pkg-config])
+      if $PKGCONFIG --exists "brotli >= 1.0.0"; then
         AC_MSG_RESULT(yes)
         ap_brotli_found=yes
-        ap_brotli_cflags=`$PKGCONFIG libbrotlienc --cflags`
-        ap_brotli_libs=`$PKGCONFIG libbrotlienc --libs`
+        ap_brotli_cflags=`$PKGCONFIG brotli --cflags`
+        ap_brotli_libs=`$PKGCONFIG brotli --libs`
+        dnl We only support compression, drop -lbrotlidec.
+        APR_REMOVEFROM(ap_brotli_libs, [-lbrotlidec])
       else
         AC_MSG_RESULT(no)
       fi



Mime
View raw message