]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Remove unnecessary HAVE_LZMA_FILTER_ARM64 feature check (#2433)
authorMostyn Bramley-Moore <mostyn@antipode.se>
Wed, 11 Dec 2024 04:35:16 +0000 (05:35 +0100)
committerMartin Matuska <martin@matuska.de>
Tue, 11 Mar 2025 09:26:16 +0000 (10:26 +0100)
It is sufficent to use HAVE_LZMA_H and then check for macros defined in
lzma.h

(cherry picked from commit 6516cd137eb5381b2f91773456c7069ba576034a)

configure.ac
libarchive/test/test_read_format_7zip.c

index 1bb2c76bfc8ba0643c86ad6eef42ead09aa548df..743343d62753a61e82e26ebeca3df637adafda00 100644 (file)
@@ -516,19 +516,6 @@ if test "x$with_lzma" != "xno"; then
   if test "x$ac_cv_lzma_has_mt" != xno; then
          AC_DEFINE([HAVE_LZMA_STREAM_ENCODER_MT], [1], [Define to 1 if you have the `lzma_stream_encoder_mt' function.])
   fi
-
-  AC_CACHE_CHECK(
-    [whether we have ARM64 filter support in lzma],
-    ac_cv_lzma_has_arm64,
-    [AC_LINK_IFELSE([
-      AC_LANG_PROGRAM([[#include <lzma.h>]
-                       [#ifndef LZMA_FILTER_ARM64]
-                       [#error unsupported]
-                       [#endif]])],
-      [ac_cv_lzma_has_arm64=yes], [ac_cv_lzma_has_arm64=no])])
-  if test "x$ac_cv_lzma_has_arm64" != xno; then
-         AC_DEFINE([HAVE_LZMA_FILTER_ARM64], [1], [Define to 1 if you have the `LZMA_FILTER_ARM64' macro.])
-  fi
 fi
 
 AC_ARG_WITH([lzo2],
index 8f990e49e3c2aaf54a335dcc83e4f60e8f87645f..c79a6e575081b30e63bb5fbd740ee4b93731bdc9 100644 (file)
  */
 #include "test.h"
 
+#if HAVE_LZMA_H
+#include <lzma.h>
+#endif
+
 #if defined(_WIN32) && !defined(__CYGWIN__)
 #define        close           _close
 #define        open            _open
@@ -1158,7 +1162,7 @@ test_arm64_filter(const char *refname)
 
 DEFINE_TEST(test_read_format_7zip_lzma2_arm64)
 {
-#ifdef HAVE_LZMA_FILTER_ARM64
+#ifdef LZMA_FILTER_ARM64
        struct archive *a;
 
        assert((a = archive_read_new()) != NULL);