2004-01-07 10:42:12 +03:00
dnl -*- shell-script -*-
dnl
2004-11-22 04:38:40 +03:00
dnl Copyright (c) 2004-2005 The Trustees of Indiana University.
dnl All rights reserved.
dnl Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
dnl All rights reserved.
2004-11-28 23:09:25 +03:00
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl University of Stuttgart. All rights reserved.
2005-03-24 15:43:37 +03:00
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl All rights reserved.
2004-11-22 04:38:40 +03:00
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
2004-01-07 10:42:12 +03:00
dnl $HEADER$
dnl
2004-06-07 19:33:53 +04:00
AC_DEFUN([OMPI_CONFIGURE_OPTIONS],[
ompi_show_subtitle "Configuration options"
2004-01-07 10:42:12 +03:00
2005-04-18 20:38:27 +04:00
#
# Code coverage options
#
AC_MSG_CHECKING([Whether to run code coverage])
AC_ARG_ENABLE(coverage,
AC_HELP_STRING([--enable-coverage],
[enable code coverage files to be generated]))
if test "$enable_coverage" = "yes"; then
if test "$enable_shared" = "yes"; then
AC_MSG_WARN([Code coverage can run only with static libraries. Please
run configure with --enable-static --disable-shared if
you want code coverage. Also ensure that you execute
make clean too ensure removal of all leftover shared
mpi libraries])
AC_MSG_ERROR([Cannot continue processing])
fi
AC_MSG_RESULT([yes])
WANT_COVERAGE=1
else
2005-08-21 00:43:59 +04:00
AC_MSG_RESULT([no])
2005-04-18 20:38:27 +04:00
WANT_COVERAGE=0
fi
2004-01-07 10:42:12 +03:00
#
2004-02-10 03:06:28 +03:00
# Memory debugging
2004-01-07 10:42:12 +03:00
#
2004-02-10 03:06:28 +03:00
AC_MSG_CHECKING([whether to debug memory usage])
AC_ARG_ENABLE(mem-debug,
AC_HELP_STRING([--enable-mem-debug],
[enable memory debugging (debugging only) (default: disabled)]))
if test "$enable_mem_debug" = "yes"; then
2004-01-07 10:42:12 +03:00
AC_MSG_RESULT([yes])
2004-02-10 03:06:28 +03:00
WANT_MEM_DEBUG=1
2004-01-07 10:42:12 +03:00
else
AC_MSG_RESULT([no])
2004-02-10 03:06:28 +03:00
WANT_MEM_DEBUG=0
2004-01-07 10:42:12 +03:00
fi
2004-01-13 04:13:28 +03:00
#################### Early development override ####################
2005-03-29 06:47:43 +04:00
if test "$WANT_MEM_DEBUG" = "0" -a -z "$enable_mem_debug" -a -d .svn; then
2004-03-15 20:33:44 +03:00
WANT_MEM_DEBUG=1
echo "--> developer override: enable mem profiling by default"
2004-01-13 04:13:28 +03:00
fi
#################### Early development override ####################
2004-06-07 19:33:53 +04:00
AC_DEFINE_UNQUOTED(OMPI_ENABLE_MEM_DEBUG, $WANT_MEM_DEBUG,
2004-02-10 03:06:28 +03:00
[Whether we want the memory profiling or not])
2004-01-08 21:55:38 +03:00
#
# Memory profiling
#
AC_MSG_CHECKING([whether to profile memory usage])
AC_ARG_ENABLE(mem-profile,
AC_HELP_STRING([--enable-mem-profile],
[enable memory profiling (debugging only) (default: disabled)]))
if test "$enable_mem_profile" = "yes"; then
AC_MSG_RESULT([yes])
WANT_MEM_PROFILE=1
else
AC_MSG_RESULT([no])
WANT_MEM_PROFILE=0
fi
2004-01-13 04:13:28 +03:00
#################### Early development override ####################
2005-03-29 06:47:43 +04:00
if test "$WANT_MEM_PROFILE" = "0" -a -z "$enable_mem_profile" -a -d .svn; then
2004-03-15 20:33:44 +03:00
WANT_MEM_PROFILE=1
echo "--> developer override: enable mem profiling by default"
2004-01-13 04:13:28 +03:00
fi
#################### Early development override ####################
2004-06-07 19:33:53 +04:00
AC_DEFINE_UNQUOTED(OMPI_ENABLE_MEM_PROFILE, $WANT_MEM_PROFILE,
2004-01-08 21:55:38 +03:00
[Whether we want the memory profiling or not])
2004-01-07 10:42:12 +03:00
#
2004-01-13 23:01:59 +03:00
# Developer picky compiler options
2004-01-07 10:42:12 +03:00
#
2004-01-11 03:07:22 +03:00
AC_MSG_CHECKING([if want developer-level compiler pickyness])
AC_ARG_ENABLE(picky,
AC_HELP_STRING([--enable-picky],
2004-08-28 14:38:40 +04:00
[enable developer-level compiler pickyness when building Open MPI (default: disabled)]))
2004-06-15 23:36:36 +04:00
if test "$enable_picky" = "yes"; then
AC_MSG_RESULT([yes])
WANT_PICKY_COMPILER=1
2004-08-28 14:38:40 +04:00
else
AC_MSG_RESULT([no])
WANT_PICKY_COMPILER=0
2004-01-11 03:07:22 +03:00
fi
2004-01-13 04:13:28 +03:00
#################### Early development override ####################
2004-03-19 09:07:54 +03:00
if test "$WANT_PICKY_COMPILER" = "0" -a -z "$enable_picky" -a -d .svn; then
2004-03-15 20:33:44 +03:00
WANT_PICKY_COMPILER=1
echo "--> developer override: enable picky compiler by default"
2004-01-13 04:13:28 +03:00
fi
#################### Early development override ####################
2004-01-11 03:07:22 +03:00
#
# Developer debugging
#
2004-01-07 10:42:12 +03:00
AC_MSG_CHECKING([if want developer-level debugging code])
2004-01-08 16:34:03 +03:00
AC_ARG_ENABLE(debug,
2004-01-07 10:42:12 +03:00
AC_HELP_STRING([--enable-debug],
2004-01-08 16:34:03 +03:00
[enable developer-level debugging code (not for general MPI users!) (default: disabled)]))
2004-01-07 10:42:12 +03:00
if test "$enable_debug" = "yes"; then
AC_MSG_RESULT([yes])
2004-01-07 11:31:32 +03:00
WANT_DEBUG=1
2004-01-07 10:42:12 +03:00
else
AC_MSG_RESULT([no])
2004-01-07 11:31:32 +03:00
WANT_DEBUG=0
2004-01-07 10:42:12 +03:00
fi
2004-01-13 04:13:28 +03:00
#################### Early development override ####################
2004-03-19 09:07:54 +03:00
if test "$WANT_DEBUG" = "0" -a -z "$enable_debug" -a -d .svn; then
2004-03-15 20:33:44 +03:00
WANT_DEBUG=1
echo "--> developer override: enable debugging code by default"
2004-01-13 04:13:28 +03:00
fi
#################### Early development override ####################
2004-02-13 22:11:55 +03:00
if test "$WANT_DEBUG" = "0"; then
CFLAGS="-DNDEBUG $CFLAGS"
2005-05-20 03:52:13 +04:00
CXXFLAGS="-DNDEBUG $CXXFLAGS"
2004-02-13 22:11:55 +03:00
fi
2004-06-07 19:33:53 +04:00
AC_DEFINE_UNQUOTED(OMPI_ENABLE_DEBUG, $WANT_DEBUG,
2004-01-07 10:42:12 +03:00
[Whether we want developer-level debugging code or not])
2004-03-28 14:02:38 +04:00
2004-01-08 16:34:03 +03:00
#
# Fortran 77
#
AC_MSG_CHECKING([if want Fortran 77 bindings])
AC_ARG_ENABLE(f77,
AC_HELP_STRING([--enable-f77],
[enable f77 MPI bindings (default: enabled)]))
if test "$enable_f77" != "no"; then
AC_MSG_RESULT([yes])
2004-06-07 19:33:53 +04:00
OMPI_WANT_F77_BINDINGS=1
2004-01-08 16:34:03 +03:00
else
AC_MSG_RESULT([no])
2004-06-07 19:33:53 +04:00
OMPI_WANT_F77_BINDINGS=0
2004-01-08 16:34:03 +03:00
fi
2004-03-28 14:02:38 +04:00
2004-02-13 22:11:55 +03:00
#
# Fortran 90
#
AC_MSG_CHECKING([if want Fortran 90 bindings])
AC_ARG_ENABLE(f90,
AC_HELP_STRING([--enable-f90],
2005-08-26 04:11:30 +04:00
[enable f90 MPI bindings (default: enabled)]))
if test "$enable_f90" != "no"; then
2004-03-28 14:02:38 +04:00
AC_MSG_RESULT([yes])
2004-06-07 19:33:53 +04:00
OMPI_WANT_F90_BINDINGS=1
2004-03-29 00:39:15 +04:00
else
AC_MSG_RESULT([no])
2004-06-07 19:33:53 +04:00
OMPI_WANT_F90_BINDINGS=0
2004-02-13 22:11:55 +03:00
fi
2005-08-26 04:11:30 +04:00
#################### Early development override ####################
if test "$OMPI_WANT_F90_BINDINGS" = "1" -a -z "$enable_f90" -a -d .svn; then
OMPI_WANT_F90_BINDINGS=0
echo "--> developer override: disable Fortran 90 by default"
fi
#################### Early development override ####################
2004-02-13 22:11:55 +03:00
2004-03-28 14:02:38 +04:00
2004-01-13 23:01:59 +03:00
#
# MPI profiling
#
AC_MSG_CHECKING([whether to enable PMPI])
AC_ARG_ENABLE(mpi-profile,
AC_HELP_STRING([--enable-mpi-profile],
[enable MPI profiling (default: enabled)]))
if test "$enable_mpi_profile" != "no"; then
AC_MSG_RESULT([yes])
2004-02-10 23:12:37 +03:00
WANT_MPI_PROFILING=1
2004-01-13 23:01:59 +03:00
else
AC_MSG_RESULT([no])
2004-02-10 23:12:37 +03:00
WANT_MPI_PROFILING=0
2004-01-13 23:01:59 +03:00
fi
2004-07-14 18:11:03 +04:00
#
# C++
#
AC_MSG_CHECKING([if want C++ bindings])
AC_ARG_ENABLE(cxx,
AC_HELP_STRING([--enable-cxx],
[enable C++ MPI bindings (default: enabled)]))
if test "$enable_cxx" != "no"; then
AC_MSG_RESULT([yes])
WANT_MPI_CXX_SUPPORT=1
else
AC_MSG_RESULT([no])
WANT_MPI_CXX_SUPPORT=0
fi
2004-01-08 16:34:03 +03:00
#
2004-02-13 22:11:55 +03:00
# Do we want to disable weak symbols for some reason?
2004-01-08 16:34:03 +03:00
#
2004-02-13 22:11:55 +03:00
AC_MSG_CHECKING([if want to enable weak symbol support])
AC_ARG_ENABLE(weak-symbols,
AC_HELP_STRING([--enable-weak-symbols],
[use weak symbols, if available (default: enabled)]))
if test "$enable_weak_symbols" != "no"; then
2004-01-08 16:34:03 +03:00
AC_MSG_RESULT([yes])
2004-02-13 22:11:55 +03:00
WANT_WEAK_SYMBOLS=1
2004-01-08 16:34:03 +03:00
else
AC_MSG_RESULT([no])
2004-02-13 22:11:55 +03:00
WANT_WEAK_SYMBOLS=0
fi
#
# Do we want to disable MPI parameter checking at run-time?
#
AC_MSG_CHECKING([if want run-time MPI parameter checking])
2004-09-16 23:42:52 +04:00
AC_ARG_WITH(mpi-param-check,
AC_HELP_STRING([--with-mpi-param-check(=VALUE)],
[behavior of MPI function parameter checking. Valid values are: always, never, runtime. No VALUE specified is equivalent to "always"; --without is equivalent to "never" (default: runtime).]))
2004-06-07 19:33:53 +04:00
mpi_param_check=ompi_mpi_param_check
2004-02-13 22:11:55 +03:00
if test "$with_mpi_param_check" = "no" -o \
"$with_mpi_param_check" = "never"; then
mpi_param_check=0
AC_MSG_RESULT([never])
elif test "$with_mpi_param_check" = "yes" -o \
"$with_mpi_param_check" = "always"; then
mpi_param_check=1
AC_MSG_RESULT([always])
elif test "$with_mpi_param_check" = "runtime" -o \
-z "$with_mpi_params_check"; then
AC_MSG_RESULT([runtime])
else
AC_MSG_RESULT([unknown])
AC_MSG_WARN([*** Unrecognized --with-mpi-param-check value])
AC_MSG_WARN([*** See "configure --help" output])
AC_MSG_WARN([*** Defaulting to "runtime"])
2004-01-08 16:34:03 +03:00
fi
2004-02-13 22:11:55 +03:00
AC_DEFINE_UNQUOTED(MPI_PARAM_CHECK, $mpi_param_check,
[Whether we want to check MPI parameters always, never, or decide at run-time])
2004-01-08 16:34:03 +03:00
2004-01-09 00:42:49 +03:00
#
2004-06-07 19:33:53 +04:00
# Do we want to install all of OMPI's header files?
2004-01-09 00:42:49 +03:00
#
2004-06-07 19:33:53 +04:00
AC_MSG_CHECKING([if want to install OMPI header files])
2004-01-09 00:42:49 +03:00
AC_ARG_WITH(devel-headers,
AC_HELP_STRING([--with-devel-headers],
[normal MPI users/applications do not need this (mpi.h and mpif.h are ALWAYS installed). Developer headers are only necessary for MCA module authors (default: disabled).]))
2004-08-28 14:38:40 +04:00
if test "$with_devel_headers" = "yes"; then
2004-01-09 00:42:49 +03:00
AC_MSG_RESULT([yes])
WANT_INSTALL_HEADERS=1
2004-08-28 14:38:40 +04:00
else
AC_MSG_RESULT([no])
WANT_INSTALL_HEADERS=0
2004-01-09 00:42:49 +03:00
fi
AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1)
2005-07-13 08:16:03 +04:00
#
# Do we want the pretty-print stack trace feature?
#
AC_MSG_CHECKING([if want pretty-print stacktrace])
AC_ARG_ENABLE([pretty-print-stacktrace],
[AC_HELP_STRING([--enable-pretty-print-stacktrace],
[Pretty print stacktrace on process signal])])
if test "$enable_pretty_print_stacktrace" = "no" ; then
AC_MSG_RESULT([no])
WANT_PRETTY_PRINT_STACKTRACE=0
else
AC_MSG_RESULT([yes])
WANT_PRETTY_PRINT_STACKTRACE=1
fi
AC_DEFINE_UNQUOTED([OMPI_WANT_PRETTY_PRINT_STACKTRACE],
[$WANT_PRETTY_PRINT_STACKTRACE],
[if want pretty-print stack trace feature])
2004-01-09 08:34:07 +03:00
#
# Do we want deprecated executable names ?
#
AC_MSG_CHECKING(if want deprecated executable names)
AC_ARG_ENABLE(deprecated-executable-names,
2004-06-07 19:33:53 +04:00
AC_HELP_STRING([--enable-deprecated-executable-names], [make sym links to deprecated OMPI executables (e.g., hcc, hcp, hf77, wipe) (default: disabled)]))
2004-01-09 09:39:14 +03:00
if test "$enable_deprecated_executable_names" = "yes"; then
2004-01-09 09:26:48 +03:00
AC_MSG_RESULT([yes])
WANT_DEN=1
else
AC_MSG_RESULT([no])
WANT_DEN=0
fi
AM_CONDITIONAL(WANT_DEPRECATED_EXECUTABLE_NAMES, test "$WANT_DEN" = "1")
2004-01-09 08:34:07 +03:00
2004-09-17 21:04:05 +04:00
2004-12-14 05:35:03 +03:00
#
# Do we want to build MPI-2 one-sided functions? Currently, they are
# empty shell functions that simply invoke an MPI exception (i.e., a
# run-time error vs. a compile/link-time error).
#
AC_MSG_CHECKING([if want MPI-2 one-sided empty shell functions])
AC_ARG_ENABLE(mpi2-one-sided,
AC_HELP_STRING([--enable-mpi2-one-sided],
[Do we want to build empty shell functions for the MPI-2 one-sided functionality? (these functions are currently unimplemented -- all they do is invoke a run-time MPI exception)]))
if test "$enable_mpi2_one_sided" = "yes"; then
mpi2_one_sided=yes
value=1
# Need to set values that will be in mpif.h
OMPI_F77_WIN_ATTR_KEYS="integer MPI_WIN_BASE, MPI_WIN_SIZE, MPI_WIN_DISP_UNIT"
OMPI_F77_WIN_ATTR_BASE_VALUE="parameter (MPI_WIN_BASE=6)"
OMPI_F77_WIN_ATTR_SIZE_VALUE="parameter (MPI_WIN_SIZE=7)"
OMPI_F77_WIN_ATTR_DISP_VALUE="parameter (MPI_WIN_DISP_UNIT=8)"
OMPI_F77_WIN_NULL_COPY_FN="external MPI_WIN_NULL_COPY_FN"
OMPI_F77_WIN_NULL_DELETE_FN="external MPI_WIN_NULL_DELETE_FN"
OMPI_F77_WIN_DUP_FN="external MPI_WIN_DUP_FN"
else
mpi2_one_sided=no
value=0
# Many values in mpif.h are now blank
OMPI_F77_WIN_ATTR_KEYS=
OMPI_F77_WIN_ATTR_BASE_VALUE=
OMPI_F77_WIN_ATTR_SIZE_VALUE=
OMPI_F77_WIN_ATTR_DISP_VALUE=
OMPI_F77_WIN_NULL_COPY_FN=
OMPI_F77_WIN_NULL_DELETE_FN=
OMPI_F77_WIN_DUP_FN=
fi
AC_MSG_RESULT([$mpi2_one_sided])
AC_DEFINE_UNQUOTED(OMPI_WANT_MPI2_ONE_SIDED, $value,
[Do we want the MPI-2 one-sided functions to be compiled in or left out altogether (i.e., unlinkable)?])
AM_CONDITIONAL(WANT_MPI2_ONE_SIDED, test "$mpi2_one_sided" = "yes")
AC_SUBST(OMPI_F77_WIN_ATTR_KEYS)
AC_SUBST(OMPI_F77_WIN_ATTR_BASE_VALUE)
AC_SUBST(OMPI_F77_WIN_ATTR_SIZE_VALUE)
AC_SUBST(OMPI_F77_WIN_ATTR_DISP_VALUE)
AC_SUBST(OMPI_F77_WIN_NULL_COPY_FN)
AC_SUBST(OMPI_F77_WIN_NULL_DELETE_FN)
AC_SUBST(OMPI_F77_WIN_DUP_FN)
2005-04-12 14:17:52 +04:00
#
# What is the max array rank that we want to support in the f90 bindings?
#
OMPI_FORTRAN_MAX_ARRAY_RANK=4
AC_MSG_CHECKING([max supported array dimension in F90 MPI bindings])
AC_ARG_WITH(f90-max-array-dim,
AC_HELP_STRING([--with-f90-max-array-dim=<DIM>],
[The maximum array dimension supported in the F90 MPI bindings (default: $OMPI_FORTRAN_MAX_ARRAY_RANK).]))
2005-08-24 06:11:02 +04:00
if test ! -z "$with_f90_max_array_dim" -a "$with_f90_max_array_dim" != "no"; then
2005-04-12 14:17:52 +04:00
# Ensure it's a number; hopefully a integer...
2005-08-24 06:11:02 +04:00
expr $with_f90_max_array_dim + 1 > /dev/null 2> /dev/null
2005-04-12 14:17:52 +04:00
if test "$?" = "0"; then
2005-08-24 06:11:02 +04:00
OMPI_FORTRAN_MAX_ARRAY_RANK="$with_f90_max_array_dim"
2005-04-12 14:17:52 +04:00
fi
fi
AC_MSG_RESULT([$OMPI_FORTRAN_MAX_ARRAY_RANK])
AC_SUBST(OMPI_FORTRAN_MAX_ARRAY_RANK)
2005-04-16 01:18:20 +04:00
# do we want PTY support?
AC_MSG_CHECKING([if pty support should be enabled])
AC_ARG_ENABLE(pty-support,
AC_HELP_STRING([--enable-pty-support],
[Enable/disable PTY support for STDIO forwarding. default: enabled]))
if test "$enable_pty_support" = "no" ; then
AC_MSG_RESULT([no])
OMPI_ENABLE_PTY_SUPPORT=0
else
AC_MSG_RESULT([yes])
OMPI_ENABLE_PTY_SUPPORT=1
fi
AC_DEFINE_UNQUOTED([OMPI_ENABLE_PTY_SUPPORT], [$OMPI_ENABLE_PTY_SUPPORT],
[Whether user wants PTY support or not])
2005-07-14 22:05:30 +04:00
#
# Do we want to allow DLOPEN?
#
AC_MSG_CHECKING([if user wants dlopen support])
AC_ARG_ENABLE([dlopen],
[AC_HELP_STRING([--enable-dlopen],
[Whether build should attempt to use dlopen (or
similar) to dynamically load components.
Disabling dlopen implies --disable-mca-dso.
2005-09-08 13:44:50 +04:00
(default: enabled)])])
2005-07-14 22:05:30 +04:00
if test "$enable_dlopen" = "no" ; then
enable_mca_dso="no"
enable_mca_static="yes"
OMPI_ENABLE_DLOPEN_SUPPORT=0
AC_MSG_RESULT([no])
else
OMPI_ENABLE_DLOPEN_SUPPORT=1
AC_MSG_RESULT([yes])
fi
2005-09-08 13:44:50 +04:00
#
# Heterogeneous support
#
2005-07-14 22:05:30 +04:00
2005-07-28 20:16:13 +04:00
AC_MSG_CHECKING([if heterogeneous support should be enabled])
AC_ARG_ENABLE([heterogeneous],
[AC_HELP_STRING([--enable-heterogeneous],
[Enable features required for heterogeneous
2005-09-08 13:44:50 +04:00
platform support (default: enabled)])])
2005-07-28 20:16:13 +04:00
if test "$enable_heterogeneous" = "no" ; then
AC_MSG_RESULT([no])
ompi_want_heterogeneous=0
else
AC_MSG_RESULT([yes])
ompi_want_heterogeneous=1
fi
AC_DEFINE_UNQUOTED([OMPI_ENABLE_HETEROGENEOUS_SUPPORT],
[$ompi_want_heterogeneous],
[Enable features required for heterogeneous support])
2005-09-08 13:44:50 +04:00
#
# Internal trace file logging (debugging)
#
AC_MSG_CHECKING([if want trace file debugging])
AC_ARG_ENABLE([trace],
[AC_HELP_STRING([--enable-trace],
[Enable internal tracing of OMPI/ORTE/OPAL calls -- used only for developer debugging, not tracing of MPI applications (default: disabled)])])
if test "$enable_trace" = "yes"; then
AC_MSG_RESULT([yes])
opal_want_trace=1
else
AC_MSG_RESULT([no])
opal_want_trace=0
fi
AC_DEFINE_UNQUOTED([OPAL_ENABLE_TRACE], [$opal_want_trace],
[Enable run-time tracing of internal functions])
2004-01-07 10:42:12 +03:00
])