configure.ac 233 KB
Newer Older
1
AC_PREREQ(2.63)
2
3
4
5
6
7
8
9
10
11
12
# 
# (C) 2006 by Argonne National Laboratory.
#     See COPYRIGHT in top-level directory.
#
dnl Process this file with autoconf to produce a configure script.
dnl
dnl aclocal_cache.m4, included by sowing/confdb/aclocal.m4, fixes 
dnl bugs in autoconf caching.
dnl
dnl This is a large configure script and it is important to keep it
dnl clearly organized.  In addition, this script must coordinate with 
13
dnl the other modules that can be used to construct MPICH, such as
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
dnl the communication device and the process manager.  Each of these
dnl may have special features or limitations that other modules or
dnl this configure may need to take into account.  To handle this, there
dnl are xx major steps in this configure script:
dnl
dnl 1. Identify major modules and source any prerequisite scripts
dnl 2. Determine compiler characteristics 
dnl 3. Setup and configure the other modules
dnl 4. Determine MPI features and characteristics (such as datatype values)
dnl
dnl Each of these is described in more detail below.
dnl
dnl 1. Identify the modules (most are specified by 
dnl --with-<modulename>=instance,
dnl for example, --with-pm=mpd or --with-device=ch3:nemesis).
29
dnl For each module, source the file mpichprereq if present (in the
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
dnl module's top-level directory).  This
dnl must be a bourne (sh) shell script; it can access any of the variables
dnl in the configure script.  In addition, there are a few variables that
dnl are defined and provided to allow the modules to communicate their 
dnl needs or limitations to the other modules.  These are:
dnl    MPID_MAX_THREAD_LEVEL - thread level supported by device.
dnl                            if unset, is MPI_THREAD_FUNNELED
dnl    MPID_NO_LONG_LONG     - if yes, the device does not support the 
dnl                            long long integer type
dnl    MPID_NO_LONG_DOUBLE   - if yes, the device does not support the
dnl                            long double type
dnl    MPID_PM_NAMESERVER    - if set, provides the name of the nameserver
dnl                            that the process manager supports.
dnl                            This name server will be used if the
dnl                            default name server is selected.
dnl    MPID_NO_PM            - If yes, the device does not require any
dnl                            PM implementation.  
dnl    MPID_NO_PMI           - If yes, the device does not require any 
dnl                            PMI implementation.
dnl    EXTRA_STATUS_DECL     - Any extra declarations that the device
dnl                            needs added to the definition of MPI_Status.
dnl    MPID_MAX_PROCESSOR_NAME - The maximum number of character in a processor
dnl                            name.  If not set, 128 will be used.
53
54
dnl    MPID_MAX_ERROR_STRING - The maximum number of character in an error
dnl                            string.  If not set, 1024 will be used.
55
56
57
58
dnl    MPID_LIBTOOL_STATIC_FLAG - The static compilation flag to use
dnl                               for the example executables within
dnl                               mpich.  If not set, -static will be
dnl                               used.
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
dnl    PMI_REQUIRES_READABLE_TOKENS - if yes, define the C-preprocessor
dnl                            value USE_HUMAN_READABLE_TOKENS, which is
dnl                            used in src/include/mpimem.h to define token
dnl                            separators used in src/util/mem/argstr.c
dnl    PM_REQUIRES_PMI       - if set, provides the name of the PMI 
dnl                            interface implementation.  If not set,
dnl                            the "simple" PMI implementation is used.
dnl                            A process manager that needs a particular
dnl                            process manager should check that this is
dnl                            not set to an incompatible value.
dnl    MPID_NO_SPAWN         - if yes, the device does not support the
dnl                            dynamic process routines (spawn, connect
dnl                            attach, join, plus port and publish 
dnl                            routines).  The major effect of this
dnl                            is to let the test codes know that
dnl                            spawn is not implemented.
dnl    MPID_NO_RMA           - if yes, the device does not support the
dnl                            MPI RMA routines (MPI_Win_create and 
dnl                            MPI_Put etc.).  The major effect of this
dnl                            is to let the test codes know that 
dnl                            RMA is not implemented.
dnl
dnl Note that the meanings of these variables are defined so that an 
dnl undefined value gives the default.  This makes it easy to expand
dnl the set of such variables, since only modules that need the new
dnl variable will need to be changed.
dnl
dnl 2. Determine compiler characteristics
dnl Here is where features of the compilers are determined, including
dnl support for shared libraries and sizes of the basic datatype types.
dnl
dnl 3. Setup and configure the other modules
dnl Before each module configure is executed, the script setup_<module>
dnl is run if present.  This is a bourne (sh) shell script and may
dnl access configure variables.  It should not make any changes to the
dnl compiler name or flags (e.g., do not add -D_XOPEN_SOURCE to CFLAGS here,
dnl because that may invalidate the determination of the compiler 
dnl characteristics in the prior step).
dnl
dnl 4. Determine MPI features
dnl    
dnl
dnl Special environment variables
dnl To let other scripts and in particular the configure in test/mpi
103
dnl know that they are being invoked from within the MPICH configure,
104
dnl the following environment variables are set and exported:
105
106
107
108
dnl    FROM_MPICH
dnl    MPICH_ENABLE_F77
dnl    MPICH_ENABLE_FC
dnl    MPICH_ENABLE_CXX
109
110
111
dnl
dnl Note that no executable statements are allowed (and any are silently 
dnl dropped) before AC_INIT.
112

113
114
m4_include([maint/version.m4])
dnl 2nd arg is intentionally underquoted
115
116
AC_INIT([MPICH],
        MPICH_VERSION_m4,
117
        [mpich-discuss@mcs.anl.gov],
118
        [mpich],
119
        [http://www.mpich.org/])
120

121
122
123
124
125
126
127
if test "x$prefix" != "xNONE" && test -d "$prefix"; then 
    if test "x`(cd \"$prefix\"; echo \"$PWD\")`" = "x`(cd \"$srcdir\"; echo \"$PWD\")`" ||\
       test "x`(cd \"$prefix\"; echo \"$PWD\")`" = "x$PWD"  ; then
        AC_MSG_ERROR([The install directory (--prefix=) cannot be the same as the build or src directory.])
    fi
fi         

128
129
130
CONFIGURE_ARGS_CLEAN=`echo $* | tr '"' ' '`
AC_SUBST(CONFIGURE_ARGS_CLEAN)

131
# these values come from the m4_include above
132
133
134
135
MPICH_VERSION=MPICH_VERSION_m4
AC_SUBST([MPICH_VERSION])
MPICH_RELEASE_DATE="MPICH_RELEASE_DATE_m4"
AC_SUBST([MPICH_RELEASE_DATE])
136
137
138
139
libmpich_so_version="libmpich_so_version_m4"
AC_SUBST([libmpich_so_version])


140
141
if test -z "$MPICH_VERSION" ; then
    AC_MSG_ERROR([MPICH_VERSION is empty, check maint/version.m4 for errors])
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
fi
# Produce a numeric version assuming the following format:
# Version: [MAJ].[MIN].[REV][EXT][EXT_NUMBER]
# Example: 1.0.7rc1 has
#          MAJ = 1
#          MIN = 0
#          REV = 7
#          EXT = rc
#          EXT_NUMBER = 1
#
# Converting to numeric version will convert EXT to a format number:
#          ALPHA (a) = 0
#          BETA (b)  = 1
#          RC (rc)   = 2
#          PATCH (p) = 3
# Regular releases are treated as patch 0
#
# Numeric version will have 1 digit for MAJ, 2 digits for MIN,
160
# 2 digits for REV, 1 digit for EXT and 2 digits for EXT_NUMBER.
161
changequote(<<,>>)
162
163
164
165
166
V1=`expr $MPICH_VERSION : '\([0-9]*\)\.[0-9]*\.*[0-9]*[a-zA-Z]*[0-9]*'`
V2=`expr $MPICH_VERSION : '[0-9]*\.\([0-9]*\)\.*[0-9]*[a-zA-Z]*[0-9]*'`
V3=`expr $MPICH_VERSION : '[0-9]*\.[0-9]*\.*\([0-9]*\)[a-zA-Z]*[0-9]*'`
V4=`expr $MPICH_VERSION : '[0-9]*\.[0-9]*\.*[0-9]*\([a-zA-Z]*\)[0-9]*'`
V5=`expr $MPICH_VERSION : '[0-9]*\.[0-9]*\.*[0-9]*[a-zA-Z]*\([0-9]*\)'`
167
changequote([,])
168

169
if test "$V2" -le 9 ; then V2=0$V2 ; fi
170
if test "$V3" = "" ; then V3=0; fi
171
if test "$V3" -le 9 ; then V3=0$V3 ; fi
172
173
174
175
176
177
178
179
180
181
182
183
if test "$V4" = "a" ; then
    V4=0
elif test "$V4" = "b" ; then
    V4=1
elif test "$V4" = "rc" ; then
    V4=2
elif test "$V4" = "" ; then
    V4=3
    V5=0
elif test "$V4" = "p" ; then
    V4=3
fi
184
if test "$V5" -le 9 ; then V5=0$V5 ; fi
185

186
187
MPICH_NUMVERSION=`expr $V1$V2$V3$V4$V5 + 0`
AC_SUBST(MPICH_NUMVERSION)
188

189
190
191
192
193
# ABIVERSION is the name used by simplemake, so we reassign the
# libmpich_so_version number to it
ABIVERSION=${libmpich_so_version}
export ABIVERSION
export libmpich_so_version
194
AC_SUBST(ABIVERSION)
195

196
# Print out the configure options
197
198
199
CONFIGURE_ARGUMENTS="$ac_configure_args"
AC_SUBST(CONFIGURE_ARGUMENTS)
if test -n "$ac_configure_args" ; then
200
    echo "Configuring MPICH version $MPICH_VERSION with $ac_configure_args"
201
else 
202
    echo "Configuring MPICH version $MPICH_VERSION"
203
fi
204

205
206
# Add the information on the system:
echo "Running on system: `uname -a`"
207

208
209
210
dnl Definitions will be placed in this file rather than in the DEFS variable
AC_CONFIG_HEADER(src/include/mpichconf.h)
AH_TOP([/* -*- Mode: C; c-basic-offset:4 ; -*- */
211
/*
212
213
214
215
216
217
 *  (C) 2001 by Argonne National Laboratory.
 *      See COPYRIGHT in top-level directory.
 */
#ifndef MPICHCONF_H_INCLUDED
#define MPICHCONF_H_INCLUDED
])
218
219
220
221
222

# We use an #include strategy here because all of the alternative strategies for
# quashing these variables have various drawbacks.  The alternatives are listed
# here to avoid rediscovery of these problems by someone else in the future:
#
223
# 1) Strategy: Rewrite mpichconf.h.in with sed at autogen.sh time.
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
#    Problem: Automatic remaking of config.status and friends will re-run
#             autoheader and blow away our sed changes without an opportunity to
#             patch the resulting file again.
# 2) Strategy: Add literal "#undef PACKAGE" lines to the AH_BOTTOM text.
#    Problem: These lines get rewritten by config.status to be "#define" lines,
#             so the intended quashing never actually occurs.
# 3) Strategy: Use AC_CONFIG_COMMANDS to run a sed rewrite command on
#              mpichconf.h at config.status time.
#    Problem: Causes mpichconf.h to always be rewritten, first by the normal
#             config.status commands and then by sed.  This can cause
#             unnecessary remaking of object files since nearly every C source
#             file includes this header (see the Autoconf Manual, "Automatic
#             Remaking")
#
# The only other plausible strategy would seem to be rewriting config.status
# itself via AC_CONFIG_COMMANDS_POST, but that seems error prone.  The best
# solution would be to stop all subconfigures from including config.h headers
# from other packages.  Then all of this nonsense can be eliminated.
# [goodell@ 2011-08-26]
AH_BOTTOM([
/* Include nopackage.h to undef autoconf-defined macros that cause conflicts in
 * subpackages.  This should not be necessary, but some packages are too
246
 * tightly intertwined right now (such as ROMIO and the MPICH core) */
247
248
249
250
#include "nopackage.h"

#endif /* !defined(MPICHCONF_H_INCLUDED) */
])
251
252
253
254

dnl Set the directory that contains support scripts such as install-sh and
dnl config.guess
AC_CONFIG_AUX_DIR(confdb)
255
256
dnl our macro dir is the same as our aux dir
AC_CONFIG_MACRO_DIR([confdb])
257

258
259
260
261
# Set the FROM_MPICH variable to tell subconfigures that they are
# built from within MPICH
FROM_MPICH=yes
export FROM_MPICH
262

263
264
265
# Save a copy of precious flags as USER_* before any of these flags
# are being modified by configure tests.
PAC_PREFIX_ALL_FLAGS(USER)
266
267

# WRAPPER_xFLAGS are used by mpicc and friends.
268
269
#
# WRAPPER_CFLAGS and other compile flags are used for compile options
270
# that are added by MPICH, but should be used by applications (such
271
272
# as include paths).
#
273
# All libraries that are detected by MPICH as needed for some of its
274
# functionality (such as -lpthread) should be added to LIBS so
275
# autoconf link tests can use them. Libraries that are built by MPICH
276
# at make time (and hence are not available for autoconf link tests to
277
# use), such as OPA and MPL, should be added to WRAPPER_LIBS for
278
279
280
# static builds. All libraries in LIBS are added to WRAPPER_LIBS
# (similarly LDFLAGS are added to WRAPPER_LDFLAGS) as well, at the end
# of configure.
281
PAC_PREFIX_ALL_FLAGS(WRAPPER)
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
WRAPPER_CFLAGS="$CFLAGS $MPICH_MPICC_FLAGS"
WRAPPER_CPPFLAGS="$CPPFLAGS $MPICH_MPICPP_FLAGS"
WRAPPER_CXXFLAGS="$CXXFLAGS $MPICH_MPICXX_FLAGS"
WRAPPER_FFLAGS="$FFLAGS $MPICH_MPIF77_FLAGS"
WRAPPER_FCFLAGS="$FCFLAGS $MPICH_MPIFC_FLAGS"
WRAPPER_LDFLAGS="$MPICH_LDFLAGS"
WRAPPER_LIBS="$MPICH_LIBS"

# Add MPICHLIB_* to the appropriate flags
AC_ARG_VAR(MPICHLIB_CFLAGS,
	[extra CFLAGS used in building MPICH libraries])
AC_ARG_VAR(MPICHLIB_CPPFLAGS,
	[extra CPPFLAGS used in building MPICH libraries])
AC_ARG_VAR(MPICHLIB_CXXFLAGS,
	[extra CXXFLAGS used in building MPICH libraries])
AC_ARG_VAR(MPICHLIB_FFLAGS,
	[extra FFLAGS used in building MPICH libraries])
AC_ARG_VAR(MPICHLIB_FCFLAGS,
	[extra FCFLAGS used in building MPICH libraries])
AC_ARG_VAR(MPICHLIB_LDFLAGS,
	[extra LDFLAGS used in building MPICH libraries])
AC_ARG_VAR(MPICHLIB_LIBS,
	[extra LIBS used in building MPICH libraries])
CFLAGS="$CFLAGS $MPICHLIB_CFLAGS"
CPPFLAGS="$CPPFLAGS $MPICHLIB_CPPFLAGS"
CXXFLAGS="$CXXFLAGS $MPICHLIB_CXXFLAGS"
FFLAGS="$FFLAGS $MPICHLIB_FFLAGS"
FCFLAGS="$FCFLAGS $MPICHLIB_FCFLAGS"
LDFLAGS="$LDFLAGS $MPICHLIB_LDFLAGS"
LIBS="$LIBS $MPICHLIB_LIBS"
312

313
314
315
316
317
318
319
dnl include all subsystem m4 fragments now that the core autoconf functionality
dnl has been setup.  No fragment should do anything except define
dnl PAC_SUBCFG_{PREREQ,BODY} macros which will be expanded later as
dnl appropriate
# begin subsys includes
m4_include([subsys_include.m4])
# end subsys includes
320

321
322
dnl ----------------------------------------------------------------------------
dnl setup top-level argument handling
323
AC_ARG_ENABLE(echo, 
324
325
326
	AC_HELP_STRING([--enable-echo], [Turn on strong echoing. The default is enable=no.]),
	set -x)

327
AC_ARG_ENABLE(error-checking,
328
329
330
331
332
[  --enable-error-checking=level
      Control the amount of error checking.  
        no        - no error checking
        runtime   - error checking controllable at runtime through environment 
                    variables
333
334
        all       - error checking always enabled (default)
],,enable_error_checking=default)
335

336
AC_ARG_ENABLE(error-messages,
337
338
339
340
341
342
343
344
[  --enable-error-messages=level - Control the amount of detail in error messages.
        all       - Maximum amount of information
        generic   - Only generic messages (no information about the specific
                    instance)
        class     - One message per MPI error class
        none      - No messages
],,enable_error_messages=all)

345
AC_ARG_ENABLE(timing,
346
347
348
349
350
351
352
[  --enable-timing=level - Control the amount of timing information
                           collected by the MPICH implementation.
        none    - Collect no data (default)
        all     - Collect lots of data
        runtime - Runtime control of data collected
],,enable_timing=default)

353
AC_ARG_ENABLE(g,
354
[  --enable-g=option - Control the level of debugging support in the
355
356
                       MPICH implementation.  "option" is a list of comma
                       separated names including.  Default is "most".
357
358
359
360
        none     - No debugging
        handle   - Trace handle operations
        handlealloc - Trace handle allocations
        dbg      - Add compiler flag, -g, to all internal
361
362
                   compiler flags, i.e. MPICHLIB_CFLAGS, MPICHLIB_CXXFLAGS,
                   MPICHLIB_FFLAGS, and MPICHLIB_FCFLAGS.
363
        debug    - Synonym for dbg
364
        instr    - Enable instrumentation
365
366
367
368
369
370
371
        log      - Enable debug event logging
        mem      - Memory usage tracing
        meminit  - Preinitialize memory associated structures and unions to
                   eliminate access warnings from programs like valgrind
        memarena - Check for overwrite errors in memory allocation arena
        mutex    - Enable error checking on pthread mutexes
        mutexnesting - Check for non-nesting of mutexes
372
373
374
        most     - Most of the above options, excluding some with severe
                   performance impacts.  Recommended for typical development.
        yes      - synonym for "most" (*not* "all")
375
376
377
        all      - All of the above choices
],,enable_g=none)

378
379
AC_ARG_ENABLE([mpit_pvars],
[--enable-mpit-pvars=list - Selectively enable MPI_T performance variables.
380
381
382
383
384
385
                         list is a comma-separated list of variable names,
                         including
        none     - No performance info recorded
        recvq    - All message queue-related
        nem      - All nemesis-related
        all      - All variables above
386
],[],[enable_mpit_pvars=all])
387

388
389
390
dnl We may want to force MPI_Aint to be the same size as MPI_Offset, 
dnl particularly on 32 bit systems with large (64 bit) file systems.
AC_ARG_WITH(aint-size,
391
392
393
	AC_HELP_STRING([--with-aint-size], [Override the size of MPI_AINT (in bytes)]),,
	with_aint_size=0)

394
AC_ARG_ENABLE(fast,
395
396
397
398
399
400
401
[  --enable-fast=option - Control the level of fast execution in the
                         MPICH implementation.  option is a list of
                         comma separated names including
        defopt   - Default compiler optimization -O2 for all language bindings,
                   i.e. --enable-fast=O2, when neither --enable-fast
                   nor --disable-fast is specified. (default)
        O<n>     - Appends default optimization flags, -O<n>, to all internal
402
403
                   compiler flags, i.e. MPICHLIB_CFLAGS, MPICHLIB_CXXFLAGS,
                   MPICHLIB_FFLAGS, and MPICHLIB_FCFLAGS.
404
405
        nochkmsg - No error checking, i.e. --disable-error-checking
        notiming - No timing collection, i.e. --disable-timing.
406
        ndebug   - Appends -DNDEBUG to MPICHLIB_CFLAGS.
407
        nompit   - Equivalent to "--disable-mpit-pvars".
408
409
410
411
412
        all|yes  - "defopt", "nochkmsg", "notiming" and "ndebug" are enabled
                   when --enable-fast is specified without any option.
        none     - None of above options, i.e. --disable-fast. Note that
                   --enable-strict will add the -O2 option even if
                   --enable-fast=none is given.
413
],,enable_fast=defopt)
414

415
AC_ARG_ENABLE(check-compiler-flags,
416
	AC_HELP_STRING([--enable-check-compiler-flags], [enable the checks for all compiler
417
                       options, xxxFLAGS, MPICH_xxxFLAGS. Default is on.]),,
418
		       enable_check_compiler_flags=yes)
419

420
421
dnl We enable f77 and fc if we can find compilers for them.
dnl In addition, we check whether f77 and fc can work together.
422
AC_ARG_ENABLE(f77,
423
	AC_HELP_STRING([--enable-f77], [Enable Fortran 77 bindings]),,enable_f77=yes)
424

425
AC_ARG_ENABLE(fc,
426
	AC_HELP_STRING([--enable-fc], [Enable Fortran 90 bindings]),,enable_fc=yes)
427

428
429
AC_ARG_ENABLE(f90,
	AC_HELP_STRING([--enable-f90],
430
431
432
433
434
		[Obsolete option: Use --enable-fc or --disable-fc instead]),
	[AC_MSG_ERROR([
--enable-f90 and --disable-f90 are NO longer valid configure options,
use --enable-fc or --disable-fc instead])]
)
435

436
AC_ARG_ENABLE(cxx,
437
	AC_HELP_STRING([--enable-cxx], [Enable C++ bindings]),,enable_cxx=yes)
438

439
AC_ARG_ENABLE(romio,
440
441
442
	AC_HELP_STRING([--enable-romio], [Enable ROMIO MPI I/O implementation]),,
	enable_romio=yes)

443
AC_ARG_ENABLE(debuginfo,
444
445
	AC_HELP_STRING([--enable-debuginfo], [Enable support for debuggers]),,
	enable_debuginfo=no)
446

447
448
449
450
451
452
453
454
455
456
457
458
459
460
461

## Enable creation of libtool-style versioning or no versioning
AC_ARG_ENABLE(versioning,
        [AC_HELP_STRING([--enable-versioning],[Enable library versioning])],,
        [enable_versioning=yes])

if test "$enable_versioning" = "yes" ; then
   ABIVERSIONFLAGS="-version-info \$(ABIVERSION)"
else
   ABIVERSIONFLAGS="-avoid-version"
fi
export ABIVERSIONFLAGS
AC_SUBST(ABIVERSIONFLAGS)


462
463
dnl The environment variable MPICH_DEBUGLIBNAME may be used to
dnl override the default name of the library that the debugger will
464
dnl load to access the MPICH internal data structures.
465

466
467
dnl "default" is a special device that allows MPICH to choose one
dnl based on the environment.
468
AC_ARG_WITH(device,
469
470
471
472
473
474
475
	AC_HELP_STRING([--with-device=name], [Specify the communication device for MPICH]),,
	with_device=default)

AC_ARG_WITH(pmi,
	AC_HELP_STRING([--with-pmi=name], [Specify the pmi interface for MPICH]),,
	with_pmi=default)

476
AC_ARG_WITH(pm, 
477
478
479
480
481
482
483
484
485
486
	AC_HELP_STRING([--with-pm=name],
		[Specify the process manager for MPICH.  "no" or "none" are
                 valid values.  Multiple process managers may be specified as
                 long as they all use the same pmi interface by separating them
                 with colons.  The mpiexec for the first named process manager
                 will be installed.  Example: "--with-pm=hydra:mpd:gforker"
                 builds the three process managers hydra, mpd and gforker;
                 only the mpiexec from hydra is installed into the bin
                 directory.]),,with_pm=default)

487
AC_ARG_WITH(logging,
488
489
490
	AC_HELP_STRING([--with-logging=name], [Specify the logging library for MPICH]),
	[if test -z "$withval" ; then with_logging=rlog ; fi],with_logging=none)

491
492
493
dnl The default option needs to be defined in terms of a specific choice 
dnl (runtime in this case).  Note that the default choice is the same as
dnl runtime only for certain devices - not for every device.
494
AC_ARG_ENABLE(threads,
495
496
497
498
499
500
[  --enable-threads=level - Control the level of thread support in the 
                           MPICH implementation.  The following levels
                           are supported.
        single          - No threads (MPI_THREAD_SINGLE)
        funneled        - Only the main thread calls MPI (MPI_THREAD_FUNNELED)
        serialized      - User serializes calls to MPI (MPI_THREAD_SERIALIZED)
501
502
503
504
505
506
507
508
        runtime         - The level of thread support is determined by 
                          the arguments to MPI_Init_thread, with
                          MPI_THREAD_MULTIPLE available.  The default option
                          for many communication devices.
        multiple        - Fully multi-threaded (MPI_THREAD_MULTIPLE) always. 
                          DO NOT select this option. The option runtime is more
                          efficient and also supports thread_multiple. 
                          (multiple aliased to runtime now)
509
510
511
512

        See also the --enable-thread-cs option for controlling the granularity of
        the concurrency inside of the library
],,enable_threads=default)
513

514
AC_ARG_ENABLE(thread-cs,
515
516
517
518
519
	AC_HELP_STRING([--enable-thread-cs=type],
			[Choose the method used for critical sections
                         and other atomic updates when multiple
                         threads are present.  Values may be global
                         (default), per-object, lock-free]),,enable_thread_cs=global)
520

521
AC_ARG_ENABLE(refcount,
522
523
524
525
526
527
528
529
530
531
532
533
	AC_HELP_STRING([--enable-refcount=type],
			[Choose the method for ensuring atomic updates
                         to the reference counts for MPI objects.
                         Values may be lock, lock-free, none.  The
                         default depends on the thread-cs choice; for
                         global it is none (because none is required),
                         for per-object it is lock, and for lock-free
                         it is lock-free]),,enable_refcount=default)

AC_ARG_ENABLE(mutex-timing,
	AC_HELP_STRING([--enable-mutex-timing], [calculate the time spent waiting on mutexes]),
	AC_DEFINE(MPIU_MUTEX_WAIT_TIME,1,[Define to enable timing mutexes]))
534

535
AC_ARG_ENABLE(handle-allocation,
536
537
538
539
540
	AC_HELP_STRING([--enable-handle-allocation=type],
			[Choose the method used for allocating MPI
			 object handles.  Values may be 'tls' for
			 thread-local storage or 'mutex' for simple
			 locking.  'mutex' is the default.]),,enable_handle_allocation=default)
541

542
AC_ARG_ENABLE([predefined-refcount],
543
544
545
546
	AS_HELP_STRING([--enable-predefined-refcount],
                       [control whether predefined objects like
		       MPI_COMM_WORLD are reference counted (default
		       depends on --enable-thread-cs choice)]),[],
547
548
              [enable_predefined_refcount=default])

549
AC_ARG_ENABLE(weak-symbols,
550
551
552
553
	AC_HELP_STRING([--enable-weak-symbols],
			[Use weak symbols to implement PMPI routines (default)]),,
		enable_weak_symbols=yes)

554
555
556
557
558
559
AC_ARG_ENABLE([two-level-namespace],
              [AS_HELP_STRING([--enable-two-level-namespace],
                              [(Darwin only) Build shared libraries and programs
                               built with the mpicc/mpif77/etc. compiler
                               wrappers with '-Wl,-commons,use_dylibs' and
                               without '-Wl,-flat_namespace'.  This may make the
560
                               MPICH installation and MPI programs more
561
562
563
564
565
566
                               compatible with other libraries.  Only enable
                               this option if you really know what these linker
                               options imply.])],
              [],
              [enable_two_level_namespace=no])

Anthony Chan's avatar
Anthony Chan committed
567
AC_ARG_ENABLE(multi-aliases,
568
569
570
571
	AC_HELP_STRING([--enable-multi-aliases],
		[Multiple aliasing to support multiple fortran compilers (default)]),,
		enable_multi_aliases=yes)

572
573
574
575
576
577
578
579
580
581
582
583
AC_ARG_ENABLE([wrapper-rpath],
              [AC_HELP_STRING([--enable-wrapper-rpath],
                              [Determine whether the rpath is set when programs
                               are linked by mpicc compiler wrappers.  This only
                               applies when shared libraries are built.  The
                               default is yes; use --disable-wrapper-rpath to
                               turn this feature off.  In that case, shared
                               libraries will be found according to the rules
                               for your system (e.g., in LD_LIBRARY_PATH)])],
              [],[enable_wrapper_rpath=yes])
AC_SUBST([enable_wrapper_rpath])

584
585
586
587
588
589
590
591
592
593
AC_ARG_ENABLE([long-double],
              [AC_HELP_STRING([--disable-long-double],
                              [Pass --disable-long-double to prevent the MPI
                               library from supporting the C "long double" type,
                               even if the C compiler supports it.  "long
                               double" support is enabled by default, provided
                               the compiler supports it.])],
              [],
              [enable_long_double=yes])

594
AC_ARG_WITH(cross,
595
596
	AC_HELP_STRING([--with-cross=file],
		[Specify the values of variables that configure cannot
597
598
599
600
601
602
                 determine in a cross-compilation environment]),,
		 with_cross=$MPID_DEFAULT_CROSS_FILE)
if test -z "$with_cross" ; then with_cross=no ; fi
if test "$with_cross" != "no"; then
  AC_MSG_NOTICE([Using cross file: $with_cross])
fi
603

604
AC_ARG_WITH(namepublisher,
605
606
607
608
609
610
611
[  --with-namepublisher=name   Choose the system that will support 
                              MPI_PUBLISH_NAME and MPI_LOOKUP_NAME.  Options
                              include
                                   no (no service available)
                                   mpd
			           file[:directory] (optional directory)
                                   pmi],,with_namepublisher=default)
612
613
614
AC_ARG_WITH(name-publisher,
    [],
    with_namepublisher=$with_name_publisher,)
615
616
617

AC_SUBST(MPIFLIBNAME)
AC_SUBST(PMPIFLIBNAME)
618

619
620
dnl The default is a special wrapper library
AC_ARG_WITH(fwrapname,
621
622
623
	AC_HELP_STRING([--with-fwrapname=name],
		[Specify name of library containing Fortran interface routines]),
	[FWRAPNAME=$withval;set_FWRAPNAME="yes"],FWRAPNAME=fmpich)
624
AC_SUBST(FWRAPNAME)
625

626
627
628
629
630
631
632
dnl The default is a special wrapper library
AC_ARG_WITH(fcwrapname,
	AC_HELP_STRING([--with-fcwrapname=name],
		[Specify name of library containing Fortran 90 interface routines]),
	[FCWRAPNAME=$withval;set_FCWRAPNAME="yes"],FCWRAPNAME=mpichf90)
AC_SUBST(FCWRAPNAME)

633
634
635
636
# Find a C compiler.
# We also need to do this before the F77 and FC test to ensure that we
# find the C preprocessor reliably.
PAC_PROG_CC
637
AM_PROG_CC_C_O dnl needed for automake "silent-rules"
638
639
640
641
642
643
644
645
646
647
648
649
650
PAC_PUSH_FLAG([CFLAGS])
AC_PROG_CPP
# Bug in autoconf.  Restore cross settings
if test "$pac_cross_compiling" = "yes" -a "$ac_cv_prog_cc_cross" = "no" ; then
    AC_MSG_RESULT([Resetting cross compilation to yes])
    cross_compiling=yes
    ac_cv_prog_cc_cross=yes
    ac_cv_prog_f77_cross=yes
    ac_cv_prog_fc_cross=yes
    ac_cv_prog_cxx_cross=yes
fi
PAC_POP_FLAG([CFLAGS])

651
dnl now that autoconf and core compilers are setup, init automake and libtool
652
653
654
655
656
dnl
dnl We would like to pass -Werror, but we are cheating in the "examples/"
dnl directory and overriding the user-flags like CFLAGS, which automake-1.12
dnl warns about.  Long-term we may need to use a hand-written Makefile.in or
dnl something else in this special dir.
657
AM_INIT_AUTOMAKE([-Wall -Wno-portability-recursive foreign 1.12.3 silent-rules subdir-objects])
658
AM_MAINTAINER_MODE([enable])
659

660
AM_PROG_AR
661

662
LT_INIT()
663
664
665
# Non-verbose make by default
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

666
667
668
669
670
671
# Disable rpath in the compiler wrappers if shared libraries are disabled, since
# rpath makes no sense in the context of static libraries.
if test "X$enable_shared" = "Xno" ; then
    enable_wrapper_rpath=no
fi

672
dnl AC_PROG_{CXX,F77,FC} must come early in configure.ac in order to avoid some
673
674
675
676
677
678
dnl esoteric autoconf macro expansion errors
dnl
dnl Also, DO NOT attempt to place shell conditionals (either manually or via
dnl AS_IF) around these macros in an effort to save configure time.  It will
dnl lead to weird AM_CONDITIONAL errors and potentially other problems.

679
# Before attempting to find valid compilers, set the corresponding precious
680
681
682
683
684
685
686
# shell variable to "no" for any languages that have been disabled by the user
# with "--disable-LANG".  Libtool understands this as a request to disable
# support for this language. This should save a bit of configure time and also
# prevent user complaints like ticket #1570.
AS_IF([test "x$enable_f77" = "xno"],[F77=no])
AS_IF([test "x$enable_fc"  = "xno"],[FC=no])
AS_IF([test "x$enable_cxx" = "xno"],[CXX=no])
687

688
689
690
691
692
693
694
695
696
697
698
699
700
# suppress default "-g -O2" from AC_PROG_CXX
: ${CXXFLAGS=""}
AC_PROG_CXX([PAC_CXX_SEARCH_LIST])

# suppress default "-g -O2" from AC_PROG_F77
: ${FFLAGS=""}
AC_PROG_F77([PAC_F77_SEARCH_LIST])

# suppress default "-g -O2" from AC_PROG_FC
: ${FCFLAGS=""}
AC_PROG_FC([PAC_FC_SEARCH_LIST])


701
702
703
# compute canonical system types
AC_CANONICAL_BUILD
AC_CANONICAL_HOST
704
# TARGET not needed, MPICH isn't a compiler
705
706
707
708
709
710
711
712

# Enable better caching control
PAC_ARG_CACHING

# Set CFLAGS for enable strict if necessary.  Do this *first* because
# it may influence the output of the other tests
PAC_ARG_STRICT

713
714
# -----------------------------------------------------------------------------
# First check that we have a clean build if we are doing a VPATH build
715
PAC_VPATH_CHECK(src/include/mpi.h src/env/mpicc,lib)
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742

# ----------------------------------------------------------------------------
# This test is complicated by the fact that top_srcdir is not set until
# the very end of configure.  Instead, we get it ourselves
if test -z "$top_srcdir" ; then
   use_top_srcdir=$srcdir   
else
   use_top_srcdir=$top_srcdir
fi
if test -z "$master_top_srcdir" ; then 
    # This needs to be an absolute pathname
    case "$use_top_srcdir" in
    /*) ;;
    *)
        use_top_srcdir=`(cd $use_top_srcdir && pwd)`
	;;	
    esac
    master_top_srcdir=$use_top_srcdir
fi
# Get the directory that we're running in...
if test -z "$master_top_builddir" ; then
   master_top_builddir="`pwd`"
fi
AC_SUBST(master_top_builddir)
AC_SUBST(master_top_srcdir)
export master_top_builddir
export master_top_srcdir
743

744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
# ----------------------------------------------------------------------------
dnl Export important "precious" variables so that any directories configured via
dnl PAC_CONFIG_SUBDIR will agree with the top-level configure about these
dnl critical variables (esp. compiler selection).  These exports should come
dnl before any subconfigures in this script.
dnl
dnl This list is arguably incomplete, and should possibly be automatically
dnl generated from "$ac_precious_vars" using code similar to the implementation
dnl of PAC_CONFIG_SUBDIR.
dnl
dnl To be clear, without these exports any variable values determined by this
dnl configure script will not be seen by child scripts.  Instead they will dnl
dnl receive the only the original inherited environment and configure args used
dnl when this configure script was invoked.
export AR
export AR_FLAGS
export CC
export CFLAGS
export CPPFLAGS
export CXX
export CXXFLAGS
export F77
export FC
export FCFLAGS
export FFLAGS
export LDFLAGS
export LIBS
export MPILIBNAME
export PMPILIBNAME
export RANLIB
774
export OPALIBNAME
775
export MPLLIBNAME
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
# ----------------------------------------------------------------------------
# with-device
if test "$with_device" = "default" ; then
    # Pick the device.  For now, always choose ch3
    with_device=ch3
fi
# Extract the device name from any options
# Allow the device to specify a directory; if no directory, use the
# included directories
# 
DEVICE=$with_device
AC_SUBST(DEVICE)

device_name=`echo $with_device | sed -e 's/:.*$//'`
changequote(<<,>>)
device_args=`echo $with_device | sed -e 's/^[^:]*//' -e 's/^://'`
changequote([,])

devicedir=$use_top_srcdir/src/mpid/$device_name
devicereldir=src/mpid/$device_name
case "$device_name" in
     /*) 
     devicedir=$DEVICE
     # Get the name from the leaf
     device_name=`echo $device_name ~ sed -e 's%.*/%%'`
     # FIXME: should the devicereldir be different (perhaps not -
     # this allows use to build within our tree, even when other data
     # is outside of the tree)
     ;;
     *) 
     ;;
esac
export device_name
export device_args
export devicedir

812
# See if the device wants to say something about the compilers
813
814
if test -f $devicedir/mpichprereq ; then
    . $devicedir/mpichprereq
815
816
fi

817
818
819
# expand all of the prereq macros in the correct order
m4_map([PAC_SUBCFG_DO_PREREQ], [PAC_SUBCFG_MODULE_LIST])

820
821
# ----------------------------------------------------------------------------
# Set default library names if names haven't already been provided
822
823
824
AC_ARG_VAR([MPILIBNAME],[can be used to override the name of the MPI library (default: "mpich")])
AC_ARG_VAR([PMPILIBNAME],[can be used to override the name of the MPI profiling library (default: "p$MPILIBNAME")])
AC_ARG_VAR([MPICXXLIBNAME],[can be used to override the name of the MPI C++ library (default: "${MPILIBNAME}cxx")])
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
MPILIBNAME=${MPILIBNAME:-"mpich"}
PMPILIBNAME_set=no
if test -n "$PMPILIBNAME" ; then 
   PMPILIBNAME_set=yes
fi
PMPILIBNAME=${PMPILIBNAME:-"p$MPILIBNAME"}
# Note that the name for this library may be updated after we check for 
# enable_shmem
# Fortran names are set later.
# We use a different library for the C++ wrappers to avoid problems when
# creating shared libraries
if test -z "$MPICXXLIBNAME" ; then MPICXXLIBNAME="${MPILIBNAME}cxx" ; fi
export MPIFLIBNAME
export PMPIFLIBNAME
export MPICXXLIBNAME
AC_SUBST(MPICXXLIBNAME)

# We'll set FORTRAN_BINDING to 1 if we support Fortran 
FORTRAN_BINDING=0

845
846
847
848
# Set up default compiler optimization
MPI_DEFAULT_COPTS="-O2"
MPI_DEFAULT_CXXOPTS="-O2"
MPI_DEFAULT_FOPTS="-O2"
849
MPI_DEFAULT_FCOPTS="-O2"
850
851
852
853
854
855
856
857

# enable-fast
# strip off multiple options, separated by commas
save_IFS="$IFS"
IFS=","
for option in $enable_fast ; do
    case "$option" in
        defopt)
858
        enable_default_optimize=yes
859
        ;;
860
861
862
863
864
        nochkmsg)
        enable_fast_nochkmsg=yes
        ;;
        notiming)
        enable_timing=no
