2013-09-10 19:34:09 +04:00
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2013 Mellanox Technologies, Inc.
dnl All rights reserved.
2014-03-14 01:23:04 +04:00
dnl Copyright (c) 2013-2014 Cisco Systems, Inc. All rights reserved.
2013-09-10 19:34:09 +04:00
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl
AC_DEFUN([OSHMEM_CONFIGURE_OPTIONS],[
ompi_show_subtitle "OSHMEM Configuration options"
AC_SUBST(OSHMEM_LIBSHMEM_EXTRA_LIBS)
AC_SUBST(OSHMEM_LIBSHMEM_EXTRA_LDFLAGS)
2013-11-21 21:13:28 +04:00
#
# Disable Open SHMEM?
#
2014-03-20 00:32:15 +04:00
AC_MSG_CHECKING([if want oshmem])
2013-11-21 21:13:28 +04:00
AC_ARG_ENABLE([oshmem],
2014-03-12 02:02:40 +04:00
[AC_HELP_STRING([--enable-oshmem],
[Enable building the OpenSHMEM interface (disabled by default)])],
2014-03-20 00:32:15 +04:00
[oshmem_arg_given=yes],
[oshmem_arg_given=no])
2014-03-20 01:38:01 +04:00
if test "$oshmem_arg_given" = "yes"; then
if test "$enable_oshmem" = "yes"; then
2014-03-20 00:32:15 +04:00
AC_MSG_RESULT([yes])
if test "$opal_found_linux" != "yes"; then
AC_MSG_WARN([OpenSHMEM support was requested, but currently])
AC_MSG_WARN([only supports Linux.])
AC_MSG_ERROR([Cannot continue])
fi
fi
AC_MSG_RESULT([no])
else
2014-03-20 01:38:01 +04:00
if test "$opal_found_linux" = "yes"; then
2014-03-20 00:32:15 +04:00
enable_oshmem=yes
AC_MSG_RESULT([yes])
else
enable_oshmem=no
AC_MSG_RESULT([not supported on this platform])
fi
fi
2013-11-21 21:13:28 +04:00
2013-09-10 19:34:09 +04:00
#
# Enable compatibility mode
#
AC_MSG_CHECKING([if want SGI/Quadrix compatibility mode])
AC_ARG_ENABLE(oshmem-compat,
AC_HELP_STRING([--enable-oshmem-compat],
[enable compatibility mode (default: enabled)]))
2014-03-12 02:02:40 +04:00
if test "$enable_oshmem" != "no" -a "$enable_oshmem_compat" != "no"; then
2013-09-10 19:34:09 +04:00
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?
#
2013-10-25 09:25:41 +04:00
AC_MSG_CHECKING([if want OSHMEM API parameter checking])
AC_ARG_WITH(oshmem-param-check,
AC_HELP_STRING([--oshmem-param-check(=VALUE)],
2014-03-12 02:02:40 +04:00
[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 "$enable_oshmem" != "no"; then
if test "$with_oshmem_param_check" = "no" -o \
"$with_oshmem_param_check" = "never"; then
shmem_param_check=0
AC_MSG_RESULT([never])
elif test "$with_oshmem_param_check" = "yes" -o \
"$with_oshmem_param_check" = "always" -o \
-z "$with_oshmem_param_check"; then
shmem_param_check=1
AC_MSG_RESULT([always])
else
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 "runtime"])
fi
2013-09-10 19:34:09 +04:00
else
2014-03-12 02:02:40 +04:00
shmem_param_check=0
AC_MSG_RESULT([no])
2013-09-10 19:34:09 +04:00
fi
AC_DEFINE_UNQUOTED(OSHMEM_PARAM_CHECK, $shmem_param_check,
2013-10-25 09:25:41 +04:00
[Whether we want to check OSHMEM parameters always or never])
2013-09-10 19:34:09 +04:00
#
# OSHMEM profiling support
#
AC_MSG_CHECKING([if want pshmem_])
AC_ARG_ENABLE(oshmem-profile,
AC_HELP_STRING([--enable-oshmem-profile],
[enable OSHMEM profiling (default: enabled)]))
2014-03-12 02:02:40 +04:00
if test "$enable_oshmem" != "no" -a "$enable_oshmem_profile" != "no"; then
2013-09-10 19:34:09 +04:00
AC_MSG_RESULT([yes])
2013-10-09 18:04:25 +04:00
oshmem_profiling_support=1
2013-09-10 19:34:09 +04:00
else
AC_MSG_RESULT([no])
2013-10-09 18:04:25 +04:00
oshmem_profiling_support=0
2013-09-10 19:34:09 +04:00
fi
2014-01-10 19:20:19 +04:00
AM_CONDITIONAL(OSHMEM_PROFILING, test $oshmem_profiling_support -eq 1)
2013-09-10 19:34:09 +04:00
2013-09-15 13:32:07 +04:00
#
2013-10-17 09:42:43 +04:00
# Fortran bindings
2013-09-15 13:32:07 +04:00
#
2013-11-25 15:02:42 +04:00
AC_MSG_CHECKING([if want to build OSHMEM fortran bindings])
2013-10-17 09:42:43 +04:00
AC_ARG_ENABLE(oshmem-fortran,
AC_HELP_STRING([--enable-oshmem-fortran],
[enable OSHMEM Fortran bindings (default: enabled if Fortran compiler found)]))
2014-03-12 02:02:40 +04:00
if test "$enable_oshmem" != "no" -a "$enable_oshmem_fortran" != "no"; then
2013-10-25 19:42:10 +04:00
# If no OMPI FORTRAN, bail
2014-03-20 01:38:01 +04:00
AS_IF([test $OMPI_WANT_FORTRAN_BINDINGS -eq 0 -a "$enable_oshmem_fortran" = "yes"],
2013-10-25 19:42:10 +04:00
[AC_MSG_RESULT([bad value OMPI_WANT_FORTRAN_BINDINGS: ($OMPI_WANT_FORTRAN_BINDINGS)])
2014-02-03 13:47:56 +04:00
AC_MSG_WARN([Your request to --enable-oshmem-fortran can only be satisfied if fortran support is enabled in OMPI.
2014-03-06 15:22:30 +04:00
You see this message because OMPI fortran support has been explicitly disabled via --disable-mpi-fortran and OSHMEM fortran support was explicitly enabled with --enable-oshmem-fortran.
2014-02-03 13:47:56 +04:00
Configure will abort because you, a human, have asked for something that cannot be provided.])
2013-10-25 19:42:10 +04:00
AC_MSG_ERROR([Cannot continue])])
2014-03-06 15:22:30 +04:00
if test $OMPI_WANT_FORTRAN_BINDINGS -eq 1; then
AC_MSG_RESULT([yes])
else
AC_MSG_RESULT([no])
fi
2013-10-17 09:42:43 +04:00
else
2014-03-12 02:02:40 +04:00
enable_oshmem_fortran=no
2013-10-17 09:42:43 +04:00
AC_MSG_RESULT([no])
2014-01-10 19:20:19 +04:00
fi
2014-01-23 11:49:13 +04:00
#
# We can't set am_conditional here since it's yet unknown if there is valid Fortran compiler avaliable
#
2014-01-10 19:20:19 +04:00
]) dnl