diff --git a/icu4c/source/Makefile.in b/icu4c/source/Makefile.in index 617657e05b6..c8ec7ffc3bd 100644 --- a/icu4c/source/Makefile.in +++ b/icu4c/source/Makefile.in @@ -34,6 +34,7 @@ subdir = . @EXTRAS_TRUE@EXTRA = extra @TESTS_TRUE@TEST = test @SAMPLES_TRUE@SAMPLE = samples +@TOOLS_TRUE@TOOLS = tools ## pkgconfig setup. Always have uc and i18n. Others are optional. ALL_PKGCONFIG_SUFFIX=uc i18n @@ -55,7 +56,7 @@ INSTALLED_BUILT_FILES = $(top_builddir)/config/Makefile.inc $(top_builddir)/conf LOCAL_BUILT_FILES = icudefs.mk config/icucross.mk config/icucross.inc DOCDIRS = common i18n -SUBDIRS = stubdata common i18n $(LAYOUT) tools data $(ICUIO) $(EXTRA) $(SAMPLE) $(TEST) +SUBDIRS = stubdata common i18n $(LAYOUT) $(TOOLS) data $(ICUIO) $(EXTRA) $(SAMPLE) $(TEST) SECTION = 1 @@ -127,7 +128,7 @@ $(DOCZIP): doc endif LOCAL_SUBDIRS = $(SUBDIRS) -CLEAN_FIRST_SUBDIRS = tools +CLEAN_FIRST_SUBDIRS = $(TOOLS) $(LIBDIR) $(BINDIR): -$(MKINSTALLDIRS) $@ diff --git a/icu4c/source/configure b/icu4c/source/configure index 323a2a0c52d..867be728808 100755 --- a/icu4c/source/configure +++ b/icu4c/source/configure @@ -618,6 +618,7 @@ ICULIBSUFFIX DATA_PACKAGING_MODE thepkgicudatadir pkgicudatadir +TOOLS_TRUE LAYOUT_TRUE ICUIO_TRUE EXTRAS_TRUE @@ -752,6 +753,7 @@ enable_weak_threads enable_extras enable_icuio enable_layout +enable_tools with_data_packaging with_library_suffix enable_tests @@ -1398,6 +1400,7 @@ Optional Features: --enable-extras build ICU extras default=yes --enable-icuio build ICU's icuio library default=yes --enable-layout build ICU's layout library default=yes + --enable-tools build ICU's tools default=yes --enable-tests build ICU tests default=yes --enable-samples build ICU samples default=yes @@ -7199,6 +7202,25 @@ else LAYOUT_TRUE='#' fi +# Enable/disable tools +# Check whether --enable-tools was given. +if test "${enable_tools+set}" = set; then : + enableval=$enable_tools; case "${enableval}" in + yes) tools=true ;; + no) tools=false ;; + *) as_fn_error $? "bad value ${enableval} for --enable-tools" "$LINENO" 5 ;; + esac +else + tools=true +fi + + +if test "$tools" = true; then + TOOLS_TRUE= +else + TOOLS_TRUE='#' +fi + # Check whether --with-data-packaging was given. if test "${with_data_packaging+set}" = set; then : @@ -8719,4 +8741,10 @@ if test -n "$UCONFIG_CPPFLAGS"; then echo '--------------- end ' "${HDRFILE}" fi +if test "$tools" = false; +then + echo "## Note: you have disabled ICU's tools. This ICU cannot build its own data or tests." + echo "## Expect build failures in the 'data', 'test', and other directories." +fi + $as_unset _CXX_CXXSUFFIX diff --git a/icu4c/source/configure.in b/icu4c/source/configure.in index 82c2eb7c199..457451396bd 100644 --- a/icu4c/source/configure.in +++ b/icu4c/source/configure.in @@ -1058,6 +1058,17 @@ AC_ARG_ENABLE(layout, layout=true) ICU_CONDITIONAL(LAYOUT, test "$layout" = true) +# Enable/disable tools +AC_ARG_ENABLE(tools, + [ --enable-tools build ICU's tools [default=yes]], + [case "${enableval}" in + yes) tools=true ;; + no) tools=false ;; + *) AC_MSG_ERROR(bad value ${enableval} for --enable-tools) ;; + esac], + tools=true) +ICU_CONDITIONAL(TOOLS, test "$tools" = true) + AC_ARG_WITH(data-packaging, [ --with-data-packaging=type specify how to package ICU data (files, archive, library, static, auto) [default=auto]], [case "${withval}" in @@ -1381,4 +1392,10 @@ if test -n "$UCONFIG_CPPFLAGS"; then echo '--------------- end ' "${HDRFILE}" fi +if test "$tools" = false; +then + echo "## Note: you have disabled ICU's tools. This ICU cannot build its own data or tests." + echo "## Expect build failures in the 'data', 'test', and other directories." +fi + $as_unset _CXX_CXXSUFFIX