check_include_file(stdarg.h Z_HAVE_STDARG_H)
#
-# Check if we can hide zlib internal symbols that are linked between separate source files
+# Check if we can hide zlib internal symbols that are linked between separate source files using hidden
#
check_c_source_compiles(
"#define ZLIB_INTERNAL __attribute__((visibility (\"hidden\")))
add_definitions(-DHAVE_HIDDEN)
endif()
+#
+# Check if we can hide zlib internal symbols that are linked between separate source files using internal
+#
+check_c_source_compiles(
+ "#define ZLIB_INTERNAL __attribute__((visibility (\"internal\")))
+ int ZLIB_INTERNAL foo;
+ int main()
+ {
+ return 0;
+ }"
+ HAVE_ATTRIBUTE_VISIBILITY_INTERNAL FAIL_REGEX "not supported")
+if(HAVE_ATTRIBUTE_VISIBILITY_INTERNAL)
+ add_definitions(-DHAVE_INTERNAL)
+endif()
+
#
# check for __builtin_ctzl() support in the compiler
#