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];
|
532
|
31 #if defined (_LARGEFILE_SOURCE)
|
|
32 sprintf (buf, "%'lld", (long) 1);
|
|
33 #else
|
328
|
34 sprintf (buf, "%'ld", (long) 1);
|
532
|
35 #endif
|
330
|
36 if (strchr (buf, '1') == NULL)
|
328
|
37 return (1);
|
|
38 return (0);
|
|
39 }],
|
|
40 [AC_DEFINE(HAVE_INTL_PRINTF,1,Define if printf supports %'ld)
|
|
41 AC_MSG_RESULT(yes)],
|
|
42 [AC_MSG_RESULT(no)])
|
|
43 ])
|
|
44
|
478
|
45 # serial 1
|
|
46
|
|
47 dnl Brian Masney <masneyb@gftp.org>
|
|
48
|
503
|
49 AC_DEFUN([AC_TYPE_INTPTR_T],
|
478
|
50 [AC_MSG_CHECKING([for intptr_t in stdint.h])
|
|
51 AC_TRY_COMPILE([#include <stdint.h>],
|
|
52 [intptr_t i = 0;],
|
|
53 [AC_MSG_RESULT(yes)],
|
|
54 [AC_DEFINE(intptr_t,long,Need to define intptr_t as a long because it should be in stdint.h)
|
|
55 AC_MSG_RESULT(no)])
|
|
56 ])
|
|
57
|