]> granicus.if.org Git - icu/commitdiff
ICU-20160 Add check for Python 3 in autoconf and nmake. (#157)
authorShane F. Carr <shane@unicode.org>
Fri, 21 Sep 2018 22:06:57 +0000 (15:06 -0700)
committerShane Carr <shane@unicode.org>
Thu, 27 Sep 2018 21:27:41 +0000 (14:27 -0700)
icu4c/source/configure
icu4c/source/configure.ac
icu4c/source/data/makedata.mak

index a11ee54ab52eaa21cb586a9d198f2cbedeb30bb8..1ed93bfcd785d0671c2d6b910a87686b164ab81c 100755 (executable)
@@ -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
index 747b583e98124568dc216a0d79a1077257052f81..3b01890996eb2bdcdfd2cfffd52ed6d5500b2c1f 100644 (file)
@@ -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
index a29fa6b507027c889b23c47cae467cdf7a2038e4..6a54d0acc8e51879015b1d59933200312e4f5841 100644 (file)
@@ -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