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/dist Revert to vendor state.



details:   https://anonhg.NetBSD.org/src/rev/1f3c457998ec
branches:  trunk
changeset: 433636:1f3c457998ec
user:      joerg <joerg%NetBSD.org@localhost>
date:      Tue Sep 25 05:39:19 2018 +0000

description:
Revert to vendor state.

diffstat:

 external/public-domain/xz/dist/configure.ac              |  209 ++++++++++----
 external/public-domain/xz/dist/src/liblzma/check/check.h |   51 +--
 external/public-domain/xz/dist/src/xz/args.c             |   18 +-
 3 files changed, 191 insertions(+), 87 deletions(-)

diffs (truncated from 531 to 300 lines):

diff -r 0a4ad99868b6 -r 1f3c457998ec external/public-domain/xz/dist/configure.ac
--- a/external/public-domain/xz/dist/configure.ac       Tue Sep 25 05:38:10 2018 +0000
+++ b/external/public-domain/xz/dist/configure.ac       Tue Sep 25 05:39:19 2018 +0000
@@ -15,20 +15,27 @@
 # of malloc(), stat(), or lstat(), since we don't use those functions in
 # a way that would cause the problems the autoconf macros check.
 
-AC_PREREQ([2.52])
+AC_PREREQ([2.64])
 
-AC_INIT([XZ Utils], 5.0.0, [joerg%NetBSD.org@localhost], [xz], [http://tukaani.org/xz/])
+AC_INIT([XZ Utils], m4_esyscmd([/bin/sh build-aux/version.sh]),
+       [lasse.collin%tukaani.org@localhost], [xz], [https://tukaani.org/xz/])
+AC_CONFIG_SRCDIR([src/liblzma/common/common.h])
+AC_CONFIG_AUX_DIR([build-aux])
 AC_CONFIG_MACRO_DIR([m4])
 AC_CONFIG_HEADER([config.h])
-AC_CONFIG_AUX_DIR([../../gnu/dist/autoconf/config])
+
+echo
+echo "$PACKAGE_STRING"
 
+echo
+echo "System type:"
+# This is needed to know if assembler optimizations can be used.
 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 ;;
+       mingw* | cygwin | msys) is_w32=yes ;;
+       *)                      is_w32=no ;;
 esac
 AM_CONDITIONAL([COND_W32], [test "$is_w32" = yes])
 
@@ -36,9 +43,15 @@
 # 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.
+#
+# MSYS2 is treated the same way as Cygwin. It uses plain "msys" like
+# the original MSYS when building MSYS/MSYS2-binaries. Hopefully this
+# doesn't break things for the original MSYS developers. Note that this
+# doesn't affect normal MSYS/MSYS2 users building non-MSYS/MSYS2 binaries
+# since in that case the $host_os is usually mingw32.
 case $host_os in
-       cygwin)  LN_EXEEXT= ;;
-       *)       LN_EXEEXT='$(EXEEXT)' ;;
+       cygwin | msys)  LN_EXEEXT= ;;
+       *)              LN_EXEEXT='$(EXEEXT)' ;;
 esac
 AC_SUBST([LN_EXEEXT])
 
@@ -84,6 +97,7 @@
        [], [enable_encoders=SUPPORTED_FILTERS])
 enable_encoders=`echo "$enable_encoders" | sed 's/,/ /g'`
 if test "x$enable_encoders" = xno || test "x$enable_encoders" = x; then
+       enable_encoders=no
        AC_MSG_RESULT([(none)])
 else
        for arg in $enable_encoders
@@ -101,6 +115,8 @@
                                ;;
                esac
        done
+       AC_DEFINE([HAVE_ENCODERS], [1],
+               [Define to 1 if any of HAVE_ENCODER_foo have been defined.])
        AC_MSG_RESULT([$enable_encoders])
 fi
 
@@ -111,6 +127,7 @@
        [], [enable_decoders=SUPPORTED_FILTERS])
 enable_decoders=`echo "$enable_decoders" | sed 's/,/ /g'`
 if test "x$enable_decoders" = xno || test "x$enable_decoders" = x; then
+       enable_decoders=no
        AC_MSG_RESULT([(none)])
 else
        for arg in $enable_decoders
@@ -128,11 +145,8 @@
                                ;;
                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_DEFINE([HAVE_DECODERS], [1],
+               [Define to 1 if any of HAVE_DECODER_foo have been defined.])
        AC_MSG_RESULT([$enable_decoders])
 fi
 
@@ -141,8 +155,8 @@
        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)
+AM_CONDITIONAL(COND_MAIN_ENCODER, test "x$enable_encoders" != xno)
+AM_CONDITIONAL(COND_MAIN_DECODER, test "x$enable_decoders" != xno)
 
 m4_foreach([NAME], [SUPPORTED_FILTERS],
 [AM_CONDITIONAL(COND_FILTER_[]m4_toupper(NAME), test "x$enable_filter_[]NAME" = xyes)
@@ -176,12 +190,6 @@
 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],
-           [Define to 1 if] NAME [encoder is enabled.])
-       AC_DEFINE(HAVE_DECODER_[]m4_toupper(NAME), [1],
-           [Define to 1 if] NAME [decoder is enabled.])
-])
 
 #################
 # Match finders #
@@ -189,9 +197,8 @@
 
 m4_define([SUPPORTED_MATCH_FINDERS], [hc3,hc4,bt2,bt3,bt4])
 
-m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS], [
-       AC_DEFINE(HAVE_MF_[]m4_toupper(NAME), [1],
-           [Define to 1 to enable] NAME [match finder.])
+m4_foreach([NAME], [SUPPORTED_MATCH_FINDERS],
+[enable_match_finder_[]NAME=no
 ])
 
 AC_MSG_CHECKING([which match finders to build])
@@ -268,20 +275,60 @@
 [AM_CONDITIONAL(COND_CHECK_[]m4_toupper(NAME), test "x$enable_check_[]NAME" = xyes)
 ])dnl
 
+AC_MSG_CHECKING([if external SHA-256 should be used])
+AC_ARG_ENABLE([external-sha256], AS_HELP_STRING([--enable-external-sha256],
+               [Use SHA-256 code from the operating system.
+               See INSTALL for possible subtle problems.]),
+               [], [enable_external_sha256=no])
+if test "x$enable_check_sha256" != "xyes"; then
+       enable_external_sha256=no
+fi
+if test "x$enable_external_sha256" = xyes; then
+       AC_MSG_RESULT([yes])
+else
+       AC_MSG_RESULT([no])
+fi
+
 
 ###########################
 # Assembler optimizations #
 ###########################
 
