mirror of
https://github.com/pyenv/pyenv.git
synced 2024-11-21 20:47:00 -05:00
On Darwin, should not build readline if there is brewed readline
This commit is contained in:
parent
db141f66a4
commit
aa76fd2f9c
1 changed files with 11 additions and 13 deletions
|
@ -920,19 +920,17 @@ use_homebrew_yaml() {
|
||||||
}
|
}
|
||||||
|
|
||||||
has_broken_mac_readline() {
|
has_broken_mac_readline() {
|
||||||
if [ "$(uname -s)" = "Darwin" ]; then
|
if [ "$(uname -s)" = "Darwin" ] && ! use_homebrew_readline; then
|
||||||
use_homebrew_readline || {
|
# MacOSX 10.4 has a broken readline.
|
||||||
# MacOSX 10.4 has a broken readline.
|
# https://github.com/yyuu/pyenv/issues/23
|
||||||
# https://github.com/yyuu/pyenv/issues/23
|
local retval=1
|
||||||
local retval=1
|
local conftest="$BUILD_PATH/has_broken_mac_readline.h"
|
||||||
local conftest="$BUILD_PATH/has_broken_mac_readline.h"
|
if [ "$(uname -s)" = "Darwin" ]; then
|
||||||
if [ "$(uname -s)" = "Darwin" ]; then
|
echo "#include <readline/rlconf.h>" > "$conftest"
|
||||||
echo "#include <readline/rlconf.h>" > "$conftest"
|
"${CPP:-cpp}" $CPPFLAGS "$conftest" 1>/dev/null 2>&1 || retval=0
|
||||||
"${CPP:-cpp}" $CPPFLAGS "$conftest" 1>/dev/null 2>&1 || retval=0
|
rm -f "$conftest"
|
||||||
rm -f "$conftest"
|
fi
|
||||||
fi
|
return "$retval"
|
||||||
return "$retval"
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue