|
797 | 797 |
|
798 | 798 | AC_CACHE_CHECK([for static_assert], [st_cv_have_static_assert], |
799 | 799 | [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <assert.h>]], |
800 | | - [[static_assert(1,"")]])], |
| 800 | + [[static_assert(1,"")]] |
| 801 | + ) |
| 802 | + ], |
801 | 803 | [st_cv_have_static_assert=yes], |
802 | | - [st_cv_have_static_assert=no])]) |
803 | | -if test "x$st_cv_have_static_assert" = xyes; then |
804 | | - AC_DEFINE([HAVE_STATIC_ASSERT], [1], |
805 | | - [Define to 1 if the system provides static_assert]) |
806 | | -fi |
| 804 | + [AC_LINK_IFELSE([AC_LANG_PROGRAM([], |
| 805 | + [[_Static_assert(1,"")]] |
| 806 | + ) |
| 807 | + ], |
| 808 | + [st_cv_have_static_assert=_Static_assert], |
| 809 | + [st_cv_have_static_assert=no] |
| 810 | + ) |
| 811 | + ] |
| 812 | + ) |
| 813 | + ] |
| 814 | + ) |
| 815 | +case "x$st_cv_have_static_assert" in |
| 816 | + xyes) |
| 817 | + AC_DEFINE([HAVE_STATIC_ASSERT], [1], |
| 818 | + [Define to 1 if the system provides static_assert]) |
| 819 | + ;; |
| 820 | + x_Static_assert) |
| 821 | + AC_DEFINE([HAVE__STATIC_ASSERT], [1], |
| 822 | + [Define to 1 if the system provides _Static_assert]) |
| 823 | + ;; |
| 824 | +esac |
807 | 825 |
|
808 | 826 | AC_CHECK_LIB([dl], [dladdr], [dl_LIBS='-ldl'], [dl_LIBS=]) |
809 | 827 | if test "x$ac_cv_lib_dl_dladdr" = xyes; then |
|
0 commit comments