--- libpthread-stubs-0.1~orig/configure.ac 2006-11-22 16:51:21.000000000 +0900 +++ libpthread-stubs-0.1/configure.ac 2009-08-06 02:43:35.000000000 +0900 @@ -30,9 +30,16 @@ fi -PKG_CONFIG_LIBS= +have_all_stubs= AC_CHECK_FUNCS([pthread_self pthread_mutex_init pthread_mutex_destroy pthread_mutex_lock pthread_mutex_unlock pthread_cond_init pthread_cond_destroy pthread_cond_wait pthread_cond_signal pthread_cond_broadcast pthread_equal], - [], [PKG_CONFIG_LIBS='-L${libdir} -lpthread-stubs']) + [have_all_stubs=yes]) +AC_CHECK_FUNCS([__libc_thr_self __libc_mutex_init __libc_mutex_destroy __libc_mutex_lock __libc_mutex_unlock __libc_cond_init __libc_cond_destroy __libc_cond_wait __libc_cond_signal __libc_cond_broadcast __libc_thr_equal], + [have_all_stubs=yes]) +if test "x$have_all_stubs" = "xyes"; then + PKG_CONFIG_LIBS='' +else + PKG_CONFIG_LIBS='-L${libdir} -lpthread-stubs' +fi AC_SUBST([PKG_CONFIG_LIBS]) AM_CONDITIONAL(BUILD_LIB, test "x$PKG_CONFIG_LIBS" != x)