Assume C99 or later.
[bpt/emacs.git] / configure.ac
index 03b85a5..0119685 100644 (file)
@@ -670,6 +670,9 @@ fi
 
 #### Choose a compiler.
 
+dnl Don't bother to test for C89.
+AC_DEFUN([_AC_PROG_CC_C89], [$2])
+
 dnl Sets GCC=yes if using gcc.
 AC_PROG_CC([gcc cc cl clang "$XCRUN gcc" "$XCRUN clang"])
 if test -n "$XCRUN"; then
@@ -677,6 +680,9 @@ if test -n "$XCRUN"; then
   test -n "$AR" && export AR
 fi
 
+dnl Emacs needs C99 or later.
+gl_PROG_CC_C99
+
 AM_PROG_CC_C_O
 
 if test x$GCC = xyes; then
@@ -1303,7 +1309,7 @@ else
   CPPFLAGS="$C_SWITCH_SYSTEM $C_SWITCH_MACHINE $CPPFLAGS"
 fi
 
-# Suppress obsolescent Autoconf test for size_t; Emacs assumes C89 or better.
+# Suppress obsolescent Autoconf test for size_t; Emacs assumes C99 or better.
 AC_DEFUN([AC_TYPE_SIZE_T])
 # Likewise for obsolescent test for uid_t, gid_t; Emacs assumes them.
 AC_DEFUN([AC_TYPE_UID_T])
@@ -1375,13 +1381,8 @@ dnl actions.
 AC_DEFUN([EMACS_CHECK_MODULES],
   [PKG_CHECK_MODULES([$1], [$2],
      [$1_CFLAGS=`AS_ECHO(["$$1_CFLAGS"]) | sed -e "$edit_cflags"`
-      emacs_check_module_ok=:],
-     [:])
-   if $emacs_check_module_ok; then
-     m4_default([$3], [HAVE_$1=yes])
-   else
-     m4_default([$4], [HAVE_$1=no])
-   fi])
+      m4_default([$3], [HAVE_$1=yes])],
+     [m4_default([$4], [HAVE_$1=no])])])
 
 HAVE_SOUND=no
 if test "${with_sound}" != "no"; then