Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / m4 / maintainer.m4
blob0b54e67edb57fd06893a75f3e424e35a3ddb9c97
1 # Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
2 # From Jim Meyering
4 # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
5 # Free Software Foundation, Inc.
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.
11 # serial 5
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 am_maintainer_other maintainer-specific portions of Makefiles])
26   dnl maintainer-mode's default is 'disable' unless 'enable' is passed
27   AC_ARG_ENABLE([maintainer-mode],
28 [  --][am_maintainer_other][-maintainer-mode  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
39 AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])