]> granicus.if.org Git - icu/commitdiff
ICU-10464 Make installation of icu-config optional (#13)
authorHugh McMaster <hugh.mcmaster@outlook.com>
Tue, 24 Jul 2018 22:53:46 +0000 (08:53 +1000)
committerSteven R. Loomis <srl295@gmail.com>
Thu, 27 Sep 2018 21:27:37 +0000 (14:27 -0700)
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Originally ICU-20030

icu4c/source/Makefile.in
icu4c/source/configure
icu4c/source/configure.ac

index c1db15bf7b177d4532b813467982d9ee7af7b038..24593ba3c8560afc887477ebecb371907b78c769 100644 (file)
@@ -48,6 +48,8 @@ ALL_PKGCONFIG_SUFFIX=uc i18n
 DOXYGEN = @DOXYGEN@
 DOCZIP = icu-docs.zip
 
+INSTALL_ICU_CONFIG = @INSTALL_ICU_CONFIG@
+
 ## Files to remove for 'make clean'
 CLEANFILES = *~
 
@@ -64,7 +66,9 @@ SUBDIRS =  stubdata common i18n $(LAYOUTEX) $(ICUIO) $(TOOLS) $(DATASUBDIR) $(EX
 
 SECTION = 1
 
+ifeq ($(INSTALL_ICU_CONFIG),true)
 MANX_FILES = config/icu-config.$(SECTION)
+endif
 
 ALL_MAN_FILES = $(MANX_FILES)
 
@@ -187,7 +191,9 @@ install-icu: $(INSTALLED_BUILT_FILES)
        @$(MKINSTALLDIRS) $(DESTDIR)$(libdir)/pkgconfig
        $(INSTALL_DATA) $(ALL_PKGCONFIG_FILES) $(DESTDIR)$(libdir)/pkgconfig/
        $(INSTALL_DATA) $(top_srcdir)/../LICENSE $(DESTDIR)$(pkgdatadir)/LICENSE
+ifeq ($(INSTALL_ICU_CONFIG),true)
        $(INSTALL_SCRIPT) $(top_builddir)/config/icu-config $(DESTDIR)$(bindir)/icu-config
+endif
        $(INSTALL_DATA) $(top_builddir)/config/Makefile.inc $(DESTDIR)$(pkglibdir)/Makefile.inc
        $(INSTALL_DATA) $(top_builddir)/config/pkgdata.inc $(DESTDIR)$(pkglibdir)/pkgdata.inc
 #      @echo icuinfo.xml is built after make check.
@@ -350,7 +356,9 @@ config.status: $(srcdir)/configure $(srcdir)/common/unicode/uvernum.h
 
 install-manx: $(MANX_FILES)
        $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man$(SECTION)
+ifneq ($(MANX_FILES),)
        $(INSTALL_DATA) $? $(DESTDIR)$(mandir)/man$(SECTION)
+endif
 
 config/%.$(SECTION): $(srcdir)/config/%.$(SECTION).in
        cd $(top_builddir) \
index 47301a1f7c7619417dc864370404d7fd272d6334..a54a2291a3d6061de3e5b95879cf0589262e89ce 100755 (executable)
@@ -716,6 +716,7 @@ CFLAGS
 CC
 ENABLE_RELEASE
 ENABLE_DEBUG
+INSTALL_ICU_CONFIG
 CPPFLAGS
 host_os
 host_vendor
@@ -775,6 +776,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_icu_config
 enable_debug
 enable_release
 with_cross_build
@@ -1443,6 +1445,7 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-icu-config     install icu-config
   --enable-debug          build debug libraries and enable the U_DEBUG define default=no
   --enable-release        build release libraries default=yes
   --enable-strict         compile with strict compiler options default=yes
@@ -2797,6 +2800,21 @@ UCONFIG_CPPFLAGS=""
 # such as -std
 UCONFIG_CFLAGS=""
 
+# Check whether to install icu-config
+# Check whether --enable-icu-config was given.
+if test "${enable_icu_config+set}" = set; then :
+  enableval=$enable_icu_config; case "${enableval}" in
+            yes) enable_icu_config=true ;;
+            no) enable_icu_config=false ;;
+            *) as_fn_error $? "bad value '${enableval}' for --enable-icu-config" "$LINENO" 5 ;;
+        esac
+else
+  enable_icu_config=true
+fi
+
+INSTALL_ICU_CONFIG=$enable_icu_config
+
+
 # Check whether to build debug libraries
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build debug libraries" >&5
 $as_echo_n "checking whether to build debug libraries... " >&6; }
index 7078d491fabb1acda2e57d981f1c7aa8c270f1b6..1f42887356edde921541c08bca62056bc20cc6be 100644 (file)
@@ -100,6 +100,16 @@ UCONFIG_CPPFLAGS=""
 # such as -std
 UCONFIG_CFLAGS=""
 
+# Check whether to install icu-config
+AC_ARG_ENABLE([icu-config],
+    AS_HELP_STRING([--enable-icu-config], [install icu-config]),
+        [case "${enableval}" in
+            yes) enable_icu_config=true ;;
+            no) enable_icu_config=false ;;
+            *) AC_MSG_ERROR([bad value '${enableval}' for --enable-icu-config]) ;;
+        esac], [enable_icu_config=true])
+AC_SUBST(INSTALL_ICU_CONFIG, [$enable_icu_config])
+
 # Check whether to build debug libraries
 AC_MSG_CHECKING([whether to build debug libraries])
 enabled=no