-dnl
-dnl Macro: unet_PIPE_CFLAGS
-dnl
-dnl If the compiler understands -pipe, add it to CFLAGS if not already
-dnl there.
-dnl
-AC_DEFUN(unet_PIPE_CFLAGS,
-[AC_MSG_CHECKING([if the compiler understands -pipe])
-unet_cv_pipe_flags="$ac_cv_prog_gcc"
-if test "$ac_cv_prog_gcc" = no; then
- OLDCFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -pipe"
- AC_TRY_COMPILE(,,unet_cv_pipe_flags=yes,)
- CFLAGS="$OLDCFLAGS"
-fi
-AC_MSG_RESULT($unet_cv_pipe_flags)
-if test "$unet_cv_pipe_flags" = yes ; then
- x=`echo $CFLAGS | grep 'pipe' 2>/dev/null`
- if test "$x" = "" ; then
- CFLAGS="$CFLAGS -pipe"
- fi
-fi
-])
-
dnl
dnl Macro: unet_NONBLOCKING
dnl
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(void *)
+AC_CHECK_SIZEOF(int64_t)
+AC_CHECK_SIZEOF(long long)
if test "$ac_cv_sizeof_int" = 2 ; then
AC_CHECK_TYPE(int16_t, int)
AC_CHECK_TYPE(uint16_t, unsigned int)
AC_CHECK_TYPE(uint32_t, unsigned long)
else
AC_MSG_ERROR([Cannot find a type with size of 32 bits])
+fi
+if test "$ac_cv_sizeof_int64_t" = 8 ; then
+ AC_CHECK_TYPE(int64_t)
+ AC_CHECK_TYPE(uint64_t)
+elif test "$ac_cv_sizeof_long_long" = 8 ; then
+ AC_CHECK_TYPE(int64_t, long long)
+ AC_CHECK_TYPE(uint64_t, unsigned long long)
+else
+ AC_MSG_ERROR([Cannot find a type with size of 64 bits])
fi])
dnl Written by John Hawkinson <jhawk@mit.edu>. This code is in the Public