Debian Codegraph @

m4/binfmt-tar-sort-name.m4

raw
1 # binfmt-tar-sort-name.m4 serial 1
2 dnl BINFMT_TAR_SORT_NAME
3 dnl Use the --sort=name option of GNU tar if it is available.
4 dnl Note that this only works with Automake's default tar-v7 option.
5
6 AC_DEFUN([BINFMT_TAR_SORT_NAME],
7 [
8 AC_BEFORE([AM_INIT_AUTOMAKE], [$0])
9 AC_MSG_CHECKING([if tar --sort=name works])
10 rm -rf conftest.dir
11 mkdir conftest.dir
12 echo GrepMe > conftest.dir/file
13 AM_RUN_LOG([${TAR-tar} chof - conftest.dir --sort=name >conftest.tar])
14 if test -s conftest.tar; then
15 AC_MSG_RESULT([yes])
16 am__tar="$am__tar --sort=name"
17 else
18 AC_MSG_RESULT([no])
19 fi
20 rm -rf conftest.dir
21 ])