]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
timezone: add a configure flag to disable program install
authorMike Frysinger <vapier@gentoo.org>
Fri, 18 Sep 2015 18:00:05 +0000 (14:00 -0400)
committerMike Frysinger <vapier@gentoo.org>
Fri, 18 Sep 2015 23:39:46 +0000 (19:39 -0400)
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.

ChangeLog
INSTALL
config.make.in
configure
configure.ac
manual/install.texi
timezone/Makefile

index 789a714df2ede6ad94d0c49e81226bbc29351fb8..cf5b7218de02e292cafc041ca83466f4ed8b3e55 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2015-09-18  Mike Frysinger  <vapier@gentoo.org>
+
+       * config.make.in (enable-timezone-tools): New variable.
+       * configure.ac (AC_ARG_ENABLE(timezone-tools)): New configure flag.
+       (enable_timezone_tools): Export to generated files.
+       * configure: Regenerate.
+       * INSTALL: Regenerate.
+       * manual/install.texi (--disable-timezone-tools): Document new flag.
+       * timezone/Makefile (install-sbin, install-bin-script): Wrap in a
+       ifeq ($(enable-timezone-tools),yes) check.
+
 2015-09-18  Joseph Myers  <joseph@codesourcery.com>
 
        * timezone/Makefile: Revert previous change.
diff --git a/INSTALL b/INSTALL
index d55de5dd47b28c951838ac39296c2717d0478d69..ca847e2f9de249202b7d8feb71b239c9fc3cc1c8 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -127,6 +127,17 @@ will be used, and CFLAGS sets optimization options for the compiler.
      library.  This option hardcodes the newly built C library path in
      dynamic tests so that they can be invoked directly.
 
+'--disable-timezone-tools'
+     By default, timezone related utilities ('zic', 'zdump', and
+     'tzselect') are installed with glibc.  If you are building these
+     independently (e.g.  by using the 'tzcode' package), then this
+     option will allow disabling the install of these too.
+
+     Note that you need to make sure the external tools are kept in sync
+     with the versions that the GNU C Library expects as the data
+     formats may change over time.  Consult the 'timezone' subdirectory
+     for more details.
+
 '--enable-lock-elision=yes'
      Enable lock elision for pthread mutexes by default.
 
index a9f5696077a6e64fba116c0e83a85e2afab41c5d..bea371d1f0acb611110b4fa182a3029f3596fa0d 100644 (file)
@@ -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@
+enable-timezone-tools = @enable_timezone_tools@
 old-glibc-headers = @old_glibc_headers@
 unwind-find-fde = @libc_cv_gcc_unwind_find_fde@
 have-forced-unwind = @libc_cv_forced_unwind@
index 45cc7cba2bff3d6ab9ac9b05d492fae1b23e56ae..fe402ea05bb7d8083c03aa829b88e37d5f7694ab 100755 (executable)
--- a/configure
+++ b/configure
@@ -676,6 +676,7 @@ force_install
 bindnow
 enable_lock_elision
 hardcoded_path_in_tests
+enable_timezone_tools
 use_default_link
 sysheaders
 with_fp
@@ -759,6 +760,7 @@ with_default_link
 enable_sanity_checks
 enable_shared
 enable_profile
+enable_timezone_tools
 enable_hardcoded_path_in_tests
 enable_stackguard_randomization
 enable_lock_elision
@@ -1411,6 +1413,9 @@ Optional Features:
                           in special situations) [default=yes]
   --enable-shared         build shared library [default=yes if GNU ld]
   --enable-profile        build profiled library [default=no]
+  --disable-timezone-tools
+                          do not install timezone tools (if using external
+                          ones) [default=install]
   --enable-hardcoded-path-in-tests
                           hardcode newly built glibc path in tests
                           [default=no]
@@ -3548,6 +3553,14 @@ else
   profile=no
 fi
 
+# Check whether --enable-timezone-tools was given.
+if test "${enable_timezone_tools+set}" = set; then :
+  enableval=$enable_timezone_tools; enable_timezone_tools=$enableval
+else
+  enable_timezone_tools=yes
+fi
+
+
 
 # Check whether --enable-hardcoded-path-in-tests was given.
 if test "${enable_hardcoded_path_in_tests+set}" = set; then :
index 7e9383a7f0b036ff7f558b1d436906245aa1941d..95d700e835fbf29af1d3cba574c2d23c98bd8a56 100644 (file)
@@ -159,6 +159,12 @@ AC_ARG_ENABLE([profile],
                             [build profiled library @<:@default=no@:>@]),
              [profile=$enableval],
              [profile=no])
+AC_ARG_ENABLE([timezone-tools],
+             AC_HELP_STRING([--disable-timezone-tools],
+                            [do not install timezone tools (if using external ones) @<:@default=install@:>@]),
+             [enable_timezone_tools=$enableval],
+             [enable_timezone_tools=yes])
+AC_SUBST(enable_timezone_tools)
 
 AC_ARG_ENABLE([hardcoded-path-in-tests],
              AC_HELP_STRING([--enable-hardcoded-path-in-tests],
index 63c41b0b8daac1612659ef9bf7604560d7ef0259..c502446a7cb5e67c05516a05c898b863db48a9bf 100644 (file)
@@ -157,6 +157,16 @@ By default, dynamic tests are linked to run with the installed C library.
 This option hardcodes the newly built C library path in dynamic tests
 so that they can be invoked directly.
 
+@item --disable-timezone-tools
+By default, timezone related utilities (@command{zic}, @command{zdump},
+and @command{tzselect}) are installed with glibc.  If you are building
+these independently (e.g. by using the @samp{tzcode} package), then this
+option will allow disabling the install of these too.
+
+Note that you need to make sure the external tools are kept in sync with
+the versions that @theglibc{} expects as the data formats may change over
+time.  Consult the @file{timezone} subdirectory for more details.
+
 @item --enable-lock-elision=yes
 Enable lock elision for pthread mutexes by default.
 
index bfb346337364e1e50f3322022fca4d3f20d1aca7..a0b8adb5a65231806b054e0cd2e41a2659f37a8d 100644 (file)
@@ -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 ($(enable-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.