Modernize checks for socklen_t
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 24 Feb 2011 15:46:00 +0000 (15:46 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Thu, 24 Feb 2011 15:46:00 +0000 (15:46 +0000)
Part of a patch by Javier Jardón.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
configure.ac

index fadb0c3..aea975a 100644 (file)
@@ -601,14 +601,16 @@ fi
 
 dnl check for socklen_t
 AC_MSG_CHECKING(whether socklen_t is defined)
-AC_TRY_COMPILE([
+AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netdb.h>
-],[
+]], [[
 socklen_t foo;
 foo = 1;
-],dbus_have_socklen_t=yes,dbus_have_socklen_t=no)
+]])],
+[dbus_have_socklen_t=yes],
+[dbus_have_socklen_t=no])
 AC_MSG_RESULT($dbus_have_socklen_t)
 
 if test "x$dbus_have_socklen_t" = "xyes"; then