From e9d45e8fbedfe4a7cdbe8d2be1acec564f4c3c90 Mon Sep 17 00:00:00 2001 From: Christophe Mutricy Date: Sat, 21 Jul 2007 14:15:29 +0000 Subject: [PATCH] Better fix for . Refs #1238 --- configure.ac | 14 ++++++++++---- modules/access/pvr.c | 6 +++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index 8a4c5daf62..e37a214e6f 100644 --- a/configure.ac +++ b/configure.ac @@ -2369,15 +2369,21 @@ then if test "${with_videodev2}" != "no" -a -n "${with_videodev2}" then AC_DEFINE_UNQUOTED(VIDEODEV2_H_FILE, "${with_videodev2}", [Location of videodev2.h]) - else - AC_DEFINE(VIDEODEV2_H_FILE, "linux/videodev2.h", [Location of videodev2.h]) + dnl else + dnl AC_DEFINE(VIDEODEV2_H_FILE, "linux/videodev2.h", [Location of videodev2.h]) fi AC_CACHE_CHECK([for new linux/videodev2.h], [new_linux_videodev2_h], - [AC_TRY_COMPILE([#include - #include VIDEODEV2_H_FILE], + [AC_TRY_COMPILE([ + #include + # ifdef VIDEODEV2_H_FILE + # include VIDEODEV2_H_FILE + # else + # include + # endif + ], [struct v4l2_ext_controls ctrls; ctrls.ctrl_class = V4L2_CTRL_CLASS_MPEG; ], new_linux_videodev2_h=yes, new_linux_videodev2_h=no)]) diff --git a/modules/access/pvr.c b/modules/access/pvr.c index ab80c7f5ce..de31da6eff 100644 --- a/modules/access/pvr.c +++ b/modules/access/pvr.c @@ -38,7 +38,11 @@ #include #include #ifdef HAVE_NEW_LINUX_VIDEODEV2_H -#include VIDEODEV2_H_FILE +# ifdef VIDEODEV2_H_FILE +# include VIDEODEV2_H_FILE +# else +# include +# endif #else #include "videodev2.h" #endif -- 2.39.5