configure.in 20.2 KB
Newer Older
1
dnl **************************************************************
2
dnl DARSHAN AUTOCONF SCRIPT
3
4
5
6
7
dnl
dnl Process this file with autoconf to produce a configure script.
dnl You may need to use autoheader as well if changing any DEFINEs

dnl sanity checks, output header, location of scripts used here
Shane Snyder's avatar
Shane Snyder committed
8
AC_INIT([darshan-runtime], [3.2.1])
9
10
AC_CONFIG_SRCDIR([darshan.h])
AC_CONFIG_AUX_DIR(../maint/config)
11
AC_CONFIG_MACRO_DIR(../maint/config)
12
AC_CONFIG_HEADER(darshan-runtime-config.h)
13
14
15

AC_PROG_INSTALL

16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# We need to know the value of the $libdir and $bindir variables so that
# we can reference the correct path in the darshan compiler wrappers.
# Unfortunately, those two variables are not normally evaluated by autoconf.
# They are evaluated at build time using Makefile variable substitutions.
#
# The following logic was copied from mpich2 1.3.1 to resolve the $libdir
# variable at configure time.
#
# Temporarily replace the default NONE value for exec_prefix
# and prefix with the actual, default values.
savePrefix=$prefix
saveExecprefix=$exec_prefix
test "x$prefix" = xNONE && prefix=$ac_default_prefix
test "x$exec_prefix" = xNONE && exec_prefix=$prefix
eval darshan_lib_path=$libdir
eval darshan_share_path=$datarootdir
prefix=$savePrefix
exec_prefix=$saveExecprefix

35
36
dnl Check for MPI
AC_ARG_WITH(mpi,
37
38
            [AS_HELP_STRING([--without-mpi], [Build without support for MPI])],
            ,
39
            [with_mpi=check])
40

41
42
43
AX_PROG_CC_MPI([test x"$with_mpi" != xno],
               [use_mpi=yes],
               [use_mpi=no])
44

