From 59f5b70f3e6edd4a5545866a3f6b2b6193771bbf Mon Sep 17 00:00:00 2001 From: gb Date: Mon, 25 Jan 2010 13:49:55 +0000 Subject: [PATCH] Check for __attribute__((visibility("hidden"))). --- configure.ac | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/configure.ac b/configure.ac index 08c64a53e0..fb68d16463 100644 --- a/configure.ac +++ b/configure.ac @@ -30,6 +30,32 @@ AC_CANONICAL_TARGET AM_INIT_AUTOMAKE AM_CONFIG_HEADER([config.h]) +dnl Check for __attribute__((visibility())) +AC_CACHE_CHECK([whether __attribute__((visibility())) is supported], + vaapi_cv_visibility_attribute, + [cat > conftest.c </dev/null 2>&1; then + if grep '\.hidden.*foo' conftest.s >/dev/null; then + if grep '\.protected.*bar' conftest.s >/dev/null; then + vaapi_cv_visibility_attribute=yes + fi + fi + fi + rm -f conftest.[cs] +]) +if test $vaapi_cv_visibility_attribute = yes; then + vaapi_cv_visibility_attribute_hidden="__attribute__((visibility(\"hidden\")))" +else + vaapi_cv_visibility_attribute_hidden="" +fi +AC_DEFINE_UNQUOTED([attribute_hidden], + [$vaapi_cv_visibility_attribute_hidden], + [Define the "hidden" visibility attribute]) + dnl Versions for GStreamer and plugins-base GST_MAJORMINOR=gst_major_minor_version GST_VERSION_REQUIRED=gst_version