2 dnl This files contains additional macros for using autoconf to
3 dnl build configure scripts.
5 dnl Almost all of this file is taken from the aclocal.m4 of MPICH
7 dnl Get the format of Fortran names. Uses F77, FFLAGS, and sets WDEF.
8 dnl If the test fails, sets NOF77 to 1, HAVE_FORTRAN to 0.
11 AC_DEFUN([PAC_GET_FORTNAMES],[
12 rm -f confftest.f confftest.$OBJEXT
13 cat > confftest.f <<EOF
14 subroutine mpir_init_fop( a )
20 $F77 $FFLAGS -c confftest.f > /dev/null 2>&1
21 if test ! -s confftest.$OBJEXT ; then
22 AC_MSG_WARN([Unable to test Fortran compiler. Compiling a test
23 program failed to produce an object file])
25 elif test -z "$FORTRANNAMES" ; then
26 # MAC OS X (and probably FreeBSD need strings - (not strings -a)
27 # Cray doesn't accept -a ...
29 if test $arch_CRAY ; then
31 elif strings - confftest.$OBJEXT < /dev/null >/dev/null 2>&1 ; then
33 elif strings -a confftest.$OBJEXT < /dev/null >/dev/null 2>&1 ; then
37 nameform1=`strings $allstrings confftest.$OBJEXT | grep mpir_init_fop_ | head -1`
38 nameform2=`strings $allstrings confftest.$OBJEXT | grep MPIR_INIT_FOP | head -1`
39 nameform3=`strings $allstrings confftest.$OBJEXT | grep mpir_init_fop | head -1`
40 nameform4=`strings $allstrings confftest.$OBJEXT | grep mpir_init_fop__ | head -1`
41 rm -f confftest.f confftest.$OBJEXT
42 if test -n "$nameform4" ; then
43 echo "Fortran externals are lower case and have two trailing underscores"
44 FORTRANNAMES="FORTRANDOUBLEUNDERSCORE"
45 elif test -n "$nameform1" ; then
46 # We don't set this in CFLAGS; it is a default case
47 echo "Fortran externals have a trailing underscore and are lowercase"
48 FORTRANNAMES="FORTRANUNDERSCORE"
49 elif test -n "$nameform2" ; then
50 echo "Fortran externals are uppercase"
51 FORTRANNAMES="FORTRANCAPS"
52 elif test -n "$nameform3" ; then
53 echo "Fortran externals are lower case"
54 FORTRANNAMES="FORTRANNOUNDERSCORE"
56 AC_MSG_WARN([Unable to determine the form of Fortran external names.
57 Make sure that the compiler $F77 can be run on this system.
58 Turning off Fortran (-nof77 being assumed)])
62 if test -n "$FORTRANNAMES" ; then
63 WDEF="-D$FORTRANNAMES"
65 # Delete confftest files with any extension. This catches the case
66 # where auxillary files, such as coverage files, are removed.
70 define(PAC_GET_SPECIAL_SYSTEM_INFO,[
72 if test -n "$arch_IRIX"; then
73 AC_MSG_CHECKING(for IRIX OS version)
74 dnl This block of code replaces a generic "IRIX" arch value with
75 dnl IRIX_<version>_<chip>
77 dnl IRIX_5_4400 (IRIX 5.x, using MIPS 4400)
78 osversion=`uname -r | sed 's/\..*//'`
79 dnl Note that we need to allow brackets here, so we briefly turn off
82 dnl Get the second field (looking for 6.1)
83 osvminor=`uname -r | sed 's/[0-9]\.\([0-9]*\)\..*/\1/'`
85 AC_MSG_RESULT($osversion)
86 dnl Get SGI processor count by quick hack
87 AC_MSG_CHECKING(for IRIX cpucount)
89 cpucount=`hinv | grep '[0-9]* [0-9]* MHZ IP[0-9]* Proc' | cut -f 1 -d' '`
90 if test "$cpucount" = "" ; then
91 cpucount=`hinv | grep 'Processor [0-9]*:' | wc -l | sed -e 's/ //g'`
94 if test "$cpucount" = "" ; then
95 AC_MSG_RESULT([Could not determine cpucount. Please send])
97 AC_MSG_ERROR([to romio-maint@mcs.anl.gov])
99 AC_MSG_RESULT($cpucount)
101 AC_MSG_CHECKING(for IRIX cpumodel)
102 dnl The tail -1 is necessary for multiple processor SGI boxes
103 dnl We might use this to detect SGI multiprocessors and recommend
105 cputype=`hinv -t cpu | tail -1 | cut -f 3 -d' '`
106 if test -z "$cputype" ; then
107 AC_MSG_RESULT([Could not get cputype from hinv -t cpu command. Please send])
109 hinv -t cpu | cut -f 3 -d' ' 2>&1
110 AC_MSG_ERROR([to romio-maint@mcs.anl.gov])
112 AC_MSG_RESULT($cputype)
113 dnl echo "checking for osversion and cputype"
114 dnl cputype may contain R4400, R2000A/R3000, or something else.
115 dnl We may eventually need to look at it.
116 if test -z "$osversion" ; then
117 AC_MSG_RESULT([Could not determine OS version. Please send])
119 AC_MSG_ERROR([to romio-maint@mcs.anl.gov])
120 elif test $osversion = 4 ; then
122 elif test $osversion = 5 ; then
124 elif test $osversion = 6 ; then
127 AC_MSG_RESULT([Could not recognize the version of IRIX (got $osversion).
128 ROMIO knows about versions 4, 5 and 6; the version being returned from
129 uname -r is $osversion. Please send])
132 AC_MSG_ERROR([to romio-maint@mcs.anl.gov])
134 AC_MSG_CHECKING(for cputype)
136 IRIXARCH="$ARCH_$osversion"
137 dnl Now, handle the chip set
139 cputype=`echo $cputype | sed -e 's%.*/%%' -e 's/R//' | tr -d "[A-Z]"`
151 AC_MSG_WARN([Unexpected IRIX/MIPS chipset $cputype. Please send the output])
154 AC_MSG_WARN([to romio-maint@mcs.anl.gov
155 ROMIO will continue and assume that the cputype is
156 compatible with a MIPS 4400 processor.])
160 AC_MSG_RESULT($cputype)
161 IRIXARCH="$IRIXARCH_$cputype"
162 echo "IRIX-specific architecture is $IRIXARCH"
167 define(PAC_TEST_MPI,[
168 AC_MSG_CHECKING(if a simple MPI program compiles and links)
170 cat > mpitest.c <<EOF
172 main(int argc, char **argv)
174 MPI_Init(&argc,&argv);
178 rm -f conftest$EXEEXT
179 cmd="$CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB"
180 echo "$as_me:$LINENO: $cmd" >&5
182 if test ! -x conftest$EXEEXT ; then
183 echo "$as_me:$LINENO: failed program was:" >&5
184 sed 's/^/| /' mpitest.c >&5
185 rm -f conftest$EXEEXT mpitest.c
186 AC_MSG_ERROR([Unable to compile a simple MPI program.
187 Use environment variables to provide the location of MPI libraries and
188 include directories])
190 rm -f conftest$EXEEXT mpitest.c
197 define(PAC_NEEDS_FINT,[
198 AC_MSG_CHECKING(if MPI_Fint is defined in the MPI implementation)
199 cat > mpitest1.c <<EOF
207 rm -f mpitest1.$OBJEXT
208 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -c mpitest1.c > /dev/null 2>&1
209 if test ! -s mpitest1.$OBJEXT ; then
210 NEEDS_MPI_FINT="#define NEEDS_MPI_FINT"
211 CFLAGS="$CFLAGS -DNEEDS_MPI_FINT"
213 rm -f mpitest1.$OBJEXT mpitest1.c
217 rm -f mpitest1.$OBJEXT mpitest1.c
221 define(PAC_MPI_LONG_LONG_INT,[
222 AC_MSG_CHECKING(if MPI_LONG_LONG_INT is defined in mpi.h)
224 cat > mpitest.c <<EOF
226 main(int argc, char **argv)
229 MPI_Init(&argc,&argv);
230 MPI_Send(&i, 1, MPI_LONG_LONG_INT, 0, 0, MPI_COMM_WORLD);
234 rm -f conftest$EXEEXT
235 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB > /dev/null 2>&1
236 if test -x conftest$EXEEXT ; then
238 AC_DEFINE(HAVE_MPI_LONG_LONG_INT,,[Define if mpi has long long it])
242 rm -f conftest$EXEEXT mpitest.c
245 dnl PAC_LONG_LONG_64: check if there is a 64-bit long long
247 define(PAC_LONG_LONG_64,[
248 if test -n "$longlongsize" ; then
249 if test "$longlongsize" = 8 ; then
250 echo "defining MPI_Offset as long long in C and integer*8 in Fortran"
251 AC_DEFINE(HAVE_LONG_LONG_64,,[Define if long long is 64 bits])
252 DEFINE_MPI_OFFSET="typedef long long MPI_Offset;"
253 FORTRAN_MPI_OFFSET="integer*8"
255 elif test "$longlongsize" = "int" ; then # a hack to set MPI_Offset as int
256 echo "defining MPI_Offset as int in C and integer in Fortran"
257 DEFINE_MPI_OFFSET="typedef int MPI_Offset;"
258 FORTRAN_MPI_OFFSET="integer"
259 AC_DEFINE(MPI_OFFSET_IS_INT,,[Define if MPI_Offset is int])
264 echo "defining MPI_Offset as long in C and integer in Fortran"
265 DEFINE_MPI_OFFSET="typedef long MPI_Offset;"
266 FORTRAN_MPI_OFFSET="integer"
272 PAC_GET_TYPE_SIZE(long long, longlongsize)
273 if test -n "$longlongsize" ; then
274 if test "$longlongsize" = 8 ; then
277 echo "defining MPI_Offset as long in C and integer in Fortran"
278 DEFINE_MPI_OFFSET="typedef long MPI_Offset;"
279 FORTRAN_MPI_OFFSET="integer"
285 dnl check if longlong is not supported or only its size cannot be determined
286 dnl because the program cannot be run.
295 rm -f conftest$EXEEXT
296 $CC $USER_CFLAGS -o conftest$EXEEXT ltest.c > /dev/null 2>&1
297 if test -x conftest$EXEEXT ; then
298 echo "assuming size of long long is 8bytes; use '-longlongsize' to indicate otherwise"
299 rm -f conftest$EXEEXT ltest.c
300 echo "defining MPI_Offset as long long in C and integer*8 in Fortran"
301 AC_DEFINE(HAVE_LONG_LONG_64,,[Define if long long is 64 bits])
302 DEFINE_MPI_OFFSET="typedef long long MPI_Offset;"
303 FORTRAN_MPI_OFFSET="integer*8"
306 echo "assuming long long is not available; use '-longlongsize' to indicate otherwise"
307 echo "defining MPI_Offset as long in C and integer in Fortran"
308 DEFINE_MPI_OFFSET="typedef long MPI_Offset;"
309 FORTRAN_MPI_OFFSET="integer"
319 define(PAC_MPI_INFO,[
320 AC_MSG_CHECKING(if MPI_Info functions are defined in the MPI implementation)
322 cat > mpitest.c <<EOF
324 main(int argc, char **argv)
327 MPI_Init(&argc,&argv);
328 MPI_Info_create(&info);
332 rm -f conftest$EXEEXT
333 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB > /dev/null 2>&1
334 if test -x conftest$EXEEXT ; then
336 AC_DEFINE(HAVE_MPI_INFO,1,[Define if MPI_Info available])
337 HAVE_MPI_INFO="#define HAVE_MPI_INFO"
345 MPI_FINFO1=" INTEGER MPI_MAX_INFO_KEY, MPI_MAX_INFO_VAL"
346 MPI_FINFO2=" PARAMETER (MPI_MAX_INFO_KEY=255, MPI_MAX_INFO_VAL=1024)"
347 MPI_FINFO3=" INTEGER MPI_INFO_NULL"
348 MPI_FINFO4=" PARAMETER (MPI_INFO_NULL=0)"
350 rm -f conftest$EXEEXT mpitest.c
354 define(PAC_MPI_DARRAY_SUBARRAY,[
355 AC_MSG_CHECKING(if darray and subarray constructors are defined in the MPI implementation)
357 cat > mpitest.c <<EOF
359 main(int argc, char **argv)
361 int i=MPI_DISTRIBUTE_CYCLIC;
363 MPI_Init(&argc,&argv);
364 MPI_Type_create_darray(i, i, i, &i, &i, &i, &i, i, MPI_INT, &t);
365 MPI_Type_create_subarray(i, &i, &i, &i, i, MPI_INT, &t);
369 rm -f conftest$EXEEXT
370 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB > /dev/null 2>&1
371 if test -x conftest$EXEEXT ; then
373 AC_DEFINE(HAVE_MPI_DARRAY_SUBARRAY,,[Define if MPI Darray available])
374 HAVE_MPI_DARRAY_SUBARRAY="#define HAVE_MPI_DARRAY_SUBARRAY"
385 MPI_FARRAY1=" INTEGER MPI_ORDER_C, MPI_ORDER_FORTRAN"
386 MPI_FARRAY2=" PARAMETER (MPI_ORDER_C=56, MPI_ORDER_FORTRAN=57)"
387 MPI_FARRAY3=" INTEGER MPI_DISTRIBUTE_BLOCK, MPI_DISTRIBUTE_CYCLIC"
388 MPI_FARRAY4=" INTEGER MPI_DISTRIBUTE_NONE, MPI_DISTRIBUTE_DFLT_DARG"
389 MPI_FARRAY5=" PARAMETER (MPI_DISTRIBUTE_BLOCK=121, MPI_DISTRIBUTE_CYCLIC=122)"
390 MPI_FARRAY6=" PARAMETER (MPI_DISTRIBUTE_NONE=123)"
391 MPI_FARRAY7=" PARAMETER (MPI_DISTRIBUTE_DFLT_DARG=-49767)"
393 rm -f conftest$EXEEXT mpitest.c
397 define(PAC_CHECK_MPI_SGI_INFO_NULL,[
398 AC_MSG_CHECKING([if MPI_INFO_NULL is defined in mpi.h])
400 cat > mpitest.c <<EOF
402 main(int argc, char **argv)
408 rm -f conftest$EXEEXT
409 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB > /dev/null 2>&1
410 if test -x conftest$EXEEXT ; then
412 cp adio/sgi/mpi3.1/*.h include
416 rm -f conftest$EXEEXT mpitest.c
421 define(PAC_CHECK_MPIOF_H,[
422 AC_MSG_CHECKING(if mpiof.h is included in mpif.h)
424 cat > mpitest.f <<EOF
433 rm -f conftest$EXEEXT
434 $F77 $FFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.f $MPI_LIB > /dev/null 2>&1
435 if test -x conftest$EXEEXT ; then
441 rm -f conftest$EXEEXT mpitest.f
445 dnl check if pread64 is defined in IRIX. needed on IRIX 6.5
447 define(PAC_HAVE_PREAD64,[
448 AC_MSG_CHECKING(if pread64 is defined)
450 cat > conftest.c <<EOF
454 int fd=0, buf=0, i=0;
456 pread64(fd, &buf, i, off);
459 rm -f conftest$EXEEXT
460 $CC $USER_CFLAGS -o conftest$EXEEXT conftest.c > /dev/null 2>&1
461 if test -x conftest$EXEEXT ; then
463 AC_DEFINE(HAVE_PREAD64,,[Define if pread64 available])
467 rm -f conftest$EXEEXT conftest.c
471 define(PAC_TEST_MPI_SGI_type_is_contig,[
472 AC_MSG_CHECKING(if MPI_SGI_type_is_contig is defined)
474 cat > mpitest.c <<EOF
476 main(int argc, char **argv)
481 MPI_Init(&argc,&argv);
482 i = MPI_SGI_type_is_contig(type);
486 rm -f conftest$EXEEXT
487 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB > /dev/null 2>&1
488 if test -x conftest$EXEEXT ; then
492 AC_DEFINE(NO_MPI_SGI_type_is_contig,,[Define if no MPI type is contig])
494 rm -f conftest$EXEEXT mpitest.c
499 define(PAC_TEST_MPI_COMBINERS,[
500 AC_MSG_CHECKING(if MPI-2 combiners are defined in mpi.h)
502 cat > mpitest.c <<EOF
504 main(int argc, char **argv)
508 MPI_Init(&argc,&argv);
509 i = MPI_COMBINER_STRUCT;
513 rm -f conftest$EXEEXT
514 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB > /dev/null 2>&1
515 if test -x conftest$EXEEXT ; then
517 AC_DEFINE(HAVE_MPI_COMBINERS,,[Define if MPI combiners available])
521 rm -f conftest$EXEEXT mpitest.c
525 dnl PAC_MPI_OFFSET_KIND()
527 dnl tries to determine the Fortran 90 kind parameter for 8-byte integers
529 define(PAC_MPI_OFFSET_KIND,
531 # This is needed for Mac OSX 10.5
534 # Determine the extension for Fortran 90 files (not all compilers accept
535 # .f and not all accept .f90)
536 if test -z "$ac_f90ext" ; then
537 if test -z "$FC" ; then
538 # This list should correspond to the list in aclocal_fc.m4
539 AC_CHECK_PROGS(FC,ifort pgf90 pathf90 pathf95 xlf90 xlf95 f90 epcf90 \
540 f95 fort lf95 gfortran g95 ifc efc)
542 AC_MSG_CHECKING([for extension for Fortran 90 programs])
544 ac_f90compile='${FC-f90} -c $FCFLAGS conftest.$ac_f90ext 1>&AC_FD_CC'
545 cat > conftest.$ac_f90ext <<EOF
549 if AC_TRY_EVAL(ac_f90compile) ; then
552 # This is needed for Mac OSX 10.5
556 cat > conftest.$ac_f90ext <<EOF
560 if AC_TRY_EVAL(ac_f90compile) ; then
563 AC_MSG_RESULT([unknown!])
567 AC_MSG_CHECKING([for Fortran 90 KIND parameter for 8-byte integers])
568 cat <<EOF > conftest.$ac_f90ext
571 i = selected_int_kind(16)
572 open(8, file="conftest.out", form="formatted")
578 if test -z "$FC" ; then
582 if $FC -o conftest$EXEEXT conftest.$ac_f90ext >/dev/null 2>&1 ; then
583 ./conftest$EXEEXT >/dev/null 2>&1
584 if test -s conftest.out ; then
585 KINDVAL=`cat conftest.out`
588 # This is needed for Mac OSX 10.5
591 if test -n "$KINDVAL" -a "$KINDVAL" != "-1" ; then
592 AC_MSG_RESULT($KINDVAL)
593 MPI_OFFSET_KIND1=" INTEGER MPI_OFFSET_KIND"
594 MPI_OFFSET_KIND2=" PARAMETER (MPI_OFFSET_KIND=$KINDVAL)"
596 AC_MSG_RESULT(unavailable)
601 define(PAC_TEST_MPI_HAVE_OFFSET_KIND,[
602 AC_MSG_CHECKING(if MPI_OFFSET_KIND is defined in mpif.h)
604 cat > mpitest.f <<EOF
613 rm -f conftest$EXEEXT
614 $F77 $FFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.f $MPI_LIB > /dev/null 2>&1
615 if test -x conftest$EXEEXT ; then
622 rm -f conftest$EXEEXT mpitest.f
626 dnl PAC_GET_XFS_MEMALIGN
629 define(PAC_GET_XFS_MEMALIGN,
630 [AC_MSG_CHECKING([for memory alignment needed for direct I/O])
632 rm -f /tmp/romio_tmp.bin
633 AC_TEST_PROGRAM([#include <stdio.h>
639 int fd = open("/tmp/romio_tmp.bin", O_RDWR | O_CREAT, 0644);
640 FILE *f=fopen("memalignval","w");
641 if (fd == -1) exit(1);
643 fcntl(fd, F_DIOINFO, &st);
644 fprintf( f, "%u\n", st.d_mem);
646 }],Pac_CV_NAME=`cat memalignval`,Pac_CV_NAME="")
648 rm -f /tmp/romio_tmp.bin
649 if test -n "$Pac_CV_NAME" -a "$Pac_CV_NAME" != 0 ; then
650 AC_MSG_RESULT($Pac_CV_NAME)
651 CFLAGS="$CFLAGS -DXFS_MEMALIGN=$Pac_CV_NAME"
653 AC_MSG_RESULT(unavailable, assuming 128)
654 CFLAGS="$CFLAGS -DXFS_MEMALIGN=128"
659 define(PAC_HAVE_MOUNT_NFS,[
660 AC_MSG_CHECKING([if MOUNT_NFS is defined in the include files])
662 cat > conftest.c <<EOF
663 #include <sys/param.h>
664 #include <sys/mount.h>
670 rm -f conftest$EXEEXT
671 $CC $USER_CFLAGS -o conftest$EXEEXT conftest.c > /dev/null 2>&1
672 if test -x conftest$EXEEXT ; then
674 ROMIO_HAVE_MOUNT_NFS=1
675 AC_DEFINE(HAVE_MOUNT_NFS,,[Define if MOUNT_NFS defined])
677 ROMIO_HAVE_MOUNT_NFS=0
680 rm -f conftest$EXEEXT conftest.c
684 dnl PAC_MPI_OFFSET_KIND_4BYTE()
686 dnl tries to determine the Fortran 90 kind parameter for 4-byte integers
688 define(PAC_MPI_OFFSET_KIND_4BYTE,
689 [AC_MSG_CHECKING([for Fortran 90 KIND parameter for 4-byte integers])
690 rm -f kind.f kind.$OBJEXT kind$EXEEXT
694 i = selected_int_kind(8)
695 open(8, file="k.out", form="formatted")
701 if test -z "$FC" ; then
705 if $FC -o kind$EXEEXT kind.f >/dev/null 2>&1 ; then
706 ./kind >/dev/null 2>&1
707 if test -s k.out ; then
711 rm -f kind$EXEEXT k.out kind.f kind.$OBJEXT
712 if test -n "$KINDVAL" -a "$KINDVAL" != "-1" ; then
713 AC_MSG_RESULT($KINDVAL)
714 MPI_OFFSET_KIND1=" INTEGER MPI_OFFSET_KIND"
715 MPI_OFFSET_KIND2=" PARAMETER (MPI_OFFSET_KIND=$KINDVAL)"
717 AC_MSG_RESULT(unavailable)
722 define(PAC_FUNC_STRERROR,[
723 AC_MSG_CHECKING([for strerror()])
725 cat > conftest.c <<EOF
729 char *s = strerror(5);
732 rm -f conftest$EXEEXT
733 $CC $USER_CFLAGS -o conftest$EXEXT conftest.c >> config.log 2>&1
734 if test -x conftest$EXEEXT ; then
736 AC_DEFINE(HAVE_STRERROR,,[Define if strerror available])
739 AC_MSG_CHECKING([for sys_errlist])
742 cat > conftest.c <<EOF
746 extern char *sys_errlist[];
747 printf("%s\n", sys_errlist[34]);
751 rm -f conftest$EXEEXT
752 $CC $USER_CFLAGS -o conftest$EXEEXT conftest.c > config.log 2>&1
753 if test -x conftest$EXEEXT ; then
755 AC_DEFINE(HAVE_SYSERRLIST,,[Define if syserrlist available])
760 rm -f conftest$EXEEXT conftest.c
763 define(PAC_TEST_MPIR_STATUS_SET_BYTES,[
764 AC_MSG_CHECKING(if MPIR_Status_set_bytes is defined)
766 cat > mpitest.c <<EOF
768 main(int argc, char **argv)
774 MPI_Init(&argc,&argv);
775 MPIR_Status_set_bytes(status,type,err);
779 rm -f conftest$EXEEXT
780 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB > /dev/null 2>&1
781 if test -x conftest$EXEEXT ; then
783 AC_DEFINE(HAVE_STATUS_SET_BYTES,,[Define if status set bytes available])
787 rm -f conftest$EXEEXT mpitest.c
789 define(PAC_TEST_MPIU_FUNCS,[
790 AC_MSG_CHECKING(support for MPICH2 memory macros)
792 cat > mpitest.c <<EOF
795 main(Int argc, char **argv)
800 rm -f conftest$EXEEXT
801 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB > /dev/null 2>&1
802 if test -x conftest$EXEEXT ; then
804 AC_DEFINE(HAVE_MPIU_FUNCS,1,[Define if MPICH2 memory tracing macros defined])
808 rm -f conftest$EXEEXT mpitest.c
811 define(PAC_TEST_MPI_GREQUEST,[
812 AC_MSG_CHECKING(support for generalized requests)
814 cat > mpitest.c <<EOF
817 main(int argc, char **argv)
820 MPI_Init(&argc, &argv);
821 MPI_Grequest_start(NULL, NULL, NULL, NULL, &request);
825 rm -f conftest$EXEEXT
826 $CC $USER_CFLAGS -I$MPI_INCLUDE_DIR -o conftest$EXEEXT mpitest.c $MPI_LIB > /dev/null 2>&1
827 if test -x conftest$EXEEXT ; then
829 AC_DEFINE(HAVE_MPI_GREQUEST,1,[Define if generalized requests avaliable])
830 DEFINE_HAVE_MPI_GREQUEST="#define HAVE_MPI_GREQUEST 1"
834 rm -f conftest$EXEEXT mpitest.c