Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICU-20160 Add check for Python 3 in autoconf and nmake. #157

Merged
merged 4 commits into from
Sep 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions icu4c/source/configure
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,7 @@ GREP
DOXYGEN
cross_buildroot
U_MAKE
PYTHON3
cross_compiling
INSTALL_DATA
INSTALL_SCRIPT
Expand Down Expand Up @@ -4199,6 +4200,49 @@ fi
#AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
#AC_CHECK_PROG(STRIP, strip, strip, true)

for ac_prog in python3
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_prog_PYTHON3+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$PYTHON3"; then
ac_cv_prog_PYTHON3="$PYTHON3" # Let the user override the test.
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
IFS=$as_save_IFS
test -z "$as_dir" && as_dir=.
for ac_exec_ext in '' $ac_executable_extensions; do
if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
ac_cv_prog_PYTHON3="$ac_prog"
$as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
break 2
fi
done
done
IFS=$as_save_IFS

fi
fi
PYTHON3=$ac_cv_prog_PYTHON3
if test -n "$PYTHON3"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON3" >&5
$as_echo "$PYTHON3" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi


test -n "$PYTHON3" && break
done


# Check for the platform make
for ac_prog in gmake gnumake
do
Expand Down Expand Up @@ -9159,4 +9203,17 @@ then
echo "## Expect build failures in the 'data', 'test', and other directories."
fi

if test -z "$PYTHON3";
then
echo ""
echo "NOTICE: Unable to find Python 3. ICU versions 64 and later will require Python 3 to build."
echo "See ICU-10923 for more information: https://unicode-org.atlassian.net/browse/ICU-10923"
echo ""
else
echo ""
echo "Found Python 3. You are all set for ICU 64, which will require Python 3 to build."
echo "For more info on Python 3 requirement, see: https://unicode-org.atlassian.net/browse/ICU-10923"
echo ""
fi

$as_unset _CXX_CXXSUFFIX
15 changes: 15 additions & 0 deletions icu4c/source/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ fi
#AC_CHECK_PROG(AUTOCONF, autoconf, autoconf, true)
#AC_CHECK_PROG(STRIP, strip, strip, true)

AC_CHECK_PROGS(PYTHON3, python3)

# Check for the platform make
AC_PATH_PROGS(U_MAKE, gmake gnumake, make)
AC_SUBST(U_MAKE)
Expand Down Expand Up @@ -1462,4 +1464,17 @@ then
echo "## Expect build failures in the 'data', 'test', and other directories."
fi

if test -z "$PYTHON3";
then
echo ""
echo "NOTICE: Unable to find Python 3. ICU versions 64 and later will require Python 3 to build."
echo "See ICU-10923 for more information: https://unicode-org.atlassian.net/browse/ICU-10923"
echo ""
else
echo ""
echo "Found Python 3. You are all set for ICU 64, which will require Python 3 to build."
echo "For more info on Python 3 requirement, see: https://unicode-org.atlassian.net/browse/ICU-10923"
echo ""
fi

$as_unset _CXX_CXXSUFFIX
8 changes: 8 additions & 0 deletions icu4c/source/data/makedata.mak
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,14 @@ ICU_LIB_TARGET=$(DLL_OUTPUT)\$(U_ICUDATA_NAME).dll
!ENDIF
!MESSAGE ICU data make path is $(ICUMAKE)

!IF [py -3]!=0
!MESSAGE Information: Unable to find Python 3. ICU versions 64 and later will require Python 3 to build.
!MESSAGE Information: See ICU-10923 for more information: https://unicode-org.atlassian.net/browse/ICU-10923
!ELSE
!MESSAGE Information: Found Python 3. You are all set for ICU 64, which will require Python 3 to build.
!MESSAGE Information: For more info on Python 3 requirement, see: https://unicode-org.atlassian.net/browse/ICU-10923
!ENDIF

# Suffixes for data files
.SUFFIXES : .nrm .icu .ucm .cnv .dll .dat .res .txt .c

Expand Down