diff --git a/R-package/configure b/R-package/configure index 11d691674f69..24ef441c02d5 100755 --- a/R-package/configure +++ b/R-package/configure @@ -1789,7 +1789,7 @@ ${CXX} ${CPPFLAGS} ${CXXFLAGS} -o conftest conftest.cpp 2>/dev/null && ./conftes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_mmprefetch}" >&5 printf "%s\n" "${ac_mmprefetch}" >&6; } if test "${ac_mmprefetch}" = yes; then - LGB_CPPFLAGS+=" -DMM_PREFETCH=1" + LGB_CPPFLAGS="${LGB_CPPFLAGS} -DMM_PREFETCH=1" fi ############ @@ -1824,7 +1824,7 @@ ${CXX} ${CPPFLAGS} ${CXXFLAGS} -o conftest conftest.cpp 2>/dev/null && ./conftes { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${ac_mm_malloc}" >&5 printf "%s\n" "${ac_mm_malloc}" >&6; } if test "${ac_mm_malloc}" = yes; then - LGB_CPPFLAGS+=" -DMM_MALLOC=1" + LGB_CPPFLAGS="${LGB_CPPFLAGS} -DMM_MALLOC=1" fi ########## diff --git a/R-package/configure.ac b/R-package/configure.ac index dad365be691c..8cc1c522b179 100644 --- a/R-package/configure.ac +++ b/R-package/configure.ac @@ -60,7 +60,7 @@ AC_LANG_CONFTEST( ${CXX} ${CPPFLAGS} ${CXXFLAGS} -o conftest conftest.cpp 2>/dev/null && ./conftest && ac_mmprefetch=yes AC_MSG_RESULT([${ac_mmprefetch}]) if test "${ac_mmprefetch}" = yes; then - LGB_CPPFLAGS+=" -DMM_PREFETCH=1" + LGB_CPPFLAGS="${LGB_CPPFLAGS} -DMM_PREFETCH=1" fi ############ @@ -86,7 +86,7 @@ AC_LANG_CONFTEST( ${CXX} ${CPPFLAGS} ${CXXFLAGS} -o conftest conftest.cpp 2>/dev/null && ./conftest && ac_mm_malloc=yes AC_MSG_RESULT([${ac_mm_malloc}]) if test "${ac_mm_malloc}" = yes; then - LGB_CPPFLAGS+=" -DMM_MALLOC=1" + LGB_CPPFLAGS="${LGB_CPPFLAGS} -DMM_MALLOC=1" fi ##########