| 1 |
|
|---|
| 2 | AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_START,
|
|---|
| 3 | [
|
|---|
| 4 | echo "LIBREPLACE_CC_CHECKS: START"
|
|---|
| 5 | ])
|
|---|
| 6 |
|
|---|
| 7 | AC_DEFUN_ONCE(AC__LIBREPLACE_ONLY_CC_CHECKS_END,
|
|---|
| 8 | [
|
|---|
| 9 | echo "LIBREPLACE_CC_CHECKS: END"
|
|---|
| 10 | ])
|
|---|
| 11 |
|
|---|
| 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,
|
|---|
| 21 | [
|
|---|
| 22 | AC__LIBREPLACE_ONLY_CC_CHECKS_START
|
|---|
| 23 |
|
|---|
| 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
|
|---|
| 27 |
|
|---|
| 28 | savedCFLAGS=$CFLAGS
|
|---|
| 29 | AC_PROG_CC
|
|---|
| 30 | CFLAGS=$savedCFLAGS
|
|---|
| 31 |
|
|---|
| 32 | dnl don't try for C99 if we are using gcc, as otherwise we
|
|---|
| 33 | dnl lose immediate structure constants
|
|---|
| 34 | if test x"$GCC" != x"yes" ; then
|
|---|
| 35 | AC_PROG_CC_C99
|
|---|
| 36 | fi
|
|---|
| 37 |
|
|---|
| 38 | if 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})
|
|---|
| 42 | fi
|
|---|
| 43 | AC_USE_SYSTEM_EXTENSIONS
|
|---|
| 44 | AC_C_BIGENDIAN
|
|---|
| 45 | AC_C_INLINE
|
|---|
| 46 | LIBREPLACE_C99_STRUCT_INIT([],[AC_MSG_WARN([c99 structure initializer are not supported])])
|
|---|
| 47 |
|
|---|
| 48 | AC_PROG_INSTALL
|
|---|
| 49 |
|
|---|
| 50 | AC_ISC_POSIX
|
|---|
| 51 | AC_EXTENSION_FLAG(_XOPEN_SOURCE_EXTENDED)
|
|---|
| 52 | AC_EXTENSION_FLAG(_OSF_SOURCE)
|
|---|
| 53 |
|
|---|
| 54 | AC_SYS_LARGEFILE
|
|---|
| 55 |
|
|---|
| 56 | dnl Add #include for broken IRIX header files
|
|---|
| 57 | case "$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"
|
|---|
|
|---|