]> 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)
committerGitHub <noreply@github.com>
Wed, 11 Dec 2024 04:35:16 +0000 (20:35 -0800)
It is sufficent to use HAVE_LZMA_H and then check for macros defined in
lzma.h

configure.ac
libarchive/test/test_read_format_7zip.c

index 5e620ae54b55ec40a948302fc613db4b6d5a9009..57c3793c11d25189832a1b9b378a216276fb70ed 100644 (file)
@@ -518,19 +518,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);