Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/public-domain/xz adjust for 5.2.1



details:   https://anonhg.NetBSD.org/src/rev/3e41880a5491
branches:  trunk
changeset: 807654:3e41880a5491
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Apr 17 18:49:23 2015 +0000

description:
adjust for 5.2.1

diffstat:

 external/public-domain/xz/bin/xz/Makefile                          |    4 +-
 external/public-domain/xz/dist/configure.ac                        |  691 +++++++++-
 external/public-domain/xz/dist/doc/examples/xz_pipe_comp.c         |  127 -
 external/public-domain/xz/dist/doc/examples/xz_pipe_decomp.c       |  115 -
 external/public-domain/xz/dist/src/liblzma/api/lzma/lzma.h         |  420 ------
 external/public-domain/xz/dist/src/liblzma/check/check.h           |   84 +-
 external/public-domain/xz/dist/src/liblzma/common/stream_encoder.h |   23 -
 external/public-domain/xz/include/config.h                         |  174 ++-
 external/public-domain/xz/lib/Makefile                             |   13 +-
 external/public-domain/xz/lib/shlib_version                        |    6 +-
 external/public-domain/xz/prepare-import.sh                        |    6 +-
 11 files changed, 941 insertions(+), 722 deletions(-)

diffs (truncated from 1964 to 300 lines):

diff -r 74ba6e8ab164 -r 3e41880a5491 external/public-domain/xz/bin/xz/Makefile
--- a/external/public-domain/xz/bin/xz/Makefile Fri Apr 17 18:36:15 2015 +0000
+++ b/external/public-domain/xz/bin/xz/Makefile Fri Apr 17 18:49:23 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1 2011/08/04 03:38:06 matt Exp $
+# $NetBSD: Makefile,v 1.2 2015/04/17 18:49:23 christos Exp $
 
 PROG=  xz
 BINDIR=        /usr/bin
@@ -6,7 +6,7 @@
        message.c options.c signals.c suffix.c util.c \
        tuklib_exit.c tuklib_cpucores.c tuklib_open_stdxxx.c \
        tuklib_mbstr_fw.c tuklib_mbstr_width.c \
-       tuklib_physmem.c tuklib_progname.c
+       tuklib_physmem.c tuklib_progname.c mytime.c
 
 USETBL=        yes
 
diff -r 74ba6e8ab164 -r 3e41880a5491 external/public-domain/xz/dist/configure.ac
--- a/external/public-domain/xz/dist/configure.ac       Fri Apr 17 18:36:15 2015 +0000
+++ b/external/public-domain/xz/dist/configure.ac       Fri Apr 17 18:49:23 2015 +0000
@@ -25,11 +25,156 @@
 AC_CANONICAL_HOST
 AC_USE_SYSTEM_EXTENSIONS
 
+# We do some special things on Windows (32-bit or 64-bit) builds.
+case $host_os in
+       mingw* | cygwin*) is_w32=yes ;;
+       *)                is_w32=no ;;
+esac
+AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
+
+# We need to use $EXEEXT with $(LN_S) when creating symlinks to
+# executables. Cygwin is an exception to this, since it is recommended
+# that symlinks don't have the .exe suffix. To make this work, we
+# define LN_EXEEXT.
+case $host_os in
+       cygwin)  LN_EXEEXT= ;;
+       *)       LN_EXEEXT='$(EXEEXT)' ;;
+esac
+AC_SUBST([LN_EXEEXT])
+
+echo
+echo "Configure options:"
+AM_CFLAGS=
+
+
+#############
+# Debugging #
+#############
+
+AC_MSG_CHECKING([if debugging code should be compiled])
+AC_ARG_ENABLE([debug], AS_HELP_STRING([--enable-debug], [Enable debugging code.]),
+       [], enable_debug=no)
+if test "x$enable_debug" = xyes; then
+       AC_MSG_RESULT([yes])
+else
+       AC_DEFINE([NDEBUG], [1], [Define to 1 to disable debugging code.])
+       AC_MSG_RESULT([no])
+fi
+
+
 ###########
 # Filters #
 ###########
 
