[gnome-autoar] configure: Ensure libarchive version is high enough in fallback check



commit 4aec473d6f316c10ca7cc8c097e6778a0a00dbf3
Author: Ting-Wei Lan <lantw src gnome org>
Date:   Wed Sep 7 03:58:20 2016 +0800

    configure: Ensure libarchive version is high enough in fallback check
    
    The previous version of fallback check uses archive_read_new, which is
    incorrect because it will wrongly accept an old version of libarchive
    and fail at link time instead of configure time. This commit fixes it
    by replacing archive_read_new with archive_entry_is_encrypted. This
    function is added in libarchive 3.2.0 and systems with lower versions
    will fail the check.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=770735

 configure.ac |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index d5cb9f0..e63d21b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -59,7 +59,7 @@ LIBARCHIVE_REQUIRED=3.2.0
 PKG_CHECK_MODULES([LIBARCHIVE], [libarchive >= $LIBARCHIVE_REQUIRED],
                   [GNOME_AUTOAR_LIBARCHIVE_REQUIRES="libarchive"
                    AC_SUBST([GNOME_AUTOAR_LIBARCHIVE_REQUIRES])],
-                  [AC_SEARCH_LIBS([archive_read_new], [archive],
+                  [AC_SEARCH_LIBS([archive_entry_is_encrypted], [archive],
                   [GNOME_AUTOAR_LIBARCHIVE_LIBS="-larchive"
                    AC_SUBST([GNOME_AUTOAR_LIBARCHIVE_LIBS])],
                   [AC_MSG_ERROR([libarchive not found])])])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]