INN commit: trunk/m4 (10 files)

INN Commit Russ_Allbery at isc.org
Sat Jan 31 20:35:04 UTC 2009


    Date: Saturday, January 31, 2009 @ 12:35:04
  Author: iulius
Revision: 8312

Change deprecated invocations of AC_TRY_RUN, AC_TRY_LINK and AC_TRY_COMPILE
to their new equivalent AC_RUN_IFELSE, AC_LINK_IFELSE and AC_COMPILE_IFELSE
functions.
Also use AC_LANG_SOURCE and AC_LANG_PROGRAM.

Modified:
  trunk/m4/cc-flags.m4
  trunk/m4/inet-ntoa.m4
  trunk/m4/int32.m4
  trunk/m4/iov-max.m4
  trunk/m4/large-fpos.m4
  trunk/m4/mmap.m4
  trunk/m4/sendfd.m4
  trunk/m4/snprintf.m4
  trunk/m4/socket.m4
  trunk/m4/vamacros.m4

---------------+
 cc-flags.m4   |    9 +++++----
 inet-ntoa.m4  |   23 +++++++++++++----------
 int32.m4      |    6 ++++--
 iov-max.m4    |   28 ++++++++++++++++------------
 large-fpos.m4 |   12 +++++++-----
 mmap.m4       |   51 +++++++++++++++++++++++++++++----------------------
 sendfd.m4     |   20 +++++++++++---------
 snprintf.m4   |   17 ++++++++++-------
 socket.m4     |   44 ++++++++++++++++++++++++--------------------
 vamacros.m4   |   26 ++++++++++++++------------
 10 files changed, 133 insertions(+), 103 deletions(-)

Modified: cc-flags.m4
===================================================================
--- cc-flags.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ cc-flags.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -15,13 +15,14 @@
 AC_CACHE_VAL([_INN_PROG_CC_FLAG_CACHE([$1])],
 [save_CFLAGS=$CFLAGS
 CFLAGS="$CFLAGS $1"
-AC_TRY_COMPILE([], [int foo = 0;],
+AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([[]], [[int foo = 0;]])],
     [_INN_PROG_CC_FLAG_CACHE([$1])=yes],
     [_INN_PROG_CC_FLAG_CACHE([$1])=no])
 CFLAGS=$save_CFLAGS])
 AC_MSG_RESULT($_INN_PROG_CC_FLAG_CACHE([$1]))
-if test x"$_INN_PROG_CC_FLAG_CACHE([$1])" = xyes ; then
+ if test x"$_INN_PROG_CC_FLAG_CACHE([$1])" = xyes ; then
     ifelse([$2], , :, [$2])
-else
+ else
     ifelse([$3], , :, [$3])
-fi])
+ fi])

Modified: inet-ntoa.m4
===================================================================
--- inet-ntoa.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ inet-ntoa.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -9,7 +9,8 @@
 
 dnl Source used by INN_FUNC_INET_NTOA.
 define([_INN_FUNC_INET_NTOA_SOURCE],
-[#include <sys/types.h>
+[AC_LANG_SOURCE([[
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -23,18 +24,20 @@
   struct in_addr in;
   in.s_addr = htonl (0x7f000000L);
   return (!strcmp (inet_ntoa (in), "127.0.0.0") ? 0 : 1);
-}])
+}
+]])])
 
 dnl The public macro.
 AC_DEFUN([INN_FUNC_INET_NTOA],
-[AC_CACHE_CHECK(for working inet_ntoa, inn_cv_func_inet_ntoa_works,
-[AC_TRY_RUN(_INN_FUNC_INET_NTOA_SOURCE(),
-    [inn_cv_func_inet_ntoa_works=yes],
-    [inn_cv_func_inet_ntoa_works=no],
-    [inn_cv_func_inet_ntoa_works=no])])
-if test "$inn_cv_func_inet_ntoa_works" = yes ; then
+[AC_CACHE_CHECK(for working inet_ntoa,
+    [inn_cv_func_inet_ntoa_works],
+    [AC_RUN_IFELSE([_INN_FUNC_INET_NTOA_SOURCE],
+        [inn_cv_func_inet_ntoa_works=yes],
+        [inn_cv_func_inet_ntoa_works=no],
+        [inn_cv_func_inet_ntoa_works=no])])
+ if test "$inn_cv_func_inet_ntoa_works" = yes ; then
     AC_DEFINE([HAVE_INET_NTOA], 1,
         [Define if your system has a working inet_ntoa function.])
-else
+ else
     AC_LIBOBJ([inet_ntoa])
-fi])
+ fi])

