@@ -300,10 +300,9 @@ if test "x$enable_darshan_runtime" = xyes ; then
300300 AC_MSG_ERROR ( [ --enable-apmpi-mod Autoperf MPI module requires MPI support] )
301301 fi
302302 abssrcdir=$(readlink -f ${srcdir})
303- AC_CHECK_HEADER ( [ ${abssrcdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h] ,
304- [ ] ,
305- [ AC_MSG_ERROR ( [ The Autoperf MPI module is not present] ) ] ,
306- [ -] ) # this last part tells it to only check for presence
303+ AC_CHECK_FILE ( [ ${abssrcdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h] ,
304+ [ ] ,
305+ [ AC_MSG_ERROR ( [ The Autoperf MPI module is not present] ) ] )
307306
308307 # APMPI only support MPI v3 or higher
309308 AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [ [
@@ -339,10 +338,9 @@ if test "x$enable_darshan_runtime" = xyes ; then
339338 [ with_papi=-lpapi] ,
340339 [ AC_MSG_ERROR ( [ Cannot find papi header required for Autoperf XC module] ) ] ,
341340 [ ] )
342- AC_CHECK_HEADER ( [ ${abssrcdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h] ,
343- [ ] ,
344- [ AC_MSG_ERROR ( [ The Autoperf XC git submodule is not present] ) ] ,
345- [ -] ) # this last part tells it to only check for presence
341+ AC_CHECK_FILE ( [ ${abssrcdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h] ,
342+ [ ] ,
343+ [ AC_MSG_ERROR ( [ The Autoperf XC git submodule is not present] ) ] )
346344 fi
347345
348346 # inform about HDF5 installs not found in default locations
@@ -665,34 +663,29 @@ if test "x$enable_darshan_runtime" = xyes ; then
665663 old_cflags="$CFLAGS"
666664 CFLAGS="$CFLAGS -Werror"
667665 AC_MSG_CHECKING ( for MPI prototypes without const qualifier )
668- AC_TRY_COMPILE (
669- [
670- #include <mpi.h>
671- int MPI_File_open(MPI_Comm comm, char *filename, int amode,
672- MPI_Info info, MPI_File *fh)
673- {return 0;}
674- ] ,
675- [ ] ,
676- [ AC_MSG_RESULT ( yes )
677- AS_IF ( [ test "x$BUILD_APMPI_MODULE" = "x1"] ,
678- AC_MSG_ERROR ( APMPI module requires MPI version 3+ ) ) ] ,
679- [ AC_MSG_RESULT ( no )
666+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [
667+ #include <mpi.h>
668+ int MPI_File_open(MPI_Comm comm, char *filename, int amode,
669+ MPI_Info info, MPI_File *fh)
670+ {return 0;}
671+ ] ,[ ] ) ] ,
672+ [ AC_MSG_RESULT ( yes )
673+ AS_IF ( [ test "x$BUILD_APMPI_MODULE" = "x1"] ,
674+ AC_MSG_ERROR ( APMPI module requires MPI version 3+ ) ) ] ,
675+ [ AC_MSG_RESULT ( no )
680676
681677 # unable to compile without const qualifiers. Let's try again with
682678 # const qualifiers.
683679 AC_MSG_CHECKING ( for MPI prototypes with const qualifier )
684- AC_TRY_COMPILE (
685- [
686- #include <mpi.h>
687- int MPI_File_open(MPI_Comm comm, const char *filename, int amode,
688- MPI_Info info, MPI_File *fh)
689- {return 0;}
690- ] ,
691- [ ] ,
692- AC_MSG_RESULT ( yes )
693- AC_DEFINE ( HAVE_MPI_CONST , 1 , Define if MPI prototypes use const qualifier ) ,
694- ,
695- AC_MSG_ERROR ( Darshan is unable to find a compatible MPI_File_open prototype )
680+ AC_COMPILE_IFELSE ( [ AC_LANG_PROGRAM ( [
681+ #include <mpi.h>
682+ int MPI_File_open(MPI_Comm comm, const char *filename, int amode,
683+ MPI_Info info, MPI_File *fh)
684+ {return 0;}
685+ ] ,[ ] ) ] ,
686+ [ AC_MSG_RESULT ( yes )
687+ AC_DEFINE ( HAVE_MPI_CONST , 1 , Define if MPI prototypes use const qualifier ) ] ,
688+ [ AC_MSG_ERROR ( Darshan is unable to find a compatible MPI_File_open prototype ) ]
696689 ) ]
697690 )
698691 CFLAGS="$old_cflags"
0 commit comments