-AM_CONDITIONAL(COND_ASM_X86, false)
-AM_CONDITIONAL(COND_ASM_X86_64, false)
+AC_MSG_CHECKING([if assembler optimizations should be used])
+AC_ARG_ENABLE([assembler], AS_HELP_STRING([--disable-assembler],
+               [Do not use assembler optimizations even if such exist
+               for the architecture.]),
+       [], [enable_assembler=yes])
+if test "x$enable_assembler" = xyes; then
+       enable_assembler=no
+       case $host_os in
+               # Darwin should work too but only if not creating universal
+               # binaries. Solaris x86 could work too but I cannot test.
+               linux* | *bsd* | mingw* | cygwin | msys | *djgpp*)
+                       case $host_cpu in
+                               i?86)   enable_assembler=x86 ;;
+                               x86_64) enable_assembler=x86_64 ;;
+                       esac
+                       ;;
+       esac
+fi
+case $enable_assembler in
+       x86 | x86_64 | no)
+               AC_MSG_RESULT([$enable_assembler])
+               ;;
+       *)
+               AC_MSG_RESULT([])
+               AC_MSG_ERROR([--enable-assembler accepts only `yes', `no', `x86', or `x86_64'.])
+               ;;
+esac
+AM_CONDITIONAL(COND_ASM_X86, test "x$enable_assembler" = xx86)
+AM_CONDITIONAL(COND_ASM_X86_64, test "x$enable_assembler" = xx86_64)
 
 
 #####################
 # Size optimization #
 #####################
 
-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.
@@ -295,7 +342,6 @@
 fi
 AC_MSG_RESULT([$enable_small])
 AM_CONDITIONAL(COND_SMALL, test "x$enable_small" = xyes)
-fi
 
 
 #############
@@ -384,18 +430,21 @@
 AC_ARG_ENABLE([xzdec], [AS_HELP_STRING([--disable-xzdec],
                [do not build xzdec])],
        [], [enable_xzdec=yes])
+test "x$enable_decoders" = xno && enable_xzdec=no
 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])
+test "x$enable_decoder_lzma1" = xno && enable_lzmadec=no
 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])
+test "x$enable_decoder_lzma1" = xno && enable_lzmainfo=no
 AM_CONDITIONAL([COND_LZMAINFO], [test x$enable_lzmainfo != xno])
 
 AC_ARG_ENABLE([lzma-links], [AS_HELP_STRING([--disable-lzma-links],
@@ -443,6 +492,30 @@
 AM_CONDITIONAL([COND_SYMVERS], [test "x$enable_symbol_versions" = xyes])
 
 
+##############
+# Sandboxing #
+##############
+
+AC_MSG_CHECKING([if sandboxing should be used])
+AC_ARG_ENABLE([sandbox], [AS_HELP_STRING([--enable-sandbox=METHOD],
+               [This is an experimental feature.
+               Sandboxing METHOD can be `auto', `no', or `capsicum'.
+               The default is `no'.])],
+       [], [enable_sandbox=no])
+case $enable_sandbox in
+       auto)
+               AC_MSG_RESULT([maybe (autodetect)])
+               ;;
+       no | capsicum)
+               AC_MSG_RESULT([$enable_sandbox])
+               ;;
+       *)
+               AC_MSG_RESULT([])
+               AC_MSG_ERROR([--enable-sandbox only accepts `auto', `no', or `capsicum'.])
+               ;;
+esac
+
+
 ###############################################################################
 # Checks for programs.
 ###############################################################################
@@ -536,7 +609,7 @@
 
 echo
 echo "Initializing gettext:"
-AM_GNU_GETTEXT_VERSION([0.18])
+AM_GNU_GETTEXT_VERSION([0.19])
 AM_GNU_GETTEXT([external])
 
 
@@ -544,8 +617,8 @@
 # Checks for header files.
 ###############################################################################
 
-AC_DEFINE_UNQUOTED([ASSUME_RAM], [128],
-    [How many MiB of RAM to assume if the real amount cannot be determined.])
+echo
+echo "System headers and functions:"
 
 # There is currently no workarounds in this package if some of
 # these headers are missing.
@@ -590,11 +663,19 @@
 AC_SYS_LARGEFILE
 AC_C_BIGENDIAN
 
-# Find the best function to set timestamps.
-AC_CHECK_FUNCS([futimens futimes futimesat utimes utime], [break])
+
+###############################################################################
+# Checks for library functions.
+###############################################################################
 
-# These are nice to have but not mandatory.
-AC_CHECK_FUNCS([posix_fadvise pipe2])
+# Gnulib replacements as needed
+gl_GETOPT
+
+# Find the best function to set timestamps.
+AC_CHECK_FUNCS([futimens futimes futimesat utimes _futime utime], [break])
+
+# This is nice to have but not mandatory.
+AC_CHECK_FUNCS([posix_fadvise])
 
 TUKLIB_PROGNAME
 TUKLIB_INTEGER
@@ -602,34 +683,34 @@



Home | Main Index | Thread Index | Old Index