Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

From: Brian Barrett (bbarrett_at_[hidden])
Date: 2007-06-20 11:35:59


Following up on the telecon conversation about automatically forcing
components to build statically (ie, part of libmpi and friends
instead of a stand-alone dso), here's an example of how to do so:

AC_DEFUN([MCA_backtrace_darwin_COMPILE_MODE], [
     AC_MSG_CHECKING([for MCA component $2:$3 compile mode])

     $4="static"
     AC_MSG_RESULT([$$4])

     AS_IF([test "$DSO_$2" = "1" -o "$DSO_$2_$3" = "1"],
       [AC_MSG_WARN([Forcing static build of component])])
])

This snippet of M4 would go in the configure.m4 for the given
component (a configure.m4 is *required* for this). Just change the
backtrace_darwin to the framework_component pair for the given
component, reautogen, and life is good. The various OPAL components
currently in the trunk that use this trick do not have the if check
at the bottom to warn the user that the component changed what the
user said to do, but it probably makes sense to do so in the general
case and I'll be updating the OPAL components in the near future.

Brian