diff --git a/config/ompi_mca.m4 b/config/ompi_mca.m4 index 8b9692222d..977314f42d 100644 --- a/config/ompi_mca.m4 +++ b/config/ompi_mca.m4 @@ -541,6 +541,9 @@ AC_DEFUN([MCA_CONFIGURE_M4_CONFIG_COMPONENT],[ # add component to all component list $4="$$4 $3"]) + m4_ifdef([MCA_$2_$3_POST_CONFIG], + [MCA_$2_$3_POST_CONFIG($should_build)]) + # set the AM_CONDITIONAL on how we should build AS_IF([test "$compile_mode" = "dso"], [BUILD_$2_$3_DSO=1], diff --git a/ompi/mca/io/romio/Makefile.am b/ompi/mca/io/romio/Makefile.am index 61027e2937..93fdbc8031 100644 --- a/ompi/mca/io/romio/Makefile.am +++ b/ompi/mca/io/romio/Makefile.am @@ -23,7 +23,11 @@ sources = include src/Makefile.extra +if MCA_io_romio_SHOULD_BUILD +# Need to set both SUBDIRS and DIST_SUBDIRS due to oddities with AM SUBDIRS = romio +DIST_SUBDIRS = romio +endif # Make the output library in this directory, and name it either # mca__.la (for DSO builds) or libmca__.la diff --git a/ompi/mca/io/romio/configure.m4 b/ompi/mca/io/romio/configure.m4 index f6922e25cc..420eaf505b 100644 --- a/ompi/mca/io/romio/configure.m4 +++ b/ompi/mca/io/romio/configure.m4 @@ -17,6 +17,14 @@ # $HEADER$ # +AC_DEFUN([MCA_io_romio_POST_CONFIG], [ + AS_IF([test $1 -eq 0 -a "$enable_dist" = "yes"], + [AC_MSG_ERROR([ROMIO disabled but --enable-dist specifed. This will result in a bad tarball. Aborting configure.])]) + AM_CONDITIONAL([MCA_io_romio_SHOULD_BUILD], [test $1 -eq 1]) + +]) + + # MCA_io_romio_CONFIG([action-if-found], [action-if-not-found]) # ----------------------------------------------------------- AC_DEFUN([MCA_io_romio_CONFIG],[