r18488: we have to make sure any extensions flags also make it into
[Samba.git] / source / lib / replace / libreplace_cc.m4
blob2c58933a650c23c8813adf1c78aeb5aba04f68c8
2 AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_START,
4 echo "LIBREPLACE_CC_CHECKS: START"
5 ])
7 AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_END,
9 echo "LIBREPLACE_CC_CHECKS: END"
12 dnl
13 dnl
14 dnl AC_LIBREPLACE_CC_CHECKS
15 dnl
16 dnl Note: we need to use m4_define instead of AC_DEFUN because
17 dnl       of the ordering of tests
18 dnl       
19 dnl 
20 m4_define(AC_LIBREPLACE_CC_CHECKS,
22 AC__LIBREPLACE_ONLY_CC_CHECKS_START
24 dnl stop the C89 attempt by autoconf - if autoconf detects -Ae it will enable it
25 dnl which conflicts with C99 on HPUX
26 ac_cv_prog_cc_Ae=no
28 savedCFLAGS=$CFLAGS
29 AC_PROG_CC
30 CFLAGS=$savedCFLAGS
31 dnl AC_PROG_CPP
32 dnl AC_PROG_EGREP
33 dnl AC_GNU_SOURCE
34 dnl AC_AIX
35 dnl AC_MINIX
36 dnl AC_GNU_SOURCE
37 dnl AC_INCLUDES_DEFAULT
38 dnl AC_USE_SYSTEM_EXTENSIONS
39 dnl AC_INCLUDES_DEFAULT
40 dnl AC_HEADER_STDC
41 AC_ISC_POSIX
42 AC_USE_SYSTEM_EXTENSIONS
43 AC_PROG_CC_C99
44 AC_C_INLINE
45 AC_C_BIGENDIAN
46 AC_PROG_INSTALL
49 AC_EXTENSION_FLAG(_XOPEN_SOURCE_EXTENDED)
50 AC_EXTENSION_FLAG(_OSF_SOURCE)
52 LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not supported])])
54 AC_SYS_LARGEFILE
56 dnl Add #include for broken IRIX header files
57 case "$host_os" in
58         *irix6*) AC_ADD_INCLUDE(<standards.h>)
59                 ;;
60 esac
62 AC_CHECK_HEADERS([standards.h])
64 # Solaris needs HAVE_LONG_LONG defined
65 AC_CHECK_TYPES(long long)
67 AC_CHECK_TYPE(uint_t, unsigned int)
68 AC_CHECK_TYPE(int8_t, char)
69 AC_CHECK_TYPE(uint8_t, unsigned char)
70 AC_CHECK_TYPE(int16_t, short)
71 AC_CHECK_TYPE(uint16_t, unsigned short)
72 AC_CHECK_TYPE(int32_t, long)
73 AC_CHECK_TYPE(uint32_t, unsigned long)
74 AC_CHECK_TYPE(int64_t, long long)
75 AC_CHECK_TYPE(uint64_t, unsigned long long)
77 AC_CHECK_TYPE(size_t, unsigned int)
78 AC_CHECK_TYPE(ssize_t, int)
80 AC_CHECK_SIZEOF(int)
81 AC_CHECK_SIZEOF(char)
82 AC_CHECK_SIZEOF(short)
83 AC_CHECK_SIZEOF(long)
84 AC_CHECK_SIZEOF(long long)
86 AC_CHECK_SIZEOF(off_t)
87 AC_CHECK_SIZEOF(size_t)
88 AC_CHECK_SIZEOF(ssize_t)
90 AC_CHECK_TYPE(intptr_t, unsigned long long)
91 AC_CHECK_TYPE(ptrdiff_t, unsigned long long)
93 AC__LIBREPLACE_ONLY_CC_CHECKS_END
94 ]) dnl end AC_LIBREPLACE_CC_CHECKS