summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorMark Adler <madler@alumni.caltech.edu>2012-02-19 23:31:55 -0800
committerMark Adler <madler@alumni.caltech.edu>2012-02-19 23:33:10 -0800
commit3f4339b61b3737f6efdd55368488f0a5888e4935 (patch)
tree7291783e349ad350707bcc167c5631b82c0e8fe8 /configure
parente6d2a8471b89d1c1d9fd84d14f26f516f5f66238 (diff)
downloadzlib-3f4339b61b3737f6efdd55368488f0a5888e4935.tar.gz
Improve the detection of no hidden visibility attribute.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure16
1 files changed, 14 insertions, 2 deletions
diff --git a/configure b/configure
index 52a50fb..eb103c8 100755
--- a/configure
+++ b/configure
@@ -136,6 +136,18 @@ else
}
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
cat > $test.c <<EOF
@@ -626,7 +638,7 @@ fi
if test "$gcc" -eq 1; then
echo >> configure.log
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")))
#else
# define ZLIB_INTERNAL
@@ -637,7 +649,7 @@ int main()
return 0;
}
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
else
CFLAGS="$CFLAGS -DNO_VIZ"