spice-common/m4/spice-deps.m4 adds various foo_CFLAGS and foo_DEPS to the given common_CFLAGS and common_DEPS. But it does this by substituting the value directly, instead of using these variables (which are also being defined with AC_DEFINE). This way, it is impossible to re-define these variables during make time. So instead of AC_VAR_APPEND([$1_CFLAGS], [" $foo_CFLAGS"]) which adds _contents_ of $foo_CFLAGS, use AC_VAR_APPEND([$1_CFLAGS], [' $(foo_CFLAGS)']) which adds reference to foo_CFLAGS variable instead. Signed-off-by: Michael Tokarev <mjt@xxxxxxxxxx> --- spice-common/m4/spice-deps.m4 | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/spice-common/m4/spice-deps.m4 b/spice-common/m4/spice-deps.m4 index e4b2c8d..64e7093 100644 --- a/spice-common/m4/spice-deps.m4 +++ b/spice-common/m4/spice-deps.m4 @@ -57,8 +57,8 @@ AC_DEFUN([SPICE_CHECK_SMARTCARD], [ AC_DEFINE(USE_SMARTCARD, [1], [Define if supporting smartcard proxying]) fi fi - AS_VAR_APPEND([$1_CFLAGS], [" $SMARTCARD_CFLAGS"]) - AS_VAR_APPEND([$1_LIBS], [" $SMARTCARD_LIBS"]) + AS_VAR_APPEND([$1_CFLAGS], [' $(SMARTCARD_CFLAGS)']) + AS_VAR_APPEND([$1_LIBS], [' $(SMARTCARD_LIBS)']) ]) @@ -83,8 +83,8 @@ AC_DEFUN([SPICE_CHECK_CELT051], [ AM_CONDITIONAL([HAVE_CELT051], [test "x$have_celt051" = "xyes"]) AM_COND_IF([HAVE_CELT051], AC_DEFINE([HAVE_CELT051], 1, [Define if we have celt051 codec])) - AS_VAR_APPEND([$1_CFLAGS], [" $CELT051_CFLAGS"]) - AS_VAR_APPEND([$1_LIBS], [" $CELT051_LIBS"]) + AS_VAR_APPEND([$1_CFLAGS], [' $(CELT051_CFLAGS)']) + AS_VAR_APPEND([$1_LIBS], [' $(CELT051_LIBS)']) ]) @@ -101,8 +101,8 @@ AC_DEFUN([SPICE_CHECK_OPUS], [ if test "x$have_opus" = "xyes" ; then AC_DEFINE([HAVE_OPUS], [1], [Define if we have OPUS]) fi - AS_VAR_APPEND([$1_CFLAGS], [" $OPUS_CFLAGS"]) - AS_VAR_APPEND([$1_LIBS], [" $OPUS_LIBS"]) + AS_VAR_APPEND([$1_CFLAGS], [' $(OPUS_CFLAGS)']) + AS_VAR_APPEND([$1_LIBS], [' $(OPUS_LIBS)']) ]) @@ -132,8 +132,8 @@ AC_DEFUN([SPICE_CHECK_OPENGL], [ AC_MSG_ERROR([GL libraries not available]) fi fi - AS_VAR_APPEND([$1_CFLAGS], [" $GL_CFLAGS"]) - AS_VAR_APPEND([$1_LIBS], [" $GL_LIBS"]) + AS_VAR_APPEND([$1_CFLAGS], [' $(GL_CFLAGS)']) + AS_VAR_APPEND([$1_LIBS], [' $(GL_LIBS)']) ]) @@ -144,8 +144,8 @@ AC_DEFUN([SPICE_CHECK_OPENGL], [ #--------------------------- AC_DEFUN([SPICE_CHECK_PIXMAN], [ PKG_CHECK_MODULES(PIXMAN, pixman-1 >= 0.17.7) - AS_VAR_APPEND([$1_CFLAGS], [" $PIXMAN_CFLAGS"]) - AS_VAR_APPEND([$1_LIBS], [" $PIXMAN_LIBS"]) + AS_VAR_APPEND([$1_CFLAGS], [' $(PIXMAN_CFLAGS)']) + AS_VAR_APPEND([$1_LIBS], [' $(PIXMAN_LIBS)']) ]) @@ -156,8 +156,8 @@ AC_DEFUN([SPICE_CHECK_PIXMAN], [ #--------------------------- AC_DEFUN([SPICE_CHECK_GLIB2], [ PKG_CHECK_MODULES(GLIB2, glib-2.0) - AS_VAR_APPEND([$1_CFLAGS], [" $GLIB2_CFLAGS"]) - AS_VAR_APPEND([$1_LIBS], [" $GLIB2_LIBS"]) + AS_VAR_APPEND([$1_CFLAGS], [' $(GLIB2_CFLAGS)']) + AS_VAR_APPEND([$1_LIBS], [' $(GLIB2_LIBS)']) ]) # SPICE_CHECK_PYTHON_MODULES() @@ -200,6 +200,6 @@ AC_DEFUN([SPICE_CHECK_LZ4], [ PKG_CHECK_MODULES([LZ4], [liblz4]) AC_DEFINE(USE_LZ4, [1], [Define to build with lz4 support]) fi - AS_VAR_APPEND([$1_CFLAGS], [" $LZ4_CFLAGS"]) - AS_VAR_APPEND([$1_LIBS], [" $LZ4_LIBS"]) + AS_VAR_APPEND([$1_CFLAGS], [' $(LZ4_CFLAGS)']) + AS_VAR_APPEND([$1_LIBS], [' $(LZ4_LIBS)']) ]) -- 2.1.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/spice-devel