202
|
1 # serial 1
|
|
2
|
328
|
3 dnl This function is derived from
|
|
4 dnl http://savannah.gnu.org/cgi-bin/viewcvs/gcc/gcc/libjava/configure.in?rev=1.142.2.7&content-type=text/vnd.viewcvs-markup
|
202
|
5
|
503
|
6 AC_DEFUN([AC_TYPE_SOCKLEN_T],
|
202
|
7 [AC_MSG_CHECKING([for socklen_t in sys/socket.h])
|
|
8 AC_TRY_COMPILE([#define _POSIX_PII_SOCKET
|
|
9 #include <sys/types.h>
|
|
10 #include <sys/socket.h>], [socklen_t x = 5;],
|
|
11 [AC_MSG_RESULT(yes)],
|
207
|
12 [AC_DEFINE(socklen_t,int,Need to define socklen_t as an int because it should be in sys/socket.h)
|
202
|
13 AC_MSG_RESULT(no)])
|
|
14 ])
|
|
15
|
328
|
16 # serial 1
|
|
17
|
|
18 dnl This macro checks to see if the printf family of functions supports the
|
|
19 dnl %'ld format.
|
|
20
|
|
21 dnl Brian Masney <masneyb@gftp.org>
|
|
22
|
|
23 dnl
|
503
|
24 AC_DEFUN([AC_INTL_PRINTF],
|
328
|
25 [AC_MSG_CHECKING([whether the printf family of functions supports %'ld])
|
|
26 AC_TRY_RUN([#include <stdio.h>
|
|
27 #include <string.h>
|
|
28
|
|
29 int main(void) {
|
|
30 char buf[20];
|
|
31 sprintf (buf, "%'ld", (long) 1);
|
330
|
32 if (strchr (buf, '1') == NULL)
|
328
|
33 return (1);
|
|
34 return (0);
|
|
35 }],
|
|
36 [AC_DEFINE(HAVE_INTL_PRINTF,1,Define if printf supports %'ld)
|
|
37 AC_MSG_RESULT(yes)],
|
|
38 [AC_MSG_RESULT(no)])
|
|
39 ])
|
|
40
|
478
|
41 # serial 1
|
|
42
|
|
43 dnl Brian Masney <masneyb@gftp.org>
|
|
44
|
503
|
45 AC_DEFUN([AC_TYPE_INTPTR_T],
|
478
|
46 [AC_MSG_CHECKING([for intptr_t in stdint.h])
|
|
47 AC_TRY_COMPILE([#include <stdint.h>],
|
|
48 [intptr_t i = 0;],
|
|
49 [AC_MSG_RESULT(yes)],
|
|
50 [AC_DEFINE(intptr_t,long,Need to define intptr_t as a long because it should be in stdint.h)
|
|
51 AC_MSG_RESULT(no)])
|
|
52 ])
|
|
53
|