diff --git a/config/ompi_load_platform.m4 b/config/ompi_load_platform.m4 index 242c18f511..7e8843ece3 100644 --- a/config/ompi_load_platform.m4 +++ b/config/ompi_load_platform.m4 @@ -56,5 +56,35 @@ AC_DEFUN([OMPI_LOAD_PLATFORM], [ fi echo "Loaded platform arguments for $platform_loaded" OMPI_LOG_MSG([Loaded platform arguments for $platform_loaded]) + + # look for default mca param file + + # setup by getting full pathname for the platform directories + platform_base="`dirname $with_platform`" + # get full pathname of where we are so we can return + platform_savedir="`pwd`" + # go to where the platform file is located + cd "$platform_base" + # get the full path to this location + platform_file_dir=`pwd` + # return to where we started + cd "$platform_savedir" + + # define an alternate default mca param filename + platform_alt_mca_file="`basename $platform_loaded`.conf" + + # look where platform file is located for platform.conf name + if test -r "${platform_file_dir}/${platform_alt_mca_file}" ; then + AC_SUBST(OPAL_DEFAULT_MCA_PARAM_CONF, [$platform_file_dir/$platform_alt_mca_file]) + # if not, see if a file is there with the default name + elif test -r "${platform_file_dir}/openmpi-mca-params.conf" ; then + AC_SUBST(OPAL_DEFAULT_MCA_PARAM_CONF, [$platform_file_dir/openmpi-mca-params.conf]) + # if not, then just use the default + else + AC_SUBST(OPAL_DEFAULT_MCA_PARAM_CONF, [openmpi-mca-params.conf]) + fi + + else + AC_SUBST(OPAL_DEFAULT_MCA_PARAM_CONF, [openmpi-mca-params.conf]) fi ]) diff --git a/opal/etc/Makefile.am b/opal/etc/Makefile.am index 976ff49eb2..dbe37444e4 100644 --- a/opal/etc/Makefile.am +++ b/opal/etc/Makefile.am @@ -17,8 +17,7 @@ # $HEADER$ # -opal_config_files = \ - openmpi-mca-params.conf +opal_config_files = @OPAL_DEFAULT_MCA_PARAM_CONF@ EXTRA_DIST = $(opal_config_files)