Skip to content

Commit 18d80f5

Browse files
authored
Merge pull request #9581 from bwbarrett/feature/mpi-ext-know-if-selected
Add post_config hook for MPI extensions
2 parents 2199bda + 790f4a3 commit 18d80f5

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

config/ompi_ext.m4

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ AC_DEFUN([OMPI_EXT],[
3434
dnl for OPAL_CONFIGURE_USER env variable
3535
AC_REQUIRE([OPAL_CONFIGURE_SETUP])
3636

37+
m4_ifdef([ompi_mpiext_list], [],
38+
[m4_fatal([Could not find MPI Extensions list. Aborting.])])
39+
3740
# Note that we do not build DSO's here -- we *only* build convenience
3841
# libraries that get slurped into higher-level libraries
3942
#
@@ -42,7 +45,7 @@ AC_DEFUN([OMPI_EXT],[
4245
#
4346
AC_ARG_ENABLE([mpi-ext],
4447
[AS_HELP_STRING([--enable-mpi-ext[=LIST]],
45-
[Comma-separated list of extensions that should be built. Possible values: ompi_mpiext_list. Example: "--enable-mpi-ext=foo,bar" will enable building the MPI extensions "foo" and "bar". If LIST is empty or the special value "all", then all available MPI extensions will be built (default: all).])])
48+
[Comma-separated list of extensions that should be built. Possible values: ]m4_quote(ompi_mpiext_list)[. Example: "--enable-mpi-ext=foo,bar" will enable building the MPI extensions "foo" and "bar". If LIST is empty or the special value "all", then all available MPI extensions will be built (default: all).])])
4649

4750
# print some nice messages about what we're about to do...
4851
AC_MSG_CHECKING([for available MPI Extensions])
@@ -74,9 +77,6 @@ AC_DEFUN([OMPI_EXT],[
7477
AC_MSG_RESULT([$msg])
7578
unset msg
7679

77-
m4_ifdef([ompi_mpiext_list], [],
78-
[m4_fatal([Could not find MPI Extensions list. Aborting.])])
79-
8080
EXT_CONFIGURE
8181
])
8282

@@ -390,6 +390,9 @@ AC_DEFUN([EXT_CONFIGURE_M4_CONFIG_COMPONENT],[
390390
AS_IF([test $should_build -eq 1],
391391
[EXT_PROCESS_COMPONENT([$1], [$2], [$3], [$4], [$5], [$6], [$7])],
392392
[EXT_PROCESS_DEAD_COMPONENT([$1], [$2])])
393+
394+
m4_ifdef([OMPI_MPIEXT_$1_POST_CONFIG],
395+
[OMPI_MPIEXT_$1_POST_CONFIG($should_build)])
393396
])
394397

395398
######################################################################

ompi/mpiext/example/configure.m4

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,12 @@ AC_DEFUN([OMPI_MPIEXT_example_NEED_INIT], [1])
5555
# libraries for any of the bindings. If finer-grained control is needed
5656
# someday, we may need to split this into multiple macros.
5757
#AC_DEFUN([OMPI_MPIEXT_example_HAVE_OBJECT], [0])
58+
59+
# This is a hook that runs after the CONFIG macro and after the
60+
# configure system decides if this extension will be built (such
61+
# as if it was disabled by configure option). This is a great
62+
# place to put any globally-visible AC_DEFINE or AM_CONDITIONAL
63+
# macros that are based on this component building.
64+
AC_DEFUN([OMPI_MPIEXT_example_POST_CONFIG], [
65+
opal_show_verbose "example component build result: $1"
66+
])

0 commit comments

Comments
 (0)