-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add autotools build * separate semantic and ABI version * extract sources.lst (used by CMake and Automake) * share pkgconfig templates (used by CMake and Automake) * decoder: always set `total_out` * encoder: fix `BROTLI_ENSURE_CAPACITY` macro (no-op after preprocessor) * decoder/encoder: refine `free_func` contract
- Loading branch information
Showing
17 changed files
with
302 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
AUTOMAKE_OPTIONS = foreign nostdinc subdir-objects | ||
|
||
ACLOCAL_AMFLAGS = -I m4 | ||
|
||
# Actual ABI version is substituted by bootstrap | ||
LIBBROTLI_VERSION_INFO = -version-info 0:0:0 | ||
|
||
bin_PROGRAMS = brotli | ||
lib_LTLIBRARIES = libbrotlicommon.la libbrotlidec.la libbrotlienc.la | ||
|
||
include scripts/sources.lst | ||
|
||
brotliincludedir = $(includedir)/brotli | ||
brotliinclude_HEADERS = $(BROTLI_INCLUDE) | ||
|
||
AM_CFLAGS = -I$(top_srcdir)/c/include | ||
|
||
brotli_SOURCES = $(BROTLI_CLI_C) | ||
brotli_LDADD = libbrotlidec.la libbrotlienc.la libbrotlicommon.la -lm | ||
#brotli_LDFLAGS = -static | ||
|
||
libbrotlicommon_la_SOURCES = $(BROTLI_COMMON_C) $(BROTLI_COMMON_H) | ||
libbrotlicommon_la_LDFLAGS = $(AM_LDFLAGS) $(LIBBROTLI_VERSION_INFO) $(LDFLAGS) | ||
libbrotlidec_la_SOURCES = $(BROTLI_DEC_C) $(BROTLI_DEC_H) | ||
libbrotlidec_la_LDFLAGS = $(AM_LDFLAGS) $(LIBBROTLI_VERSION_INFO) $(LDFLAGS) | ||
libbrotlienc_la_SOURCES = $(BROTLI_ENC_C) $(BROTLI_ENC_H) | ||
libbrotlienc_la_LDFLAGS = $(AM_LDFLAGS) $(LIBBROTLI_VERSION_INFO) $(LDFLAGS) | ||
|
||
pkgconfigdir = $(libdir)/pkgconfig | ||
pkgconfig_DATA = \ | ||
scripts/libbrotlicommon.pc \ | ||
scripts/libbrotlidec.pc \ | ||
scripts/libbrotlienc.pc | ||
pkgincludedir= $(brotliincludedir) | ||
|
||
dist_doc_DATA = README |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
BROTLI DATA COMPRESSIOM LIBRARY | ||
|
||
Brotli is a generic-purpose lossless compression algorithm that compresses data | ||
using a combination of a modern variant of the LZ77 algorithm, Huffman coding | ||
and 2nd order context modeling, with a compression ratio comparable to the best | ||
currently available general-purpose compression methods. It is similar in speed | ||
with deflate but offers more dense compression. | ||
|
||
The specification of the Brotli Compressed Data Format is defined in RFC 7932 | ||
https://tools.ietf.org/html/rfc7932 | ||
|
||
Brotli is open-sourced under the MIT License, see the LICENSE file. | ||
|
||
Brotli mailing list: | ||
https://groups.google.com/forum/#!forum/brotli |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# !/bin/sh -e | ||
|
||
mkdir m4 2>/dev/null | ||
|
||
BROTLI_ABI_HEX=`sed -n 's/#define BROTLI_ABI_VERSION 0x//p' c/common/version.h` | ||
BROTLI_ABI_INT=`echo $((16#$BROTLI_ABI_HEX))` | ||
BROTLI_ABI_CURRENT=$(($BROTLI_ABI_INT >> 24)) | ||
BROTLI_ABI_REVISION=$((($BROTLI_ABI_INT >> 12) & 4095)) | ||
BROTLI_ABI_AGE=$(($BROTLI_ABI_INT & 4095)) | ||
BROTLI_ABI_INFO="$BROTLI_ABI_CURRENT:$BROTLI_ABI_REVISION:$BROTLI_ABI_AGE" | ||
|
||
BROTLI_VERSION_HEX=`sed -n 's/#define BROTLI_VERSION 0x//p' c/common/version.h` | ||
BROTLI_VERSION_INT=`echo $((16#$BROTLI_VERSION_HEX))` | ||
BROTLI_VERSION_MAJOR=$(($BROTLI_VERSION_INT >> 24)) | ||
BROTLI_VERSION_MINOR=$((($BROTLI_VERSION_INT >> 12) & 4095)) | ||
BROTLI_VERSION_PATCH=$(($BROTLI_VERSION_INT & 4095)) | ||
BROTLI_VERSION="$BROTLI_VERSION_MAJOR.$BROTLI_VERSION_MINOR.$BROTLI_VERSION_PATCH" | ||
|
||
sed -r "s/[0-9]+:[0-9]+:[0-9]+/$BROTLI_ABI_INFO/" Makefile.am -i | ||
sed -r "s/\[[0-9]+\.[0-9]+\.[0-9]+\]/[$BROTLI_VERSION]/" configure.ac -i | ||
|
||
autoreconf --install --force --symlink || exit $ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#!/usr/bin/env bash | ||
echo "Use Bazel, CMake or Premake5 to generate projects / build files." | ||
echo "Use Autotools, Bazel, CMake or Premake5 to generate projects / build files." | ||
echo " Bazel: http://www.bazel.build/" | ||
echo " CMake: https://cmake.org/" | ||
echo " Premake5: https://premake.github.io/" | ||
echo "To generate Autotools 'configure' file run './bootstrap'." | ||
echo "Run './configure-cmake' for Autotools-like CMake configuration." | ||
echo "Or simply run 'make' to build and test command line tool." |
Oops, something went wrong.