~ubuntu-branches/ubuntu/wily/luatex/wily

« back to all changes in this revision

Viewing changes to source/libs/zziplib/zziplib-0.13.58/m4/ax_pax_tar.m4

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Preining
  • Date: 2010-04-29 00:47:19 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20100429004719-o42etkqe90n97b9e
Tags: 0.60.1-1
* new upstream release, adapt build-script patch
* disable patch: upstream-epstopdf_cc_no_xpdf_patching, included upstream
* disable patch: libpoppler-0.12, not needed anymore

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
dnl @synopsis AX_PAX_TAR
 
2
dnl
 
3
dnl Most people will not know about the "tar"-wars a long while back.
 
4
dnl In the end the proponents of cpio lost just as all the oldish
 
5
dnl tar formats were dumped in favor of a new format that based on
 
6
dnl the successful "ustar" format. The extensions did mostly cover
 
7
dnl a portable definition of filenames and such stuff.
 
8
 
 
9
dnl The most interesting thing however is that the opengroup (the.
 
10
dnl UNIX standardization body) did not document the tool for the
 
11
dnl portable tar format under the name of "tar" but instead it did
 
12
dnl use the name "pax" which stands for "portable archiver". Even
 
13
dnl more so, the "pax" utitility is required to understand the old
 
14
dnl tar and cpio formats but it will default to a "tar"-like variant.
 
15
dnl The "pax" tool has been in the Unix standard ever since UNIX92.
 
16
dnl
 
17
dnl Interestingly gnu-tar will use the pax features as soon as they
 
18
dnl are required - but you can not be sure if gnu-tar is available,
 
19
dnl and it is quite likely that the system tar will default to the
 
20
dnl old format of the system in whatever it was. On any currrent
 
21
dnl Unix system however one should be able to find "pax", so one
 
22
dnl should prefer that one as the most portable tool.
 
23
 
 
24
dnl The downside is however that the commandline options of "pax"
 
25
dnl are different from "tar"/"gtar". That's why we define two
 
26
dnl subst'ed names here - PAX_TAR_CREATE and PAX_TAR_EXTRACT, For
 
27
dnl extra portability the first argument should be "*.tar" file
 
28
dnl name but you should be aware that in most cases the "pax" tool
 
29
dnl is invoked. Nota bene: do not use "*.pax" as the file name
 
30
dnl extension because some file managers interpret it as a TeX file.
 
31
dnl
 
32
dnl @category C
 
33
dnl @author Guido U. Draheim <guidod@gmx.de>
 
34
dnl @version 2009-05-22
 
35
dnl @license GPLWithACException
 
36
 
 
37
AC_DEFUN([_AX_PAX_TAR_TOOL],[
 
38
if test -z "$ac_cv_pax_tar_tool"; then
 
39
  AC_PATH_PROG([PAX],[pax], :)
 
40
  if test "$ac_cv_path_PAX" != ":"; then
 
41
    ac_cv_pax_tar_tool="pax"
 
42
  else #3
 
43
  AC_PATH_PROG([GNUTAR],[gnutar], :)
 
44
  if test "$ac_cv_path_GNUTAR" != ":"; then
 
45
    ac_cv_pax_tar_tool="gnutar"
 
46
  else #1
 
47
  AC_PATH_PROG([GTAR],[gtar], :)
 
48
  if test "$ac_cv_path_GTAR" != ":"; then
 
49
    ac_cv_pax_tar_tool="gtar"
 
50
  else #2
 
51
  AC_PATH_PROG([TAR],[tar], :)
 
52
  if test "$ac_cv_path_TAR" != ":"; then
 
53
    ac_cv_pax_tar_tool="tar"
 
54
  fi
 
55
  fi fi fi #3 #2 #1
 
56
  AC_MSG_CHECKING([for portable tar tool])
 
57
  AC_MSG_RESULT([$ac_cv_pax_tar_tool])
 
58
fi
 
59
])
 
