Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4e94d1f

Browse files
committed
Add configure option --with-system-tzdata to use operating system time zone
database.
1 parente1a1da9 commit4e94d1f

File tree

5 files changed

+90
-5
lines changed

5 files changed

+90
-5
lines changed

‎configure

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ ac_includes_default="\
314314
# include <unistd.h>
315315
#endif"
316316

317-
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_gssapi with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl with_ossp_uuid XML2_CONFIG with_libxml with_libxslt with_zlib EGREP ELF_SYS LDFLAGS_SL LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB TAR LN_S AWK YACC YFLAGS FLEX FLEXFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
317+
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS configure_args build build_cpu build_vendor build_os host host_cpu host_vendor host_os PORTNAME docdir enable_nls WANTED_LANGUAGES default_port enable_shared enable_rpath enable_debug enable_profiling DTRACE DTRACEFLAGS enable_dtrace CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP GCC TAS autodepend INCLUDES enable_thread_safety with_tcl with_perl with_python with_gssapi with_krb5 krb_srvtab with_pam with_ldap with_bonjour with_openssl with_ossp_uuid XML2_CONFIG with_libxml with_libxslt with_system_tzdata with_zlib EGREP ELF_SYS LDFLAGS_SL LD with_gnu_ld ld_R_works RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP STRIP_STATIC_LIB STRIP_SHARED_LIB TAR LN_S AWK YACC YFLAGS FLEX FLEXFLAGS PERL perl_archlibexp perl_privlibexp perl_useshrplib perl_embed_ldflags PYTHON python_version python_configdir python_includespec python_libdir python_libspec python_additional_libs HAVE_IPV6 LIBOBJS acx_pthread_config PTHREAD_CC PTHREAD_LIBS PTHREAD_CFLAGS LDAP_LIBS_FE LDAP_LIBS_BE HAVE_POSIX_SIGNALS MSGFMT MSGMERGE XGETTEXT localedir TCLSH TCL_CONFIG_SH TCL_INCLUDE_SPEC TCL_LIB_FILE TCL_LIBS TCL_LIB_SPEC TCL_SHARED_BUILD TCL_SHLIB_LD_LIBS NSGMLS JADE have_docbook DOCBOOKSTYLE COLLATEINDEX SGMLSPL vpath_build LTLIBOBJS'
318318
ac_subst_files=''
319319

320320
# Initialize some variables set by options.
@@ -899,6 +899,7 @@ Optional Packages:
899899
--with-ossp-uuid build with OSSP UUID library for UUID generation
900900
--with-libxml build with XML support
901901
--with-libxslt build with XSLT support
902+
--with-system-tzdata=DIR use system time zone data in DIR
902903
--without-zlib do not use Zlib
903904
--with-gnu-ld assume the C compiler uses GNU ld [default=no]
904905

@@ -4500,6 +4501,37 @@ fi;
45004501

45014502

45024503

4504+
#
4505+
# tzdata
4506+
#
4507+
4508+
pgac_args="$pgac_args with_system_tzdata"
4509+
4510+
4511+
# Check whether --with-system-tzdata or --without-system-tzdata was given.
4512+
if test "${with_system_tzdata+set}" = set; then
4513+
withval="$with_system_tzdata"
4514+
4515+
case $withval in
4516+
yes)
4517+
{ { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
4518+
echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
4519+
{ (exit 1); exit 1; }; }
4520+
;;
4521+
no)
4522+
{ { echo "$as_me:$LINENO: error: argument required for --with-system-tzdata option" >&5
4523+
echo "$as_me: error: argument required for --with-system-tzdata option" >&2;}
4524+
{ (exit 1); exit 1; }; }
4525+
;;
4526+
*)
4527+
4528+
;;
4529+
esac
4530+
4531+
fi;
4532+
4533+
4534+
45034535
#
45044536
# Zlib
45054537
#
@@ -25237,6 +25269,7 @@ s,@with_ossp_uuid@,$with_ossp_uuid,;t t
2523725269
s,@XML2_CONFIG@,$XML2_CONFIG,;t t
2523825270
s,@with_libxml@,$with_libxml,;t t
2523925271
s,@with_libxslt@,$with_libxslt,;t t
25272+
s,@with_system_tzdata@,$with_system_tzdata,;t t
2524025273
s,@with_zlib@,$with_zlib,;t t
2524125274
s,@EGREP@,$EGREP,;t t
2524225275
s,@ELF_SYS@,$ELF_SYS,;t t

