Skip to content

Commit

Permalink
Do not use '+=' in R-package/configure, it is not posix sh.
Browse files Browse the repository at this point in the history
On systems that did not have bash as /bin/sh this would end up
causing strange compilation errors.

Fixes #6743.
  • Loading branch information
smoser committed Dec 11, 2024
1 parent ae76aad commit 403d321
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R-package/configure
Original file line number Diff line number Diff line change
Expand Up @@ -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

############
Expand Down Expand Up @@ -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

##########
Expand Down
4 changes: 2 additions & 2 deletions R-package/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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

############
Expand All @@ -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

##########
Expand Down

0 comments on commit 403d321

Please sign in to comment.