865
866
867
868
        ;;
        ndebug)
        enable_append_ndebug=yes
        ;;
869
870
871
        nompit)
        enable_mpit_pvars=no
        ;;
872
873
874
875
876
877
878
#
# [BRT] removed the reseting of enable_g so that --with-enable=dbg,meminit
# can be specified with -enable-fast.  This change was largely made for the
# PETSc folks who want to use --enable-fast to eliminate parameter checking
# overhead, but also wish to use meminit to eliminate initialization
# warnings from valgrind.
#
879
        all|yes)
880
881
882
883
        enable_default_optimize=yes
        enable_fast_nochkmsg=yes
        # Disable timing/logging stuffs
        enable_timing=no
884
885
886
        enable_append_ndebug=yes
        ;;
        O*)
887
        # Allows O<n> where <n> can be [0-9] or ' '.
888
889
        opt_flags=`echo $option | sed -e 's%\(O[0-9] \)%\1%g'`
        if test -n "$opt_flags" ; then
890
            enable_default_optimize=yes
891
892
893
            MPI_DEFAULT_COPTS="-$option"
            MPI_DEFAULT_CXXOPTS="-$option"
            MPI_DEFAULT_FOPTS="-$option"
894
            MPI_DEFAULT_FCOPTS="-$option"
895
        else
