acinclude.m4 1.2 KB

1234567891011121314151617181920212223242526
  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. AC_DEFUN([TAR_COMPR_PROGRAM],[
  17. m4_pushdef([tar_compr_define],translit($1,[a-z+-],[A-ZX_])[_PROGRAM])
  18. m4_pushdef([tar_compr_var],[tar_cv_compressor_]translit($1,[+-],[x_]))
  19. AC_ARG_WITH($1,
  20. AC_HELP_STRING([--with-]$1[=PROG],
  21. [use PROG as ]$1[ compressor program]),
  22. [tar_compr_var=${withval}],
  23. [tar_compr_var=m4_if($2,,$1,$2)])
  24. AC_DEFINE_UNQUOTED(tar_compr_define, "$tar_compr_var",
  25. [Define to the program name of ]$1[ compressor program])])