60
 
 
61
AC_DEFUN([_AX_PAX_TAR_CREATE],[
 
62
  _AX_PAX_TAR_TOOL
 
63
  AC_MSG_CHECKING([for invokation create portable tar archives])
 
64
  if test "$ac_cv_pax_tar_tool" = "gnutar"; then
 
65
    ax_pax_tar_create="'$ac_cv_path_GNUTAR' cf"
 
66
  elif test "$ac_cv_pax_tar_tool" = "gtar"; then
 
67
    ax_pax_tar_create="'$ac_cv_path_GTAR' cf"
 
68
  elif test "$ac_cv_pax_tar_tool" = "pax"; then
 
69
    ax_pax_tar_create="'$ac_cv_path_PAX' -w -f"
 
70
    dnl BSD PAX has the nuisiance to prompt for a new archive on errors
 
71
    if "$ac_cv_path_PAX" --help 2>&1 | grep "pax.*-[[a-zA-Z]]*O" ; then
 
72
       ax_pax_tar_extract="'$ac_cv_path_PAX' -w -O -f"
 
73
    fi
 
74
  elif test "$ac_cv_pax_tar_tool" = "tar"; then
 
75
    ax_pax_tar_create="'$ac_cv_path_TAR' cf"
 
76
  else
 
77
    ax_pax_tar_create=": 'unknown pax tar tool $ac_cv_pax_tar_tool'"
 
78
  fi
 
79
  AC_MSG_RESULT([$ax_pax_tar_create])
 
80
])
 
81
 
 
82
AC_DEFUN([_AX_PAX_TAR_EXTRACT],[
 
83
  _AX_PAX_TAR_TOOL
 
84
  AC_MSG_CHECKING([for invokation extract portable tar archives])
 
85
  if test "$ac_cv_pax_tar_tool" = "gnutar"; then
 
86
    ax_pax_tar_extract="'$ac_cv_path_GNUTAR' xf"
 
87
  elif test "$ac_cv_pax_tar_tool" = "gtar"; then
 
88
    ax_pax_tar_extract="'$ac_cv_path_GTAR' xf"
 
89
  elif test "$ac_cv_pax_tar_tool" = "pax"; then
 
90
    ax_pax_tar_extract="'$ac_cv_path_PAX' -r -f"
 
91
    dnl BSD PAX has the nuisiance to prompt for a new archive on errors
 
92
    if "$ac_cv_path_PAX" --help 2>&1 | grep "pax.*-[[a-zA-Z]]*O" ; then
 
93
       ax_pax_tar_extract="'$ac_cv_path_PAX' -r -O -f"
 
94
    fi
 
95
  elif test "$ac_cv_pax_tar_tool" = "tar"; then
 
96
    ax_pax_tar_extract="'$ac_cv_path_TAR' xf"
 
97
  else
 
98
    ax_pax_tar_extract=": 'unknown pax tar tool $ac_cv_pax_tar_tool'"
 
99
  fi
 
100
  AC_MSG_RESULT([$ax_pax_tar_extract])
 
101
])
 
102
 
 
103
AC_DEFUN([AX_PAX_TAR_CREATE],[dnl
 
104
_AX_PAX_TAR_CREATE
 
105
m4_ifval([$1],[dnl
 
106
$1="$ax_pax_tar_create"
 
107
AC_SUBST([$1])
 
108
],[dnl
 
109
PAX_TAR_CREATE="$ax_pax_tar_create"
 
110
AC_SUBST([PAX_TAR_CREATE])
 
111
])
 
112
])
 
113
 
 
114
AC_DEFUN([AX_PAX_TAR_EXTRACT],[dnl
 
115
_AX_PAX_TAR_EXTRACT
 
116
m4_ifval([$1],[dnl
 
117
$1="$ax_pax_tar_extract"
 
118
AC_SUBST([$1])
 
119
],[dnl
 
120
PAX_TAR_EXTRACT="$ax_pax_tar_extract"
 
121
AC_SUBST([PAX_TAR_EXTRACT])
 
122
])
 
123
])
 
124