Modified: int32.m4
===================================================================
--- int32.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ int32.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -15,14 +15,16 @@
 AC_DEFUN([_INN_IF_SIZEOF],
 [AC_MSG_CHECKING([size of $1])
 AC_CACHE_VAL(_INN_TYPE_CACHE([$1]),
-[AC_TRY_RUN([#include <stdio.h>
+[AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <stdio.h>
 main()
 {
     FILE *f = fopen("conftestval", "w");
     if (!f) exit(1);
     fprintf(f, "%d\n", sizeof($1));
     exit(0);
-}], _INN_TYPE_CACHE([$1])=`cat conftestval`, _INN_TYPE_CACHE([$1])=0,
+}
+]])], _INN_TYPE_CACHE([$1])=`cat conftestval`, _INN_TYPE_CACHE([$1])=0,
 ifelse([$2], , , _INN_TYPE_CACHE([$1])=$2))
 ])dnl
 AC_MSG_RESULT($_INN_TYPE_CACHE([$1]))

Modified: iov-max.m4
===================================================================
--- iov-max.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ iov-max.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -15,7 +15,8 @@
 
 dnl Source used by INN_MACRO_IOV_MAX.
 define([_INN_MACRO_IOV_MAX_SOURCE],
-[[#include <sys/types.h>
+[AC_LANG_SOURCE([[
+#include <sys/types.h>
 #include <stdio.h>
 #include <sys/uio.h>
 #include <errno.h>
@@ -62,19 +63,22 @@
 # endif /* UIO_MAXIOV */
 #endif /* IOV_MAX */
   return 0;
-}]])
+}
+]])])
 
 dnl Do the actual check.
 AC_DEFUN([INN_MACRO_IOV_MAX],
-[AC_CACHE_CHECK([value of IOV_MAX], [inn_cv_macro_iov_max],
-[AC_TRY_RUN(_INN_MACRO_IOV_MAX_SOURCE(),
-            inn_cv_macro_iov_max=`cat conftestval`,
-            inn_cv_macro_iov_max=error, 16)
-if test x"$inn_cv_macro_iov_max" = xerror ; then
-    AC_MSG_WARN([probe failure, assuming 16])
-    inn_cv_macro_iov_max=16
-fi])
-if test x"$inn_cv_macro_iov_max" != x"set in limits.h" ; then
+[AC_CACHE_CHECK([value of IOV_MAX],
+    [inn_cv_macro_iov_max],
+    [AC_RUN_IFELSE([_INN_MACRO_IOV_MAX_SOURCE],
+        inn_cv_macro_iov_max=`cat conftestval`,
+        inn_cv_macro_iov_max=error,
+        16)
+     if test x"$inn_cv_macro_iov_max" = xerror ; then
+         AC_MSG_WARN([probe failure, assuming 16])
+         inn_cv_macro_iov_max=16
+     fi])
+ if test x"$inn_cv_macro_iov_max" != x"set in limits.h" ; then
     AC_DEFINE_UNQUOTED(IOV_MAX, $inn_cv_macro_iov_max,
                        [Define to the max vectors in an iovec.])
-fi])
+ fi])

