AC_MSG_ERROR([unable to find the archive_read() function])
])
AC_CHECK_HEADER([archive.h],
[pkg_found_archive_headers=yes; break;])
[pkg_found_archive_headers=yes])
AS_IF([test "x$pkg_found_archive_headers" != "xyes"],
[AC_MSG_ERROR([Unable to find the libarchive headers])])