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

Commit7c1ff35

Browse files
committed
Upgrade to Autoconf version 2.53. Replaced many custom macro
calls with new or now-built-in versions. Make sure that allcalls to AC_DEFINE have a third argument, for possible use ofautoheader in the future.
1 parenteb1ee9e commit7c1ff35

20 files changed

+14358
-6678
lines changed

‎GNUmakefile.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#
22
# PostgreSQL top level makefile
33
#
4-
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.23 2001/11/21 23:19:25 momjian Exp $
4+
# $Header: /cvsroot/pgsql/GNUmakefile.in,v 1.24 2002/03/29 17:32:48 petere Exp $
55
#
66

77
subdir =
@@ -31,6 +31,8 @@ clean:
3131
$(MAKE) -C doc $@
3232
$(MAKE) -C contrib $@
3333
$(MAKE) -C src $@
34+
# Garbage from autoconf:
35+
@rm -rf autom4te.cache/
3436

3537
# Important: distclean `src' last, otherwise Makefile.global
3638
# will be gone too soon.
@@ -39,14 +41,16 @@ distclean maintainer-clean:
3941
-$(MAKE) -C contrib $@
4042
-$(MAKE) -C src $@
4143
-rm -f config.cache config.log config.status GNUmakefile
44+
# Garbage from autoconf:
45+
@rm -rf autom4te.cache/
4246

4347
check: all
4448

4549
check installcheck:
4650
$(MAKE) -C src/test $@
4751

4852
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
49-
CONFIG_FILES=$@ CONFIG_HEADERS=./config.status
53+
./config.status $@
5054

5155

5256
##########################################################################

‎aclocal.m4

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
dnl $Header: /cvsroot/pgsql/aclocal.m4,v 1.13 2001/08/26 22:28:03 petere Exp $
2-
builtin([include],[config/ac_func_accept_argtypes.m4])
3-
builtin([include],[config/c-compiler.m4])
4-
builtin([include],[config/c-library.m4])
5-
builtin([include],[config/cxx.m4])
6-
builtin([include],[config/docbook.m4])
7-
builtin([include],[config/general.m4])
8-
builtin([include],[config/java.m4])
9-
builtin([include],[config/libtool.m4])
10-
builtin([include],[config/perl.m4])
11-
builtin([include],[config/programs.m4])
12-
builtin([include],[config/python.m4])
13-
builtin([include],[config/tcl.m4])
1+
dnl $Header: /cvsroot/pgsql/aclocal.m4,v 1.14 2002/03/29 17:32:48 petere Exp $
2+
m4_include([config/ac_func_accept_argtypes.m4])
3+
m4_include([config/c-compiler.m4])
4+
m4_include([config/c-library.m4])
5+
m4_include([config/cxx.m4])
6+
m4_include([config/docbook.m4])
7+
m4_include([config/general.m4])
8+
m4_include([config/java.m4])
9+
m4_include([config/libtool.m4])
10+
m4_include([config/perl.m4])
11+
m4_include([config/programs.m4])
12+
m4_include([config/python.m4])
13+
m4_include([config/tcl.m4])

‎config/ac_func_accept_argtypes.m4

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.3 2000/11/09 18:18:42 petere Exp $
1+
# $Header: /cvsroot/pgsql/config/ac_func_accept_argtypes.m4,v 1.4 2002/03/29 17:32:53 petere Exp $
22
# This comes from the official Autoconf macro archive at
33
# <http://research.cys.de/autoconf-archive/>
44
# (I removed the $ before the Id CVS keyword below.)
@@ -37,7 +37,7 @@ dnl
3737
# which is *not* 'socklen_t *'). If we detect that, then we assume
3838
# 'int' as the result, because that ought to work best.
3939

40-
AC_DEFUN(AC_FUNC_ACCEPT_ARGTYPES,
40+
AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
4141
[AC_MSG_CHECKING([types of arguments for accept()])
4242
AC_CACHE_VAL(ac_cv_func_accept_arg1,dnl
4343
[AC_CACHE_VAL(ac_cv_func_accept_arg2,dnl
@@ -67,7 +67,10 @@ extern int accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func
6767
])dnl AC_CACHE_VAL
6868
])dnl AC_CACHE_VAL
6969
AC_MSG_RESULT([$ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *])
70-
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG1,$ac_cv_func_accept_arg1)
71-
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG2,$ac_cv_func_accept_arg2)
72-
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG3,$ac_cv_func_accept_arg3)
70+
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG1,$ac_cv_func_accept_arg1,
71+
[Define to the type of arg 1 of 'accept'])
72+
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG2,$ac_cv_func_accept_arg2,
73+
[Define to the type of arg 2 of 'accept'])
74+
AC_DEFINE_UNQUOTED(ACCEPT_TYPE_ARG3,$ac_cv_func_accept_arg3,
75+
[Define to the type of arg 3 of 'accept'])
7376
])

‎config/c-compiler.m4

Lines changed: 22 additions & 78 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Macros to detect C compiler features
2-
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.4 2001/12/02 11:38:40 petere Exp $
2+
# $Header: /cvsroot/pgsql/config/c-compiler.m4,v 1.5 2002/03/29 17:32:53 petere Exp $
33

44

55
# PGAC_C_SIGNED
@@ -17,22 +17,6 @@ fi])# PGAC_C_SIGNED
1717

1818

1919