Modified: large-fpos.m4
===================================================================
--- large-fpos.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ large-fpos.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -8,7 +8,8 @@
 
 dnl Source used by INN_TYPE_FPOS_T_LARGE.
 define([_INN_TYPE_FPOS_T_LARGE_SOURCE],
-[#include <stdio.h>
+[AC_LANG_SOURCE([[
+#include <stdio.h>
 #include <sys/types.h>
 
 int
@@ -18,16 +19,17 @@
   off_t off;
   off = fpos;
   exit(off == (off_t) 9223372036854775807ULL ? 0 : 1);
-}])
+}
+]])])
 
 dnl The user-callable macro.
 AC_DEFUN([INN_TYPE_FPOS_T_LARGE],
 [AC_CACHE_CHECK([for off_t-compatible fpos_t], [inn_cv_type_fpos_t_large],
-    [AC_TRY_RUN(_INN_TYPE_FPOS_T_LARGE_SOURCE(),
+    [AC_RUN_IFELSE([_INN_TYPE_FPOS_T_LARGE_SOURCE],
         [inn_cv_type_fpos_t_large=yes],
         [inn_cv_type_fpos_t_large=no],
         [inn_cv_type_fpos_t_large=no])])
-if test "$inn_cv_type_fpos_t_large" = yes ; then
+ if test "$inn_cv_type_fpos_t_large" = yes ; then
     AC_DEFINE([HAVE_LARGE_FPOS_T], 1,
         [Define if fpos_t is at least 64 bits and compatible with off_t.])
-fi])
+ fi])

Modified: mmap.m4
===================================================================
--- mmap.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ mmap.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -24,7 +24,8 @@
 
 dnl Source used by INN_FUNC_MMAP.
 define([_INN_FUNC_MMAP_SOURCE],
-[[#include <fcntl.h>
+[AC_LANG_SOURCE([[
+#include <fcntl.h>
 #include <sys/mman.h>
 #include <stdlib.h>
 
@@ -63,28 +64,30 @@
   close (fd);
   unlink ("conftestmmaps");
   return 0;
-}]])
+}
+]])])
 
 dnl This portion is similar to what AC_FUNC_MMAP does, only it tests shared,
 dnl non-fixed mmaps.
 AC_DEFUN([INN_FUNC_MMAP],
 [AC_CACHE_CHECK([for working mmap], [inn_cv_func_mmap],
-[AC_TRY_RUN(_INN_FUNC_MMAP_SOURCE(),
+[AC_RUN_IFELSE([_INN_FUNC_MMAP_SOURCE],
     [inn_cv_func_mmap=yes],
     [inn_cv_func_mmap=no],
     [inn_cv_func_mmap=no])])
-if test $inn_cv_func_mmap = yes ; then
+ if test $inn_cv_func_mmap = yes ; then
     AC_DEFINE([HAVE_MMAP], 1,
         [Define if mmap exists and works for shared, non-fixed maps.])
     $1
-else
+ else
     :
     $2
-fi])
+ fi])
 
 dnl Source used by INN_FUNC_MMAP_NEEDS_MSYNC.
 define([_INN_FUNC_MMAP_NEEDS_MSYNC_SOURCE],
-[[#include <sys/types.h>
+[AC_LANG_SOURCE([[
+#include <sys/types.h>
 #include <fcntl.h>
 #include <sys/mman.h>
 #include <stdlib.h>
@@ -131,25 +134,27 @@
   close (fd);
   unlink ("conftestmmapm");
   return 0;
-}]])
+}
+]])])
 
 dnl Check whether the data read from an open file sees the changes made to an
 dnl mmaped region, or if msync has to be called for other applications to see
 dnl those changes.
 AC_DEFUN([INN_FUNC_MMAP_NEEDS_MSYNC],
 [AC_CACHE_CHECK([whether msync is needed], [inn_cv_func_mmap_need_msync],
-[AC_TRY_RUN(_INN_FUNC_MMAP_NEEDS_MSYNC_SOURCE(),
+[AC_RUN_IFELSE([_INN_FUNC_MMAP_NEEDS_MSYNC_SOURCE],
     [inn_cv_func_mmap_need_msync=no],
     [inn_cv_func_mmap_need_msync=yes],
     [inn_cv_func_mmap_need_msync=yes])])
-if test $inn_cv_func_mmap_need_msync = yes ; then
+ if test $inn_cv_func_mmap_need_msync = yes ; then
     AC_DEFINE([MMAP_NEEDS_MSYNC], 1,
        [Define if you need to call msync for calls to read to see changes.])
-fi])
+ fi])
 
 dnl Source used by INN_FUNC_MMAP_SEES_WRITES.
 define([_INN_FUNC_MMAP_SEES_WRITES_SOURCE],
-[[#include <stdlib.h>
+[AC_LANG_SOURCE([[
+#include <stdlib.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -185,32 +190,34 @@
         return 4;
     }
   return 0;
-}]])
+}
+]])])
 
 dnl Check if an mmaped region will see writes made to the underlying file
 dnl without an intervening msync.
 AC_DEFUN([INN_FUNC_MMAP_SEES_WRITES],
 [AC_CACHE_CHECK([whether mmap sees writes], [inn_cv_func_mmap_sees_writes],
-[AC_TRY_RUN(_INN_FUNC_MMAP_SEES_WRITES_SOURCE(),
+[AC_RUN_IFELSE([INN_FUNC_MMAP_SEES_WRITES_SOURCE],
     [inn_cv_func_mmap_sees_writes=yes],
     [inn_cv_func_mmap_sees_writes=no],
     [inn_cv_func_mmap_sees_writes=no])])
-if test $inn_cv_func_mmap_sees_writes = no ; then
+ if test $inn_cv_func_mmap_sees_writes = no ; then
     AC_DEFINE([MMAP_MISSES_WRITES], 1,
         [Define if you need to call msync after writes.])
-fi])
+ fi])
 
 dnl Check whether msync takes three arguments.  (It takes three arguments on
 dnl Solaris and Linux, two arguments on BSDI.)
 AC_DEFUN([INN_FUNC_MSYNC_ARGS],
 [AC_CACHE_CHECK([how many arguments msync takes], [inn_cv_func_msync_args],
-[AC_TRY_COMPILE(
-[#include <sys/types.h>
-#include <sys/mman.h>],
-    [char *p; int psize; msync (p, psize, MS_ASYNC);],
+[AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/mman.h>]],
+    [[char *p; int psize; msync (p, psize, MS_ASYNC);]])],
     [inn_cv_func_msync_args=3],
     [inn_cv_func_msync_args=2])])
-if test $inn_cv_func_msync_args = 3 ; then
+ if test $inn_cv_func_msync_args = 3 ; then
     AC_DEFINE([HAVE_MSYNC_3_ARG], 1,
         [Define if your msync function takes three arguments.])
-fi])
+ fi])

Modified: sendfd.m4
===================================================================
--- sendfd.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ sendfd.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -8,7 +8,8 @@
 
 dnl Source used by INN_SYS_STREAMS_SENDFD.
 define([_INN_SYS_STREAMS_SENDFD],
-[[#include <stdio.h>
+[AC_LANG_SOURCE([[
+#include <stdio.h>
 #if STDC_HEADERS || HAVE_STRING_H
 # include <string.h>
 #endif
@@ -59,17 +60,18 @@
         }
       return 0;
     }
-}]])
+}
+]])])
 
 dnl The public macro.
 AC_DEFUN([INN_SYS_STREAMS_SENDFD],
 [AC_CACHE_CHECK([whether STREAMS fd passing is supported],
-    inn_cv_sys_streams_sendfd,
-[AC_TRY_RUN(_INN_SYS_STREAMS_SENDFD,
-    [inn_cv_sys_streams_sendfd=yes],
-    [inn_cv_sys_streams_sendfd=no],
-    [inn_cv_sys_streams_sendfd=no])])
-if test "$inn_cv_sys_streams_sendfd" = yes ; then
+    [inn_cv_sys_streams_sendfd],
+    [AC_RUN_IFELSE([_INN_SYS_STREAMS_SENDFD],
+        [inn_cv_sys_streams_sendfd=yes],
+        [inn_cv_sys_streams_sendfd=no],
+        [inn_cv_sys_streams_sendfd=no])])
+ if test "$inn_cv_sys_streams_sendfd" = yes ; then
     AC_DEFINE([HAVE_STREAMS_SENDFD], 1,
         [Define if your system supports STREAMS file descriptor passing.])
-fi])
+ fi])

