mirror of
https://github.com/postgres/postgres.git
synced 2025-04-20 00:42:27 +03:00
Replace obsolete autoconf macros with their modern replacements.
AC_TRY_COMPILE(...) -> AC_COMPILE_IFELSE([AC_LANG_PROGRAM(...)]) AC_TRY_LINK(...) -> AC_LINK_IFELSE([AC_LANG_PROGRAM(...)]) AC_TRY_RUN(...) -> AC_RUN_IFELSE([AC_LANG_PROGRAM(...)]) AC_LANG_SAVE/RESTORE -> AC_LANG_PUSH/POP AC_DECL_SYS_SIGLIST -> AC_CHECK_DECLS(...) (per snippet in autoconf manual) Also use AC_LANG_SOURCE instead of AC_LANG_PROGRAM, where the main() function is not needed. With these changes, autoconf -Wall doesn't complain anymore. Andreas Karlsson
This commit is contained in:
parent
7b156c1e07
commit
a2edb023d0
@ -50,15 +50,15 @@ AC_DEFUN([AC_FUNC_ACCEPT_ARGTYPES],
|
|||||||
for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
|
for ac_cv_func_accept_arg1 in 'int' 'unsigned int' 'SOCKET'; do
|
||||||
for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
|
for ac_cv_func_accept_arg2 in 'struct sockaddr *' 'const struct sockaddr *' 'void *'; do
|
||||||
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
|
for ac_cv_func_accept_arg3 in 'int' 'size_t' 'socklen_t' 'unsigned int' 'void'; do
|
||||||
AC_TRY_COMPILE(
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE(
|
||||||
[#ifdef HAVE_SYS_TYPES_H
|
[#ifdef HAVE_SYS_TYPES_H
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
#ifdef HAVE_SYS_SOCKET_H
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);],
|
extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);])],
|
||||||
[], [ac_not_found=no; break 4], [ac_not_found=yes])
|
[ac_not_found=no; break 4], [ac_not_found=yes])
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
@ -5,8 +5,7 @@ dnl upstream changes!
|
|||||||
dnl
|
dnl
|
||||||
AC_DEFUN([ACX_PTHREAD], [
|
AC_DEFUN([ACX_PTHREAD], [
|
||||||
AC_REQUIRE([AC_CANONICAL_HOST])
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
||||||
AC_LANG_SAVE
|
AC_LANG_PUSH([C])
|
||||||
AC_LANG_C
|
|
||||||
acx_pthread_ok=no
|
acx_pthread_ok=no
|
||||||
|
|
||||||
# We used to check for pthread.h first, but this fails if pthread.h
|
# We used to check for pthread.h first, but this fails if pthread.h
|
||||||
@ -122,10 +121,10 @@ for flag in $acx_pthread_flags; do
|
|||||||
# pthread_cleanup_push because it is one of the few pthread
|
# pthread_cleanup_push because it is one of the few pthread
|
||||||
# functions on Solaris that doesn't have a non-functional libc stub.
|
# functions on Solaris that doesn't have a non-functional libc stub.
|
||||||
# We try pthread_create on general principles.
|
# We try pthread_create on general principles.
|
||||||
AC_TRY_LINK([#include <pthread.h>],
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
|
||||||
[pthread_t th; pthread_join(th, 0);
|
[pthread_t th; pthread_join(th, 0);
|
||||||
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
||||||
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ])],
|
||||||
[acx_pthread_ok=yes], [acx_pthread_ok=no])
|
[acx_pthread_ok=yes], [acx_pthread_ok=no])
|
||||||
|
|
||||||
if test "x$acx_pthread_ok" = xyes; then
|
if test "x$acx_pthread_ok" = xyes; then
|
||||||
@ -167,5 +166,5 @@ fi
|
|||||||
AC_SUBST(PTHREAD_LIBS)
|
AC_SUBST(PTHREAD_LIBS)
|
||||||
AC_SUBST(PTHREAD_CFLAGS)
|
AC_SUBST(PTHREAD_CFLAGS)
|
||||||
|
|
||||||
AC_LANG_RESTORE
|
AC_LANG_POP([C])
|
||||||
])dnl ACX_PTHREAD
|
])dnl ACX_PTHREAD
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
# Check if the C compiler understands signed types.
|
# Check if the C compiler understands signed types.
|
||||||
AC_DEFUN([PGAC_C_SIGNED],
|
AC_DEFUN([PGAC_C_SIGNED],
|
||||||
[AC_CACHE_CHECK(for signed types, pgac_cv_c_signed,
|
[AC_CACHE_CHECK(for signed types, pgac_cv_c_signed,
|
||||||
[AC_TRY_COMPILE([],
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[signed char c; signed short s; signed int i;],
|
[signed char c; signed short s; signed int i;])],
|
||||||
[pgac_cv_c_signed=yes],
|
[pgac_cv_c_signed=yes],
|
||||||
[pgac_cv_c_signed=no])])
|
[pgac_cv_c_signed=no])])
|
||||||
if test x"$pgac_cv_c_signed" = xno ; then
|
if test x"$pgac_cv_c_signed" = xno ; then
|
||||||
@ -81,7 +81,7 @@ AC_DEFUN([PGAC_TYPE_64BIT_INT],
|
|||||||
[define([Ac_define], [translit([have_$1_64], [a-z *], [A-Z_P])])dnl
|
[define([Ac_define], [translit([have_$1_64], [a-z *], [A-Z_P])])dnl
|
||||||
define([Ac_cachevar], [translit([pgac_cv_type_$1_64], [ *], [_p])])dnl
|
define([Ac_cachevar], [translit([pgac_cv_type_$1_64], [ *], [_p])])dnl
|
||||||
AC_CACHE_CHECK([whether $1 is 64 bits], [Ac_cachevar],
|
AC_CACHE_CHECK([whether $1 is 64 bits], [Ac_cachevar],
|
||||||
[AC_TRY_RUN(
|
[AC_RUN_IFELSE([AC_LANG_SOURCE(
|
||||||
[typedef $1 ac_int64;
|
[typedef $1 ac_int64;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -107,7 +107,7 @@ int does_int64_work()
|
|||||||
}
|
}
|
||||||
main() {
|
main() {
|
||||||
exit(! does_int64_work());
|
exit(! does_int64_work());
|
||||||
}],
|
}])],
|
||||||
[Ac_cachevar=yes],
|
[Ac_cachevar=yes],
|
||||||
[Ac_cachevar=no],
|
[Ac_cachevar=no],
|
||||||
[# If cross-compiling, check the size reported by the compiler and
|
[# If cross-compiling, check the size reported by the compiler and
|
||||||
@ -169,8 +169,8 @@ fi])# PGAC_TYPE_128BIT_INT
|
|||||||
# Define HAVE_FUNCNAME__FUNC or HAVE_FUNCNAME__FUNCTION accordingly.
|
# Define HAVE_FUNCNAME__FUNC or HAVE_FUNCNAME__FUNCTION accordingly.
|
||||||
AC_DEFUN([PGAC_C_FUNCNAME_SUPPORT],
|
AC_DEFUN([PGAC_C_FUNCNAME_SUPPORT],
|
||||||
[AC_CACHE_CHECK(for __func__, pgac_cv_funcname_func_support,
|
[AC_CACHE_CHECK(for __func__, pgac_cv_funcname_func_support,
|
||||||
[AC_TRY_COMPILE([#include <stdio.h>],
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],
|
||||||
[printf("%s\n", __func__);],
|
[printf("%s\n", __func__);])],
|
||||||
[pgac_cv_funcname_func_support=yes],
|
[pgac_cv_funcname_func_support=yes],
|
||||||
[pgac_cv_funcname_func_support=no])])
|
[pgac_cv_funcname_func_support=no])])
|
||||||
if test x"$pgac_cv_funcname_func_support" = xyes ; then
|
if test x"$pgac_cv_funcname_func_support" = xyes ; then
|
||||||
@ -178,8 +178,8 @@ AC_DEFINE(HAVE_FUNCNAME__FUNC, 1,
|
|||||||
[Define to 1 if your compiler understands __func__.])
|
[Define to 1 if your compiler understands __func__.])
|
||||||
else
|
else
|
||||||
AC_CACHE_CHECK(for __FUNCTION__, pgac_cv_funcname_function_support,
|
AC_CACHE_CHECK(for __FUNCTION__, pgac_cv_funcname_function_support,
|
||||||
[AC_TRY_COMPILE([#include <stdio.h>],
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],
|
||||||
[printf("%s\n", __FUNCTION__);],
|
[printf("%s\n", __FUNCTION__);])],
|
||||||
[pgac_cv_funcname_function_support=yes],
|
[pgac_cv_funcname_function_support=yes],
|
||||||
[pgac_cv_funcname_function_support=no])])
|
[pgac_cv_funcname_function_support=no])])
|
||||||
if test x"$pgac_cv_funcname_function_support" = xyes ; then
|
if test x"$pgac_cv_funcname_function_support" = xyes ; then
|
||||||
@ -199,8 +199,8 @@ fi])# PGAC_C_FUNCNAME_SUPPORT
|
|||||||
# gcc-style compound expressions to be able to wrap the thing into macros.
|
# gcc-style compound expressions to be able to wrap the thing into macros.
|
||||||
AC_DEFUN([PGAC_C_STATIC_ASSERT],
|
AC_DEFUN([PGAC_C_STATIC_ASSERT],
|
||||||
[AC_CACHE_CHECK(for _Static_assert, pgac_cv__static_assert,
|
[AC_CACHE_CHECK(for _Static_assert, pgac_cv__static_assert,
|
||||||
[AC_TRY_LINK([],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[({ _Static_assert(1, "foo"); })],
|
[({ _Static_assert(1, "foo"); })])],
|
||||||
[pgac_cv__static_assert=yes],
|
[pgac_cv__static_assert=yes],
|
||||||
[pgac_cv__static_assert=no])])
|
[pgac_cv__static_assert=no])])
|
||||||
if test x"$pgac_cv__static_assert" = xyes ; then
|
if test x"$pgac_cv__static_assert" = xyes ; then
|
||||||
@ -219,8 +219,8 @@ fi])# PGAC_C_STATIC_ASSERT
|
|||||||
# have the former and not the latter.
|
# have the former and not the latter.
|
||||||
AC_DEFUN([PGAC_C_TYPES_COMPATIBLE],
|
AC_DEFUN([PGAC_C_TYPES_COMPATIBLE],
|
||||||
[AC_CACHE_CHECK(for __builtin_types_compatible_p, pgac_cv__types_compatible,
|
[AC_CACHE_CHECK(for __builtin_types_compatible_p, pgac_cv__types_compatible,
|
||||||
[AC_TRY_COMPILE([],
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[ int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)]; ],
|
[[ int x; static int y[__builtin_types_compatible_p(__typeof__(x), int)]; ]])],
|
||||||
[pgac_cv__types_compatible=yes],
|
[pgac_cv__types_compatible=yes],
|
||||||
[pgac_cv__types_compatible=no])])
|
[pgac_cv__types_compatible=no])])
|
||||||
if test x"$pgac_cv__types_compatible" = xyes ; then
|
if test x"$pgac_cv__types_compatible" = xyes ; then
|
||||||
@ -236,8 +236,9 @@ fi])# PGAC_C_TYPES_COMPATIBLE
|
|||||||
# and define HAVE__BUILTIN_BSWAP32 if so.
|
# and define HAVE__BUILTIN_BSWAP32 if so.
|
||||||
AC_DEFUN([PGAC_C_BUILTIN_BSWAP32],
|
AC_DEFUN([PGAC_C_BUILTIN_BSWAP32],
|
||||||
[AC_CACHE_CHECK(for __builtin_bswap32, pgac_cv__builtin_bswap32,
|
[AC_CACHE_CHECK(for __builtin_bswap32, pgac_cv__builtin_bswap32,
|
||||||
[AC_TRY_COMPILE([static unsigned long int x = __builtin_bswap32(0xaabbccdd);],
|
[AC_COMPILE_IFELSE([AC_LANG_SOURCE(
|
||||||
[],
|
[static unsigned long int x = __builtin_bswap32(0xaabbccdd);]
|
||||||
|
)],
|
||||||
[pgac_cv__builtin_bswap32=yes],
|
[pgac_cv__builtin_bswap32=yes],
|
||||||
[pgac_cv__builtin_bswap32=no])])
|
[pgac_cv__builtin_bswap32=no])])
|
||||||
if test x"$pgac_cv__builtin_bswap32" = xyes ; then
|
if test x"$pgac_cv__builtin_bswap32" = xyes ; then
|
||||||
@ -253,8 +254,9 @@ fi])# PGAC_C_BUILTIN_BSWAP32
|
|||||||
# and define HAVE__BUILTIN_CONSTANT_P if so.
|
# and define HAVE__BUILTIN_CONSTANT_P if so.
|
||||||
AC_DEFUN([PGAC_C_BUILTIN_CONSTANT_P],
|
AC_DEFUN([PGAC_C_BUILTIN_CONSTANT_P],
|
||||||
[AC_CACHE_CHECK(for __builtin_constant_p, pgac_cv__builtin_constant_p,
|
[AC_CACHE_CHECK(for __builtin_constant_p, pgac_cv__builtin_constant_p,
|
||||||
[AC_TRY_COMPILE([static int x; static int y[__builtin_constant_p(x) ? x : 1];],
|
[AC_COMPILE_IFELSE([AC_LANG_SOURCE(
|
||||||
[],
|
[[static int x; static int y[__builtin_constant_p(x) ? x : 1];]]
|
||||||
|
)],
|
||||||
[pgac_cv__builtin_constant_p=yes],
|
[pgac_cv__builtin_constant_p=yes],
|
||||||
[pgac_cv__builtin_constant_p=no])])
|
[pgac_cv__builtin_constant_p=no])])
|
||||||
if test x"$pgac_cv__builtin_constant_p" = xyes ; then
|
if test x"$pgac_cv__builtin_constant_p" = xyes ; then
|
||||||
@ -274,8 +276,8 @@ fi])# PGAC_C_BUILTIN_CONSTANT_P
|
|||||||
# and only a warning instead of an error would be produced.
|
# and only a warning instead of an error would be produced.
|
||||||
AC_DEFUN([PGAC_C_BUILTIN_UNREACHABLE],
|
AC_DEFUN([PGAC_C_BUILTIN_UNREACHABLE],
|
||||||
[AC_CACHE_CHECK(for __builtin_unreachable, pgac_cv__builtin_unreachable,
|
[AC_CACHE_CHECK(for __builtin_unreachable, pgac_cv__builtin_unreachable,
|
||||||
[AC_TRY_LINK([],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[__builtin_unreachable();],
|
[__builtin_unreachable();])],
|
||||||
[pgac_cv__builtin_unreachable=yes],
|
[pgac_cv__builtin_unreachable=yes],
|
||||||
[pgac_cv__builtin_unreachable=no])])
|
[pgac_cv__builtin_unreachable=no])])
|
||||||
if test x"$pgac_cv__builtin_unreachable" = xyes ; then
|
if test x"$pgac_cv__builtin_unreachable" = xyes ; then
|
||||||
@ -291,10 +293,10 @@ fi])# PGAC_C_BUILTIN_UNREACHABLE
|
|||||||
# and define HAVE__VA_ARGS if so.
|
# and define HAVE__VA_ARGS if so.
|
||||||
AC_DEFUN([PGAC_C_VA_ARGS],
|
AC_DEFUN([PGAC_C_VA_ARGS],
|
||||||
[AC_CACHE_CHECK(for __VA_ARGS__, pgac_cv__va_args,
|
[AC_CACHE_CHECK(for __VA_ARGS__, pgac_cv__va_args,
|
||||||
[AC_TRY_COMPILE([#include <stdio.h>],
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>],
|
||||||
[#define debug(...) fprintf(stderr, __VA_ARGS__)
|
[#define debug(...) fprintf(stderr, __VA_ARGS__)
|
||||||
debug("%s", "blarg");
|
debug("%s", "blarg");
|
||||||
],
|
])],
|
||||||
[pgac_cv__va_args=yes],
|
[pgac_cv__va_args=yes],
|
||||||
[pgac_cv__va_args=no])])
|
[pgac_cv__va_args=no])])
|
||||||
if test x"$pgac_cv__va_args" = xyes ; then
|
if test x"$pgac_cv__va_args" = xyes ; then
|
||||||
@ -386,10 +388,10 @@ undefine([Ac_cachevar])dnl
|
|||||||
# NB: Some platforms only do 32bit tas, others only do 8bit tas. Test both.
|
# NB: Some platforms only do 32bit tas, others only do 8bit tas. Test both.
|
||||||
AC_DEFUN([PGAC_HAVE_GCC__SYNC_CHAR_TAS],
|
AC_DEFUN([PGAC_HAVE_GCC__SYNC_CHAR_TAS],
|
||||||
[AC_CACHE_CHECK(for builtin __sync char locking functions, pgac_cv_gcc_sync_char_tas,
|
[AC_CACHE_CHECK(for builtin __sync char locking functions, pgac_cv_gcc_sync_char_tas,
|
||||||
[AC_TRY_LINK([],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[char lock = 0;
|
[char lock = 0;
|
||||||
__sync_lock_test_and_set(&lock, 1);
|
__sync_lock_test_and_set(&lock, 1);
|
||||||
__sync_lock_release(&lock);],
|
__sync_lock_release(&lock);])],
|
||||||
[pgac_cv_gcc_sync_char_tas="yes"],
|
[pgac_cv_gcc_sync_char_tas="yes"],
|
||||||
[pgac_cv_gcc_sync_char_tas="no"])])
|
[pgac_cv_gcc_sync_char_tas="no"])])
|
||||||
if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
|
if test x"$pgac_cv_gcc_sync_char_tas" = x"yes"; then
|
||||||
@ -402,10 +404,10 @@ fi])# PGAC_HAVE_GCC__SYNC_CHAR_TAS
|
|||||||
# and define HAVE_GCC__SYNC_INT32_TAS
|
# and define HAVE_GCC__SYNC_INT32_TAS
|
||||||
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT32_TAS],
|
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT32_TAS],
|
||||||
[AC_CACHE_CHECK(for builtin __sync int32 locking functions, pgac_cv_gcc_sync_int32_tas,
|
[AC_CACHE_CHECK(for builtin __sync int32 locking functions, pgac_cv_gcc_sync_int32_tas,
|
||||||
[AC_TRY_LINK([],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[int lock = 0;
|
[int lock = 0;
|
||||||
__sync_lock_test_and_set(&lock, 1);
|
__sync_lock_test_and_set(&lock, 1);
|
||||||
__sync_lock_release(&lock);],
|
__sync_lock_release(&lock);])],
|
||||||
[pgac_cv_gcc_sync_int32_tas="yes"],
|
[pgac_cv_gcc_sync_int32_tas="yes"],
|
||||||
[pgac_cv_gcc_sync_int32_tas="no"])])
|
[pgac_cv_gcc_sync_int32_tas="no"])])
|
||||||
if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
|
if test x"$pgac_cv_gcc_sync_int32_tas" = x"yes"; then
|
||||||
@ -418,9 +420,9 @@ fi])# PGAC_HAVE_GCC__SYNC_INT32_TAS
|
|||||||
# types, and define HAVE_GCC__SYNC_INT32_CAS if so.
|
# types, and define HAVE_GCC__SYNC_INT32_CAS if so.
|
||||||
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT32_CAS],
|
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT32_CAS],
|
||||||
[AC_CACHE_CHECK(for builtin __sync int32 atomic operations, pgac_cv_gcc_sync_int32_cas,
|
[AC_CACHE_CHECK(for builtin __sync int32 atomic operations, pgac_cv_gcc_sync_int32_cas,
|
||||||
[AC_TRY_LINK([],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[int val = 0;
|
[int val = 0;
|
||||||
__sync_val_compare_and_swap(&val, 0, 37);],
|
__sync_val_compare_and_swap(&val, 0, 37);])],
|
||||||
[pgac_cv_gcc_sync_int32_cas="yes"],
|
[pgac_cv_gcc_sync_int32_cas="yes"],
|
||||||
[pgac_cv_gcc_sync_int32_cas="no"])])
|
[pgac_cv_gcc_sync_int32_cas="no"])])
|
||||||
if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
|
if test x"$pgac_cv_gcc_sync_int32_cas" = x"yes"; then
|
||||||
@ -433,9 +435,9 @@ fi])# PGAC_HAVE_GCC__SYNC_INT32_CAS
|
|||||||
# types, and define HAVE_GCC__SYNC_INT64_CAS if so.
|
# types, and define HAVE_GCC__SYNC_INT64_CAS if so.
|
||||||
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT64_CAS],
|
AC_DEFUN([PGAC_HAVE_GCC__SYNC_INT64_CAS],
|
||||||
[AC_CACHE_CHECK(for builtin __sync int64 atomic operations, pgac_cv_gcc_sync_int64_cas,
|
[AC_CACHE_CHECK(for builtin __sync int64 atomic operations, pgac_cv_gcc_sync_int64_cas,
|
||||||
[AC_TRY_LINK([],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[PG_INT64_TYPE lock = 0;
|
[PG_INT64_TYPE lock = 0;
|
||||||
__sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);],
|
__sync_val_compare_and_swap(&lock, 0, (PG_INT64_TYPE) 37);])],
|
||||||
[pgac_cv_gcc_sync_int64_cas="yes"],
|
[pgac_cv_gcc_sync_int64_cas="yes"],
|
||||||
[pgac_cv_gcc_sync_int64_cas="no"])])
|
[pgac_cv_gcc_sync_int64_cas="no"])])
|
||||||
if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
|
if test x"$pgac_cv_gcc_sync_int64_cas" = x"yes"; then
|
||||||
@ -448,10 +450,10 @@ fi])# PGAC_HAVE_GCC__SYNC_INT64_CAS
|
|||||||
# types, and define HAVE_GCC__ATOMIC_INT32_CAS if so.
|
# types, and define HAVE_GCC__ATOMIC_INT32_CAS if so.
|
||||||
AC_DEFUN([PGAC_HAVE_GCC__ATOMIC_INT32_CAS],
|
AC_DEFUN([PGAC_HAVE_GCC__ATOMIC_INT32_CAS],
|
||||||
[AC_CACHE_CHECK(for builtin __atomic int32 atomic operations, pgac_cv_gcc_atomic_int32_cas,
|
[AC_CACHE_CHECK(for builtin __atomic int32 atomic operations, pgac_cv_gcc_atomic_int32_cas,
|
||||||
[AC_TRY_LINK([],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[int val = 0;
|
[int val = 0;
|
||||||
int expect = 0;
|
int expect = 0;
|
||||||
__atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);],
|
__atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);])],
|
||||||
[pgac_cv_gcc_atomic_int32_cas="yes"],
|
[pgac_cv_gcc_atomic_int32_cas="yes"],
|
||||||
[pgac_cv_gcc_atomic_int32_cas="no"])])
|
[pgac_cv_gcc_atomic_int32_cas="no"])])
|
||||||
if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
|
if test x"$pgac_cv_gcc_atomic_int32_cas" = x"yes"; then
|
||||||
@ -464,10 +466,10 @@ fi])# PGAC_HAVE_GCC__ATOMIC_INT32_CAS
|
|||||||
# types, and define HAVE_GCC__ATOMIC_INT64_CAS if so.
|
# types, and define HAVE_GCC__ATOMIC_INT64_CAS if so.
|
||||||
AC_DEFUN([PGAC_HAVE_GCC__ATOMIC_INT64_CAS],
|
AC_DEFUN([PGAC_HAVE_GCC__ATOMIC_INT64_CAS],
|
||||||
[AC_CACHE_CHECK(for builtin __atomic int64 atomic operations, pgac_cv_gcc_atomic_int64_cas,
|
[AC_CACHE_CHECK(for builtin __atomic int64 atomic operations, pgac_cv_gcc_atomic_int64_cas,
|
||||||
[AC_TRY_LINK([],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[PG_INT64_TYPE val = 0;
|
[PG_INT64_TYPE val = 0;
|
||||||
PG_INT64_TYPE expect = 0;
|
PG_INT64_TYPE expect = 0;
|
||||||
__atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);],
|
__atomic_compare_exchange_n(&val, &expect, 37, 0, __ATOMIC_SEQ_CST, __ATOMIC_RELAXED);])],
|
||||||
[pgac_cv_gcc_atomic_int64_cas="yes"],
|
[pgac_cv_gcc_atomic_int64_cas="yes"],
|
||||||
[pgac_cv_gcc_atomic_int64_cas="no"])])
|
[pgac_cv_gcc_atomic_int64_cas="no"])])
|
||||||
if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
|
if test x"$pgac_cv_gcc_atomic_int64_cas" = x"yes"; then
|
||||||
@ -490,10 +492,10 @@ AC_CACHE_CHECK([for _mm_crc32_u8 and _mm_crc32_u32 with CFLAGS=$1], [Ac_cachevar
|
|||||||
CFLAGS="$pgac_save_CFLAGS $1"
|
CFLAGS="$pgac_save_CFLAGS $1"
|
||||||
ac_save_c_werror_flag=$ac_c_werror_flag
|
ac_save_c_werror_flag=$ac_c_werror_flag
|
||||||
ac_c_werror_flag=yes
|
ac_c_werror_flag=yes
|
||||||
AC_TRY_LINK([#include <nmmintrin.h>],
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <nmmintrin.h>],
|
||||||
[unsigned int crc = 0;
|
[unsigned int crc = 0;
|
||||||
crc = _mm_crc32_u8(crc, 0);
|
crc = _mm_crc32_u8(crc, 0);
|
||||||
crc = _mm_crc32_u32(crc, 0);],
|
crc = _mm_crc32_u32(crc, 0);])],
|
||||||
[Ac_cachevar=yes],
|
[Ac_cachevar=yes],
|
||||||
[Ac_cachevar=no])
|
[Ac_cachevar=no])
|
||||||
ac_c_werror_flag=$ac_save_c_werror_flag
|
ac_c_werror_flag=$ac_save_c_werror_flag
|
||||||
|
@ -8,13 +8,13 @@
|
|||||||
# HAVE_INT_TIMEZONE.
|
# HAVE_INT_TIMEZONE.
|
||||||
AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
|
AC_DEFUN([PGAC_VAR_INT_TIMEZONE],
|
||||||
[AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
|
[AC_CACHE_CHECK(for int timezone, pgac_cv_var_int_timezone,
|
||||||
[AC_TRY_LINK([#include <time.h>
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <time.h>
|
||||||
int res;],
|
int res;],
|
||||||
[#ifndef __CYGWIN__
|
[#ifndef __CYGWIN__
|
||||||
res = timezone / 60;
|
res = timezone / 60;
|
||||||
#else
|
#else
|
||||||
res = _timezone / 60;
|
res = _timezone / 60;
|
||||||
#endif],
|
#endif])],
|
||||||
[pgac_cv_var_int_timezone=yes],
|
[pgac_cv_var_int_timezone=yes],
|
||||||
[pgac_cv_var_int_timezone=no])])
|
[pgac_cv_var_int_timezone=no])])
|
||||||
if test x"$pgac_cv_var_int_timezone" = xyes ; then
|
if test x"$pgac_cv_var_int_timezone" = xyes ; then
|
||||||
@ -41,13 +41,13 @@ if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
|
|||||||
`HAVE_STRUCT_TM_TM_ZONE' instead.])
|
`HAVE_STRUCT_TM_TM_ZONE' instead.])
|
||||||
fi
|
fi
|
||||||
AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
|
AC_CACHE_CHECK(for tzname, ac_cv_var_tzname,
|
||||||
[AC_TRY_LINK(
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||||
[#include <time.h>
|
[[#include <time.h>
|
||||||
#ifndef tzname /* For SGI. */
|
#ifndef tzname /* For SGI. */
|
||||||
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
|
extern char *tzname[]; /* RS6000 and others reject char **tzname. */
|
||||||
#endif
|
#endif
|
||||||
],
|
]],
|
||||||
[atoi(*tzname);], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
|
[atoi(*tzname);])], ac_cv_var_tzname=yes, ac_cv_var_tzname=no)])
|
||||||
if test $ac_cv_var_tzname = yes; then
|
if test $ac_cv_var_tzname = yes; then
|
||||||
AC_DEFINE(HAVE_TZNAME, 1,
|
AC_DEFINE(HAVE_TZNAME, 1,
|
||||||
[Define to 1 if you have the external array `tzname'.])
|
[Define to 1 if you have the external array `tzname'.])
|
||||||
@ -62,10 +62,10 @@ fi
|
|||||||
AC_DEFUN([PGAC_FUNC_GETTIMEOFDAY_1ARG],
|
AC_DEFUN([PGAC_FUNC_GETTIMEOFDAY_1ARG],
|
||||||
[AC_CACHE_CHECK(whether gettimeofday takes only one argument,
|
[AC_CACHE_CHECK(whether gettimeofday takes only one argument,
|
||||||
pgac_cv_func_gettimeofday_1arg,
|
pgac_cv_func_gettimeofday_1arg,
|
||||||
[AC_TRY_COMPILE([#include <sys/time.h>],
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <sys/time.h>],
|
||||||
[struct timeval *tp;
|
[struct timeval *tp;
|
||||||
struct timezone *tzp;
|
struct timezone *tzp;
|
||||||
gettimeofday(tp,tzp);],
|
gettimeofday(tp,tzp);])],
|
||||||
[pgac_cv_func_gettimeofday_1arg=no],
|
[pgac_cv_func_gettimeofday_1arg=no],
|
||||||
[pgac_cv_func_gettimeofday_1arg=yes])])
|
[pgac_cv_func_gettimeofday_1arg=yes])])
|
||||||
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
|
if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
|
||||||
@ -86,13 +86,13 @@ AH_VERBATIM(GETTIMEOFDAY_1ARG_,
|
|||||||
AC_DEFUN([PGAC_FUNC_STRERROR_R_INT],
|
AC_DEFUN([PGAC_FUNC_STRERROR_R_INT],
|
||||||
[AC_CACHE_CHECK(whether strerror_r returns int,
|
[AC_CACHE_CHECK(whether strerror_r returns int,
|
||||||
pgac_cv_func_strerror_r_int,
|
pgac_cv_func_strerror_r_int,
|
||||||
[AC_TRY_COMPILE([#include <string.h>],
|
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([#include <string.h>],
|
||||||
[#ifndef _AIX
|
[#ifndef _AIX
|
||||||
int strerror_r(int, char *, size_t);
|
int strerror_r(int, char *, size_t);
|
||||||
#else
|
#else
|
||||||
/* Older AIX has 'int' for the third argument so we don't test the args. */
|
/* Older AIX has 'int' for the third argument so we don't test the args. */
|
||||||
int strerror_r();
|
int strerror_r();
|
||||||
#endif],
|
#endif])],
|
||||||
[pgac_cv_func_strerror_r_int=yes],
|
[pgac_cv_func_strerror_r_int=yes],
|
||||||
[pgac_cv_func_strerror_r_int=no])])
|
[pgac_cv_func_strerror_r_int=no])])
|
||||||
if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
|
if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
|
||||||
@ -181,12 +181,12 @@ AC_DEFUN([PGAC_STRUCT_ADDRINFO],
|
|||||||
# a fancier check.
|
# a fancier check.
|
||||||
AC_DEFUN([PGAC_FUNC_POSIX_SIGNALS],
|
AC_DEFUN([PGAC_FUNC_POSIX_SIGNALS],
|
||||||
[AC_CACHE_CHECK(for POSIX signal interface, pgac_cv_func_posix_signals,
|
[AC_CACHE_CHECK(for POSIX signal interface, pgac_cv_func_posix_signals,
|
||||||
[AC_TRY_LINK([#include <signal.h>
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <signal.h>
|
||||||
],
|
],
|
||||||
[struct sigaction act, oact;
|
[struct sigaction act, oact;
|
||||||
sigemptyset(&act.sa_mask);
|
sigemptyset(&act.sa_mask);
|
||||||
act.sa_flags = SA_RESTART;
|
act.sa_flags = SA_RESTART;
|
||||||
sigaction(0, &act, &oact);],
|
sigaction(0, &act, &oact);])],
|
||||||
[pgac_cv_func_posix_signals=yes],
|
[pgac_cv_func_posix_signals=yes],
|
||||||
[pgac_cv_func_posix_signals=no])])
|
[pgac_cv_func_posix_signals=no])])
|
||||||
if test x"$pgac_cv_func_posix_signals" = xyes ; then
|
if test x"$pgac_cv_func_posix_signals" = xyes ; then
|
||||||
@ -210,7 +210,7 @@ AC_DEFUN([PGAC_FUNC_SNPRINTF_LONG_LONG_INT_MODIFIER],
|
|||||||
[AC_MSG_CHECKING([snprintf length modifier for long long int])
|
[AC_MSG_CHECKING([snprintf length modifier for long long int])
|
||||||
AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_modifier,
|
AC_CACHE_VAL(pgac_cv_snprintf_long_long_int_modifier,
|
||||||
[for pgac_modifier in 'll' 'q' 'I64'; do
|
[for pgac_modifier in 'll' 'q' 'I64'; do
|
||||||
AC_TRY_RUN([#include <stdio.h>
|
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
|
||||||
typedef long long int ac_int64;
|
typedef long long int ac_int64;
|
||||||
#define INT64_FORMAT "%${pgac_modifier}d"
|
#define INT64_FORMAT "%${pgac_modifier}d"
|
||||||
|
|
||||||
@ -233,7 +233,7 @@ int does_int64_snprintf_work()
|
|||||||
}
|
}
|
||||||
main() {
|
main() {
|
||||||
exit(! does_int64_snprintf_work());
|
exit(! does_int64_snprintf_work());
|
||||||
}],
|
}]])],
|
||||||
[pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break],
|
[pgac_cv_snprintf_long_long_int_modifier=$pgac_modifier; break],
|
||||||
[],
|
[],
|
||||||
[pgac_cv_snprintf_long_long_int_modifier=cross; break])
|
[pgac_cv_snprintf_long_long_int_modifier=cross; break])
|
||||||
@ -259,7 +259,7 @@ esac])# PGAC_FUNC_SNPRINTF_LONG_LONG_INT_MODIFIER
|
|||||||
AC_DEFUN([PGAC_FUNC_SNPRINTF_ARG_CONTROL],
|
AC_DEFUN([PGAC_FUNC_SNPRINTF_ARG_CONTROL],
|
||||||
[AC_MSG_CHECKING([whether snprintf supports argument control])
|
[AC_MSG_CHECKING([whether snprintf supports argument control])
|
||||||
AC_CACHE_VAL(pgac_cv_snprintf_arg_control,
|
AC_CACHE_VAL(pgac_cv_snprintf_arg_control,
|
||||||
[AC_TRY_RUN([#include <stdio.h>
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
@ -271,7 +271,7 @@ int main()
|
|||||||
if (strcmp(buf, "4 3") != 0)
|
if (strcmp(buf, "4 3") != 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[pgac_cv_snprintf_arg_control=yes],
|
[pgac_cv_snprintf_arg_control=yes],
|
||||||
[pgac_cv_snprintf_arg_control=no],
|
[pgac_cv_snprintf_arg_control=no],
|
||||||
[pgac_cv_snprintf_arg_control=cross])
|
[pgac_cv_snprintf_arg_control=cross])
|
||||||
@ -288,7 +288,7 @@ AC_MSG_RESULT([$pgac_cv_snprintf_arg_control])
|
|||||||
AC_DEFUN([PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT],
|
AC_DEFUN([PGAC_FUNC_SNPRINTF_SIZE_T_SUPPORT],
|
||||||
[AC_MSG_CHECKING([whether snprintf supports the %z modifier])
|
[AC_MSG_CHECKING([whether snprintf supports the %z modifier])
|
||||||
AC_CACHE_VAL(pgac_cv_snprintf_size_t_support,
|
AC_CACHE_VAL(pgac_cv_snprintf_size_t_support,
|
||||||
[AC_TRY_RUN([#include <stdio.h>
|
[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
@ -308,7 +308,7 @@ int main()
|
|||||||
if (strcmp(bufz, buf64) != 0)
|
if (strcmp(bufz, buf64) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
return 0;
|
return 0;
|
||||||
}],
|
}]])],
|
||||||
[pgac_cv_snprintf_size_t_support=yes],
|
[pgac_cv_snprintf_size_t_support=yes],
|
||||||
[pgac_cv_snprintf_size_t_support=no],
|
[pgac_cv_snprintf_size_t_support=no],
|
||||||
[pgac_cv_snprintf_size_t_support=cross])
|
[pgac_cv_snprintf_size_t_support=cross])
|
||||||
|
@ -200,14 +200,14 @@ fi
|
|||||||
|
|
||||||
AC_DEFUN([PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER],
|
AC_DEFUN([PGAC_VAR_RL_COMPLETION_APPEND_CHARACTER],
|
||||||
[AC_CACHE_CHECK([for rl_completion_append_character], pgac_cv_var_rl_completion_append_character,
|
[AC_CACHE_CHECK([for rl_completion_append_character], pgac_cv_var_rl_completion_append_character,
|
||||||
[AC_TRY_LINK([#include <stdio.h>
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>
|
||||||
#ifdef HAVE_READLINE_READLINE_H
|
#ifdef HAVE_READLINE_READLINE_H
|
||||||
# include <readline/readline.h>
|
# include <readline/readline.h>
|
||||||
#elif defined(HAVE_READLINE_H)
|
#elif defined(HAVE_READLINE_H)
|
||||||
# include <readline.h>
|
# include <readline.h>
|
||||||
#endif
|
#endif
|
||||||
],
|
],
|
||||||
[rl_completion_append_character = 'x';],
|
[rl_completion_append_character = 'x';])],
|
||||||
[pgac_cv_var_rl_completion_append_character=yes],
|
[pgac_cv_var_rl_completion_append_character=yes],
|
||||||
[pgac_cv_var_rl_completion_append_character=no])])
|
[pgac_cv_var_rl_completion_append_character=no])])
|
||||||
if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
|
if test x"$pgac_cv_var_rl_completion_append_character" = x"yes"; then
|
||||||
|
28
configure
vendored
28
configure
vendored
@ -10465,13 +10465,7 @@ else
|
|||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
static unsigned long int x = __builtin_bswap32(0xaabbccdd);
|
static unsigned long int x = __builtin_bswap32(0xaabbccdd);
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
pgac_cv__builtin_bswap32=yes
|
pgac_cv__builtin_bswap32=yes
|
||||||
@ -10495,13 +10489,7 @@ else
|
|||||||
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
static int x; static int y[__builtin_constant_p(x) ? x : 1];
|
static int x; static int y[__builtin_constant_p(x) ? x : 1];
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
pgac_cv__builtin_constant_p=yes
|
pgac_cv__builtin_constant_p=yes
|
||||||
@ -11433,13 +11421,6 @@ else
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#endif
|
#endif
|
||||||
extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
|
extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
ac_not_found=no; break 4
|
ac_not_found=no; break 4
|
||||||
@ -12338,7 +12319,6 @@ cat >>confdefs.h <<_ACEOF
|
|||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
|
ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
|
||||||
if test "x$ac_cv_func_syslog" = xyes; then :
|
if test "x$ac_cv_func_syslog" = xyes; then :
|
||||||
ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
|
ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
|
||||||
@ -12519,7 +12499,6 @@ fi
|
|||||||
if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
|
if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ac_ext=c
|
ac_ext=c
|
||||||
ac_cpp='$CPP $CPPFLAGS'
|
ac_cpp='$CPP $CPPFLAGS'
|
||||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||||
@ -13287,13 +13266,6 @@ if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
|
|||||||
#define INT64CONST(x) x##LL
|
#define INT64CONST(x) x##LL
|
||||||
long long int foo = INT64CONST(0x1234567890123456);
|
long long int foo = INT64CONST(0x1234567890123456);
|
||||||
|
|
||||||
int
|
|
||||||
main ()
|
|
||||||
{
|
|
||||||
|
|
||||||
;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
if ac_fn_c_try_compile "$LINENO"; then :
|
if ac_fn_c_try_compile "$LINENO"; then :
|
||||||
|
|
||||||
|
80
configure.in
80
configure.in
@ -373,15 +373,15 @@ AC_PROG_CC([$pgac_cc_list])
|
|||||||
# Check if it's Intel's compiler, which (usually) pretends to be gcc,
|
# Check if it's Intel's compiler, which (usually) pretends to be gcc,
|
||||||
# but has idiosyncrasies of its own. We assume icc will define
|
# but has idiosyncrasies of its own. We assume icc will define
|
||||||
# __INTEL_COMPILER regardless of CFLAGS.
|
# __INTEL_COMPILER regardless of CFLAGS.
|
||||||
AC_TRY_COMPILE([], [@%:@ifndef __INTEL_COMPILER
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [@%:@ifndef __INTEL_COMPILER
|
||||||
choke me
|
choke me
|
||||||
@%:@endif], [ICC=[yes]], [ICC=[no]])
|
@%:@endif])], [ICC=yes], [ICC=no])
|
||||||
|
|
||||||
# Check if it's Sun Studio compiler. We assume that
|
# Check if it's Sun Studio compiler. We assume that
|
||||||
# __SUNPRO_C will be defined for Sun Studio compilers
|
# __SUNPRO_C will be defined for Sun Studio compilers
|
||||||
AC_TRY_COMPILE([], [@%:@ifndef __SUNPRO_C
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [@%:@ifndef __SUNPRO_C
|
||||||
choke me
|
choke me
|
||||||
@%:@endif], [SUN_STUDIO_CC=yes], [SUN_STUDIO_CC=no])
|
@%:@endif])], [SUN_STUDIO_CC=yes], [SUN_STUDIO_CC=no])
|
||||||
|
|
||||||
AC_SUBST(SUN_STUDIO_CC)
|
AC_SUBST(SUN_STUDIO_CC)
|
||||||
|
|
||||||
@ -506,16 +506,16 @@ CFLAGS="$CFLAGS $user_CFLAGS"
|
|||||||
|
|
||||||
# Check if the compiler still works with the final flag settings
|
# Check if the compiler still works with the final flag settings
|
||||||
AC_MSG_CHECKING([whether the C compiler still works])
|
AC_MSG_CHECKING([whether the C compiler still works])
|
||||||
AC_TRY_LINK([], [return 0;],
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [return 0;])],
|
||||||
[AC_MSG_RESULT(yes)],
|
[AC_MSG_RESULT(yes)],
|
||||||
[AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
AC_MSG_ERROR([cannot proceed])])
|
AC_MSG_ERROR([cannot proceed])])
|
||||||
|
|
||||||
# Defend against gcc -ffast-math
|
# Defend against gcc -ffast-math
|
||||||
if test "$GCC" = yes; then
|
if test "$GCC" = yes; then
|
||||||
AC_TRY_COMPILE([], [@%:@ifdef __FAST_MATH__
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [@%:@ifdef __FAST_MATH__
|
||||||
choke me
|
choke me
|
||||||
@%:@endif], [], [AC_MSG_ERROR([do not put -ffast-math in CFLAGS])])
|
@%:@endif])], [], [AC_MSG_ERROR([do not put -ffast-math in CFLAGS])])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_PROG_CPP
|
AC_PROG_CPP
|
||||||
@ -844,7 +844,9 @@ case $host_os in sysv5*)
|
|||||||
AC_CACHE_CHECK([whether ld -R works], [pgac_cv_prog_ld_R],
|
AC_CACHE_CHECK([whether ld -R works], [pgac_cv_prog_ld_R],
|
||||||
[
|
[
|
||||||
pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
|
pgac_save_LDFLAGS=$LDFLAGS; LDFLAGS="$LDFLAGS -Wl,-R/usr/lib"
|
||||||
AC_TRY_LINK([], [], [pgac_cv_prog_ld_R=yes], [pgac_cv_prog_ld_R=no])
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([], [])],
|
||||||
|
[pgac_cv_prog_ld_R=yes],
|
||||||
|
[pgac_cv_prog_ld_R=no])
|
||||||
LDFLAGS=$pgac_save_LDFLAGS
|
LDFLAGS=$pgac_save_LDFLAGS
|
||||||
])
|
])
|
||||||
ld_R_works=$pgac_cv_prog_ld_R
|
ld_R_works=$pgac_cv_prog_ld_R
|
||||||
@ -1275,9 +1277,9 @@ fi
|
|||||||
case $host_cpu in
|
case $host_cpu in
|
||||||
ppc*|powerpc*)
|
ppc*|powerpc*)
|
||||||
AC_MSG_CHECKING([whether assembler supports lwarx hint bit])
|
AC_MSG_CHECKING([whether assembler supports lwarx hint bit])
|
||||||
AC_TRY_COMPILE([],
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],
|
||||||
[int a = 0; int *p = &a; int r;
|
[int a = 0; int *p = &a; int r;
|
||||||
__asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));],
|
__asm__ __volatile__ (" lwarx %0,0,%1,1\n" : "=&r"(r) : "r"(p));])],
|
||||||
[pgac_cv_have_ppc_mutex_hint=yes],
|
[pgac_cv_have_ppc_mutex_hint=yes],
|
||||||
[pgac_cv_have_ppc_mutex_hint=no])
|
[pgac_cv_have_ppc_mutex_hint=no])
|
||||||
AC_MSG_RESULT([$pgac_cv_have_ppc_mutex_hint])
|
AC_MSG_RESULT([$pgac_cv_have_ppc_mutex_hint])
|
||||||
@ -1360,12 +1362,12 @@ AC_CHECK_TYPE([struct sockaddr_in6],
|
|||||||
AC_SUBST(HAVE_IPV6)
|
AC_SUBST(HAVE_IPV6)
|
||||||
|
|
||||||
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
|
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
|
||||||
[AC_TRY_LINK(
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM(
|
||||||
[#include <machine/vmparam.h>
|
[#include <machine/vmparam.h>
|
||||||
#include <sys/exec.h>
|
#include <sys/exec.h>
|
||||||
],
|
],
|
||||||
[PS_STRINGS->ps_nargvstr = 1;
|
[PS_STRINGS->ps_nargvstr = 1;
|
||||||
PS_STRINGS->ps_argvstr = "foo";],
|
PS_STRINGS->ps_argvstr = "foo";])],
|
||||||
[pgac_cv_var_PS_STRINGS=yes],
|
[pgac_cv_var_PS_STRINGS=yes],
|
||||||
[pgac_cv_var_PS_STRINGS=no])])
|
[pgac_cv_var_PS_STRINGS=no])])
|
||||||
if test "$pgac_cv_var_PS_STRINGS" = yes ; then
|
if test "$pgac_cv_var_PS_STRINGS" = yes ; then
|
||||||
@ -1422,11 +1424,11 @@ AC_CHECK_DECLS([snprintf, vsnprintf])
|
|||||||
|
|
||||||
dnl Cannot use AC_CHECK_FUNC because isinf may be a macro
|
dnl Cannot use AC_CHECK_FUNC because isinf may be a macro
|
||||||
AC_CACHE_CHECK([for isinf], ac_cv_func_isinf,
|
AC_CACHE_CHECK([for isinf], ac_cv_func_isinf,
|
||||||
[AC_TRY_LINK([
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
double glob_double;
|
double glob_double;
|
||||||
],
|
],
|
||||||
[return isinf(glob_double) ? 0 : 1;],
|
[return isinf(glob_double) ? 0 : 1;])],
|
||||||
[ac_cv_func_isinf=yes],
|
[ac_cv_func_isinf=yes],
|
||||||
[ac_cv_func_isinf=no])])
|
[ac_cv_func_isinf=no])])
|
||||||
|
|
||||||
@ -1518,23 +1520,29 @@ dnl Cannot use AC_CHECK_FUNC because sigsetjmp may be a macro
|
|||||||
dnl (especially on GNU libc)
|
dnl (especially on GNU libc)
|
||||||
dnl See also comments in c.h.
|
dnl See also comments in c.h.
|
||||||
AC_CACHE_CHECK([for sigsetjmp], pgac_cv_func_sigsetjmp,
|
AC_CACHE_CHECK([for sigsetjmp], pgac_cv_func_sigsetjmp,
|
||||||
[AC_TRY_LINK([#include <setjmp.h>],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <setjmp.h>],
|
||||||
[sigjmp_buf x; sigsetjmp(x, 1);],
|
[sigjmp_buf x; sigsetjmp(x, 1);])],
|
||||||
[pgac_cv_func_sigsetjmp=yes],
|
[pgac_cv_func_sigsetjmp=yes],
|
||||||
[pgac_cv_func_sigsetjmp=no])])
|
[pgac_cv_func_sigsetjmp=no])])
|
||||||
if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
|
if test x"$pgac_cv_func_sigsetjmp" = x"yes"; then
|
||||||
AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have sigsetjmp().])
|
AC_DEFINE(HAVE_SIGSETJMP, 1, [Define to 1 if you have sigsetjmp().])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_DECL_SYS_SIGLIST
|
AC_CHECK_DECLS([sys_siglist], [], [],
|
||||||
|
[#include <signal.h>
|
||||||
|
/* NetBSD declares sys_siglist in unistd.h. */
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
])
|
||||||
|
|
||||||
AC_CHECK_FUNC(syslog,
|
AC_CHECK_FUNC(syslog,
|
||||||
[AC_CHECK_HEADER(syslog.h,
|
[AC_CHECK_HEADER(syslog.h,
|
||||||
[AC_DEFINE(HAVE_SYSLOG, 1, [Define to 1 if you have the syslog interface.])])])
|
[AC_DEFINE(HAVE_SYSLOG, 1, [Define to 1 if you have the syslog interface.])])])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for opterr], pgac_cv_var_int_opterr,
|
AC_CACHE_CHECK([for opterr], pgac_cv_var_int_opterr,
|
||||||
[AC_TRY_LINK([#include <unistd.h>],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>],
|
||||||
[extern int opterr; opterr = 1;],
|
[extern int opterr; opterr = 1;])],
|
||||||
[pgac_cv_var_int_opterr=yes],
|
[pgac_cv_var_int_opterr=yes],
|
||||||
[pgac_cv_var_int_opterr=no])])
|
[pgac_cv_var_int_opterr=no])])
|
||||||
if test x"$pgac_cv_var_int_opterr" = x"yes"; then
|
if test x"$pgac_cv_var_int_opterr" = x"yes"; then
|
||||||
@ -1542,8 +1550,8 @@ if test x"$pgac_cv_var_int_opterr" = x"yes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CACHE_CHECK([for optreset], pgac_cv_var_int_optreset,
|
AC_CACHE_CHECK([for optreset], pgac_cv_var_int_optreset,
|
||||||
[AC_TRY_LINK([#include <unistd.h>],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <unistd.h>],
|
||||||
[extern int optreset; optreset = 1;],
|
[extern int optreset; optreset = 1;])],
|
||||||
[pgac_cv_var_int_optreset=yes],
|
[pgac_cv_var_int_optreset=yes],
|
||||||
[pgac_cv_var_int_optreset=no])])
|
[pgac_cv_var_int_optreset=no])])
|
||||||
if test x"$pgac_cv_var_int_optreset" = x"yes"; then
|
if test x"$pgac_cv_var_int_optreset" = x"yes"; then
|
||||||
@ -1640,7 +1648,7 @@ AC_SUBST(LDAP_LIBS_BE)
|
|||||||
# This check should come after all modifications of compiler or linker
|
# This check should come after all modifications of compiler or linker
|
||||||
# variables, and before any other run tests.
|
# variables, and before any other run tests.
|
||||||
AC_MSG_CHECKING([test program])
|
AC_MSG_CHECKING([test program])
|
||||||
AC_TRY_RUN([int main() { return 0; }],
|
AC_RUN_IFELSE([AC_LANG_SOURCE([int main() { return 0; }])],
|
||||||
[AC_MSG_RESULT(ok)],
|
[AC_MSG_RESULT(ok)],
|
||||||
[AC_MSG_RESULT(failed)
|
[AC_MSG_RESULT(failed)
|
||||||
AC_MSG_ERROR([[
|
AC_MSG_ERROR([[
|
||||||
@ -1698,11 +1706,10 @@ AC_DEFINE_UNQUOTED(PG_INT64_TYPE, $pg_int64_type,
|
|||||||
dnl If we need to use "long long int", figure out whether nnnLL notation works.
|
dnl If we need to use "long long int", figure out whether nnnLL notation works.
|
||||||
|
|
||||||
if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
|
if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
|
||||||
AC_TRY_COMPILE([
|
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
|
||||||
#define INT64CONST(x) x##LL
|
#define INT64CONST(x) x##LL
|
||||||
long long int foo = INT64CONST(0x1234567890123456);
|
long long int foo = INT64CONST(0x1234567890123456);
|
||||||
],
|
])],
|
||||||
[],
|
|
||||||
[AC_DEFINE(HAVE_LL_CONSTANTS, 1, [Define to 1 if constants of type 'long long int' should have the suffix LL.])],
|
[AC_DEFINE(HAVE_LL_CONSTANTS, 1, [Define to 1 if constants of type 'long long int' should have the suffix LL.])],
|
||||||
[])
|
[])
|
||||||
fi
|
fi
|
||||||
@ -1835,10 +1842,10 @@ PGAC_HAVE_GCC__ATOMIC_INT64_CAS
|
|||||||
|
|
||||||
# Check for x86 cpuid instruction
|
# Check for x86 cpuid instruction
|
||||||
AC_CACHE_CHECK([for __get_cpuid], [pgac_cv__get_cpuid],
|
AC_CACHE_CHECK([for __get_cpuid], [pgac_cv__get_cpuid],
|
||||||
[AC_TRY_LINK([#include <cpuid.h>],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <cpuid.h>],
|
||||||
[unsigned int exx[4] = {0, 0, 0, 0};
|
[[unsigned int exx[4] = {0, 0, 0, 0};
|
||||||
__get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
|
__get_cpuid(1, &exx[0], &exx[1], &exx[2], &exx[3]);
|
||||||
],
|
]])],
|
||||||
[pgac_cv__get_cpuid="yes"],
|
[pgac_cv__get_cpuid="yes"],
|
||||||
[pgac_cv__get_cpuid="no"])])
|
[pgac_cv__get_cpuid="no"])])
|
||||||
if test x"$pgac_cv__get_cpuid" = x"yes"; then
|
if test x"$pgac_cv__get_cpuid" = x"yes"; then
|
||||||
@ -1846,10 +1853,10 @@ if test x"$pgac_cv__get_cpuid" = x"yes"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CACHE_CHECK([for __cpuid], [pgac_cv__cpuid],
|
AC_CACHE_CHECK([for __cpuid], [pgac_cv__cpuid],
|
||||||
[AC_TRY_LINK([#include <intrin.h>],
|
[AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <intrin.h>],
|
||||||
[unsigned int exx[4] = {0, 0, 0, 0};
|
[[unsigned int exx[4] = {0, 0, 0, 0};
|
||||||
__get_cpuid(exx[0], 1);
|
__get_cpuid(exx[0], 1);
|
||||||
],
|
]])],
|
||||||
[pgac_cv__cpuid="yes"],
|
[pgac_cv__cpuid="yes"],
|
||||||
[pgac_cv__cpuid="no"])])
|
[pgac_cv__cpuid="no"])])
|
||||||
if test x"$pgac_cv__cpuid" = x"yes"; then
|
if test x"$pgac_cv__cpuid" = x"yes"; then
|
||||||
@ -1869,11 +1876,11 @@ AC_SUBST(CFLAGS_SSE42)
|
|||||||
|
|
||||||
# Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
|
# Are we targeting a processor that supports SSE 4.2? gcc, clang and icc all
|
||||||
# define __SSE4_2__ in that case.
|
# define __SSE4_2__ in that case.
|
||||||
AC_TRY_COMPILE([], [
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [
|
||||||
#ifndef __SSE4_2__
|
#ifndef __SSE4_2__
|
||||||
#error __SSE4_2__ not defined
|
#error __SSE4_2__ not defined
|
||||||
#endif
|
#endif
|
||||||
], [SSE4_2_TARGETED=1])
|
])], [SSE4_2_TARGETED=1])
|
||||||
|
|
||||||
# Select CRC-32C implementation.
|
# Select CRC-32C implementation.
|
||||||
#
|
#
|
||||||
@ -2010,10 +2017,10 @@ if test "$with_perl" = yes; then
|
|||||||
pgac_save_LIBS=$LIBS
|
pgac_save_LIBS=$LIBS
|
||||||
LIBS="$perl_embed_ldflags"
|
LIBS="$perl_embed_ldflags"
|
||||||
AC_MSG_CHECKING([for libperl])
|
AC_MSG_CHECKING([for libperl])
|
||||||
AC_TRY_LINK([
|
AC_LINK_IFELSE([AC_LANG_PROGRAM([
|
||||||
#include <EXTERN.h>
|
#include <EXTERN.h>
|
||||||
#include <perl.h>
|
#include <perl.h>
|
||||||
], [perl_alloc();],
|
], [perl_alloc();])],
|
||||||
[AC_MSG_RESULT(yes)],
|
[AC_MSG_RESULT(yes)],
|
||||||
[AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
AC_MSG_ERROR([libperl library is required for Perl])])
|
AC_MSG_ERROR([libperl library is required for Perl])])
|
||||||
@ -2069,7 +2076,8 @@ _CFLAGS="$CFLAGS"
|
|||||||
_LIBS="$LIBS"
|
_LIBS="$LIBS"
|
||||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
|
CFLAGS="$CFLAGS $PTHREAD_CFLAGS -DIN_CONFIGURE"
|
||||||
LIBS="$LIBS $PTHREAD_LIBS"
|
LIBS="$LIBS $PTHREAD_LIBS"
|
||||||
AC_TRY_RUN([#include "$srcdir/src/test/thread/thread_test.c"],
|
AC_RUN_IFELSE(
|
||||||
|
[AC_LANG_SOURCE([[#include "$srcdir/src/test/thread/thread_test.c"]])],
|
||||||
[AC_MSG_RESULT(yes)],
|
[AC_MSG_RESULT(yes)],
|
||||||
[AC_MSG_RESULT(no)
|
[AC_MSG_RESULT(no)
|
||||||
AC_MSG_ERROR([thread test program failed
|
AC_MSG_ERROR([thread test program failed
|
||||||
|
Loading…
x
Reference in New Issue
Block a user