1
dnl Check for a tar program that speaks ustar format
2
dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
4
dnl This file is free software, distributed under the terms of the GNU
5
dnl General Public License. As a special exception to the GNU General
6
dnl Public License, this file may be distributed as part of a program
7
dnl that contains a configuration script generated by Autoconf, under
8
dnl the same distribution terms as the rest of that program.
10
AC_DEFUN([GNUPG_CHECK_USTAR],
13
AC_HELP_STRING([--with-tar=PATH],[look for a tar program in PATH]),
16
if test x$_do_tar != xno ; then
18
if test x$_do_tar = x ; then
19
AC_PATH_PROG(TAR,"tar")
20
_mytar=$ac_cv_path_TAR
23
# Check if our tar is ustar format. If so, it's good. TODO: Add some
24
# code to check various options, etc, to try and create ustar
27
if test x$_mytar != x ; then
28
AC_MSG_CHECKING([whether $_mytar speaks USTAR])
29
echo hithere > conftest.txt
30
$_mytar -cf - conftest.txt | (dd skip=257 bs=1 count=5 2>/dev/null || cat) | grep ustar > /dev/null
34
if test x$_tar_bad = x0 ; then
42
AM_CONDITIONAL(HAVE_USTAR, test x$_tar_bad = x0)