‎configure.in

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
dnl Process this file with autoconf to produce a configure script.
2-
dnl $PostgreSQL: pgsql/configure.in,v 1.523 2007/08/05 15:43:00 tgl Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.524 2007/08/20 08:53:12 petere Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -606,6 +606,13 @@ PGAC_ARG_BOOL(with, libxslt, no, [ --with-libxslt build with XSLT supp
606606

607607
AC_SUBST(with_libxslt)
608608

609+
#
610+
# tzdata
611+
#
612+
PGAC_ARG_REQ(with, system-tzdata,
613+
[ --with-system-tzdata=DIR use system time zone data in DIR])
614+
AC_SUBST(with_system_tzdata)
615+
609616
#
610617
# Zlib
611618
#

‎doc/src/sgml/installation.sgml

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.290 2007/07/18 12:00:47 mha Exp $ -->
1+
<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.291 2007/08/20 08:53:12 petere Exp $ -->
22

33
<chapter id="installation">
44
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -1021,6 +1021,44 @@ su - postgres
10211021
</listitem>
10221022
</varlistentry>
10231023

1024+
<varlistentry>
1025+
<term><option>--with-system-tzdata=<replaceable>DIRECTORY</replaceable></option></term>
1026+
<indexterm>
1027+
<primary>time zone data</primary>
1028+
</indexterm>
1029+
<listitem>
1030+
<para>
1031+
PostgreSQL includes its own time zone database, which it
1032+
requires for date and time operations. This time zone
1033+
database is in fact compatible with the time zone database
1034+
provided by many operating systems such as FreeBSD, Linux,
1035+
and Solaris, so it would be redundant to install it again.
1036+
When this option is used, the operating system supplied time
1037+
zone database in <replaceable>DIRECTORY</replaceable> is used
1038+
instead of the one included in the PostgreSQL source
1039+
distribution. <filename>/usr/share/zoneinfo/</filename> is a
1040+
likely directory on some operating systems. Note that the
1041+
installation routine does not detect mismatching or erroneous
1042+
time zone data. You are advised to run the regression tests
1043+
to verify that the time zone data you have pointed to works
1044+
correctly.
1045+
</para>
1046+
1047+
<para>
1048+
This option is mainly aimed at binary package distributors
1049+
who know their target operating system well. The main
1050+
advantage of using this option is that the PostgreSQL package
1051+
won't need to be upgraded whenever any of the many local
1052+
daylight-saving time rules changes. Another completely
1053+
incidental advantage is that PostgreSQL can be
1054+
cross-compiled<indexterm><primary>cross
1055+
compilation</primary></indexterm> straightforwardly if the
1056+
time-zone database does not need to be built during the
1057+
installation.
1058+
</para>
1059+
</listitem>
1060+
</varlistentry>
1061+
10241062
<varlistentry>
10251063
<term><option>--without-zlib</option></term>
10261064
<listitem>

‎src/Makefile.global.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.237 2007/06/26 22:05:04 tgl Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.238 2007/08/20 08:53:12 petere Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -158,6 +158,7 @@ with_openssl= @with_openssl@
158158
with_ossp_uuid= @with_ossp_uuid@
159159
with_libxml= @with_libxml@
160160
with_libxslt= @with_libxslt@
161+
with_system_tzdata = @with_system_tzdata@
161162
with_zlib= @with_zlib@
162163
enable_shared= @enable_shared@
163164
enable_rpath= @enable_rpath@

‎src/timezone/Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# Makefile for the timezone library
55

66
# IDENTIFICATION
7-
# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.26 2007/03/14 17:38:06 tgl Exp $
7+
# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.27 2007/08/20 08:53:12 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -32,11 +32,17 @@ all: SUBSYS.o submake-libpgport zic
3232
SUBSYS.o:$(OBJS)
3333
$(LD)$(LDREL)$(LDOUT) SUBSYS.o$(OBJS)
3434

35+
ifeq (,$(with_system_tzdata))
3536
zic:$(ZICOBJS)
3637
$(CC)$(CFLAGS)$(ZICOBJS)$(LDFLAGS)$(LIBS) -o$@$(X)
38+
endif
3739

3840
install: all installdirs
41+
ifeq (,$(with_system_tzdata))
3942
./zic -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)
43+
else
44+
ln -s '$(with_system_tzdata)' '$(DESTDIR)$(datadir)/timezone'
45+
endif
4046
$(MAKE) -C tznames $@
4147

4248
installdirs:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp