This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] timezone: add a configure flag to disable program install
- From: Mike Frysinger <vapier at gentoo dot org>
- To: libc-alpha at sourceware dot org
- Date: Fri, 18 Sep 2015 14:04:13 -0400
- Subject: [PATCH] timezone: add a configure flag to disable program install
- Authentication-results: sourceware.org; auth=none
Some distros build+install the timezone tools (zic/zdump/tzselect) outside
of glibc and use the upstream package directly. Add a configure flag to
glibc so they can disable install of those tools.
This allows tests to run & pass regardless of the configure flag. Only
the install of them is impacted.
2015-09-18 Mike Frysinger <vapier@gentoo.org>
* config.make.in (with-timezone-tools): New variable.
* configure.ac (AC_ARG_WITH(timezone-tools)): New configure flag.
(with_timezone_tools): Export to generated files.
* configure: Regenerate.
* timezone/Makefile (install-sbin, install-bin-script): Wrap in a
ifeq ($(with-timezone-tools),yes) check.
---
config.make.in | 1 +
configure | 14 ++++++++++++++
configure.ac | 6 ++++++
timezone/Makefile | 8 +++++---
4 files changed, 26 insertions(+), 3 deletions(-)
diff --git a/config.make.in b/config.make.in
index a9f5696..fe773d6 100644
--- a/config.make.in
+++ b/config.make.in
@@ -52,6 +52,7 @@ have-z-execstack = @libc_cv_z_execstack@
have-Bgroup = @libc_cv_Bgroup@
have-protected-data = @libc_cv_protected_data@
with-fp = @with_fp@
+with-timezone-tools = @with_timezone_tools@
old-glibc-headers = @old_glibc_headers@
unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
have-forced-unwind = @libc_cv_forced_unwind@
diff --git a/configure b/configure
index 45cc7cb..8fae00f 100755
--- a/configure
+++ b/configure
@@ -678,6 +678,7 @@ enable_lock_elision
hardcoded_path_in_tests
use_default_link
sysheaders
+with_timezone_tools
with_fp
ac_ct_CXX
CXXFLAGS
@@ -754,6 +755,7 @@ with_gd_lib
with_fp
with_binutils
with_selinux
+with_timezone_tools
with_headers
with_default_link
enable_sanity_checks
@@ -1457,6 +1459,9 @@ Optional Packages:
--with-fp if using floating-point hardware [default=yes]
--with-binutils=PATH specify location of binutils (as and ld)
--with-selinux if building with SELinux support
+ --without-timezone-tools
+ do not install timezone tools (if using external
+ ones) [default=install]
--with-headers=PATH location of system headers to use (for example
/usr/src/linux/include) [default=compiler default]
--with-default-link do not use explicit linker scripts
@@ -3506,6 +3511,15 @@ else
fi
+# Check whether --with-timezone-tools was given.
+if test "${with_timezone_tools+set}" = set; then :
+ withval=$with_timezone_tools; with_timezone_tools=$withval
+else
+ with_timezone_tools=yes
+fi
+
+
+
# Check whether --with-headers was given.
if test "${with_headers+set}" = set; then :
diff --git a/configure.ac b/configure.ac
index 7e9383a..e397948 100644
--- a/configure.ac
+++ b/configure.ac
@@ -126,6 +126,12 @@ AC_ARG_WITH([selinux],
[if building with SELinux support]),
[with_selinux=$withval],
[with_selinux=auto])
+AC_ARG_WITH([timezone-tools],
+ AC_HELP_STRING([--without-timezone-tools],
+ [do not install timezone tools (if using external ones) @<:@default=install@:>@]),
+ [with_timezone_tools=$withval],
+ [with_timezone_tools=yes])
+AC_SUBST(with_timezone_tools)
AC_ARG_WITH([headers],
AC_HELP_STRING([--with-headers=PATH],
diff --git a/timezone/Makefile b/timezone/Makefile
index d1d9d4b..b91fb01 100644
--- a/timezone/Makefile
+++ b/timezone/Makefile
@@ -27,15 +27,17 @@ extra-objs := scheck.o ialloc.o
others := zdump zic
tests := test-tz tst-timezone tst-tzset
-install-sbin := zic zdump
-
generated-dirs += testdata
-install-bin-script = tzselect
generated += tzselect
testdata = $(objpfx)testdata
+ifeq ($(with-timezone-tools),yes)
+install-sbin := zic zdump
+install-bin-script = tzselect
+endif
+
ifeq ($(run-built-tests),yes)
# List zones generated by separate commands running zic on the host.
# Each such zic run counts as a separate test.
--
2.5.1