From 060217dcdd76de745cb1b88482b7b03e926ed787 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sun, 29 Aug 2010 17:53:17 +0000 Subject: [PATCH] need HAVE_VIDEO4LINUX --- dtool/Config.pp | 4 ++++ dtool/LocalSetup.pp | 3 +++ makepanda/makepanda.py | 3 +++ panda/src/vision/config_vision.cxx | 2 +- panda/src/vision/webcamVideo.cxx | 2 +- panda/src/vision/webcamVideoCursorV4L.cxx | 2 +- panda/src/vision/webcamVideoCursorV4L.h | 4 ++-- panda/src/vision/webcamVideoV4L.cxx | 2 +- panda/src/vision/webcamVideoV4L.h | 4 ++-- 9 files changed, 18 insertions(+), 8 deletions(-) diff --git a/dtool/Config.pp b/dtool/Config.pp index 83a39989e0..337194163e 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -476,6 +476,10 @@ // to empty if you lack this header file. #define PHAVE_JPEGINT_H 1 +// Do you want to compile video-for-linux? If you have an older Linux +// system with incompatible headers, define this to empty string. +#defer HAVE_VIDEO4LINUX $[IS_LINUX] + // Is libpng installed, and where? #define PNG_IPATH #define PNG_LPATH diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index 0b25d53834..8c878c279d 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -281,6 +281,9 @@ $[cdefine REPORT_OPENSSL_ERRORS] $[cdefine HAVE_JPEG] $[cdefine PHAVE_JPEGINT_H] +/* Define to build video-for-linux. */ +$[cdefine HAVE_VIDEO4LINUX] + /* Define if we have libpng installed. */ $[cdefine HAVE_PNG] diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index b6da427c09..cadd822488 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1358,6 +1358,7 @@ DTOOL_CONFIG=[ ("HAVE_PNG", 'UNDEF', 'UNDEF'), ("HAVE_JPEG", 'UNDEF', 'UNDEF'), ("PHAVE_JPEGINT_H", '1', '1'), + ("HAVE_VIDEO4LINUX", 'UNDEF', '1'), ("HAVE_TIFF", 'UNDEF', 'UNDEF'), ("HAVE_SGI_RGB", '1', '1'), ("HAVE_TGA", '1', '1'), @@ -1454,10 +1455,12 @@ def WriteConfigSettings(): dtool_config["HAVE_XF86DGA"] = 'UNDEF' dtool_config["HAVE_GLX"] = 'UNDEF' dtool_config["IS_LINUX"] = 'UNDEF' + dtool_config["HAVE_VIDEO4LINUX"] = 'UNDEF' dtool_config["IS_OSX"] = '1' if (sys.platform.startswith("freebsd")): dtool_config["IS_LINUX"] = 'UNDEF' + dtool_config["HAVE_VIDEO4LINUX"] = 'UNDEF' dtool_config["IS_FREEBSD"] = '1' dtool_config["PHAVE_ALLOCA_H"] = 'UNDEF' dtool_config["PHAVE_MALLOC_H"] = 'UNDEF' diff --git a/panda/src/vision/config_vision.cxx b/panda/src/vision/config_vision.cxx index c8208270f5..dd0978e0fb 100644 --- a/panda/src/vision/config_vision.cxx +++ b/panda/src/vision/config_vision.cxx @@ -46,7 +46,7 @@ init_libvision() { initialized = true; WebcamVideo::init_type(); -#ifdef IS_LINUX +#ifdef HAVE_VIDEO4LINUX WebcamVideoCursorV4L::init_type(); WebcamVideoV4L::init_type(); #endif diff --git a/panda/src/vision/webcamVideo.cxx b/panda/src/vision/webcamVideo.cxx index a3474ac85c..fe4d113515 100644 --- a/panda/src/vision/webcamVideo.cxx +++ b/panda/src/vision/webcamVideo.cxx @@ -55,7 +55,7 @@ find_all_webcams() { find_all_webcams_ds(); #endif -#ifdef IS_LINUX +#ifdef HAVE_VIDEO4LINUX extern void find_all_webcams_v4l(); find_all_webcams_v4l(); #endif diff --git a/panda/src/vision/webcamVideoCursorV4L.cxx b/panda/src/vision/webcamVideoCursorV4L.cxx index d84bd31b96..f2629d1710 100644 --- a/panda/src/vision/webcamVideoCursorV4L.cxx +++ b/panda/src/vision/webcamVideoCursorV4L.cxx @@ -14,7 +14,7 @@ #include "webcamVideoV4L.h" -#ifdef IS_LINUX +#ifdef HAVE_VIDEO4LINUX #include #include diff --git a/panda/src/vision/webcamVideoCursorV4L.h b/panda/src/vision/webcamVideoCursorV4L.h index 7107e7fe65..429cb4e743 100644 --- a/panda/src/vision/webcamVideoCursorV4L.h +++ b/panda/src/vision/webcamVideoCursorV4L.h @@ -17,7 +17,7 @@ #include "pandabase.h" -#ifdef IS_LINUX +#ifdef HAVE_VIDEO4LINUX #include "webcamVideo.h" @@ -69,6 +69,6 @@ private: static TypeHandle _type_handle; }; -#endif // IS_LINUX +#endif // HAVE_VIDEO4LINUX #endif diff --git a/panda/src/vision/webcamVideoV4L.cxx b/panda/src/vision/webcamVideoV4L.cxx index 800e480aae..9ea4dd3111 100644 --- a/panda/src/vision/webcamVideoV4L.cxx +++ b/panda/src/vision/webcamVideoV4L.cxx @@ -14,7 +14,7 @@ #include "webcamVideoV4L.h" -#ifdef IS_LINUX +#ifdef HAVE_VIDEO4LINUX #include "webcamVideoCursorV4L.h" #include "dcast.h" diff --git a/panda/src/vision/webcamVideoV4L.h b/panda/src/vision/webcamVideoV4L.h index 7caae2ec50..7ebf131df8 100644 --- a/panda/src/vision/webcamVideoV4L.h +++ b/panda/src/vision/webcamVideoV4L.h @@ -17,7 +17,7 @@ #include "pandabase.h" -#ifdef IS_LINUX +#ifdef HAVE_VIDEO4LINUX #include "webcamVideo.h" @@ -55,6 +55,6 @@ private: static TypeHandle _type_handle; }; -#endif // IS_LINUX +#endif // HAVE_VIDEO4LINUX #endif