896
	    IFS="$save_IFS"
897
            AC_MSG_WARN([Unknown value $option for --enable-fast])
898
	    IFS=","
899
900
        fi
        ;;
901
        none|no)
902
903
904
905
        enable_default_optimize=no
        enable_fast_nochkmsg=no
        # Reset timing/logging stuffs to when --enable-timing isn't specified.
        enable_timing=default
906
907
908
        enable_append_ndebug=no
        ;;
        *)
909
	IFS="$save_IFS"
910
        AC_MSG_WARN([Unknown value $option for --enable-fast])
911
	IFS=","
912
913
914
915
916
        ;;
    esac
done
IFS="$save_IFS"

917
918
919
# ----------------------------------------------------------------------------
# Process any enable or with values
# We must do enable-fast first, because it changes the other enable values
920
if test "$enable_fast_nochkmsg" = "yes" ; then
921
    # 
922
    if test "$enable_error_checking" != "default" -a "$enable_error_checking" != "no" ; then
923
924
        AC_MSG_ERROR([enable-fast overrides enable-error-checking; error-checking option $enable_error_checking ignored])
    fi
925
926
927
928
929
930
931
932
    enable_error_checking=no
    # Export a variable that will allow the test suite to detect that
    # MPICH has no error testing
    MPICH_FAST=yes
    export MPICH_FAST
fi

# error-checking
933
934
935
936
# Change default into the specific value of the default
if test "$enable_error_checking" = "default" ; then
   enable_error_checking=all
fi
937
938
# glue_romio.h needs the variable HAVE_ERROR_CHECKING to have the value 0 or 1
HAVE_ERROR_CHECKING=0
939
940
case "$enable_error_checking" in 
    no)
941
    # if error checking has been disabled, then automatically disable the error
942
943
944
945
946
947
948
949
    # checking tests in the test suite
    ac_configure_args="${ac_configure_args} --disable-checkerrors"
    ;;
    all|yes|runtime)
    error_checking_kind=`echo $enable_error_checking | \
    tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    error_checking_kind=MPID_ERROR_LEVEL_$error_checking_kind
    AC_DEFINE_UNQUOTED(HAVE_ERROR_CHECKING,$error_checking_kind,[Define to enable error checking])
950
    HAVE_ERROR_CHECKING=1
951
952
953
954
955
    ;;
    *)
    AC_MSG_WARN([Unknown value $enable_error_checking for enable-error-checking])
    ;;
esac
956
# permit @HAVE_ERROR_CHECKING@ substitution in glue_romio.h 
957
AC_SUBST([HAVE_ERROR_CHECKING])
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978

# error-messages
case "$enable_error_messages" in 
    no|none)
        error_message_kind="MPICH_ERROR_MSG_NONE"
    ;;
    all|yes)
	error_message_kind="MPICH_ERROR_MSG_ALL"
    ;;
    generic)
	error_message_kind="MPICH_ERROR_MSG_GENERIC"
    ;;
    class)
	error_message_kind="MPICH_ERROR_MSG_CLASS"
    ;;
    *)
    AC_MSG_WARN([Unknown value $enable_error_messages for enable-error-messages])
    ;;
esac
AC_DEFINE_UNQUOTED(MPICH_ERROR_MSG_LEVEL,$error_message_kind,[define to enable error messages])

979
# ----------------------------------------------------------------------------
980
981
982
#
# enable-timing and with-logging
#
983
# Still to do: add subsets: e.g., class=pt2pt,class=coll.  See mpich doc
984
985
986
987
988
989
990
991
992
#
# Logging and timing are intertwined.  If you select logging, you
# may also need to select a timing level.  If no timing is selected 
# but logging with rlog is selected, make "all" the default timing level.
#
# FIXME: make timing and logging options work more cleanly together,
# particularly when other logging options are selected (e.g., logging is not
# rlog).
# ----------------------------------------------------------------------------
993
AM_CONDITIONAL([BUILD_LOGGING_RLOG],[test "X$with_logging" = "Xrlog"])
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
collect_stats=false
logging_required=false
if test "$enable_timing" = "default" ; then
    if test "$with_logging" = "rlog" ; then
        enable_timing=all
    fi
fi
timing_name=$enable_timing
case "$enable_timing" in
    no)
    timing_name=none
    ;;
    time)
    collect_stats=true
    ;;
    log|log_detailed)
    logging_required=true
    ;;
    yes)
    timing_name=all
    collect_stats=true
    logging_required=true
    ;;
    all|runtime)
    collect_stats=true
    logging_required=true
    ;;
    none|default)
    timing_name=none
    ;;
    *)
    AC_MSG_WARN([Unknown value $enable_timing for enable-timing])
    enable_timing=no
    timing_name=none
    ;; 
esac
#
# The default logging package is rlog; you can get it by 
# specifying --with-logging or --with-logging=rlog
#
case $with_logging in 
    yes)
    logging_name=rlog
    ;;
    no|none)
    logging_name=none
    ;;
    default)
    if test "$logging_required" = "true" ; then
        logging_name=rlog
    else
        logging_name=none
    fi
    ;;
    *)
    logging_name=$with_logging
    ;;
esac
# 
# Include the selected logging subsystem
#
# Choices:
# 1) A subdir of src/util/logging
#     This directory must contain a configure which will be executed
#     to build the 
# 2) An external directory
#     This directory must contain 
#          a mpilogging.h file
#     It may contain 
#          a setup_logging script
#          a configure
#     
#   
logging_subsystems=
if test "$logging_name" != "none" ; then
    # Check for an external name (directory containing a /)
    hasSlash=`echo A$logging_name | sed -e 's%[[^/]]%%g'`
    if test -n "$hasSlash" ; then
        # Check that the external logging system is complete.
	# Any failure will cause configure to abort
        if test ! -d $logging_name ; then
	    AC_MSG_ERROR([External logging directory $logging_name not found.  Configure aborted])
	    logging_name=none
        elif test ! -s $logging_name/mpilogging.h ; then
	    AC_MSG_ERROR([External logging header $logging_name/mpilogging.h not found.  Configure aborted])
	    logging_name=none
        fi

        logdir=$logging_name
	# Force the logdir to be absolute
	logdir=`cd $logdir && pwd`
1085
	# Switch name to "external" because that is how the MPICH
1086
1087
1088
1089
	# code will know it
	logging_name=external
	# Add the dir to the include paths
	#CPPFLAGS="$CPPFLAGS -I$logdir"
1090
	CPPFLAGS="$CPPFLAGS -I$logdir"
1091
1092
1093
1094
1095
1096
	# Add to the list of external modules to setup
	if test -x $logdir/setup_logging ; then
	     EXTERNAL_SETUPS="$EXTERNAL_SETUPS $logdir/setup_logging"
	fi
    else
        logdir=$srcdir/src/util/logging
1097
1098
        logreldir=src/util/logging/$logging_name
        logging_subsystems="$logging_subsystems $logreldir"
1099
        for dir in $logging_name ; do
1100
1101
1102
1103
1104
1105
1106
            if test ! -d $logdir/$dir ; then
	        AC_MSG_ERROR([$logdir/$dir does not exist.  Configure aborted])
	        logging_name=none
            fi
        done
        for dir in $logging_subsystems ; do
            if test ! -x $srcdir/$dir/configure ; then
1107
	        AC_MSG_ERROR([$srcdir/$dir has no configure (required).  Configure aborted])
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
	        logging_name=none
            fi
        done
    fi
fi
#
# FIXME: Logging doesn't necessarily require timing (e.g., simply logging the 
# sequence of routines).  
if test "$logging_name" != "none" ; then
    if test "$enable_timing" != "no" ; then
	if test "$enable_timing" = "default" -o "$enable_timing" = "none" ; then
	    enable_timing=log
	    timing_name=log
    	fi
	subsystems="$subsystems $logging_subsystems"
    else
	AC_MSG_WARN([Timing was disabled.  Logging has been disabled as well.])
	with_logging=no
	logging_name=none
    fi
else
    if test "$logging_required" = "true" ; then
	AC_MSG_WARN([Timing was enabled with log option but no logging library is available.  Timing has been disabled.])
	enable_timing=no
	timing_name=none
    fi
fi
if test "$timing_name" != "none" ; then
    timing_kind=`echo $timing_name | \
       tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
    timing_kind=MPID_TIMING_KIND_$timing_kind
    AC_DEFINE_UNQUOTED(HAVE_TIMING,$timing_kind,[define to enable timing collection])
    if test "$collect_stats" = "true" ; then
        AC_DEFINE(COLLECT_STATS,1,[define to enable collection of statistics])
    fi
