Edit

kc3-lang/automake/m4/cond.m4

Branch :

  • Show log

    Commit

  • Author : Tom Tromey
    Date : 2001-12-30 20:07:36
    Hash : b8dcfd79
    Message : For PR automake/220: * tests/Makefile.am (TESTS): Added pr220.test. * tests/pr220.test: New file. * m4/cond.m4 (AM_CONDITIONAL): Cause config.status to fail if conditional was never run.

  • m4/cond.m4
  • # AM_CONDITIONAL                                              -*- Autoconf -*-
    
    # Copyright 1997, 2000, 2001 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 5
    
    AC_PREREQ(2.52)
    
    # AM_CONDITIONAL(NAME, SHELL-CONDITION)
    # -------------------------------------
    # Define a conditional.
    AC_DEFUN([AM_CONDITIONAL],
    [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
            [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
    AC_SUBST([$1_TRUE])
    AC_SUBST([$1_FALSE])
    if $2; then
      $1_TRUE=
      $1_FALSE='#'
    else
      $1_TRUE='#'
      $1_FALSE=
    fi
    AC_CONFIG_COMMANDS_PRE(
    [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
      AC_MSG_ERROR([conditional \"$1\" was never defined.
    Usually this means the macro was only invoked conditionally.])
    fi])])