-m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,sparc])
+m4_define([SUPPORTED_FILTERS], [lzma1,lzma2,delta,x86,powerpc,ia64,arm,armthumb,sparc])dnl
+m4_define([SIMPLE_FILTERS], [x86,powerpc,ia64,arm,armthumb,sparc])
+m4_define([LZ_FILTERS], [lzma1,lzma2])
+
+m4_foreach([NAME], [SUPPORTED_FILTERS],
+[enable_filter_[]NAME=no
+enable_encoder_[]NAME=no
+enable_decoder_[]NAME=no
+])dnl
+
+AC_MSG_CHECKING([which encoders to build])
+AC_ARG_ENABLE([encoders], AS_HELP_STRING([--enable-encoders=LIST],
+               [Comma-separated list of encoders to build. Default=all.
+               Available encoders:]
+                       m4_translit(m4_defn([SUPPORTED_FILTERS]), [,], [ ])),
+       [], [enable_encoders=SUPPORTED_FILTERS])
+enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'`
+if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then
+       AC_MSG_RESULT([(none)])
+else
+       for arg in $enable_encoders
+       do
+               case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
+                       NAME)
+                               enable_filter_[]NAME=yes
+                               enable_encoder_[]NAME=yes
+                               AC_DEFINE(HAVE_ENCODER_[]m4_toupper(NAME), [1],
+                               [Define to 1 if] NAME [encoder is enabled.])
+                               ;;])
+                       *)
+                               AC_MSG_RESULT([])
+                               AC_MSG_ERROR([unknown filter: $arg])
+                               ;;
+               esac
+       done
+       AC_MSG_RESULT([$enable_encoders])
+fi
+
+AC_MSG_CHECKING([which decoders to build])
+AC_ARG_ENABLE([decoders], AS_HELP_STRING([--enable-decoders=LIST],
+               [Comma-separated list of decoders to build. Default=all.
+               Available decoders are the same as available encoders.]),
+       [], [enable_decoders=SUPPORTED_FILTERS])
+enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'`
+if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then
+       AC_MSG_RESULT([(none)])
+else
+       for arg in $enable_decoders
+       do
+               case $arg in m4_foreach([NAME], [SUPPORTED_FILTERS], [
+                       NAME)
+                               enable_filter_[]NAME=yes
+                               enable_decoder_[]NAME=yes
+                               AC_DEFINE(HAVE_DECODER_[]m4_toupper(NAME), [1],
+                               [Define to 1 if] NAME [decoder is enabled.])
+                               ;;])
+                       *)
+                               AC_MSG_RESULT([])
+                               AC_MSG_ERROR([unknown filter: $arg])
+                               ;;
+               esac
+       done
+
+       # LZMA2 requires that LZMA1 is enabled.
+       test "x$enable_encoder_lzma2" = xyes && enable_encoder_lzma1=yes
+       test "x$enable_decoder_lzma2" = xyes && enable_decoder_lzma1=yes
+
+       AC_MSG_RESULT([$enable_decoders])
+fi
+
+if test "x$enable_encoder_lzma2$enable_encoder_lzma1" = xyesno \
+               || test "x$enable_decoder_lzma2$enable_decoder_lzma1" = xyesno; then
+       AC_MSG_ERROR([LZMA2 requires that LZMA1 is also enabled.])
+fi
+
+AM_CONDITIONAL(COND_MAIN_ENCODER, test "x$enable_encoders" != xno && test "x$enable_encoders" != x)
+AM_CONDITIONAL(COND_MAIN_DECODER, test "x$enable_decoders" != xno && test "x$enable_decoders" != x)
+
+m4_foreach([NAME], [SUPPORTED_FILTERS],
+[AM_CONDITIONAL(COND_FILTER_[]m4_toupper(NAME), test "x$enable_filter_[]NAME" = xyes)
+AM_CONDITIONAL(COND_ENCODER_[]m4_toupper(NAME), test "x$enable_encoder_[]NAME" = xyes)
+AM_CONDITIONAL(COND_DECODER_[]m4_toupper(NAME), test "x$enable_decoder_[]NAME" = xyes)
+])dnl
+
+# The so called "simple filters" share common code.
+enable_filter_simple=no
+enable_encoder_simple=no
+enable_decoder_simple=no
+m4_foreach([NAME], [SIMPLE_FILTERS],
+[test "x$enable_filter_[]NAME" = xyes && enable_filter_simple=yes
+test "x$enable_encoder_[]NAME" = xyes && enable_encoder_simple=yes
+test "x$enable_decoder_[]NAME" = xyes && enable_decoder_simple=yes
+])dnl
+AM_CONDITIONAL(COND_FILTER_SIMPLE, test "x$enable_filter_simple" = xyes)
+AM_CONDITIONAL(COND_ENCODER_SIMPLE, test "x$enable_encoder_simple" = xyes)
+AM_CONDITIONAL(COND_DECODER_SIMPLE, test "x$enable_decoder_simple" = xyes)
+
+# LZ-based filters share common code.
+enable_filter_lz=no
+enable_encoder_lz=no
+enable_decoder_lz=no
+m4_foreach([NAME], [LZ_FILTERS],
+[test "x$enable_filter_[]NAME" = xyes && enable_filter_lz=yes
+test "x$enable_encoder_[]NAME" = xyes && enable_encoder_lz=yes
+test "x$enable_decoder_[]NAME" = xyes && enable_decoder_lz=yes
+])dnl
+AM_CONDITIONAL(COND_FILTER_LZ, test "x$enable_filter_lz" = xyes)
+AM_CONDITIONAL(COND_ENCODER_LZ, test "x$enable_encoder_lz" = xyes)
+AM_CONDITIONAL(COND_DECODER_LZ, test "x$enable_decoder_lz" = xyes)
 
 m4_foreach([NAME], [SUPPORTED_FILTERS], [
        AC_DEFINE(HAVE_ENCODER_[]m4_toupper(NAME), [1],
@@ -49,16 +194,79 @@
            [Define to 1 to enable] NAME [match finder.])
 ])
 
