@@ -77,6 +77,32 @@ AC_DEFUN([OPAL_WRAPPER_FLAGS_ADD], [
77
77
# <flag>_prefix, configure is not. There's no known use case for
78
78
# doing so, and we'd like to force the issue.
79
79
AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[
80
+ OPAL_VAR_SCOPE_PUSH([wrapper_cc_tmp])
81
+ # AC_PROG_CC_C99 changes CC (instead of CFLAGS) so this method
82
+ # must be called before OPAL_SETUP_CC.
83
+ AC_ARG_WITH([wrapper_cc],
84
+ [AC_HELP_STRING([--with-wrapper-cc= path],
85
+ [Set a different wrapper C compiler than the one used to build Open MPI])],
86
+ [], [with_wrapper_cc= " $CC " ])
87
+
88
+ AC_MSG_CHECKING([for wrapper C compiler])
89
+
90
+ if test " $with_wrapper_cc " = " yes" || test " $with_wrapper_cc " = " no" ; then
91
+ AC_MSG_ERROR([--with-wrapper-cc must have an argument.])
92
+ fi
93
+
94
+ # Get the full path to the wrapper compiler. If it doesn't exist
95
+ # assume that the path is not currently valid.
96
+ wrapper_tmp= " $( type -p " $with_wrapper_cc " ) "
97
+ WRAPPER_CC= " ${wrapper_tmp:- $with_wrapper_cc } "
98
+ if test -z " $wrapper_tmp " ; then
99
+ AC_MSG_WARN([could not find \" $with_wrapper_cc \" in path])
100
+ fi
101
+
102
+ AC_MSG_RESULT([$WRAPPER_CC ])
103
+
104
+ AC_SUBST([WRAPPER_CC])
105
+
80
106
AC_ARG_WITH([wrapper-cflags],
81
107
[AC_HELP_STRING([--with-wrapper-cflags],
82
108
[Extra flags to add to CFLAGS when using mpicc])])
@@ -142,6 +168,7 @@ AC_DEFUN([OPAL_SETUP_WRAPPER_INIT],[
142
168
143
169
AS_IF([test " $enable_wrapper_rpath " = " no" && test " $enable_wrapper_runpath " = " yes" ],
144
170
[AC_MSG_ERROR([--enable-wrapper-runpath cannot be selected with --disable-wrapper-rpath])])
171
+ OPAL_VAR_SCOPE_POP
145
172
])
146
173
147
174
# OPAL_LIBTOOL_CONFIG(libtool-variable, result-variable,
0 commit comments