summaryrefslogtreecommitdiff
path: root/Build/source/libs/harfbuzz/configure
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/libs/harfbuzz/configure')
-rwxr-xr-xBuild/source/libs/harfbuzz/configure30
1 files changed, 26 insertions, 4 deletions
diff --git a/Build/source/libs/harfbuzz/configure b/Build/source/libs/harfbuzz/configure
index fb021dff2c5..a179969feb9 100755
--- a/Build/source/libs/harfbuzz/configure
+++ b/Build/source/libs/harfbuzz/configure
@@ -7754,8 +7754,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
extern void foo(void);
void foo(void){printf("foo\n");}
_ACEOF
-# FIXME: Add tests for non-GNU compilers
-for kpse_flag in '-fvisibility=hidden -fvisibility-inlines-hidden' '-fvisibility=hidden'; do
+# Maybe other compiler need other tests; patches needed.
+#
+# The idea, maybe, is to use both flags when they are supported, but
+# old C++ compilers, as well as C, don't support
+# -fvisibility-inlines-hidden, so test just -fvisibility=hidden too?
+#
+for kpse_flag in "-fvisibility=hidden -fvisibility-inlines-hidden" \
+ "-fvisibility=hidden"; do
+ if test x"C" = xC \
+ && echo "$kpse_flag" | grep inlines-hidden >/dev/null; then
+ # C does not support this additional flag; just skip the test.
+ continue
+ fi
CFLAGS="$kpse_save_flags -Werror $kpse_flag"
if ac_fn_c_try_compile "$LINENO"
then :
@@ -7804,8 +7815,19 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
extern void foo(void);
void foo(void){printf("foo\n");}
_ACEOF
-# FIXME: Add tests for non-GNU compilers
-for kpse_flag in '-fvisibility=hidden -fvisibility-inlines-hidden' '-fvisibility=hidden'; do
+# Maybe other compiler need other tests; patches needed.
+#
+# The idea, maybe, is to use both flags when they are supported, but
+# old C++ compilers, as well as C, don't support
+# -fvisibility-inlines-hidden, so test just -fvisibility=hidden too?
+#
+for kpse_flag in "-fvisibility=hidden -fvisibility-inlines-hidden" \
+ "-fvisibility=hidden"; do
+ if test x"C++" = xC \
+ && echo "$kpse_flag" | grep inlines-hidden >/dev/null; then
+ # C does not support this additional flag; just skip the test.
+ continue
+ fi
CXXFLAGS="$kpse_save_flags -Werror $kpse_flag"
if ac_fn_cxx_try_compile "$LINENO"
then :