v4l2-ctl/dbg: include android-config.h header file if ANDROID is set
authorHans-Christian Egtvedt <hegtvedt@cisco.com>
Fri, 11 Apr 2014 14:39:24 +0000 (16:39 +0200)
committerHans Verkuil <hans.verkuil@cisco.com>
Fri, 11 Apr 2014 15:05:43 +0000 (17:05 +0200)
If the ANDROID symbol is defined, done by Android toolchain by default,
include the android-config.h header file instead of the autogenerated
config.h header file.

Android build system is completely different from autoconf and make, and
is not capable, without some hacks, to generate the config.h header
file.

Signed-off-by: Hans-Christian Egtvedt <hegtvedt@cisco.com>
[hans.verkuil@cisco.com: moved config(-android).h include to v4l2-ctl.h]
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
17 files changed:
utils/v4l2-ctl/v4l2-ctl-common.cpp
utils/v4l2-ctl/v4l2-ctl-edid.cpp
utils/v4l2-ctl/v4l2-ctl-io.cpp
utils/v4l2-ctl/v4l2-ctl-misc.cpp
utils/v4l2-ctl/v4l2-ctl-overlay.cpp
utils/v4l2-ctl/v4l2-ctl-sdr.cpp
utils/v4l2-ctl/v4l2-ctl-selection.cpp
utils/v4l2-ctl/v4l2-ctl-stds.cpp
utils/v4l2-ctl/v4l2-ctl-streaming.cpp
utils/v4l2-ctl/v4l2-ctl-test-patterns.cpp
utils/v4l2-ctl/v4l2-ctl-tuner.cpp
utils/v4l2-ctl/v4l2-ctl-vbi.cpp
utils/v4l2-ctl/v4l2-ctl-vidcap.cpp
utils/v4l2-ctl/v4l2-ctl-vidout.cpp
utils/v4l2-ctl/v4l2-ctl.cpp
utils/v4l2-ctl/v4l2-ctl.h
utils/v4l2-dbg/v4l2-dbg.cpp

index 5dafd91..f302eaa 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
+
+#include "v4l2-ctl.h"
 
 #ifdef HAVE_SYS_KLOG_H
 #include <sys/klog.h>
 #endif
 
-#include <linux/videodev2.h>
-
 #include <list>
 #include <vector>
 #include <map>
-#include <string>
 #include <algorithm>
 
-#include "v4l2-ctl.h"
-
 typedef std::map<unsigned, std::vector<struct v4l2_ext_control> > class2ctrls_map;
 
 typedef std::map<std::string, struct v4l2_queryctrl> ctrl_qmap;
index c01edc2..010dad3 100644 (file)
@@ -7,12 +7,11 @@
 #include <ctype.h>
 #include <errno.h>
 #include <sys/ioctl.h>
-#include <linux/videodev2.h>
-#include <linux/v4l2-subdev.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
+#include <linux/v4l2-subdev.h>
+
 enum format {
        HEX,
        RAW,
index eca07e8..e5a045b 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
index eef3f82..b418e15 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
index 3cef75c..5bc99a5 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
 
-#include <linux/videodev2.h>
 #include <linux/fb.h>
-#include <string>
 #include <vector>
 
 #include "v4l2-ctl.h"
index 860eca2..50ee598 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
index 9f92422..2093470 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
index 300ee79..4c7e308 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
index 656e132..6f347a6 100644 (file)
 #include <sys/mman.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-
-#include <string>
 
 #include "v4l2-ctl.h"
 
index f7aebac..2b401e0 100644 (file)
@@ -3,9 +3,6 @@
 #include <stdio.h>
 #include <string.h>
 #include <inttypes.h>
-#include <string>
-
-#include <linux/videodev2.h>
 
 #include "v4l2-ctl.h"
 
index aeff493..fc84191 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
index d7d61bb..49a43f0 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
index ae0f5c1..c08e3b4 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
index d24436b..6b2cad0 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
-
-#include <linux/videodev2.h>
-#include <string>
 
 #include "v4l2-ctl.h"
 
index d5dd82a..fb1c69e 100644 (file)
 #include <sys/time.h>
 #include <dirent.h>
 #include <math.h>
-#include <config.h>
+
+#include "v4l2-ctl.h"
 
 #ifdef HAVE_SYS_KLOG_H
 #include <sys/klog.h>
 #endif
 
-#include <linux/videodev2.h>
-
 #include <list>
 #include <vector>
 #include <map>
-#include <string>
 #include <algorithm>
 
-
-#include "v4l2-ctl.h"
-
 char options[OptLast];
 
 static int app_result;
index 4b188d9..4e4038d 100644 (file)
@@ -1,6 +1,16 @@
 #ifndef _V4L2_CTL_H
 #define _V4L2_CTL_H
 
+#ifdef ANDROID
+#include <android-config.h>
+#else
+#include <config.h>
+#endif
+
+#include <string>
+
+#include <linux/videodev2.h>
+
 #ifndef NO_LIBV4L2
 #include <libv4l2.h>
 #else
index d5ffc12..9986883 100644 (file)
 #include <sys/ioctl.h>
 #include <sys/time.h>
 #include <math.h>
+
+#ifdef ANDROID
+#include <android-config.h>
+#else
 #include <config.h>
+#endif
 
 #ifdef HAVE_SYS_KLOG_H
 #include <sys/klog.h>