From: Bart Van Assche Date: Thu, 29 Apr 2010 16:37:26 +0000 (+0000) Subject: Refactoring: replaced two AC_TRY_COMPILE() occurrences by AC_CHECK_MEMBER(). X-Git-Tag: svn/VALGRIND_3_6_0~305 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b86a053f92536d98e73d08d29f29fe030e4a9cdb;p=thirdparty%2Fvalgrind.git Refactoring: replaced two AC_TRY_COMPILE() occurrences by AC_CHECK_MEMBER(). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11119 --- diff --git a/configure.in b/configure.in index 6deccb61b1..c33fc6b4a7 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_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 ]) # 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_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 ]) # does this compiler support -maltivec and does it have the include file