On Windows, we link ORTE against a version of pthread library shipped
in our tree. Therefore we add some switches to linker command line.
The problem is that this command line is also used for all configure
tests. Since our library is not yet compiled at compile time, it
caused many configure checks to fail even if they should succeed.
With this change, I'm able to cross-compile ORTE for Windows on Debian
Wheezy with mingw32 package. The used configure command was:
CC=i586-mingw32msvc-gcc ./configure --host=i586-mingw32msvc
Whether ORTE also runs on Windows correctly was not yet tested.
AC_CHECK_LIB(pthread, pthread_create, ,
AC_CHECK_LIB(c_r, pthread_create, ,
if test ${MINGW} == 'yes' ; then
- LIBS=$LIBS' -L$(top_srcdir)/orte/contrib/win_pthread/ -lpthread'
+ INTERNAL_PTHREAD_LIBS=' -L$(top_srcdir)/orte/contrib/win_pthread/ -lpthread'
AC_MSG_NOTICE([Using internal version of pthreads!!!])
else
AC_MSG_ERROR([Can't compile without pthreads!!!])
orte/libjorte/Makefile
orte/manager/Makefile])
+LIBS="$LIBS$INTERNAL_PTHREAD_LIBS"
AC_OUTPUT([
modtool