Commit 8fa88373a1d433c675b11200ccd58418e91f81e4

Tom Tromey 2018-12-19T14:18:40

Merge pull request #461 from NativeScript/bektchiev/fix-visibility-hidden-check-in-configure fix(configure): Correctly detect visibility("hidden") support on Darwin

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/configure.ac b/configure.ac
index 27676b0..055fe18 100644
--- a/configure.ac
+++ b/configure.ac
@@ -270,7 +270,7 @@ if test "x$GCC" = "xyes"; then
   	echo 'int __attribute__ ((visibility ("hidden"))) foo (void) { return 1  ; }' > conftest.c
   	libffi_cv_hidden_visibility_attribute=no
   	if AC_TRY_COMMAND(${CC-cc} -Werror -S conftest.c -o conftest.s 1>&AS_MESSAGE_LOG_FD); then
-  	    if grep '\.hidden.*foo' conftest.s >/dev/null; then
+  	    if egrep '(\.hidden|\.private_extern).*foo' conftest.s >/dev/null; then
   		libffi_cv_hidden_visibility_attribute=yes
   	    fi
   	fi