summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2021-02-12 16:38:29 +0100
committerSylvain Henry <sylvain@haskus.fr>2021-03-03 17:13:17 +0100
commitc3c801e3c36d8d7dfaaabdc56c646abdeef1c64e (patch)
tree4c4752e2f6764d3fb83fe26ea996918a8d8fd522
parent062b3a7e8b82881895a34e88ac3eb76f048b7fa4 (diff)
downloadhaskell-c3c801e3c36d8d7dfaaabdc56c646abdeef1c64e.tar.gz
Replace more autotools obsolete macros (#19189)
Backport of 42ab06f793c0164e2b60acc018ca37d91b46999a
-rw-r--r--aclocal.m44
-rw-r--r--configure.ac3
-rw-r--r--libraries/base/aclocal.m46
-rw-r--r--libraries/base/configure.ac7
-rw-r--r--libraries/ghc-bignum/configure.ac10
5 files changed, 12 insertions, 18 deletions
diff --git a/aclocal.m4 b/aclocal.m4
index f4d1351aeb..60008fac60 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -658,7 +658,7 @@ AC_DEFUN([FP_SET_CFLAGS_C99],
CPPFLAGS="$$3"
unset ac_cv_prog_cc_c99
dnl perform detection
- _AC_PROG_CC_C99
+ AC_PROG_CC_C99
fp_cc_c99="$ac_cv_prog_cc_c99"
case "x$ac_cv_prog_cc_c99" in
x) ;; # noop
@@ -860,7 +860,7 @@ AC_SUBST(ContextDiffCmd, [$fp_cv_context_diff])
# is supported in autoconf versions 2.50 up to the actual 2.57, so there is
# little risk.
AC_DEFUN([FP_COMPUTE_INT],
-[_AC_COMPUTE_INT([$1], [$2], [$3], [$4])[]dnl
+[AC_COMPUTE_INT([$2], [$1], [$3], [$4])[]dnl
])# FP_COMPUTE_INT
diff --git a/configure.ac b/configure.ac
index f133a26e55..b34db739f5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -954,9 +954,6 @@ dnl --------------------------------------------------
dnl * Platform header file and syscall feature tests
dnl ### checking the state of the local header files and syscalls ###
-dnl ** check for full ANSI header (.h) files
-AC_HEADER_STDC
-
dnl ** Enable large file support. NB. do this before testing the type of
dnl off_t, because it will affect the result of that test.
AC_SYS_LARGEFILE
diff --git a/libraries/base/aclocal.m4 b/libraries/base/aclocal.m4
index 528eac5d21..573c635ea2 100644
--- a/libraries/base/aclocal.m4
+++ b/libraries/base/aclocal.m4
@@ -1,4 +1,4 @@
-# FP_COMPUTE_INT(EXPRESSION, VARIABLE, INCLUDES, IF-FAILS)
+# FP_COMPUTE_INT(VARIABLE, EXPRESSION, INCLUDES, IF-FAILS)
# --------------------------------------------------------
# Assign VARIABLE the value of the compile-time EXPRESSION using INCLUDES for
# compilation. Execute IF-FAILS when unable to determine the value. Works for
@@ -10,7 +10,7 @@
# The public AC_COMPUTE_INT macro isn't supported by some versions of
# autoconf.
AC_DEFUN([FP_COMPUTE_INT],
-[_AC_COMPUTE_INT([$2], [$1], [$3], [$4])[]dnl
+[AC_COMPUTE_INT([$1], [$2], [$3], [$4])[]dnl
])# FP_COMPUTE_INT
@@ -33,7 +33,7 @@ AS_VAR_POPDEF([fp_Cache])[]dnl
# ---------------------------------------
# autoheader helper for FP_CHECK_CONSTS
m4_define([FP_CHECK_CONSTS_TEMPLATE],
-[AC_FOREACH([fp_Const], [$1],
+[m4_foreach_w([fp_Const], [$1],
[AH_TEMPLATE(AS_TR_CPP(CONST_[]fp_Const),
[The value of ]fp_Const[.])])[]dnl
])# FP_CHECK_CONSTS_TEMPLATE
diff --git a/libraries/base/configure.ac b/libraries/base/configure.ac
index 8242c539b3..d5dba61a16 100644
--- a/libraries/base/configure.ac
+++ b/libraries/base/configure.ac
@@ -22,9 +22,6 @@ AC_MSG_RESULT($WINDOWS)
# do we have long longs?
AC_CHECK_TYPES([long long])
-dnl ** check for full ANSI header (.h) files
-AC_HEADER_STDC
-
# check for specific header (.h) files that we are interested in
AC_CHECK_HEADERS([ctype.h errno.h fcntl.h inttypes.h limits.h signal.h sys/file.h sys/resource.h sys/select.h sys/stat.h sys/syscall.h sys/time.h sys/timeb.h sys/timers.h sys/times.h sys/types.h sys/utsname.h sys/wait.h termios.h time.h unistd.h utime.h windows.h winsock.h langinfo.h poll.h sys/epoll.h sys/event.h sys/eventfd.h sys/socket.h])
@@ -100,13 +97,13 @@ dnl * Deal with arguments telling us iconv is somewhere odd
dnl--------------------------------------------------------------------
AC_ARG_WITH([iconv-includes],
- [AC_HELP_STRING([--with-iconv-includes],
+ [AS_HELP_STRING([--with-iconv-includes],
[directory containing iconv.h])],
[ICONV_INCLUDE_DIRS=$withval; CPPFLAGS="-I$withval $CPPFLAGS"],
[ICONV_INCLUDE_DIRS=])
AC_ARG_WITH([iconv-libraries],
- [AC_HELP_STRING([--with-iconv-libraries],
+ [AS_HELP_STRING([--with-iconv-libraries],
[directory containing iconv library])],
[ICONV_LIB_DIRS=$withval; LDFLAGS="-L$withval $LDFLAGS"],
[ICONV_LIB_DIRS=])
diff --git a/libraries/ghc-bignum/configure.ac b/libraries/ghc-bignum/configure.ac
index b31da348d5..4ae9e64044 100644
--- a/libraries/ghc-bignum/configure.ac
+++ b/libraries/ghc-bignum/configure.ac
@@ -12,31 +12,31 @@ dnl * Deal with arguments telling us gmp is somewhere odd
dnl--------------------------------------------------------------------
AC_ARG_WITH([gmp],
- [AC_HELP_STRING([--with-gmp],
+ [AS_HELP_STRING([--with-gmp],
[Enable GMP backend])],
[GMP_ENABLED=YES],
[GMP_ENABLED=NO])
AC_ARG_WITH([gmp-includes],
- [AC_HELP_STRING([--with-gmp-includes],
+ [AS_HELP_STRING([--with-gmp-includes],
[directory containing gmp.h])],
[GMP_INCLUDE_DIRS=$withval; CPPFLAGS="-I$withval"],
[GMP_INCLUDE_DIRS=])
AC_ARG_WITH([gmp-libraries],
- [AC_HELP_STRING([--with-gmp-libraries],
+ [AS_HELP_STRING([--with-gmp-libraries],
[directory containing gmp library])],
[GMP_LIB_DIRS=$withval; LDFLAGS="-L$withval"],
[GMP_LIB_DIRS=])
AC_ARG_WITH([gmp-framework-preferred],
- [AC_HELP_STRING([--with-gmp-framework-preferred],
+ [AS_HELP_STRING([--with-gmp-framework-preferred],
[on OSX, prefer the GMP framework to the gmp lib])],
[GMP_PREFER_FRAMEWORK=YES],
[GMP_PREFER_FRAMEWORK=NO])
AC_ARG_WITH([intree-gmp],
- [AC_HELP_STRING([--with-intree-gmp],
+ [AS_HELP_STRING([--with-intree-gmp],
[force using the in-tree GMP])],
[GMP_FORCE_INTREE=YES],
[GMP_FORCE_INTREE=NO])