This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Add --disable-timezone configure option
- From: Allan McRae <allan at archlinux dot org>
- To: libc-alpha at sourceware dot org
- Date: Sun, 12 Feb 2012 19:37:14 +1000
- Subject: [PATCH] Add --disable-timezone configure option
A number of Linux distributions ship timezone data and utilities as a
separate package and patch glibc not to build and install these files.
This adds a --disable-timezone configuration option that removes the
need for such patching.
2012-02-12 Allan McRae <allan@archlinux.org>
* configure.in: Add --disable-timezone support.
* config.make.in: Likewise.
* Makeconfig: Likewise.
* configure: Regenerate.
diff --git a/Makeconfig b/Makeconfig
index 4fc1141..6274e9b 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -291,6 +291,13 @@ vardbdir = /var/db
endif
inst_vardbdir = $(install_root)$(vardbdir)
+# Whether to install timezone infomation
+ifeq (yes,$(build-timezone))
+timezone = timezone
+else
+timezone =
+endif
+
# What timezone should be the installed default (e.g., US/Eastern).
# Run `make -C time echo-zonenames' to see a list of available zone names.
# The local timezone can be changed with `zic -l TIMEZONE' at any time.
@@ -903,7 +910,7 @@ all-subdirs = csu assert ctype locale intl catgets
math setjmp signal \
stdlib stdio-common libio malloc string wcsmbs time dirent \
grp pwd posix io termios resource misc socket sysvipc gmon \
gnulib iconv iconvdata wctype manual shadow gshadow po argp \
- crypt nss localedata timezone rt conform debug \
+ crypt nss localedata $(timezone) rt conform debug \
$(add-on-subdirs) $(dlfcn) $(binfmt-subdir)
ifndef avoid-generated
diff --git a/config.make.in b/config.make.in
index 46a14b4..63748ea 100644
--- a/config.make.in
+++ b/config.make.in
@@ -92,6 +92,7 @@ build-pic-default= @libc_cv_pic_default@
build-profile = @profile@
build-bounded = no
build-static-nss = @static_nss@
+build-timezone = @timezone@
add-ons = @add_ons@
add-on-subdirs = @add_on_subdirs@
sysdeps-add-ons = @sysdeps_add_ons@
diff --git a/configure b/configure
index ea02e72..a179992 100755
--- a/configure
+++ b/configure
@@ -692,6 +692,7 @@ all_warnings
force_install
bindnow
oldest_abi
+timezone
enable_check_abi
use_default_link
with_fp
@@ -770,6 +771,7 @@ enable_check_abi
enable_shared
enable_profile
enable_versioning
+enable_timezone
enable_oldest_abi
enable_stackguard_randomization
enable_add_ons
@@ -1419,6 +1421,7 @@ Optional Features:
--enable-profile build profiled library [default=no]
--disable-versioning do not include versioning information in the
library
objects [default=yes if supported]
+ --disable-timezone do not build time zone data [default=yes]
--enable-oldest-abi=ABI configure the oldest ABI supported [e.g. 2.2]
[default=glibc default]
--enable-stackguard-randomization
@@ -3584,6 +3587,14 @@ else
fi
+# Check whether --enable-timezone was given.
+if test "${enable_timezone+set}" = set; then :
+ enableval=$enable_timezone; timezone=$enableval
+else
+ timezone=yes
+fi
+
+
# Check whether --enable-oldest-abi was given.
if test "${enable_oldest_abi+set}" = set; then :
enableval=$enable_oldest_abi; oldest_abi=$enableval
diff --git a/configure.in b/configure.in
index af42c8a..df852d9 100644
--- a/configure.in
+++ b/configure.in
@@ -127,6 +127,12 @@ AC_ARG_ENABLE([versioning],
[do not include versioning information in the library objects
@<:@default=yes if supported@:>@]),
[enable_versioning=$enableval],
[enable_versioning=yes])
+AC_SUBST(timezone)
+AC_ARG_ENABLE([timezone],
+ AC_HELP_STRING([--disable-timezone],
+ [do not build time zone data @<:@default=yes@:>@]),
+ [timezone=$enableval],
+ [timezone=yes])
AC_ARG_ENABLE([oldest-abi],
AC_HELP_STRING([--enable-oldest-abi=ABI],