[netcf-devel] [PATCH 4/5] Pthread implementation not valid on Windows

Eric Blake eblake at redhat.com
Wed Sep 22 20:02:46 UTC 2010


On 09/17/2010 10:28 AM, Adam Stokes wrote:
> ---
>   configure.ac |   13 +++++++------
>   1 files changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index e0a10b3..c1e000d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -54,12 +54,13 @@ NETCF_CHECK_READLINE
>   NETCF_LIBDEPS=$(echo $LIBAUGEAS_LIBS $LIBEXSLT_LIBS $LIBXSLT_LIBS $LIBXML_LIBS $LIBNL_LIBS)
>   AC_SUBST([NETCF_LIBDEPS])
>
> -AC_CHECK_HEADER([pthread.h],
> -	[AC_CHECK_LIB([pthread],[pthread_join],[
> -		AC_DEFINE([HAVE_LIBPTHREAD],[],[Define if pthread (-lpthread)])
> -		AC_DEFINE([HAVE_PTHREAD_H],[],[Define if<pthread.h>])
> -		LIBS="-lpthread $LIBS"
> -	])])
> +dnl check pthread functions
> +dnl pulled from:
> +dnl http://www.mail-archive.com/libvir-list@redhat.com/msg24187.html
> +old_LIBS=$LIBS
> +LIBS="$LIBS $LIB_PTHREAD"
> +AC_CHECK_FUNCS([pthread_sigmask pthread_mutexattr_init])
> +LIBS=$old_libs

What you have is okay, but this patch is incomplete.  Where is the 
Makefile.am portion that uses $(LIB_PTHREAD), now that $(LIBS) no longer 
contains -lpthread?

-- 
Eric Blake   eblake at redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org


More information about the netcf-devel mailing list