Commit 59f5b70f authored by gb's avatar gb

Check for __attribute__((visibility("hidden"))).

parent c89e9afc
......@@ -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 <<EOF
int foo __attribute__ ((visibility ("hidden"))) = 1;
int bar __attribute__ ((visibility ("protected"))) = 1;
EOF
vaapi_cv_visibility_attribute=no
if ${CC-cc} -Werror -S conftest.c -o conftest.s >/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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment