mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
Check for __attribute__((visibility("hidden"))).
This commit is contained in:
parent
c89e9afc5d
commit
59f5b70f3e
1 changed files with 26 additions and 0 deletions
26
configure.ac
26
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 <<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
|
||||
|
|
Loading…
Reference in a new issue