autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AC_SUBST and AC_CACHE_VAL


From: Ralf Wildenhues
Subject: Re: AC_SUBST and AC_CACHE_VAL
Date: Wed, 13 May 2009 21:54:20 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hi Stefan,

* Stefan Bienert wrote on Tue, May 12, 2009 at 11:35:35AM CEST:
> I have a smallish problem using AC_SUBST together with AC_CACHE_VAL.
> According to the manual, AC_CACHE_VAL may only contain code to set the
> cache-var. But if I want to sent something depending on a cached-var to
> AC_SUBST, I end up in concatenating the same values...Example:
> 
> AC_CACHE_CHECK([whether whatever accepts -foo],
>                 [sb_cv_foo],
>                 [sb_cv_foo=yes]
>                )
> AC_SUBST([SB_FOOS], ["$SB_FOOS bar"])

What does the last line have to do with the ones before that?

If an initial value of SB_FOOS from the user (./configure SB_FOOS=...)
is to be honored, then maybe you should just check for presence of bar
before adding it?
  case " $SB_FOOS " in
  *\ bar\ *) ;;
  *) SB_FOOS="$SB_FOOS bar";;
  esac

If the user is not involved here, then how come you save and restore
SB_FOOS but not initialize it early in configure?

Cheers,
Ralf




reply via email to

[Prev in Thread] Current Thread [Next in Thread]