1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-27 12:41:57 +03:00

Replace obsolete autoconf macros with their modern replacements.

AC_TRY_COMPILE(...) -> AC_COMPILE_IFELSE([AC_LANG_PROGRAM(...)])
AC_TRY_LINK(...) -> AC_LINK_IFELSE([AC_LANG_PROGRAM(...)])
AC_TRY_RUN(...) -> AC_RUN_IFELSE([AC_LANG_PROGRAM(...)])
AC_LANG_SAVE/RESTORE -> AC_LANG_PUSH/POP
AC_DECL_SYS_SIGLIST -> AC_CHECK_DECLS(...) (per snippet in autoconf manual)

Also use AC_LANG_SOURCE instead of AC_LANG_PROGRAM, where the main()
function is not needed.

With these changes, autoconf -Wall doesn't complain anymore.

Andreas Karlsson
This commit is contained in:
Heikki Linnakangas
2015-07-02 19:21:23 +03:00
parent 7b156c1e07
commit a2edb023d0
7 changed files with 107 additions and 126 deletions

28
configure vendored
View File

@ -10465,13 +10465,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
static unsigned long int x = __builtin_bswap32(0xaabbccdd);
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
pgac_cv__builtin_bswap32=yes
@ -10495,13 +10489,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
static int x; static int y[__builtin_constant_p(x) ? x : 1];
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
pgac_cv__builtin_constant_p=yes
@ -11433,13 +11421,6 @@ else
#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 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
ac_not_found=no; break 4
@ -12338,7 +12319,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF
ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog"
if test "x$ac_cv_func_syslog" = xyes; then :
ac_fn_c_check_header_mongrel "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default"
@ -12519,7 +12499,6 @@ fi
if test "$enable_thread_safety" = yes -a "$PORTNAME" != "win32"; then
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@ -13287,13 +13266,6 @@ if test x"$HAVE_LONG_LONG_INT_64" = xyes ; then
#define INT64CONST(x) x##LL
long long int foo = INT64CONST(0x1234567890123456);
int
main ()
{
;
return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :