Fixed bug which palo can't compiled by JDK 10, add the compile parameter CPPFLAGS of ncurses-6.0, prevent compilation error

This commit is contained in:
HappenLee
2018-07-24 16:51:54 +08:00
parent a69ac65760
commit d0768cbc0f
3 changed files with 6 additions and 6 deletions

View File

@ -37,8 +37,8 @@ if [ -z $JAVA_HOME ]; then
exit 1
fi
JAVA=${JAVA_HOME}/bin/java
JAVA_VER=$(${JAVA} -version 2>&1 | sed 's/.* version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
if [[ $JAVA_VER < 18 ]]; then
JAVA_VER=$(${JAVA} -version 2>&1 | sed 's/.* version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q' | cut -f1 -d " ")
if [ $JAVA_VER -lt 18 ]; then
echo "Require JAVA with JDK version at least 1.8"
exit 1
fi

View File

@ -25,9 +25,9 @@ if [ -z $JAVA_HOME ]; then
exit 1
fi
JAVA=${JAVA_HOME}/bin/java
JAVA_VER=$(${JAVA} -version 2>&1 | sed 's/.* version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q')
if [[ $JAVA_VER < 18 ]]; then
echo "Error: java version is too old" $JAVA_VER " need jdk 1.8."
JAVA_VER=$(${JAVA} -version 2>&1 | sed 's/.* version "\(.*\)\.\(.*\)\..*"/\1\2/; 1q' | cut -f1 -d " ")
if [ $JAVA_VER -lt 18 ]; then
echo "Error: java version is too old" $JAVA_VER" need jdk 1.8."
exit 1
fi

View File

@ -367,7 +367,7 @@ build_ncurses() {
check_if_source_exist $NCURSES_SOURCE
cd $TP_SOURCE_DIR/$NCURSES_SOURCE
CPPFLAGS="-I${TP_INCLUDE_DIR}" \
CPPFLAGS="-I${TP_INCLUDE_DIR} -P" \
LDFLAGS="-L${TP_LIB_DIR}" \
CFLAGS="-fPIC" \
./configure --prefix=$TP_INSTALL_DIR