File: prte_configure_options.m4

package info (click to toggle)
openmpi 5.0.8-4
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 201,684 kB
  • sloc: ansic: 613,078; makefile: 42,353; sh: 11,194; javascript: 9,244; f90: 7,052; java: 6,404; perl: 5,179; python: 1,859; lex: 740; fortran: 61; cpp: 20; tcl: 12
file content (406 lines) | stat: -rw-r--r-- 15,047 bytes parent folder | download | duplicates (4)
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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
dnl -*- shell-script -*-
dnl
dnl Copyright (c) 2004-2007 The Trustees of Indiana University and Indiana
dnl                         University Research and Technology
dnl                         Corporation.  All rights reserved.
dnl Copyright (c) 2004-2005 The University of Tennessee and The University
dnl                         of Tennessee Research Foundation.  All rights
dnl                         reserved.
dnl Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
dnl                         University of Stuttgart.  All rights reserved.
dnl Copyright (c) 2004-2005 The Regents of the University of California.
dnl                         All rights reserved.
dnl Copyright (c) 2006-2020 Cisco Systems, Inc.  All rights reserved
dnl Copyright (c) 2007      Sun Microsystems, Inc.  All rights reserved.
dnl Copyright (c) 2009      IBM Corporation.  All rights reserved.
dnl Copyright (c) 2009-2013 Los Alamos National Security, LLC.  All rights
dnl                         reserved.
dnl Copyright (c) 2009      Oak Ridge National Labs.  All rights reserved.
dnl
dnl Copyright (c) 2016-2020 Intel, Inc.  All rights reserved.
dnl Copyright (c) 2021-2025 Nanook Consulting  All rights reserved.
dnl Copyright (c) 2022      Amazon.com, Inc. or its affiliates.
dnl                         All Rights reserved.
dnl $COPYRIGHT$
dnl
dnl Additional copyrights may follow
dnl
dnl $HEADER$
dnl


