aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregor Jasny <gjasny@googlemail.com>2012-06-24 17:19:29 +0200
committerGregor Jasny <gjasny@googlemail.com>2012-06-24 17:20:36 +0200
commit50bde45931f99ceb519c818f5c9262240609ebda (patch)
treeb11804ea8aaf900e91815406a567857a4d18ad34
parenta066e7312c0e49da0ec46ae0157922521e6cc6df (diff)
libv4l: Properly detect GCC symbol visibility support
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
-rw-r--r--configure.ac1
-rw-r--r--lib/include/libv4l1.h2
-rw-r--r--lib/include/libv4l2.h2
-rw-r--r--lib/include/libv4lconvert.h2
-rw-r--r--lib/libv4l1/Makefile.am2
-rw-r--r--lib/libv4l1/v4l1compat.c2
-rw-r--r--lib/libv4l2/Makefile.am2
-rw-r--r--lib/libv4l2/v4l2convert.c2
-rw-r--r--lib/libv4lconvert/Makefile.am2
9 files changed, 9 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac
index 8e166b1b..5c064524 100644
--- a/configure.ac
+++ b/configure.ac
@@ -55,6 +55,7 @@ PKG_PROG_PKG_CONFIG
#AC_PROG_SED
#AC_PROG_MKDIR_P
gl_PROMOTED_TYPE_MODE_T
+gl_VISIBILITY
AC_CHECK_HEADERS([sys/klog.h])
AC_CHECK_FUNCS([klogctl])
diff --git a/lib/include/libv4l1.h b/lib/include/libv4l1.h
index 10a986a2..e16dea1c 100644
--- a/lib/include/libv4l1.h
+++ b/lib/include/libv4l1.h
@@ -28,7 +28,7 @@ extern "C" {
#include <unistd.h>
#include <libv4l1-videodev.h>
-#if __GNUC__ >= 4
+#if HAVE_VISIBILITY
#define LIBV4L_PUBLIC __attribute__ ((visibility("default")))
#else
#define LIBV4L_PUBLIC
diff --git a/lib/include/libv4l2.h b/lib/include/libv4l2.h
index 9ca473e9..8f3f55a1 100644
--- a/lib/include/libv4l2.h
+++ b/lib/include/libv4l2.h
@@ -27,7 +27,7 @@
extern "C" {
#endif /* __cplusplus */
-#if __GNUC__ >= 4
+#if HAVE_VISIBILITY
#define LIBV4L_PUBLIC __attribute__ ((visibility("default")))
#else
#define LIBV4L_PUBLIC
diff --git a/lib/include/libv4lconvert.h b/lib/include/libv4lconvert.h
index 9ec1cf6b..167b57d7 100644
--- a/lib/include/libv4lconvert.h
+++ b/lib/include/libv4lconvert.h
@@ -42,7 +42,7 @@
extern "C" {
#endif /* __cplusplus */
-#if __GNUC__ >= 4
+#if HAVE_VISIBILITY
#define LIBV4L_PUBLIC __attribute__ ((visibility("default")))
#else
#define LIBV4L_PUBLIC
diff --git a/lib/libv4l1/Makefile.am b/lib/libv4l1/Makefile.am
index 321789c8..fb31a9cc 100644
--- a/lib/libv4l1/Makefile.am
+++ b/lib/libv4l1/Makefile.am
@@ -8,7 +8,7 @@ noinst_LTLIBRARIES = libv4l1.la
endif
libv4l1_la_SOURCES = libv4l1.c log.c libv4l1-priv.h
-libv4l1_la_CPPFLAGS = -fvisibility=hidden $(ENFORCE_LIBV4L_STATIC)
+libv4l1_la_CPPFLAGS = $(CFLAG_VISIBILITY) $(ENFORCE_LIBV4L_STATIC)
libv4l1_la_LDFLAGS = -version-info 0 -lpthread $(ENFORCE_LIBV4L_STATIC)
libv4l1_la_LIBADD = ../libv4l2/libv4l2.la
diff --git a/lib/libv4l1/v4l1compat.c b/lib/libv4l1/v4l1compat.c
index 2b49c882..e328288c 100644
--- a/lib/libv4l1/v4l1compat.c
+++ b/lib/libv4l1/v4l1compat.c
@@ -36,7 +36,7 @@
#error open/read/mmap is a prepocessor macro !!
#endif
-#if __GNUC__ >= 4
+#if HAVE_VISIBILITY
#define LIBV4L_PUBLIC __attribute__ ((visibility("default")))
#else
#define LIBV4L_PUBLIC
diff --git a/lib/libv4l2/Makefile.am b/lib/libv4l2/Makefile.am
index 34f10eef..434580f3 100644
--- a/lib/libv4l2/Makefile.am
+++ b/lib/libv4l2/Makefile.am
@@ -8,7 +8,7 @@ noinst_LTLIBRARIES = libv4l2.la
endif
libv4l2_la_SOURCES = libv4l2.c v4l2-plugin.c log.c libv4l2-priv.h
-libv4l2_la_CPPFLAGS = -fvisibility=hidden $(ENFORCE_LIBV4L_STATIC)
+libv4l2_la_CPPFLAGS = $(CFLAG_VISIBILITY) $(ENFORCE_LIBV4L_STATIC)
libv4l2_la_LDFLAGS = -version-info 0 -lpthread $(DLOPEN_LIBS) $(ENFORCE_LIBV4L_STATIC)
libv4l2_la_LIBADD = ../libv4lconvert/libv4lconvert.la
diff --git a/lib/libv4l2/v4l2convert.c b/lib/libv4l2/v4l2convert.c
index b7ddcf66..9b46ab88 100644
--- a/lib/libv4l2/v4l2convert.c
+++ b/lib/libv4l2/v4l2convert.c
@@ -41,7 +41,7 @@
#error open/read/mmap is a prepocessor macro !!
#endif
-#if __GNUC__ >= 4
+#if HAVE_VISIBILITY
#define LIBV4L_PUBLIC __attribute__ ((visibility("default")))
#else
#define LIBV4L_PUBLIC
diff --git a/lib/libv4lconvert/Makefile.am b/lib/libv4lconvert/Makefile.am
index a903ce75..50abef3c 100644
--- a/lib/libv4lconvert/Makefile.am
+++ b/lib/libv4lconvert/Makefile.am
@@ -20,7 +20,7 @@ libv4lconvert_la_SOURCES = \
if HAVE_JPEG
libv4lconvert_la_SOURCES += jpeg_memsrcdest.c jpeg_memsrcdest.h
endif
-libv4lconvert_la_CPPFLAGS = -fvisibility=hidden $(ENFORCE_LIBV4L_STATIC)
+libv4lconvert_la_CPPFLAGS = $(CFLAG_VISIBILITY) $(ENFORCE_LIBV4L_STATIC)
libv4lconvert_la_LDFLAGS = -version-info 0 -lrt -lm $(JPEG_LIBS) $(ENFORCE_LIBV4L_STATIC)
ov511_decomp_SOURCES = ov511-decomp.c

Privacy Policy