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