+AC_MSG_CHECKING([which match finders to build])
+AC_ARG_ENABLE([match-finders], AS_HELP_STRING([--enable-match-finders=LIST],
+               [Comma-separated list of match finders to build. Default=all.
+               At least one match finder is required for encoding with
+               the LZMA1 and LZMA2 filters. Available match finders:]
+               m4_translit(m4_defn([SUPPORTED_MATCH_FINDERS]), [,], [ ])), [],
+       [enable_match_finders=SUPPORTED_MATCH_FINDERS])
+enable_match_finders=`echo "$enable_match_finders" | sed 's/,/ /g'`
+if test "x$enable_encoder_lz" = xyes ; then
+       for arg in $enable_match_finders
+               do
+               case $arg in m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [
+                       NAME)
+                               enable_match_finder_[]NAME=yes
+                               AC_DEFINE(HAVE_MF_[]m4_toupper(NAME), [1],
+                               [Define to 1 to enable] NAME [match finder.])
+                               ;;])
+                       *)
+                               AC_MSG_RESULT([])
+                               AC_MSG_ERROR([unknown match finder: $arg])
+                               ;;
+               esac
+       done
+       AC_MSG_RESULT([$enable_match_finders])
+else
+       AC_MSG_RESULT([(none because not building any LZ-based encoder)])
+fi
+
+
 ####################
 # Integrity checks #
 ####################
 
 m4_define([SUPPORTED_CHECKS], [crc32,crc64,sha256])
 
-m4_foreach([NAME], [SUPPORTED_CHECKS], [
-       AC_DEFINE(HAVE_CHECK_[]m4_toupper(NAME), [1],
-           [Define to 1 if] NAME [integrity check is enabled.])
-])
+m4_foreach([NAME], [SUPPORTED_CHECKS],
+[enable_check_[]NAME=no
+])dnl
+
+AC_MSG_CHECKING([which integrity checks to build])
+AC_ARG_ENABLE([checks], AS_HELP_STRING([--enable-checks=LIST],
+               [Comma-separated list of integrity checks to build.
+               Default=all. Available integrity checks:]
+               m4_translit(m4_defn([SUPPORTED_CHECKS]), [,], [ ])),
+       [], [enable_checks=SUPPORTED_CHECKS])
+enable_checks=`echo "$enable_checks" | sed 's/,/ /g'`
+if test "x$enable_checks" = xno || test "x$enable_checks" = x; then
+       AC_MSG_RESULT([(none)])
+else
+       for arg in $enable_checks
+       do
+               case $arg in m4_foreach([NAME], [SUPPORTED_CHECKS], [
+                       NAME)
+                               enable_check_[]NAME=yes
+                               AC_DEFINE(HAVE_CHECK_[]m4_toupper(NAME), [1],
+                               [Define to 1 if] NAME
+                               [integrity check is enabled.])
+                               ;;])
+                       *)
+                               AC_MSG_RESULT([])
+                               AC_MSG_ERROR([unknown integrity check: $arg])
+                               ;;
+               esac
+       done
+       AC_MSG_RESULT([$enable_checks])
+fi
+if test "x$enable_check_crc32" = xno ; then
+       AC_MSG_ERROR([For now, the CRC32 check must always be enabled.])
+fi
+
+m4_foreach([NAME], [SUPPORTED_CHECKS],
+[AM_CONDITIONAL(COND_CHECK_[]m4_toupper(NAME), test "x$enable_check_[]NAME" = xyes)
+])dnl
 
 
 ###########################
@@ -74,9 +282,267 @@
 #####################
 
 if false; then
+AC_MSG_CHECKING([if small size is preferred over speed])
+AC_ARG_ENABLE([small], AS_HELP_STRING([--enable-small],
+               [Make liblzma smaller and a little slower.
+               This is disabled by default to optimize for speed.]),
+       [], [enable_small=no])
+if test "x$enable_small" = xyes; then
        AC_DEFINE([HAVE_SMALL], [1], [Define to 1 if optimizing for size.])
+elif test "x$enable_small" != xno; then
+       AC_MSG_RESULT([])
+       AC_MSG_ERROR([--enable-small accepts only `yes' or `no'])
+fi
+AC_MSG_RESULT([$enable_small])
+AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes)
+fi
+
+
+#############
+# Threading #
+#############
+
+AC_MSG_CHECKING([if threading support is wanted])
+AC_ARG_ENABLE([threads], AS_HELP_STRING([--enable-threads=METHOD],
+               [Supported METHODS are `yes', `no', `posix', `win95', and
+               `vista'. The default is `yes'. Using `no' together with
+               --enable-small makes liblzma thread unsafe.]),
+       [], [enable_threads=yes])
+
+if test "x$enable_threads" = xyes; then
+       case $host_os in
+               mingw*)
+                       case $host_cpu in
+                               i?86)   enable_threads=win95 ;;
+                               *)      enable_threads=vista ;;



Home | Main Index | Thread Index | Old Index