AC_DEFUN([PRTE_CONFIGURE_OPTIONS],[
prte_show_subtitle "PRTE Configuration options"

# A hint to tell us if we are working with a build from Git or a tarball.
# Helpful when preparing diagnostic output.
if test -e $PRTE_TOP_SRCDIR/.git; then
    AC_DEFINE_UNQUOTED([PRTE_GIT_REPO_BUILD], ["1"],
                       [If built from a git repo])
    prte_git_repo_build=yes
else
    prte_git_repo_build=no
fi


#
# Do we want prte's --prefix behavior to be enabled by default?
#
AC_MSG_CHECKING([if want prte "--prefix" behavior to be enabled by default])
AC_ARG_ENABLE([prte-prefix-by-default],
    [AS_HELP_STRING([--enable-prte-prefix-by-default],
        [Make "prte ..." behave exactly the same as "prte --prefix \$prefix" (where \$prefix is the value given to --prefix in configure)])])
if test "$enable_prte_prefix_by_default" = "yes"; then
    AC_MSG_RESULT([yes])
    prte_want_prte_prefix_by_default=1
else
    AC_MSG_RESULT([no])
    prte_want_prte_prefix_by_default=0
fi
AC_DEFINE_UNQUOTED([PRTE_WANT_PRTE_PREFIX_BY_DEFAULT],
                   [$prte_want_prte_prefix_by_default],
                   [Whether we want prte to effect "--prefix $prefix" by default])

#
# Developer debugging
#
AC_MSG_CHECKING([if want developer-level debugging code])
AC_ARG_ENABLE(debug,
    AS_HELP_STRING([--enable-debug],
                   [enable developer-level debugging code (not for general MPI users!) (default: disabled)]))
if test "$enable_debug" = "yes"; then
    AC_MSG_RESULT([yes])
    WANT_DEBUG=1
else
    AC_MSG_RESULT([no])
    WANT_DEBUG=0
fi


if test "$WANT_DEBUG" = "0"; then
    CFLAGS="-DNDEBUG $CFLAGS"
    CXXFLAGS="-DNDEBUG $CXXFLAGS"
fi
AC_DEFINE_UNQUOTED(PRTE_ENABLE_DEBUG, $WANT_DEBUG,
    [Whether we want developer-level debugging code or not])

AC_ARG_ENABLE(debug-symbols,
    AS_HELP_STRING([--disable-debug-symbols],
        [Disable adding compiler flags to enable debugging symbols if --enable-debug is specified.  For non-debugging builds, this flag has no effect.]))

#
# Developer picky compiler options
#

AC_MSG_CHECKING([if want developer-level compiler pickyness])
AC_ARG_ENABLE(devel-check,
    AS_HELP_STRING([--enable-devel-check],
                   [enable developer-level compiler pickyness when building PRRTE (default: disabled)]))
if test "$enable_devel_check" = "yes"; then
    AC_MSG_RESULT([yes])
    WANT_PICKY_COMPILER=1
elif test "$enable_devel_check" = "no"; then
    AC_MSG_RESULT([no])
    WANT_PICKY_COMPILER=0
elif test "$prte_git_repo_build" = "yes" && test "$WANT_DEBUG" = "1"; then
    AC_MSG_RESULT([yes])
    WANT_PICKY_COMPILER=1
else
    AC_MSG_RESULT([no])
    WANT_PICKY_COMPILER=0
fi

AC_DEFINE_UNQUOTED(PRTE_PICKY_COMPILERS, $WANT_PICKY_COMPILER,
                   [Whether or not we are using picky compiler settings])

AC_MSG_CHECKING([if want memory sanitizers])
AC_ARG_ENABLE(memory-sanitizers,
    AS_HELP_STRING([--memory-sanitizers],
                   [enable developer-level memory sanitizers when building PRRTE (default: disabled)]))
if test "$enable_memory_sanitizers" = "yes"; then
    AC_MSG_RESULT([yes])
    WANT_MEMORY_SANITIZERS=1
    AC_MSG_WARN([******************************************************])
    AC_MSG_WARN([**** Memory sanitizers may require that you LD_PRELOAD])
    AC_MSG_WARN([**** libasan in order to run an executable.])
    AC_MSG_WARN([******************************************************])
else
    AC_MSG_RESULT([no])
    WANT_MEMORY_SANITIZERS=0
fi

AC_DEFINE_UNQUOTED(PRTE_MEMORY_SANITIZERS, $WANT_MEMORY_SANITIZERS,
                   [Whether or not we are using memory sanitizers])

#
# Do we want to install the internal devel headers?
#
AC_MSG_CHECKING([if want to install project-internal header files])
AC_ARG_WITH(devel-headers,
    AS_HELP_STRING([--with-devel-headers],
                   [Normal PRTE users/applications do not need this.  Developer headers are only necessary for authors doing deeper integration (default: disabled).]))
if test "$with_devel_headers" = "yes"; then
    AC_MSG_RESULT([yes])
    WANT_INSTALL_HEADERS=1
else
    AC_MSG_RESULT([no])
    WANT_INSTALL_HEADERS=0
fi
AM_CONDITIONAL(WANT_INSTALL_HEADERS, test "$WANT_INSTALL_HEADERS" = 1)

#
# Do we want the pretty-print stack trace feature?
#

AC_MSG_CHECKING([if want pretty-print stacktrace])
AC_ARG_ENABLE([pretty-print-stacktrace],
    [AS_HELP_STRING([--enable-pretty-print-stacktrace],
                    [Pretty print stacktrace on process signal (default: enabled)])])
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([PRTE_WANT_PRETTY_PRINT_STACKTRACE],
                   [$WANT_PRETTY_PRINT_STACKTRACE],
                   [if want pretty-print stack trace feature])


#
# Do we want PTY support?
#

AC_MSG_CHECKING([if want pty support])
AC_ARG_ENABLE(pty-support,
    AS_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])
    PRTE_ENABLE_PTY_SUPPORT=0
else
    AC_MSG_RESULT([yes])
    PRTE_ENABLE_PTY_SUPPORT=1
fi
AC_DEFINE_UNQUOTED([PRTE_ENABLE_PTY_SUPPORT], [$PRTE_ENABLE_PTY_SUPPORT],
                   [Whether user wants PTY support or not])


#
# Do we want to allow DLOPEN?
#

AC_MSG_CHECKING([if want dlopen support])
AC_ARG_ENABLE([dlopen],
    [AS_HELP_STRING([--enable-dlopen],
                    [Whether build should attempt to use dlopen (or
                     similar) to dynamically load components.
                     Disabling dlopen implies --disable-mca-dso.
                     (default: enabled)])])
if test "$enable_dlopen" = "no" ; then
    PRTE_ENABLE_DLOPEN_SUPPORT=0
    AC_MSG_RESULT([no])
else
    PRTE_ENABLE_DLOPEN_SUPPORT=1
    AC_MSG_RESULT([yes])
fi
AC_DEFINE_UNQUOTED(PRTE_ENABLE_DLOPEN_SUPPORT, $PRTE_ENABLE_DLOPEN_SUPPORT,
    [Whether we want to enable dlopen support])


#
# Do we want to show component load error messages by default?
#

AC_MSG_CHECKING([for default value of mca_base_component_show_load_errors])
AC_ARG_ENABLE([show-load-errors-by-default],
    [AS_HELP_STRING([--enable-show-load-errors-by-default],
                    [Set the default value for the MCA parameter
                     mca_base_component_show_load_errors (but can be
                     overridden at run time by the usual
                     MCA-variable-setting mechansism).  This MCA variable
                     controls whether warnings are displayed when an MCA
                     component fails to load at run time due to an error.
                     (default: enabled in --enable-debug builds, meaning that
                      mca_base_component_show_load_errors is enabled
                      by default when configured with --enable-debug])])
if test "$enable_show_load_errors_by_default" = "no" ; then
    PRTE_SHOW_LOAD_ERRORS_DEFAULT=0
    AC_MSG_RESULT([disabled by default])
else
    PRTE_SHOW_LOAD_ERRORS_DEFAULT=$WANT_DEBUG
    if test "$WANT_DEBUG" = "1"; then
        AC_MSG_RESULT([enabled by default])
    else
        AC_MSG_RESULT([disabled by default])
    fi
fi
AC_DEFINE_UNQUOTED(PRTE_SHOW_LOAD_ERRORS_DEFAULT, $PRTE_SHOW_LOAD_ERRORS_DEFAULT,
                   [Default value for mca_base_component_show_load_errors MCA variable])


#
# Handle embedded version strings
#
AC_MSG_CHECKING([if a proxy version string for prte is required])
AC_ARG_WITH(proxy-version-string,
    AS_HELP_STRING([--with-proxy-version-string],
                   [Return the provided string when prte is used in proxy mode and the version is requested]))
if test -n "$with_proxy_version_string"; then
    AC_MSG_RESULT([yes])
    PRTE_PROXY_VERSION_STRING=$with_proxy_version_string
else
    AC_MSG_RESULT([no])
    PRTE_PROXY_VERSION_STRING=$PRTE_VERSION
fi
AC_DEFINE_UNQUOTED(PRTE_PROXY_VERSION_STRING, "$PRTE_PROXY_VERSION_STRING",
                   [Version string to be returned by prte when in proxy mode])

#
# Save the actual version in an external header file so that
# packages that use us can know what version we are
#
prtemajor=${PRTE_MAJOR_VERSION}L
prteminor=${PRTE_MINOR_VERSION}L
prterelease=${PRTE_RELEASE_VERSION}L
prtenumeric=$(printf 0x%4.4x%2.2x%2.2x $PRTE_MAJOR_VERSION $PRTE_MINOR_VERSION $PRTE_RELEASE_VERSION)
AC_SUBST(prtemajor)
AC_SUBST(prteminor)
AC_SUBST(prterelease)
AC_SUBST(prtenumeric)

AC_MSG_CHECKING([if a proxy package name for prte is required])
AC_ARG_WITH(proxy-package-name,
    AS_HELP_STRING([--with-proxy-package-name],
                   [Return the provided string when prte is used in proxy mode and the package name is requested]))
if test -n "$with_proxy_package_name"; then
    AC_MSG_RESULT([yes])
    PRTE_PROXY_PACKAGE_NAME=$with_proxy_package_name
else
    AC_MSG_RESULT([no])
    PRTE_PROXY_PACKAGE_NAME="PMIx Reference RunTime Environment"
fi
AC_DEFINE_UNQUOTED(PRTE_PROXY_PACKAGE_NAME, "$PRTE_PROXY_PACKAGE_NAME",
                   [Package name to be returned by prte when in proxy mode])

AC_MSG_CHECKING([if a proxy bugreport path for prte is required])
AC_ARG_WITH(proxy-bugreport,
    AS_HELP_STRING([--with-proxy-bugreport],
                   [Return the provided string when prte is used in proxy mode and the PACKAGE_BUGREPORT is requested]))
if test -n "$with_proxy_bugreport"; then
    AC_MSG_RESULT([yes])
    PRTE_PROXY_BUGREPORT=$with_proxy_bugreport
else
    AC_MSG_RESULT([no])
    PRTE_PROXY_BUGREPORT=https://github.com/openpmix/prrte/
fi
AC_DEFINE_UNQUOTED(PRTE_PROXY_BUGREPORT, "$PRTE_PROXY_BUGREPORT",
                   [Bugreport string to be returned by prte when in proxy mode])


#
# Support per-user config files?
#
AC_ARG_ENABLE([per-user-config-files],
   [AS_HELP_STRING([--enable-per-user-config-files],
      [Disable per-user configuration files, to save disk accesses during job start-up.  This is likely desirable for large jobs.  Note that this can also be achieved by environment variables at run-time.  (default: enabled)])])
if test "$enable_per_user_config_files" = "no" ; then
  result=0
else
  result=1
fi
AC_DEFINE_UNQUOTED([PRTE_WANT_HOME_CONFIG_FILES], [$result],
     [Enable per-user config files])

#
# Do we want to enable IPv6 support?
#
AC_MSG_CHECKING([if want IPv6 support])
AC_ARG_ENABLE([ipv6],
    [AS_HELP_STRING([--enable-ipv6],
        [Enable IPv6 support, but only if the underlying system supports it (default: disabled)])])
if test "$enable_ipv6" = "yes"; then
    AC_MSG_RESULT([yes])
    prte_want_ipv6=1
else
    AC_MSG_RESULT([no])
    prte_want_ipv6=0
fi
AC_DEFINE_UNQUOTED([PRTE_ENABLE_IPV6], [$prte_want_ipv6],
                   [Enable IPv6 support, but only if the underlying system supports it])


# Package/brand string
#
AC_MSG_CHECKING([if want package/brand string])
AC_ARG_WITH([package-string],
     [AS_HELP_STRING([--with-package-string=STRING],
                     [Use a branding string throughout PRRTE])])
if test "$with_package_string" = "" || test "$with_package_string" = "no"; then
    with_package_string="Open MPI $PRTE_CONFIGURE_USER@$PRTE_CONFIGURE_HOST Distribution"
fi
AC_DEFINE_UNQUOTED([PRTE_PACKAGE_STRING], ["$with_package_string"],
     [package/branding string for Open MPI])
AC_MSG_RESULT([$with_package_string])

#
# Ident string
#
AC_MSG_CHECKING([if want ident string])
AC_ARG_WITH([ident-string],
     [AS_HELP_STRING([--with-ident-string=STRING],
                     [Embed an ident string into Open MPI object files])])
if test "$with_ident_string" = "" || test "$with_ident_string" = "no"; then
    with_ident_string="%VERSION%"
fi
# This is complicated, because $PRTE_VERSION may have spaces in it.
# So put the whole sed expr in single quotes -- i.e., directly
# substitute %VERSION% for (not expanded) $PRTE_VERSION.
with_ident_string="`echo $with_ident_string | sed -e 's/%VERSION%/$PRTE_VERSION/'`"

# Now eval an echo of that so that the "$PRTE_VERSION" token is
# replaced with its value.  Enclose the whole thing in "" so that it
# ends up as 1 token.
with_ident_string="`eval echo $with_ident_string`"

AC_DEFINE_UNQUOTED([PRTE_IDENT_STRING], ["$with_ident_string"],
     [ident string for Open MPI])
AC_MSG_RESULT([$with_ident_string])


# some systems don't want/like getpwuid
AC_MSG_CHECKING([if want getpwuid support])
AC_ARG_ENABLE([getpwuid],
    [AS_HELP_STRING([--disable-getpwuid],
        [Disable getpwuid support (default: enabled)])])
if test "$enable_getpwuid" = "no"; then
    AC_MSG_RESULT([no])
    prte_want_getpwuid=0
else
    AC_MSG_RESULT([yes])
    prte_want_getpwuid=1
fi
AC_DEFINE_UNQUOTED([PRTE_ENABLE_GETPWUID], [$prte_want_getpwuid],
                   [Disable getpwuid support (default: enabled)])

# use header "shims" for 3rd-party libraries to test-build
# the PLM launchers
AC_MSG_CHECKING([if want to test-build PLM launchers that require 3rd-party headers/libraries])
AC_ARG_ENABLE([testbuild-launchers],
    [AS_HELP_STRING([--enable-testbuild-launchers],
        [Test-build PLM launchers that require 3rd-party headers/libraries (default: disabled)])])
if test "$enable_testbuild_launchers" = "yes"; then
    AC_MSG_RESULT([yes])
    prte_testbuild_launchers=1
    prte_testbuild_launchers_msg=yes
else
    AC_MSG_RESULT([no])
    prte_testbuild_launchers=0
    prte_testbuild_launchers_msg=no
fi
AC_DEFINE_UNQUOTED([PRTE_TESTBUILD_LAUNCHERS], [$prte_testbuild_launchers],
                   [Enable testbuild PLM launchers (default: disabled)])
PRTE_SUMMARY_ADD([Miscellaneous], [Testbuild launchers], [], [$prte_testbuild_launchers_msg])

])dnl