Skip to content

Commit 1a58868

Browse files
author
shanedsnyder
authored
Merge pull request #1010 from darshan-hpc/snyder/autoconf-update
MAINT: stop using deprecated autoconf functions
2 parents d55493b + 34f074d commit 1a58868

File tree

3 files changed

+31
-40
lines changed

3 files changed

+31
-40
lines changed

darshan-runtime/configure.ac

Lines changed: 25 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -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"

darshan-util/configure.ac

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -95,21 +95,19 @@ if test "x$enable_darshan_util" = xyes ; then
9595
[], [enable_apxc_mod=no]
9696
)
9797
if test "x$enable_apxc_mod" = xyes; then
98-
AC_CHECK_HEADER([${ac_abs_confdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h],
98+
AC_CHECK_FILE([${ac_abs_confdir}/../modules/autoperf/apxc/darshan-apxc-log-format.h],
9999
DARSHAN_USE_APXC=1,
100-
[AC_MSG_ERROR([The autoperf APXC module is not present])],
101-
[-]) # this last part tells it to only check for presence
100+
[AC_MSG_ERROR([The autoperf APXC module is not present])])
102101
fi
103102
AC_ARG_ENABLE([apmpi_mod],
104103
[AS_HELP_STRING([--enable-apmpi-mod],
105104
[enables compilation and use of the AutoPerf MPI module])],
106105
[], [enable_apmpi_mod=no]
107106
)
108107
if test "x$enable_apmpi_mod" = xyes; then
109-
AC_CHECK_HEADER([${ac_abs_confdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h],
110-
DARSHAN_USE_APMPI=1,
111-
[AC_MSG_ERROR([The autoperf MPI module is not present])],
112-
[-]) # this last part tells it to only check for presence
108+
AC_CHECK_FILE([${ac_abs_confdir}/../modules/autoperf/apmpi/darshan-apmpi-log-format.h],
109+
DARSHAN_USE_APMPI=1,
110+
[AC_MSG_ERROR([The autoperf MPI module is not present])])
113111
fi
114112

115113
AC_CHECK_FUNCS([strndup])

maint/config/check_bzlib.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ then
6161
LDFLAGS="$LDFLAGS -L${BZLIB_HOME}/lib"
6262
CPPFLAGS="$CPPFLAGS -I${BZLIB_HOME}/include"
6363
AC_LANG_SAVE
64-
AC_LANG_C
64+
AC_LANG([C])
6565
AC_CHECK_LIB(bz2, BZ2_bzCompressInit, [bzlib_cv_libbz2=yes], [bzlib_cv_libbz2=no])
6666
AC_CHECK_HEADER(bzlib.h, [bzlib_cv_bzlib_h=yes], [bzlib_cv_bzlib_h=no])
6767
AC_LANG_RESTORE

0 commit comments

Comments
 (0)