From 1a01c5edc1c6333e1123697ae27dd7c0729dc6a7 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Sun, 16 Feb 2020 00:16:26 -0800 Subject: [PATCH] ICU-20978 Reduce unnecessary building for tools when cross-building --- icu4c/source/Makefile.in | 2 +- icu4c/source/configure | 12 ++++++++++++ icu4c/source/configure.ac | 2 ++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/icu4c/source/Makefile.in b/icu4c/source/Makefile.in index be9435ba95f..79a0a3423ab 100644 --- a/icu4c/source/Makefile.in +++ b/icu4c/source/Makefile.in @@ -38,7 +38,7 @@ subdir = . @TOOLS_TRUE@@TESTS_TRUE@TEST = test @SAMPLES_TRUE@SAMPLE = samples @TOOLS_TRUE@TOOLS = tools -@TOOLS_TRUE@DATASUBDIR = data +@DATA_TRUE@DATASUBDIR = data ## pkgconfig setup. Always have uc and i18n. Others are optional. ALL_PKGCONFIG_SUFFIX=uc i18n diff --git a/icu4c/source/configure b/icu4c/source/configure index d92d6eee647..3f82ce66259 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -645,6 +645,8 @@ ICULIBSUFFIX DATA_PACKAGING_MODE thepkgicudatadir pkgicudatadir +U_HAVE_DATA +DATA_TRUE U_HAVE_FUZZER FUZZER_TRUE U_HAVE_TOOLS @@ -7769,6 +7771,16 @@ else fi + +if test "$tools" = true || test "$cross_compiling" = "yes"; then + DATA_TRUE= + U_HAVE_DATA=1 +else + DATA_TRUE='#' + U_HAVE_DATA=0 +fi + + # Check whether --with-data-packaging was given. if test "${with_data_packaging+set}" = set; then : withval=$with_data_packaging; case "${withval}" in diff --git a/icu4c/source/configure.ac b/icu4c/source/configure.ac index 759c4957803..531dee17d1b 100644 --- a/icu4c/source/configure.ac +++ b/icu4c/source/configure.ac @@ -1143,6 +1143,8 @@ AC_ARG_ENABLE(fuzzer, fuzzer=false) ICU_CONDITIONAL(FUZZER, test "$fuzzer" = true) +ICU_CONDITIONAL(DATA, test "$tools" = true || test "$cross_compiling" = "yes") + AC_ARG_WITH(data-packaging, [ --with-data-packaging specify how to package ICU data. Possible values: files raw files (.res, etc) -- 2.40.0