Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
elpa
elpa
Commits
58cd0ef1
Commit
58cd0ef1
authored
Nov 10, 2018
by
Andreas Marek
Browse files
Add configure test for _Generic
parent
bfc95182
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
configure.ac
View file @
58cd0ef1
...
...
@@ -119,6 +119,7 @@ AM_CONDITIONAL([WITH_SCALAPACK_TESTS], [test x"$enable_scalapack_tests" = x"yes"
dnl C
AC_LANG_PUSH([C])
AX_PROG_CC_MPI([test x"$with_mpi" = x"yes"],[found_mpi_c=yes],[found_mpi_c=no])
if test x"$with_mpi" = x"yes"; then
if test x"$found_mpi_c" = x"no"; then
...
...
@@ -142,6 +143,29 @@ AX_CHECK_COMPILE_FLAG([-std=c11], [
exit -1
])
AC_MSG_CHECKING(whether C compiler can use _Generic )
AC_COMPILE_IFELSE([AC_LANG_SOURCE([
int main(int argc, char **argv) {
#define elpa_set(e, name, value, error) _Generic((value), \
int: \
elpa_set_integer, \
\
double: \
elpa_set_double \
)(e, name, value, error)
return 0;
}
])],
[can_compile_generic=yes],
[can_compile_generic=no]
)
AC_MSG_RESULT([${can_compile_generic}])
if test x"$can_compile_generic" != x"yes"; then
AC_MSG_ERROR([C compiler cannot handle _Generic statement! Upgrade or change C compiler])
fi
AC_DEFINE([HAVE_VSX_SSE],[1],[Altivec VSX intrinsics are supported on this CPU])
AC_PROG_INSTALL
AM_PROG_AR
AM_PROG_AS
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment