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