Commit 493b5e58 authored by Nils Goroll's avatar Nils Goroll

fix visibility attributes autocrap test for SUNCC

Spotted by @lkarsten
parent 4cf4bbef
......@@ -241,15 +241,21 @@ AC_CHECK_FUNCS([pthread_setname_np])
AC_CHECK_FUNCS([pthread_mutex_isowned_np])
LIBS="${save_LIBS}"
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
# Support for visibility attribute
save_CFLAGS="${CFLAGS}"
CFLAGS="${CFLAGS} -Werror"
if test "$SUNCC" = "yes" ; then
CFLAGS="${CFLAGS} -errwarn=%all,no%E_EMPTY_TRANSLATION_UNIT"
else
CFLAGS="${CFLAGS} -Werror"
fi
AC_CACHE_CHECK([whether we have support for visibility attributes],
[ac_cv_have_viz],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33)
#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33 || defined(__SUNPRO_C))
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
#else
# define ZLIB_INTERNAL
......@@ -646,8 +652,6 @@ AX_CHECK_COMPILE_FLAG([-Wall],
[CFLAGS="${CFLAGS} -Wall"
OCFLAGS="${OCFLAGS} -Wall"])
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "$SUNCC" = "yes" ; then
SUNCC_CFLAGS=" \
-errwarn=%all,no%E_EMPTY_TRANSLATION_UNIT \
......
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