]>
Commit | Line | Data |
---|---|---|
6a9f6389 | 1 | dnl This encapsulates the nasty mess of headers we need to check when |
2 | dnl checking types. | |
36975a27 | 3 | AC_DEFUN([SQUID_DEFAULT_INCLUDES],[[ |
0a4e8536 | 4 | /* What a mess.. many systems have added the (now standard) bit types |
5 | * in their own ways, so we need to scan a wide variety of headers to | |
6 | * find them.. | |
6a9f6389 | 7 | * IMPORTANT: Keep include/squid_types.h syncronised with this list |
0a4e8536 | 8 | */ |
6a9f6389 | 9 | #if HAVE_SYS_TYPES_H |
0a4e8536 | 10 | #include <sys/types.h> |
6a9f6389 | 11 | #endif |
62b34480 | 12 | #if STDC_HEADERS |
13 | #include <stdlib.h> | |
14 | #include <stddef.h> | |
15 | #endif | |
16 | #if HAVE_INTTYPES_H | |
17 | #include <inttypes.h> | |
18 | #endif | |
0a4e8536 | 19 | #if HAVE_SYS_BITYPES_H |
20 | #include <sys/bitypes.h> | |
21 | #endif | |
eea70fbb | 22 | #if HAVE_SYS_SELECT_H |
23 | #include <sys/select.h> | |
24 | #endif | |
6a9f6389 | 25 | ]]) |
62b34480 | 26 | |
6a9f6389 | 27 | dnl and this is for AC_CHECK_SIZEOF |
36975a27 | 28 | AC_DEFUN([SQUID_DEFAULT_SIZEOF_INCLUDES],[ |
6a9f6389 | 29 | #include <stdio.h> |
30 | SQUID_DEFAULT_INCLUDES | |
31 | ]) | |
5a3237b0 | 32 | |
33 | dnl *BSD net headers | |
36975a27 | 34 | AC_DEFUN([SQUID_BSDNET_INCLUDES],[ |
5a3237b0 | 35 | SQUID_DEFAULT_INCLUDES |
2874ca69 | 36 | #if HAVE_SYS_TIME_H |
37 | #include <sys/time.h> | |
38 | #endif | |
5a3237b0 | 39 | #if HAVE_SYS_SOCKET_H |
40 | #include <sys/socket.h> | |
41 | #endif | |
42 | #if HAVE_NETINET_IN_H | |
43 | #include <netinet/in.h> | |
44 | #endif | |
45 | #if HAVE_NETINET_IP_COMPAT_H | |
46 | #include <netinet/ip_compat.h> | |
47 | #endif | |
5a3237b0 | 48 | #if HAVE_NET_IF_H |
49 | #include <net/if.h> | |
50 | #endif | |
2874ca69 | 51 | #if HAVE_NETINET_IP_FIL_H |
52 | #include <netinet/ip_fil.h> | |
53 | #endif | |
77e4c0c9 | 54 | #if HAVE_SYS_PARAM_H |
55 | #include <sys/param.h> | |
56 | #endif | |
5a3237b0 | 57 | ]) |
d7c59e37 | 58 | |
59 | dnl | |
60 | dnl thanks to autogen, for the template.. | |
61 | dnl | |
62 | dnl @synopsis AC_TEST_CHECKFORHUGEOBJECTS | |
63 | dnl | |
64 | dnl Test whether -fhuge-objects is available with this c++ compiler. gcc-29.5 series compilers need this on some platform with large objects. | |
65 | dnl | |
66 | AC_DEFUN([AC_TEST_CHECKFORHUGEOBJECTS],[ | |
67 | AC_MSG_CHECKING([whether compiler accepts -fhuge-objects]) | |
68 | AC_CACHE_VAL([ac_cv_test_checkforhugeobjects],[ | |
69 | ac_cv_test_checkforhugeobjects=`echo "int foo;" > conftest.cc | |
70 | ${CXX} -Werror -fhuge-objects -c conftest.cc 2>/dev/null | |
71 | res=$? | |
72 | rm -f conftest.* | |
73 | echo yes | |
32a843d5 | 74 | exit $res` |
d7c59e37 | 75 | if [[ $? -ne 0 ]] |
76 | then ac_cv_test_checkforhugeobjects=no | |
77 | else if [[ -z "$ac_cv_test_checkforhugeobjects" ]] | |
78 | then ac_cv_test_checkforhugeobjects=yes | |
79 | fi ; fi | |
80 | ]) # end of CACHE_VAL | |
81 | AC_MSG_RESULT([${ac_cv_test_checkforhugeobjects}]) | |
82 | ||
83 | if test "X${ac_cv_test_checkforhugeobjects}" != Xno | |
84 | then | |
85 | HUGE_OBJECT_FLAG="-fhuge-objects" | |
86 | else | |
87 | HUGE_OBJECT_FLAG="" | |
88 | fi | |
89 | ]) # end of AC_DEFUN of AC_TEST_CHECKFORHUGEOBJECTS |