Improve the detection of no hidden visibility attribute.
This commit is contained in:
parent
e6d2a8471b
commit
3f4339b61b
16
configure
vendored
16
configure
vendored
@ -136,6 +136,18 @@ else
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
tryboth()
|
||||||
|
{
|
||||||
|
show $*
|
||||||
|
got=`( $* ) 2>&1`
|
||||||
|
ret=$?
|
||||||
|
printf %s "$got" >> configure.log
|
||||||
|
if test $ret -ne 0; then
|
||||||
|
return $ret
|
||||||
|
fi
|
||||||
|
test "$got" = ""
|
||||||
|
}
|
||||||
|
|
||||||
echo >> configure.log
|
echo >> configure.log
|
||||||
|
|
||||||
cat > $test.c <<EOF
|
cat > $test.c <<EOF
|
||||||
@ -626,7 +638,7 @@ fi
|
|||||||
if test "$gcc" -eq 1; then
|
if test "$gcc" -eq 1; then
|
||||||
echo >> configure.log
|
echo >> configure.log
|
||||||
cat > $test.c <<EOF
|
cat > $test.c <<EOF
|
||||||
#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33)
|
#if ((__GNUC__-0) * 100 + __GNUC_MINOR__-0 >= 303)
|
||||||
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
||||||
#else
|
#else
|
||||||
# define ZLIB_INTERNAL
|
# define ZLIB_INTERNAL
|
||||||
@ -637,7 +649,7 @@ int main()
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
if try $CC -c $CFLAGS $test.c; then
|
if tryboth $CC -c $CFLAGS $test.c; then
|
||||||
echo "Checking for attribute(visibility) support... Yes." | tee -a configure.log
|
echo "Checking for attribute(visibility) support... Yes." | tee -a configure.log
|
||||||
else
|
else
|
||||||
CFLAGS="$CFLAGS -DNO_VIZ"
|
CFLAGS="$CFLAGS -DNO_VIZ"
|
||||||
|
3
gzguts.h
3
gzguts.h
@ -12,8 +12,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GCC_VER ((__GNUC__-0) * 100 + __GNUC_MINOR__-0)
|
#if ((__GNUC__-0) * 100 + __GNUC_MINOR__-0) >= 303 && !defined(NO_VIZ)
|
||||||
#if ((GCC_VER >= 303 && !defined(__APPLE__)) || GCC_VER >= 400) && !defined(NO_VIZ)
|
|
||||||
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
||||||
#else
|
#else
|
||||||
# define ZLIB_INTERNAL
|
# define ZLIB_INTERNAL
|
||||||
|
3
zutil.h
3
zutil.h
@ -13,8 +13,7 @@
|
|||||||
#ifndef ZUTIL_H
|
#ifndef ZUTIL_H
|
||||||
#define ZUTIL_H
|
#define ZUTIL_H
|
||||||
|
|
||||||
#define GCC_VER ((__GNUC__-0) * 100 + __GNUC_MINOR__-0)
|
#if ((__GNUC__-0) * 100 + __GNUC_MINOR__-0) >= 303 && !defined(NO_VIZ)
|
||||||
#if ((GCC_VER >= 303 && !defined(__APPLE__)) || GCC_VER >= 400) && !defined(NO_VIZ)
|
|
||||||
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
|
||||||
#else
|
#else
|
||||||
# define ZLIB_INTERNAL
|
# define ZLIB_INTERNAL
|
||||||
|
Loading…
Reference in New Issue
Block a user