20-
# PGAC_C_VOLATILE
21-
# ---------------
22-
# Check if the C compiler understands `volatile'. Note that if it doesn't
23-
# then this will potentially break the program semantics.
24-
AC_DEFUN([PGAC_C_VOLATILE],
25-
[AC_CACHE_CHECK(forvolatile,pgac_cv_c_volatile,
26-
[AC_TRY_COMPILE([],
27-
[extern volatile int i;],
28-
[pgac_cv_c_volatile=yes],
29-
[pgac_cv_c_volatile=no])])
30-
if test x"$pgac_cv_c_volatile" = xno ; then
31-
AC_DEFINE(volatile,,[Define empty if the C compiler does not understand `volatile'])
32-
fi])# PGAC_C_VOLATILE
33-
34-
35-
3620
# PGAC_TYPE_64BIT_INT(TYPE)
3721
# -------------------------
3822
# Check if TYPE is a working 64 bit integer type. Set HAVE_TYPE_64 to
@@ -84,67 +68,27 @@ undefine([Ac_cachevar])dnl
8468

8569

8670

87-
# PGAC_CHECK_ALIGNOF(TYPE)
88-
# ------------------------
71+
# PGAC_CHECK_ALIGNOF(TYPE, [INCLUDES = DEFAULT-INCLUDES])
72+
# -----------------------------------------------------
8973
# Find the alignment requirement of the given type. Define the result
90-
# as ALIGNOF_TYPE. If cross-compiling, sizeof(type) is used as a
91-
# default assumption.
92-
#
93-
# This is modeled on the standard autoconf macro AC_CHECK_SIZEOF.
94-
# That macro never got any points for style.
74+
# as ALIGNOF_TYPE. This macro works even when cross compiling.
75+
# (Modelled after AC_CHECK_SIZEOF.)
76+
9577
AC_DEFUN([PGAC_CHECK_ALIGNOF],
96-
[changequote(<<,>>)dnl
97-
dnl The name to #define.
98-
define(<<AC_TYPE_NAME>>,translit(alignof_$1,[a-z *],[A-Z_P]))dnl
99-
dnl The cache variable name.
100-
define(<<AC_CV_NAME>>,translit(pgac_cv_alignof_$1,[ *],[_p]))dnl
101-
changequote([,])dnl
102-
AC_MSG_CHECKING(alignmentof$1)
103-
AC_CACHE_VAL(AC_CV_NAME,
104-
[AC_TRY_RUN([#include <stdio.h>
105-
struct { char filler;$1 field; } mystruct;
106-
main()
107-
{
108-
FILE *f=fopen("conftestval", "w");
109-
if (!f) exit(1);
110-
fprintf(f, "%d\n", ((char*) & mystruct.field) - ((char*) & mystruct));
111-
exit(0);
112-
}],AC_CV_NAME=`catconftestval`,
113-
AC_CV_NAME='sizeof($1)',
114-
AC_CV_NAME='sizeof($1)')])dnl
115-
AC_MSG_RESULT($AC_CV_NAME)
116-
AC_DEFINE_UNQUOTED(AC_TYPE_NAME,$AC_CV_NAME,[The alignment requirement of a `]$1['])
117-
undefine([AC_TYPE_NAME])dnl
118-
undefine([AC_CV_NAME])dnl
78+
[AS_LITERAL_IF([$1],[],
79+
[AC_FATAL([$0: requires literal arguments])])dnl
80+
AC_CHECK_TYPE([$1],[],[],[$2])
81+
AC_CACHE_CHECK([alignment of$1],[AS_TR_SH([pgac_cv_alignof_$1])],
82+
[if test "$AS_TR_SH([ac_cv_type_$1])" = yes; then
83+
_AC_COMPUTE_INT([((char*) & pgac_struct.field) - ((char*) & pgac_struct)],
84+
[AS_TR_SH([pgac_cv_alignof_$1])],
85+
[AC_INCLUDES_DEFAULT([$2])
86+
struct { char filler;$1 field; } pgac_struct;],
87+
[AC_MSG_ERROR([cannot compute alignment of$1, 77])])
88+
else
89+
AS_TR_SH([pgac_cv_alignof_$1])=0
90+
fi])dnl
91+
AC_DEFINE_UNQUOTED(AS_TR_CPP(alignof_$1),
92+
[$AS_TR_SH([pgac_cv_alignof_$1])],
93+
[The alignment requirement of a `$1'])
11994
])# PGAC_CHECK_ALIGNOF
120-
121-
122-
# PGAC_CHECK_TYPE(TYPE, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND], [INCLUDES])
123-
# ---------------------------------------------------------------------------
124-
125-
AC_DEFUN([PGAC_CHECK_TYPE],
126-
[changequote(<<,>>)dnl
127-
dnl The name to #define
128-
define(<<AC_TYPE_NAME>>,translit(have_$1,[a-z *],[A-Z_P]))dnl
129-
dnl The cache variable name.
130-
define(<<AC_CV_NAME>>,translit(pgac_cv_have_$1,[ *],[_p]))dnl
131-
changequote([,])dnl
132-
AC_CACHE_CHECK([for$1],AC_CV_NAME,
133-
[AC_TRY_COMPILE([$4],
134-
[if (($1 *) 0)
135-
return 0;
136-
if (sizeof ($1))
137-
return 0;],
138-
AC_CV_NAME[=yes],
139-
AC_CV_NAME[=no])])
140-
if test "$AC_CV_NAME" = yes; then
141-
AC_DEFINE(AC_TYPE_NAME,1,[Define to 1 if you have `]$1['])
142-
ifelse($2,,,[$2
143-
])[]dnl
144-
ifelse($3,,,[else
145-
$3
146-
])[]dnl
147-
fi
148-
undefine([AC_TYPE_NAME])dnl
149-
undefine([AC_CV_NAME])dnl
150-
])# PGAC_CHECK_TYPE

‎config/c-library.m4

Lines changed: 10 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Macros that test various C library quirks
2-
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.11 2002/02/23 04:17:45 petere Exp $
2+
# $Header: /cvsroot/pgsql/config/c-library.m4,v 1.12 2002/03/2917:32:53 petere Exp $
33

44

55
# PGAC_VAR_INT_TIMEZONE
@@ -37,11 +37,11 @@ fi])# PGAC_FUNC_GETTIMEOFDAY_1ARG
3737

3838

3939
# PGAC_FUNC_MEMCMP
40-
# -----------
40+
# ----------------
4141
# Check if memcmp() properly handles negative bytes and returns +/-.
4242
# SunOS does not.
4343
# AC_FUNC_MEMCMP
44-
AC_DEFUN(PGAC_FUNC_MEMCMP,
44+
AC_DEFUN([PGAC_FUNC_MEMCMP],
4545
[AC_CACHE_CHECK(for8-bitcleanmemcmp,pgac_cv_func_memcmp_clean,
4646
[AC_TRY_RUN([
4747
main()
@@ -66,16 +66,10 @@ AC_SUBST(MEMCMP)dnl
6666
# If it doesn't then one could define it as
6767
# union semun { int val; struct semid_ds *buf; unsigned short *array; }
6868
AC_DEFUN([PGAC_UNION_SEMUN],
69-
[AC_CACHE_CHECK(forunionsemun,pgac_cv_union_semun,
70-
[AC_TRY_COMPILE([#include <sys/types.h>
69+
[AC_CHECK_TYPE([union semun],[],[],
70+
[#include <sys/types.h>
7171
#include <sys/ipc.h>
72-
#include <sys/sem.h>],
73-
[union semun semun;],
74-
[pgac_cv_union_semun=yes],
75-
[pgac_cv_union_semun=no])])
76-
if test x"$pgac_cv_union_semun" = xyes ; then
77-
AC_DEFINE(HAVE_UNION_SEMUN,1,[Set to 1 if you have `union semun'])
78-
fi])# PGAC_UNION_SEMUN
72+
#include <sys/sem.h>])])# PGAC_UNION_SEMUN
7973

8074

8175
# PGAC_STRUCT_SOCKADDR_UN
@@ -84,17 +78,12 @@ fi])# PGAC_UNION_SEMUN
8478
# it is missing then one could define it as { short int sun_family;
8579
# char sun_path[108]; }. (Requires test for <sys/un.h>!)
8680
AC_DEFUN([PGAC_STRUCT_SOCKADDR_UN],
87-
[AC_CACHE_CHECK([forstruct sockaddr_un],pgac_cv_struct_sockaddr_un,
88-
[AC_TRY_COMPILE([#include <sys/types.h>
81+
[AC_CHECK_TYPES([struct sockaddr_un],[],[],
82+
[#include <sys/types.h>
8983
#ifdef HAVE_SYS_UN_H
9084
#include <sys/un.h>
91-
#endif],
92-
[struct sockaddr_un un;],
93-
[pgac_cv_struct_sockaddr_un=yes],
94-
[pgac_cv_struct_sockaddr_un=no])])
95-
if test x"$pgac_cv_struct_sockaddr_un" = xyes; then
96-
AC_DEFINE(HAVE_STRUCT_SOCKADDR_UN,1,[Set to 1 if you have `struct sockaddr_un'])
97-
fi])# PGAC_STRUCT_SOCKADDR_UN
85+
#endif
86+
])])# PGAC_STRUCT_SOCKADDR_UN
9887

9988

10089
# PGAC_FUNC_POSIX_SIGNALS
@@ -121,109 +110,3 @@ if test x"$pgac_cv_func_posix_signals" = xyes ; then
121110
fi
122111
HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
123112
AC_SUBST(HAVE_POSIX_SIGNALS)])# PGAC_FUNC_POSIX_SIGNALS
124-
125-
126-
# PGAC_STRUCT_CMSGCRED
127-
# --------------------
128-
# Check if `struct cmsgcred' exists. Define HAVE_STRUCT_CMSGCRED if so.
129-
AC_DEFUN([PGAC_STRUCT_CMSGCRED],
130-
[AC_CACHE_CHECK(forstructcmsgcred,pgac_cv_struct_cmsgcred,
131-
[AC_TRY_COMPILE([#include <sys/param.h>
132-
#include <sys/socket.h>
133-
#include <sys/ucred.h>],
134-
[struct cmsgcred sockcred;],
135-
[pgac_cv_struct_cmsgcred=yes],
136-
[pgac_cv_struct_cmsgcred=no])])
137-
if test x"$pgac_cv_struct_cmsgcred" = xyes ; then
138-
AC_DEFINE(HAVE_STRUCT_CMSGCRED,1,[Set to 1 if you have `struct cmsgcred'])
139-
fi])# PGAC_STRUCT_CMSGCRED
140-
141-
142-
# PGAC_STRUCT_FCRED
143-
# -----------------
144-
# Check if `struct fcred' exists. Define HAVE_STRUCT_FCRED if so.
145-
AC_DEFUN([PGAC_STRUCT_FCRED],
146-
[AC_CACHE_CHECK(forstructfcred,pgac_cv_struct_fcred,
147-
[AC_TRY_COMPILE([#include <sys/param.h>
148-
#include <sys/socket.h>
149-
#include <sys/ucred.h>],
150-
[struct fcred sockcred;],
151-
[pgac_cv_struct_fcred=yes],
152-
[pgac_cv_struct_fcred=no])])
153-
if test x"$pgac_cv_struct_fcred" = xyes ; then
154-
AC_DEFINE(HAVE_STRUCT_FCRED,1,[Set to 1 if you have `struct fcred'])
155-
fi])# PGAC_STRUCT_FCRED
156-
157-
158-
# PGAC_STRUCT_SOCKCRED
159-
# --------------------
160-
# Check if `struct sockcred' exists. Define HAVE_STRUCT_SOCKCRED if so.
161-
AC_DEFUN([PGAC_STRUCT_SOCKCRED],
162-
[AC_CACHE_CHECK(forstructsockcred,pgac_cv_struct_sockcred,
163-
[AC_TRY_COMPILE([#include <sys/param.h>
164-
#include <sys/socket.h>
165-
#include <sys/ucred.h>],
166-
[struct sockcred sockcred;],
167-
[pgac_cv_struct_sockcred=yes],
168-
[pgac_cv_struct_sockcred=no])])
169-
if test x"$pgac_cv_struct_sockcred" = xyes ; then
170-
AC_DEFINE(HAVE_STRUCT_SOCKCRED,1,[Set to 1 if you have `struct sockcred'])
171-
fi])# PGAC_STRUCT_SOCKCRED
172-
173-
174-
# PGAC_HEADER_STRING
175-
# ------------------
176-
# Tests whether <string.h> and <strings.h> can both be included
177-
# (without generating warnings). This is mostly useful if you need
178-
# str[n]casecmp(), since this is not in the "standard" <string.h>
179-
# on some systems.
180-
AC_DEFUN([PGAC_HEADER_STRING],
181-
[AC_CACHE_CHECK([whether string.h and strings.h may both be included],
182-
[pgac_cv_header_strings_both],
183-
[AC_TRY_CPP(
184-
[#include <string.h>
185-
#include <strings.h>
186-
],
187-
[AC_TRY_COMPILE(
188-
[#include <string.h>
189-
#include <strings.h>
190-
],
191-
[int n = strcasecmp("a", "b");],
192-
[pgac_cv_header_strings_both=yes],
193-
[pgac_cv_header_strings_both=no])],
194-
[pgac_cv_header_strings_both=no])])
195-
if test x"$pgac_cv_header_strings_both" = x"yes"; then
196-
AC_DEFINE([STRING_H_WITH_STRINGS_H],1,
197-
[Define if string.h and strings.h may both be included])
198-
fi])
199-
200-
201-
# PGAC_CHECK_MEMBER(AGGREGATE.MEMBER,
202-
# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
203-
# [INCLUDES])
204-
# -----------------------------------------------------------
205-
206-
AC_DEFUN([PGAC_CHECK_MEMBER],
207-
[changequote(<<,>>)dnl
208-
dnl The name to #define.
209-
define(<<pgac_define_name>>,translit(HAVE_$1,[a-z .*],[A-Z__P]))dnl
210-
dnl The cache variable name.
211-
define(<<pgac_cache_name>>,translit(pgac_cv_member_$1,[ .*],[__p]))dnl
212-
changequote([,])dnl
213-
AC_CACHE_CHECK([for$1],[pgac_cache_name],
214-
[AC_TRY_COMPILE([$4],
215-
[static]patsubst([$1],[\..*])[ pgac_var;
216-
if (pgac_var.]patsubst([$1],[^[^.]*\.])[)
217-
return 0;],
218-
[pgac_cache_name=yes],
219-
[pgac_cache_name=no])])
220-
221-
if test x"[$]pgac_cache_name" = x"yes"; then
222-
AC_DEFINE_UNQUOTED(pgac_define_name)
223-
$2
224-
else
225-
ifelse([$3],[],:,[$3])
226-
fi
227-
undefine([pgac_define_name])[]dnl
228-
undefine([pgac_cache_name])[]dnl
229-
])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp