source: trunk-3.0/source/lib/replace/libreplace_cc.m4@ 101

Last change on this file since 101 was 1, checked in by Paul Smedley, 19 years ago

Initial code import

File size: 4.2 KB
Line 
1
2AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_START,
3[
4echo "LIBREPLACE_CC_CHECKS: START"
5])
6
7AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_END,
8[
9echo "LIBREPLACE_CC_CHECKS: END"
10])
11
12dnl
13dnl
14dnl AC_LIBREPLACE_CC_CHECKS
15dnl
16dnl Note: we need to use m4_define instead of AC_DEFUN because
17dnl of the ordering of tests
18dnl
19dnl
20m4_define(AC_LIBREPLACE_CC_CHECKS,
21[
22AC__LIBREPLACE_ONLY_CC_CHECKS_START
23
24dnl stop the C89 attempt by autoconf - if autoconf detects -Ae it will enable it
25dnl which conflicts with C99 on HPUX
26ac_cv_prog_cc_Ae=no
27
28savedCFLAGS=$CFLAGS
29AC_PROG_CC
30CFLAGS=$savedCFLAGS
31
32dnl don't try for C99 if we are using gcc, as otherwise we
33dnl lose immediate structure constants
34if test x"$GCC" != x"yes" ; then
35AC_PROG_CC_C99
36fi
37
38if test x"$GCC" = x"yes" ; then
39 AC_MSG_CHECKING([for version of gcc])
40 GCC_VERSION=`$CC -dumpversion`
41 AC_MSG_RESULT(${GCC_VERSION})
42fi
43AC_USE_SYSTEM_EXTENSIONS
44AC_C_BIGENDIAN
45AC_C_INLINE
46LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not supported])])
47
48AC_PROG_INSTALL
49
50AC_ISC_POSIX
51AC_EXTENSION_FLAG(_XOPEN_SOURCE_EXTENDED)
52AC_EXTENSION_FLAG(_OSF_SOURCE)
53
54AC_SYS_LARGEFILE
55
56dnl Add #include for broken IRIX header files
57case "$host_os" in
58 *irix6*) AC_ADD_INCLUDE(<standards.h>)
59 ;;
60 *hpux*)
61 # mmap on HPUX is completely broken...
62 AC_DEFINE(MMAP_BLACKLIST, 1, [Whether MMAP is broken])
63 if test "`uname -r`" = "B.11.11"; then
64 AC_MSG_WARN([Enabling HPUX 11.11 header bug workaround])
65 CFLAGS="$CFLAGS -D_LARGEFILE64_SUPPORT -D__LP64__ -DO_LARGEFILE=04000"