Clarify overriding of `*_DEPENDENCIES' in LIBOBJS node.
[automake/ericb.git] / m4 / options.m4
blob8e5017e8c257cfa6146d83e68f4d4d3b67f2abfa
1 # Helper functions for option handling.                     -*- Autoconf -*-
3 # Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
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.
9 # serial 4
11 # _AM_MANGLE_OPTION(NAME)
12 # -----------------------
13 AC_DEFUN([_AM_MANGLE_OPTION],
14 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
16 # _AM_SET_OPTION(NAME)
17 # ------------------------------
18 # Set option NAME.  Presently that only means defining a flag for this option.
19 AC_DEFUN([_AM_SET_OPTION],
20 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
22 # _AM_SET_OPTIONS(OPTIONS)
23 # ----------------------------------
24 # OPTIONS is a space-separated list of Automake options.
25 AC_DEFUN([_AM_SET_OPTIONS],
26 [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
28 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
29 # -------------------------------------------
30 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
31 AC_DEFUN([_AM_IF_OPTION],
32 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])