Changeset 4843

Show
Ignore:
Timestamp:
06/28/09 18:48:19 (5 months ago)
Author:
balaji
Message:

It looks like just checking for the existence of pthread.h is not
sufficient. We need to check for the existence of libpthread.a as
well. Add -lpthread explicitly if we find it.

Location:
mpich2/trunk/src/pm/hydra
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • mpich2/trunk/src/pm/hydra/configure.in

    r4842 r4843  
    3434                 sched.h pthread.h sys/stat.h) 
    3535 
     36dnl Check if the pthread library is present. Apparently, just checking 
     37dnl for pthread.h is not sufficient. 
     38AC_CHECK_LIB(pthread,pthread_create,pthread_lib_exists=yes,pthread_lib_exists=no) 
     39 
     40dnl Check if the upper-level enabled threads support 
     41if test "$MPICH2_THREAD_PACKAGE" != "none" -a "$pthread_lib_exists" = "yes" ; then 
     42   AC_DEFINE(HAVE_THREAD_SUPPORT,1,[Define thread support]) 
     43   LDFLAGS="$LDFLAGS -lpthread" 
     44fi 
     45 
    3646dnl Check for necessary functions 
    3747AC_CHECK_FUNCS(gettimeofday time strdup sigaction signal usleep alloca unsetenv \ 
    3848               strerror strsignal putenv) 
    39  
    40 dnl Check if the upper-level enabled threads support 
    41 if test "$MPICH2_THREAD_PACKAGE" != "none" ; then 
    42    AC_DEFINE(HAVE_THREAD_SUPPORT,1,[Define thread support]) 
    43 fi 
    44 AM_CONDITIONAL([hydra_include_pthread], [test "$MPICH2_THREAD_PACKAGE" != "none"]) 
    4549 
    4650# putenv() sets environment variable 
  • mpich2/trunk/src/pm/hydra/pm/pmiserv/Makefile.mk

    r4842 r4843  
    1111        $(top_srcdir)/pm/pmiserv/pmi_proxy_utils.c 
    1212pmi_proxy_LDADD = libhydra.a 
    13  
    14 if hydra_include_pthread 
    15 pmi_proxy_LDFLAGS = -lpthread 
    16 endif 
    1713 
    1814libpm_a_SOURCES += $(top_srcdir)/pm/pmiserv/pmi_handle.c \ 
  • mpich2/trunk/src/pm/hydra/ui/mpiexec/Makefile.mk

    r4842 r4843  
    1313mpiexec_CFLAGS = -I$(top_srcdir)/ui/utils 
    1414 
    15 if hydra_include_pthread 
    16 mpiexec_LDFLAGS = -lpthread 
    17 endif 
    18  
    1915install-alt-ui: mpiexec 
    2016        @if [ ! -d $(DESTDIR)${bindir} ] ; then \