Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tianlh
LightGBM-DCU
Commits
53e0ddf7
Unverified
Commit
53e0ddf7
authored
Dec 11, 2024
by
Scott Moser
Committed by
GitHub
Dec 11, 2024
Browse files
[R-package] Avoid bashisms (non-POSIX code) in R-package/configure (#6746)
parent
186c7cd4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
R-package/configure
R-package/configure
+4
-4
R-package/configure.ac
R-package/configure.ac
+4
-4
No files found.
R-package/configure
View file @
53e0ddf7
...
...
@@ -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
##########
...
...
@@ -1850,11 +1850,11 @@ then
# If Homebrew is found and libomp was installed with it, this code adds the necessary
# flags for the compiler to find libomp headers and for the linker to find libomp.dylib.
HOMEBREW_LIBOMP_PREFIX
=
""
if
command
-v
brew
&>
/dev/null
;
then
if
command
-v
brew
>
/dev/null
2>&1
;
then
ac_brew_openmp
=
no
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: checking whether OpenMP was installed via Homebrew"
>
&5
printf
%s
"checking whether OpenMP was installed via Homebrew... "
>
&6
;
}
brew
--prefix
libomp
&
>/dev/null
&&
ac_brew_openmp
=
yes
brew
--prefix
libomp
>
/dev/null
2>&1
&&
ac_brew_openmp
=
yes
{
printf
"%s
\n
"
"
$as_me
:
${
as_lineno
-
$LINENO
}
: result:
${
ac_brew_openmp
}
"
>
&5
printf
"%s
\n
"
"
${
ac_brew_openmp
}
"
>
&6
;
}
if
test
"
${
ac_brew_openmp
}
"
=
yes
;
then
...
...
R-package/configure.ac
View file @
53e0ddf7
...
...
@@ -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
##########
...
...
@@ -112,10 +112,10 @@ then
# If Homebrew is found and libomp was installed with it, this code adds the necessary
# flags for the compiler to find libomp headers and for the linker to find libomp.dylib.
HOMEBREW_LIBOMP_PREFIX=""
if command -v brew
&>
/dev/null; then
if command -v brew
>
/dev/null
2>&1
; then
ac_brew_openmp=no
AC_MSG_CHECKING([whether OpenMP was installed via Homebrew])
brew --prefix libomp
&
>/dev/null && ac_brew_openmp=yes
brew --prefix libomp >/dev/null
2>&1
&& ac_brew_openmp=yes
AC_MSG_RESULT([${ac_brew_openmp}])
if test "${ac_brew_openmp}" = yes; then
HOMEBREW_LIBOMP_PREFIX=`brew --prefix libomp`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment