Skip to content

Commit 7d57a4b

Browse files
committed
ext: Provide post_config hook
Add a post-config hook for MPI extensions, similar to the same functionality in the MCA system. The purpose of the post-config hook is to provie a macro which is executed after configure has decided whether or not to build an extension. This is useful for AC_DEFINEs or AM_CONDITIONALs. Signed-off-by: Brian Barrett <bbarrett@amazon.com> (cherry picked from commit 790f4a3)
1 parent abd0536 commit 7d57a4b

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

config/ompi_ext.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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)