Skip to content

Commit f7beef8

Browse files
committed
Updates to m4 files
1 parent 9350463 commit f7beef8

13 files changed

+26
-31
lines changed

m4/ax_mpi.m4

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080

8181
AU_ALIAS([ACX_MPI], [AX_MPI])
8282
AC_DEFUN([AX_MPI], [
83-
AC_PREREQ(2.50) dnl for AC_LANG_CASE
83+
AC_PREREQ([2.71]) dnl for AC_LANG_CASE
8484
8585
AC_LANG_CASE([C], [
8686
AC_REQUIRE([AC_PROG_CC])
@@ -194,16 +194,16 @@ if test x = x"$MPILIBS"; then
194194
AC_CHECK_LIB(mpich, MPI_Init, [MPILIBS="-lmpich"])
195195
fi
196196
197-
dnl We have to use AC_TRY_COMPILE and not AC_CHECK_HEADER because the
197+
dnl We have to use AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[],[]) and not AC_CHECK_HEADER because the
198198
dnl latter uses $CPP, not $CC (which may be mpicc).
199199
AC_LANG_CASE([C], [if test x != x"$MPILIBS"; then
200200
AC_MSG_CHECKING([for mpi.h])
201-
AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
201+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mpi.h>]], [[]])],[AC_MSG_RESULT(yes)],[MPILIBS=""
202202
AC_MSG_RESULT(no)])
203203
fi],
204204
[C++], [if test x != x"$MPILIBS"; then
205205
AC_MSG_CHECKING([for mpi.h])
206-
AC_TRY_COMPILE([#include <mpi.h>],[],[AC_MSG_RESULT(yes)], [MPILIBS=""
206+
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <mpi.h>]], [[]])],[AC_MSG_RESULT(yes)],[MPILIBS=""
207207
AC_MSG_RESULT(no)])
208208
fi],
209209
[Fortran 77], [if test x != x"$MPILIBS"; then

m4/ax_openmp.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
#serial 8
6969

7070
AC_DEFUN([AX_OPENMP], [
71-
AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
71+
AC_PREREQ([2.71]) dnl for _AC_LANG_PREFIX
7272
7373
AC_CACHE_CHECK([for OpenMP flag of _AC_LANG compiler], ax_cv_[]_AC_LANG_ABBREV[]_openmp, [save[]_AC_LANG_PREFIX[]FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
7474
ax_cv_[]_AC_LANG_ABBREV[]_openmp=unknown

m4/fftw.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
AC_DEFUN([AX_FFTW],[
66
AC_ARG_WITH(fftw,
7-
AC_HELP_STRING([--with-fftw=PFX], [Prefix where FFTW has been installed] ),
7+
AS_HELP_STRING([--with-fftw=PFX],[Prefix where FFTW has been installed ]),
88
[
99
test "$withval" = no && AC_MSG_WARN([fftw is a required package for some modules])
1010
test "$withval" = yes || fftw_prefix="$withval"

m4/gmp.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
AC_DEFUN([AX_GMP],[
66
AC_ARG_WITH(gmp,
7-
AC_HELP_STRING([--with-gmp=PFX], [Prefix where GMP has been installed] ),
7+
AS_HELP_STRING([--with-gmp=PFX],[Prefix where GMP has been installed ]),
88
[
99
test "$withval" = no && AC_MSG_WARN([gmp is a required package for some modules])
1010
test "$withval" = yes || gmp_prefix="$withval"

m4/gsl.m4

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,19 +89,17 @@ AC_ARG_ENABLE(gsltest, [ --disable-gsltest Do not try to compile and run
8989
echo "*** Could not run GSL test program, checking why..."
9090
CFLAGS="$CFLAGS $GSL_FLAGS"
9191
LIBS="$LIBS $GSL_LIBS"
92-
AC_TRY_LINK([
92+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[
9393
#include <stdio.h>
94-
], [ return 0; ],
95-
[ echo "*** The test program compiled, but did not run. This usually means"
94+
]], [[ return 0; ]])],[ echo "*** The test program compiled, but did not run. This usually means"
9695
echo "*** that the run-time linker is not finding GSL or finding the wrong"
9796
echo "*** version of GSL. If it is not finding GSL, you'll need to set your"
9897
echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
9998
echo "*** to the installed location Also, make sure you have run ldconfig if that"
10099
echo "*** is required on your system"
101100
echo "***"
102101
echo "*** If you have an old version installed, it is best to remove it, although"
103-
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],
104-
[ echo "*** The test program failed to compile or link. See the file config.log for the"
102+
echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH"],[ echo "*** The test program failed to compile or link. See the file config.log for the"
105103
echo "*** exact error that occured. This usually means GSL was incorrectly installed"
106104
echo "*** or that you have moved GSL since it was installed. In the latter case, you"
107105
echo "*** may want to edit the gsl-config script: $GSL_CONFIG" ])

m4/hdf5.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
AC_DEFUN([AX_HDF5],[
66
AC_ARG_WITH(hdf5,
7-
AC_HELP_STRING([--with-hdf5=PFX], [Prefix where HDF5 has been installed] ),
7+
AS_HELP_STRING([--with-hdf5=PFX],[Prefix where HDF5 has been installed ]),
88
[
99
test "$withval" = no && AC_MSG_WARN([hdf5 is a required package for some modules])
1010
test "$withval" = yes || hdf5_prefix="$withval"

m4/m4_ax_blas.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
AU_ALIAS([ACX_BLAS], [AX_BLAS])
7070
AC_DEFUN([AX_BLAS], [
71-
AC_PREREQ([2.55])
71+
AC_PREREQ([2.71])
7272
AC_REQUIRE([AC_F77_LIBRARY_LDFLAGS])
7373
AC_REQUIRE([AC_CANONICAL_HOST])
7474
ax_blas_ok=no

m4/m4_ax_blas_f77_func.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
AU_ALIAS([ACX_BLAS_F77_FUNC], [AX_BLAS_F77_FUNC])
5858
AC_DEFUN([AX_BLAS_F77_FUNC], [
59-
AC_PREREQ(2.50)
59+
AC_PREREQ([2.71])
6060
AC_REQUIRE([AX_BLAS])
6161
6262
# F77 call-compatibility checks
@@ -191,7 +191,7 @@ fi
191191
])dnl AX_BLAS_F77_FUNC
192192

193193
AC_DEFUN([AX_BLAS_WITH_F77_FUNC], [
194-
AC_PREREQ(2.50)
194+
AC_PREREQ([2.71])
195195
AX_BLAS([# disable special action], [])
196196
if test x$ax_blas_ok = xyes ; then
197197
AX_BLAS_F77_FUNC(

m4/m4_ax_lib_hdf5.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,8 @@ HDF5 support is being disabled (equivalent to --with-hdf5=no).
257257
AC_MSG_WARN([Unable to compile HDF5 test program])
258258
fi
259259
dnl Look for HDF5's high level library
260-
AC_HAVE_LIBRARY([hdf5_hl], [HDF5_LIBS="-lhdf5_hl $HDF5_LIBS"], [], [])
260+
AC_CHECK_LIB([hdf5_hl],[main],[HDF5_LIBS="-lhdf5_hl $HDF5_LIBS"],[],[])ac_cv_lib_hdf5_hl=ac_cv_lib_hdf5_hl_main
261+
261262
262263
CC=$ax_lib_hdf5_save_CC
263264
CPPFLAGS=$ax_lib_hdf5_save_CPPFLAGS

m4/mpfr.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
AC_DEFUN([AX_MPFR],[
66
AC_ARG_WITH(mpfr,
7-
AC_HELP_STRING([--with-mpfr=PFX], [Prefix where MPFR has been installed] ),
7+
AS_HELP_STRING([--with-mpfr=PFX],[Prefix where MPFR has been installed ]),
88
[
99
test "$withval" = no && AC_MSG_WARN([mpfr is a required package for some modules])
1010
test "$withval" = yes || mpfr_prefix="$withval"

m4/netcdf.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
AC_DEFUN([AX_NETCDF],[
66
AC_ARG_WITH(netcdf,
7-
AC_HELP_STRING([--with-netcdf=PFX], [Prefix where NETCDF has been installed] ),
7+
AS_HELP_STRING([--with-netcdf=PFX],[Prefix where NETCDF has been installed ]),
88
[
99
test "$withval" = no && AC_MSG_WARN([netcdf is optional])
1010
test "$withval" = yes || netcdf_prefix="$withval"

m4/opencl.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ ax_cv_[]_AC_LANG_ABBREV[]_compiler_ms=$ax_compiler_ms
4949
AC_DEFUN([AX_CHECK_CL],
5050
[
5151
AC_ARG_WITH(opencl,
52-
AC_HELP_STRING([--with-opencl=PFX], [Prefix where OpenCl has been installed] ),
52+
AS_HELP_STRING([--with-opencl=PFX],[Prefix where OpenCl has been installed ]),
5353
[
5454
test "$withval" = no && AC_MSG_WARN([opencl is an optional package for sapporo2 ])
5555

m4/utils.m4

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ AC_DEFUN([AX_IFORT_VERSION], [
6363
#
6464
# AC_FIND_LIB(LIBRARY, FUNCTION, LIST-OF-DIRECTORIES [, ACTION-IF-FOUND
6565
# [, ACTION-IF-NOT-FOUND [, OTHER-LIBRARIES ]]])
66-
AC_DEFUN(AC_FIND_LIB,
66+
AC_DEFUN([AC_FIND_LIB],
6767
[AC_MSG_CHECKING([directories for -l$1])
6868
#
6969
# A lot of this is taken from AC_CHECK_LIB. Note that we always check
@@ -80,22 +80,18 @@ AC_DEFUN(AC_FIND_LIB,
8080
else
8181
LIBS="$LIBS -L$dir -l$1 $6"
8282
fi
83-
AC_TRY_LINK(
84-
ifelse([$2], [main], , # Avoid conflicting decl of main.
85-
[/* Override any gcc2 internal prototype to avoid an error. */
86-
]
87-
[/* We use char because int might match the return type of a gcc2
83+
AC_LINK_IFELSE([AC_LANG_PROGRAM([[ifelse($2, main, , # Avoid conflicting decl of main.
84+
/* Override any gcc2 internal prototype to avoid an error. */
85+
86+
/* We use char because int might match the return type of a gcc2
8887
builtin and then its argument prototype would still apply. */
8988
char $2();
90-
]),
91-
[$2()],
92-
if test "X$dir" = "X"; then
89+
)]], [[$2()]])],[if test "X$dir" = "X"; then
9390
eval "ac_cv_lib_$ac_lib_var=yes"
9491
else
9592
eval "ac_cv_lib_$ac_lib_var=$dir"
9693
fi
97-
break,
98-
eval "ac_cv_lib_$ac_lib_var=no")
94+
break],[eval "ac_cv_lib_$ac_lib_var=no"])
9995
LIBS="$ac_cache_save_LIBS"
10096
done
10197
])#

0 commit comments

Comments
 (0)