source: trunk/essentials/sys-devel/automake-1.7/m4/options.m4

Last change on this file was 3120, checked in by bird, 18 years ago

automake 1.7.9

File size: 1.6 KB
Line 
1# Helper functions for option handling. -*- Autoconf -*-
2
3# Copyright 2001, 2002 Free Software Foundation, Inc.
4
5# This program is free software; you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation; either version 2, or (at your option)
8# any later version.
9
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13# GNU General Public License for more details.
14
15# You should have received a copy of the GNU General Public License
16# along with this program; if not, write to the Free Software
17# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18# 02111-1307, USA.
19
20# serial 2
21
22# _AM_MANGLE_OPTION(NAME)
23# -----------------------
24AC_DEFUN([_AM_MANGLE_OPTION],
25[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
26
27# _AM_SET_OPTION(NAME)
28# ------------------------------
29# Set option NAME. Presently that only means defining a flag for this option.
30AC_DEFUN([_AM_SET_OPTION],
31[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
32
33# _AM_SET_OPTIONS(OPTIONS)
34# ----------------------------------
35# OPTIONS is a space-separated list of Automake options.
36AC_DEFUN([_AM_SET_OPTIONS],
37[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
38
39# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
40# -------------------------------------------
41# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
42AC_DEFUN([_AM_IF_OPTION],
43[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
Note: See TracBrowser for help on using the repository browser.