2004-05-20 19:43:25 +00:00
|
|
|
AC_DEFUN([GST_CHECK_FIONREAD], [
|
2004-05-20 19:19:26 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
|
2009-05-22 00:10:12 +00:00
|
|
|
AC_CACHE_VAL(_cv_gst_fionread_in_sys_ioctl, [
|
2004-05-20 19:19:26 +00:00
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/ioctl.h>
|
|
|
|
], [
|
|
|
|
int x = FIONREAD;
|
|
|
|
if ( x )
|
|
|
|
return 0;
|
2009-05-22 00:10:12 +00:00
|
|
|
], _cv_gst_fionread_in_sys_ioctl="yes",_cv_gst_fionread_in_sys_ioctl="no")
|
2004-05-20 19:19:26 +00:00
|
|
|
])
|
|
|
|
|
2009-05-22 00:10:12 +00:00
|
|
|
AC_MSG_RESULT($_cv_gst_fionread_in_sys_ioctl)
|
2004-05-20 19:19:26 +00:00
|
|
|
|
2009-05-22 00:10:12 +00:00
|
|
|
if test "$_cv_gst_fionread_in_sys_ioctl" = "yes"; then
|
2004-05-21 14:53:20 +00:00
|
|
|
AC_DEFINE([HAVE_FIONREAD_IN_SYS_IOCTL], 1, [FIONREAD ioctl found in sys/ioclt.h])
|
2004-05-20 19:19:26 +00:00
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(for FIONREAD in sys/filio.h)
|
2009-05-22 00:10:12 +00:00
|
|
|
AC_CACHE_VAL(_cv_gst_fionread_in_sys_filio, [
|
2004-05-20 19:19:26 +00:00
|
|
|
AC_TRY_COMPILE([
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/filio.h>
|
|
|
|
], [
|
|
|
|
int x = FIONREAD;
|
|
|
|
if ( x )
|
|
|
|
return 0;
|
2009-05-22 00:10:12 +00:00
|
|
|
], _cv_gst_fionread_in_sys_filio="yes",_cv_gst_fionread_in_sys_filio="no")
|
2004-05-20 19:19:26 +00:00
|
|
|
])
|
|
|
|
|
2009-05-22 00:10:12 +00:00
|
|
|
AC_MSG_RESULT($_cv_gst_fionread_in_sys_filio)
|
2004-05-20 19:19:26 +00:00
|
|
|
|
2009-05-22 00:10:12 +00:00
|
|
|
if test "$_cv_gst_fionread_in_sys_filio" = "yes"; then
|
2004-05-21 14:53:20 +00:00
|
|
|
AC_DEFINE([HAVE_FIONREAD_IN_SYS_FILIO], 1, [FIONREAD ioctl found in sys/filio.h])
|
2004-05-20 19:19:26 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
])
|