summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-16 10:06:41 -0800
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-02-16 10:06:41 -0800
commitda8ac70de2bb45092574084d89272e07c75796e2 (patch)
tree7f90fceeaafe89acc08cc2720705d140a4aaad8e
parent46aa5c0bf95c60361f9ec3d354b033785df8cd5f (diff)
downloadxorg-font-util-da8ac70de2bb45092574084d89272e07c75796e2.tar.gz
Add COMPRESS_FLAGS to pass options to compression command
By default, set to -n for gzip to stop recording timestamps and enable reproducible builds, and to empty for all other methods. Will require adding COMPRESS_FLAGS to Makefile.am in each font module to become effective. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--fontutil.m4.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/fontutil.m4.in b/fontutil.m4.in
index ff2f053..43694eb 100644
--- a/fontutil.m4.in
+++ b/fontutil.m4.in
@@ -248,6 +248,10 @@ AC_DEFUN([XORG_FONT_BDF_UTILS],[
# Offer a --with-compression flag to control what compression method is
# used for pcf font files. Offers all the methods currently supported
# by libXfont, including no compression.
+#
+# If COMPRESS_FLAGS is not set, and the compression method has flags needed
+# for reproducible builds, such as gzip -n to not record timestamp, will
+# set COMPRESS_FLAGS to those options.
AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
AC_MSG_CHECKING([font compression method])
@@ -261,7 +265,8 @@ AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
AC_MSG_RESULT([${compression}])
case ${compression} in
*compress) COMPRESS_SUFFIX=".Z" ;;
- *gzip) COMPRESS_SUFFIX=".gz" ;;
+ *gzip) COMPRESS_SUFFIX=".gz" ;
+ COMPRESS_FLAGS="${COMPRESS_FLAGS--n}" ;;
*bzip2) COMPRESS_SUFFIX=".bz2" ;;
no|none) COMPRESS_SUFFIX="" ; COMPRESS="cat" ;;
*) AC_MSG_ERROR([${compression} is not a supported compression method]) ;;
@@ -269,6 +274,9 @@ AC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
if test x"$COMPRESS_SUFFIX" != "x" ; then
XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression})
fi
+ AC_MSG_CHECKING([options to font compression command])
+ AC_MSG_RESULT([${COMPRESS_FLAGS:-none}])
+ AC_SUBST([COMPRESS_FLAGS])
AC_SUBST([COMPRESS_SUFFIX])
])