PTHREAD_LIBS
PTHREAD_CC
acx_pthread_config
-LIBOBJS
HAVE_IPV6
+LIBOBJS
OSSP_UUID_LIBS
ZIC
python_additional_libs
with_system_tzdata
with_zlib
with_gnu_ld
+enable_largefile
enable_float4_byval
enable_float8_byval
-enable_largefile
'
ac_precious_vars='build_alias
host_alias
--enable-depend turn on automatic dependency tracking
--enable-cassert enable assertion checks (for debugging)
--disable-thread-safety disable thread-safety in client libraries
+ --disable-largefile omit support for large files
--disable-float4-byval disable float4 passed by value
--disable-float8-byval disable float8 passed by value
- --disable-largefile omit support for large files
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
conftest$ac_exeext conftest.$ac_ext
fi
+# Check largefile support. You might think this is a system service not a
+# compiler characteristic, but you'd be wrong. We must check this before
+# probing existence of related functions such as fseeko, since the largefile
+# defines can affect what is generated for that.
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+ enableval=$enable_largefile;
+fi
-##
-## Functions, global variables
-##
+if test "$enable_largefile" != no; then
-{ $as_echo "$as_me:$LINENO: checking for int timezone" >&5
-$as_echo_n "checking for int timezone... " >&6; }
-if test "${pgac_cv_var_int_timezone+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <time.h>
-int res;
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
main ()
{
-#ifndef __CYGWIN__
-res = timezone / 60;
-#else
-res = _timezone / 60;
-#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- pgac_cv_var_int_timezone=yes
+ } && test -s conftest.$ac_objext; then
+ break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- pgac_cv_var_int_timezone=no
-fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
-$as_echo "$pgac_cv_var_int_timezone" >&6; }
-if test x"$pgac_cv_var_int_timezone" = xyes ; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INT_TIMEZONE /**/
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_largefile_CC=' -n32'; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
fi
-{ $as_echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
-$as_echo_n "checking types of arguments for accept()... " >&6; }
- if test "${ac_cv_func_accept_return+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "${ac_cv_func_accept_arg1+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "${ac_cv_func_accept_arg2+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "${ac_cv_func_accept_arg3+set}" = set; then
+
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
$as_echo_n "(cached) " >&6
else
- for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
- for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; 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
- cat >conftest.$ac_ext <<_ACEOF
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
-#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-extern $ac_cv_func_accept_return accept ($ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *);
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
main ()
{
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_not_found=no; break 4
+ ac_cv_sys_file_offset_bits=no; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_not_found=yes
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
- done
- done
- done
- if test "$ac_not_found" = yes; then
- { { $as_echo "$as_me:$LINENO: error: could not determine argument types" >&5
-$as_echo "$as_me: error: could not determine argument types" >&2;}
- { (exit 1); exit 1; }; }
- fi
- if test "$ac_cv_func_accept_arg3" = "void"; then
- ac_cv_func_accept_arg3=int
- fi
-
-fi
-
-fi
-
-fi
fi
- { $as_echo "$as_me:$LINENO: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
-$as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
-_ACEOF
-
-cat >>confdefs.h <<_ACEOF
-#define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
-_ACEOF
-
-
-{ $as_echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
-$as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
-if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/time.h>
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
main ()
{
-struct timeval *tp;
-struct timezone *tzp;
-gettimeofday(tp,tzp);
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- pgac_cv_func_gettimeofday_1arg=no
+ ac_cv_sys_file_offset_bits=64; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- pgac_cv_func_gettimeofday_1arg=yes
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
-$as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
-if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define GETTIMEOFDAY_1ARG /**/
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
_ACEOF
-
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then
$as_echo_n "(cached) " >&6
else
+ while :; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
main ()
{
-return $ac_func ();
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=no; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
fi
-done
-
-
-# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
-# by calling it, 2009-04-02
-# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
-if test "$PORTNAME" != "solaris"; then
-for ac_func in posix_fadvise
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
- $as_echo_n "(cached) " >&6
-else
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
int
main ()
{
-return $ac_func ();
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=1; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
+
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
_ACEOF
-
+;;
+esac
+rm -rf conftest*
+ fi
fi
-done
-{ $as_echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
-$as_echo_n "checking whether posix_fadvise is declared... " >&6; }
-if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
+
+# Check for largefile support (must be after AC_SYS_LARGEFILE)
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
+$as_echo_n "checking size of off_t... " >&6; }
+if test "${ac_cv_sizeof_off_t+set}" = set; then
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <fcntl.h>
-
+$ac_includes_default
int
main ()
{
-#ifndef posix_fadvise
- (void) posix_fadvise;
-#endif
+static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)];
+test_array [0] = 0
;
return 0;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl_posix_fadvise=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_have_decl_posix_fadvise=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
-$as_echo "$ac_cv_have_decl_posix_fadvise" >&6; }
-if test "x$ac_cv_have_decl_posix_fadvise" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_POSIX_FADVISE 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_POSIX_FADVISE 0
-_ACEOF
-
-
-fi
-
-
-fi
-
-{ $as_echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
-$as_echo_n "checking whether fdatasync is declared... " >&6; }
-if test "${ac_cv_have_decl_fdatasync+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <unistd.h>
-
+$ac_includes_default
int
main ()
{
-#ifndef fdatasync
- (void) fdatasync;
-#endif
+static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
+test_array [0] = 0
;
return 0;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl_fdatasync=yes
+ ac_hi=$ac_mid; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl_fdatasync=no
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
-$as_echo "$ac_cv_have_decl_fdatasync" >&6; }
-if test "x$ac_cv_have_decl_fdatasync" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FDATASYNC 1
-_ACEOF
-
-
+ done
else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_FDATASYNC 0
-_ACEOF
-
-
-fi
-
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-{ $as_echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
-$as_echo_n "checking whether strlcat is declared... " >&6; }
-if test "${ac_cv_have_decl_strlcat+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
int
main ()
{
-#ifndef strlcat
- (void) strlcat;
-#endif
+static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)];
+test_array [0] = 0
;
return 0;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl_strlcat=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_cv_have_decl_strlcat=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
-$as_echo "$ac_cv_have_decl_strlcat" >&6; }
-if test "x$ac_cv_have_decl_strlcat" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRLCAT 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRLCAT 0
-_ACEOF
-
-
-fi
-{ $as_echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
-$as_echo_n "checking whether strlcpy is declared... " >&6; }
-if test "${ac_cv_have_decl_strlcpy+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
int
main ()
{
-#ifndef strlcpy
- (void) strlcpy;
-#endif
+static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)];
+test_array [0] = 0
;
return 0;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl_strlcpy=yes
+ ac_lo=$ac_mid; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl_strlcpy=no
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
-$as_echo "$ac_cv_have_decl_strlcpy" >&6; }
-if test "x$ac_cv_have_decl_strlcpy" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRLCPY 1
-_ACEOF
-
-
+ done
else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_STRLCPY 0
-_ACEOF
-
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_lo= ac_hi=
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
-# This is probably only present on Darwin, but may as well check always
-{ $as_echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
-$as_echo_n "checking whether F_FULLFSYNC is declared... " >&6; }
-if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <fcntl.h>
-
+$ac_includes_default
int
main ()
{
-#ifndef F_FULLFSYNC
- (void) F_FULLFSYNC;
-#endif
+static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
+test_array [0] = 0
;
return 0;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl_F_FULLFSYNC=yes
+ ac_hi=$ac_mid
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl_F_FULLFSYNC=no
+ ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
-$as_echo "$ac_cv_have_decl_F_FULLFSYNC" >&6; }
-if test "x$ac_cv_have_decl_F_FULLFSYNC" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_F_FULLFSYNC 1
-_ACEOF
-
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_F_FULLFSYNC 0
-_ACEOF
-
-
-fi
-
-
-
-HAVE_IPV6=no
-{ $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
-$as_echo_n "checking for struct sockaddr_in6... " >&6; }
-if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
- $as_echo_n "(cached) " >&6
+done
+case $ac_lo in
+?*) ac_cv_sizeof_off_t=$ac_lo;;
+'') if test "$ac_cv_type_off_t" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (off_t)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_off_t=0
+ fi ;;
+esac
else
- ac_cv_type_struct_sockaddr_in6=no
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#include <netinet/in.h>
-
+static long int longval () { return (long int) (sizeof (off_t)); }
+static unsigned long int ulongval () { return (long int) (sizeof (off_t)); }
+#include <stdio.h>
+#include <stdlib.h>
int
main ()
{
-if (sizeof (struct sockaddr_in6))
- return 0;
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (off_t))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (off_t))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (off_t))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <netinet/in.h>
-
-int
-main ()
-{
-if (sizeof ((struct sockaddr_in6)))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_try") 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_off_t=`cat conftest.val`
else
- $as_echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_struct_sockaddr_in6=yes
+( exit $ac_status )
+if test "$ac_cv_type_off_t" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (off_t)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_off_t=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
+$as_echo "$ac_cv_sizeof_off_t" >&6; }
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-fi
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
+_ACEOF
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
-$as_echo "$ac_cv_type_struct_sockaddr_in6" >&6; }
-if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_IPV6 1
-_ACEOF
- HAVE_IPV6=yes
+# If we don't have largefile support, can't handle segsize >= 2GB.
+if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
+ { { $as_echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
+$as_echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
+ { (exit 1); exit 1; }; }
fi
+##
+## Functions, global variables
+##
-{ $as_echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
-$as_echo_n "checking for PS_STRINGS... " >&6; }
-if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for int timezone" >&5
+$as_echo_n "checking for int timezone... " >&6; }
+if test "${pgac_cv_var_int_timezone+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <machine/vmparam.h>
-#include <sys/exec.h>
-
+#include <time.h>
+int res;
int
main ()
{
-PS_STRINGS->ps_nargvstr = 1;
-PS_STRINGS->ps_argvstr = "foo";
+#ifndef __CYGWIN__
+res = timezone / 60;
+#else
+res = _timezone / 60;
+#endif
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- pgac_cv_var_PS_STRINGS=yes
+ pgac_cv_var_int_timezone=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- pgac_cv_var_PS_STRINGS=no
+ pgac_cv_var_int_timezone=no
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
-$as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
-if test "$pgac_cv_var_PS_STRINGS" = yes ; then
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_timezone" >&5
+$as_echo "$pgac_cv_var_int_timezone" >&6; }
+if test x"$pgac_cv_var_int_timezone" = xyes ; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_PS_STRINGS /**/
+#define HAVE_INT_TIMEZONE /**/
_ACEOF
fi
-
-
-# We use our snprintf.c emulation if either snprintf() or vsnprintf()
-# is missing. Yes, there are machines that have only one. We may
-# also decide to use snprintf.c if snprintf() is present but does not
-# have all the features we need --- see below.
-
-if test "$PORTNAME" = "win32"; then
- # Win32 gets snprintf.c built unconditionally.
- #
- # To properly translate all NLS languages strings, we must support the
- # *printf() %$ format, which allows *printf() arguments to be selected
- # by position in the translated string.
- #
- # libintl versions < 0.13 use the native *printf() functions, and Win32
- # *printf() doesn't understand %$, so we must use our /port versions,
- # which do understand %$. libintl versions >= 0.13 include their own
- # *printf versions on Win32. The libintl 0.13 release note text is:
- #
- # C format strings with positions, as they arise when a translator
- # needs to reorder a sentence, are now supported on all platforms.
- # On those few platforms (NetBSD and Woe32) for which the native
- # printf()/fprintf()/... functions don't support such format
- # strings, replacements are provided through <libintl.h>.
- #
- # We could use libintl >= 0.13's *printf() if we were sure that we had
- # a litint >= 0.13 at runtime, but seeing that there is no clean way
- # to guarantee that, it is best to just use our own, so we are sure to
- # get %$ support. In include/port.h we disable the *printf() macros
- # that might have been defined by libintl.
- #
- # We do this unconditionally whether NLS is used or not so we are sure
- # that all Win32 libraries and binaries behave the same.
- pgac_need_repl_snprintf=yes
+{ $as_echo "$as_me:$LINENO: checking types of arguments for accept()" >&5
+$as_echo_n "checking types of arguments for accept()... " >&6; }
+ if test "${ac_cv_func_accept_return+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- pgac_need_repl_snprintf=no
-
-for ac_func in snprintf
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ if test "${ac_cv_func_accept_arg1+set}" = set; then
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ if test "${ac_cv_func_accept_arg2+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "${ac_cv_func_accept_arg3+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ for ac_cv_func_accept_return in 'int' 'unsigned int PASCAL'; do
+ for ac_cv_func_accept_arg1 in 'int' 'unsigned int'; 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
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
#endif
-
+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 $ac_func ();
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
+ } && test -s conftest.$ac_objext; then
+ ac_not_found=no; break 4
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
+ ac_not_found=yes
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+ done
+ done
+ done
+ if test "$ac_not_found" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: could not determine argument types" >&5
+$as_echo "$as_me: error: could not determine argument types" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test "$ac_cv_func_accept_arg3" = "void"; then
+ ac_cv_func_accept_arg3=int
+ fi
+
fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-else
- pgac_need_repl_snprintf=yes
fi
-done
+fi
-for ac_func in vsnprintf
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+fi
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&5
+$as_echo "$ac_cv_func_accept_return, $ac_cv_func_accept_arg1, $ac_cv_func_accept_arg2, $ac_cv_func_accept_arg3 *" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define ACCEPT_TYPE_RETURN $ac_cv_func_accept_return
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define ACCEPT_TYPE_ARG1 $ac_cv_func_accept_arg1
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define ACCEPT_TYPE_ARG2 $ac_cv_func_accept_arg2
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define ACCEPT_TYPE_ARG3 $ac_cv_func_accept_arg3
+_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking whether gettimeofday takes only one argument" >&5
+$as_echo_n "checking whether gettimeofday takes only one argument... " >&6; }
+if test "${pgac_cv_func_gettimeofday_1arg+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+#include <sys/time.h>
+int
+main ()
+{
+struct timeval *tp;
+struct timezone *tzp;
+gettimeofday(tp,tzp);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ pgac_cv_func_gettimeofday_1arg=no
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ pgac_cv_func_gettimeofday_1arg=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_func_gettimeofday_1arg" >&5
+$as_echo "$pgac_cv_func_gettimeofday_1arg" >&6; }
+if test x"$pgac_cv_func_gettimeofday_1arg" = xyes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define GETTIMEOFDAY_1ARG /**/
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in cbrt dlopen fcvt fdatasync getifaddrs getpeereid getpeerucred getrlimit memmove poll pstat readlink setproctitle setsid sigprocmask symlink sysconf towlower utime utimes waitpid wcstombs
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
#define $ac_func innocuous_$ac_func
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-else
- pgac_need_repl_snprintf=yes
fi
done
-fi
-
-# Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
-# include/c.h will provide declarations. Note this is a separate test
-# from whether the functions exist in the C library --- there are
-# systems that have the functions but don't bother to declare them :-(
-{ $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
-$as_echo_n "checking whether snprintf is declared... " >&6; }
-if test "${ac_cv_have_decl_snprintf+set}" = set; then
+for ac_func in fseeko
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-#ifndef snprintf
- (void) snprintf;
-#endif
-
+return $ac_func ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_have_decl_snprintf=yes
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl_snprintf=no
+ eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
-$as_echo "$ac_cv_have_decl_snprintf" >&6; }
-if test "x$ac_cv_have_decl_snprintf" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SNPRINTF 1
-_ACEOF
-
-
-else
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SNPRINTF 0
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
fi
-{ $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
-$as_echo_n "checking whether vsnprintf is declared... " >&6; }
-if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
+done
+
+
+case $host_os in
+ # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
+ # Mingw uses macros to access Win32 API calls
+ bsdi*|netbsd*|mingw*)
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_FSEEKO 1
+_ACEOF
+
+ ac_cv_func_fseeko=yes;;
+ *)
+ { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_source+set}" = set; then
$as_echo_n "(cached) " >&6
else
+ while :; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
int
main ()
{
-#ifndef vsnprintf
- (void) vsnprintf;
-#endif
-
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_have_decl_vsnprintf=yes
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_sys_largefile_source=no; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl_vsnprintf=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
-$as_echo "$ac_cv_have_decl_vsnprintf" >&6; }
-if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_VSNPRINTF 1
-_ACEOF
-
-else
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_VSNPRINTF 0
-_ACEOF
-
-
-fi
-
-
-
-
-{ $as_echo "$as_me:$LINENO: checking for isinf" >&5
-$as_echo_n "checking for isinf... " >&6; }
-if test "${ac_cv_func_isinf+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-#include <math.h>
-double glob_double;
-
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
int
main ()
{
-return isinf(glob_double) ? 0 : 1;
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_func_isinf=yes
+ ac_cv_sys_largefile_source=1; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_func_isinf=no
+
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
-$as_echo "$ac_cv_func_isinf" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
+$as_echo "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -rf conftest*
-if test $ac_cv_func_isinf = yes ; then
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_ISINF 1
+#define HAVE_FSEEKO 1
_ACEOF
-else
- case " $LIBOBJS " in
- *" isinf.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
- ;;
+fi
+;;
esac
- # Look for a way to implement a substitute for isinf()
-
-
-
+# posix_fadvise() is a no-op on Solaris, so don't incur function overhead
+# by calling it, 2009-04-02
+# http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/posix_fadvise.c
+if test "$PORTNAME" != "solaris"; then
-for ac_func in fpclass fp_class fp_class_d class
+for ac_func in posix_fadvise
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
- break
-fi
-done
fi
+done
-# Some versions of libedit contain strlcpy(); so disregard that library while
-# checking for these standard libc functions.
-pgac_save_LIBS="$LIBS"
-LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-for ac_func in crypt erand48 getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+{ $as_echo "$as_me:$LINENO: checking whether posix_fadvise is declared" >&5
+$as_echo_n "checking whether posix_fadvise is declared... " >&6; }
+if test "${ac_cv_have_decl_posix_fadvise+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+#include <fcntl.h>
int
main ()
{
-return $ac_func ();
+#ifndef posix_fadvise
+ (void) posix_fadvise;
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_posix_fadvise=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
+ ac_cv_have_decl_posix_fadvise=no
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case " $LIBOBJS " in
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
- ;;
-esac
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_posix_fadvise" >&5
+$as_echo "$ac_cv_have_decl_posix_fadvise" >&6; }
+if test "x$ac_cv_have_decl_posix_fadvise" = x""yes; then
-fi
-done
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_POSIX_FADVISE 1
+_ACEOF
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_POSIX_FADVISE 0
+_ACEOF
-case $host_os in
- # Windows uses a specialised env handler
- mingw*)
+fi
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_UNSETENV 1
-_ACEOF
- ac_cv_func_unsetenv=yes;;
- *)
+fi
-for ac_func in unsetenv
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+{ $as_echo "$as_me:$LINENO: checking whether fdatasync is declared" >&5
+$as_echo_n "checking whether fdatasync is declared... " >&6; }
+if test "${ac_cv_have_decl_fdatasync+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+#include <unistd.h>
int
main ()
{
-return $ac_func ();
+#ifndef fdatasync
+ (void) fdatasync;
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_fdatasync=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
+ ac_cv_have_decl_fdatasync=no
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case " $LIBOBJS " in
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
- ;;
-esac
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fdatasync" >&5
+$as_echo "$ac_cv_have_decl_fdatasync" >&6; }
+if test "x$ac_cv_have_decl_fdatasync" = x""yes; then
-fi
-done
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FDATASYNC 1
+_ACEOF
- ;;
-esac
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FDATASYNC 0
+_ACEOF
-LIBS="$pgac_save_LIBS"
+fi
-# System's version of getaddrinfo(), if any, may be used only if we found
-# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
-# (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
-# versions of getaddrinfo don't follow normal C call protocol. This is OK
-# because we want to use our own getaddrinfo.c on Windows anyway.)
-if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
-for ac_func in getaddrinfo
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+{ $as_echo "$as_me:$LINENO: checking whether strlcat is declared" >&5
+$as_echo_n "checking whether strlcat is declared... " >&6; }
+if test "${ac_cv_have_decl_strlcat+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+$ac_includes_default
int
main ()
{
-return $ac_func ();
+#ifndef strlcat
+ (void) strlcat;
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_strlcat=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
+ ac_cv_have_decl_strlcat=no
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
-
-else
- case " $LIBOBJS " in
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
- ;;
-esac
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcat" >&5
+$as_echo "$ac_cv_have_decl_strlcat" >&6; }
+if test "x$ac_cv_have_decl_strlcat" = x""yes; then
-fi
-done
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRLCAT 1
+_ACEOF
else
- case " $LIBOBJS " in
- *" getaddrinfo.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
- ;;
-esac
-
-fi
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRLCAT 0
+_ACEOF
-# Similarly, use system's getopt_long() only if system provides struct option.
-if test x"$ac_cv_type_struct_option" = xyes ; then
-for ac_func in getopt_long
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+fi
+{ $as_echo "$as_me:$LINENO: checking whether strlcpy is declared" >&5
+$as_echo_n "checking whether strlcpy is declared... " >&6; }
+if test "${ac_cv_have_decl_strlcpy+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
-
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
-
+$ac_includes_default
int
main ()
{
-return $ac_func ();
+#ifndef strlcpy
+ (void) strlcpy;
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_strlcpy=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
+ ac_cv_have_decl_strlcpy=no
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strlcpy" >&5
+$as_echo "$ac_cv_have_decl_strlcpy" >&6; }
+if test "x$ac_cv_have_decl_strlcpy" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRLCPY 1
_ACEOF
+
else
- case " $LIBOBJS " in
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
- ;;
-esac
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRLCPY 0
+_ACEOF
+
fi
-done
+# This is probably only present on Darwin, but may as well check always
+{ $as_echo "$as_me:$LINENO: checking whether F_FULLFSYNC is declared" >&5
+$as_echo_n "checking whether F_FULLFSYNC is declared... " >&6; }
+if test "${ac_cv_have_decl_F_FULLFSYNC+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- case " $LIBOBJS " in
- *" getopt_long.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
- ;;
-esac
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <fcntl.h>
-fi
+int
+main ()
+{
+#ifndef F_FULLFSYNC
+ (void) F_FULLFSYNC;
+#endif
-# Solaris' getopt() doesn't do what we want for long options, so always use
-# our version on that platform.
-if test "$PORTNAME" = "solaris"; then
- case " $LIBOBJS " in
- *" getopt.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
- ;;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_F_FULLFSYNC=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_have_decl_F_FULLFSYNC=no
fi
-# Cygwin's erand48() is broken (always returns zero) in some releases,
-# so force use of ours.
-if test "$PORTNAME" = "cygwin"; then
- case " $LIBOBJS " in
- *" erand48.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS erand48.$ac_objext"
- ;;
-esac
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_FULLFSYNC" >&5
+$as_echo "$ac_cv_have_decl_F_FULLFSYNC" >&6; }
+if test "x$ac_cv_have_decl_F_FULLFSYNC" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_F_FULLFSYNC 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_F_FULLFSYNC 0
+_ACEOF
+
fi
-# Win32 support
-if test "$PORTNAME" = "win32"; then
-for ac_func in gettimeofday
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+
+HAVE_IPV6=no
+{ $as_echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5
+$as_echo_n "checking for struct sockaddr_in6... " >&6; }
+if test "${ac_cv_type_struct_sockaddr_in6+set}" = set; then
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_struct_sockaddr_in6=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $ac_func innocuous_$ac_func
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $ac_func (); below.
- Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
- <limits.h> exists even on freestanding compilers. */
-
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
-
-#undef $ac_func
+$ac_includes_default
+#include <netinet/in.h>
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char $ac_func ();
-/* The GNU C library defines this for functions which it implements
- to always fail with ENOSYS. Some functions are actually named
- something starting with __ and the normal name is an alias. */
-#if defined __stub_$ac_func || defined __stub___$ac_func
-choke me
-#endif
+int
+main ()
+{
+if (sizeof (struct sockaddr_in6))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <netinet/in.h>
int
main ()
{
-return $ac_func ();
+if (sizeof ((struct sockaddr_in6)))
+ return 0;
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- eval "$as_ac_var=yes"
+ } && test -s conftest.$ac_objext; then
+ :
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- eval "$as_ac_var=no"
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+ ac_cv_type_struct_sockaddr_in6=yes
fi
-ac_res=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-as_val=`eval 'as_val=${'$as_ac_var'}
- $as_echo "$as_val"'`
- if test "x$as_val" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
-_ACEOF
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
- case " $LIBOBJS " in
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
- ;;
-esac
-
-fi
-done
-
-
-case " $LIBOBJS " in
- *" kill.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS kill.$ac_objext"
- ;;
-esac
-
-case " $LIBOBJS " in
- *" open.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS open.$ac_objext"
- ;;
-esac
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-case " $LIBOBJS " in
- *" win32env.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
- ;;
-esac
-case " $LIBOBJS " in
- *" win32error.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
- ;;
-esac
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_struct_sockaddr_in6" >&5
+$as_echo "$ac_cv_type_struct_sockaddr_in6" >&6; }
+if test "x$ac_cv_type_struct_sockaddr_in6" = x""yes; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYMLINK 1
+#define HAVE_IPV6 1
_ACEOF
+ HAVE_IPV6=yes
fi
-if test "$with_readline" = yes; then
- { $as_echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
-$as_echo_n "checking for rl_completion_append_character... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking for PS_STRINGS" >&5
+$as_echo_n "checking for PS_STRINGS... " >&6; }
+if test "${pgac_cv_var_PS_STRINGS+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_READLINE_READLINE_H
-# include <readline/readline.h>
-#elif defined(HAVE_READLINE_H)
-# include <readline.h>
-#endif
+#include <machine/vmparam.h>
+#include <sys/exec.h>
int
main ()
{
-rl_completion_append_character = 'x';
+PS_STRINGS->ps_nargvstr = 1;
+PS_STRINGS->ps_argvstr = "foo";
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- { $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
-_ACEOF
-
+ pgac_cv_var_PS_STRINGS=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ pgac_cv_var_PS_STRINGS=no
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_var_PS_STRINGS" >&5
+$as_echo "$pgac_cv_var_PS_STRINGS" >&6; }
+if test "$pgac_cv_var_PS_STRINGS" = yes ; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PS_STRINGS /**/
+_ACEOF
-for ac_func in rl_completion_matches rl_filename_completion_function
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+fi
+
+
+# We use our snprintf.c emulation if either snprintf() or vsnprintf()
+# is missing. Yes, there are machines that have only one. We may
+# also decide to use snprintf.c if snprintf() is present but does not
+# have all the features we need --- see below.
+
+if test "$PORTNAME" = "win32"; then
+ # Win32 gets snprintf.c built unconditionally.
+ #
+ # To properly translate all NLS languages strings, we must support the
+ # *printf() %$ format, which allows *printf() arguments to be selected
+ # by position in the translated string.
+ #
+ # libintl versions < 0.13 use the native *printf() functions, and Win32
+ # *printf() doesn't understand %$, so we must use our /port versions,
+ # which do understand %$. libintl versions >= 0.13 include their own
+ # *printf versions on Win32. The libintl 0.13 release note text is:
+ #
+ # C format strings with positions, as they arise when a translator
+ # needs to reorder a sentence, are now supported on all platforms.
+ # On those few platforms (NetBSD and Woe32) for which the native
+ # printf()/fprintf()/... functions don't support such format
+ # strings, replacements are provided through <libintl.h>.
+ #
+ # We could use libintl >= 0.13's *printf() if we were sure that we had
+ # a litint >= 0.13 at runtime, but seeing that there is no clean way
+ # to guarantee that, it is best to just use our own, so we are sure to
+ # get %$ support. In include/port.h we disable the *printf() macros
+ # that might have been defined by libintl.
+ #
+ # We do this unconditionally whether NLS is used or not so we are sure
+ # that all Win32 libraries and binaries behave the same.
+ pgac_need_repl_snprintf=yes
+else
+ pgac_need_repl_snprintf=no
+
+for ac_func in snprintf
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
$as_echo_n "checking for $ac_func... " >&6; }
if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
+else
+ pgac_need_repl_snprintf=yes
fi
done
-
-for ac_func in append_history history_truncate_file
+for ac_func in vsnprintf
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
+else
+ pgac_need_repl_snprintf=yes
fi
done
fi
-{ $as_echo "$as_me:$LINENO: checking for sigsetjmp" >&5
-$as_echo_n "checking for sigsetjmp... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+# Check whether <stdio.h> declares snprintf() and vsnprintf(); if not,
+# include/c.h will provide declarations. Note this is a separate test
+# from whether the functions exist in the C library --- there are
+# systems that have the functions but don't bother to declare them :-(
+
+{ $as_echo "$as_me:$LINENO: checking whether snprintf is declared" >&5
+$as_echo_n "checking whether snprintf is declared... " >&6; }
+if test "${ac_cv_have_decl_snprintf+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <setjmp.h>
+$ac_includes_default
int
main ()
{
-sigjmp_buf x; sigsetjmp(x, 1);
+#ifndef snprintf
+ (void) snprintf;
+#endif
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SIGSETJMP 1
-_ACEOF
-
-{ $as_echo "$as_me:$LINENO: result: yes" >&5
-$as_echo "yes" >&6; }
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_snprintf=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
+ ac_cv_have_decl_snprintf=no
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_snprintf" >&5
+$as_echo "$ac_cv_have_decl_snprintf" >&6; }
+if test "x$ac_cv_have_decl_snprintf" = x""yes; then
-{ $as_echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
-$as_echo_n "checking whether sys_siglist is declared... " >&6; }
-if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF 0
+_ACEOF
+
+
+fi
+{ $as_echo "$as_me:$LINENO: checking whether vsnprintf is declared" >&5
+$as_echo_n "checking whether vsnprintf is declared... " >&6; }
+if test "${ac_cv_have_decl_vsnprintf+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <signal.h>
-/* NetBSD declares sys_siglist in unistd.h. */
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
-
-
+$ac_includes_default
int
main ()
{
-#ifndef sys_siglist
- (void) sys_siglist;
+#ifndef vsnprintf
+ (void) vsnprintf;
#endif
;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_have_decl_sys_siglist=yes
+ ac_cv_have_decl_vsnprintf=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_have_decl_sys_siglist=no
+ ac_cv_have_decl_vsnprintf=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
-$as_echo "$ac_cv_have_decl_sys_siglist" >&6; }
-if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_vsnprintf" >&5
+$as_echo "$ac_cv_have_decl_vsnprintf" >&6; }
+if test "x$ac_cv_have_decl_vsnprintf" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SYS_SIGLIST 1
+#define HAVE_DECL_VSNPRINTF 1
_ACEOF
else
cat >>confdefs.h <<_ACEOF
-#define HAVE_DECL_SYS_SIGLIST 0
+#define HAVE_DECL_VSNPRINTF 0
_ACEOF
-{ $as_echo "$as_me:$LINENO: checking for syslog" >&5
-$as_echo_n "checking for syslog... " >&6; }
-if test "${ac_cv_func_syslog+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for isinf" >&5
+$as_echo_n "checking for isinf... " >&6; }
+if test "${ac_cv_func_isinf+set}" = set; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-/* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
+
+#include <math.h>
+double glob_double;
+
+int
+main ()
+{
+return isinf(glob_double) ? 0 : 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_isinf=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_isinf=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
+$as_echo "$ac_cv_func_isinf" >&6; }
+
+if test $ac_cv_func_isinf = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF 1
+_ACEOF
+
+else
+ case " $LIBOBJS " in
+ *" isinf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS isinf.$ac_objext"
+ ;;
+esac
+
+ # Look for a way to implement a substitute for isinf()
+
+
+
+
+for ac_func in fpclass fp_class fp_class_d class
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define syslog innocuous_syslog
+#define $ac_func innocuous_$ac_func
/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char syslog (); below.
+ which can conflict with char $ac_func (); below.
Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
<limits.h> exists even on freestanding compilers. */
# include <assert.h>
#endif
-#undef syslog
+#undef $ac_func
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
#ifdef __cplusplus
extern "C"
#endif
-char syslog ();
+char $ac_func ();
/* The GNU C library defines this for functions which it implements
to always fail with ENOSYS. Some functions are actually named
something starting with __ and the normal name is an alias. */
-#if defined __stub_syslog || defined __stub___syslog
+#if defined __stub_$ac_func || defined __stub___$ac_func
choke me
#endif
int
main ()
{
-return syslog ();
+return $ac_func ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_func_syslog=yes
+ eval "$as_ac_var=yes"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_func_syslog=no
+ eval "$as_ac_var=no"
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
-$as_echo "$ac_cv_func_syslog" >&6; }
-if test "x$ac_cv_func_syslog" = x""yes; then
- if test "${ac_cv_header_syslog_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
-$as_echo_n "checking for syslog.h... " >&6; }
-if test "${ac_cv_header_syslog_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
-$as_echo "$ac_cv_header_syslog_h" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking syslog.h usability" >&5
-$as_echo_n "checking syslog.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#include <syslog.h>
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ break
+fi
+done
- ac_header_compiler=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+# Some versions of libedit contain strlcpy(); so disregard that library while
+# checking for these standard libc functions.
+pgac_save_LIBS="$LIBS"
+LIBS=`echo "$LIBS" | sed -e 's/-ledit//g' -e 's/-lreadline//g'`
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking syslog.h presence" >&5
-$as_echo_n "checking syslog.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <syslog.h>
-_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: syslog.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: syslog.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: syslog.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: syslog.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## ---------------------------------------- ##
-## Report this to pgsql-bugs@postgresql.org ##
-## ---------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
-$as_echo_n "checking for syslog.h... " >&6; }
-if test "${ac_cv_header_syslog_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_syslog_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
-$as_echo "$ac_cv_header_syslog_h" >&6; }
-fi
-if test "x$ac_cv_header_syslog_h" = x""yes; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_SYSLOG 1
-_ACEOF
-fi
-fi
-{ $as_echo "$as_me:$LINENO: checking for opterr" >&5
-$as_echo_n "checking for opterr... " >&6; }
-if test "${pgac_cv_var_int_opterr+set}" = set; then
+
+
+
+
+for ac_func in crypt erand48 getopt getrusage inet_aton random rint srandom strdup strerror strlcat strlcpy strtol strtoul
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <unistd.h>
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-extern int opterr; opterr = 1;
+return $ac_func ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- pgac_cv_var_int_opterr=yes
+ eval "$as_ac_var=yes"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- pgac_cv_var_int_opterr=no
+ eval "$as_ac_var=no"
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_opterr" >&5
-$as_echo "$pgac_cv_var_int_opterr" >&6; }
-if test x"$pgac_cv_var_int_opterr" = x"yes"; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
+fi
+done
+
+
+
+case $host_os in
+
+ # Windows uses a specialised env handler
+ mingw*)
cat >>confdefs.h <<\_ACEOF
-#define HAVE_INT_OPTERR 1
+#define HAVE_UNSETENV 1
_ACEOF
-fi
+ ac_cv_func_unsetenv=yes;;
+ *)
-{ $as_echo "$as_me:$LINENO: checking for optreset" >&5
-$as_echo_n "checking for optreset... " >&6; }
-if test "${pgac_cv_var_int_optreset+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <unistd.h>
-int
-main ()
-{
-extern int optreset; optreset = 1;
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- pgac_cv_var_int_optreset=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- pgac_cv_var_int_optreset=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
-$as_echo "$pgac_cv_var_int_optreset" >&6; }
-if test x"$pgac_cv_var_int_optreset" = x"yes"; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_INT_OPTRESET 1
-_ACEOF
-
-fi
-
-
-
-for ac_func in strtoll strtoq
-do
-as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
-{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
-$as_echo_n "checking for $ac_func... " >&6; }
-if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+for ac_func in unsetenv
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
- break
+
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
fi
done
+ ;;
+esac
-for ac_func in strtoull strtouq
+
+LIBS="$pgac_save_LIBS"
+
+# System's version of getaddrinfo(), if any, may be used only if we found
+# a definition for struct addrinfo; see notes in src/include/getaddrinfo.h.
+# (Note: the AC_REPLACE_FUNCS probe fails on Windows, where the available
+# versions of getaddrinfo don't follow normal C call protocol. This is OK
+# because we want to use our own getaddrinfo.c on Windows anyway.)
+if test x"$ac_cv_type_struct_addrinfo" = xyes ; then
+
+for ac_func in getaddrinfo
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
- break
+
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
fi
done
-# Check for one of atexit() or on_exit()
+else
+ case " $LIBOBJS " in
+ *" getaddrinfo.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
+ ;;
+esac
-for ac_func in atexit
+fi
+
+# Similarly, use system's getopt_long() only if system provides struct option.
+if test x"$ac_cv_type_struct_option" = xyes ; then
+
+for ac_func in getopt_long
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
_ACEOF
else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
+fi
+done
+
+
+else
+ case " $LIBOBJS " in
+ *" getopt_long.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext"
+ ;;
+esac
-for ac_func in on_exit
+fi
+
+# Solaris' getopt() doesn't do what we want for long options, so always use
+# our version on that platform.
+if test "$PORTNAME" = "solaris"; then
+ case " $LIBOBJS " in
+ *" getopt.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getopt.$ac_objext"
+ ;;
+esac
+
+fi
+
+# Cygwin's erand48() is broken (always returns zero) in some releases,
+# so force use of ours.
+if test "$PORTNAME" = "cygwin"; then
+ case " $LIBOBJS " in
+ *" erand48.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS erand48.$ac_objext"
+ ;;
+esac
+
+fi
+
+# Win32 support
+if test "$PORTNAME" = "win32"; then
+
+for ac_func in gettimeofday
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
_ACEOF
else
- { { $as_echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
-$as_echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
- { (exit 1); exit 1; }; }
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
fi
done
+
+case " $LIBOBJS " in
+ *" kill.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS kill.$ac_objext"
+ ;;
+esac
+
+case " $LIBOBJS " in
+ *" open.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS open.$ac_objext"
+ ;;
+esac
+
+case " $LIBOBJS " in
+ *" win32env.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS win32env.$ac_objext"
+ ;;
+esac
+
+case " $LIBOBJS " in
+ *" win32error.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS win32error.$ac_objext"
+ ;;
+esac
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYMLINK 1
+_ACEOF
+
fi
-done
+if test "$with_readline" = yes; then
+ { $as_echo "$as_me:$LINENO: checking for rl_completion_append_character" >&5
+$as_echo_n "checking for rl_completion_append_character... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+#ifdef HAVE_READLINE_READLINE_H
+# include <readline/readline.h>
+#elif defined(HAVE_READLINE_H)
+# include <readline.h>
+#endif
+
+int
+main ()
+{
+rl_completion_append_character = 'x';
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
+_ACEOF
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
-for ac_func in fseeko
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+
+for ac_func in rl_completion_matches rl_filename_completion_function
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-else
- case " $LIBOBJS " in
- *" $ac_func.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
- ;;
-esac
-
fi
done
-case $host_os in
- # BSD/OS & NetBSD use a custom fseeko/ftello built on fsetpos/fgetpos
- # Mingw uses macros to access Win32 API calls
- bsdi*|netbsd*|mingw*)
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSEEKO 1
-_ACEOF
-
- ac_cv_func_fseeko=yes;;
- *)
- { $as_echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5
-$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
-if test "${ac_cv_sys_largefile_source+set}" = set; then
+for ac_func in append_history history_truncate_file
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
- while :; do
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+return $ac_func ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_sys_largefile_source=no; break
+ eval "$as_ac_var=yes"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
+ eval "$as_ac_var=no"
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
- cat >conftest.$ac_ext <<_ACEOF
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for sigsetjmp" >&5
+$as_echo_n "checking for sigsetjmp... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#define _LARGEFILE_SOURCE 1
-#include <sys/types.h> /* for off_t */
- #include <stdio.h>
+#include <setjmp.h>
int
main ()
{
-int (*fp) (FILE *, off_t, int) = fseeko;
- return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+sigjmp_buf x; sigsetjmp(x, 1);
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_sys_largefile_source=1; break
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SIGSETJMP 1
+_ACEOF
+
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
- ac_cv_sys_largefile_source=unknown
- break
-done
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5
-$as_echo "$ac_cv_sys_largefile_source" >&6; }
-case $ac_cv_sys_largefile_source in #(
- no | unknown) ;;
- *)
-cat >>confdefs.h <<_ACEOF
-#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+
+{ $as_echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
+$as_echo_n "checking whether sys_siglist is declared... " >&6; }
+if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
-;;
-esac
-rm -rf conftest*
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <signal.h>
+/* NetBSD declares sys_siglist in unistd.h. */
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
-# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
-# in glibc 2.1.3, but that breaks too many other things.
-# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
-if test $ac_cv_sys_largefile_source != unknown; then
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_FSEEKO 1
+int
+main ()
+{
+#ifndef sys_siglist
+ (void) sys_siglist;
+#endif
+
+ ;
+ return 0;
+}
_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_sys_siglist=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_have_decl_sys_siglist=no
fi
-;;
-esac
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
+$as_echo "$ac_cv_have_decl_sys_siglist" >&6; }
+if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then
-#
-# Pthreads
-#
-# For each platform, we need to know about any special compile and link
-# libraries, and whether the normal C function names are thread-safe.
-# See the comment at the top of src/port/thread.c for more information.
-# WIN32 doesn't need the pthread tests; it always uses threads
-if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SYS_SIGLIST 1
+_ACEOF
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SYS_SIGLIST 0
+_ACEOF
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-acx_pthread_ok=no
+fi
-# We used to check for pthread.h first, but this fails if pthread.h
-# requires special compiler flags (e.g. on True64 or Sequent).
-# It gets checked for in the link test anyway.
-# First of all, check if the user has set any of the PTHREAD_LIBS,
-# etcetera environment variables, and if threads linking works using
-# them:
-if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
-$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
- cat >conftest.$ac_ext <<_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking for syslog" >&5
+$as_echo_n "checking for syslog... " >&6; }
+if test "${ac_cv_func_syslog+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define syslog to an innocuous variant, in case <limits.h> declares syslog.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define syslog innocuous_syslog
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char syslog (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef syslog
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
#ifdef __cplusplus
extern "C"
#endif
-char pthread_join ();
+char syslog ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_syslog || defined __stub___syslog
+choke me
+#endif
+
int
main ()
{
-return pthread_join ();
+return syslog ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- acx_pthread_ok=yes
+ ac_cv_func_syslog=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
+ ac_cv_func_syslog=no
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
- { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
- if test x"$acx_pthread_ok" = xno; then
- PTHREAD_LIBS=""
- PTHREAD_CFLAGS=""
- fi
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
fi
-
-# We must check for the threads library under a number of different
-# names; the ordering is very important because some systems
-# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
-# libraries is broken (non-POSIX).
-
-# Create a list of thread flags to try. Items starting with a "-" are
-# C compiler flags, and other items are library names, except for "none"
-# which indicates that we try without any flags at all, and "pthread-config"
-# which is a program returning the flags for the Pth emulation library.
-
-acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
-
-# The ordering *is* (sometimes) important. Some notes on the
-# individual items follow:
-
-# pthreads: AIX (must check this before -lpthread)
-# none: in case threads are in libc; should be tried before -Kthread and
-# other compiler flags to prevent continual compiler warnings
-# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
-# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
-# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
-# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
-# -pthreads: Solaris/gcc
-# -mthreads: Mingw32/gcc, Lynx/gcc
-# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
-# doesn't hurt to check since this sometimes defines pthreads too;
-# also defines -D_REENTRANT)
-# pthread: Linux, etcetera
-# --thread-safe: KAI C++
-# pthread-config: use pthread-config program (for GNU Pth library)
-
-case "${host_cpu}-${host_os}" in
- *solaris*)
-
- # On Solaris (at least, for some versions), libc contains stubbed
- # (non-functional) versions of the pthreads routines, so link-based
- # tests will erroneously succeed. (We need to link with -pthread or
- # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
- # a function called by this macro, so we could check for that, but
- # who knows whether they'll stub that too in a future libc.) So,
- # we'll just look for -pthreads and -lpthread first:
-
- acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
- ;;
-esac
-
-if test x"$acx_pthread_ok" = xno; then
-for flag in $acx_pthread_flags; do
-
- tryPTHREAD_CFLAGS=""
- tryPTHREAD_LIBS=""
- case $flag in
- none)
- { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
-$as_echo_n "checking whether pthreads work without any flags... " >&6; }
- ;;
-
- -*)
- { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
-$as_echo_n "checking whether pthreads work with $flag... " >&6; }
- tryPTHREAD_CFLAGS="$flag"
- ;;
-
- pthread-config)
- # skip this if we already have flags defined, for PostgreSQL
- if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
- # Extract the first word of "pthread-config", so it can be a program name with args.
-set dummy pthread-config; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_syslog" >&5
+$as_echo "$ac_cv_func_syslog" >&6; }
+if test "x$ac_cv_func_syslog" = x""yes; then
+ if test "${ac_cv_header_syslog_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
+$as_echo_n "checking for syslog.h... " >&6; }
+if test "${ac_cv_header_syslog_h+set}" = set; then
$as_echo_n "(cached) " >&6
-else
- if test -n "$acx_pthread_config"; then
- ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_acx_pthread_config="yes"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
fi
-fi
-acx_pthread_config=$ac_cv_prog_acx_pthread_config
-if test -n "$acx_pthread_config"; then
- { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
-$as_echo "$acx_pthread_config" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
+$as_echo "$ac_cv_header_syslog_h" >&6; }
else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- if test x"$acx_pthread_config" = xno; then continue; fi
- tryPTHREAD_CFLAGS="`pthread-config --cflags`"
- tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
- ;;
-
- *)
- { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
-$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
- tryPTHREAD_LIBS="-l$flag"
- ;;
- esac
-
- save_LIBS="$LIBS"
- save_CFLAGS="$CFLAGS"
- LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
-
- # Check for various functions. We must include pthread.h,
- # since some functions may be macros. (On the Sequent, we
- # need a special flag -Kthread to make this header compile.)
- # We check for pthread_join because it is in -lpthread on IRIX
- # while pthread_create is in libc. We check for pthread_attr_init
- # due to DEC craziness with -lpthreads. We check for
- # pthread_cleanup_push because it is one of the few pthread
- # functions on Solaris that doesn't have a non-functional libc stub.
- # We try pthread_create on general principles.
- cat >conftest.$ac_ext <<_ACEOF
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking syslog.h usability" >&5
+$as_echo_n "checking syslog.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-pthread_t th; pthread_join(th, 0);
- pthread_attr_init(0); pthread_cleanup_push(0, 0);
- pthread_create(0,0,0,0); pthread_cleanup_pop(0);
- ;
- return 0;
-}
+$ac_includes_default
+#include <syslog.h>
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- acx_pthread_ok=yes
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- acx_pthread_ok=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-
- if test "x$acx_pthread_ok" = xyes; then
- # Don't use options that are ignored by the compiler.
- # We find them by checking stderror.
- cat >conftest.$ac_ext <<_ACEOF
-int
-main (int argc, char **argv)
-{
- (void) argc;
- (void) argv;
- return 0;
-}
-_ACEOF
- rm -f conftest.$ac_objext conftest$ac_exeext
- if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
- # we continue with more flags because Linux needs -lpthread
- # for libpq builds on PostgreSQL. The test above only
- # tests for building binaries, not shared libraries.
- PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
- PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
- else acx_pthread_ok=no
- fi
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
- { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
-$as_echo "$acx_pthread_ok" >&6; }
-done
+ ac_header_compiler=no
fi
-# Various other checks:
-if test "x$acx_pthread_ok" = xyes; then
- save_LIBS="$LIBS"
- LIBS="$PTHREAD_LIBS $LIBS"
- save_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
- # Detect AIX lossage: threads are created detached by default
- # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
- { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
-$as_echo_n "checking for joinable pthread attribute... " >&6; }
- cat >conftest.$ac_ext <<_ACEOF
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking syslog.h presence" >&5
+$as_echo_n "checking syslog.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <pthread.h>
-int
-main ()
-{
-int attr=PTHREAD_CREATE_JOINABLE;
- ;
- return 0;
-}
+#include <syslog.h>
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
}; then
- ok=PTHREAD_CREATE_JOINABLE
+ ac_header_preproc=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ok=unknown
+ ac_header_preproc=no
fi
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
- if test x"$ok" = xunknown; then
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <pthread.h>
-int
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: syslog.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: syslog.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: syslog.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: syslog.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: syslog.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: syslog.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: syslog.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: syslog.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: syslog.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: syslog.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: syslog.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: syslog.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: syslog.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: syslog.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to pgsql-bugs@postgresql.org ##
+## ---------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for syslog.h" >&5
+$as_echo_n "checking for syslog.h... " >&6; }
+if test "${ac_cv_header_syslog_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_syslog_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_syslog_h" >&5
+$as_echo "$ac_cv_header_syslog_h" >&6; }
+
+fi
+if test "x$ac_cv_header_syslog_h" = x""yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYSLOG 1
+_ACEOF
+
+fi
+
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for opterr" >&5
+$as_echo_n "checking for opterr... " >&6; }
+if test "${pgac_cv_var_int_opterr+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <unistd.h>
+int
main ()
{
-int attr=PTHREAD_CREATE_UNDETACHED;
+extern int opterr; opterr = 1;
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ok=PTHREAD_CREATE_UNDETACHED
+ pgac_cv_var_int_opterr=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ok=unknown
+ pgac_cv_var_int_opterr=no
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
- fi
- if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
-
-cat >>confdefs.h <<\_ACEOF
-#define PTHREAD_CREATE_JOINABLE $ok
-_ACEOF
-
- fi
- { $as_echo "$as_me:$LINENO: result: ${ok}" >&5
-$as_echo "${ok}" >&6; }
- if test x"$ok" = xunknown; then
- { $as_echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
-$as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
- fi
-
- { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
-$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
- flag=no
-# We always add these in PostgreSQL
-# case "${host_cpu}-${host_os}" in
-# *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
-# *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
-# esac
- { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
-$as_echo "${flag}" >&6; }
- if test "x$flag" != xno; then
- PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
- fi
-
- LIBS="$save_LIBS"
- CFLAGS="$save_CFLAGS"
-
-# Supporting cc_r would require a special CC in all places that
-# use libpq, and that is ugly, so we don't do it. Users can still
-# define their compiler as cc_r to do thread builds of everything.
- # More AIX lossage: must compile with cc_r
- # Extract the first word of "cc_r", so it can be a program name with args.
-set dummy cc_r; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test -n "$PTHREAD_CC"; then
- ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_exec_ext in '' $ac_executable_extensions; do
- if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
- ac_cv_prog_PTHREAD_CC="cc_r"
- $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
-done
-IFS=$as_save_IFS
-
- test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
-fi
-fi
-PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
-if test -n "$PTHREAD_CC"; then
- { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
-$as_echo "$PTHREAD_CC" >&6; }
-else
- { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-else
- PTHREAD_CC="$CC"
fi
-
-
-
-
-
-# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
-if test x"$acx_pthread_ok" = xyes; then
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_opterr" >&5
+$as_echo "$pgac_cv_var_int_opterr" >&6; }
+if test x"$pgac_cv_var_int_opterr" = x"yes"; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_PTHREAD 1
+#define HAVE_INT_OPTERR 1
_ACEOF
- :
-else
- acx_pthread_ok=no
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
- # set thread flags
-
-# Some platforms use these, so just define them. They can't hurt if they
-# are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
-# enables 5-arg getpwuid_r, among other things.
-PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
-
-
-# At this point, we don't want to muck with the compiler name for threading.
-# Let's see who fails, perhaps AIX. 2004-04-23
-if test "$PTHREAD_CC" != "$CC"; then
-{ { $as_echo "$as_me:$LINENO: error:
-PostgreSQL does not support platforms that require a special compiler
-for thread safety; use --disable-thread-safety to disable thread safety." >&5
-$as_echo "$as_me: error:
-PostgreSQL does not support platforms that require a special compiler
-for thread safety; use --disable-thread-safety to disable thread safety." >&2;}
- { (exit 1); exit 1; }; }
fi
-# Check for *_r functions
-_CFLAGS="$CFLAGS"
-_LIBS="$LIBS"
-CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
-LIBS="$LIBS $PTHREAD_LIBS"
-
-if test "$PORTNAME" != "win32"; then
-if test "${ac_cv_header_pthread_h+set}" = set; then
- { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
-$as_echo_n "checking for pthread.h... " >&6; }
-if test "${ac_cv_header_pthread_h+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for optreset" >&5
+$as_echo_n "checking for optreset... " >&6; }
+if test "${pgac_cv_var_int_optreset+set}" = set; then
$as_echo_n "(cached) " >&6
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
-$as_echo "$ac_cv_header_pthread_h" >&6; }
else
- # Is the header compilable?
-{ $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5
-$as_echo_n "checking pthread.h usability... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-#include <pthread.h>
+#include <unistd.h>
+int
+main ()
+{
+extern int optreset; optreset = 1;
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_header_compiler=yes
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ pgac_cv_var_int_optreset=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_header_compiler=no
+ pgac_cv_var_int_optreset=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_var_int_optreset" >&5
+$as_echo "$pgac_cv_var_int_optreset" >&6; }
+if test x"$pgac_cv_var_int_optreset" = x"yes"; then
-# Is the header present?
-{ $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5
-$as_echo_n "checking pthread.h presence... " >&6; }
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-#include <pthread.h>
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_INT_OPTRESET 1
_ACEOF
-if { (ac_try="$ac_cpp conftest.$ac_ext"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then
- ac_header_preproc=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_header_preproc=no
-fi
-
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
-$as_echo "$ac_header_preproc" >&6; }
-
-# So? What about this header?
-case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
- yes:no: )
- { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
- ac_header_preproc=yes
- ;;
- no:yes:* )
- { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
-$as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
- { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
-$as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
- ( cat <<\_ASBOX
-## ---------------------------------------- ##
-## Report this to pgsql-bugs@postgresql.org ##
-## ---------------------------------------- ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
-{ $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
-$as_echo_n "checking for pthread.h... " >&6; }
-if test "${ac_cv_header_pthread_h+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_header_pthread_h=$ac_header_preproc
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
-$as_echo "$ac_cv_header_pthread_h" >&6; }
-
-fi
-if test "x$ac_cv_header_pthread_h" = x""yes; then
- :
-else
- { { $as_echo "$as_me:$LINENO: error:
-pthread.h not found; use --disable-thread-safety to disable thread safety" >&5
-$as_echo "$as_me: error:
-pthread.h not found; use --disable-thread-safety to disable thread safety" >&2;}
- { (exit 1); exit 1; }; }
-fi
-
fi
-
-for ac_func in strerror_r getpwuid_r gethostbyname_r
+for ac_func in strtoll strtoq
do
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
cat >>confdefs.h <<_ACEOF
#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-
+ break
fi
done
-# Do test here with the proper thread flags
-{ $as_echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
-$as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
-if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
+
+for ac_func in strtoull strtouq
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h>
-#include <pwd.h>
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-uid_t uid;
-struct passwd *space;
-char *buf;
-size_t bufsize;
-struct passwd **result;
-getpwuid_r(uid, space, buf, bufsize, result);
+return $ac_func ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- pgac_cv_func_getpwuid_r_5arg=yes
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- pgac_cv_func_getpwuid_r_5arg=no
+ eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
-$as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
-if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define GETPWUID_R_5ARG /**/
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
-
+ break
fi
+done
-{ $as_echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
-$as_echo_n "checking whether strerror_r returns int... " >&6; }
-if test "${pgac_cv_func_strerror_r_int+set}" = set; then
+
+# Check for one of atexit() or on_exit()
+
+for ac_func in atexit
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <string.h>
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-#ifndef _AIX
-int strerror_r(int, char *, size_t);
-#else
-/* Older AIX has 'int' for the third argument so we don't test the args. */
-int strerror_r();
-#endif
+return $ac_func ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- pgac_cv_func_strerror_r_int=yes
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- pgac_cv_func_strerror_r_int=no
+ eval "$as_ac_var=no"
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
-$as_echo "$pgac_cv_func_strerror_r_int" >&6; }
-if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define STRERROR_R_INT /**/
-_ACEOF
-
-fi
-
-
-CFLAGS="$_CFLAGS"
-LIBS="$_LIBS"
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
else
-# do not use values from template file
-PTHREAD_CFLAGS=
-PTHREAD_LIBS=
-fi
-
-
-
-
-# We can test for libldap_r only after we know PTHREAD_LIBS
-if test "$with_ldap" = yes ; then
- _LIBS="$LIBS"
- if test "$PORTNAME" != "win32"; then
-
-{ $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
-$as_echo_n "checking for ldap_bind in -lldap... " >&6; }
-if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
+for ac_func in on_exit
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
$as_echo_n "(cached) " >&6
else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
/* Override any GCC internal prototype to avoid an error.
Use char because int might match the return type of a GCC
#ifdef __cplusplus
extern "C"
#endif
-char ldap_bind ();
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
int
main ()
{
-return ldap_bind ();
+return $ac_func ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_lib_ldap_ldap_bind=yes
+ eval "$as_ac_var=yes"
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_ldap_ldap_bind=no
+ eval "$as_ac_var=no"
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
-$as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
-if test "x$ac_cv_lib_ldap_ldap_bind" = x""yes; then
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBLDAP 1
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
- LIBS="-lldap $LIBS"
-
else
- { { $as_echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
-$as_echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: neither atexit() nor on_exit() found" >&5
+$as_echo "$as_me: error: neither atexit() nor on_exit() found" >&2;}
{ (exit 1); exit 1; }; }
fi
+done
- LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
- if test "$enable_thread_safety" = yes; then
- # on some platforms ldap_r fails to link without PTHREAD_LIBS
+fi
+done
-{ $as_echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
-$as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
-if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-/* Override any GCC internal prototype to avoid an error.
- Use char because int might match the return type of a GCC
- builtin and then its argument prototype would still apply. */
-#ifdef __cplusplus
-extern "C"
-#endif
-char ldap_simple_bind ();
-int
-main ()
-{
-return ldap_simple_bind ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- ac_cv_lib_ldap_r_ldap_simple_bind=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_ldap_r_ldap_simple_bind=no
-fi
+#
+# Pthreads
+#
+# For each platform, we need to know about any special compile and link
+# libraries, and whether the normal C function names are thread-safe.
+# See the comment at the top of src/port/thread.c for more information.
+# WIN32 doesn't need the pthread tests; it always uses threads
+if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
-$as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
-if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBLDAP_R 1
-_ACEOF
- LIBS="-lldap_r $LIBS"
-else
- { { $as_echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
-$as_echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
- { (exit 1); exit 1; }; }
-fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
- LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
- else
- LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
- fi
- else
+acx_pthread_ok=no
-{ $as_echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
-$as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
-if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lwldap32 $LIBS"
-cat >conftest.$ac_ext <<_ACEOF
+# We used to check for pthread.h first, but this fails if pthread.h
+# requires special compiler flags (e.g. on True64 or Sequent).
+# It gets checked for in the link test anyway.
+
+# First of all, check if the user has set any of the PTHREAD_LIBS,
+# etcetera environment variables, and if threads linking works using
+# them:
+if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ { $as_echo "$as_me:$LINENO: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5
+$as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
#ifdef __cplusplus
extern "C"
#endif
-char ldap_bind ();
+char pthread_join ();
int
main ()
{
-return ldap_bind ();
+return pthread_join ();
;
return 0;
}
test "$cross_compiling" = yes ||
$as_test_x conftest$ac_exeext
}; then
- ac_cv_lib_wldap32_ldap_bind=yes
+ acx_pthread_ok=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_lib_wldap32_ldap_bind=no
+
fi
rm -rf conftest.dSYM
rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
+ { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+ if test x"$acx_pthread_ok" = xno; then
+ PTHREAD_LIBS=""
+ PTHREAD_CFLAGS=""
+ fi
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
-$as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
-if test "x$ac_cv_lib_wldap32_ldap_bind" = x""yes; then
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBWLDAP32 1
-_ACEOF
-
- LIBS="-lwldap32 $LIBS"
-else
- { { $as_echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
-$as_echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
- { (exit 1); exit 1; }; }
-fi
+# We must check for the threads library under a number of different
+# names; the ordering is very important because some systems
+# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
+# libraries is broken (non-POSIX).
- LDAP_LIBS_FE="-lwldap32"
- LDAP_LIBS_BE="-lwldap32"
- fi
- LIBS="$_LIBS"
-fi
+# Create a list of thread flags to try. Items starting with a "-" are
+# C compiler flags, and other items are library names, except for "none"
+# which indicates that we try without any flags at all, and "pthread-config"
+# which is a program returning the flags for the Pth emulation library.
+acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config pthreadGC2"
+# The ordering *is* (sometimes) important. Some notes on the
+# individual items follow:
+# pthreads: AIX (must check this before -lpthread)
+# none: in case threads are in libc; should be tried before -Kthread and
+# other compiler flags to prevent continual compiler warnings
+# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
+# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
+# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
+# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
+# -pthreads: Solaris/gcc
+# -mthreads: Mingw32/gcc, Lynx/gcc
+# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
+# doesn't hurt to check since this sometimes defines pthreads too;
+# also defines -D_REENTRANT)
+# pthread: Linux, etcetera
+# --thread-safe: KAI C++
+# pthread-config: use pthread-config program (for GNU Pth library)
-# This test makes sure that run tests work at all. Sometimes a shared
-# library is found by the linker, but the runtime linker can't find it.
-# This check should come after all modifications of compiler or linker
-# variables, and before any other run tests.
-{ $as_echo "$as_me:$LINENO: checking test program" >&5
-$as_echo_n "checking test program... " >&6; }
-if test "$cross_compiling" = yes; then
- { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5
-$as_echo "cross-compiling" >&6; }
+case "${host_cpu}-${host_os}" in
+ *solaris*)
+
+ # On Solaris (at least, for some versions), libc contains stubbed
+ # (non-functional) versions of the pthreads routines, so link-based
+ # tests will erroneously succeed. (We need to link with -pthread or
+ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
+ # a function called by this macro, so we could check for that, but
+ # who knows whether they'll stub that too in a future libc.) So,
+ # we'll just look for -pthreads and -lpthread first:
+
+ acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags"
+ ;;
+esac
+
+if test x"$acx_pthread_ok" = xno; then
+for flag in $acx_pthread_flags; do
+
+ tryPTHREAD_CFLAGS=""
+ tryPTHREAD_LIBS=""
+ case $flag in
+ none)
+ { $as_echo "$as_me:$LINENO: checking whether pthreads work without any flags" >&5
+$as_echo_n "checking whether pthreads work without any flags... " >&6; }
+ ;;
+
+ -*)
+ { $as_echo "$as_me:$LINENO: checking whether pthreads work with $flag" >&5
+$as_echo_n "checking whether pthreads work with $flag... " >&6; }
+ tryPTHREAD_CFLAGS="$flag"
+ ;;
+
+ pthread-config)
+ # skip this if we already have flags defined, for PostgreSQL
+ if test x"$PTHREAD_CFLAGS" != x -o x"$PTHREAD_LIBS" != x; then continue; fi
+ # Extract the first word of "pthread-config", so it can be a program name with args.
+set dummy pthread-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_acx_pthread_config+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ if test -n "$acx_pthread_config"; then
+ ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_acx_pthread_config="yes"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no"
+fi
+fi
+acx_pthread_config=$ac_cv_prog_acx_pthread_config
+if test -n "$acx_pthread_config"; then
+ { $as_echo "$as_me:$LINENO: result: $acx_pthread_config" >&5
+$as_echo "$acx_pthread_config" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test x"$acx_pthread_config" = xno; then continue; fi
+ tryPTHREAD_CFLAGS="`pthread-config --cflags`"
+ tryPTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
+ ;;
+
+ *)
+ { $as_echo "$as_me:$LINENO: checking for the pthreads library -l$flag" >&5
+$as_echo_n "checking for the pthreads library -l$flag... " >&6; }
+ tryPTHREAD_LIBS="-l$flag"
+ ;;
+ esac
+
+ save_LIBS="$LIBS"
+ save_CFLAGS="$CFLAGS"
+ LIBS="$tryPTHREAD_LIBS $PTHREAD_LIBS $LIBS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
+
+ # Check for various functions. We must include pthread.h,
+ # since some functions may be macros. (On the Sequent, we
+ # need a special flag -Kthread to make this header compile.)
+ # We check for pthread_join because it is in -lpthread on IRIX
+ # while pthread_create is in libc. We check for pthread_attr_init
+ # due to DEC craziness with -lpthreads. We check for
+ # pthread_cleanup_push because it is one of the few pthread
+ # functions on Solaris that doesn't have a non-functional libc stub.
+ # We try pthread_create on general principles.
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-int main() { return 0; }
+#include <pthread.h>
+int
+main ()
+{
+pthread_t th; pthread_join(th, 0);
+ pthread_attr_init(0); pthread_cleanup_push(0, 0);
+ pthread_create(0,0,0,0); pthread_cleanup_pop(0);
+ ;
+ return 0;
+}
_ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ acx_pthread_ok=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ acx_pthread_ok=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+ if test "x$acx_pthread_ok" = xyes; then
+ # Don't use options that are ignored by the compiler.
+ # We find them by checking stderror.
+ cat >conftest.$ac_ext <<_ACEOF
+int
+main (int argc, char **argv)
+{
+ (void) argc;
+ (void) argv;
+ return 0;
+}
+_ACEOF
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if test "`(eval $ac_link 2>&1 1>&5)`" = ""; then
+ # we continue with more flags because Linux needs -lpthread
+ # for libpq builds on PostgreSQL. The test above only
+ # tests for building binaries, not shared libraries.
+ PTHREAD_LIBS=" $tryPTHREAD_LIBS $PTHREAD_LIBS"
+ PTHREAD_CFLAGS="$PTHREAD_CFLAGS $tryPTHREAD_CFLAGS"
+ else acx_pthread_ok=no
+ fi
+ fi
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+ { $as_echo "$as_me:$LINENO: result: $acx_pthread_ok" >&5
+$as_echo "$acx_pthread_ok" >&6; }
+done
+fi
+
+# Various other checks:
+if test "x$acx_pthread_ok" = xyes; then
+ save_LIBS="$LIBS"
+ LIBS="$PTHREAD_LIBS $LIBS"
+ save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+
+ # Detect AIX lossage: threads are created detached by default
+ # and the JOINABLE attribute has a nonstandard name (UNDETACHED).
+ { $as_echo "$as_me:$LINENO: checking for joinable pthread attribute" >&5
+$as_echo_n "checking for joinable pthread attribute... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+int attr=PTHREAD_CREATE_JOINABLE;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- { $as_echo "$as_me:$LINENO: result: ok" >&5
-$as_echo "ok" >&6; }
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ok=PTHREAD_CREATE_JOINABLE
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ok=unknown
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ if test x"$ok" = xunknown; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <pthread.h>
+int
+main ()
+{
+int attr=PTHREAD_CREATE_UNDETACHED;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ok=PTHREAD_CREATE_UNDETACHED
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ok=unknown
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then
+
+cat >>confdefs.h <<\_ACEOF
+#define PTHREAD_CREATE_JOINABLE $ok
+_ACEOF
+
+ fi
+ { $as_echo "$as_me:$LINENO: result: ${ok}" >&5
+$as_echo "${ok}" >&6; }
+ if test x"$ok" = xunknown; then
+ { $as_echo "$as_me:$LINENO: WARNING: we do not know how to create joinable pthreads" >&5
+$as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;}
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking if more special flags are required for pthreads" >&5
+$as_echo_n "checking if more special flags are required for pthreads... " >&6; }
+ flag=no
+# We always add these in PostgreSQL
+# case "${host_cpu}-${host_os}" in
+# *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
+# *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
+# esac
+ { $as_echo "$as_me:$LINENO: result: ${flag}" >&5
+$as_echo "${flag}" >&6; }
+ if test "x$flag" != xno; then
+ PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
+ fi
+
+ LIBS="$save_LIBS"
+ CFLAGS="$save_CFLAGS"
+
+# Supporting cc_r would require a special CC in all places that
+# use libpq, and that is ugly, so we don't do it. Users can still
+# define their compiler as cc_r to do thread builds of everything.
+ # More AIX lossage: must compile with cc_r
+ # Extract the first word of "cc_r", so it can be a program name with args.
+set dummy cc_r; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_PTHREAD_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$PTHREAD_CC"; then
+ ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_PTHREAD_CC="cc_r"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}"
+fi
+fi
+PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
+if test -n "$PTHREAD_CC"; then
+ { $as_echo "$as_me:$LINENO: result: $PTHREAD_CC" >&5
+$as_echo "$PTHREAD_CC" >&6; }
else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
-( exit $ac_status )
-{ $as_echo "$as_me:$LINENO: result: failed" >&5
-$as_echo "failed" >&6; }
-{ { $as_echo "$as_me:$LINENO: error:
-Could not execute a simple test program. This may be a problem
-related to locating shared libraries. Check the file 'config.log'
-for the exact reason." >&5
-$as_echo "$as_me: error:
-Could not execute a simple test program. This may be a problem
-related to locating shared libraries. Check the file 'config.log'
-for the exact reason." >&2;}
- { (exit 1); exit 1; }; }
+
+else
+ PTHREAD_CC="$CC"
fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+
+
+
+
+
+# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
+if test x"$acx_pthread_ok" = xyes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PTHREAD 1
+_ACEOF
+
+ :
+else
+ acx_pthread_ok=no
+
fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ # set thread flags
+# Some platforms use these, so just define them. They can't hurt if they
+# are not supported. For example, on Solaris -D_POSIX_PTHREAD_SEMANTICS
+# enables 5-arg getpwuid_r, among other things.
+PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT -D_THREAD_SAFE -D_POSIX_PTHREAD_SEMANTICS"
-# --------------------
-# Run tests below here
-# --------------------
-# Force use of our snprintf if system's doesn't do arg control
-# See comment above at snprintf test for details.
-if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
- { $as_echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
-$as_echo_n "checking whether printf supports argument control... " >&6; }
-if test "${pgac_cv_printf_arg_control+set}" = set; then
+# At this point, we don't want to muck with the compiler name for threading.
+# Let's see who fails, perhaps AIX. 2004-04-23
+if test "$PTHREAD_CC" != "$CC"; then
+{ { $as_echo "$as_me:$LINENO: error:
+PostgreSQL does not support platforms that require a special compiler
+for thread safety; use --disable-thread-safety to disable thread safety." >&5
+$as_echo "$as_me: error:
+PostgreSQL does not support platforms that require a special compiler
+for thread safety; use --disable-thread-safety to disable thread safety." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# Check for *_r functions
+_CFLAGS="$CFLAGS"
+_LIBS="$LIBS"
+CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
+LIBS="$LIBS $PTHREAD_LIBS"
+
+if test "$PORTNAME" != "win32"; then
+if test "${ac_cv_header_pthread_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
+$as_echo_n "checking for pthread.h... " >&6; }
+if test "${ac_cv_header_pthread_h+set}" = set; then
$as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
+$as_echo "$ac_cv_header_pthread_h" >&6; }
else
- if test "$cross_compiling" = yes; then
- pgac_cv_printf_arg_control=cross
-else
- cat >conftest.$ac_ext <<_ACEOF
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking pthread.h usability" >&5
+$as_echo_n "checking pthread.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#include <string.h>
-
-int main()
-{
- char buf[100];
-
- /* can it swap arguments? */
- snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
- if (strcmp(buf, "4 3") != 0)
- return 1;
- return 0;
-}
+$ac_includes_default
+#include <pthread.h>
_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- pgac_cv_printf_arg_control=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
-pgac_cv_printf_arg_control=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
-
-fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
-$as_echo "$pgac_cv_printf_arg_control" >&6; }
-
- if test $pgac_cv_printf_arg_control != yes ; then
- pgac_need_repl_snprintf=yes
- fi
+ ac_header_compiler=no
fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
-
-
-{ $as_echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
-$as_echo_n "checking whether long int is 64 bits... " >&6; }
-if test "${pgac_cv_type_long_int_64+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then
- # If cross-compiling, check the size reported by the compiler and
-# trust that the arithmetic works.
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking pthread.h presence" >&5
+$as_echo_n "checking pthread.h presence... " >&6; }
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-int
-main ()
-{
-static int test_array [1 - 2 * !(sizeof(long int) == 8)];
-test_array [0] = 0
-
- ;
- return 0;
-}
+#include <pthread.h>
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+if { (ac_try="$ac_cpp conftest.$ac_ext"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- pgac_cv_type_long_int_64=yes
+ }; then
+ ac_header_preproc=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- pgac_cv_type_long_int_64=no
-fi
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: pthread.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: pthread.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: pthread.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: pthread.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: pthread.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: pthread.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: pthread.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: pthread.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: pthread.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: pthread.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: pthread.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: pthread.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: pthread.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ---------------------------------------- ##
+## Report this to pgsql-bugs@postgresql.org ##
+## ---------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for pthread.h" >&5
+$as_echo_n "checking for pthread.h... " >&6; }
+if test "${ac_cv_header_pthread_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_pthread_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_pthread_h" >&5
+$as_echo "$ac_cv_header_pthread_h" >&6; }
+
+fi
+if test "x$ac_cv_header_pthread_h" = x""yes; then
+ :
+else
+ { { $as_echo "$as_me:$LINENO: error:
+pthread.h not found; use --disable-thread-safety to disable thread safety" >&5
+$as_echo "$as_me: error:
+pthread.h not found; use --disable-thread-safety to disable thread safety" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+fi
+
+
+
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+for ac_func in strerror_r getpwuid_r gethostbyname_r
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-typedef long int ac_int64;
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
-/*
- * These are globals to discourage the compiler from folding all the
- * arithmetic tests down to compile-time constants.
- */
-ac_int64 a = 20000001;
-ac_int64 b = 40000005;
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
-int does_int64_work()
-{
- ac_int64 c,d;
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
- if (sizeof(ac_int64) != 8)
- return 0; /* definitely not the right size */
+#undef $ac_func
- /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
- c = a * b;
- d = (c + b) / b;
- if (d != a+1)
- return 0;
- return 1;
-}
-main() {
- exit(! does_int64_work());
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- pgac_cv_type_long_int_64=yes
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
-pgac_cv_type_long_int_64=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+ eval "$as_ac_var=no"
fi
-
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
-$as_echo "$pgac_cv_type_long_int_64" >&6; }
-
-HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
-if test x"$pgac_cv_type_long_int_64" = xyes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LONG_INT_64 1
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
_ACEOF
fi
+done
-if test x"$HAVE_LONG_INT_64" = x"no" ; then
- { $as_echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
-$as_echo_n "checking whether long long int is 64 bits... " >&6; }
-if test "${pgac_cv_type_long_long_int_64+set}" = set; then
+# Do test here with the proper thread flags
+{ $as_echo "$as_me:$LINENO: checking whether getpwuid_r takes a fifth argument" >&5
+$as_echo_n "checking whether getpwuid_r takes a fifth argument... " >&6; }
+if test "${pgac_cv_func_getpwuid_r_5arg+set}" = set; then
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then
- # If cross-compiling, check the size reported by the compiler and
-# trust that the arithmetic works.
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
+#include <sys/types.h>
+#include <pwd.h>
int
main ()
{
-static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
-test_array [0] = 0
-
+uid_t uid;
+struct passwd *space;
+char *buf;
+size_t bufsize;
+struct passwd **result;
+getpwuid_r(uid, space, buf, bufsize, result);
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- pgac_cv_type_long_long_int_64=yes
+ pgac_cv_func_getpwuid_r_5arg=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- pgac_cv_type_long_long_int_64=no
+ pgac_cv_func_getpwuid_r_5arg=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-typedef long long int ac_int64;
-
-/*
- * These are globals to discourage the compiler from folding all the
- * arithmetic tests down to compile-time constants.
- */
-ac_int64 a = 20000001;
-ac_int64 b = 40000005;
-
-int does_int64_work()
-{
- ac_int64 c,d;
-
- if (sizeof(ac_int64) != 8)
- return 0; /* definitely not the right size */
-
- /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
- c = a * b;
- d = (c + b) / b;
- if (d != a+1)
- return 0;
- return 1;
-}
-main() {
- exit(! does_int64_work());
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- pgac_cv_type_long_long_int_64=yes
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-pgac_cv_type_long_long_int_64=no
-fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-
fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
-$as_echo "$pgac_cv_type_long_long_int_64" >&6; }
-
-HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
-if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_func_getpwuid_r_5arg" >&5
+$as_echo "$pgac_cv_func_getpwuid_r_5arg" >&6; }
+if test x"$pgac_cv_func_getpwuid_r_5arg" = xyes ; then
cat >>confdefs.h <<\_ACEOF
-#define HAVE_LONG_LONG_INT_64 1
+#define GETPWUID_R_5ARG /**/
_ACEOF
fi
- if test x"$HAVE_LONG_LONG_INT_64" = x"no" ; then
- { { $as_echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
-$as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
- { (exit 1); exit 1; }; }
- fi
-fi
-
-
-
-if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
+{ $as_echo "$as_me:$LINENO: checking whether strerror_r returns int" >&5
+$as_echo_n "checking whether strerror_r returns int... " >&6; }
+if test "${pgac_cv_func_strerror_r_int+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-
-#define INT64CONST(x) x##LL
-long long int foo = INT64CONST(0x1234567890123456);
-
+#include <string.h>
int
main ()
{
-
+#ifndef _AIX
+int strerror_r(int, char *, size_t);
+#else
+/* Older AIX has 'int' for the third argument so we don't test the args. */
+int strerror_r();
+#endif
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_LL_CONSTANTS 1
-_ACEOF
-
+ pgac_cv_func_strerror_r_int=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
+ pgac_cv_func_strerror_r_int=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_func_strerror_r_int" >&5
+$as_echo "$pgac_cv_func_strerror_r_int" >&6; }
+if test x"$pgac_cv_func_strerror_r_int" = xyes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STRERROR_R_INT /**/
+_ACEOF
+
+fi
-# If we found "long int" is 64 bits, assume snprintf handles it. If
-# we found we need to use "long long int", better check. We cope with
-# snprintfs that use %lld, %qd, or %I64d as the format. If none of these
-# work, fall back to our own snprintf emulation (which we know uses %lld).
+CFLAGS="$_CFLAGS"
+LIBS="$_LIBS"
-if test "$HAVE_LONG_LONG_INT_64" = yes ; then
- if test $pgac_need_repl_snprintf = no; then
- { $as_echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
-$as_echo_n "checking snprintf format for long long int... " >&6; }
-if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
- $as_echo_n "(cached) " >&6
else
- for pgac_format in '%lld' '%qd' '%I64d'; do
-if test "$cross_compiling" = yes; then
- pgac_cv_snprintf_long_long_int_format=cross; break
+# do not use values from template file
+PTHREAD_CFLAGS=
+PTHREAD_LIBS=
+fi
+
+
+
+
+
+# We can test for libldap_r only after we know PTHREAD_LIBS
+if test "$with_ldap" = yes ; then
+ _LIBS="$LIBS"
+ if test "$PORTNAME" != "win32"; then
+
+{ $as_echo "$as_me:$LINENO: checking for ldap_bind in -lldap" >&5
+$as_echo_n "checking for ldap_bind in -lldap... " >&6; }
+if test "${ac_cv_lib_ldap_ldap_bind+set}" = set; then
+ $as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap $EXTRA_LDAP_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-typedef long long int ac_int64;
-#define INT64_FORMAT "$pgac_format"
-
-ac_int64 a = 20000001;
-ac_int64 b = 40000005;
-int does_int64_snprintf_work()
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ldap_bind ();
+int
+main ()
{
- ac_int64 c;
- char buf[100];
-
- if (sizeof(ac_int64) != 8)
- return 0; /* doesn't look like the right size */
-
- c = a * b;
- snprintf(buf, 100, INT64_FORMAT, c);
- if (strcmp(buf, "800000140000005") != 0)
- return 0; /* either multiply or snprintf is busted */
- return 1;
-}
-main() {
- exit(! does_int64_snprintf_work());
+return ldap_bind ();
+ ;
+ return 0;
}
_ACEOF
-rm -f conftest$ac_exeext
+rm -f conftest.$ac_objext conftest$ac_exeext
if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- pgac_cv_snprintf_long_long_int_format=$pgac_format; break
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_ldap_ldap_bind=yes
else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
+ ac_cv_lib_ldap_ldap_bind=no
fi
-rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-
-done
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_ldap_bind" >&5
+$as_echo "$ac_cv_lib_ldap_ldap_bind" >&6; }
+if test "x$ac_cv_lib_ldap_ldap_bind" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBLDAP 1
+_ACEOF
-LONG_LONG_INT_FORMAT=''
+ LIBS="-lldap $LIBS"
-case $pgac_cv_snprintf_long_long_int_format in
- cross) { $as_echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
-$as_echo "cannot test (not on host machine)" >&6; };;
- ?*) { $as_echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
-$as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
- LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
- *) { $as_echo "$as_me:$LINENO: result: none" >&5
-$as_echo "none" >&6; };;
-esac
- if test "$LONG_LONG_INT_FORMAT" = ""; then
- # Force usage of our own snprintf, since system snprintf is broken
- pgac_need_repl_snprintf=yes
- LONG_LONG_INT_FORMAT='%lld'
- fi
- else
- # Here if we previously decided we needed to use our own snprintf
- LONG_LONG_INT_FORMAT='%lld'
- fi
- LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
- INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
- UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
else
- # Here if we are not using 'long long int' at all
- INT64_FORMAT='"%ld"'
- UINT64_FORMAT='"%lu"'
+ { { $as_echo "$as_me:$LINENO: error: library 'ldap' is required for LDAP" >&5
+$as_echo "$as_me: error: library 'ldap' is required for LDAP" >&2;}
+ { (exit 1); exit 1; }; }
fi
+ LDAP_LIBS_BE="-lldap $EXTRA_LDAP_LIBS"
+ if test "$enable_thread_safety" = yes; then
+ # on some platforms ldap_r fails to link without PTHREAD_LIBS
-cat >>confdefs.h <<_ACEOF
-#define INT64_FORMAT $INT64_FORMAT
-_ACEOF
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define UINT64_FORMAT $UINT64_FORMAT
-_ACEOF
-
-
-# Now we have checked all the reasons to replace snprintf
-if test $pgac_need_repl_snprintf = yes; then
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_REPL_SNPRINTF 1
-_ACEOF
-
- case " $LIBOBJS " in
- *" snprintf.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
- ;;
-esac
-
-fi
-
-# Check size of void *, size_t (enables tweaks for > 32bit address space)
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
-$as_echo_n "checking size of void *... " >&6; }
-if test "${ac_cv_sizeof_void_p+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking for ldap_simple_bind in -lldap_r" >&5
+$as_echo_n "checking for ldap_simple_bind in -lldap_r... " >&6; }
+if test "${ac_cv_lib_ldap_r_ldap_simple_bind+set}" = set; then
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lldap_r $PTHREAD_CFLAGS $PTHREAD_LIBS $EXTRA_LDAP_LIBS $LIBS"
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ldap_simple_bind ();
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
-test_array [0] = 0
-
+return ldap_simple_bind ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_ldap_r_ldap_simple_bind=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ldap_r_ldap_simple_bind=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ldap_r_ldap_simple_bind" >&5
+$as_echo "$ac_cv_lib_ldap_r_ldap_simple_bind" >&6; }
+if test "x$ac_cv_lib_ldap_r_ldap_simple_bind" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBLDAP_R 1
+_ACEOF
+
+ LIBS="-lldap_r $LIBS"
+
+else
+ { { $as_echo "$as_me:$LINENO: error: library 'ldap_r' is required for LDAP" >&5
+$as_echo "$as_me: error: library 'ldap_r' is required for LDAP" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+ LDAP_LIBS_FE="-lldap_r $EXTRA_LDAP_LIBS"
+ else
+ LDAP_LIBS_FE="-lldap $EXTRA_LDAP_LIBS"
+ fi
+ else
+
+{ $as_echo "$as_me:$LINENO: checking for ldap_bind in -lwldap32" >&5
+$as_echo_n "checking for ldap_bind in -lwldap32... " >&6; }
+if test "${ac_cv_lib_wldap32_ldap_bind+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lwldap32 $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ldap_bind ();
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
-test_array [0] = 0
-
+return ldap_bind ();
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_hi=$ac_mid; break
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_wldap32_ldap_bind=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
+ ac_cv_lib_wldap32_ldap_bind=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_wldap32_ldap_bind" >&5
+$as_echo "$ac_cv_lib_wldap32_ldap_bind" >&6; }
+if test "x$ac_cv_lib_wldap32_ldap_bind" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBWLDAP32 1
+_ACEOF
+
+ LIBS="-lwldap32 $LIBS"
+
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ { { $as_echo "$as_me:$LINENO: error: library 'wldap32' is required for LDAP" >&5
+$as_echo "$as_me: error: library 'wldap32' is required for LDAP" >&2;}
+ { (exit 1); exit 1; }; }
+fi
- cat >conftest.$ac_ext <<_ACEOF
+ LDAP_LIBS_FE="-lwldap32"
+ LDAP_LIBS_BE="-lwldap32"
+ fi
+ LIBS="$_LIBS"
+fi
+
+
+
+
+# This test makes sure that run tests work at all. Sometimes a shared
+# library is found by the linker, but the runtime linker can't find it.
+# This check should come after all modifications of compiler or linker
+# variables, and before any other run tests.
+{ $as_echo "$as_me:$LINENO: checking test program" >&5
+$as_echo_n "checking test program... " >&6; }
+if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: result: cross-compiling" >&5
+$as_echo "cross-compiling" >&6; }
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
-test_array [0] = 0
-
- ;
- return 0;
-}
+int main() { return 0; }
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ { $as_echo "$as_me:$LINENO: result: ok" >&5
+$as_echo "ok" >&6; }
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ $as_echo "$as_me:$LINENO: result: failed" >&5
+$as_echo "failed" >&6; }
+{ { $as_echo "$as_me:$LINENO: error:
+Could not execute a simple test program. This may be a problem
+related to locating shared libraries. Check the file 'config.log'
+for the exact reason." >&5
+$as_echo "$as_me: error:
+Could not execute a simple test program. This may be a problem
+related to locating shared libraries. Check the file 'config.log'
+for the exact reason." >&2;}
+ { (exit 1); exit 1; }; }
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+# --------------------
+# Run tests below here
+# --------------------
+
+# Force use of our snprintf if system's doesn't do arg control
+# See comment above at snprintf test for details.
+if test "$enable_nls" = yes -a "$pgac_need_repl_snprintf" = no; then
+ { $as_echo "$as_me:$LINENO: checking whether printf supports argument control" >&5
+$as_echo_n "checking whether printf supports argument control... " >&6; }
+if test "${pgac_cv_printf_arg_control+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ pgac_cv_printf_arg_control=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
+#include <stdio.h>
+#include <string.h>
+
+int main()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
-test_array [0] = 0
+ char buf[100];
- ;
+ /* can it swap arguments? */
+ snprintf(buf, 100, "%2\$d %1\$d", 3, 4);
+ if (strcmp(buf, "4 3") != 0)
+ return 1;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_lo=$ac_mid; break
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ pgac_cv_printf_arg_control=yes
else
- $as_echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
+( exit $ac_status )
+pgac_cv_printf_arg_control=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_lo= ac_hi=
+
fi
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_printf_arg_control" >&5
+$as_echo "$pgac_cv_printf_arg_control" >&6; }
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $pgac_cv_printf_arg_control != yes ; then
+ pgac_need_repl_snprintf=yes
+ fi
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
- cat >conftest.$ac_ext <<_ACEOF
+
+
+
+{ $as_echo "$as_me:$LINENO: checking whether long int is 64 bits" >&5
+$as_echo_n "checking whether long int is 64 bits... " >&6; }
+if test "${pgac_cv_type_long_int_64+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # If cross-compiling, check the size reported by the compiler and
+# trust that the arithmetic works.
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
+static int test_array [1 - 2 * !(sizeof(long int) == 8)];
test_array [0] = 0
;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_hi=$ac_mid
+ pgac_cv_type_long_int_64=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_lo=`expr '(' $ac_mid ')' + 1`
+ pgac_cv_type_long_int_64=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_void_p=$ac_lo;;
-'') if test "$ac_cv_type_void_p" = yes; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (void *)
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }; }
- else
- ac_cv_sizeof_void_p=0
- fi ;;
-esac
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (void *)); }
-static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
+typedef long int ac_int64;
+
+/*
+ * These are globals to discourage the compiler from folding all the
+ * arithmetic tests down to compile-time constants.
+ */
+ac_int64 a = 20000001;
+ac_int64 b = 40000005;
+
+int does_int64_work()
{
+ ac_int64 c,d;
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- return 1;
- if (((long int) (sizeof (void *))) < 0)
- {
- long int i = longval ();
- if (i != ((long int) (sizeof (void *))))
- return 1;
- fprintf (f, "%ld", i);
- }
- else
- {
- unsigned long int i = ulongval ();
- if (i != ((long int) (sizeof (void *))))
- return 1;
- fprintf (f, "%lu", i);
- }
- /* Do not output a trailing newline, as this causes \r\n confusion
- on some platforms. */
- return ferror (f) || fclose (f) != 0;
+ if (sizeof(ac_int64) != 8)
+ return 0; /* definitely not the right size */
- ;
- return 0;
+ /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
+ c = a * b;
+ d = (c + b) / b;
+ if (d != a+1)
+ return 0;
+ return 1;
+}
+main() {
+ exit(! does_int64_work());
}
_ACEOF
rm -f conftest$ac_exeext
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_sizeof_void_p=`cat conftest.val`
+ pgac_cv_type_long_int_64=yes
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-if test "$ac_cv_type_void_p" = yes; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (void *)
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }; }
- else
- ac_cv_sizeof_void_p=0
- fi
+pgac_cv_type_long_int_64=no
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.val
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
-$as_echo "$ac_cv_sizeof_void_p" >&6; }
+fi
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_int_64" >&5
+$as_echo "$pgac_cv_type_long_int_64" >&6; }
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+HAVE_LONG_INT_64=$pgac_cv_type_long_int_64
+if test x"$pgac_cv_type_long_int_64" = xyes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_INT_64 1
_ACEOF
+fi
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
-$as_echo_n "checking size of size_t... " >&6; }
-if test "${ac_cv_sizeof_size_t+set}" = set; then
+
+if test x"$HAVE_LONG_INT_64" = x"no" ; then
+ { $as_echo "$as_me:$LINENO: checking whether long long int is 64 bits" >&5
+$as_echo_n "checking whether long long int is 64 bits... " >&6; }
+if test "${pgac_cv_type_long_long_int_64+set}" = set; then
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
+ # If cross-compiling, check the size reported by the compiler and
+# trust that the arithmetic works.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
-test_array [0] = 0
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
+static int test_array [1 - 2 * !(sizeof(long long int) == 8)];
test_array [0] = 0
;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_hi=$ac_mid; break
+ pgac_cv_type_long_long_int_64=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
+ pgac_cv_type_long_long_int_64=no
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
+typedef long long int ac_int64;
+
+/*
+ * These are globals to discourage the compiler from folding all the
+ * arithmetic tests down to compile-time constants.
+ */
+ac_int64 a = 20000001;
+ac_int64 b = 40000005;
+
+int does_int64_work()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
-test_array [0] = 0
+ ac_int64 c,d;
- ;
- return 0;
+ if (sizeof(ac_int64) != 8)
+ return 0; /* definitely not the right size */
+
+ /* Do perfunctory checks to see if 64-bit arithmetic seems to work */
+ c = a * b;
+ d = (c + b) / b;
+ if (d != a+1)
+ return 0;
+ return 1;
+}
+main() {
+ exit(! does_int64_work());
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-int
-main ()
-{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
-test_array [0] = 0
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_lo=$ac_mid; break
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ pgac_cv_type_long_long_int_64=yes
else
- $as_echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
+( exit $ac_status )
+pgac_cv_type_long_long_int_64=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
- ac_lo= ac_hi=
fi
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_type_long_long_int_64" >&5
+$as_echo "$pgac_cv_type_long_long_int_64" >&6; }
+
+HAVE_LONG_LONG_INT_64=$pgac_cv_type_long_long_int_64
+if test x"$pgac_cv_type_long_long_int_64" = xyes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_LONG_INT_64 1
+_ACEOF
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ if test x"$HAVE_LONG_LONG_INT_64" = x"no" ; then
+ { { $as_echo "$as_me:$LINENO: error: Cannot find a working 64-bit integer type." >&5
+$as_echo "$as_me: error: Cannot find a working 64-bit integer type." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+
+
+
+if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+
+#define INT64CONST(x) x##LL
+long long int foo = INT64CONST(0x1234567890123456);
+
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
-test_array [0] = 0
;
return 0;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_hi=$ac_mid
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LL_CONSTANTS 1
+_ACEOF
+
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_lo=`expr '(' $ac_mid ')' + 1`
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_size_t=$ac_lo;;
-'') if test "$ac_cv_type_size_t" = yes; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (size_t)
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }; }
- else
- ac_cv_sizeof_size_t=0
- fi ;;
-esac
+fi
+
+
+# If we found "long int" is 64 bits, assume snprintf handles it. If
+# we found we need to use "long long int", better check. We cope with
+# snprintfs that use %lld, %qd, or %I64d as the format. If none of these
+# work, fall back to our own snprintf emulation (which we know uses %lld).
+
+if test "$HAVE_LONG_LONG_INT_64" = yes ; then
+ if test $pgac_need_repl_snprintf = no; then
+ { $as_echo "$as_me:$LINENO: checking snprintf format for long long int" >&5
+$as_echo_n "checking snprintf format for long long int... " >&6; }
+if test "${pgac_cv_snprintf_long_long_int_format+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ for pgac_format in '%lld' '%qd' '%I64d'; do
+if test "$cross_compiling" = yes; then
+ pgac_cv_snprintf_long_long_int_format=cross; break
else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (size_t)); }
-static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
+typedef long long int ac_int64;
+#define INT64_FORMAT "$pgac_format"
+
+ac_int64 a = 20000001;
+ac_int64 b = 40000005;
+
+int does_int64_snprintf_work()
{
+ ac_int64 c;
+ char buf[100];
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- return 1;
- if (((long int) (sizeof (size_t))) < 0)
- {
- long int i = longval ();
- if (i != ((long int) (sizeof (size_t))))
- return 1;
- fprintf (f, "%ld", i);
- }
- else
- {
- unsigned long int i = ulongval ();
- if (i != ((long int) (sizeof (size_t))))
- return 1;
- fprintf (f, "%lu", i);
- }
- /* Do not output a trailing newline, as this causes \r\n confusion
- on some platforms. */
- return ferror (f) || fclose (f) != 0;
+ if (sizeof(ac_int64) != 8)
+ return 0; /* doesn't look like the right size */
- ;
- return 0;
+ c = a * b;
+ snprintf(buf, 100, INT64_FORMAT, c);
+ if (strcmp(buf, "800000140000005") != 0)
+ return 0; /* either multiply or snprintf is busted */
+ return 1;
+}
+main() {
+ exit(! does_int64_snprintf_work());
}
_ACEOF
rm -f conftest$ac_exeext
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_sizeof_size_t=`cat conftest.val`
+ pgac_cv_snprintf_long_long_int_format=$pgac_format; break
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-( exit $ac_status )
-if test "$ac_cv_type_size_t" = yes; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (size_t)
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }; }
- else
- ac_cv_sizeof_size_t=0
- fi
fi
rm -rf conftest.dSYM
rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-rm -f conftest.val
+
+
+done
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
-$as_echo "$ac_cv_sizeof_size_t" >&6; }
+
+LONG_LONG_INT_FORMAT=''
+
+case $pgac_cv_snprintf_long_long_int_format in
+ cross) { $as_echo "$as_me:$LINENO: result: cannot test (not on host machine)" >&5
+$as_echo "cannot test (not on host machine)" >&6; };;
+ ?*) { $as_echo "$as_me:$LINENO: result: $pgac_cv_snprintf_long_long_int_format" >&5
+$as_echo "$pgac_cv_snprintf_long_long_int_format" >&6; }
+ LONG_LONG_INT_FORMAT=$pgac_cv_snprintf_long_long_int_format;;
+ *) { $as_echo "$as_me:$LINENO: result: none" >&5
+$as_echo "none" >&6; };;
+esac
+ if test "$LONG_LONG_INT_FORMAT" = ""; then
+ # Force usage of our own snprintf, since system snprintf is broken
+ pgac_need_repl_snprintf=yes
+ LONG_LONG_INT_FORMAT='%lld'
+ fi
+ else
+ # Here if we previously decided we needed to use our own snprintf
+ LONG_LONG_INT_FORMAT='%lld'
+ fi
+ LONG_LONG_UINT_FORMAT=`echo "$LONG_LONG_INT_FORMAT" | sed 's/d$/u/'`
+ INT64_FORMAT="\"$LONG_LONG_INT_FORMAT\""
+ UINT64_FORMAT="\"$LONG_LONG_UINT_FORMAT\""
+else
+ # Here if we are not using 'long long int' at all
+ INT64_FORMAT='"%ld"'
+ UINT64_FORMAT='"%lu"'
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define INT64_FORMAT $INT64_FORMAT
+_ACEOF
cat >>confdefs.h <<_ACEOF
-#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
+#define UINT64_FORMAT $UINT64_FORMAT
+_ACEOF
+
+
+# Now we have checked all the reasons to replace snprintf
+if test $pgac_need_repl_snprintf = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_REPL_SNPRINTF 1
_ACEOF
+ case " $LIBOBJS " in
+ *" snprintf.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS snprintf.$ac_objext"
+ ;;
+esac
+
+fi
+# Check size of void *, size_t (enables tweaks for > 32bit address space)
# The cast to long int works around a bug in the HP C Compiler
# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of long" >&5
-$as_echo_n "checking size of long... " >&6; }
-if test "${ac_cv_sizeof_long+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
+$as_echo_n "checking size of void *... " >&6; }
+if test "${ac_cv_sizeof_void_p+set}" = set; then
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
test_array [0] = 0
;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
test_array [0] = 0
;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
test_array [0] = 0
;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
test_array [0] = 0
;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
test_array [0] = 0
;
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
-?*) ac_cv_sizeof_long=$ac_lo;;
-'') if test "$ac_cv_type_long" = yes; then
+?*) ac_cv_sizeof_void_p=$ac_lo;;
+'') if test "$ac_cv_type_void_p" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
+$as_echo "$as_me: error: cannot compute sizeof (void *)
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_sizeof_long=0
+ ac_cv_sizeof_void_p=0
fi ;;
esac
else
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-static long int longval () { return (long int) (sizeof (long)); }
-static unsigned long int ulongval () { return (long int) (sizeof (long)); }
+static long int longval () { return (long int) (sizeof (void *)); }
+static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
#include <stdio.h>
#include <stdlib.h>
int
FILE *f = fopen ("conftest.val", "w");
if (! f)
return 1;
- if (((long int) (sizeof (long))) < 0)
+ if (((long int) (sizeof (void *))) < 0)
{
long int i = longval ();
- if (i != ((long int) (sizeof (long))))
+ if (i != ((long int) (sizeof (void *))))
return 1;
fprintf (f, "%ld", i);
}
else
{
unsigned long int i = ulongval ();
- if (i != ((long int) (sizeof (long))))
+ if (i != ((long int) (sizeof (void *))))
return 1;
fprintf (f, "%lu", i);
}
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_sizeof_long=`cat conftest.val`
+ ac_cv_sizeof_void_p=`cat conftest.val`
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-if test "$ac_cv_type_long" = yes; then
+if test "$ac_cv_type_void_p" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (long)
+$as_echo "$as_me: error: cannot compute sizeof (void *)
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_sizeof_long=0
+ ac_cv_sizeof_void_p=0
fi
fi
rm -rf conftest.dSYM
fi
rm -f conftest.val
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
-$as_echo "$ac_cv_sizeof_long" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-_ACEOF
-
-
-
-# Decide whether float4 is passed by value: user-selectable, enabled by default
-{ $as_echo "$as_me:$LINENO: checking whether to build with float4 passed by value" >&5
-$as_echo_n "checking whether to build with float4 passed by value... " >&6; }
-
-
-# Check whether --enable-float4-byval was given.
-if test "${enable_float4_byval+set}" = set; then
- enableval=$enable_float4_byval;
- case $enableval in
- yes)
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_FLOAT4_BYVAL 1
-_ACEOF
-
- float4passbyval=true
- ;;
- no)
- float4passbyval=false
- ;;
- *)
- { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float4-byval option" >&5
-$as_echo "$as_me: error: no argument expected for --enable-float4-byval option" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-
-else
- enable_float4_byval=yes
-
-cat >>confdefs.h <<\_ACEOF
-#define USE_FLOAT4_BYVAL 1
-_ACEOF
-
- float4passbyval=true
-fi
-
-
-{ $as_echo "$as_me:$LINENO: result: $enable_float4_byval" >&5
-$as_echo "$enable_float4_byval" >&6; }
-
-cat >>confdefs.h <<_ACEOF
-#define FLOAT4PASSBYVAL $float4passbyval
-_ACEOF
-
-
-# Decide whether float8 is passed by value.
-# Note: this setting also controls int8 and related types such as timestamp.
-# If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
-# If not, trying to select it is an error.
-{ $as_echo "$as_me:$LINENO: checking whether to build with float8 passed by value" >&5
-$as_echo_n "checking whether to build with float8 passed by value... " >&6; }
-if test $ac_cv_sizeof_void_p -ge 8 ; then
-
-
-# Check whether --enable-float8-byval was given.
-if test "${enable_float8_byval+set}" = set; then
- enableval=$enable_float8_byval;
- case $enableval in
- yes)
- :
- ;;
- no)
- :
- ;;
- *)
- { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
-$as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-
-else
- enable_float8_byval=yes
-
-fi
-
-
-else
-
-
-# Check whether --enable-float8-byval was given.
-if test "${enable_float8_byval+set}" = set; then
- enableval=$enable_float8_byval;
- case $enableval in
- yes)
- :
- ;;
- no)
- :
- ;;
- *)
- { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
-$as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
- { (exit 1); exit 1; }; }
- ;;
- esac
-
-else
- enable_float8_byval=no
-
-fi
-
-
- if test "$enable_float8_byval" = yes ; then
- { { $as_echo "$as_me:$LINENO: error: --enable-float8-byval is not supported on 32-bit platforms." >&5
-$as_echo "$as_me: error: --enable-float8-byval is not supported on 32-bit platforms." >&2;}
- { (exit 1); exit 1; }; }
- fi
-fi
-if test "$enable_float8_byval" = yes ; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
+$as_echo "$ac_cv_sizeof_void_p" >&6; }
-cat >>confdefs.h <<\_ACEOF
-#define USE_FLOAT8_BYVAL 1
-_ACEOF
- float8passbyval=true
-else
- float8passbyval=false
-fi
-{ $as_echo "$as_me:$LINENO: result: $enable_float8_byval" >&5
-$as_echo "$enable_float8_byval" >&6; }
cat >>confdefs.h <<_ACEOF
-#define FLOAT8PASSBYVAL $float8passbyval
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
_ACEOF
-# Determine memory alignment requirements for the basic C data types.
-
-# The cast to long int works around a bug in the HP C Compiler,
-# see AC_CHECK_SIZEOF for more information.
-{ $as_echo "$as_me:$LINENO: checking alignment of short" >&5
-$as_echo_n "checking alignment of short... " >&6; }
-if test "${ac_cv_alignof_short+set}" = set; then
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
+$as_echo_n "checking size of size_t... " >&6; }
+if test "${ac_cv_sizeof_size_t+set}" = set; then
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
test_array [0] = 0
;
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
test_array [0] = 0
;
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
test_array [0] = 0
;
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
test_array [0] = 0
;
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
test_array [0] = 0
;
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
-?*) ac_cv_alignof_short=$ac_lo;;
-'') if test "$ac_cv_type_short" = yes; then
+?*) ac_cv_sizeof_size_t=$ac_lo;;
+'') if test "$ac_cv_type_size_t" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of short
+$as_echo "$as_me: error: cannot compute sizeof (size_t)
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_short=0
+ ac_cv_sizeof_size_t=0
fi ;;
esac
else
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; short y; } ac__type_alignof_;
-static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
-static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
+static long int longval () { return (long int) (sizeof (size_t)); }
+static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
#include <stdio.h>
#include <stdlib.h>
int
FILE *f = fopen ("conftest.val", "w");
if (! f)
return 1;
- if (((long int) offsetof (ac__type_alignof_, y)) < 0)
+ if (((long int) (sizeof (size_t))) < 0)
{
long int i = longval ();
- if (i != ((long int) offsetof (ac__type_alignof_, y)))
+ if (i != ((long int) (sizeof (size_t))))
return 1;
fprintf (f, "%ld", i);
}
else
{
unsigned long int i = ulongval ();
- if (i != ((long int) offsetof (ac__type_alignof_, y)))
+ if (i != ((long int) (sizeof (size_t))))
return 1;
fprintf (f, "%lu", i);
}
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_alignof_short=`cat conftest.val`
+ ac_cv_sizeof_size_t=`cat conftest.val`
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-if test "$ac_cv_type_short" = yes; then
+if test "$ac_cv_type_size_t" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of short
+$as_echo "$as_me: error: cannot compute sizeof (size_t)
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_short=0
+ ac_cv_sizeof_size_t=0
fi
fi
rm -rf conftest.dSYM
fi
rm -f conftest.val
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
-$as_echo "$ac_cv_alignof_short" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
+$as_echo "$ac_cv_sizeof_size_t" >&6; }
cat >>confdefs.h <<_ACEOF
-#define ALIGNOF_SHORT $ac_cv_alignof_short
+#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
_ACEOF
-# The cast to long int works around a bug in the HP C Compiler,
-# see AC_CHECK_SIZEOF for more information.
-{ $as_echo "$as_me:$LINENO: checking alignment of int" >&5
-$as_echo_n "checking alignment of int... " >&6; }
-if test "${ac_cv_alignof_int+set}" = set; then
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if test "${ac_cv_sizeof_long+set}" = set; then
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; int y; } ac__type_alignof_;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
test_array [0] = 0
;
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; int y; } ac__type_alignof_;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0
;
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; int y; } ac__type_alignof_;
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
test_array [0] = 0
;
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; int y; } ac__type_alignof_;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
test_array [0] = 0
;
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; int y; } ac__type_alignof_;
int
main ()
{
-static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
test_array [0] = 0
;
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
-?*) ac_cv_alignof_int=$ac_lo;;
-'') if test "$ac_cv_type_int" = yes; then
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of int
+$as_echo "$as_me: error: cannot compute sizeof (long)
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_int=0
+ ac_cv_sizeof_long=0
fi ;;
esac
else
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
$ac_includes_default
-#ifndef offsetof
-# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
-#endif
-typedef struct { char x; int y; } ac__type_alignof_;
-static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
-static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
+static long int longval () { return (long int) (sizeof (long)); }
+static unsigned long int ulongval () { return (long int) (sizeof (long)); }
#include <stdio.h>
#include <stdlib.h>
int
FILE *f = fopen ("conftest.val", "w");
if (! f)
return 1;
- if (((long int) offsetof (ac__type_alignof_, y)) < 0)
+ if (((long int) (sizeof (long))) < 0)
{
long int i = longval ();
- if (i != ((long int) offsetof (ac__type_alignof_, y)))
+ if (i != ((long int) (sizeof (long))))
return 1;
fprintf (f, "%ld", i);
}
else
{
unsigned long int i = ulongval ();
- if (i != ((long int) offsetof (ac__type_alignof_, y)))
+ if (i != ((long int) (sizeof (long))))
return 1;
fprintf (f, "%lu", i);
}
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_alignof_int=`cat conftest.val`
+ ac_cv_sizeof_long=`cat conftest.val`
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-if test "$ac_cv_type_int" = yes; then
+if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of int
+$as_echo "$as_me: error: cannot compute sizeof (long)
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_int=0
+ ac_cv_sizeof_long=0
fi
fi
rm -rf conftest.dSYM
fi
rm -f conftest.val
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
-$as_echo "$ac_cv_alignof_int" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
cat >>confdefs.h <<_ACEOF
-#define ALIGNOF_INT $ac_cv_alignof_int
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+# Decide whether float4 is passed by value: user-selectable, enabled by default
+{ $as_echo "$as_me:$LINENO: checking whether to build with float4 passed by value" >&5
+$as_echo_n "checking whether to build with float4 passed by value... " >&6; }
+
+
+# Check whether --enable-float4-byval was given.
+if test "${enable_float4_byval+set}" = set; then
+ enableval=$enable_float4_byval;
+ case $enableval in
+ yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_FLOAT4_BYVAL 1
+_ACEOF
+
+ float4passbyval=true
+ ;;
+ no)
+ float4passbyval=false
+ ;;
+ *)
+ { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float4-byval option" >&5
+$as_echo "$as_me: error: no argument expected for --enable-float4-byval option" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+else
+ enable_float4_byval=yes
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_FLOAT4_BYVAL 1
+_ACEOF
+
+ float4passbyval=true
+fi
+
+
+{ $as_echo "$as_me:$LINENO: result: $enable_float4_byval" >&5
+$as_echo "$enable_float4_byval" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define FLOAT4PASSBYVAL $float4passbyval
+_ACEOF
+
+
+# Decide whether float8 is passed by value.
+# Note: this setting also controls int8 and related types such as timestamp.
+# If sizeof(Datum) >= 8, this is user-selectable, enabled by default.
+# If not, trying to select it is an error.
+{ $as_echo "$as_me:$LINENO: checking whether to build with float8 passed by value" >&5
+$as_echo_n "checking whether to build with float8 passed by value... " >&6; }
+if test $ac_cv_sizeof_void_p -ge 8 ; then
+
+
+# Check whether --enable-float8-byval was given.
+if test "${enable_float8_byval+set}" = set; then
+ enableval=$enable_float8_byval;
+ case $enableval in
+ yes)
+ :
+ ;;
+ no)
+ :
+ ;;
+ *)
+ { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
+$as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+else
+ enable_float8_byval=yes
+
+fi
+
+
+else
+
+
+# Check whether --enable-float8-byval was given.
+if test "${enable_float8_byval+set}" = set; then
+ enableval=$enable_float8_byval;
+ case $enableval in
+ yes)
+ :
+ ;;
+ no)
+ :
+ ;;
+ *)
+ { { $as_echo "$as_me:$LINENO: error: no argument expected for --enable-float8-byval option" >&5
+$as_echo "$as_me: error: no argument expected for --enable-float8-byval option" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+
+else
+ enable_float8_byval=no
+
+fi
+
+
+ if test "$enable_float8_byval" = yes ; then
+ { { $as_echo "$as_me:$LINENO: error: --enable-float8-byval is not supported on 32-bit platforms." >&5
+$as_echo "$as_me: error: --enable-float8-byval is not supported on 32-bit platforms." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+fi
+if test "$enable_float8_byval" = yes ; then
+
+cat >>confdefs.h <<\_ACEOF
+#define USE_FLOAT8_BYVAL 1
+_ACEOF
+
+ float8passbyval=true
+else
+ float8passbyval=false
+fi
+{ $as_echo "$as_me:$LINENO: result: $enable_float8_byval" >&5
+$as_echo "$enable_float8_byval" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define FLOAT8PASSBYVAL $float8passbyval
_ACEOF
+# Determine memory alignment requirements for the basic C data types.
+
# The cast to long int works around a bug in the HP C Compiler,
# see AC_CHECK_SIZEOF for more information.
-{ $as_echo "$as_me:$LINENO: checking alignment of long" >&5
-$as_echo_n "checking alignment of long... " >&6; }
-if test "${ac_cv_alignof_long+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking alignment of short" >&5
+$as_echo_n "checking alignment of short... " >&6; }
+if test "${ac_cv_alignof_short+set}" = set; then
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long y; } ac__type_alignof_;
+typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long y; } ac__type_alignof_;
+typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long y; } ac__type_alignof_;
+typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long y; } ac__type_alignof_;
+typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long y; } ac__type_alignof_;
+typedef struct { char x; short y; } ac__type_alignof_;
int
main ()
{
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
-?*) ac_cv_alignof_long=$ac_lo;;
-'') if test "$ac_cv_type_long" = yes; then
+?*) ac_cv_alignof_short=$ac_lo;;
+'') if test "$ac_cv_type_short" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of long
+$as_echo "$as_me: error: cannot compute alignment of short
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_long=0
+ ac_cv_alignof_short=0
fi ;;
esac
else
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long y; } ac__type_alignof_;
+typedef struct { char x; short y; } ac__type_alignof_;
static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
#include <stdio.h>
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_alignof_long=`cat conftest.val`
+ ac_cv_alignof_short=`cat conftest.val`
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-if test "$ac_cv_type_long" = yes; then
+if test "$ac_cv_type_short" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of short
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of long
+$as_echo "$as_me: error: cannot compute alignment of short
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_long=0
+ ac_cv_alignof_short=0
fi
fi
rm -rf conftest.dSYM
fi
rm -f conftest.val
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
-$as_echo "$ac_cv_alignof_long" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_short" >&5
+$as_echo "$ac_cv_alignof_short" >&6; }
cat >>confdefs.h <<_ACEOF
-#define ALIGNOF_LONG $ac_cv_alignof_long
+#define ALIGNOF_SHORT $ac_cv_alignof_short
_ACEOF
-if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
- # The cast to long int works around a bug in the HP C Compiler,
+# The cast to long int works around a bug in the HP C Compiler,
# see AC_CHECK_SIZEOF for more information.
-{ $as_echo "$as_me:$LINENO: checking alignment of long long int" >&5
-$as_echo_n "checking alignment of long long int... " >&6; }
-if test "${ac_cv_alignof_long_long_int+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking alignment of int" >&5
+$as_echo_n "checking alignment of int... " >&6; }
+if test "${ac_cv_alignof_int+set}" = set; then
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long long int y; } ac__type_alignof_;
+typedef struct { char x; int y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long long int y; } ac__type_alignof_;
+typedef struct { char x; int y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long long int y; } ac__type_alignof_;
+typedef struct { char x; int y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long long int y; } ac__type_alignof_;
+typedef struct { char x; int y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long long int y; } ac__type_alignof_;
+typedef struct { char x; int y; } ac__type_alignof_;
int
main ()
{
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
-?*) ac_cv_alignof_long_long_int=$ac_lo;;
-'') if test "$ac_cv_type_long_long_int" = yes; then
+?*) ac_cv_alignof_int=$ac_lo;;
+'') if test "$ac_cv_type_int" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of long long int
+$as_echo "$as_me: error: cannot compute alignment of int
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_long_long_int=0
+ ac_cv_alignof_int=0
fi ;;
esac
else
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; long long int y; } ac__type_alignof_;
+typedef struct { char x; int y; } ac__type_alignof_;
static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
#include <stdio.h>
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_alignof_long_long_int=`cat conftest.val`
+ ac_cv_alignof_int=`cat conftest.val`
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-if test "$ac_cv_type_long_long_int" = yes; then
+if test "$ac_cv_type_int" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of int
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of long long int
+$as_echo "$as_me: error: cannot compute alignment of int
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_long_long_int=0
+ ac_cv_alignof_int=0
fi
fi
rm -rf conftest.dSYM
fi
rm -f conftest.val
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
-$as_echo "$ac_cv_alignof_long_long_int" >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_int" >&5
+$as_echo "$ac_cv_alignof_int" >&6; }
cat >>confdefs.h <<_ACEOF
-#define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
+#define ALIGNOF_INT $ac_cv_alignof_int
_ACEOF
-fi
# The cast to long int works around a bug in the HP C Compiler,
# see AC_CHECK_SIZEOF for more information.
-{ $as_echo "$as_me:$LINENO: checking alignment of double" >&5
-$as_echo_n "checking alignment of double... " >&6; }
-if test "${ac_cv_alignof_double+set}" = set; then
+{ $as_echo "$as_me:$LINENO: checking alignment of long" >&5
+$as_echo_n "checking alignment of long... " >&6; }
+if test "${ac_cv_alignof_long+set}" = set; then
$as_echo_n "(cached) " >&6
else
if test "$cross_compiling" = yes; then
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; double y; } ac__type_alignof_;
+typedef struct { char x; long y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; double y; } ac__type_alignof_;
+typedef struct { char x; long y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; double y; } ac__type_alignof_;
+typedef struct { char x; long y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; double y; } ac__type_alignof_;
+typedef struct { char x; long y; } ac__type_alignof_;
int
main ()
{
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; double y; } ac__type_alignof_;
+typedef struct { char x; long y; } ac__type_alignof_;
int
main ()
{
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
done
case $ac_lo in
-?*) ac_cv_alignof_double=$ac_lo;;
-'') if test "$ac_cv_type_double" = yes; then
+?*) ac_cv_alignof_long=$ac_lo;;
+'') if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of double
+$as_echo "$as_me: error: cannot compute alignment of long
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_double=0
+ ac_cv_alignof_long=0
fi ;;
esac
else
#ifndef offsetof
# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-typedef struct { char x; double y; } ac__type_alignof_;
+typedef struct { char x; long y; } ac__type_alignof_;
static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
#include <stdio.h>
ac_status=$?
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
- ac_cv_alignof_double=`cat conftest.val`
+ ac_cv_alignof_long=`cat conftest.val`
else
$as_echo "$as_me: program exited with status $ac_status" >&5
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
( exit $ac_status )
-if test "$ac_cv_type_double" = yes; then
+if test "$ac_cv_type_long" = yes; then
{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long
See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute alignment of double
+$as_echo "$as_me: error: cannot compute alignment of long
See \`config.log' for more details." >&2;}
{ (exit 77); exit 77; }; }; }
else
- ac_cv_alignof_double=0
+ ac_cv_alignof_long=0
fi
fi
rm -rf conftest.dSYM
fi
rm -f conftest.val
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
-$as_echo "$ac_cv_alignof_double" >&6; }
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define ALIGNOF_DOUBLE $ac_cv_alignof_double
-_ACEOF
-
-
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long" >&5
+$as_echo "$ac_cv_alignof_long" >&6; }
-# Compute maximum alignment of any basic type.
-# We assume long's alignment is at least as strong as char, short, or int;
-# but we must check long long (if it exists) and double.
-MAX_ALIGNOF=$ac_cv_alignof_long
-if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
- MAX_ALIGNOF=$ac_cv_alignof_double
-fi
-if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
- MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
-fi
cat >>confdefs.h <<_ACEOF
-#define MAXIMUM_ALIGNOF $MAX_ALIGNOF
+#define ALIGNOF_LONG $ac_cv_alignof_long
_ACEOF
-
-# Some platforms predefine the types int8, int16, etc. Only check
-# a (hopefully) representative subset.
-{ $as_echo "$as_me:$LINENO: checking for int8" >&5
-$as_echo_n "checking for int8... " >&6; }
-if test "${ac_cv_type_int8+set}" = set; then
+if test x"$HAVE_LONG_LONG_INT_64" = x"yes" ; then
+ # The cast to long int works around a bug in the HP C Compiler,
+# see AC_CHECK_SIZEOF for more information.
+{ $as_echo "$as_me:$LINENO: checking alignment of long long int" >&5
+$as_echo_n "checking alignment of long long int... " >&6; }
+if test "${ac_cv_alignof_long_long_int+set}" = set; then
$as_echo_n "(cached) " >&6
else
- ac_cv_type_int8=no
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-
+typedef struct { char x; long long int y; } ac__type_alignof_;
int
main ()
{
-if (sizeof (int8))
- return 0;
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
+test_array [0] = 0
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- cat >conftest.$ac_ext <<_ACEOF
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-
+typedef struct { char x; long long int y; } ac__type_alignof_;
int
main ()
{
-if (sizeof ((int8)))
- return 0;
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- :
+ ac_hi=$ac_mid; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_int8=yes
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
-$as_echo "$ac_cv_type_int8" >&6; }
-if test "x$ac_cv_type_int8" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT8 1
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
+#endif
+typedef struct { char x; long long int y; } ac__type_alignof_;
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
+test_array [0] = 0
-
-fi
-{ $as_echo "$as_me:$LINENO: checking for uint8" >&5
-$as_echo_n "checking for uint8... " >&6; }
-if test "${ac_cv_type_uint8+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_uint8=no
-cat >conftest.$ac_ext <<_ACEOF
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-
+typedef struct { char x; long long int y; } ac__type_alignof_;
int
main ()
{
-if (sizeof (uint8))
- return 0;
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-
+typedef struct { char x; long long int y; } ac__type_alignof_;
int
main ()
{
-if (sizeof ((uint8)))
- return 0;
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- :
+ ac_hi=$ac_mid
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_uint8=yes
+ ac_lo=`expr '(' $ac_mid ')' + 1`
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_alignof_long_long_int=$ac_lo;;
+'') if test "$ac_cv_type_long_long_int" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute alignment of long long int
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_alignof_long_long_int=0
+ fi ;;
+esac
else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
+#endif
+typedef struct { char x; long long int y; } ac__type_alignof_;
+static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
+static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) offsetof (ac__type_alignof_, y)) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) offsetof (ac__type_alignof_, y)))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) offsetof (ac__type_alignof_, y)))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
-fi
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_alignof_long_long_int=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+( exit $ac_status )
+if test "$ac_cv_type_long_long_int" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of long long int
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute alignment of long long int
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_alignof_long_long_int=0
+ fi
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
-$as_echo "$ac_cv_type_uint8" >&6; }
-if test "x$ac_cv_type_uint8" = x""yes; then
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_long_long_int" >&5
+$as_echo "$ac_cv_alignof_long_long_int" >&6; }
+
+
cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT8 1
+#define ALIGNOF_LONG_LONG_INT $ac_cv_alignof_long_long_int
_ACEOF
fi
-{ $as_echo "$as_me:$LINENO: checking for int64" >&5
-$as_echo_n "checking for int64... " >&6; }
-if test "${ac_cv_type_int64+set}" = set; then
+# The cast to long int works around a bug in the HP C Compiler,
+# see AC_CHECK_SIZEOF for more information.
+{ $as_echo "$as_me:$LINENO: checking alignment of double" >&5
+$as_echo_n "checking alignment of double... " >&6; }
+if test "${ac_cv_alignof_double+set}" = set; then
$as_echo_n "(cached) " >&6
else
- ac_cv_type_int64=no
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-
+typedef struct { char x; double y; } ac__type_alignof_;
int
main ()
{
-if (sizeof (int64))
- return 0;
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= 0)];
+test_array [0] = 0
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- cat >conftest.$ac_ext <<_ACEOF
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-
+typedef struct { char x; double y; } ac__type_alignof_;
int
main ()
{
-if (sizeof ((int64)))
- return 0;
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- :
+ ac_hi=$ac_mid; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_int64=yes
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
-$as_echo "$ac_cv_type_int64" >&6; }
-if test "x$ac_cv_type_int64" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_INT64 1
-_ACEOF
-
-
-fi
-{ $as_echo "$as_me:$LINENO: checking for uint64" >&5
-$as_echo_n "checking for uint64... " >&6; }
-if test "${ac_cv_type_uint64+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_uint64=no
-cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-
+typedef struct { char x; double y; } ac__type_alignof_;
int
main ()
{
-if (sizeof (uint64))
- return 0;
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) < 0)];
+test_array [0] = 0
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- cat >conftest.$ac_ext <<_ACEOF
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <stdio.h>
-#ifdef HAVE_SUPPORTDEFS_H
-#include <SupportDefs.h>
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
#endif
-
+typedef struct { char x; double y; } ac__type_alignof_;
int
main ()
{
-if (sizeof ((uint64)))
- return 0;
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) >= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- :
+ ac_lo=$ac_mid; break
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_uint64=yes
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
+ ac_lo= ac_hi=
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
-$as_echo "$ac_cv_type_uint64" >&6; }
-if test "x$ac_cv_type_uint64" = x""yes; then
-
-cat >>confdefs.h <<_ACEOF
-#define HAVE_UINT64 1
-_ACEOF
-
-
-fi
-
-
-# We also check for sig_atomic_t, which *should* be defined per ANSI
-# C, but is missing on some old platforms.
-{ $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
-$as_echo_n "checking for sig_atomic_t... " >&6; }
-if test "${ac_cv_type_sig_atomic_t+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_type_sig_atomic_t=no
-cat >conftest.$ac_ext <<_ACEOF
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <signal.h>
-
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
+#endif
+typedef struct { char x; double y; } ac__type_alignof_;
int
main ()
{
-if (sizeof (sig_atomic_t))
- return 0;
+static int test_array [1 - 2 * !(((long int) offsetof (ac__type_alignof_, y)) <= $ac_mid)];
+test_array [0] = 0
+
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_alignof_double=$ac_lo;;
+'') if test "$ac_cv_type_double" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute alignment of double
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_alignof_double=0
+ fi ;;
+esac
+else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <signal.h>
-
+$ac_includes_default
+#ifndef offsetof
+# define offsetof(type, member) ((char *) &((type *) 0)->member - (char *) 0)
+#endif
+typedef struct { char x; double y; } ac__type_alignof_;
+static long int longval () { return (long int) offsetof (ac__type_alignof_, y); }
+static unsigned long int ulongval () { return (long int) offsetof (ac__type_alignof_, y); }
+#include <stdio.h>
+#include <stdlib.h>
int
main ()
{
-if (sizeof ((sig_atomic_t)))
- return 0;
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) offsetof (ac__type_alignof_, y)) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) offsetof (ac__type_alignof_, y)))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) offsetof (ac__type_alignof_, y)))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>&5
ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
$as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- :
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_alignof_double=`cat conftest.val`
else
- $as_echo "$as_me: failed program was:" >&5
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_cv_type_sig_atomic_t=yes
+( exit $ac_status )
+if test "$ac_cv_type_double" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute alignment of double
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute alignment of double
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_alignof_double=0
+ fi
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+rm -f conftest.val
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
-$as_echo "$ac_cv_type_sig_atomic_t" >&6; }
-if test "x$ac_cv_type_sig_atomic_t" = x""yes; then
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_alignof_double" >&5
+$as_echo "$ac_cv_alignof_double" >&6; }
+
+
cat >>confdefs.h <<_ACEOF
-#define HAVE_SIG_ATOMIC_T 1
+#define ALIGNOF_DOUBLE $ac_cv_alignof_double
_ACEOF
+
+# Compute maximum alignment of any basic type.
+# We assume long's alignment is at least as strong as char, short, or int;
+# but we must check long long (if it exists) and double.
+
+MAX_ALIGNOF=$ac_cv_alignof_long
+if test $MAX_ALIGNOF -lt $ac_cv_alignof_double ; then
+ MAX_ALIGNOF=$ac_cv_alignof_double
+fi
+if test x"$HAVE_LONG_LONG_INT_64" = xyes && test $MAX_ALIGNOF -lt $ac_cv_alignof_long_long_int ; then
+ MAX_ALIGNOF="$ac_cv_alignof_long_long_int"
fi
+cat >>confdefs.h <<_ACEOF
+#define MAXIMUM_ALIGNOF $MAX_ALIGNOF
+_ACEOF
-if test "$PORTNAME" != "win32"
-then
-{ $as_echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
-$as_echo_n "checking for POSIX signal interface... " >&6; }
-if test "${pgac_cv_func_posix_signals+set}" = set; then
+
+# Some platforms predefine the types int8, int16, etc. Only check
+# a (hopefully) representative subset.
+{ $as_echo "$as_me:$LINENO: checking for int8" >&5
+$as_echo_n "checking for int8... " >&6; }
+if test "${ac_cv_type_int8+set}" = set; then
$as_echo_n "(cached) " >&6
else
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_int8=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <signal.h>
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
int
main ()
{
-struct sigaction act, oact;
-sigemptyset(&act.sa_mask);
-act.sa_flags = SA_RESTART;
-sigaction(0, &act, &oact);
+if (sizeof (int8))
+ return 0;
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (ac_try="$ac_link"
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>conftest.er1
+ (eval "$ac_compile") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest$ac_exeext && {
- test "$cross_compiling" = yes ||
- $as_test_x conftest$ac_exeext
- }; then
- pgac_cv_func_posix_signals=yes
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- pgac_cv_func_posix_signals=no
-fi
-
-rm -rf conftest.dSYM
-rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
- conftest$ac_exeext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
-$as_echo "$pgac_cv_func_posix_signals" >&6; }
-if test x"$pgac_cv_func_posix_signals" = xyes ; then
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_POSIX_SIGNALS /**/
-_ACEOF
-
-fi
-HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
-
-if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
- { { $as_echo "$as_me:$LINENO: error:
-Thread-safety requires POSIX signals, which are not supported by this
-operating system; use --disable-thread-safety to disable thread safety." >&5
-$as_echo "$as_me: error:
-Thread-safety requires POSIX signals, which are not supported by this
-operating system; use --disable-thread-safety to disable thread safety." >&2;}
- { (exit 1); exit 1; }; }
-fi
-fi
-
-if test $ac_cv_func_fseeko = yes; then
-# Check whether --enable-largefile was given.
-if test "${enable_largefile+set}" = set; then
- enableval=$enable_largefile;
-fi
-
-if test "$enable_largefile" != no; then
-
- { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
-$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
-if test "${ac_cv_sys_largefile_CC+set}" = set; then
- $as_echo_n "(cached) " >&6
-else
- ac_cv_sys_largefile_CC=no
- if test "$GCC" != yes; then
- ac_save_CC=$CC
- while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
- cat >conftest.$ac_ext <<_ACEOF
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
+
int
main ()
{
-
+if (sizeof ((int8)))
+ return 0;
;
return 0;
}
_ACEOF
- rm -f conftest.$ac_objext
+rm -f conftest.$ac_objext
if { (ac_try="$ac_compile"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- break
+ :
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
-
+ ac_cv_type_int8=yes
fi
-rm -f core conftest.err conftest.$ac_objext
- CC="$CC -n32"
- rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_cv_sys_largefile_CC=' -n32'; break
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
-rm -f core conftest.err conftest.$ac_objext
- break
- done
- CC=$ac_save_CC
- rm -f conftest.$ac_ext
- fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
-$as_echo "$ac_cv_sys_largefile_CC" >&6; }
- if test "$ac_cv_sys_largefile_CC" != no; then
- CC=$CC$ac_cv_sys_largefile_CC
- fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int8" >&5
+$as_echo "$ac_cv_type_int8" >&6; }
+if test "x$ac_cv_type_int8" = x""yes; then
- { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
-$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
-if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INT8 1
+_ACEOF
+
+
+fi
+{ $as_echo "$as_me:$LINENO: checking for uint8" >&5
+$as_echo_n "checking for uint8... " >&6; }
+if test "${ac_cv_type_uint8+set}" = set; then
$as_echo_n "(cached) " >&6
else
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_uint8=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
+
int
main ()
{
-
+if (sizeof (uint8))
+ return 0;
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_sys_file_offset_bits=no; break
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#define _FILE_OFFSET_BITS 64
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
+
int
main ()
{
-
+if (sizeof ((uint8)))
+ return 0;
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_sys_file_offset_bits=64; break
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_uint8=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_sys_file_offset_bits=unknown
- break
-done
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
-$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
-case $ac_cv_sys_file_offset_bits in #(
- no | unknown) ;;
- *)
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint8" >&5
+$as_echo "$ac_cv_type_uint8" >&6; }
+if test "x$ac_cv_type_uint8" = x""yes; then
+
cat >>confdefs.h <<_ACEOF
-#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+#define HAVE_UINT8 1
_ACEOF
-;;
-esac
-rm -rf conftest*
- if test $ac_cv_sys_file_offset_bits = unknown; then
- { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
-$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
-if test "${ac_cv_sys_large_files+set}" = set; then
+
+
+fi
+{ $as_echo "$as_me:$LINENO: checking for int64" >&5
+$as_echo_n "checking for int64... " >&6; }
+if test "${ac_cv_type_int64+set}" = set; then
$as_echo_n "(cached) " >&6
else
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
+ ac_cv_type_int64=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
+
int
main ()
{
-
+if (sizeof (int64))
+ return 0;
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_sys_large_files=no; break
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-#define _LARGE_FILES 1
-#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
- since some C++ compilers masquerading as C compilers
- incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
- int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1];
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
+
int
main ()
{
-
+if (sizeof ((int64)))
+ return 0;
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_cv_sys_large_files=1; break
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_int64=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- ac_cv_sys_large_files=unknown
- break
-done
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
-$as_echo "$ac_cv_sys_large_files" >&6; }
-case $ac_cv_sys_large_files in #(
- no | unknown) ;;
- *)
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_int64" >&5
+$as_echo "$ac_cv_type_int64" >&6; }
+if test "x$ac_cv_type_int64" = x""yes; then
+
cat >>confdefs.h <<_ACEOF
-#define _LARGE_FILES $ac_cv_sys_large_files
+#define HAVE_INT64 1
_ACEOF
-;;
-esac
-rm -rf conftest*
- fi
-fi
-fi
-# Check for largefile support (must be after AC_SYS_LARGEFILE)
-# The cast to long int works around a bug in the HP C Compiler
-# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
-# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
-# This bug is HP SR number 8606223364.
-{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
-$as_echo_n "checking size of off_t... " >&6; }
-if test "${ac_cv_sizeof_off_t+set}" = set; then
+fi
+{ $as_echo "$as_me:$LINENO: checking for uint64" >&5
+$as_echo_n "checking for uint64... " >&6; }
+if test "${ac_cv_type_uint64+set}" = set; then
$as_echo_n "(cached) " >&6
else
- if test "$cross_compiling" = yes; then
- # Depending upon the size, compute the lo and hi bounds.
+ ac_cv_type_uint64=no
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
+
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)];
-test_array [0] = 0
-
+if (sizeof (uint64))
+ return 0;
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_lo=0 ac_mid=0
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <stdio.h>
+#ifdef HAVE_SUPPORTDEFS_H
+#include <SupportDefs.h>
+#endif
+
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
-test_array [0] = 0
-
+if (sizeof ((uint64)))
+ return 0;
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_hi=$ac_mid; break
+ :
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_lo=`expr $ac_mid + 1`
- if test $ac_lo -le $ac_mid; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid + 1`
+ ac_cv_type_uint64=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- cat >conftest.$ac_ext <<_ACEOF
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uint64" >&5
+$as_echo "$ac_cv_type_uint64" >&6; }
+if test "x$ac_cv_type_uint64" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_UINT64 1
+_ACEOF
+
+
+fi
+
+
+# We also check for sig_atomic_t, which *should* be defined per ANSI
+# C, but is missing on some old platforms.
+{ $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
+$as_echo_n "checking for sig_atomic_t... " >&6; }
+if test "${ac_cv_type_sig_atomic_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_sig_atomic_t=no
+cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <signal.h>
+
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)];
-test_array [0] = 0
-
+if (sizeof (sig_atomic_t))
+ return 0;
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_hi=-1 ac_mid=-1
- while :; do
- cat >conftest.$ac_ext <<_ACEOF
+ cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <signal.h>
+
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)];
-test_array [0] = 0
-
+if (sizeof ((sig_atomic_t)))
+ return 0;
;
return 0;
}
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
} && test -s conftest.$ac_objext; then
- ac_lo=$ac_mid; break
+ :
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_hi=`expr '(' $ac_mid ')' - 1`
- if test $ac_mid -le $ac_hi; then
- ac_lo= ac_hi=
- break
- fi
- ac_mid=`expr 2 '*' $ac_mid`
+ ac_cv_type_sig_atomic_t=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
- done
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_lo= ac_hi=
+
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
+$as_echo "$ac_cv_type_sig_atomic_t" >&6; }
+if test "x$ac_cv_type_sig_atomic_t" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIG_ATOMIC_T 1
+_ACEOF
+
+
+fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-# Binary search between lo and hi bounds.
-while test "x$ac_lo" != "x$ac_hi"; do
- ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+
+
+if test "$PORTNAME" != "win32"
+then
+{ $as_echo "$as_me:$LINENO: checking for POSIX signal interface" >&5
+$as_echo_n "checking for POSIX signal interface... " >&6; }
+if test "${pgac_cv_func_posix_signals+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
cat >conftest.$ac_ext <<_ACEOF
/* confdefs.h. */
_ACEOF
cat confdefs.h >>conftest.$ac_ext
cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
-$ac_includes_default
+#include <signal.h>
+
int
main ()
{
-static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
-test_array [0] = 0
-
+struct sigaction act, oact;
+sigemptyset(&act.sa_mask);
+act.sa_flags = SA_RESTART;
+sigaction(0, &act, &oact);
;
return 0;
}
_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
case "(($ac_try" in
*\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
*) ac_try_echo=$ac_try;;
esac
eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
$as_echo "$ac_try_echo") >&5
- (eval "$ac_compile") 2>conftest.er1
+ (eval "$ac_link") 2>conftest.er1
ac_status=$?
grep -v '^ *+' conftest.er1 >conftest.err
rm -f conftest.er1
(exit $ac_status); } && {
test -z "$ac_c_werror_flag" ||
test ! -s conftest.err
- } && test -s conftest.$ac_objext; then
- ac_hi=$ac_mid
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ pgac_cv_func_posix_signals=yes
else
$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
- ac_lo=`expr '(' $ac_mid ')' + 1`
+ pgac_cv_func_posix_signals=no
fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-done
-case $ac_lo in
-?*) ac_cv_sizeof_off_t=$ac_lo;;
-'') if test "$ac_cv_type_off_t" = yes; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (off_t)
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }; }
- else
- ac_cv_sizeof_off_t=0
- fi ;;
-esac
-else
- cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-$ac_includes_default
-static long int longval () { return (long int) (sizeof (off_t)); }
-static unsigned long int ulongval () { return (long int) (sizeof (off_t)); }
-#include <stdio.h>
-#include <stdlib.h>
-int
-main ()
-{
-
- FILE *f = fopen ("conftest.val", "w");
- if (! f)
- return 1;
- if (((long int) (sizeof (off_t))) < 0)
- {
- long int i = longval ();
- if (i != ((long int) (sizeof (off_t))))
- return 1;
- fprintf (f, "%ld", i);
- }
- else
- {
- unsigned long int i = ulongval ();
- if (i != ((long int) (sizeof (off_t))))
- return 1;
- fprintf (f, "%lu", i);
- }
- /* Do not output a trailing newline, as this causes \r\n confusion
- on some platforms. */
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest$ac_exeext
-if { (ac_try="$ac_link"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
- { (case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
-$as_echo "$ac_try_echo") >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_sizeof_off_t=`cat conftest.val`
-else
- $as_echo "$as_me: program exited with status $ac_status" >&5
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-( exit $ac_status )
-if test "$ac_cv_type_off_t" = yes; then
- { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
-See \`config.log' for more details." >&5
-$as_echo "$as_me: error: cannot compute sizeof (off_t)
-See \`config.log' for more details." >&2;}
- { (exit 77); exit 77; }; }; }
- else
- ac_cv_sizeof_off_t=0
- fi
-fi
rm -rf conftest.dSYM
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
-fi
-rm -f conftest.val
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
fi
-{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
-$as_echo "$ac_cv_sizeof_off_t" >&6; }
-
-
+{ $as_echo "$as_me:$LINENO: result: $pgac_cv_func_posix_signals" >&5
+$as_echo "$pgac_cv_func_posix_signals" >&6; }
+if test x"$pgac_cv_func_posix_signals" = xyes ; then
-cat >>confdefs.h <<_ACEOF
-#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_SIGNALS /**/
_ACEOF
+fi
+HAVE_POSIX_SIGNALS=$pgac_cv_func_posix_signals
-
-# If we don't have largefile support, can't handle segsize >= 2GB.
-if test "$ac_cv_sizeof_off_t" -lt 8 -a "$segsize" != "1"; then
- { { $as_echo "$as_me:$LINENO: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&5
-$as_echo "$as_me: error: Large file support is not enabled. Segment size cannot be larger than 1GB." >&2;}
+if test "$pgac_cv_func_posix_signals" != yes -a "$enable_thread_safety" = yes; then
+ { { $as_echo "$as_me:$LINENO: error:
+Thread-safety requires POSIX signals, which are not supported by this
+operating system; use --disable-thread-safety to disable thread safety." >&5
+$as_echo "$as_me: error:
+Thread-safety requires POSIX signals, which are not supported by this
+operating system; use --disable-thread-safety to disable thread safety." >&2;}
{ (exit 1); exit 1; }; }
fi
+fi
# SunOS doesn't handle negative byte comparisons properly with +/- return
{ $as_echo "$as_me:$LINENO: checking for working memcmp" >&5