Modified: snprintf.m4
===================================================================
--- snprintf.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ snprintf.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -12,7 +12,8 @@
 
 dnl Source used by INN_FUNC_SNPRINTF.
 define([_INN_FUNC_SNPRINTF_SOURCE],
-[[#include <stdio.h>
+[AC_LANG_SOURCE([[
+#include <stdio.h>
 #include <stdarg.h>
 
 char buf[2];
@@ -34,18 +35,20 @@
 {
   return ((test ("%s", "abcd") == 4 && buf[0] == 'a' && buf[1] == '\0'
            && snprintf(NULL, 0, "%s", "abcd") == 4) ? 0 : 1);
-}]])
+}
+]])])
 
 dnl The user-callable test.
 AC_DEFUN([INN_FUNC_SNPRINTF],
-[AC_CACHE_CHECK([for working snprintf], [inn_cv_func_snprintf_works],
-    [AC_TRY_RUN(_INN_FUNC_SNPRINTF_SOURCE(),
+[AC_CACHE_CHECK([for working snprintf],
+    [inn_cv_func_snprintf_works],
+    [AC_RUN_IFELSE([_INN_FUNC_SNPRINTF_SOURCE],
         [inn_cv_func_snprintf_works=yes],
         [inn_cv_func_snprintf_works=no],
         [inn_cv_func_snprintf_works=no])])
-if test "$inn_cv_func_snprintf_works" = yes ; then
+ if test "$inn_cv_func_snprintf_works" = yes ; then
     AC_DEFINE([HAVE_SNPRINTF], 1,
         [Define if your system has a working snprintf function.])
-else
+ else
     AC_LIBOBJ([snprintf])
-fi])
+ fi])

Modified: socket.m4
===================================================================
--- socket.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ socket.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -15,7 +15,8 @@
 dnl Source used by INN_IN6_EQ_BROKEN.  Test borrowed from a bug report by
 dnl tmoestl at gmx.net for glibc.
 AC_DEFUN([_INN_MACRO_IN6_ARE_ADDR_EQUAL_SOURCE],
-[#include <sys/types.h>
+[AC_LANG_SOURCE([[
+#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
@@ -29,52 +30,55 @@
   inet_pton (AF_INET6, "fe80::1234:5678:abcd", &a);
   inet_pton (AF_INET6, "fe80::1234:5678:abcd", &b);
   return IN6_ARE_ADDR_EQUAL (&a,&b) ? 0 : 1;
-}])
+}
+]])])
 
 dnl Check whether the IN6_ARE_ADDR_EQUAL macro is broken (like glibc 2.1.3) or
 dnl missing.
 AC_DEFUN([INN_MACRO_IN6_ARE_ADDR_EQUAL],
 [AC_CACHE_CHECK([whether IN6_ARE_ADDR_EQUAL macro is broken],
     [inn_cv_in6_are_addr_equal_broken],
-    [AC_TRY_RUN(_INN_MACRO_IN6_ARE_ADDR_EQUAL_SOURCE,
-        inn_cv_in6_are_addr_equal_broken=no,
-        inn_cv_in6_are_addr_equal_broken=yes,
-        inn_cv_in6_are_addr_equal_broken=yes)])
-if test x"$inn_cv_in6_are_addr_equal_broken" = xyes ; then
+    [AC_RUN_IFELSE([_INN_MACRO_IN6_ARE_ADDR_EQUAL_SOURCE],
+        [inn_cv_in6_are_addr_equal_broken=no],
+        [inn_cv_in6_are_addr_equal_broken=yes],
+        [inn_cv_in6_are_addr_equal_broken=yes])])
+ if test x"$inn_cv_in6_are_addr_equal_broken" = xyes ; then
     AC_DEFINE([HAVE_BROKEN_IN6_ARE_ADDR_EQUAL], 1,
         [Define if your IN6_ARE_ADDR_EQUAL macro is broken.])
-fi])
+ fi])
 
 dnl Check whether the SA_LEN macro is available.  This should give the length
 dnl of a struct sockaddr regardless of type.
 AC_DEFUN([INN_MACRO_SA_LEN],
 [AC_CACHE_CHECK([for SA_LEN macro], [inn_cv_sa_len_macro],
-[AC_TRY_LINK(
-[#include <sys/types.h>
-#include <sys/socket.h>],
-    [struct sockaddr sa; int x = SA_LEN(&sa);],
+[AC_LINK_IFELSE(
+[AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/socket.h>]],
+    [[struct sockaddr sa; int x = SA_LEN(&sa);]])],
     [inn_cv_sa_len_macro=yes],
     [inn_cv_sa_len_macro=no])])
-if test "$inn_cv_sa_len_macro" = yes ; then
+ if test "$inn_cv_sa_len_macro" = yes ; then
     AC_DEFINE([HAVE_SA_LEN], 1,
         [Define if <sys/socket.h> defines the SA_LEN macro])
-fi])
+ fi])
 
 dnl Check for SUN_LEN, which returns the size of a struct socket regardless of
 dnl its type.  This macro is required POSIX.1g but not that widespread yet.
 dnl Sets HAVE_SUN_LEN if the macro is available.
 AC_DEFUN([INN_MACRO_SUN_LEN],
 [AC_CACHE_CHECK([for SUN_LEN macro], [inn_cv_macro_sun_len],
-[AC_TRY_LINK(
-[#include <sys/types.h>
-#include <sys/un.h>],
-    [struct sockaddr_un s_un; int i; i = SUN_LEN(&s_un);],
+[AC_LINK_IFELSE(
+[AC_LANG_PROGRAM([[
+#include <sys/types.h>
+#include <sys/un.h>]],
+    [[struct sockaddr_un s_un; int i; i = SUN_LEN(&s_un);]])],
     inn_cv_macro_sun_len=yes,
     inn_cv_macro_sun_len=no)])
-if test x"$inn_cv_macro_sun_len" = xyes ; then
+ if test x"$inn_cv_macro_sun_len" = xyes ; then
     AC_DEFINE([HAVE_SUN_LEN], 1,
         [Define if <sys/un.h> defines the SUN_LEN macro.])
-fi])
+ fi])
 
 dnl Check if Unix domain sockets are supported.  Assume that they are if
 dnl AF_UNIX is set in <sys/socket.h>.  This loses on really old versions of

Modified: vamacros.m4
===================================================================
--- vamacros.m4	2009-01-31 19:35:03 UTC (rev 8311)
+++ vamacros.m4	2009-01-31 20:35:04 UTC (rev 8312)
@@ -16,24 +16,26 @@
 
 AC_DEFUN([INN_C_C99_VAMACROS],
 [AC_CACHE_CHECK([for C99 variadic macros], [inn_cv_c_c99_vamacros],
-[AC_TRY_COMPILE(
-[#include <stdio.h>
-#define error(...) fprintf(stderr, __VA_ARGS__)],
-[error("foo"); error("foo %d", 0); return 0;],
+[AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([[
+#include <stdio.h>
+#define error(...) fprintf(stderr, __VA_ARGS__)]],
+[[error("foo"); error("foo %d", 0); return 0;]])],
 [inn_cv_c_c99_vamacros=yes], [inn_cv_c_c99_vamacros=no])])
-if test $inn_cv_c_c99_vamacros = yes ; then
+ if test $inn_cv_c_c99_vamacros = yes ; then
     AC_DEFINE([HAVE_C99_VAMACROS], 1,
               [Define if the compiler supports C99 variadic macros.])
-fi])
+ fi])
 
 AC_DEFUN([INN_C_GNU_VAMACROS],
 [AC_CACHE_CHECK([for GNU-style variadic macros], [inn_cv_c_gnu_vamacros],
-[AC_TRY_COMPILE(
-[#include <stdio.h>
-#define error(args...) fprintf(stderr, args)],
-[error("foo"); error("foo %d", 0); return 0;],
+[AC_COMPILE_IFELSE(
+[AC_LANG_PROGRAM([[
+#include <stdio.h>
+#define error(args...) fprintf(stderr, args)]],
+[[error("foo"); error("foo %d", 0); return 0;]])],
 [inn_cv_c_gnu_vamacros=yes], [inn_cv_c_gnu_vamacros=no])])
-if test $inn_cv_c_gnu_vamacros = yes ; then
+ if test $inn_cv_c_gnu_vamacros = yes ; then
     AC_DEFINE([HAVE_GNU_VAMACROS], 1,
               [Define if the compiler supports GNU-style variadic macros.])
-fi])
+ fi])




More information about the inn-committers mailing list