The reason automake makes conditional expressions is because some dinosaur does. However, if you really have to do this, you can define your fragment as a variable in configure.ac and AC_SUBST in your Makefile . Thus, automake will not get a chance to see this. Remember to use AM_SUBST_NOTMAKE to avoid creating a string like FOO = @ FOO@ .)
dnl In configure.ac: snippet=' ifeq ($(somevar),Y) foo endif ' AC_SUBST([snippet]) AM_SUBST_NOTMAKE([snippet])
and
#
I sincerely hope for a better way than this.
source share