File: acinclude.m4

package info (click to toggle)
smpeg 0.4.4-8
  • links: PTS
  • area: main
  • in suites: woody
  • size: 1,892 kB
  • ctags: 1,445
  • sloc: cpp: 14,948; sh: 8,962; ansic: 2,323; asm: 542; makefile: 162
file content (23 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
###################################################################
## To: autoconf@gnu.org 
## Subject: socklen_t 
## From: lars brinkhoff <lars@nocrew.org> 
## Date: 26 Mar 1999 11:38:09 +0100 
## 
## Here's an attempt at a check for socklen_t.  AC_CHECK_TYPE doesn't
## work because it doesn't search <sys/socket.h>.  Maybe that macro
## should be changed instead.
## 
AC_DEFUN(AC_TYPE_SOCKLEN_T,
[AC_CACHE_CHECK([for socklen_t], ac_cv_type_socklen_t,
[
  AC_TRY_COMPILE(
  [#include <sys/socket.h>],
  [socklen_t len = 42; return len;],
  ac_cv_type_socklen_t=yes,
  ac_cv_type_socklen_t=no)
])
  if test $ac_cv_type_socklen_t != yes; then
    AC_DEFINE(socklen_t, int)
  fi
])