@@ -40,24 +40,29 @@ AC_DEFUN([OPAL_CHECK_PMI_LIB],
40
40
41
41
# check for the header
42
42
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] ,
45
45
[ AC_MSG_RESULT ( [ found] )
46
- opal_check_$3 _mycppflags="-I$1 /include "] ,
46
+ opal_check_$3 _mycppflags="-I$1 "] ,
47
47
[ 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] ,
50
50
[ AC_MSG_RESULT ( [ found] )
51
- opal_check_$3 _mycppflags="-I$1 /include/slurm"
52
- $5 ] ,
51
+ opal_check_$3 _mycppflags="-I$1 /include"] ,
53
52
[ 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] ) ] ) ] ) ] ,
55
60
[ 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 ] ,
57
62
[ AC_MSG_RESULT ( [ found] ) ] ,
58
63
[ AC_MSG_RESULT ( [ not found] )
59
64
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 ] ,
61
66
[ AC_MSG_RESULT ( [ found] )
62
67
opal_check_$3 _mycppflags="-I/usr/include/slurm"
63
68
$5 ] ,
0 commit comments