Merge branch 'maint' into master.
[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, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008,
5 # 2011 Free Software Foundation, Inc.
6 #
7 # This file is free software; the Free Software Foundation
8 # gives unlimited permission to copy and/or distribute it,
9 # with or without modifications, as long as this notice is preserved.
10
11 # serial 6
12
13 # AM_MAINTAINER_MODE([DEFAULT-MODE])
14 # ----------------------------------
15 # Control maintainer-specific portions of Makefiles.
16 # Default is to disable them, unless `enable' is passed literally.
17 # For symmetry, `disable' may be passed as well.  Anyway, the user
18 # can override the default with the --enable/--disable switch.
19 AC_DEFUN([AM_MAINTAINER_MODE],
20 [m4_case(m4_default([$1], [disable]),
21        [enable], [m4_define([am_maintainer_other], [disable])],
22        [disable], [m4_define([am_maintainer_other], [enable])],
23        [m4_define([am_maintainer_other], [enable])
24         m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
25 AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
26   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
27   AC_ARG_ENABLE([maintainer-mode],
28     [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
29       am_maintainer_other[ make rules and dependencies not useful
30       (and sometimes confusing) to the casual installer])],
31     [USE_MAINTAINER_MODE=$enableval],
32     [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
33   AC_MSG_RESULT([$USE_MAINTAINER_MODE])
34   AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
35   MAINT=$MAINTAINER_MODE_TRUE
36   AC_SUBST([MAINT])dnl
37 ]
38 )
39
40 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])