From f8aa696f9fde35ea7d5a42ef3fb65a5771fe02cc Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Sun, 24 Dec 2006 03:53:15 +0000 Subject: [PATCH] Properly check for all required bktr headers. inspired by a patch from Tatu Kilappa, trilkk iki fi Originally committed as revision 7374 to svn://svn.ffmpeg.org/ffmpeg/trunk --- configure | 21 +++++++++++++++++++++ libavformat/grab_bktr.c | 17 ++++++----------- 2 files changed, 27 insertions(+), 11 deletions(-) diff --git a/configure b/configure index 71de5d176a..141bfb218a 100755 --- a/configure +++ b/configure @@ -455,6 +455,11 @@ HAVE_LIST=' beosthreads byteswap_h dcbzl + dev_bktr_ioctl_bt848_h + dev_bktr_ioctl_meteor_h + dev_ic_bt8xx_h + dev_video_meteor_ioctl_meteor_h + dev_video_bktr_ioctl_bt848_h dlfcn_h dlopen freetype2 @@ -463,6 +468,8 @@ HAVE_LIST=' inet_aton localtime_r lrintf + machine_ioctl_bt848_h + machine_ioctl_meteor_h malloc_h memalign mlib @@ -1660,6 +1667,20 @@ int dummy = V4L2_PIX_FMT_YUV420; struct v4l2_buffer dummy1; EOF +# check for ioctl_meteor.h, ioctl_bt848.h and alternatives +if enabled bktr; then + check_header dev/bktr/ioctl_meteor.h + check_header dev/bktr/ioctl_bt848.h + + check_header machine/ioctl_meteor.h + check_header machine/ioctl_bt848.h + + check_header dev/video/meteor/ioctl_meteor.h + check_header dev/video/bktr/ioctl_bt848.h + + check_header dev/ic/bt8xx.h +fi + # Deal with the x11 frame grabber enabled x11grab && enabled gpl && diff --git a/libavformat/grab_bktr.c b/libavformat/grab_bktr.c index 2145994905..eea221cdd6 100644 --- a/libavformat/grab_bktr.c +++ b/libavformat/grab_bktr.c @@ -24,21 +24,16 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #include "avformat.h" -#if defined(__FreeBSD__) -# if __FreeBSD__ >= 502100 -# include -# include -# else -# include -# include -# endif -#elif defined(__FreeBSD_kernel__) +#if defined (HAVE_DEV_BKTR_IOCTL_METEOR_H) && defined (HAVE_DEV_BKTR_IOCTL_BT848_H) # include # include -#elif defined(__DragonFly__) +#elif defined (HAVE_MACHINE_IOCTL_METEOR_H) && defined (HAVE_MACHINE_IOCTL_BT848_H) +# include +# include +#elif defined (HAVE_DEV_VIDEO_METEOR_IOCTL_METEOR_H) && defined (HAVE_DEV_VIDEO_METEOR_IOCTL_BT848_H) # include # include -#else +#elif HAVE_DEV_IC_BT8XX_H # include #endif #include