[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why doesn't this macro work!?
From: |
John Wohlbier |
Subject: |
Re: why doesn't this macro work!? |
Date: |
Sun, 8 Mar 2009 00:42:23 -0700 |
Of course I figured it out the minute after I sent the mail.
AC_DEFINE_UNQUOTED.
I can't claim to understand exactly why, but it works.
On Sun, Mar 8, 2009 at 12:22 AM, John Wohlbier <address@hidden>wrote:
> Below is the macro that doesn't work. Probably something I don't understand
> about m4, as usual.
> --with-dbc works to give me -DDBC=7
> but other variations give me
> -DDBC=\$withval
> -DDBC=\$DBC
>
> Hints are appreciated. Thanks very much.
>
> jgw
>
>
>
> AC_DEFUN([CCS_WITH_DBC], [
> AC_ARG_VAR([DBC], [value of DBC])
>
> AC_ARG_WITH([dbc],
> [AC_HELP_STRING([--with-dbc],
> [level of DBC, design by contract, valid values are 0-7])],
> [
> if test -n "$DBC" ; then
> AC_MSG_NOTICE([setting level of DBC to $DBC])
> AC_DEFINE(DBC, $DBC)
> elif test "$withval" = "yes" ; then
> AC_MSG_NOTICE([--with-dbc specified without a value,
> setting it to 7])
> AC_DEFINE(DBC, [7])
> elif test "$withval" != "no" ; then
> AC_MSG_NOTICE([setting level of DBC to $withval])
> AC_DEFINE(DBC, $withval)
> fi
> ],
> [
> if test -n "$DBC" ; then
> AC_MSG_NOTICE([setting level of DBC])
> AC_DEFINE(DBC, $DBC)
> fi
> ])
> ])
>
>
> --
> John G. Wohlbier
>
>
>
--
John G. Wohlbier