1 dnl -*- shell-script -*-
3 dnl Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
4 dnl University Research and Technology
5 dnl Corporation. All rights reserved.
6 dnl Copyright (c) 2004-2005 The University of Tennessee and The University
7 dnl of Tennessee Research Foundation. All rights
9 dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
10 dnl University of Stuttgart. All rights reserved.
11 dnl Copyright (c) 2004-2005 The Regents of the University of California.
12 dnl All rights reserved.
13 dnl Copyright (c) 2006 Cisco Systems, Inc. All rights reserved.
16 dnl Additional copyrights may follow
21 AC_DEFUN([OMPI_CONFIGURE_OPTIONS],[
22 ompi_show_subtitle "Configuration options"
25 # Code coverage options
27 AC_MSG_CHECKING([Whether to run code coverage])
28 AC_ARG_ENABLE(coverage,
29 AC_HELP_STRING([--enable-coverage],
30 [enable code coverage files to be generated]))
31 if test "$enable_coverage" = "yes"; then
32 if test "$enable_shared" = "yes"; then
33 AC_MSG_WARN([Code coverage can run only with static libraries. Please
34 run configure with --enable-static --disable-shared if
35 you want code coverage. Also ensure that you execute
36 make clean too ensure removal of all leftover shared
38 AC_MSG_ERROR([Cannot continue processing])
52 AC_MSG_CHECKING([whether to debug memory usage])
53 AC_ARG_ENABLE(mem-debug,
54 AC_HELP_STRING([--enable-mem-debug],
55 [enable memory debugging (debugging only) (default: disabled)]))
56 if test "$enable_mem_debug" = "yes"; then
63 #################### Early development override ####################
64 if test "$WANT_MEM_DEBUG" = "0" -a -z "$enable_mem_debug" -a -d .svn; then
66 echo "--> developer override: enable mem profiling by default"
68 #################### Early development override ####################
69 AC_DEFINE_UNQUOTED(OMPI_ENABLE_MEM_DEBUG, $WANT_MEM_DEBUG,
70 [Whether we want the memory profiling or not])
76 AC_MSG_CHECKING([whether to profile memory usage])
77 AC_ARG_ENABLE(mem-profile,
78 AC_HELP_STRING([--enable-mem-profile],
79 [enable memory profiling (debugging only) (default: disabled)]))
80 if test "$enable_mem_profile" = "yes"; then
87 #################### Early development override ####################
88 if test "$WANT_MEM_PROFILE" = "0" -a -z "$enable_mem_profile" -a -d .svn; then
90 echo "--> developer override: enable mem profiling by default"
92 #################### Early development override ####################
93 AC_DEFINE_UNQUOTED(OMPI_ENABLE_MEM_PROFILE, $WANT_MEM_PROFILE,
94 [Whether we want the memory profiling or not])
97 # Developer picky compiler options
100 AC_MSG_CHECKING([if want developer-level compiler pickyness])
102 AC_HELP_STRING([--enable-picky],
103 [enable developer-level compiler pickyness when building Open MPI (default: disabled)]))
104 if test "$enable_picky" = "yes"; then
106 WANT_PICKY_COMPILER=1
109 WANT_PICKY_COMPILER=0
111 #################### Early development override ####################
112 if test "$WANT_PICKY_COMPILER" = "0" -a -z "$enable_picky" -a -d .svn; then
113 WANT_PICKY_COMPILER=1
114 echo "--> developer override: enable picky compiler by default"
116 #################### Early development override ####################
119 # Developer debugging
122 AC_MSG_CHECKING([if want developer-level debugging code])
124 AC_HELP_STRING([--enable-debug],
125 [enable developer-level debugging code (not for general MPI users!) (default: disabled)]))
126 if test "$enable_debug" = "yes"; then
133 #################### Early development override ####################
134 if test "$WANT_DEBUG" = "0" -a -z "$enable_debug" -a -d .svn; then
136 echo "--> developer override: enable debugging code by default"
138 #################### Early development override ####################
139 if test "$WANT_DEBUG" = "0"; then
140 CFLAGS="-DNDEBUG $CFLAGS"
141 CXXFLAGS="-DNDEBUG $CXXFLAGS"
143 AC_DEFINE_UNQUOTED(OMPI_ENABLE_DEBUG, $WANT_DEBUG,
144 [Whether we want developer-level debugging code or not])
151 AC_MSG_CHECKING([if want Fortran 77 bindings])
152 AC_ARG_ENABLE(mpi-f77,
153 AC_HELP_STRING([--enable-mpi-f77],
154 [enable f77 MPI bindings (default: enabled)]))
155 if test "$enable_mpi_f77" != "no"; then
157 OMPI_WANT_F77_BINDINGS=1
160 OMPI_WANT_F77_BINDINGS=0
168 AC_MSG_CHECKING([if want Fortran 90 bindings])
169 AC_ARG_ENABLE(mpi-f90,
170 AC_HELP_STRING([--enable-mpi-f90],
171 [enable f90 MPI bindings (default: enabled)]))
172 if test "$enable_mpi_f90" != "no"; then
174 OMPI_WANT_F90_BINDINGS=1
177 OMPI_WANT_F90_BINDINGS=0
180 AC_MSG_CHECKING([desired Fortran 90 bindings "size"])
181 AC_ARG_WITH(mpi-f90-size,
182 AC_HELP_STRING([--with-mpi-f90-size=SIZE],
183 [specify the types of functions in the Fortran 90 MPI module, where size is one of: trivial (MPI-2 F90-specific functions only), small (trivial + all MPI functions without choice buffers), medium (small + all MPI functions with one choice buffer)]))
185 if test "$OMPI_WANT_F90_BINDINGS" = "0"; then
186 AC_MSG_RESULT([disabled (Fortran 90 bindings disabled)])
187 elif test "$with_mpi_f90_size" = "no"; then
188 OMPI_WANT_F90_BINDINGS=0
189 AC_MSG_RESULT([disabling F90 MPI module (used specified)])
192 if test "$with_mpi_f90_size" = ""; then
193 with_mpi_f90_size=small
196 # Check for each of the sizes
197 if test "$with_mpi_f90_size" = "trivial"; then
198 OMPI_F90_BUILD_SIZE=trivial
199 elif test "$with_mpi_f90_size" = "small"; then
200 OMPI_F90_BUILD_SIZE=small
201 elif test "$with_mpi_f90_size" = "medium"; then
202 OMPI_F90_BUILD_SIZE=medium
204 AC_MSG_RESULT([Unrecognized size: $with_mpi_f90_size])
205 AC_MSG_ERROR([Cannot continue])
209 AM_CONDITIONAL([OMPI_WANT_BUILD_F90_TRIVIAL],
210 [test "$OMPI_F90_BUILD_SIZE" = "trivial"])
211 AM_CONDITIONAL([OMPI_WANT_BUILD_F90_SMALL],
212 [test "$OMPI_F90_BUILD_SIZE" = "small"])
213 AM_CONDITIONAL([OMPI_WANT_BUILD_F90_MEDIUM],
214 [test "$OMPI_F90_BUILD_SIZE" = "medium"])
215 # This is effectively ignored in v1.1 because the "large" bindings are
216 # not ready for prime time
217 AM_CONDITIONAL([OMPI_WANT_BUILD_F90_LARGE],
218 [test "$OMPI_F90_BUILD_SIZE" = "large"])
220 AC_SUBST(OMPI_F90_BUILD_SIZE)
221 AC_MSG_RESULT([$OMPI_F90_BUILD_SIZE])
227 AC_MSG_CHECKING([whether to enable PMPI])
228 AC_ARG_ENABLE(mpi-profile,
229 AC_HELP_STRING([--enable-mpi-profile],
230 [enable MPI profiling (default: enabled)]))
231 if test "$enable_mpi_profile" != "no"; then
234 MPIF_H_PMPI_W_FUNCS=", PMPI_WTICK, PMPI_WTIME"
240 AC_SUBST(MPIF_H_PMPI_W_FUNCS)
247 AC_MSG_CHECKING([if want C++ bindings])
248 AC_ARG_ENABLE(mpi-cxx,
249 AC_HELP_STRING([--enable-mpi-cxx],
250 [enable C++ MPI bindings (default: enabled)]))
251 if test "$enable_mpi_cxx" != "no"; then
253 WANT_MPI_CXX_SUPPORT=1
256 WANT_MPI_CXX_SUPPORT=0
261 # Do we want to disable weak symbols for some reason?
264 AC_MSG_CHECKING([if want to enable weak symbol support])
265 AC_ARG_ENABLE(weak-symbols,
266 AC_HELP_STRING([--enable-weak-symbols],
267 [use weak symbols, if available (default: enabled)]))
268 if test "$enable_weak_symbols" != "no"; then
277 # Do we want to disable MPI parameter checking at run-time?
280 AC_MSG_CHECKING([if want run-time MPI parameter checking])
281 AC_ARG_WITH(mpi-param-check,
282 AC_HELP_STRING([--with-mpi-param-check(=VALUE)],
283 [behavior of MPI function parameter checking. Valid values are: always, never, runtime. If --with-mpi-param-check is specified with no VALUE argument, it is equivalent to a VALUE of "always"; --without-mpi-param-check is equivalent to "never" (default: runtime).]))
284 mpi_param_check=ompi_mpi_param_check
285 if test "$with_mpi_param_check" = "no" -o \
286 "$with_mpi_param_check" = "never"; then
288 AC_MSG_RESULT([never])
289 elif test "$with_mpi_param_check" = "yes" -o \
290 "$with_mpi_param_check" = "always"; then
292 AC_MSG_RESULT([always])
293 elif test "$with_mpi_param_check" = "runtime" -o \
294 -z "$with_mpi_params_check"; then
295 AC_MSG_RESULT([runtime])
297 AC_MSG_RESULT([unknown])
298 AC_MSG_WARN([*** Unrecognized --with-mpi-param-check value])
299 AC_MSG_WARN([*** See "configure --help" output])
300 AC_MSG_WARN([*** Defaulting to "runtime"])
302 AC_DEFINE_UNQUOTED(MPI_PARAM_CHECK, $mpi_param_check,
303 [Whether we want to check MPI parameters always, never, or decide at run-time])
307 # Do we want to install all of OMPI's header files?
310 AC_MSG_CHECKING([if want to install OMPI header files])
311 AC_ARG_WITH(devel-headers,
312 AC_HELP_STRING([--with-devel-headers],
313 [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).]))
314 if test "$with_devel_headers" = "yes"; then
316 WANT_INSTALL_HEADERS=1
319 WANT_INSTALL_HEADERS=0
321 AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1)
324 # Do we want the pretty-print stack trace feature?
326 AC_MSG_CHECKING([if want pretty-print stacktrace])
327 AC_ARG_ENABLE([pretty-print-stacktrace],
328 [AC_HELP_STRING([--enable-pretty-print-stacktrace],
329 [Pretty print stacktrace on process signal])])
330 if test "$enable_pretty_print_stacktrace" = "no" ; then
332 WANT_PRETTY_PRINT_STACKTRACE=0
335 WANT_PRETTY_PRINT_STACKTRACE=1
337 AC_DEFINE_UNQUOTED([OMPI_WANT_PRETTY_PRINT_STACKTRACE],
338 [$WANT_PRETTY_PRINT_STACKTRACE],
339 [if want pretty-print stack trace feature])
342 # Do we want deprecated executable names ?
344 AC_MSG_CHECKING(if want deprecated executable names)
345 AC_ARG_ENABLE(deprecated-executable-names,
346 AC_HELP_STRING([--enable-deprecated-executable-names], [make sym links to deprecated OMPI executables (e.g., hcc, hcp, hf77, wipe) (default: disabled)]))
347 if test "$enable_deprecated_executable_names" = "yes"; then
355 AM_CONDITIONAL(WANT_DEPRECATED_EXECUTABLE_NAMES, test "$WANT_DEN" = "1")
358 # Do we want to enable peruse interface?
361 AC_MSG_CHECKING([if peruse support is required])
362 AC_ARG_ENABLE(peruse,
363 AC_HELP_STRING([--enable-peruse],
364 [Support PERUSE interface (default: disabled)]))
365 if test "$enable_peruse" == "yes"; then
372 AC_DEFINE_UNQUOTED([OMPI_WANT_PERUSE],
374 [if the peruse interface should be enabled])
375 AM_CONDITIONAL(WANT_PERUSE, test "$WANT_PERUSE" = "1")
378 # What is the max array rank that we want to support in the f90 bindings?
381 OMPI_FORTRAN_MAX_ARRAY_RANK=4
382 AC_MSG_CHECKING([max supported array dimension in F90 MPI bindings])
383 AC_ARG_WITH(f90-max-array-dim,
384 AC_HELP_STRING([--with-f90-max-array-dim=<DIM>],
385 [The maximum array dimension supported in the F90 MPI bindings (default: $OMPI_FORTRAN_MAX_ARRAY_RANK).]))
386 if test ! -z "$with_f90_max_array_dim" -a "$with_f90_max_array_dim" != "no"; then
387 # Ensure it's a number; hopefully a integer...
388 expr $with_f90_max_array_dim + 1 > /dev/null 2> /dev/null
389 if test "$?" = "0"; then
390 OMPI_FORTRAN_MAX_ARRAY_RANK="$with_f90_max_array_dim"
393 AC_MSG_RESULT([$OMPI_FORTRAN_MAX_ARRAY_RANK])
394 AC_SUBST(OMPI_FORTRAN_MAX_ARRAY_RANK)
396 # do we want PTY support?
397 AC_MSG_CHECKING([if pty support should be enabled])
398 AC_ARG_ENABLE(pty-support,
399 AC_HELP_STRING([--enable-pty-support],
400 [Enable/disable PTY support for STDIO forwarding. default: enabled]))
401 if test "$enable_pty_support" = "no" ; then
403 OMPI_ENABLE_PTY_SUPPORT=0
406 OMPI_ENABLE_PTY_SUPPORT=1
408 AC_DEFINE_UNQUOTED([OMPI_ENABLE_PTY_SUPPORT], [$OMPI_ENABLE_PTY_SUPPORT],
409 [Whether user wants PTY support or not])
412 # Do we want to allow DLOPEN?
414 AC_MSG_CHECKING([if user wants dlopen support])
415 AC_ARG_ENABLE([dlopen],
416 [AC_HELP_STRING([--enable-dlopen],
417 [Whether build should attempt to use dlopen (or
418 similar) to dynamically load components.
419 Disabling dlopen implies --disable-mca-dso.
420 (default: enabled)])])
421 if test "$enable_dlopen" = "no" ; then
423 enable_mca_static="yes"
424 OMPI_ENABLE_DLOPEN_SUPPORT=0
427 OMPI_ENABLE_DLOPEN_SUPPORT=1
432 # Heterogeneous support
435 AC_MSG_CHECKING([if heterogeneous support should be enabled])
436 AC_ARG_ENABLE([heterogeneous],
437 [AC_HELP_STRING([--enable-heterogeneous],
438 [Enable features required for heterogeneous
439 platform support (default: enabled)])])
440 if test "$enable_heterogeneous" = "no" ; then
442 ompi_want_heterogeneous=0
445 ompi_want_heterogeneous=1
447 AC_DEFINE_UNQUOTED([OMPI_ENABLE_HETEROGENEOUS_SUPPORT],
448 [$ompi_want_heterogeneous],
449 [Enable features required for heterogeneous support])
452 # Internal trace file logging (debugging)
455 AC_MSG_CHECKING([if want trace file debugging])
456 AC_ARG_ENABLE([trace],
457 [AC_HELP_STRING([--enable-trace],
458 [Enable internal tracing of OMPI/ORTE/OPAL calls -- used only for developer debugging, not tracing of MPI applications (default: disabled)])])
459 if test "$enable_trace" = "yes"; then
466 AC_DEFINE_UNQUOTED([OPAL_ENABLE_TRACE], [$opal_want_trace],
467 [Enable run-time tracing of internal functions])
474 [AC_HELP_STRING([--with-cross=FILE],
475 [Specify configure values that can not be determined in a cross-compilation environment. See the Open MPI FAQ.])])
476 if test "$with_cross" = "yes" ; then
477 AC_MSG_ERROR([--with-cross argument must include FILE option])
478 elif test "$with_cross" = "no" ; then
479 AC_MSG_ERROR([--without-cross is not a valid argument])
480 elif test "$with_cross" != "" ; then
481 if test ! -r $with_cross ; then
482 AC_MSG_ERROR([could not find cross-compile data file $with_cross])
485 # eval into environment
486 OMPI_LOG_MSG([Loading cross-compile file $with_cross, with contents below])
487 OMPI_LOG_FILE([$with_cross])