X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=m4%2Facx_pthread.m4;h=1cada4d81208178be4f2c0a7e9b4a89969b2249f;hb=47b7bd98bbdb0df6471fb40b084bb5f255c91237;hp=dcf633229216186dd50fbc21bbabacf35c3902aa;hpb=dcb4e7b6d849cb04cee7be7de37440f12bd305c7;p=catta diff --git a/m4/acx_pthread.m4 b/m4/acx_pthread.m4 index dcf6332..1cada4d 100644 --- a/m4/acx_pthread.m4 +++ b/m4/acx_pthread.m4 @@ -256,11 +256,16 @@ if test "x$acx_pthread_ok" = xyes; then # # -Wl,-z,defs forces link-time symbol resolution, so that the # linking checks with -shared actually have any value + # The Mingw32 equivalent to -z defs seems to be --error-unresolved-symbols. # # FIXME: -fPIC is required for -shared on many architectures, # so we specify it here, but the right way would probably be to # properly detect whether it is actually required. - CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS" + zdefs="-z,defs" + case "${host_os}" in + *mingw32*) zdefs="--unresolved-symbols=report-all,--error-unresolved-symbols" + esac + CFLAGS="-shared -fPIC -Wl,$zdefs $CFLAGS $PTHREAD_CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CC="$PTHREAD_CC"