45
46
47
48
ENABLE_MPI=1
AS_IF([test "x$use_mpi" = "xno"],
      [ENABLE_MPI=
       AS_IF([test "x$with_mpi" = "xyes"],
Shane Snyder's avatar
Shane Snyder committed
49
             [AC_MSG_ERROR([CC doesn't appear to be a valid MPI compiler and MPI support was requested. See INSTALL document or try adding CC=mpicc to your configure command line.])],)],
50
51
52
      [ENABLE_MPI=1
       AC_DEFINE([HAVE_MPI], [], [Define if build is MPI-enabled])])

53
54
55
AS_IF([test "x$ENABLE_MPI" = "x"],
      DISABLE_STATIC_LIB=1,)  

56
57
58
59
60
61
62
63
64
65
66
67
68
69
dnl check for GCC compiler support
AC_ARG_WITH(gcc,
            [AS_HELP_STRING([--without-gcc], [Build without a GCC-compatible compiler])],
            ,
            [with_gcc=yes])

AC_COMPILE_IFELSE([
    AC_LANG_PROGRAM(,[
        #ifndef __GNUC__
        #error GCC ERROR
        #endif
    ])],
    [],
    [AS_IF([test "x$with_gcc" = "xyes"],
Shane Snyder's avatar
Shane Snyder committed
70
           [AC_MSG_ERROR([CC doesn't appear to be a GNU-compatible compiler, which is strongly recommended for building Darshan. To force use of a non-GCC compatible compiler, add --without-gcc to your configure command line.])],)])
71

72
dnl runtime libraries require zlib
73
CHECK_ZLIB
74

75
76
AC_ARG_ENABLE(ld-preload,
[  --disable-ld-preload    Disables support for LD_PRELOAD library],
77
[if test "x$enableval" = "xno" ; then
78
79
80
    if test "x$ENABLE_MPI" = "x" ; then
        AC_MSG_ERROR([Can not disable building of LD_PRELOAD library when building Darshan without MPI support.])
    fi
81
    DISABLE_LDPRELOAD="1"
82
83
84
fi]
,)

85
86
AC_ARG_ENABLE(cuserid,
[  --disable-cuserid       Disables attempted use of cuserid() at run time],
87
[if test "x$enableval" = "xno" ; then
88
    AC_DEFINE(__DARSHAN_DISABLE_CUSERID, 1, Define if cuserid() should be disabled)
89
90
91
fi]
,)

92
AC_ARG_ENABLE(group-readable-logs,
93
[  --enable-group-readable-logs
94
                          Set log files to be group readable],
95
[if test "x$enableval" = "xyes" ; then
96
    AC_DEFINE(__DARSHAN_GROUP_READABLE_LOGS, 1, Define if Darshan should set log files to be group readable)
97
98
99
fi]
,)

100
AC_ARG_ENABLE(mmap-logs,
Glenn K. Lockwood's avatar
Glenn K. Lockwood committed
101
[  --enable-mmap-logs      Enables ability to mmap I/O data to log file],
102
103
[if test "x$enableval" = "xyes" ; then
    AC_DEFINE(__DARSHAN_ENABLE_MMAP_LOGS, 1, Define if Darshan should mmap data structures to log file)
104
105
    ENABLE_MMAP_LOGS=1
    AC_CONFIG_FILES(share/darshan-mmap-epilog.sh)
106
107
108
fi]
,)

109
AC_ARG_WITH(mem-align,
110
111
[  --with-mem-align=<num>  Memory alignment in bytes @<:@default=8@:>@],
    [if test x$withval = xyes; then
112
113
        AC_MSG_ERROR(--with-mem-align must be given a number in bytes)
    else
114
        AC_DEFINE_UNQUOTED(__DARSHAN_MEM_ALIGNMENT, ${withval}, Memory alignment in bytes)
115
116
    fi],
    [AC_DEFINE([__DARSHAN_MEM_ALIGNMENT], [8], [Memory alignment in bytes])]
117
118
)

119
AC_ARG_WITH(log-path-by-env,
120
121
122
[  --with-log-path-by-env=<env var list>
                          Comma separated list of environment variables to check for
                          log path location before --with-log-path path],
123
124
125
    if test x$withval = xyes; then
        AC_MSG_ERROR(--with-log-path-by-env must be given at least one variable name)
    else
126
127
        AC_DEFINE_UNQUOTED(__DARSHAN_LOG_ENV, "${withval}", Comma separated list of env. variables to use for log path)
        __DARSHAN_LOG_ENV="${withval}"
128
129
130
131
        GOT_LOG_PATH=1
    fi
)

132
AC_ARG_WITH(log-hints,
133
134
[  --with-log-hints=<hint1=x;hint2=y>
                          Semicolon-separated list of MPI-IO hints for log file write],
135
136
137
    if test x$withval = xyes; then
        AC_MSG_ERROR(--with-log-hints must be given an argument)
    else
138
139
        AC_DEFINE_UNQUOTED(__DARSHAN_LOG_HINTS, "${withval}", Semicolon-separated list of MPI-IO hints for log file write)
        __DARSHAN_LOG_HINTS="${withval}"
140
141
142
143
        GOT_LOG_HINTS=1
    fi
)

144
145
146
147
148
AC_ARG_WITH(log-path,
[  --with-log-path=<path>  Location to store log files at run time],
    if test x$withval = xyes; then
        AC_MSG_ERROR(--with-log-path must be given a pathname)
    else
149
150
        AC_DEFINE_UNQUOTED(__DARSHAN_LOG_PATH, "${withval}", Location to store log files at run time)
        __DARSHAN_LOG_PATH="${withval}"
151
152
153
154
        GOT_LOG_PATH=1
    fi
)

155
AC_ARG_WITH(jobid-env,
156
[  --with-jobid-env=<name> Name of environment variable that stores the jobid
157
                          (specify "NONE" if no appropriate environment variable
158
                          is available: Darshan will use the pid of rank 0)],
159
160
161
    if test x$withval = xyes; then
        AC_MSG_ERROR(--with-jobid-env must be given a name)
    else
162
163
        AC_DEFINE_UNQUOTED(__DARSHAN_JOBID, "${withval}", Name of the environment variable that stores the jobid)
        __DARSHAN_JOBID="${withval}"
164
165
166
        GOT_JOBID=1
    fi
)
167

168
AC_ARG_WITH(mod-mem,
169
170
[  --with-mod-mem=<num>    Maximum runtime memory consumption per process
                          (in MiB) across all instrumentation modules],
171
172
173
    if test x$withval = xyes; then
        AC_MSG_ERROR(--with-mod-mem must be given a number)
    else
174
        AC_DEFINE_UNQUOTED(__DARSHAN_MOD_MEM_MAX, ${withval}, Maximum runtime memory consumption per process (in MiB) across all instrumentation modules)
175
176
177
    fi
)

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
#
# Check for specific module enable/disable options
#

# NULL module
BUILD_NULL_MODULE=1
AC_ARG_ENABLE(null-mod,
              AS_HELP_STRING([--disable-null-mod], [Disables compilation of NULL module]))
AS_IF([test "x$enable_null_mod" = "xno"],
      BUILD_NULL_MODULE=)

# POSIX module
BUILD_POSIX_MODULE=1
DARSHAN_POSIX_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-posix-ld-opts"
AC_ARG_ENABLE(posix-mod,
              AS_HELP_STRING([--disable-posix-mod], [Disables compilation and use of POSIX module]))
AS_IF([test "x$enable_posix_mod" = "xno"],
      BUILD_POSIX_MODULE=
      DARSHAN_POSIX_LD_OPTS=)

# STDIO module
BUILD_STDIO_MODULE=1
DARSHAN_STDIO_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-stdio-ld-opts"
AC_ARG_ENABLE(stdio-mod,
              AS_HELP_STRING([--disable-stdio-mod], [Disables compilation and use of STDIO module]))
AS_IF([test "x$enable_stdio_mod" = "xno"],
      BUILD_STDIO_MODULE=
      DARSHAN_STDIO_LD_OPTS=)

# DXT module
BUILD_DXT_MODULE=1
AC_ARG_ENABLE(dxt-mod,
              AS_HELP_STRING([--disable-dxt-mod], [Disables compilation and use of DXT module]))
AS_IF([test "x$enable_dxt_mod" = "xno"],
      BUILD_DXT_MODULE=)

# MPI-IO module
BUILD_MPIIO_MODULE=1
DARSHAN_MPIIO_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-mpiio-ld-opts"
AC_ARG_ENABLE(mpiio-mod,
              AS_HELP_STRING([--disable-mpiio-mod], [Disables compilation and use of MPI-IO module (requires MPI)]))
AS_IF([test "x$enable_mpiio_mod" = "xno" || test "x$ENABLE_MPI" = "x"],
      BUILD_MPIIO_MODULE=
      DARSHAN_MPIIO_LD_OPTS=)

223
224
225
226
227
228
229
# HDF5 module (disabled by default)
BUILD_HDF5_MODULE=
DARSHAN_HDF5_LD_OPTS=
AC_ARG_ENABLE(hdf5-mod,
              AS_HELP_STRING([--enable-hdf5-mod], [Enables compilation and use of HDF5 module]),
              [],
              [enable_hdf5_mod=no])
230
AS_IF([test "x$enable_hdf5_mod" != "xno"],[
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
    AS_IF([test -d "$enable_hdf5_mod"],
        [CFLAGS="${CFLAGS} -I${enable_hdf5_mod}/include"
        DARSHAN_HDF5_LD_FLAGS="-L${enable_hdf5_mod}/lib [-Wl,-rpath=${enable_hdf5_mod}/lib -lhdf5]"],
        AC_MSG_ERROR(enableval for hdf5-mod is required and must be a valid install prefix path for HDF5 library)
    )
    BUILD_HDF5_MODULE=1
    DARSHAN_HDF5_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-hdf5-ld-opts"
    AC_TRY_COMPILE(
        [
        #include <hdf5.h>
        ],
        [
        #if (H5_VERS_MAJOR > 1) || ((H5_VERS_MAJOR == 1) && (H5_VERS_MINOR >= 10))
        #error H5_VERS 1.10+
        #endif
        ],
        DARSHAN_HDF5_ADD_DFLUSH_LD_OPTS="",
        AC_DEFINE(DARSHAN_HDF5_VERS_1_10_PLUS, 1, Define if HDF5 module built with version 1.10+)
        DARSHAN_HDF5_ADD_DFLUSH_LD_OPTS="--undefined=H5Dflush --wrap=H5Dflush"
    )
251
252
    AC_CHECK_PROG(H5PCC_CHECK, h5pcc, "yes", "no", "${enable_hdf5_mod}/bin")
    AS_IF([test x"$H5PCC_CHECK" = x"yes"], [AC_DEFINE(DARSHAN_HDF5_PAR_BUILD, 1, Define if HDF5 built with parallel support)])
253
])
254

255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
# PNETCDF module
BUILD_PNETCDF_MODULE=1
DARSHAN_PNETCDF_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-pnetcdf-ld-opts"
AC_ARG_ENABLE(pnetcdf-mod,
              AS_HELP_STRING([--disable-pnetcdf-mod], [Disables compilation and use of PnetCDF module (requires MPI)]))
AS_IF([test "x$enable_pnetcdf_mod" = "xno" || test "x$ENABLE_MPI" = "x"],
      BUILD_PNETCDF_MODULE=
      DARSHAN_PNETCDF_LD_OPTS=)

# BG/Q module
BUILD_BGQ_MODULE=
AC_ARG_ENABLE(bgq-mod,
              AS_HELP_STRING([--disable-bgq-mod], [Disables compilation and use of BG/Q module (for BG/Q systems)]),
              [],
              [enable_bgq_mod=check])
270
# if bgq module not disabled, check to make sure BG/Q environment available
271
272
273
274
275
276
277
278
if test x$enable_bgq_mod != xno; then
    AC_MSG_CHECKING(for BG/Q environment)
    AC_TRY_COMPILE([
        #ifndef __bgq__
        #error __bgq__ not set
        #endif
        ], [],
        AC_MSG_RESULT(yes)
279
        BUILD_BGQ_MODULE=1,
280
281
282
283
284
285
        AC_MSG_RESULT(no)
        AS_IF([test "x$enable_bgq_mod" = xyes],
            AC_MSG_ERROR(BG/Q module enabled in non-BG/Q environment),
            []))
fi

286
287
288
289
290
291
# Lustre module
BUILD_LUSTRE_MODULE=
AC_ARG_ENABLE(lustre-mod,
              AS_HELP_STRING([--disable-lustre-mod], [Disables compilation and use of Lustre module]),
              [],
              [enable_lustre_mod=check])
292
293
# if lustre module not disabled, check for needed Lustre module header
if test x$enable_lustre_mod != xno; then
294
295
296
297
298
299
300
    AC_CHECK_HEADER([lustre/lustreapi.h],
        [AC_CHECK_LIB(lustreapi, llapi_layout_get_by_xattr,
            [BUILD_LUSTRE_MODULE=1
	     DARSHAN_LUSTRE_LD_FLAGS="-llustreapi"],
	    AS_IF([test "x$enable_lustre_mod" = xyes],
                AC_MSG_ERROR(Cannot find required llapi_layout_get_by_xattr function for the Lustre module),
                []))],
301
302
303
304
305
        AS_IF([test "x$enable_lustre_mod" = xyes],
            AC_MSG_ERROR(Cannot find required headers for the Lustre module),
            []))
fi

306
307
308
309
310
311
312
313
314
315
316
317
BUILD_MDHIM_MODULE=
DARSHAN_MDHIM_LD_OPTS=
AC_ARG_ENABLE([mdhim],
	      AS_HELP_STRING([--enable-mdhim], [Enable mdhim module]),
	      [],[] )
AS_IF([test "x$enable_mdhim" = "xyes"],
      BUILD_MDHIM_MODULE=1
      DARSHAN_MDHIM_LD_OPTS="@${darshan_share_path}/ld-opts/darshan-mdhim-ld-opts"
      AC_CHECK_HEADERS([mdhim.h],
		       [],
		       AC_MSG_ERROR([mdhim requested but headers cannot be found]) ),
      []
318

319
      )
320

321
dnl sanity check some config parameters
322
if test x$GOT_LOG_PATH != x1; then
323
    AC_MSG_ERROR(must provide --with-log-path=<path> _or_ --with-log-path-by-env=<variable list> argument to configure.)
324
fi
325
326
327
if test x$GOT_JOBID != x1; then
    AC_MSG_ERROR(must provide --with-jobid-env=<name> argument to configure.)
fi
328
__DARSHAN_LOG_HINTS_DEFAULT="romio_no_indep_rw=true;cb_nodes=4"
329
330
if test x$GOT_LOG_HINTS != x1; then
dnl use default hints
331
    AC_DEFINE_UNQUOTED(__DARSHAN_LOG_HINTS, "$__DARSHAN_LOG_HINTS_DEFAULT", Comma-separated list of MPI-IO hints for log file write)
332
fi
333

334
335
# checks to see how we can print 64 bit values on this architecture
gt_INTTYPES_PRI
336
337
338
339
340
if test x$PRI_MACROS_BROKEN == xyes; then
    AC_MSG_ERROR(PRI_xx macros are broken)
else
    AC_CHECK_HEADERS(inttypes.h, , [AC_MSG_ERROR(Couldn't find inttypes.h)])
fi
341
342
343
344

dnl Check byte ordering
AC_C_BIGENDIAN

345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
dnl temporarily set large file flags just for this test; we don't want
dnl it to propagate to the makefile because of zlib bugs
old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
AC_MSG_CHECKING(for struct aiocb64)
AC_TRY_COMPILE(
    [
    #include <aio.h>
    ],
    [ struct aiocb64 aiocb; ],
    AC_MSG_RESULT(yes)
    AC_DEFINE(HAVE_AIOCB64, 1, Define if struct aiocb64 type is defined),
    AC_MSG_RESULT(no)
)
CFLAGS="$old_cflags"

361
dnl temporarily set large file flags just for this test; we don't want
362
dnl it to propagate to the makefile because of zlib bugs
363
364
old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE"
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
AC_MSG_CHECKING(for off64_t)
AC_TRY_COMPILE(
    [
    #include <stdio.h>
    #include <unistd.h>
    #include <sys/types.h>
    #include <sys/stat.h>
    #include <fcntl.h>
    #include <stdarg.h>
    #include <string.h>
    #include <time.h>
    #include <stdlib.h>
    #include <errno.h>
    #include <sys/uio.h>
    #include <pthread.h>
    #include <sys/mman.h>
    #include <search.h>
    #include <assert.h>
    ],
    [ off64_t off; ],
    AC_MSG_RESULT(yes)
    AC_DEFINE(HAVE_OFF64_T, 1, Define if off64_t type is defined),
    AC_MSG_RESULT(no)
)
389
CFLAGS="$old_cflags"
390

391
AC_CHECK_HEADERS(mntent.h sys/mount.h)
392

393
#
394
395
# Begin tests for MPI-enabled builds
#
396

397
AS_IF([test "x$ENABLE_MPI" = "x1"], [
398

399
400
401
# determine if the MPI library includes MPI-IO functions or not
AC_MSG_CHECKING(for MPI-IO support in MPI)
AC_TRY_LINK([#include <mpi.h>], [
402
403
404
405
    MPI_Comm comm=0;
    char* filename=0;
    int amode=0;
    MPI_Info info=0;
406
    MPI_File fh;
407
            MPI_File_open(comm, filename, amode, info, &fh);],
408
    AC_MSG_RESULT(yes),
409
            AC_MSG_ERROR(Darshan requires a version of MPI with MPI-IO support))
410

411
412
413
414
415
416
417
# At some point MPI-IO converted most API functions to be const correct.  We
# need to test for this to determine how to define MPI-IO wrappers in
# Darshan.  First we try compiling without cost qualifiers.
AC_MSG_CHECKING(for MPI-IO prototypes without const qualifier)
AC_TRY_COMPILE(
    [
    #include <mpi.h>
418
    int MPI_File_open(MPI_Comm comm, char *filename, int amode,
419
420
421
422
423
424
425
426
427
428
429
430
431
        MPI_Info info, MPI_File *fh)
        {return 0;}
    ],
    [],
    AC_MSG_RESULT(yes),
    AC_MSG_RESULT(no)

    # unable to compile without const qualifiers.  Let's try again with
    # const qualifiers.
    AC_MSG_CHECKING(for MPI-IO prototypes with const qualifier)
    AC_TRY_COMPILE(
        [
        #include <mpi.h>
432
        int MPI_File_open(MPI_Comm comm, const char *filename, int amode,
433
434
435
436
437
438
439
440
441
442
443
            MPI_Info info, MPI_File *fh)
            {return 0;}
        ],
        [],
        AC_MSG_RESULT(yes)
        AC_DEFINE(HAVE_MPIIO_CONST, 1, Define if MPI-IO prototypes use const qualifier),
        ,
        AC_MSG_ERROR(Darshan is unable to find a compatible MPI_File_open prototype)
    )
)

444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
# determine if mpicc can create shared libraries that use MPI functions
old_cflags="$CFLAGS"
CFLAGS="$CFLAGS -shared -fpic -DPIC"
old_libs="$LIBS"
LIBS="$LIBS -ldl"
AC_MSG_CHECKING(for shared libraries in MPI)
AC_TRY_LINK([#include <mpi.h>], [
    int size;
    MPI_Comm_size(MPI_COMM_WORLD, &size);
],
    AC_MSG_RESULT(yes),
    AC_MSG_RESULT(no)
    AC_MSG_WARN(mpicc doesn't support shared objects; disabling LD_PRELOAD library)
    DISABLE_LDPRELOAD="1"
)
CFLAGS="$old_cflags"
LIBS="$old_libs"

462
463
464
# if this version of mpi defines an MPIO_Request type, then we assume that
# we should use it in the nonblocking MPI-IO functions.  This is necessary
# for MPI 1.x implementations that did not use generalized requests yet in
465
466
# MPI-IO.  Later MPI implementations might typedef MPIO_Request to MPI_Request
# so there is no  harm in using the former if it is available there.
467
AC_CHECK_TYPE([MPIO_Request],
468
		AC_DEFINE(__D_MPI_REQUEST, MPIO_Request, Generalized request type for MPI-IO)
469
	,
470
471
		AC_DEFINE(__D_MPI_REQUEST, MPI_Request, Generalized request type for MPI-IO)
	,[#include <mpi.h>])
472

473
474
475
# attempt to detect library naming convention in mpi compiler script
AS_IF([$CC -show foo.c -o foo >& /dev/null],
	AC_MSG_CHECKING(for old (pre-3.1.1) style MPICH library naming convention)
476
	AS_IF([$CC -show foo.c -o foo |grep lmpich >& /dev/null],
477
478
479
480
481
	    AC_MSG_RESULT(yes)
	    MPICH_LIB_OLD=1,
	    AC_MSG_RESULT(no)
	    MPICH_LIB_OLD=0),
	MPICH_LIB_OLD=0)
482

483
484
485
486
487
])
#
# End of MPI-only checks
#

488
489
490
AC_MSG_CHECKING(for fscanf redirect)
AC_TRY_COMPILE(
    [
491
    #define _GNU_SOURCE
492
493
494
495
    #include <stdio.h>
    int fscanf(FILE *stream, const char *format, ...) {return(0);}
    int __isoc99_fscanf(FILE *stream, const char *format, ...) {return(0);}
    ],
496
    [],
497
498
    AC_MSG_RESULT(no)
    DARSHAN_STDIO_ADD_FSCANF_LD_OPTS="--wrap=__isoc99_fscanf",
499
500
    AC_MSG_RESULT(yes)
    AC_DEFINE(HAVE_FSCANF_REDIRECT, 1, Define if fscanf is redirected to another function)
501
    DARSHAN_STDIO_ADD_FSCANF_LD_OPTS=""
502
503
)

504
505
506
507
508
# look for glibc-specific functions
AC_CHECK_FUNCS([pwritev],[],[])
AC_CHECK_FUNCS([preadv],[],[])
AC_CHECK_FUNCS([pwritev2],[],[])
AC_CHECK_FUNCS([preadv2],[],[])
509

510
DARSHAN_VERSION="AC_PACKAGE_VERSION"
511
AC_SUBST(darshan_lib_path)
512
AC_SUBST(darshan_share_path)
513
AC_SUBST(LDFLAGS)
514
AC_SUBST(__DARSHAN_LOG_PATH)
515
AC_SUBST(__DARSHAN_LOG_ENV)
516
AC_SUBST(DISABLE_STATIC_LIB)
517
AC_SUBST(DISABLE_LDPRELOAD)
518
AC_SUBST(ENABLE_MMAP_LOGS)
519
AC_SUBST(DARSHAN_VERSION)
520
AC_SUBST(MPICH_LIB_OLD)
521
AC_SUBST(BUILD_NULL_MODULE)
522
523
AC_SUBST(BUILD_POSIX_MODULE)
AC_SUBST(DARSHAN_POSIX_LD_OPTS)
524
525
AC_SUBST(BUILD_STDIO_MODULE)
AC_SUBST(DARSHAN_STDIO_LD_OPTS)
526
AC_SUBST(DARSHAN_STDIO_ADD_FSCANF_LD_OPTS)
527
AC_SUBST(BUILD_DXT_MODULE)
528
529
530
531
AC_SUBST(BUILD_MPIIO_MODULE)
AC_SUBST(DARSHAN_MPIIO_LD_OPTS)
AC_SUBST(BUILD_PNETCDF_MODULE)
AC_SUBST(DARSHAN_PNETCDF_LD_OPTS)
532
533
AC_SUBST(BUILD_HDF5_MODULE)
AC_SUBST(DARSHAN_HDF5_LD_OPTS)
534
535
AC_SUBST(DARSHAN_HDF5_ADD_DFLUSH_LD_OPTS)
AC_SUBST(DARSHAN_HDF5_LD_FLAGS)
536
537
AC_SUBST(BUILD_BGQ_MODULE)
AC_SUBST(BUILD_LUSTRE_MODULE)
538
AC_SUBST(DARSHAN_LUSTRE_LD_FLAGS)
539
540
AC_SUBST(BUILD_MDHIM_MODULE)
AC_SUBST(DARSHAN_MDHIM_LD_OPTS)
541
542
AC_OUTPUT(Makefile
darshan-mk-log-dirs.pl
543
darshan-gen-cc.pl
Philip Carns's avatar
Philip Carns committed
544
darshan-gen-cxx.pl
545
darshan-gen-fortran.pl
Philip Carns's avatar
Philip Carns committed
546
darshan-config
547
share/craype-1.x/darshan-module
548
share/craype-2.x/darshan-module
549
lib/pkgconfig/darshan-runtime.pc
550
551
552
share/mpi-profile/darshan-cc.conf
share/mpi-profile/darshan-cxx.conf
share/mpi-profile/darshan-f.conf
553
554
555
share/mpi-profile/darshan-cc-static.conf
share/mpi-profile/darshan-cxx-static.conf
share/mpi-profile/darshan-f-static.conf
556
share/ld-opts/darshan-base-ld-opts
557
share/ld-opts/darshan-stdio-ld-opts
558
share/ld-opts/darshan-hdf5-ld-opts
559
)
560

561
562
msg="Building Darshan with CC=$CC and with the following features:"
AC_MSG_NOTICE($msg)
Philip Carns's avatar
Philip Carns committed
563
AS_IF([test "x$BUILD_NULL_MODULE" = "x"],   [AC_MSG_NOTICE(NULL module support:    no)], [AC_MSG_NOTICE(NULL module support:    yes)])
564
565
AS_IF([test "x$BUILD_POSIX_MODULE" = "x"],   [AC_MSG_NOTICE(POSIX module support:   no)], [AC_MSG_NOTICE(POSIX module support:   yes)])
AS_IF([test "x$BUILD_STDIO_MODULE" = "x"],   [AC_MSG_NOTICE(STDIO module support:   no)], [AC_MSG_NOTICE(STDIO module support:   yes)])
566
567
AS_IF([test "x$BUILD_DXT_MODULE" = "x"],    [AC_MSG_NOTICE(DXT module support:     no)], [AC_MSG_NOTICE(DXT module support:     yes)])
AS_IF([test "x$BUILD_MPIIO_MODULE" = "x"],   [AC_MSG_NOTICE(MPIIO module support:   no)], [AC_MSG_NOTICE(MPIIO module support:   yes)])
568
AS_IF([test "x$BUILD_HDF5_MODULE" = "x"], [AC_MSG_NOTICE(HDF5 module support:    no)], [AC_MSG_NOTICE(HDF5 module support:    yes)])
569
AS_IF([test "x$BUILD_PNETCDF_MODULE" = "x"], [AC_MSG_NOTICE(PnetCDF module support: no)], [AC_MSG_NOTICE(PnetCDF module support: yes)])
570
571
572
AS_IF([test "x$BUILD_BGQ_MODULE" = "x"],     [AC_MSG_NOTICE(BG/Q module support:    no)], [AC_MSG_NOTICE(BG/Q module support:    yes)])
AS_IF([test "x$BUILD_LUSTRE_MODULE" = "x"],  [AC_MSG_NOTICE(Lustre module support:  no)], [AC_MSG_NOTICE(Lustre module support:  yes)])
AS_IF([test "x$BUILD_MDHIM_MODULE" = "x"],   [AC_MSG_NOTICE(MDHIM module support:   no)], [AC_MSG_NOTICE(MDHIM module support:   yes)])