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


_______________________________________________
Autoconf mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/autoconf

Reply via email to