|
| 1 | +# -*- shell-script -*- |
| 2 | +# |
| 3 | +# Copyright (c) 2004-2009 The Trustees of Indiana University and Indiana |
| 4 | +# University Research and Technology |
| 5 | +# Corporation. All rights reserved. |
| 6 | +# Copyright (c) 2004-2005 The University of Tennessee and The University |
| 7 | +# of Tennessee Research Foundation. All rights |
| 8 | +# reserved. |
| 9 | +# Copyright (c) 2004-2007 High Performance Computing Center Stuttgart, |
| 10 | +# University of Stuttgart. All rights reserved. |
| 11 | +# Copyright (c) 2004-2005 The Regents of the University of California. |
| 12 | +# All rights reserved. |
| 13 | +# Copyright (c) 2006-2009 Cisco Systems, Inc. All rights reserved. |
| 14 | +# Copyright (c) 2006-2008 Sun Microsystems, Inc. All rights reserved. |
| 15 | +# Copyright (c) 2006-2007 Los Alamos National Security, LLC. All rights |
| 16 | +# reserved. |
| 17 | +# Copyright (c) 2009 Oak Ridge National Labs. All rights reserved. |
| 18 | +# Copyright (c) 2019-2020 Intel, Inc. All rights reserved. |
| 19 | +# $COPYRIGHT$ |
| 20 | +# |
| 21 | +# Additional copyrights may follow |
| 22 | +# |
| 23 | +# $HEADER$ |
| 24 | +# |
| 25 | + |
| 26 | +AC_DEFUN([OMPI_SETUP_PRRTE],[ |
| 27 | + OPAL_VAR_SCOPE_PUSH([opal_prrte_save_CPPFLAGS opal_prrte_save_CFLAGS opal_prrte_save_LDFLAGS opal_prrte_save_LIBS opal_prrte_args opal_prrte_save_enable_dlopen opal_prrte_save_enable_mca_dso opal_prrte_save_enable_mca_static]) |
| 28 | + |
| 29 | + opal_prrte_save_CFLAGS=$CFLAGS |
| 30 | + opal_prrte_save_CPPFLAGS=$CPPFLAGS |
| 31 | + opal_prrte_save_LDFLAGS=$LDFLAGS |
| 32 | + opal_prrte_save_LIBS=$LIBS |
| 33 | + opal_prrte_save_enable_dlopen=enable_dlopen |
| 34 | + opal_prrte_save_enable_mca_dso=enable_mca_dso |
| 35 | + opal_prrte_save_enable_mca_static=enable_mca_static |
| 36 | + |
| 37 | + AC_ARG_ENABLE([internal-rte], |
| 38 | + [AC_HELP_STRING([--enable-internal-rte], |
| 39 | + [Enable internal runtime support and provide mpiexec/mpirun (default: enabled)])]) |
| 40 | + AC_MSG_CHECKING([if RTE support is enabled]) |
| 41 | + if test "$enable_internal_rte" != "no"; then |
| 42 | + AC_MSG_RESULT([yes]) |
| 43 | + if test -z $with_libevent || test "$with_libevent" = "internal" || test "$with_libevent" = "yes"; then |
| 44 | + opal_prrte_libevent_arg="--with-libevent-header=$OMPI_TOP_SRCDIR/opal/mca/event/event.h" |
| 45 | + elif test "$with_libevent" = "external"; then |
| 46 | + opal_prrte_libevent_arg="" |
| 47 | + else |
| 48 | + opal_prrte_libevent_arg="--with-libevent=$with_libevent" |
| 49 | + fi |
| 50 | + |
| 51 | + if test -z $with_hwloc || test "$with_hwloc" = "internal" || test "$with_hwloc" = "yes"; then |
| 52 | + opal_prrte_hwloc_arg="--with-hwloc-header=$OMPI_TOP_SRCDIR/opal/mca/hwloc/hwloc-internal.h" |
| 53 | + elif test "$with_hwloc" = "external"; then |
| 54 | + opal_prrte_hwloc_arg="" |
| 55 | + else |
| 56 | + opal_prrte_hwloc_arg="--with-hwloc=$with_hwloc" |
| 57 | + fi |
| 58 | + |
| 59 | + if test -z $with_pmix || test "$with_pmix" = "internal" || test "$with_pmix" = "yes"; then |
| 60 | + opal_prrte_pmix_arg="--with-pmix-header=$OMPI_TOP_SRCDIR/opal/mca/pmix/pmix-internal.h" |
| 61 | + elif test "$with_pmix" = "external"; then |
| 62 | + opal_prrte_pmix_arg="" |
| 63 | + else |
| 64 | + opal_prrte_pmix_arg="--with-pmix=$with_pmix" |
| 65 | + fi |
| 66 | + |
| 67 | + opal_prrte_args="--prefix=$prefix --disable-dlopen $opal_prrte_libevent_arg $opal_prrte_hwloc_arg $opal_prrte_pmix_arg" |
| 68 | + AS_IF([test "$enable_debug" = "yes"], |
| 69 | + [opal_prrte_args="--enable-debug $opal_prrte_args" |
| 70 | + CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS -g"], |
| 71 | + [opal_prrte_args="--disable-debug $opal_prrte_args" |
| 72 | + CFLAGS="$OPAL_CFLAGS_BEFORE_PICKY $OPAL_VISIBILITY_CFLAGS"]) |
| 73 | + AS_IF([test "$with_devel_headers" = "yes"], |
| 74 | + [opal_prrte_args="--with-devel-headers $opal_prrte_args"]) |
| 75 | + # add the extra libs |
| 76 | + opal_prrte_args="$opal_prrte_args --with-prrte-extra-lib=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la --with-prrte-extra-ltlib=$OMPI_TOP_BUILDDIR/opal/libopen-pal.la" |
| 77 | + |
| 78 | + AC_MSG_CHECKING([final prrte configure args]) |
| 79 | + AC_MSG_RESULT([$opal_prrte_args]) |
| 80 | + |
| 81 | + CPPFLAGS="-I$OPAL_TOP_SRCDIR -I$OPAL_TOP_BUILDDIR -I$OPAL_TOP_SRCDIR/opal/include -I$OPAL_TOP_BUILDDIR/opal/include $CPPFLAGS" |
| 82 | + OPAL_CONFIG_SUBDIR([prrte], |
| 83 | + [$opal_prrte_args $opal_subdir_args 'CFLAGS=$CFLAGS' 'CPPFLAGS=$CPPFLAGS'], |
| 84 | + [opal_prrte_happy=1], [opal_prrte_happy=0]) |
| 85 | + |
| 86 | + OPAL_SUMMARY_ADD([[Miscellaneous]],[[PRRTE]],[prrte],[yes]) |
| 87 | + |
| 88 | + else |
| 89 | + OPAL_SUMMARY_ADD([[Miscellaneous]],[[PRRTE]],[prrte],[no (disabled)]) |
| 90 | + AC_MSG_RESULT([no (disabled)]) |
| 91 | + fi |
| 92 | + |
| 93 | + CFLAGS=$opal_prrte_save_CFLAGS |
| 94 | + CPPFLAGS=$opal_prrte_save_CPPFLAGS |
| 95 | + LDFLAGS=$opal_prrte_save_LDFLAGS |
| 96 | + LIBS=$opal_prrte_save_LIBS |
| 97 | + enable_dlopen=$opal_prrte_save_enable_dlopen |
| 98 | + enable_mca_dso=$opal_prrte_save_enable_mca_dso |
| 99 | + enable_mca_static=$opal_prrte_save_enable_mca_static |
| 100 | + |
| 101 | + OPAL_VAR_SCOPE_POP |
| 102 | + |
| 103 | +]) |
0 commit comments