configure: fix symbol hiding usability check
authorYang Tse <yangsita@gmail.com>
Sat, 20 Aug 2011 18:11:00 +0000 (20:11 +0200)
committerYang Tse <yangsita@gmail.com>
Sat, 20 Aug 2011 18:11:00 +0000 (20:11 +0200)
A more thorough test is done now in order to determine visibility attribute
usability, given that some compilers don't support visibility attribute on
all configurations.

m4/cares-compilers.m4

index 5d3035c7812d6ddba98f990100d9704d374f8bf6..80cfb5c6d0270ea78f1dd1a3aaaf327bc94532a4 100644 (file)
@@ -15,7 +15,7 @@
 #***************************************************************************
 
 # File version for 'aclocal' use. Keep it a single number.
-# serial 67
+# serial 68
 
 
 dnl CARES_CHECK_COMPILER
@@ -1484,12 +1484,18 @@ AC_DEFUN([CARES_CHECK_COMPILER_SYMBOL_HIDING], [
         }
       ]],[[
         char b[16];
-        char *r = dummy(&b);
+        char *r = dummy(&b[0]);
         if(r)
           return (int)*r;
       ]])
     ],[
       supports_symbol_hiding="yes"
+      if test -f conftest.err; then
+        grep 'visibility' conftest.err >/dev/null
+        if test "$?" -eq "0"; then
+          supports_symbol_hiding="no"
+        fi
+      fi
     ],[
       supports_symbol_hiding="no"
       echo " " >&6