Edit

kc3-lang/automake/m4/options.m4

Branch :

  • Show log

    Commit

  • Author : Alexandre Duret-Lutz
    Date : 2002-01-12 17:38:56
    Hash : e375e1f2
    Message : * test/nodefine.test, test/nodefine2.test: Check that no-define works, not the contrary... * m4/options.m4 (_AM_IF_OPTIONS): Use m4_ifset. * m4/init.m4 (AM_INIT_AUTOMAKE): A third argument implies no-define, not the contrary.

  • m4/options.m4
  • # Helper functions for option handling.                    -*- Autoconf -*-
    
    # Copyright 2001, 2002  Free Software Foundation, Inc.
    
    # This program is free software; you can redistribute it and/or modify
    # it under the terms of the GNU General Public License as published by
    # the Free Software Foundation; either version 2, or (at your option)
    # any later version.
    
    # This program is distributed in the hope that it will be useful,
    # but WITHOUT ANY WARRANTY; without even the implied warranty of
    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    # GNU General Public License for more details.
    
    # You should have received a copy of the GNU General Public License
    # along with this program; if not, write to the Free Software
    # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
    # 02111-1307, USA.
    
    # serial 2
    
    # _AM_MANGLE_OPTION(NAME)
    # -----------------------
    AC_DEFUN([_AM_MANGLE_OPTION],
    [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
    
    # _AM_SET_OPTION(NAME)
    # ------------------------------
    # Set option NAME.  Presently that only means defining a flag for this option.
    AC_DEFUN([_AM_SET_OPTION],
    [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
    
    # _AM_SET_OPTIONS(OPTIONS)
    # ----------------------------------
    # OPTIONS is a space-separated list of Automake options.
    AC_DEFUN([_AM_SET_OPTIONS],
    [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
    
    # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
    # -------------------------------------------
    # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
    AC_DEFUN([_AM_IF_OPTION],
    [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])