this file contains mostly misinformation now, that we use tinygettext
[supertux.git] / mk / autoconf / ax_type_socklen_t.m4
1 dnl @synopsis TYPE_SOCKLEN_T
2 dnl
3 dnl Check whether sys/socket.h defines type socklen_t. Please note
4 dnl that some systems require sys/types.h to be included before
5 dnl sys/socket.h can be compiled.
6 dnl
7 dnl @version $Id$
8 dnl @author Lars Brinkhoff <lars@nocrew.org>
9 dnl
10 AC_DEFUN([AX_TYPE_SOCKLEN_T],
11 [AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
12 [
13   AC_TRY_COMPILE(
14   [#include <sys/types.h>
15    #include <sys/socket.h>],
16   [socklen_t len = 42; return 0;],
17   ac_cv_type_socklen_t=yes,
18   ac_cv_type_socklen_t=no)
19 ])
20   if test $ac_cv_type_socklen_t != yes; then
21     AC_DEFINE(socklen_t, int, [define socklen_t if sys headers don't do that])
22   fi
23 ])