From be85e2d23f6ee98b8dc8467ddadd2cc03b418396 Mon Sep 17 00:00:00 2001
From: hniksic <devnull@localhost>
Date: Wed, 5 Nov 2003 04:24:53 -0800
Subject: [PATCH] [svn] Use the standard AC_C_PROTOTYPES macro.

---
 ChangeLog    |  5 +++++
 aclocal.m4   | 25 -------------------------
 configure.in | 17 +++++++----------
 3 files changed, 12 insertions(+), 35 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 0582a530..759012fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-11-05  Hrvoje Niksic  <hniksic@xemacs.org>
+
+	* configure.in: Use the Autoconf macro AC_C_PROTOTYPES instead of
+	the old AM_C_PROTOTYPES.
+
 2003-11-04  Hrvoje Niksic  <hniksic@xemacs.org>
 
 	* configure.in: Use the new form of AC_OUTPUT.
diff --git a/aclocal.m4 b/aclocal.m4
index e56ae76c..b1548daf 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -111,31 +111,6 @@ AC_DEFUN([WGET_NSL_SOCKET], [
 ])
 
 
-dnl
-dnl ansi2knr support: check whether C prototypes are available.
-dnl
-
-AC_DEFUN(AM_C_PROTOTYPES,
-[AC_REQUIRE([AM_PROG_CC_STDC])
-AC_BEFORE([$0], [AC_C_INLINE])
-AC_MSG_CHECKING([for function prototypes])
-if test "$am_cv_prog_cc_stdc" != no; then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE([PROTOTYPES], 1,
-            [Define if ANSI function prototypes are available.])
-  U= ANSI2KNR=
-else
-  AC_MSG_RESULT(no)
-  U=_ ANSI2KNR=./ansi2knr
-  # Ensure some checks needed by ansi2knr itself.
-  AC_HEADER_STDC
-  AC_CHECK_HEADERS(string.h)
-fi
-AC_SUBST(U)dnl
-AC_SUBST(ANSI2KNR)dnl
-])
-
-
 # serial 1
 
 # @defmac AC_PROG_CC_STDC
diff --git a/configure.in b/configure.in
index 097e6387..6d788311 100644
--- a/configure.in
+++ b/configure.in
@@ -148,11 +148,6 @@ case "$host_os" in
 esac
 AC_SUBST(exeext)
 
-dnl
-dnl Check if we can handle prototypes.
-dnl
-AM_C_PROTOTYPES
-
 dnl
 dnl Checks for basic compiler characteristics.
 dnl
@@ -160,16 +155,18 @@ AC_C_CONST
 AC_C_INLINE
 AC_C_VOLATILE
 AC_C_BIGENDIAN
+AC_C_PROTOTYPES
 
 dnl
-dnl Checks for headers
+dnl Checks for headers that might be missing.
 dnl
 
-dnl Check for these even though we assume their presence.  This is
-dnl because Autoconf built-in macros expect their HAVE_* constants to
-dnl be available.
+dnl Check for basic headers, even those we assume the presence of.
+dnl This is because Autoconf default includes check for STDC_HEADERS,
+dnl HAVE_SYS_TYPES_H, etc. before including them.
+AC_HEADER_STDC
 AC_CHECK_HEADERS(sys/types.h sys/stat.h)
-
+dnl Now check for the others.
 AC_CHECK_HEADERS(string.h strings.h stdarg.h unistd.h sys/time.h)
 AC_CHECK_HEADERS(termios.h sys/ioctl.h sys/select.h utime.h sys/utime.h)
 AC_CHECK_HEADERS(stdint.h inttypes.h signal.h setjmp.h pwd.h)