| 
14 | 14 | # Copyright (c) 2011-2014 Los Alamos National Security, LLC. All rights  | 
15 | 15 | #                         reserved.  | 
16 | 16 | # Copyright (c) 2014      Intel, Inc. All rights reserved.  | 
17 |  | -# Copyright (c) 2014      Research Organization for Information Science  | 
 | 17 | +# Copyright (c) 2014-2016 Research Organization for Information Science  | 
18 | 18 | #                         and Technology (RIST). All rights reserved.  | 
19 | 19 | # $COPYRIGHT$  | 
20 | 20 | #  | 
@@ -232,35 +232,26 @@ AC_DEFUN([OPAL_CHECK_PMIX],[  | 
232 | 232 | 
  | 
233 | 233 |     OPAL_VAR_SCOPE_PUSH([pmix_ext_install_dir])  | 
234 | 234 | 
  | 
235 |  | -    AC_ARG_WITH([external-pmix],  | 
236 |  | -                [AC_HELP_STRING([--with-external-pmix(=DIR)],  | 
237 |  | -                                [Use external PMIx support, optionally adding DIR to the search path (default: no)])],  | 
238 |  | -                                [], with_external_pmix=no)  | 
 | 235 | +    AC_ARG_WITH([pmix],  | 
 | 236 | +                [AC_HELP_STRING([--with-pmix(=DIR)],  | 
 | 237 | +                                [Build PMIx support.  DIR can take one of three values: "internal", "external", or a valid directory name.  "internal" (or no DIR value) forces Open MPI to use its internal copy of PMIx.  "external" forces Open MPI to use an external installation of PMIx.  Supplying a valid directory name also forces Open MPI to use an external installation of PMIx, and adds DIR/include, DIR/lib, and DIR/lib64 to the search path for headers and libraries. Note that Open MPI does not support --without-pmix.])])  | 
239 | 238 | 
  | 
240 |  | -    AC_MSG_CHECKING([if user requested PMIx support])  | 
241 |  | -    AS_IF([test "$with_external_pmix" = "no"],  | 
 | 239 | +    AS_IF([test "$with_pmix" = "no"],  | 
 | 240 | +          [AC_MSG_WARN([Open MPI requires PMIx support. It can be built])  | 
 | 241 | +           AC_MSG_WARN([with either its own internal copy of PMIx, or with])  | 
 | 242 | +           AC_MSG_WARN([an external copy that you supply.])  | 
 | 243 | +           AC_MSG_ERROR([Cannot continue])])  | 
 | 244 | +
  | 
 | 245 | +    AC_MSG_CHECKING([if user requested PMIx support($with_pmix)])  | 
 | 246 | +    AS_IF([test -z "$with_pmix" || test "$with_pmix" = "yes" || test "$with_pmix" = "internal"],  | 
242 | 247 |           [AC_MSG_RESULT([no])  | 
243 | 248 |            opal_external_pmix_happy="no"],  | 
244 | 249 |           [AC_MSG_RESULT([yes])  | 
245 | 250 |            # check for external pmix lib */  | 
246 |  | -           AS_IF([test "$with_external_pmix" == "yes" || test -z "$with_external_pmix"],  | 
 | 251 | +           AS_IF([test "$with_pmix" = "external"],  | 
247 | 252 |                  [pmix_ext_install_dir=/usr],  | 
248 |  | -                 [pmix_ext_install_dir=$with_external_pmix])  | 
249 |  | -
  | 
250 |  | -           # cannot use check_package because there are  | 
251 |  | -           # external dependencies to make the headers  | 
252 |  | -           # build, so just check for presence of header  | 
253 |  | -           # and library files - these checks will error  | 
254 |  | -           # out if the files aren't found, which is okay  | 
255 |  | -           # as we are only executing here if the user  | 
256 |  | -           # specified external pmix  | 
257 |  | -           OPAL_CHECK_WITHDIR([external-pmix], [$pmix_ext_install_dir/include], [pmix.h])  | 
258 |  | -           OPAL_CHECK_WITHDIR([external-libpmix], [$pmix_ext_install_dir/lib], [libpmix.*])  | 
259 |  | -
  | 
260 |  | -           opal_pmix_ext_CPPFLAGS="-I$pmix_ext_install_dir -I$pmix_ext_install_dir/include -I$pmix_ext_install_dir/include/pmix -I$pmix_ext_install_dir/include/pmix/include"  | 
261 |  | -           opal_pmix_ext_LDFLAGS="-L$pmix_ext_install_dir/lib"  | 
262 |  | -           opal_pmix_ext_LIBS="-lpmix"  | 
263 |  | -           opal_external_pmix_happy="yes"  | 
 | 253 | +                 [pmix_ext_install_dir=$with_pmix])  | 
 | 254 | +           OPAL_CHECK_PACKAGE([opal_pmix_ext], [pmix.h], [pmix], [PMIx_Init], [], [$pmix_ext_install_dir], [], [opal_external_pmix_happy=yes], [])  | 
264 | 255 |           ])  | 
265 | 256 |     AC_SUBST(opal_pmix_ext_CPPFLAGS)  | 
266 | 257 |     AC_SUBST(opal_pmix_ext_LDFLAGS)  | 
 | 
0 commit comments