configure.ac: Use modern version of `AC_CHECK_TYPES'.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jul 2016 10:10:50 +0000 (11:10 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 11 Jul 2016 10:10:50 +0000 (11:10 +0100)
Also, check for `socklen_t' in <sys/socket.h>, so that we can find it on
Android.  I don't expect this to be the last Android portability
failure, because I've not even tried building it there yet.

configure.ac

index 8b6ca53..6171efd 100644 (file)
@@ -216,10 +216,19 @@ dnl Find out if we're cross-compiling.
 AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
 
 dnl Various standard types.
-AC_CHECK_TYPE([pid_t], [int])
+AC_CHECK_TYPE([pid_t], [],
+  [AC_DEFINE([pid_t], [int],
+     [Define to `int' if <sys/types.h> does not define])])
 AC_TYPE_UID_T
-AC_CHECK_TYPE([ssize_t], [int])
-AC_CHECK_TYPE([socklen_t], [int])
+AC_CHECK_TYPE([ssize_t], [],
+  [AC_DEFINE([ssize_t], [int],
+     [Define to `int' if <sys/types.h> does not define])])
+AC_CHECK_TYPE([socklen_t], [],
+  [AC_DEFINE([socklen_t], [int],
+     [Define to `int' if <sys/socket.h> does not define])],
+  [AC_INCLUDES_DEFAULT
+#include <sys/socket.h>
+])
 
 dnl The maths library.
 mdw_ORIG_LIBS=$LIBS LIBS=