]> git.cworth.org Git - tar/blob - acinclude.m4
no point suggesting something that's required
[tar] / acinclude.m4
1 dnl Special Autoconf macros for GNU Tar         -*- autoconf -*-
2 dnl Copyright (C) 2009 Free Software Foundation, Inc.
3 dnl
4 dnl GNU tar is free software; you can redistribute it and/or modify
5 dnl it under the terms of the GNU General Public License as published by
6 dnl the Free Software Foundation; either version 3, or (at your option)
7 dnl any later version.
8 dnl
9 dnl GNU tar is distributed in the hope that it will be useful,
10 dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
11 dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 dnl GNU General Public License for more details.
13 dnl
14 dnl You should have received a copy of the GNU General Public License along
15 dnl with GNU tar.  If not, see <http://www.gnu.org/licenses/>.
16
17 AC_DEFUN([TAR_COMPR_PROGRAM],[
18  m4_pushdef([tar_compr_define],translit($1,[a-z+-],[A-ZX_])[_PROGRAM])
19  m4_pushdef([tar_compr_var],[tar_cv_compressor_]translit($1,[+-],[x_]))
20  AC_ARG_WITH($1,
21              AC_HELP_STRING([--with-]$1[=PROG],
22                             [use PROG as ]$1[ compressor program]),
23              [tar_compr_var=${withval}],
24              [tar_compr_var=m4_if($2,,$1,$2)])
25  AC_DEFINE_UNQUOTED(tar_compr_define, "$tar_compr_var",
26                     [Define to the program name of ]$1[ compressor program])])