Fossil SCM

Add a basic auto.def check for brotli compression support. The eventual goal of this branch is to add support for brotli-compressed http responses.

stephan 2025-03-31 20:26 trunk
Commit a90221b3aef149a6d1fc9ffb9cda9cb0b3756782d25f67ff11dd5ab7f768d380
1 file changed +8 -2
+8 -2
--- auto.def
+++ auto.def
@@ -439,10 +439,16 @@
439439
set ::zlib_lib -lz
440440
}
441441
}; # handle-zlib
442442
handle-zlib
443443
444
+if {[cc-check-includes brotli/encode.h]} {
445
+ # ^^^ In C code, check for #ifdef HAVE_BROTLI_ENCODE_H
446
+ cc-check-function-in-lib BrotliEncoderCompress brotlienc
447
+ # ^^^ In C code, check for #ifdef HAVE_BROTLIENCODERCOMPRESS
448
+}
449
+
444450
#
445451
# Handle the --with-openssl flag and, incidentally, update @LIBS@ for
446452
# zlib if openssl is _not_ used (if it is, we get zlib via libssl).
447453
#
448454
# This function should be called as late as possible in the configure
@@ -966,11 +972,11 @@
966972
# on 2025-02-27 in the context of check-in [8d3b9bf4d4].
967973
#
968974
# Note that [move-lib-to-end] and [lib-actually-exists] are in
969975
# autosetup/local.tcl.
970976
set libs [get-define LIBS]
971
- #puts "**** 1 LIBS: $libs"
977
+ #puts "**** LIBS: $libs"
972978
foreach ll {-ldl -lpthread -lm} {
973979
if {![move-lib-to-end $ll $libs libs]} {
974980
# $ll was not in the list
975981
if {[lib-actually-exists $ll]} {
976982
# Add it to the list "just in case." This will be a no-op on
@@ -977,12 +983,12 @@
977983
# systems where the lib is not actually used.
978984
lappend libs $ll
979985
}
980986
}
981987
}
982
- #puts "**** 2 LIBS: $libs"
983988
define LIBS [join $libs " "]
989
+ #puts "LIBS = $libs"
984990
}}
985991
986992
# Tag container builds with a prefix of the checkin ID of the version
987993
# of Fossil each one contains. This not only allows multiple images
988994
# to coexist and multiple containers to be created unamgiguosly from
989995
--- auto.def
+++ auto.def
@@ -439,10 +439,16 @@
439 set ::zlib_lib -lz
440 }
441 }; # handle-zlib
442 handle-zlib
443
 
 
 
 
 
 
444 #
445 # Handle the --with-openssl flag and, incidentally, update @LIBS@ for
446 # zlib if openssl is _not_ used (if it is, we get zlib via libssl).
447 #
448 # This function should be called as late as possible in the configure
@@ -966,11 +972,11 @@
966 # on 2025-02-27 in the context of check-in [8d3b9bf4d4].
967 #
968 # Note that [move-lib-to-end] and [lib-actually-exists] are in
969 # autosetup/local.tcl.
970 set libs [get-define LIBS]
971 #puts "**** 1 LIBS: $libs"
972 foreach ll {-ldl -lpthread -lm} {
973 if {![move-lib-to-end $ll $libs libs]} {
974 # $ll was not in the list
975 if {[lib-actually-exists $ll]} {
976 # Add it to the list "just in case." This will be a no-op on
@@ -977,12 +983,12 @@
977 # systems where the lib is not actually used.
978 lappend libs $ll
979 }
980 }
981 }
982 #puts "**** 2 LIBS: $libs"
983 define LIBS [join $libs " "]
 
984 }}
985
986 # Tag container builds with a prefix of the checkin ID of the version
987 # of Fossil each one contains. This not only allows multiple images
988 # to coexist and multiple containers to be created unamgiguosly from
989
--- auto.def
+++ auto.def
@@ -439,10 +439,16 @@
439 set ::zlib_lib -lz
440 }
441 }; # handle-zlib
442 handle-zlib
443
444 if {[cc-check-includes brotli/encode.h]} {
445 # ^^^ In C code, check for #ifdef HAVE_BROTLI_ENCODE_H
446 cc-check-function-in-lib BrotliEncoderCompress brotlienc
447 # ^^^ In C code, check for #ifdef HAVE_BROTLIENCODERCOMPRESS
448 }
449
450 #
451 # Handle the --with-openssl flag and, incidentally, update @LIBS@ for
452 # zlib if openssl is _not_ used (if it is, we get zlib via libssl).
453 #
454 # This function should be called as late as possible in the configure
@@ -966,11 +972,11 @@
972 # on 2025-02-27 in the context of check-in [8d3b9bf4d4].
973 #
974 # Note that [move-lib-to-end] and [lib-actually-exists] are in
975 # autosetup/local.tcl.
976 set libs [get-define LIBS]
977 #puts "**** LIBS: $libs"
978 foreach ll {-ldl -lpthread -lm} {
979 if {![move-lib-to-end $ll $libs libs]} {
980 # $ll was not in the list
981 if {[lib-actually-exists $ll]} {
982 # Add it to the list "just in case." This will be a no-op on
@@ -977,12 +983,12 @@
983 # systems where the lib is not actually used.
984 lappend libs $ll
985 }
986 }
987 }
 
988 define LIBS [join $libs " "]
989 #puts "LIBS = $libs"
990 }}
991
992 # Tag container builds with a prefix of the checkin ID of the version
993 # of Fossil each one contains. This not only allows multiple images
994 # to coexist and multiple containers to be created unamgiguosly from
995

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button