@@ -93,7 +93,7 @@ AC_DEFUN([OPAL_MCA],[
93
93
if test "$enable_mca_no_build" = "yes"; then
94
94
AC_MSG_RESULT ( [ yes] )
95
95
AC_MSG_ERROR ( [ *** The enable-mca-no-build flag requires an explicit list
96
- *** of type-component pairs. For example, --enable-mca-no-build=pml-ob1] )
96
+ of type-component pairs. For example, --enable-mca-no-build=pml-ob1] )
97
97
else
98
98
ifs_save="$IFS"
99
99
IFS="${IFS}$PATH_SEPARATOR,"
@@ -123,11 +123,7 @@ AC_DEFUN([OPAL_MCA],[
123
123
# in the form DIRECT_[ type] =[ component]
124
124
#
125
125
AC_MSG_CHECKING ( [ which components should be direct-linked into the library] )
126
- if test "$enable_mca_direct" = "yes" ; then
127
- AC_MSG_RESULT ( [ yes] )
128
- AC_MSG_ERROR ( [ *** The enable-mca-direct flag requires an explicit list of
129
- *** type-component pairs. For example, --enable-mca-direct=pml-ob1,coll-basic] )
130
- elif test ! -z "$enable_mca_direct" && test "$enable_mca_direct" != "" ; then
126
+ if test -n "$enable_mca_direct" ; then
131
127
#
132
128
# we need to add this into the static list, unless the static list
133
129
# is everything
@@ -145,15 +141,21 @@ AC_DEFUN([OPAL_MCA],[
145
141
IFS="${IFS}$PATH_SEPARATOR,"
146
142
msg=
147
143
for item in $enable_mca_direct; do
148
- type="`echo $item | cut -f1 -d-`"
149
- comp="`echo $item | cut -f2- -d-`"
144
+ type="`echo $item | cut -s - f1 -d-`"
145
+ comp="`echo $item | cut -s - f2- -d-`"
150
146
if test -z $type || test -z $comp ; then
151
- AC_MSG_ERROR ( [ *** The enable-mca-direct flag requires a
152
- *** list of type-component pairs. Invalid input detected.] )
153
- else
154
- AS_VAR_SET ( [ AS_TR_SH ( [ DIRECT_$type] ) ] , [ AS_TR_SH ( [ $comp] ) ] )
155
- msg="$item $msg"
147
+ AC_MSG_ERROR ( [ enable-mca-direct requires a list of type-component pairs (ex. --enable-mca-direct=pml-ob1,smsc-xpmem)] )
156
148
fi
149
+
150
+ var_name=AS_TR_SH ( [ DIRECT_${type}] )
151
+ AS_VAR_COPY ( [ var_value] , [ $var_name] )
152
+
153
+ if test -n "$var_value" ; then
154
+ AC_MSG_ERROR ( [ enable-mca-direct can only enable a single component per framwork: specified both ${type}-${var_value} and ${type}-${comp}.] )
155
+ fi
156
+
157
+ AS_VAR_SET ( [ $var_name] , AS_TR_SH ( [ ${comp}] ) )
158
+ msg="$item $msg"
157
159
done
158
160
IFS="$ifs_save"
159
161
fi
@@ -456,6 +458,18 @@ AC_DEFUN([MCA_CONFIGURE_FRAMEWORK],[
456
458
[ static_components] , [ dso_components] ,
457
459
[ static_ltlibs] )] ) ] ) ] ) ] )
458
460
461
+ AS_VAR_SET_IF ( [ OPAL_EVAL_ARG([ DIRECT_$2 ] )] , [
462
+ AC_MSG_CHECKING ( [ if direct-selection component exists for $2 framework] )
463
+ direct_component_happy=no
464
+ for component in $all_components ; do
465
+ AS_IF ( [ test $component = "$DIRECT_$2 "] , [ direct_component_happy=yes] )
466
+ done
467
+ if test $direct_component_happy = no ; then
468
+ AC_MSG_ERROR ( [ direct component $DIRECT_$2 requested but not found in $all_components] )
469
+ fi
470
+ AC_MSG_RESULT ( [ $DIRECT_$2 ] )
471
+ ] )
472
+
459
473
MCA_$1 _$2 _ALL_COMPONENTS="$all_components"
460
474
MCA_$1 _$2 _STATIC_COMPONENTS="$static_components"
461
475
MCA_$1 _$2 _DSO_COMPONENTS="$dso_components"
0 commit comments