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

Commitc63b9b1

Browse files
committed
When cross-compiling, allow and require an external zic program to be used
when --with-system-tzdata is not used.initial patch by Richard Evans
1 parent46866e9 commitc63b9b1

File tree

4 files changed

+72
-5
lines changed

4 files changed

+72
-5
lines changed

‎configure

Lines changed: 57 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -744,6 +744,7 @@ python_includespec
744744
python_libdir
745745
python_libspec
746746
python_additional_libs
747+
ZIC
747748
OSSP_UUID_LIBS
748749
HAVE_IPV6
749750
LIBOBJS
@@ -6955,6 +6956,60 @@ fi
69556956

69566957
fi
69576958

6959+
if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
6960+
# Extract the first word of "zic", so it can be a program name with args.
6961+
set dummy zic; ac_word=$2
6962+
{ echo "$as_me:$LINENO: checking for $ac_word" >&5
6963+
echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
6964+
if test "${ac_cv_path_ZIC+set}" = set; then
6965+
echo $ECHO_N "(cached) $ECHO_C" >&6
6966+
else
6967+
case $ZIC in
6968+
[\\/]* | ?:[\\/]*)
6969+
ac_cv_path_ZIC="$ZIC" # Let the user override the test with a path.
6970+
;;
6971+
*)
6972+
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6973+
for as_dir in $PATH
6974+
do
6975+
IFS=$as_save_IFS
6976+
test -z "$as_dir" && as_dir=.
6977+
for ac_exec_ext in '' $ac_executable_extensions; do
6978+
if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
6979+
ac_cv_path_ZIC="$as_dir/$ac_word$ac_exec_ext"
6980+
echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
6981+
break 2
6982+
fi
6983+
done
6984+
done
6985+
IFS=$as_save_IFS
6986+
6987+
;;
6988+
esac
6989+
fi
6990+
ZIC=$ac_cv_path_ZIC
6991+
if test -n "$ZIC"; then
6992+
{ echo "$as_me:$LINENO: result: $ZIC" >&5
6993+
echo "${ECHO_T}$ZIC" >&6; }
6994+
else
6995+
{ echo "$as_me:$LINENO: result: no" >&5
6996+
echo "${ECHO_T}no" >&6; }
6997+
fi
6998+
6999+
7000+
if test -z "$ZIC"; then
7001+
{ { echo "$as_me:$LINENO: error:
7002+
When cross-compiling, either use the option --with-system-tzdata to use
7003+
existing time-zone data, or set the environment variable ZIC to a zic
7004+
program to use during the build." >&5
7005+
echo "$as_me: error:
7006+
When cross-compiling, either use the option --with-system-tzdata to use
7007+
existing time-zone data, or set the environment variable ZIC to a zic
7008+
program to use during the build." >&2;}
7009+
{ (exit 1); exit 1; }; }
7010+
fi
7011+
fi
7012+
69587013
# Supply a numeric version string for use by 3rd party add-ons
69597014
# awk -F is a regex on some platforms, and not on others, so make "." a tab
69607015
PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |
@@ -27320,6 +27375,7 @@ python_includespec!$python_includespec$ac_delim
2732027375
python_libdir!$python_libdir$ac_delim
2732127376
python_libspec!$python_libspec$ac_delim
2732227377
python_additional_libs!$python_additional_libs$ac_delim
27378+
ZIC!$ZIC$ac_delim
2732327379
OSSP_UUID_LIBS!$OSSP_UUID_LIBS$ac_delim
2732427380
HAVE_IPV6!$HAVE_IPV6$ac_delim
2732527381
LIBOBJS!$LIBOBJS$ac_delim
@@ -27352,7 +27408,7 @@ vpath_build!$vpath_build$ac_delim
2735227408
LTLIBOBJS!$LTLIBOBJS$ac_delim
2735327409
_ACEOF
2735427410

27355-
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` =59; then
27411+
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` =60; then
2735627412
break
2735727413
elif $ac_last_try; then
2735827414
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

‎configure.in

Lines changed: 11 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.578 2009/01/01 17:23:31 momjian Exp $
2+
dnl $PostgreSQL: pgsql/configure.in,v 1.579 2009/01/05 10:25:59 petere Exp $
33
dnl
44
dnl Developers, please strive to achieve this order:
55
dnl
@@ -845,6 +845,16 @@ if test "$with_python" = yes; then
845845
PGAC_CHECK_PYTHON_EMBED_SETUP
846846
fi
847847

848+
if test "$cross_compiling" = yes && test -z "$with_system_tzdata"; then
849+
AC_PATH_PROG(ZIC, zic)
850+
if test -z "$ZIC"; then
851+
AC_MSG_ERROR([
852+
When cross-compiling, either use the option --with-system-tzdata to use
853+
existing time-zone data, or set the environment variable ZIC to a zic
854+
program to use during the build.])
855+
fi
856+
fi
857+
848858
# Supply a numeric version string for use by 3rd party add-ons
849859
# awk -F is a regex on some platforms, and not on others, so make "." a tab
850860
[PG_VERSION_NUM="`echo "$PACKAGE_VERSION" | sed 's/[A-Za-z].*$//' |

‎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.250 2009/01/0509:54:12 petere Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.251 2009/01/0510:25:59 petere Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -224,6 +224,7 @@ FLEX = @FLEX@
224224
FLEXFLAGS = @FLEXFLAGS@$(LFLAGS)
225225
DTRACE = @DTRACE@
226226
DTRACEFLAGS = @DTRACEFLAGS@
227+
ZIC = @ZIC@
227228

228229
# Linking
229230

‎src/timezone/Makefile

Lines changed: 2 additions & 2 deletions
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.29 2008/02/19 15:29:58 petere Exp $
7+
# $PostgreSQL: pgsql/src/timezone/Makefile,v 1.30 2009/01/05 10:25:59 petere Exp $
88
#
99
#-------------------------------------------------------------------------
1010

@@ -43,7 +43,7 @@ zic: $(ZICOBJS)
4343

4444
install: all installdirs
4545
ifeq (,$(with_system_tzdata))
46-
./zic -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)
46+
$(if $(ZIC),$(ZIC),./zic) -d '$(DESTDIR)$(datadir)/timezone' -p '$(POSIXRULES)' $(TZDATAFILES)
4747
endif
4848
$(MAKE) -C tznames $@
4949

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp