1# AM_COND_IF -*- Autoconf -*- 2 3# Copyright (C) 2008-2021 Free Software Foundation, Inc. 4# 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. 8 9# _AM_COND_IF 10# _AM_COND_ELSE 11# _AM_COND_ENDIF 12# -------------- 13# These macros are only used for tracing. 14m4_define([_AM_COND_IF]) 15m4_define([_AM_COND_ELSE]) 16m4_define([_AM_COND_ENDIF]) 17 18# AM_COND_IF(COND, [IF-TRUE], [IF-FALSE]) 19# --------------------------------------- 20# If the shell condition COND is true, execute IF-TRUE, otherwise execute 21# IF-FALSE. Allow automake to learn about conditional instantiating macros 22# (the AC_CONFIG_FOOS). 23AC_DEFUN([AM_COND_IF], 24[m4_ifndef([_AM_COND_VALUE_$1], 25 [m4_fatal([$0: no such condition "$1"])])dnl 26_AM_COND_IF([$1])dnl 27if test -z "$$1_TRUE"; then : 28 m4_n([$2])[]dnl 29m4_ifval([$3], 30[_AM_COND_ELSE([$1])dnl 31else 32 $3 33])dnl 34_AM_COND_ENDIF([$1])dnl 35fi[]dnl 36]) 37