mirror of
https://github.com/unicode-org/icu.git
synced 2025-04-13 08:53:20 +00:00
ICU-20160 Add check for Python 3 in autoconf and nmake. (#157)
This commit is contained in:
parent
a21523d7c8
commit
a38beef113
3 changed files with 80 additions and 0 deletions
icu4c/source
57
icu4c/source/configure
vendored
57
icu4c/source/configure
vendored
|
@ -694,6 +694,7 @@ GREP
|
|||
DOXYGEN
|
||||
cross_buildroot
|
||||
U_MAKE
|
||||
PYTHON3
|
||||
cross_compiling
|
||||
INSTALL_DATA
|
||||
INSTALL_SCRIPT
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue