[Mesa-dev] [PATCH] configure.ac: Do not use Pthreads with MinGW.

Matt Turner mattst88 at gmail.com
Tue Jun 3 17:08:27 PDT 2014


On Tue, Jun 3, 2014 at 5:06 PM, Vinson Lee <vlee at freedesktop.org> wrote:
> Match the behavior of the SCons MinGW build.
>
> This patch also fixes these build errors.
>
>   CC       glapi_entrypoint.lo
> glapi_entrypoint.c: In function 'init_glapi_relocs_once':
> glapi_entrypoint.c:341:4: error: unknown type name 'pthread_once_t'
>     static pthread_once_t once_control = PTHREAD_ONCE_INIT;
>     ^
> glapi_entrypoint.c:341:41: error: 'PTHREAD_ONCE_INIT' undeclared (first use in this function)
>     static pthread_once_t once_control = PTHREAD_ONCE_INIT;
>                                          ^
> glapi_entrypoint.c:341:41: note: each undeclared identifier is reported only once for each function it appears in
> glapi_entrypoint.c:342:4: error: implicit declaration of function 'pthread_once' [-Werror=implicit-function-declaration]
>     pthread_once( & once_control, init_glapi_relocs );
>     ^
>
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  configure.ac | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/configure.ac b/configure.ac
> index 9c64400..ab3b91d 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -552,7 +552,12 @@ dnl See if posix_memalign is available
>  AC_CHECK_FUNC([posix_memalign], [DEFINES="$DEFINES -DHAVE_POSIX_MEMALIGN"])
>
>  dnl Check for pthreads
> -AX_PTHREAD
> +case "$host_os" in
> +mingw*)
> +    ;;
> +*)
> +    AX_PTHREAD

Missing ;; ?

> +esac


More information about the mesa-dev mailing list