]> git.ipfire.org Git - thirdparty/squid.git/blob - acinclude.m4
Summary: Synced with libecap, adopted pass-all-changes-through transactions
[thirdparty/squid.git] / acinclude.m4
1 dnl This encapsulates the nasty mess of headers we need to check when
2 dnl checking types.
3 AC_DEFUN([SQUID_DEFAULT_INCLUDES],[[
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..
7 * IMPORTANT: Keep include/squid_types.h syncronised with this list
8 */
9 #if HAVE_SYS_TYPES_H
10 #include <sys/types.h>
11 #endif
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
19 #if HAVE_SYS_BITYPES_H
20 #include <sys/bitypes.h>
21 #endif
22 #if HAVE_SYS_SELECT_H
23 #include <sys/select.h>
24 #endif
25 #if HAVE_NETINET_IN_SYSTM_H
26 #include <netinet/in_systm.h>
27 #endif
28 ]])
29
30 dnl and this is for AC_CHECK_SIZEOF
31 AC_DEFUN([SQUID_DEFAULT_SIZEOF_INCLUDES],[
32 #include <stdio.h>
33 SQUID_DEFAULT_INCLUDES
34 ])
35
36 dnl *BSD net headers
37 AC_DEFUN([SQUID_BSDNET_INCLUDES],[
38 SQUID_DEFAULT_INCLUDES
39 #if HAVE_SYS_TIME_H
40 #include <sys/time.h>
41 #endif
42 #if HAVE_SYS_SOCKET_H
43 #include <sys/socket.h>
44 #endif
45 #if HAVE_NETINET_IN_H
46 #include <netinet/in.h>
47 #endif
48 #if HAVE_NETINET_IP_H
49 #include <netinet/ip.h>
50 #endif
51 #if HAVE_NETINET_IP_COMPAT_H
52 #include <netinet/ip_compat.h>
53 #endif
54 #if HAVE_NET_IF_H
55 #include <net/if.h>
56 #endif
57 #if HAVE_NETINET_IP_FIL_H
58 #include <netinet/ip_fil.h>
59 #endif
60 #if HAVE_SYS_PARAM_H
61 #include <sys/param.h>
62 #endif
63 ])
64
65 dnl
66 dnl thanks to autogen, for the template..
67 dnl
68 dnl @synopsis AC_TEST_CHECKFORHUGEOBJECTS
69 dnl
70 dnl Test whether -fhuge-objects is available with this c++ compiler. gcc-29.5 series compilers need this on some platform with large objects.
71 dnl
72 AC_DEFUN([AC_TEST_CHECKFORHUGEOBJECTS],[
73 AC_MSG_CHECKING([whether compiler accepts -fhuge-objects])
74 AC_CACHE_VAL([ac_cv_test_checkforhugeobjects],[
75 ac_cv_test_checkforhugeobjects=`echo "int foo;" > conftest.cc
76 ${CXX} -Werror -fhuge-objects -c conftest.cc 2>/dev/null
77 res=$?
78 rm -f conftest.*
79 echo yes
80 exit $res`
81 if [[ $? -ne 0 ]]
82 then ac_cv_test_checkforhugeobjects=no
83 else if [[ -z "$ac_cv_test_checkforhugeobjects" ]]
84 then ac_cv_test_checkforhugeobjects=yes
85 fi ; fi
86 ]) # end of CACHE_VAL
87 AC_MSG_RESULT([${ac_cv_test_checkforhugeobjects}])
88
89 if test "X${ac_cv_test_checkforhugeobjects}" != Xno
90 then
91 HUGE_OBJECT_FLAG="-fhuge-objects"
92 else
93 HUGE_OBJECT_FLAG=""
94 fi
95 ]) # end of AC_DEFUN of AC_TEST_CHECKFORHUGEOBJECTS