
1: dnl [SK] this is taken from the Autoconf Macro Archive, http://ac-archive.sourceforge.net/ 2: dnl It is licenced under GPL2 with the exception same as other autoconf-related 3: dnl scripts. I stripped '$' around Id signature to prevent my checking in 4: dnl alters it. 5: 6: dnl @synopsis TYPE_SOCKLEN_T 7: dnl 8: dnl Check whether sys/socket.h defines type socklen_t. Please note 9: dnl that some systems require sys/types.h to be included before 10: dnl sys/socket.h can be compiled. 11: dnl 12: dnl @version Id: type_socklen_t.m4,v 1.2 2005/01/11 04:18:04 guidod Exp 13: dnl @author Lars Brinkhoff <lars@nocrew.org> 14: dnl 15: AC_DEFUN([TYPE_SOCKLEN_T], 16: [AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t, 17: [ 18: AC_TRY_COMPILE( 19: [#include <sys/types.h> 20: #include <sys/socket.h>], 21: [socklen_t len = 42; return 0;], 22: ac_cv_type_socklen_t=yes, 23: ac_cv_type_socklen_t=no) 24: ]) 25: if test $ac_cv_type_socklen_t != yes; then 26: AC_DEFINE(socklen_t, int, [Substitute for socklen_t]) 27: fi 28: ])