X-Git-Url: http://www.project-moonshot.org/gitweb/?p=shibboleth%2Fcpp-sp-resolver.git;a=blobdiff_plain;f=m4%2Facx_pthread.m4;fp=acx_pthread.m4;h=4e9c8cb919fde171d1d6e1833d3760b637a52676;hp=33f1d2930560248f0a947f87f2c2a1f3daf948df;hb=00c32369c8efd6f50ef10d4fa27130baa3d33847;hpb=dcf2f70e397e0ed08cb0ea5dd4200addbf2e6f08 diff --git a/acx_pthread.m4 b/m4/acx_pthread.m4 similarity index 97% rename from acx_pthread.m4 rename to m4/acx_pthread.m4 index 33f1d29..4e9c8cb 100644 --- a/acx_pthread.m4 +++ b/m4/acx_pthread.m4 @@ -86,8 +86,7 @@ AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) -AC_LANG_SAVE -AC_LANG_C +AC_LANG_PUSH([C]) acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h @@ -200,11 +199,9 @@ for flag in $acx_pthread_flags; do # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. - AC_TRY_LINK([#include ], - [pthread_t th; pthread_join(th, 0); + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); - pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], - [acx_pthread_ok=yes]) + pthread_create(0,0,0,0); pthread_cleanup_pop(0); ]])],[acx_pthread_ok=yes],[]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" @@ -230,8 +227,7 @@ if test "x$acx_pthread_ok" = xyes; then AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do - AC_TRY_LINK([#include ], [int attr=$attr; return attr;], - [attr_name=$attr; break]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int attr=$attr; return attr;]])],[attr_name=$attr; break],[]) done AC_MSG_RESULT($attr_name) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then @@ -283,5 +279,5 @@ else acx_pthread_ok=no $2 fi -AC_LANG_RESTORE +AC_LANG_POP ])dnl ACX_PTHREAD