fi
1144

1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
use_logging_variable="MPID_LOGGING_`echo $logging_name | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`"
AC_DEFINE_UNQUOTED(USE_LOGGING,$use_logging_variable,[define to choose logging library])
# ----------------------------------------------------------------------------
# End of logging tests
# ----------------------------------------------------------------------------

# ----------------------------------------------------------------------------
# Check to see if the device does not support spawn.  
# FIXME: This should provide the option of not building the dynamic
# process routines.  It could also allow us to specialize support
# for all processes are members of MPI_COMM_WORLD (only one comm_world).
# ----------------------------------------------------------------------------
if test "$MPID_NO_SPAWN" = yes ; then
    AC_MSG_WARN([The device $with_device does not support MPI dynamic process routines])   
fi

1161
# MPL
1162
1163
1164
1165
AC_ARG_VAR([MPLLIBNAME],[can be used to override the name of the MPL library (default: "mpl")])
MPLLIBNAME=${MPLLIBNAME:-"mpl"}
export MPLLIBNAME
AC_SUBST(MPLLIBNAME)
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
AC_ARG_WITH([mpl-prefix],
            [AS_HELP_STRING([[--with-mpl-prefix[=DIR]]],
                            [use the MPL library installed in DIR,
                             rather than the one included in src/mpl.  Pass
                             "embedded" to force usage of the MPL source
                             distributed with MPICH2.])],
            [],dnl action-if-given
            [with_mpl_prefix=embedded]) dnl action-if-not-given
