maintainer.m4 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. # Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
  2. # From Jim Meyering
  3. # Copyright (C) 1996-2017 Free Software Foundation, Inc.
  4. #
  5. # This file is free software; the Free Software Foundation
  6. # gives unlimited permission to copy and/or distribute it,
  7. # with or without modifications, as long as this notice is preserved.
  8. # AM_MAINTAINER_MODE([DEFAULT-MODE])
  9. # ----------------------------------
  10. # Control maintainer-specific portions of Makefiles.
  11. # Default is to disable them, unless 'enable' is passed literally.
  12. # For symmetry, 'disable' may be passed as well. Anyway, the user
  13. # can override the default with the --enable/--disable switch.
  14. AC_DEFUN([AM_MAINTAINER_MODE],
  15. [m4_case(m4_default([$1], [disable]),
  16. [enable], [m4_define([am_maintainer_other], [disable])],
  17. [disable], [m4_define([am_maintainer_other], [enable])],
  18. [m4_define([am_maintainer_other], [enable])
  19. m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
  20. AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
  21. dnl maintainer-mode's default is 'disable' unless 'enable' is passed
  22. AC_ARG_ENABLE([maintainer-mode],
  23. [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
  24. am_maintainer_other[ make rules and dependencies not useful
  25. (and sometimes confusing) to the casual installer])],
  26. [USE_MAINTAINER_MODE=$enableval],
  27. [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
  28. AC_MSG_RESULT([$USE_MAINTAINER_MODE])
  29. AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
  30. MAINT=$MAINTAINER_MODE_TRUE
  31. AC_SUBST([MAINT])dnl
  32. ]
  33. )