1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154
|
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2013 Mellanox Technologies, Inc.
dnl All rights reserved.
dnl Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
dnl Copyright (c) 2014 Intel, Inc. All rights reserved
dnl Copyright (c) 2014-2015 Research Organization for Information Science
dnl and Technology (RIST). All rights reserved.
dnl Copyright (c) 2018 Amazon.com, Inc. or its affiliates.
dnl All Rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
AC_DEFUN([OSHMEM_CONFIGURE_OPTIONS],[
opal_show_subtitle "OpenSHMEM Configuration options"
AC_SUBST(OSHMEM_LIBSHMEM_EXTRA_LIBS)
AC_SUBST(OSHMEM_LIBSHMEM_EXTRA_LDFLAGS)
#
# Disable Open SHMEM?
#
AC_MSG_CHECKING([if want OpenSHMEM])
AC_ARG_ENABLE([oshmem],
[AS_HELP_STRING([--enable-oshmem],
[Enable building the OpenSHMEM interface (available on Linux only, where it is enabled by default)])])
if test "$enable_oshmem" = "no"; then
AC_MSG_RESULT([no])
elif test "$enable_oshmem" = ""; then
case $host_os in
linux*)
AC_MSG_RESULT([yes])
;;
*)
enable_oshmem=no
AC_MSG_RESULT([not supported on this platform])
;;
esac
else
AC_MSG_RESULT([yes])
case $host_os in
linux*)
;;
*)
AC_MSG_WARN([OpenSHMEM support was requested, but currently])
AC_MSG_WARN([only supports Linux.])
AC_MSG_ERROR([Cannot continue])
;;
esac
fi
#
# Enable compatibility mode
#
AC_MSG_CHECKING([if want SGI/Quadrics compatibility mode])
AC_ARG_ENABLE([oshmem-compat],
[AS_HELP_STRING([--enable-oshmem-compat],
[enable compatibility mode (default: enabled)])])
if test "$enable_oshmem_compat" != "no"; then
AC_MSG_RESULT([yes])
OSHMEM_SPEC_COMPAT=1
else
AC_MSG_RESULT([no])
OSHMEM_SPEC_COMPAT=0
fi
AC_DEFINE_UNQUOTED([OSHMEM_SPEC_COMPAT], [$OSHMEM_SPEC_COMPAT],
[Whether user wants OSHMEM in compatibility mode or not])
#
# Do we want to disable OSHMEM parameter checking at run-time?
#
AC_MSG_CHECKING([if want OpenSHMEM API parameter checking])
AC_ARG_WITH([oshmem-param-check],
[AS_HELP_STRING([--with-oshmem-param-check(=VALUE)],
[behavior of OSHMEM API function parameter checking. Valid values are: always, never. If --with-oshmem-param-check is specified with no VALUE argument, it is equivalent to a VALUE of "always"; --without-oshmem-param-check is equivalent to "never" (default: always).])])
if test "$with_oshmem_param_check" = "no" || \
test "$with_oshmem_param_check" = "never"; then
shmem_param_check=0
AC_MSG_RESULT([never])
elif test "$with_oshmem_param_check" = "yes" || \
test "$with_oshmem_param_check" = "always" || \
test -z "$with_oshmem_param_check"; then
shmem_param_check=1
AC_MSG_RESULT([always])
else
shmem_param_check=1
AC_MSG_RESULT([unknown])
AC_MSG_WARN([*** Unrecognized --with-oshmem-param-check value])
AC_MSG_WARN([*** See "configure --help" output])
AC_MSG_WARN([*** Defaulting to "always"])
fi
AC_DEFINE_UNQUOTED(OSHMEM_PARAM_CHECK, $shmem_param_check,
[Whether we want to check OSHMEM parameters always or never])
#
# OSHMEM profiling support
#
AC_ARG_ENABLE([oshmem-profile],
[AS_HELP_STRING([--enable-oshmem-profile],
[enable OpenSHMEM profiling (default: enabled)])])
AC_MSG_CHECKING([if want pshmem])
AS_IF([test "$enable_oshmem_profile" != "no"],
[AC_MSG_RESULT([yes])],
[AC_MSG_RESULT([no])])
# Bozo check
AS_IF([test "$enable_oshmem" = "no" && \
test "$enable_oshmem_profile" = "yes"],
[AC_MSG_WARN([OpenSHMEM profiling was requested, but OpenSHMEM has been explicitly disabled])
AC_MSG_ERROR([Cannot continue])])
# Cannot check if we can enable profiling because it is not yet
# known whether the compiler supports weak symbols.
#
# Fortran bindings
#
AC_MSG_CHECKING([if want to build OpenSHMEM fortran bindings])
AC_ARG_ENABLE([oshmem-fortran],
AS_HELP_STRING([--enable-oshmem-fortran],
[enable OpenSHMEM Fortran bindings (default: enabled if Fortran compiler found)]))
if test "$enable_oshmem_fortran" != "no"; then
# If no OMPI FORTRAN, bail
AS_IF([test $OMPI_TRY_FORTRAN_BINDINGS -eq $OMPI_FORTRAN_NO_BINDINGS && \
test "$enable_oshmem_fortran" = "yes"],
[AC_MSG_RESULT([bad value OMPI_TRY_FORTRAN_BINDINGS: ($OMPI_TRY_FORTRAN_BINDINGS)])
AC_MSG_WARN([Your request to --enable-oshmem-fortran can only be satisfied if fortran support is enabled in OMPI.
You see this message because MPI fortran support has been explicitly disabled via --disable-mpi-fortran and OpenSHMEM fortran support was explicitly enabled with --enable-oshmem-fortran.
Configure will abort because you, a human, have asked for something that cannot be provided.])
AC_MSG_ERROR([Cannot continue])])
if test $OMPI_TRY_FORTRAN_BINDINGS -gt $OMPI_FORTRAN_NO_BINDINGS; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
else
enable_oshmem_fortran=no
AC_MSG_RESULT([no])
fi
#
# We can't set am_conditional here since it's yet unknown if there is
# valid Fortran compiler available
#
]) dnl
|