mpldir=""
AC_SUBST([mpldir])
mplsrcdir=""
AC_SUBST([mplsrcdir])
mpllibdir=""
AC_SUBST([mpllibdir])
if test "$with_mpl_prefix" = "embedded" ; then
    PAC_CONFIG_SUBDIR(src/mpl,,AC_MSG_ERROR(MPL configure failed))
    PAC_PREPEND_FLAG([-l${MPLLIBNAME}], [WRAPPER_LIBS])
    PAC_APPEND_FLAG([-I${master_top_builddir}/src/mpl/include], [CPPFLAGS])
    PAC_APPEND_FLAG([-I${use_top_srcdir}/src/mpl/include], [CPPFLAGS])

    mpllibdir="${master_top_builddir}/src/mpl"
    mplsrcdir="${master_top_builddir}/src/mpl"
else
    # The user specified an already-installed MPL; just sanity check, don't
    # subconfigure it
    AS_IF([test -s "${with_mpl_prefix}/include/mplconfig.h"],
          [:],[AC_MSG_ERROR([the MPL installation in "${with_mpl_prefix}" appears broken])])
    PAC_APPEND_FLAG([-I${with_mpl_prefix}/include],[CPPFLAGS])
    PAC_PREPEND_FLAG([-l${MPLLIBNAME}],[WRAPPER_LIBS])
    PAC_APPEND_FLAG([-L${with_mpl_prefix}/lib],[WRAPPER_LDFLAGS])
    mpllibdir="${with_mpl_prefix}/lib"
fi
1198

1199
# OpenPA
1200
1201
1202
1203
AC_ARG_VAR([OPALIBNAME],[can be used to override the name of the OpenPA library (default: "opa")])
OPALIBNAME=${OPALIBNAME:-"opa"}
export OPALIBNAME
AC_SUBST(OPALIBNAME)
1204
1205
1206
1207
1208
AC_ARG_WITH([openpa-prefix],
            [AS_HELP_STRING([[--with-openpa-prefix[=DIR]]],
                            [use the OpenPA atomics library installed in DIR,
                             rather than the one included in src/openpa.  Pass
                             "embedded" to force usage of the OpenPA source
1209
                             distributed with MPICH.])],
1210
1211
1212
            [],
            [# see if OPA is already installed on the system
             PAC_PUSH_FLAG([LIBS])
1213
             PAC_PREPEND_FLAG([-l${OPALIBNAME}],[LIBS])
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
             AC_LINK_IFELSE([AC_LANG_PROGRAM([dnl
#include "opa_primitives.h"
],[
OPA_int_t i;
OPA_store_int(i,10);
OPA_fetch_and_incr_int(&i,5);
])dnl
                             ],
                            [with_openpa_prefix=system],[with_openpa_prefix=embedded])
             PAC_POP_FLAG([LIBS])
             ])

1226
1227
1228
1229
1230
opasrcdir=""
AC_SUBST([opasrcdir])
opalibdir=""
AC_SUBST([opalibdir])

1231
1232
if test "$with_openpa_prefix" = "embedded" ; then
    if test -e "${use_top_srcdir}/src/openpa" ; then
1233
1234
        opasrcdir="${master_top_builddir}/src/openpa"
        opalibdir="${master_top_builddir}/src/openpa/src"
1235
1236
1237
        PAC_APPEND_FLAG([-I${use_top_srcdir}/src/openpa/src],[CPPFLAGS])
        PAC_APPEND_FLAG([-I${master_top_builddir}/src/openpa/src],[CPPFLAGS])

1238
        # OPA defaults to "auto", but in MPICH we want "auto_allow_emulation" to
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
        # easily permit using channels like ch3:sock that don't care about atomics
        AC_ARG_WITH([atomic-primitives],
                    [AS_HELP_STRING([--with-atomic-primitives],
                                    [Force OPA to use a specific atomic primitives
                                     implementation.  See the src/openpa directory
                                     for more info.])],
                    [],[with_atomic_primitives=not_specified])
        opa_subdir_args=""
        if test "$with_atomic_primitives" = "not_specified" ; then
            opa_subdir_args="--with-atomic-primitives=auto_allow_emulation"
        fi
1250
        PAC_CONFIG_SUBDIR_ARGS([src/openpa],[$opa_subdir_args],[],[AC_MSG_ERROR([OpenPA configure failed])])
1251
        PAC_PREPEND_FLAG([-l${OPALIBNAME}],[WRAPPER_LIBS])
1252
1253
    else
        AC_MSG_WARN([Attempted to use the embedded OpenPA source tree in "src/openpa", but it is missing.  Configuration or compilation may fail later.])
1254
    fi
1255
elif test "$with_openpa_prefix" = "system" ; then
1256
    PAC_PREPEND_FLAG([-l${OPALIBNAME}],[WRAPPER_LIBS])
1257
elif test "$with_openpa_prefix" = "no" ; then
1258
    # The user doesn't want to use OPA.  This may or may not cause MPICH to
1259
1260
1261
1262
1263
1264
1265
1266
    # fail to configure/build, depending on many other factors.
    :
else
    # The user specified an already-installed OPA; just sanity check, don't
    # subconfigure it
    AS_IF([test -s "${with_openpa_prefix}/include/opa_primitives.h" -a -s "${with_openpa_prefix}/include/opa_config.h"],
          [:],[AC_MSG_ERROR([the OpenPA installation in "${with_openpa_prefix}" appears broken])])
    PAC_APPEND_FLAG([-I${with_openpa_prefix}/include],[CPPFLAGS])
1267
    PAC_PREPEND_FLAG([-l${OPALIBNAME}],[WRAPPER_LIBS])
1268
1269
    if test -d ${with_openpa_prefix}/lib64 ; then
        PAC_APPEND_FLAG([-L${with_openpa_prefix}/lib64],[WRAPPER_LDFLAGS])
1270
1271
1272
        opalibdir="${with_openpa_prefix}/lib64"
    else
        opalibdir="${with_openpa_prefix}/lib"
1273
1274
    fi
    PAC_APPEND_FLAG([-L${with_openpa_prefix}/lib],[WRAPPER_LDFLAGS])
1275
1276
fi

1277
1278
1279
1280
1281
1282
# ----------------------------------------------------------------------------
# Threads
# ----------------------------------------------------------------------------
#
# Threads must be supported by the device.  First, set the default to
# be the highest supported by the device
1283
if test "$enable_threads" = "yes" ; then enable_threads=default ; fi
1284
if test "$enable_threads" = default ; then
1285
    # XXX DJG bug is here, PREREQ is not being used right now
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
    if test -n "$MPID_MAX_THREAD_LEVEL" ; then
        case $MPID_MAX_THREAD_LEVEL in
            MPI_THREAD_SINGLE)     enable_threads=single ;;
            MPI_THREAD_FUNNELED)   enable_threads=funneled ;;
            MPI_THREAD_SERIALIZED) enable_threads=serialized ;;
            MPI_THREAD_MULTIPLE)   enable_threads=runtime ;;
            *) AC_MSG_ERROR([Unrecognized thread level from device $MPID_MAX_THREAD_LEVEL])
    	    ;;
        esac
    else
        enable_threads=single
    fi
fi

1300
1301
if test "$enable_threads" = "default" ; then
    enable_threads=runtime
1302
1303
1304
elif test "$enable_threads" = "no" ; then
    enable_threads=single
fi
1305

1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
# Runtime is an alias for multiple with an additional value
if test "$enable_threads" = "runtime" ; then
    AC_DEFINE(HAVE_RUNTIME_THREADCHECK,1,[Define if MPI supports MPI_THREAD_MULTIPLE with a runtime check for thread level])
    enable_threads=multiple
fi

MPICH_THREAD_LEVEL=MPI_THREAD_FUNNELED
case "$enable_threads" in 
    single)
    thread_pkg_required=no
    MPICH_THREAD_LEVEL=MPI_THREAD_SINGLE
    ;;
    funneled)
    thread_pkg_required=no
    MPICH_THREAD_LEVEL=MPI_THREAD_FUNNELED
    ;;
    serialized)
1323
    thread_pkg_required=no
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
    MPICH_THREAD_LEVEL=MPI_THREAD_SERIALIZED
    ;;
    multiple)
    thread_pkg_required=yes
    MPICH_THREAD_LEVEL=MPI_THREAD_MULTIPLE
    ;;
    *)
    AC_MSG_ERROR(["$enable_threads" is not a valid value for --enable-threads])     
    ;;
esac
# Check that the requested thread level is available.
threadLevelOK=yes
1336
if test ! -z "$MPID_MAX_THREAD_LEVEL" ; then
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
    # Check that MPID_MAX_THREAD_LEVEL is at least as large as the
    # selected MPICH_THREAD_LEVEL
    case $MPICH_THREAD_LEVEL in 
        MPI_THREAD_MULTIPLE)
	if test "$MPID_MAX_THREAD_LEVEL" != "MPI_THREAD_MULTIPLE" ; then
	    threadLevelOK=no
        fi
	;;
	MPI_THREAD_SERIALIZED)
	if test "$MPID_MAX_THREAD_LEVEL" != "MPI_THREAD_MULTIPLE" -a \
	        "$MPID_MAX_THREAD_LEVEL" != "MPI_THREAD_SERIALIZED" ; then
            threadLevelOK=no
        fi
	;;
	MPI_THREAD_FUNNELED)
        if test "$MPID_MAX_THREAD_LEVEL" = "MPI_THREAD_SINGLE" ; then
            threadLevelOK=no
        fi
	;;
	MPI_THREAD_SINGLE)
	;;
    esac
fi
if test "$threadLevelOK" != yes ; then
   AC_MSG_ERROR([The device $with_device does not support $MPICH_THREAD_LEVEL])
fi

export MPICH_THREAD_LEVEL
AC_DEFINE_UNQUOTED(MPICH_THREAD_LEVEL,$MPICH_THREAD_LEVEL,[Level of thread support selected at compile time])

1367
# Check for value thread_cs choice; set the refcount default if necessary
1368
1369
thread_granularity=MPIU_THREAD_GRANULARITY_SINGLE
thread_refcount=MPIU_REFCOUNT_NONE
1370
1371
1372
1373
1374
1375
1376
if test "$enable_threads" = "multiple" ; then
    case $enable_thread_cs in 
    global)
    thread_granularity=MPIU_THREAD_GRANULARITY_GLOBAL
    if test "$enable_refcount" = "default" ; then enable_refcount=none ; fi
    ;;
    brief-global|brief_global)
1377
    AC_MSG_ERROR([--enable-thread-cs=brief-global is no longer supported, please select a different granularity])
1378
1379
1380
1381
1382
1383
1384
1385
    ;;
    per-object|per_object)
    thread_granularity=MPIU_THREAD_GRANULARITY_PER_OBJECT
    if test "$enable_refcount" = "default" ; then enable_refcount=lock ; fi
    ;;
    lock-free|lock_free|lockfree)
    thread_granularity=MPIU_THREAD_GRANULARITY_LOCK_FREE
    if test "$enable_refcount" = "default" ; then enable_refcount=lock-free ; fi
