Macro: ac_withnone

Back to the Main Page. | Download the M4 Source.

# ac_withnone

## Synopsis

``

## Version

guidod @ ac-archive-0.5.32

## Author

## Description

## M4 Source Code

    dnl AC_WITHNONE_IF(flag,cond) - not unlike AM_CONDITIONAL
    AC_DEFUN(AC_WITHNONE_IF,
    [AC_SUBST($1_WITH)
    AC_SUBST($1_NONE)
    if $2; then
        $1_WITH=""
        $1_NONE="#"
    else
        $1_WITH="#"
        $1_NONE=""
    fi
    ])

    dnl AC_WITHOUT_SUBST(varname) - not unlike AM_CONDITIONAL
    AC_DEFUN(AC_SUBST_WITHOUT,
    [AC_SUBST(WITH_$1)
    AC_SUBST(WITHOUT_$1)
    v=`echo [$]$1`
    a="yes"
    if test "_$v" = "_" ; then v="no" ; fi
    if test "_$v" = ":" ; then v="no" ; fi
    if test "_$v" = "_0" ; then v="no" ; fi
    if test "_$v" = "_no" ; then v="no" ; fi
    if test "_$v" = "_false" ; then v="no" ; fi
    if test "$a" = "yes" ; then
        WITH_$1=""
        WITHOUT_$1="#"
    else
        WITH_$1="#"
        WITHOUT_$1=""
    fi
    ])