summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2012-03-03 00:20:00 -0800
committerMark Adler <madler@alumni.caltech.edu>2012-03-03 00:20:00 -0800
commitdab7531eccdb5b22368797ae7958471401d1e427 (patch)
tree1cf5916c4f8f0f97b286fc55e9c2b7aa5b724a4c /configure
parent2547c6c81fbf751e22ab7dcafdc1d1b50c8562a3 (diff)
downloadzlib-dab7531eccdb5b22368797ae7958471401d1e427.tar.gz
Simplify test and use of gcc hidden attribute.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure10
1 files changed, 3 insertions, 7 deletions
diff --git a/configure b/configure
index eb103c8..6b7224b 100755
--- a/configure
+++ b/configure
@@ -638,11 +638,7 @@ fi
if test "$gcc" -eq 1; then
echo >> configure.log
cat > $test.c <<EOF
-#if ((__GNUC__-0) * 100 + __GNUC_MINOR__-0 >= 303)
-# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
-#else
-# define ZLIB_INTERNAL
-#endif
+#define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
int ZLIB_INTERNAL foo;
int main()
{
@@ -650,10 +646,10 @@ int main()
}
EOF
if tryboth $CC -c $CFLAGS $test.c; then
+ CFLAGS="$CFLAGS -DHAVE_HIDDEN"
+ SFLAGS="$SFLAGS -DHAVE_HIDDEN"
echo "Checking for attribute(visibility) support... Yes." | tee -a configure.log
else
- CFLAGS="$CFLAGS -DNO_VIZ"
- SFLAGS="$SFLAGS -DNO_VIZ"
echo "Checking for attribute(visibility) support... No." | tee -a configure.log
fi
fi