1386
    if test "$enable_predefined_refcount" = "default" ; then enable_predefined_refcount=no ; fi
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
    ;;
    *)
    AC_MSG_ERROR([Unrecognized value $enable_thread_cs for --enable-thread-cs])
    ;;
    esac

    case $enable_refcount in
    lock)
    thread_refcount=MPIU_REFCOUNT_LOCK
    ;;
    lock-free|lock_free|lockfree)
    thread_refcount=MPIU_REFCOUNT_LOCKFREE
    ;;
    none)
    thread_refcount=MPIU_REFCOUNT_NONE
    ;;
    *)
    AC_MSG_ERROR([Unrecognized value $enable_refcount for --enable-refcount])
    ;;
    esac
fi
AC_DEFINE_UNQUOTED([MPIU_THREAD_GRANULARITY],$thread_granularity,[Method used to implement atomic updates and access])

1410
1411
1412
1413
if test "$enable_predefined_refcount" = "no" ; then
    AC_DEFINE([MPIU_THREAD_SUPPRESS_PREDEFINED_REFCOUNTS],[1],[define to disable reference counting predefined objects like MPI_COMM_WORLD])
fi

1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
case $enable_handle_allocation in
    mutex|default)
        handle_allocation_method=MPIU_HANDLE_ALLOCATION_MUTEX
    ;;
    tls)
        handle_allocation_method=MPIU_HANDLE_ALLOCATION_THREAD_LOCAL
    ;;
    *)
        AC_MSG_ERROR([Unrecognized value $enable_handle_allocation for --enable-handle-allocation])
    ;;
esac
AC_DEFINE_UNQUOTED([MPIU_HANDLE_ALLOCATION_METHOD],$handle_allocation_method,[Method used to allocate MPI object handles])


AC_DEFINE_UNQUOTED([MPIU_THREAD_REFCOUNT],$thread_refcount,[Method used to implement refcount updates])

1430
1431
1432
1433
1434
1435
1436
# enable-g
# strip off multiple options, separated by commas
save_IFS="$IFS"
IFS=","
for option in $enable_g ; do
    case "$option" in 
        debug|dbg)
1437
        enable_append_g=yes
1438
1439
1440
	;;
        no|none)
	;;
1441
1442
1443
	handlealloc)
	perform_handlealloc=yes
	;;
1444
	handle)
1445
        perform_handle=yes
1446
	;;
1447
1448
1449
	instr)
	perform_instr=yes
	;;
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
	meminit)
	perform_meminit=yes
	;;
	memarena)
	perform_memarena=yes
	perform_memtracing=yes
	;;
	mem)
	perform_memtracing=yes
	;;
	log)
	perform_dbglog=yes
	;;
	mutex)
	perform_dbgmutex=yes
	;;
1466
1467
1468
	mutexnesting)
	perform_mutexnesting=yes
	;;
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
        most|yes)
        perform_memtracing=yes
        perform_dbglog=yes
        enable_append_g=yes
        perform_meminit=yes
        perform_instr=yes
        perform_dbgmutex=yes
        perform_mutexnesting=yes
        perform_handlealloc=yes
        perform_handle=yes
        ;;
	all)
        perform_memarena=yes
1482
1483
	perform_memtracing=yes
	perform_dbglog=yes
1484
	enable_append_g=yes
1485
	perform_meminit=yes
1486
	perform_instr=yes
1487
	perform_dbgmutex=yes
1488
	perform_mutexnesting=yes
1489
	perform_handlealloc=yes
1490
        perform_handle=yes
1491
1492
	;;
	*)
1493
1494
1495
	IFS=$save_IFS
	AC_MSG_WARN([Unknown value $option for enable-g])
	IFS=","
1496
1497
1498
1499
	;;
    esac
done
IFS="$save_IFS"
1500
1501
1502
1503
1504

if test "$enable_append_g" = "yes" ; then
    CFLAGS="$CFLAGS -g"
    CXXFLAGS="$CXXFLAGS -g"
    FFLAGS="$FFLAGS -g"
1505
    FCFLAGS="$FCFLAGS -g"
1506
1507
fi
if test "$enable_append_ndebug" = "yes" ; then
1508
1509
    CFLAGS="$CFLAGS -DNDEBUG -DNVALGRIND"
    CXXFLAGS="$CXXFLAGS -DNDEBUG -DNVALGRIND"
1510
    # MPICH does NOT assume any preprocessing support from the Fortran compiler,
1511
1512
    # so no Fortran files contain any preprocessing statements.
    # Don't set FFLAGS or FCFLAGS with any -D.
1513
fi
1514
1515
1516
if test -n "$perform_meminit" ; then
    AC_DEFINE(MPICH_DEBUG_MEMINIT,1,[Define to enable preinitialization of memory used by structures and unions])
fi
1517
if test "$perform_handlealloc" = yes ; then
1518
1519
1520
1521
    AC_DEFINE(MPICH_DEBUG_HANDLEALLOC,1,[Define to enable checking of handles still allocated at MPI_Finalize])
fi
if test "$perform_instr" = yes ; then
    AC_DEFINE(USE_MPIU_INSTR,1,[Define this to enable internal instrumentation] )
1522
fi
1523
1524
AS_IF([test "X$perform_handle" = "Xyes"],
      [AC_DEFINE(MPICH_DEBUG_HANDLES,1,[Define to enable handle checking])])
1525

1526
1527
1528
1529
1530
1531
1532
if test -n "$perform_memtracing" ; then
    enable_g_mem=yes
    AC_DEFINE(USE_MEMORY_TRACING,1,[Define to enable memory tracing])
    if test -n "$perform_memarena" ; then
        AC_DEFINE(MPICH_DEBUG_MEMARENA,1,[Define if each function exit should confirm memory arena correctness])
    fi
fi
1533
1534
1535
if test -n "$perform_mutexnesting" ; then 
    AC_DEFINE(MPICH_DEBUG_MUTEXNESTING,1,[Define to check nesting in mutexes])
fi
1536
USE_DBG_LOGGING=0
1537
1538
1539
1540
1541
if test -n "$perform_dbglog" ; then
   if test "$with_logging" != "none" ; then
       AC_MSG_WARN([--with-logging overrides --enable-g=log])
   else
       AC_DEFINE(USE_DBG_LOGGING,1,[Define to enable logging macros])
1542
       USE_DBG_LOGGING=1
1543
1544
   fi
fi
1545
1546
# allow @USE_DBG_LOGGING@ substitution in glue_romio.h
AC_SUBST([USE_DBG_LOGGING])
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562

if test -n "$perform_dbgmutex" ; then 
   AC_DEFINE(MPICH_DEBUG_MUTEX,1,[Define to enable mutex debugging])
fi

pac_cross_compiling=no
if test "$with_cross" != "no" ; then
    if test -s "$with_cross" ; then
        AC_MSG_RESULT([Reading values from cross-compilation file $with_cross])
        . $with_cross
	# Autoconf 2.52 no longer sets cross_compiling except with the
	# awkward "targethost" options.
	pac_cross_compiling=yes
	cross_compiling=yes
	ac_cv_prog_cc_cross=yes
	ac_cv_prog_f77_cross=yes
1563
 	ac_cv_prog_fc_cross=yes
1564
1565
        ac_cv_prog_cxx_cross=yes
        export cross_compiling
1566
	# Export all cross variables.  Any subsidiary configure should also
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
        # export CROSS_xxx
	rm -f confcross
	(set) 2>&1 | grep CROSS_ | \
	      sed -e 's/^/export /g' -e 's/=.*//g' > confcross
	. confcross
	rm -f confcross      
    fi
fi

# This goes here because we need the top_srcdir
if test "$enable_romio" = "yes" ; then
   if test -d $use_top_srcdir/src/mpi/romio ; then
       subsystems="$subsystems src/mpi/romio"
       AC_DEFINE(HAVE_ROMIO,1,[Define if ROMIO is enabled])
1581
1582
1583
1584

       # make it possible to "#include" mpio.h at build time
       #
       # This ought to be sufficient, but there is also a symlink setup in
1585
       # src/include to accomodate current mpicc limitations.  See
1586
1587
1588
       # src/mpi/Makefile.mk for more info.
       PAC_APPEND_FLAG([-I${master_top_builddir}/src/mpi/romio/include],[CPPFLAGS])

1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
       # Set environment variables that the romio configure expects
       export use_top_srcdir
       top_build_dir=`pwd`
       export top_build_dir
       # if there is no $top_build_dir/lib, romio puts lib in wrong place
       # This test used -e under Linux, but not all test programs understand
       # -e
       if test ! -d lib ; then mkdir lib ; fi
       # tell mpi.h to include mpio.h
       PAC_HAVE_ROMIO
   else
       AC_MSG_WARN([ROMIO src directory is not available])
   fi
fi
1603
1604
1605