2004-01-07 10:42:12 +03:00
dnl -*- shell-script -*-
dnl
dnl $HEADER$
dnl
2004-01-15 21:10:26 +03:00
AC_DEFUN([LAM_CONFIGURE_OPTIONS],[
2004-01-07 10:42:12 +03:00
lam_show_subtitle "Configuration options"
#
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 ####################
2004-03-19 09:07:54 +03:00
if test "$WANT_MEM_DEBUG" = "0" -a -z "$enable_mem_zero" -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-02-10 03:06:28 +03:00
AC_DEFINE_UNQUOTED(LAM_ENABLE_MEM_DEBUG, $WANT_MEM_DEBUG,
[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 ####################
2004-03-19 09:07:54 +03:00
if test "$WANT_MEM_PROFILE" = "0" -a -z "$enable_mem_zero" -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-01-08 21:55:38 +03:00
AC_DEFINE_UNQUOTED(LAM_ENABLE_MEM_PROFILE, $WANT_MEM_PROFILE,
[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-01-13 04:13:28 +03:00
[enable developer-level compiler pickyness (not for general MPI users!) (default: enabled)]))
if test "$enable_picky" != "no"; then
2004-01-11 03:07:22 +03:00
AC_MSG_RESULT([yes])
WANT_PICKY_COMPILER=1
else
AC_MSG_RESULT([no])
WANT_PICKY_COMPILER=0
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"
CXXFLAGS="-DNDEBUG $CFLAGS"
fi
2004-01-07 11:31:32 +03:00
AC_DEFINE_UNQUOTED(LAM_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-03-28 14:02:38 +04:00
LAM_WANT_F77_BINDINGS=1
2004-01-08 16:34:03 +03:00
else
AC_MSG_RESULT([no])
2004-03-28 14:02:38 +04:00
LAM_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],
2004-03-28 14:02:38 +04:00
[enable f90 MPI bindings (default: disabled)]))
if test "$enable_f90" != "yes"; then
2004-02-13 22:11:55 +03:00
AC_MSG_RESULT([no])
2004-03-28 14:02:38 +04:00
LAM_WANT_F90_BINDINGS=0
else
AC_MSG_RESULT([yes])
LAM_WANT_F90_BINDINGS=1
2004-02-13 22:11:55 +03:00
fi
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-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])
AC_ARG_ENABLE(mpi-param-check,
AC_HELP_STRING([--with-mpi-param-check],
[behavior of MPI function parameter checking. Valid values are: always, never, runtime (default: runtime)]))
mpi_param_check=lam_mpi_param_check
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
#
# Do we want to install all of LAM's header files?
#
AC_MSG_CHECKING([if want to install LAM header files])
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).]))
if test "$with_devel_headers" != "yes"; then
AC_MSG_RESULT([no])
WANT_INSTALL_HEADERS=0
else
AC_MSG_RESULT([yes])
WANT_INSTALL_HEADERS=1
fi
AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1)
2004-01-07 10:42:12 +03:00
# --enable-dist
# ...?
# amorphous, seem-to-be-good-idea options
# --with-lam=maintainer_options
# --with-mca-*
# ...?
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-01-09 09:39:14 +03:00
AC_HELP_STRING([--enable-deprecated-executable-names], [make sym links to deprecated LAM executables (e.g., hcc, hcp, hf77, wipe) (default: disabled)]))
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-01-07 10:42:12 +03:00
])