~ubuntu-branches/ubuntu/feisty/gnupg2/feisty

« back to all changes in this revision

Viewing changes to m4/tar-ustar.m4

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-11-24 18:48:23 UTC
  • mfrom: (1.1.4 upstream)
  • Revision ID: james.westby@ubuntu.com-20061124184823-17ir9m46tl09n9k4
Tags: 2.0.0-4ubuntu1
* Synchronize to Debian, reapply remaining Ubuntu changes to pristine Debian
  version:
  - Remove libpcsclite-dev, libopensc2-dev build dependencies (they are in
    universe).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl Check for a tar program that speaks ustar format
 
2
dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
3
dnl
 
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.
 
9
 
 
10
AC_DEFUN([GNUPG_CHECK_USTAR],
 
11
[
 
12
  AC_ARG_WITH(tar,
 
13
     AC_HELP_STRING([--with-tar=PATH],[look for a tar program in PATH]),
 
14
     [_do_tar=$withval])
 
15
 
 
16
  if test x$_do_tar != xno ; then
 
17
 
 
18
     if test x$_do_tar = x ; then
 
19
        AC_PATH_PROG(TAR,"tar")
 
20
        _mytar=$ac_cv_path_TAR
 
21
     fi
 
22
 
 
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
 
25
     # format.
 
26
 
 
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
 
31
        _tar_bad=$?
 
32
        rm conftest.txt
 
33
 
 
34
        if test x$_tar_bad = x0 ; then
 
35
           AC_MSG_RESULT([yes])
 
36
        else
 
37
           AC_MSG_RESULT([no])
 
38
        fi
 
39
     fi
 
40
  fi
 
41
 
 
42
  AM_CONDITIONAL(HAVE_USTAR, test x$_tar_bad = x0)
 
43
])dnl