Collection of DPF-based plugins for packaging
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1KB

  1. # ===========================================================================
  2. # https://www.gnu.org/software/autoconf-archive/ax_silent_mode.html
  3. # ===========================================================================
  4. #
  5. # SYNOPSIS
  6. #
  7. # AX_SILENT_MODE(on|off)
  8. #
  9. # DESCRIPTION
  10. #
  11. # Temporarily disable console output when running Autoconf macros. For
  12. # example:
  13. #
  14. # AX_SILENT_MODE(on) dnl disable console output
  15. # AC_PROG_CXX
  16. # AX_SILENT_MODE(off) dnl enable console output
  17. # AC_PROG_RANLIB
  18. #
  19. # LICENSE
  20. #
  21. # Copyright (c) 2008 Peter Simons <simons@cryp.to>
  22. # Copyright (c) 2008 Paolo Bonzini <bonzini@gnu.org>
  23. #
  24. # Copying and distribution of this file, with or without modification, are
  25. # permitted in any medium without royalty provided the copyright notice
  26. # and this notice are preserved. This file is offered as-is, without any
  27. # warranty.
  28. #serial 8
  29. AC_DEFUN([AX_SILENT_MODE],
  30. [
  31. case "$1" in
  32. on)
  33. exec 6>/dev/null
  34. ;;
  35. off)
  36. exec 6>&1
  37. ;;
  38. *)
  39. AC_MSG_ERROR([Silent mode can only be switched "on" or "off".])
  40. ;;
  41. esac
  42. ])dnl