cheusov/mk-configure — pull request #6 by andrewshadura (2014-01-17 10:01:52+00:00)
Title: Implement prototype checks in mkc_check_decl

This patch implements prototype checking in mkc_check_decl:
```
mkc_check_decl prototype 'int connect(int __fd, const struct sockaddr * __addr, socklen_t __len)' sys/socket.h
mkc_check_decl prototype 'int connect(int __fd, struct sockaddr * __addr, socklen_t __len)' sys/socket.h
```

It'd be great if you added support for this in mk scripts as well, so that something like this could be used:
```
MKC_CHECK_PROTOTYPES += socket:sys/socket.h
MKC_CHECK_PROTOTYPES.socket += "int connect(int __fd, const struct sockaddr * __addr, socklen_t __len)"
MKC_CHECK_PROTOTYPES.socket += "int connect(int __fd, struct sockaddr * __addr, socklen_t __len)"
MKC_CHECK_PROTOTYPES.socket += "int connect(int __fd, const struct sockaddr * __addr, int len)"
MKC_CHECK_PROTOTYPES.socket += "int connect(int __fd, const struct sockaddr_in * __addr, socklen_t __len)"
```
and that would give something like this as the result:
```
HAVE_PROTOTYPE.socket = "int connect(int __fd, const struct sockaddr * __addr, socklen_t __len)"
CFLAGS += -DHAVE_PROTOTYPE_SOCKET="int connect(int __fd, const struct sockaddr * __addr, socklen_t __len)"
```