@@ -40,24 +40,29 @@ AC_DEFUN([OPAL_CHECK_PMI_LIB],
4040
4141 # check for the header
4242 AS_IF ( [ test -n "$1 "] ,
43- [ AC_MSG_CHECKING ( [ for $3 .h in $1 /include ] )
44- AS_IF ( [ test -f $1 /include /$3 .h] ,
43+ [ AC_MSG_CHECKING ( [ for $3 .h in $1 ] )
44+ AS_IF ( [ test -f $1 /$3 .h && test -r $1 /$3 .h] ,
4545 [ AC_MSG_RESULT ( [ found] )
46- opal_check_$3 _mycppflags="-I$1 /include "] ,
46+ opal_check_$3 _mycppflags="-I$1 "] ,
4747 [ AC_MSG_RESULT ( [ not found] )
48- AC_MSG_CHECKING ( [ for $3 .h in $1 /include/slurm ] )
49- AS_IF ( [ test -f $1 /include/slurm /$3 .h] ,
48+ AC_MSG_CHECKING ( [ for $3 .h in $1 /include] )
49+ AS_IF ( [ test -f $1 /include/$3 .h && test -r $1 /include /$3 .h] ,
5050 [ AC_MSG_RESULT ( [ found] )
51- opal_check_$3 _mycppflags="-I$1 /include/slurm"
52- $5 ] ,
51+ opal_check_$3 _mycppflags="-I$1 /include"] ,
5352 [ AC_MSG_RESULT ( [ not found] )
54- opal_check_$3 _hdr_happy=no] ) ] ) ] ,
53+ AC_MSG_CHECKING ( [ for $3 .h in $1 /include/slurm] )
54+ AS_IF ( [ test -f $1 /include/slurm/$3 .h && test -r $1 /include/slurm/$3 .h] ,
55+ [ AC_MSG_RESULT ( [ found] )
56+ opal_check_$3 _mycppflags="-I$1 /include/slurm"
57+ $5 ] ,
58+ [ AC_MSG_RESULT ( [ not found] )
59+ opal_check_$3 _hdr_happy=no] ) ] ) ] ) ] ,
5560 [ AC_MSG_CHECKING ( [ for $3 .h in /usr/include] )
56- AS_IF ( [ test -f /usr/include/$3 .h] ,
61+ AS_IF ( [ test -f /usr/include/$3 .h && test -r /usr/include/ $3 .h ] ,
5762 [ AC_MSG_RESULT ( [ found] ) ] ,
5863 [ AC_MSG_RESULT ( [ not found] )
5964 AC_MSG_CHECKING ( [ for $3 .h in /usr/include/slurm] )
60- AS_IF ( [ test -f /usr/include/slurm/$3 .h] ,
65+ AS_IF ( [ test -f /usr/include/slurm/$3 .h && test -r /usr/include/slurm/ $3 .h ] ,
6166 [ AC_MSG_RESULT ( [ found] )
6267 opal_check_$3 _mycppflags="-I/usr/include/slurm"
6368 $5 ] ,
0 commit comments