Fixed some bugs.
[llvm/zpu.git] / autoconf / m4 / visibility_inlines_hidden.m4
blob42ddbe9128b386688707b153e9de24ef4d2f9a01
2 # Determine if the compiler accepts -fvisibility-inlines-hidden
4 # This macro is specific to LLVM.
6 AC_DEFUN([AC_CXX_USE_VISIBILITY_INLINES_HIDDEN],
7 [AC_CACHE_CHECK([for compiler -fvisibility-inlines-hidden option],
8                 [llvm_cv_cxx_visibility_inlines_hidden],
9 [ AC_LANG_PUSH([C++])
10   oldcxxflags="$CXXFLAGS"
11   CXXFLAGS="$CXXFLAGS -fvisibility-inlines-hidden"
12   AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
13     [llvm_cv_cxx_visibility_inlines_hidden=yes],[llvm_cv_cxx_visibility_inlines_hidden=no])
14   CXXFLAGS="$oldcxxflags"
15   AC_LANG_POP([C++])
17 if test "$llvm_cv_cxx_visibility_inlines_hidden" = yes ; then
18   AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[1])
19 else
20   AC_SUBST([ENABLE_VISIBILITY_INLINES_HIDDEN],[0])