diff options
author | bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2010-04-29 16:37:26 +0000 |
---|---|---|
committer | bart <bart@a5019735-40e9-0310-863c-91ae7b9d1cf9> | 2010-04-29 16:37:26 +0000 |
commit | b11355cbe841f4d7881ecbd9817e456120b122ab (patch) | |
tree | b8dcf470b596a709b6616e0a569079fef227f92b /configure.in | |
parent | 422b779a97b15e92a2fe84ed21103c1bc0c3b88b (diff) |
Refactoring: replaced two AC_TRY_COMPILE() occurrences by AC_CHECK_MEMBER().
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11119 a5019735-40e9-0310-863c-91ae7b9d1cf9
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 44 |
1 files changed, 14 insertions, 30 deletions
diff --git a/configure.in b/configure.in index 6deccb61..c33fc6b4 100644 --- a/configure.in +++ b/configure.in @@ -918,40 +918,24 @@ AC_MSG_RESULT([no]) # Check whether pthread_mutex_t has a member called __m_kind. -AC_MSG_CHECKING([for pthread_mutex_t::__m_kind]) - -AC_TRY_COMPILE( -[ - #include <pthread.h> -], [ - pthread_mutex_t m; - return m.__m_kind; -], [ -AC_MSG_RESULT([yes]) -AC_DEFINE([HAVE_PTHREAD_MUTEX_T__M_KIND], 1, - [Define to 1 if pthread_mutex_t has a member called __m_kind.]) -], [ -AC_MSG_RESULT([no]) -]) +AC_CHECK_MEMBER([pthread_mutex_t.__m_kind], + [AC_DEFINE([HAVE_PTHREAD_MUTEX_T__M_KIND], + 1, + [Define to 1 if pthread_mutex_t has a member called __m_kind.]) + ], + [], + [#include <pthread.h>]) # Check whether pthread_mutex_t has a member called __data.__kind. -AC_MSG_CHECKING([for pthread_mutex_t::__data.__kind]) - -AC_TRY_COMPILE( -[ -#include <pthread.h> -], [ - pthread_mutex_t m; - return m.__data.__kind; -], [ -AC_MSG_RESULT([yes]) -AC_DEFINE([HAVE_PTHREAD_MUTEX_T__DATA__KIND], 1, - [Define to 1 if pthread_mutex_t has a member __data.__kind.]) -], [ -AC_MSG_RESULT([no]) -]) +AC_CHECK_MEMBER([pthread_mutex_t.__data.__kind], + [AC_DEFINE([HAVE_PTHREAD_MUTEX_T__DATA__KIND], + 1, + [Define to 1 if pthread_mutex_t has a member __data.__kind.]) + ], + [], + [#include <pthread.h>]) # does this compiler support -maltivec and does it have the include file |