Module Name: src
Committed By: christos
Date: Fri Apr 17 18:49:23 UTC 2015
Modified Files:
src/external/public-domain/xz: prepare-import.sh
src/external/public-domain/xz/bin/xz: Makefile
src/external/public-domain/xz/dist: configure.ac
src/external/public-domain/xz/dist/src/liblzma/check: check.h
src/external/public-domain/xz/include: config.h
src/external/public-domain/xz/lib: Makefile shlib_version
Removed Files:
src/external/public-domain/xz/dist/doc/examples: xz_pipe_comp.c
xz_pipe_decomp.c
src/external/public-domain/xz/dist/src/liblzma/api/lzma: lzma.h
src/external/public-domain/xz/dist/src/liblzma/common: stream_encoder.h
Log Message:
adjust for 5.2.1
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/public-domain/xz/prepare-import.sh
cvs rdiff -u -r1.1 -r1.2 src/external/public-domain/xz/bin/xz/Makefile
cvs rdiff -u -r1.3 -r1.4 src/external/public-domain/xz/dist/configure.ac
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/public-domain/xz/dist/doc/examples/xz_pipe_comp.c \
src/external/public-domain/xz/dist/doc/examples/xz_pipe_decomp.c
cvs rdiff -u -r1.1.1.2 -r0 \
src/external/public-domain/xz/dist/src/liblzma/api/lzma/lzma.h
cvs rdiff -u -r1.2 -r1.3 \
src/external/public-domain/xz/dist/src/liblzma/check/check.h
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/public-domain/xz/dist/src/liblzma/common/stream_encoder.h
cvs rdiff -u -r1.2 -r1.3 src/external/public-domain/xz/include/config.h
cvs rdiff -u -r1.3 -r1.4 src/external/public-domain/xz/lib/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/public-domain/xz/lib/shlib_version
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/public-domain/xz/prepare-import.sh
diff -u src/external/public-domain/xz/prepare-import.sh:1.3 src/external/public-domain/xz/prepare-import.sh:1.4
--- src/external/public-domain/xz/prepare-import.sh:1.3 Mon May 28 13:28:53 2012
+++ src/external/public-domain/xz/prepare-import.sh Fri Apr 17 14:49:23 2015
@@ -1,11 +1,11 @@
#!/bin/sh
-# $NetBSD: prepare-import.sh,v 1.3 2012/05/28 17:28:53 jdc Exp $
+# $NetBSD: prepare-import.sh,v 1.4 2015/04/17 18:49:23 christos Exp $
set -e
rm -rf dist tmp
-tar xzf xz-5.0.3.tar.gz
-mv xz-5.0.3 dist
+tar xzf xz-5.2.1.tar.gz
+mv xz-5.2.1 dist
cd dist
# Binary files derived from distribution files
Index: src/external/public-domain/xz/bin/xz/Makefile
diff -u src/external/public-domain/xz/bin/xz/Makefile:1.1 src/external/public-domain/xz/bin/xz/Makefile:1.2
--- src/external/public-domain/xz/bin/xz/Makefile:1.1 Wed Aug 3 23:38:06 2011
+++ src/external/public-domain/xz/bin/xz/Makefile Fri Apr 17 14:49:23 2015
@@ -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 @@ SRCS= args.c coder.c file_io.c hardware.
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
Index: src/external/public-domain/xz/dist/configure.ac
diff -u src/external/public-domain/xz/dist/configure.ac:1.3 src/external/public-domain/xz/dist/configure.ac:1.4
--- src/external/public-domain/xz/dist/configure.ac:1.3 Tue Feb 28 09:22:21 2012
+++ src/external/public-domain/xz/dist/configure.ac Fri Apr 17 14:49:23 2015
@@ -25,11 +25,156 @@ AC_CONFIG_AUX_DIR([../../gnu/dist/autoco
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 @@ m4_foreach([NAME], [SUPPORTED_MATCH_FIND
[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 @@ AM_CONDITIONAL(COND_ASM_X86_64, false)
#####################
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 ;;
+ esac
+ ;;
+ *)
+ enable_threads=posix
+ ;;
+ esac
+fi
+
+case $enable_threads in
+ posix | win95 | vista)
+ AC_MSG_RESULT([yes, $enable_threads])
+ ;;
+ no)
+ AC_MSG_RESULT([no])
+ ;;
+ *)
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-threads only accepts `yes', `no', `posix', `win95', or `vista'])
+ ;;
+esac
+
+# The Win95 threading lacks thread-safe one-time initialization function.
+# It's better to disallow it instead of allowing threaded but thread-unsafe
+# build.
+if test "x$enable_small$enable_threads" = xyeswin95; then
+ AC_MSG_ERROR([--enable-threads=win95 and --enable-small cannot be
+ used at the same time])
+fi
+
+# We use the actual result a little later.
+
+
+#########################
+# Assumed amount of RAM #
+#########################
+
+# We use 128 MiB as default, because it will allow decompressing files
+# created with "xz -9". It would be slightly safer to guess a lower value,
+# but most systems, on which we don't have any way to determine the amount
+# of RAM, will probably have at least 128 MiB of RAM.
+AC_MSG_CHECKING([how much RAM to assume if the real amount is unknown])
+AC_ARG_ENABLE([assume-ram], AS_HELP_STRING([--enable-assume-ram=SIZE],
+ [If and only if the real amount of RAM cannot be determined,
+ assume SIZE MiB. The default is 128 MiB. This affects the
+ default memory usage limit.]),
+ [], [enable_assume_ram=128])
+assume_ram_check=`echo "$enable_assume_ram" | tr -d 0123456789`
+if test -z "$enable_assume_ram" || test -n "$assume_ram_check"; then
+ AC_MSG_RESULT([])
+ AC_MSG_ERROR([--enable-assume-ram accepts only an integer argument])
+fi
+AC_MSG_RESULT([$enable_assume_ram MiB])
+AC_DEFINE_UNQUOTED([ASSUME_RAM], [$enable_assume_ram],
+ [How many MiB of RAM to assume if the real amount cannot
+ be determined.])
+
+
+#########################
+# Components to install #
+#########################
+
+AC_ARG_ENABLE([xz], [AS_HELP_STRING([--disable-xz],
+ [do not build the xz tool])],
+ [], [enable_xz=yes])
+AM_CONDITIONAL([COND_XZ], [test x$enable_xz != xno])
+
+AC_ARG_ENABLE([xzdec], [AS_HELP_STRING([--disable-xzdec],
+ [do not build xzdec])],
+ [], [enable_xzdec=yes])
+AM_CONDITIONAL([COND_XZDEC], [test x$enable_xzdec != xno])
+
+AC_ARG_ENABLE([lzmadec], [AS_HELP_STRING([--disable-lzmadec],
+ [do not build lzmadec
+ (it exists primarily for LZMA Utils compatibility)])],
+ [], [enable_lzmadec=yes])
+AM_CONDITIONAL([COND_LZMADEC], [test x$enable_lzmadec != xno])
+
+AC_ARG_ENABLE([lzmainfo], [AS_HELP_STRING([--disable-lzmainfo],
+ [do not build lzmainfo
+ (it exists primarily for LZMA Utils compatibility)])],
+ [], [enable_lzmainfo=yes])
+AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno])
+
+AC_ARG_ENABLE([lzma-links], [AS_HELP_STRING([--disable-lzma-links],
+ [do not create symlinks for LZMA Utils compatibility])],
+ [], [enable_lzma_links=yes])
+AM_CONDITIONAL([COND_LZMALINKS], [test x$enable_lzma_links != xno])
+
+AC_ARG_ENABLE([scripts], [AS_HELP_STRING([--disable-scripts],
+ [do not install the scripts xzdiff, xzgrep, xzless, xzmore,
+ and their symlinks])],
+ [], [enable_scripts=yes])
+AM_CONDITIONAL([COND_SCRIPTS], [test x$enable_scripts != xno])
+
+AC_ARG_ENABLE([doc], [AS_HELP_STRING([--disable-doc],
+ [do not install documentation files to docdir
+ (man pages will still be installed)])],
+ [], [enable_doc=yes])
+AM_CONDITIONAL([COND_DOC], [test x$enable_doc != xno])
+
+
+#####################
+# Symbol versioning #
+#####################
+
+AC_MSG_CHECKING([if library symbol versioning should be used])
+AC_ARG_ENABLE([symbol-versions], [AS_HELP_STRING([--enable-symbol-versions],
+ [Use symbol versioning for liblzma. Enabled by default on
+ GNU/Linux, other GNU-based systems, and FreeBSD.])],
+ [], [enable_symbol_versions=auto])
+if test "x$enable_symbol_versions" = xauto; then
+ case $host_os in
+ # NOTE: Even if one omits -gnu on GNU/Linux (e.g.
+ # i486-slackware-linux), configure will (via config.sub)
+ # append -gnu (e.g. i486-slackware-linux-gnu), and this
+ # test will work correctly.
+ gnu* | *-gnu* | freebsd*)
+ enable_symbol_versions=yes
+ ;;
+ *)
+ enable_symbol_versions=no
+ ;;
+ esac
+fi
+AC_MSG_RESULT([$enable_symbol_versions])
+AM_CONDITIONAL([COND_SYMVERS], [test "x$enable_symbol_versions" = xyes])
+
+
+###############################################################################
+# Checks for programs.
+###############################################################################
+
+echo
+gl_POSIX_SHELL
+if test -z "$POSIX_SHELL" && test "x$enable_scripts" = xyes ; then
+ AC_MSG_ERROR([No POSIX conforming shell (sh) was found.])
+fi
+
+echo
+echo "Initializing Automake:"
+
+# We don't use "subdir-objects" yet because it breaks "make distclean" when
+# dependencies are enabled (as of Automake 1.14.1) due to this bug:
+# http://debbugs.gnu.org/cgi/bugreport.cgi?bug=17354
+# The -Wno-unsupported is used to silence warnings about missing
+# "subdir-objects".
+AM_INIT_AUTOMAKE([1.12 foreign tar-v7 filename-length-max=99 serial-tests -Wno-unsupported])
+AC_PROG_LN_S
+
+AC_PROG_CC_C99
+if test x$ac_cv_prog_cc_c99 = xno ; then
+ AC_MSG_ERROR([No C99 compiler was found.])
fi
+AM_PROG_CC_C_O
+AM_PROG_AS
+AC_USE_SYSTEM_EXTENSIONS
+
+case $enable_threads in
+ posix)
+ echo
+ echo "POSIX threading support:"
+ AX_PTHREAD([:]) dnl We don't need the HAVE_PTHREAD macro.
+ LIBS="$LIBS $PTHREAD_LIBS"
+ AM_CFLAGS="$AM_CFLAGS $PTHREAD_CFLAGS"
+
+ dnl NOTE: PTHREAD_CC is ignored. It would be useful on AIX,
+ dnl but it's tricky to get it right together with
+ dnl AC_PROG_CC_C99. Thus, this is handled by telling the
+ dnl user in INSTALL to set the correct CC manually.
+
+ AC_DEFINE([MYTHREAD_POSIX], [1],
+ [Define to 1 when using POSIX threads (pthreads).])
+
+ # These are nice to have but not mandatory.
+ #
+ # FIXME: xz uses clock_gettime if it is available and can do
+ # it even when threading is disabled. Moving this outside
+ # of pthread detection may be undesirable because then
+ # liblzma may get linked against librt even when librt isn't
+ # needed by liblzma.
+ OLD_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ AC_SEARCH_LIBS([clock_gettime], [rt])
+ AC_CHECK_FUNCS([clock_gettime pthread_condattr_setclock])
+ AC_CHECK_DECLS([CLOCK_MONOTONIC], [], [], [[#include <time.h>]])
+ CFLAGS=$OLD_CFLAGS
+ ;;
+ win95)
+ AC_DEFINE([MYTHREAD_WIN95], [1], [Define to 1 when using
+ Windows 95 (and thus XP) compatible threads.
+ This avoids use of features that were added in
+ Windows Vista.])
+ ;;
+ vista)
+ AC_DEFINE([MYTHREAD_VISTA], [1], [Define to 1 when using
+ Windows Vista compatible threads. This uses
+ features that are not available on Windows XP.])
+ ;;
+esac
+AM_CONDITIONAL([COND_THREADS], [test "x$enable_threads" != xno])
+
+echo
+echo "Initializing Libtool:"
+LT_PREREQ([2.2])
+LT_INIT([win32-dll])
+LT_LANG([Windows Resource])
+
+# This is a bit wrong since it is possible to request that only some libs
+# are built as shared. Using that feature isn't so common though, and this
+# breaks only on Windows (at least for now) if the user enables only some
+# libs as shared.
+AM_CONDITIONAL([COND_SHARED], [test "x$enable_shared" != xno])
+
+
+###############################################################################
+# Checks for libraries.
+###############################################################################
+
+echo
+echo "Initializing gettext:"
+AM_GNU_GETTEXT_VERSION([0.18])
+AM_GNU_GETTEXT([external])
+
+
+###############################################################################
+# Checks for header files.
+###############################################################################
AC_DEFINE_UNQUOTED([ASSUME_RAM], [128],
[How many MiB of RAM to assume if the real amount cannot be determined.])
@@ -87,6 +553,18 @@ AC_CHECK_HEADERS([fcntl.h limits.h sys/t
[],
[AC_MSG_ERROR([Required header file(s) are missing.])])
+# This allows the use of the intrinsic functions if they are available.
+AC_CHECK_HEADERS([immintrin.h])
+
+
+###############################################################################
+# Checks for typedefs, structures, and compiler characteristics.
+###############################################################################
+
+dnl We don't need these as long as we need a C99 compiler anyway.
+dnl AC_C_INLINE
+dnl AC_C_RESTRICT
+
AC_HEADER_STDBOOL
AC_TYPE_UINT8_T
@@ -100,7 +578,7 @@ AC_TYPE_UINTPTR_T
AC_CHECK_SIZEOF([size_t])
# The command line tool can copy high resolution timestamps if such
-# information is availabe in struct stat. Otherwise one second accuracy
+# information is available in struct stat. Otherwise one second accuracy
# is used.
AC_CHECK_MEMBERS([
struct stat.st_atim.tv_nsec,
@@ -115,10 +593,211 @@ AC_C_BIGENDIAN
# Find the best function to set timestamps.
AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break])
+# These are nice to have but not mandatory.
+AC_CHECK_FUNCS([posix_fadvise pipe2])
+
TUKLIB_PROGNAME
TUKLIB_INTEGER
TUKLIB_PHYSMEM
TUKLIB_CPUCORES
TUKLIB_MBSTR
+# Check for system-provided SHA-256. At least the following is supported:
+#
+# OS Headers Library Type Function
+# FreeBSD sys/types.h + sha256.h libmd SHA256_CTX SHA256_Init
+# NetBSD sys/types.h + sha2.h SHA256_CTX SHA256_Init
+# OpenBSD sys/types.h + sha2.h SHA2_CTX SHA256Init
+# Solaris sys/types.h + sha2.h libmd SHA256_CTX SHA256Init
+# MINIX 3 sys/types.h + minix/sha2.h libutil SHA256_CTX SHA256_Init
+# Darwin CommonCrypto/CommonDigest.h CC_SHA256_CTX CC_SHA256_Init
+#
+# Note that Darwin's CC_SHA256_Update takes buffer size as uint32_t instead
+# of size_t.
+#
+# We don't check for e.g. OpenSSL or libgcrypt because we don't want
+# to introduce dependencies to other packages by default. Maybe such
+# libraries could be supported via additional configure options though.
+#
+if test "x$enable_check_sha256" = "xyes"; then
+ # Test for Common Crypto before others, because Darwin has sha256.h
+ # too and we don't want to use that, because on older versions it
+ # uses OpenSSL functions, whose SHA256_Init is not guaranteed to
+ # succeed.
+ sha256_header_found=no
+ AC_CHECK_HEADERS(
+ [CommonCrypto/CommonDigest.h sha256.h sha2.h minix/sha2.h],
+ [sha256_header_found=yes ; break])
+ if test "x$sha256_header_found" = xyes; then
+ AC_CHECK_TYPES([CC_SHA256_CTX, SHA256_CTX, SHA2_CTX], [], [],
+ [[#ifdef HAVE_SYS_TYPES_H
+ # include <sys/types.h>
+ #endif
+ #ifdef HAVE_COMMONCRYPTO_COMMONDIGEST_H
+ # include <CommonCrypto/CommonDigest.h>
+ #endif
+ #ifdef HAVE_SHA256_H
+ # include <sha256.h>
+ #endif
+ #ifdef HAVE_SHA2_H
+ # include <sha2.h>
+ #endif
+ #ifdef HAVE_MINIX_SHA2_H
+ # include <minix/sha2.h>
+ #endif]])
+ AC_SEARCH_LIBS([SHA256_Init], [md util])
+ AC_SEARCH_LIBS([SHA256Init], [md])
+ AC_CHECK_FUNCS([CC_SHA256_Init SHA256_Init SHA256Init],
+ [break])
+ fi
+fi
+AM_CONDITIONAL([COND_INTERNAL_SHA256],
+ [test "x$ac_cv_func_SHA256_Init" != xyes \
+ && test "x$ac_cv_func_SHA256Init" != xyes \
+ && test "x$ac_cv_func_CC_SHA256_Init" != xyes])
+
+# Check for SSE2 intrinsics.
+AC_CHECK_DECL([_mm_movemask_epi8],
+ [AC_DEFINE([HAVE__MM_MOVEMASK_EPI8], [1],
+ [Define to 1 if _mm_movemask_epi8 is available.])],
+ [],
+[#ifdef HAVE_IMMINTRIN_H
+#include <immintrin.h>
+#endif])
+
+
+###############################################################################
+# If using GCC, set some additional AM_CFLAGS:
+###############################################################################
+
+if test "$GCC" = yes ; then
+ echo
+ echo "GCC extensions:"
+fi
+
+# Always do the visibility check but don't set AM_CFLAGS on Windows.
+# This way things get set properly even on Windows.
+gl_VISIBILITY
+if test -n "$CFLAG_VISIBILITY" && test "$is_w32" = no; then
+ AM_CFLAGS="$AM_CFLAGS $CFLAG_VISIBILITY"
+fi
+
+if test "$GCC" = yes ; then
+ # Enable as much warnings as possible. These commented warnings won't
+ # work for this package though:
+ # * -Wunreachable-code breaks several assert(0) cases, which are
+ # backed up with "return LZMA_PROG_ERROR".
+ # * -Wcast-qual would break various things where we need a non-const
+ # pointer although we don't modify anything through it.
+ # * -Wcast-align breaks optimized CRC32 and CRC64 implementation
+ # on some architectures (not on x86), where this warning is bogus,
+ # because we take care of correct alignment.
+ # * -Winline, -Wdisabled-optimization, -Wunsafe-loop-optimizations
+ # don't seem so useful here; at least the last one gives some
+ # warnings which are not bugs.
+ for NEW_FLAG in \
+ -Wall \
+ -Wextra \
+ -Wvla \
+ -Wformat=2 \
+ -Winit-self \
+ -Wmissing-include-dirs \
+ -Wstrict-aliasing \
+ -Wfloat-equal \
+ -Wundef \
+ -Wshadow \
+ -Wpointer-arith \
+ -Wbad-function-cast \
+ -Wwrite-strings \
+ -Wlogical-op \
+ -Waggregate-return \
+ -Wstrict-prototypes \
+ -Wold-style-definition \
+ -Wmissing-prototypes \
+ -Wmissing-declarations \
+ -Wmissing-noreturn \
+ -Wredundant-decls
+ do
+ AC_MSG_CHECKING([if $CC accepts $NEW_FLAG])
+ OLD_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $NEW_FLAG -Werror"
+ AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+ [void foo(void); void foo(void) { }])], [
+ AM_CFLAGS="$AM_CFLAGS $NEW_FLAG"
+ AC_MSG_RESULT([yes])
+ ], [
+ AC_MSG_RESULT([no])
+ ])
+ CFLAGS="$OLD_CFLAGS"
+ done
+
+ AC_ARG_ENABLE([werror],
+ AS_HELP_STRING([--enable-werror], [Enable -Werror to abort
+ compilation on all compiler warnings.]),
+ [], [enable_werror=no])
+ if test "x$enable_werror" = "xyes"; then
+ AM_CFLAGS="$AM_CFLAGS -Werror"
+ fi
+fi
+
+
+###############################################################################
+# Create the makefiles and config.h
+###############################################################################
+
+echo
+
+# Don't build the lib directory at all if we don't need any replacement
+# functions.
+AM_CONDITIONAL([COND_GNULIB], test -n "$LIBOBJS")
+
+# Add default AM_CFLAGS.
+AC_SUBST([AM_CFLAGS])
+
+# This is needed for src/scripts.
+xz=`echo xz | sed "$program_transform_name"`
+AC_SUBST([xz])
+
+AC_CONFIG_FILES([
+ Doxyfile
+ Makefile
+ po/Makefile.in
+ lib/Makefile
+ src/Makefile
+ src/liblzma/Makefile
+ src/liblzma/api/Makefile
+ src/xz/Makefile
+ src/xzdec/Makefile
+ src/lzmainfo/Makefile
+ src/scripts/Makefile
+ tests/Makefile
+ debug/Makefile
+])
+AC_CONFIG_FILES([src/scripts/xzdiff], [chmod +x src/scripts/xzdiff])
+AC_CONFIG_FILES([src/scripts/xzgrep], [chmod +x src/scripts/xzgrep])
+AC_CONFIG_FILES([src/scripts/xzmore], [chmod +x src/scripts/xzmore])
+AC_CONFIG_FILES([src/scripts/xzless], [chmod +x src/scripts/xzless])
+
AC_OUTPUT
+
+# Some warnings
+if test x$tuklib_cv_physmem_method = xunknown; then
+ echo
+ echo "WARNING:"
+ echo "No supported method to detect the amount of RAM."
+ echo "Consider using --enable-assume-ram (if you didn't already)"
+ echo "or make a patch to add support for this operating system."
+fi
+
+if test x$tuklib_cv_cpucores_method = xunknown; then
+ echo
+ echo "WARNING:"
+ echo "No supported method to detect the number of CPU cores."
+fi
+
+if test "x$enable_threads$enable_small" = xnoyes; then
+ echo
+ echo "NOTE:"
+ echo "liblzma will be thread unsafe due the combination"
+ echo "of --disable-threads --enable-small."
+fi
Index: src/external/public-domain/xz/dist/src/liblzma/check/check.h
diff -u src/external/public-domain/xz/dist/src/liblzma/check/check.h:1.2 src/external/public-domain/xz/dist/src/liblzma/check/check.h:1.3
--- src/external/public-domain/xz/dist/src/liblzma/check/check.h:1.2 Tue Nov 2 11:35:38 2010
+++ src/external/public-domain/xz/dist/src/liblzma/check/check.h Fri Apr 17 14:49:23 2015
@@ -17,6 +17,44 @@
#ifdef NETBSD_NATIVE_SHA256
#include <sha2.h>
+#else
+#if defined(HAVE_COMMONCRYPTO_COMMONDIGEST_H)
+# include <CommonCrypto/CommonDigest.h>
+#elif defined(HAVE_SHA256_H)
+# include <sys/types.h>
+# include <sha256.h>
+#elif defined(HAVE_SHA2_H)
+# include <sys/types.h>
+# include <sha2.h>
+#elif defined(HAVE_MINIX_SHA2_H)
+# include <sys/types.h>
+# include <minix/sha2.h>
+#endif
+#endif
+
+#if defined(HAVE_CC_SHA256_CTX)
+typedef CC_SHA256_CTX lzma_sha256_state;
+#elif defined(HAVE_SHA256_CTX)
+typedef SHA256_CTX lzma_sha256_state;
+#elif defined(HAVE_SHA2_CTX)
+typedef SHA2_CTX lzma_sha256_state;
+#else
+/// State for the internal SHA-256 implementation
+typedef struct {
+ /// Internal state
+ uint32_t state[8];
+
+ /// Size of the message excluding padding
+ uint64_t size;
+} lzma_sha256_state;
+#endif
+
+#if defined(HAVE_CC_SHA256_INIT)
+# define LZMA_SHA256FUNC(x) CC_SHA256_ ## x
+#elif defined(HAVE_SHA256_INIT)
+# define LZMA_SHA256FUNC(x) SHA256_ ## x
+#elif defined(HAVE_SHA256INIT)
+# define LZMA_SHA256FUNC(x) SHA256 ## x
#endif
// Index hashing needs the best possible hash function (preferably
@@ -49,17 +87,12 @@ typedef struct {
#ifdef NETBSD_NATIVE_SHA256
SHA256_CTX sha256;
#else
- struct {
- /// Internal state
- uint32_t state[8];
-
- /// Size of the message excluding padding
- uint64_t size;
- } sha256;
+ lzma_sha256_state sha256;
#endif
} state;
} lzma_check_state;
+#endif
/// lzma_crc32_table[0] is needed by LZ encoder so we need to keep
@@ -95,6 +128,9 @@ extern void lzma_check_finish(lzma_check
#define lzma_sha256_finish(check) \
SHA256_Final((check)->buffer.u8, &(check)->state.sha256)
#else
+
+#ifndef LZMA_SHA256FUNC
+
/// Prepare SHA-256 state for new input.
extern void lzma_sha256_init(lzma_check_state *check);
@@ -104,6 +140,40 @@ extern void lzma_sha256_update(
/// Finish the SHA-256 calculation and store the result to check->buffer.u8.
extern void lzma_sha256_finish(lzma_check_state *check);
+
+
+#else
+
+static inline void
+lzma_sha256_init(lzma_check_state *check)
+{
+ LZMA_SHA256FUNC(Init)(&check->state.sha256);
+}
+
+
+static inline void
+lzma_sha256_update(const uint8_t *buf, size_t size, lzma_check_state *check)
+{
+#if defined(HAVE_CC_SHA256_INIT) && SIZE_MAX > UINT32_MAX
+ // Darwin's CC_SHA256_Update takes uint32_t as the buffer size,
+ // so use a loop to support size_t.
+ while (size > UINT32_MAX) {
+ LZMA_SHA256FUNC(Update)(&check->state.sha256, buf, UINT32_MAX);
+ buf += UINT32_MAX;
+ size -= UINT32_MAX;
+ }
+#endif
+
+ LZMA_SHA256FUNC(Update)(&check->state.sha256, buf, size);
+}
+
+
+static inline void
+lzma_sha256_finish(lzma_check_state *check)
+{
+ LZMA_SHA256FUNC(Final)(check->buffer.u8, &check->state.sha256);
+}
+
#endif
#endif
Index: src/external/public-domain/xz/include/config.h
diff -u src/external/public-domain/xz/include/config.h:1.2 src/external/public-domain/xz/include/config.h:1.3
--- src/external/public-domain/xz/include/config.h:1.2 Mon May 28 13:28:54 2012
+++ src/external/public-domain/xz/include/config.h Fri Apr 17 14:49:23 2015
@@ -7,6 +7,10 @@
/* How many MiB of RAM to assume if the real amount cannot be determined. */
#define ASSUME_RAM 128
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+/* #undef ENABLE_NLS */
+
/* Define to 1 if bswap_16 is available. */
/* #undef HAVE_BSWAP_16 */
@@ -19,6 +23,20 @@
/* Define to 1 if you have the <byteswap.h> header file. */
/* #undef HAVE_BYTESWAP_H */
+/* Define to 1 if the system has the type `CC_SHA256_CTX'. */
+/* #undef HAVE_CC_SHA256_CTX */
+
+/* Define to 1 if you have the `CC_SHA256_Init' function. */
+/* #undef HAVE_CC_SHA256_INIT */
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+ CoreFoundation framework. */
+/* #undef HAVE_CFLOCALECOPYCURRENT */
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+/* #undef HAVE_CFPREFERENCESCOPYAPPVALUE */
+
/* Define to 1 if crc32 integrity check is enabled. */
#define HAVE_CHECK_CRC32 1
@@ -28,6 +46,20 @@
/* Define to 1 if sha256 integrity check is enabled. */
#define HAVE_CHECK_SHA256 1
+/* Define to 1 if you have the `clock_gettime' function. */
+#define HAVE_CLOCK_GETTIME 1
+
+/* Define to 1 if you have the <CommonCrypto/CommonDigest.h> header file. */
+/* #undef HAVE_COMMONCRYPTO_COMMONDIGEST_H */
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+ */
+/* #undef HAVE_DCGETTEXT */
+
+/* Define to 1 if you have the declaration of `CLOCK_MONOTONIC', and to 0 if
+ you don't. */
+#define HAVE_DECL_CLOCK_MONOTONIC 1
+
/* Define to 1 if you have the declaration of `program_invocation_name', and
to 0 if you don't. */
#define HAVE_DECL_PROGRAM_INVOCATION_NAME 0
@@ -59,6 +91,9 @@
/* Define to 1 if x86 decoder is enabled. */
#define HAVE_DECODER_X86 1
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#define HAVE_DLFCN_H 1
+
/* Define to 1 if arm encoder is enabled. */
#define HAVE_ENCODER_ARM 1
@@ -90,14 +125,29 @@
#define HAVE_FCNTL_H 1
/* Define to 1 if you have the `futimens' function. */
-/* #undef HAVE_FUTIMENS */
+#define HAVE_FUTIMENS 1
/* Define to 1 if you have the `futimes' function. */
-#define HAVE_FUTIMES 1
+/* #undef HAVE_FUTIMES */
/* Define to 1 if you have the `futimesat' function. */
/* #undef HAVE_FUTIMESAT */
+/* Define to 1 if you have the <getopt.h> header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `getopt_long' function. */
+#define HAVE_GETOPT_LONG 1
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+/* #undef HAVE_GETTEXT */
+
+/* Define if you have the iconv() function and it works. */
+#define HAVE_ICONV 1
+
+/* Define to 1 if you have the <immintrin.h> header file. */
+#define HAVE_IMMINTRIN_H 1
+
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
@@ -125,6 +175,42 @@
/* Define to 1 to enable hc4 match finder. */
#define HAVE_MF_HC4 1
+/* Define to 1 if you have the <minix/sha2.h> header file. */
+/* #undef HAVE_MINIX_SHA2_H */
+
+/* Define to 1 if getopt.h declares extern int optreset. */
+#define HAVE_OPTRESET 1
+
+/* Define to 1 if you have the `pipe2' function. */
+#define HAVE_PIPE2 1
+
+/* Define to 1 if you have the `posix_fadvise' function. */
+#define HAVE_POSIX_FADVISE 1
+
+/* Define to 1 if you have the `pthread_condattr_setclock' function. */
+#define HAVE_PTHREAD_CONDATTR_SETCLOCK 1
+
+/* Have PTHREAD_PRIO_INHERIT. */
+/* #undef HAVE_PTHREAD_PRIO_INHERIT */
+
+/* Define to 1 if you have the `SHA256Init' function. */
+/* #undef HAVE_SHA256INIT */
+
+/* Define to 1 if the system has the type `SHA256_CTX'. */
+#define HAVE_SHA256_CTX 1
+
+/* Define to 1 if you have the <sha256.h> header file. */
+/* #undef HAVE_SHA256_H */
+
+/* Define to 1 if you have the `SHA256_Init' function. */
+#define HAVE_SHA256_INIT 1
+
+/* Define to 1 if the system has the type `SHA2_CTX'. */
+/* #undef HAVE_SHA2_CTX */
+
+/* Define to 1 if you have the <sha2.h> header file. */
+#define HAVE_SHA2_H 1
+
/* Define to 1 if optimizing for size. */
/* #undef HAVE_SMALL */
@@ -153,7 +239,7 @@
/* #undef HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC */
/* Define to 1 if `st_atim.tv_nsec' is a member of `struct stat'. */
-/* #undef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC */
+#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
/* Define to 1 if `st_uatime' is a member of `struct stat'. */
/* #undef HAVE_STRUCT_STAT_ST_UATIME */
@@ -188,20 +274,47 @@
/* Define to 1 if you have the `utimes' function. */
/* #undef HAVE_UTIMES */
+/* Define to 1 or 0, depending whether the compiler supports simple visibility
+ declarations. */
+#define HAVE_VISIBILITY 1
+
/* Define to 1 if you have the `wcwidth' function. */
#define HAVE_WCWIDTH 1
/* Define to 1 if the system has the type `_Bool'. */
#define HAVE__BOOL 1
+/* Define to 1 if _mm_movemask_epi8 is available. */
+#define HAVE__MM_MOVEMASK_EPI8 1
+
+/* Define to the sub-directory where libtool stores uninstalled libraries. */
+#define LT_OBJDIR ".libs/"
+
+/* Define to 1 when using POSIX threads (pthreads). */
+#define MYTHREAD_POSIX 1
+
+/* Define to 1 when using Windows Vista compatible threads. This uses features
+ that are not available on Windows XP. */
+/* #undef MYTHREAD_VISTA */
+
+/* Define to 1 when using Windows 95 (and thus XP) compatible threads. This
+ avoids use of features that were added in Windows Vista. */
+/* #undef MYTHREAD_WIN95 */
+
+/* Define to 1 to disable debugging code. */
+#define NDEBUG 1
+
+/* Name of package */
+#define PACKAGE "xz"
+
/* Define to the address where bug reports for this package should be sent. */
-#define PACKAGE_BUGREPORT "[email protected]"
+#define PACKAGE_BUGREPORT "[email protected]"
/* Define to the full name of this package. */
#define PACKAGE_NAME "XZ Utils"
/* Define to the full name and version of this package. */
-#define PACKAGE_STRING "XZ Utils 5.0.0"
+#define PACKAGE_STRING "XZ Utils 5.2.1"
/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME "xz"
@@ -210,15 +323,27 @@
#define PACKAGE_URL "http://tukaani.org/xz/"
/* Define to the version of this package. */
-#define PACKAGE_VERSION "5.0.0"
+#define PACKAGE_VERSION "5.2.1"
+/* Define to necessary symbol if this constant uses a non-standard name on
+ your system. */
+/* #undef PTHREAD_CREATE_JOINABLE */
+
+#ifdef _LP64
/* The size of `size_t', as computed by sizeof. */
#define SIZEOF_SIZE_T 8
+#else
+#define SIZEOF_SIZE_T 4
+#endif
/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1
/* Define to 1 if the number of available CPU cores can be detected with
+ cpuset(2). */
+/* #undef TUKLIB_CPUCORES_CPUSET */
+
+/* Define to 1 if the number of available CPU cores can be detected with
pstat_getdynamic(). */
/* #undef TUKLIB_CPUCORES_PSTAT_GETDYNAMIC */
@@ -232,7 +357,10 @@
/* Define to 1 if the system supports fast unaligned access to 16-bit and
32-bit integers. */
-/* #undef TUKLIB_FAST_UNALIGNED_ACCESS */
+#ifndef __NetBSD__
+/* Not all archs support this */
+#define TUKLIB_FAST_UNALIGNED_ACCESS 1
+#endif
/* Define to 1 if the amount of physical memory can be detected with
_system_configuration.physmem. */
@@ -252,11 +380,11 @@
/* Define to 1 if the amount of physical memory can be detected with
sysconf(_SC_PAGESIZE) and sysconf(_SC_PHYS_PAGES). */
-/* #undef TUKLIB_PHYSMEM_SYSCONF */
+#define TUKLIB_PHYSMEM_SYSCONF 1
/* Define to 1 if the amount of physical memory can be detected with sysctl().
*/
-#define TUKLIB_PHYSMEM_SYSCTL 1
+/* #undef TUKLIB_PHYSMEM_SYSCTL */
/* Define to 1 if the amount of physical memory can be detected with Linux
sysinfo(). */
@@ -284,11 +412,31 @@
#endif
+/* Version number of package */
+#define VERSION "5.2.1"
+
+#ifndef __NetBSD__
/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
significant byte first (like Motorola and SPARC, unlike Intel). */
-#include <sys/endian.h>
-#if BYTE_ORDER == BIG_ENDIAN
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+/* # undef WORDS_BIGENDIAN */
+# endif
+#endif
+#else
+# include <sys/endian.h>
+# if BYTE_ORDER == BIG_ENDIAN
+# define WORDS_BIGENDIAN 1
+# endif
+#endif
+
+/* Enable large inode numbers on Mac OS X 10.5. */
+#ifndef _DARWIN_USE_64_BIT_INODE
+# define _DARWIN_USE_64_BIT_INODE 1
#endif
/* Number of bits in a file offset, on hosts where this is settable. */
@@ -322,6 +470,10 @@
#define below would cause a syntax error. */
/* #undef _UINT8_T */
+/* Define to rpl_ if the getopt replacement functions and variables should be
+ used. */
+/* #undef __GETOPT_PREFIX */
+
/* Define to the type of a signed integer type of width exactly 32 bits if
such a type exists and the standard includes do not define it. */
/* #undef int32_t */
Index: src/external/public-domain/xz/lib/Makefile
diff -u src/external/public-domain/xz/lib/Makefile:1.3 src/external/public-domain/xz/lib/Makefile:1.4
--- src/external/public-domain/xz/lib/Makefile:1.3 Tue Nov 9 18:07:09 2010
+++ src/external/public-domain/xz/lib/Makefile Fri Apr 17 14:49:23 2015
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.3 2010/11/09 23:07:09 joerg Exp $
+# $NetBSD: Makefile,v 1.4 2015/04/17 18:49:23 christos Exp $
LIB= lzma
USE_SHLIBDIR= yes
@@ -37,7 +37,7 @@ CPPFLAGS+= -DTUKLIB_SYMBOL_PREFIX=lzma_
CPPFLAGS+= -DNETBSD_NATIVE_SHA256
.PATH: ${XZSRCDIR}/src/common
-SRCS+= tuklib_physmem.c
+SRCS+= tuklib_physmem.c tuklib_cpucores.c
.PATH: ${XZSRCDIR}/src/liblzma/check
SRCS+= check.c crc32_table.c crc64_table.c
@@ -45,14 +45,14 @@ SRCS+= crc32_fast.c crc64_fast.c
.PATH: ${XZSRCDIR}/src/liblzma/common
SRCS+= common.c block_util.c easy_preset.c filter_common.c \
- hardware_physmem.c index.c \
+ hardware_physmem.c hardware_cputhreads.c index.c \
stream_flags_common.c vli_size.c \
alone_encoder.c block_buffer_encoder.c block_encoder.c \
block_header_encoder.c easy_buffer_encoder.c easy_encoder.c \
easy_encoder_memusage.c filter_buffer_encoder.c \
filter_encoder.c filter_flags_encoder.c index_encoder.c \
- stream_buffer_encoder.c stream_encoder.c stream_flags_encoder.c \
- vli_encoder.c \
+ stream_buffer_encoder.c stream_encoder.c stream_encoder_mt.c \
+ stream_flags_encoder.c vli_encoder.c outqueue.c \
alone_decoder.c auto_decoder.c block_buffer_decoder.c \
block_decoder.c block_header_decoder.c easy_decoder_memusage.c \
filter_buffer_decoder.c filter_decoder.c filter_flags_decoder.c \
@@ -95,4 +95,7 @@ liblzma.pc: ${XZSRCDIR}/src/liblzma/libl
CLEANFILES+= liblzma.pc
+LDADD+= -lpthread
+DPADD+= ${LIBPTHREAD}
+
.include <bsd.lib.mk>
Index: src/external/public-domain/xz/lib/shlib_version
diff -u src/external/public-domain/xz/lib/shlib_version:1.2 src/external/public-domain/xz/lib/shlib_version:1.3
--- src/external/public-domain/xz/lib/shlib_version:1.2 Tue Feb 28 09:22:22 2012
+++ src/external/public-domain/xz/lib/shlib_version Fri Apr 17 14:49:23 2015
@@ -1,4 +1,4 @@
-# $NetBSD: shlib_version,v 1.2 2012/02/28 14:22:22 joerg Exp $
+# $NetBSD: shlib_version,v 1.3 2015/04/17 18:49:23 christos Exp $
#
-major=1
-minor=1
+major=2
+minor=0