and I'd like to remove one ugly workaround, editting configure.ac.
This code should properly link pthreadGC2 when cross compiling:
if test "x$OS" = "xWindows_NT" ; then
# MinGW
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS="-lpthreadGC2",[])
else
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS="-lpthread",[])
fi
but the procedure requires the following edit:
if test "x$OS" = "xWindows_NT" ; then
# MinGW
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS="-lpthreadGC2",[])
else
AC_CHECK_LIB([pthread], [pthread_create], PTHREAD_LIBS="-lpthreadGC2",[])
fi
suggesting the logic isn't working.
Any suggestions to make the logic work?
perhaps moving it to the case clause starting on line 45?
That's kinda what I'm looking for but that tests $MINGW_TARGET and it returns Linux.
What I really want to test is the host as specified by "--host=x86_64-w64-mingw32"
but I can't figure out how.