Skip to content

Commit

Permalink
ICU-20030 Make installation of icu-config optional
Browse files Browse the repository at this point in the history
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
  • Loading branch information
hughmcmaster committed Jul 24, 2018
1 parent 472791d commit 7512823
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
8 changes: 8 additions & 0 deletions icu4c/source/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 = *~

Expand All @@ -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)

Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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) \
Expand Down
18 changes: 18 additions & 0 deletions icu4c/source/configure
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,7 @@ CFLAGS
CC
ENABLE_RELEASE
ENABLE_DEBUG
INSTALL_ICU_CONFIG
CPPFLAGS
host_os
host_vendor
Expand Down Expand Up @@ -775,6 +776,7 @@ SHELL'
ac_subst_files=''
ac_user_opts='
enable_option_checking
enable_icu_config
enable_debug
enable_release
with_cross_build
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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; }
Expand Down
10 changes: 10 additions & 0 deletions icu4c/source/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 7512823

Please sign in to comment.