diff options
author | Ben Gamari <ben@smart-cactus.org> | 2022-03-30 18:33:45 -0400 |
---|---|---|
committer | Andreas Klebinger <klebinger.andreas@gmx.at> | 2022-04-21 14:25:52 +0000 |
commit | d17d83f97fc6e29702eee90b83aee5cacf9fd00a (patch) | |
tree | ec91620143733ef560b2e45b589a787eb6afd0a5 | |
parent | 0c02c9199c26bebde17cd0afd378802c6d622a88 (diff) | |
download | haskell-wip/T21317.tar.gz |
configure: update autoconfwip/T21317
autoupdate claims that AC_HEADER_TIME is not longer necessary, so drop
it.
Fixes #21317.
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | m4/ax_compare_version.m4 | 5 | ||||
-rw-r--r-- | m4/fp_check_alignment.m4 | 2 | ||||
-rw-r--r-- | m4/fp_check_timer_create.m4 | 7 | ||||
-rw-r--r-- | m4/fp_set_cflags_c99.m4 | 10 | ||||
-rw-r--r-- | rts/posix/ticker/Pthread.c | 15 | ||||
-rw-r--r-- | rts/posix/ticker/Setitimer.c | 15 |
7 files changed, 28 insertions, 41 deletions
diff --git a/configure.ac b/configure.ac index 7f2fb42bc6..01b9727483 100644 --- a/configure.ac +++ b/configure.ac @@ -13,7 +13,7 @@ dnl # see what flags are available. (Better yet, read the documentation!) # -AC_INIT([The Glorious Glasgow Haskell Compilation System], [9.3], [glasgow-haskell-bugs@haskell.org], [ghc-AC_PACKAGE_VERSION]) +AC_INIT([The Glorious Glasgow Haskell Compilation System],[9.3],[glasgow-haskell-bugs@haskell.org],[ghc-AC_PACKAGE_VERSION]) # Version on master must be X.Y (not X.Y.Z) for ProjectVersionMunged variable # to be useful (cf #19058). However, the version must have three components # (X.Y.Z) on stable branches (e.g. ghc-9.2) to ensure that pre-releases are @@ -83,18 +83,18 @@ dnl * We need 2.52 due to the use of AS_TR_CPP and AS_TR_SH. dnl * Using autoconf 2.59 started to give nonsense like this dnl #define SIZEOF_CHAR 0 dnl recently. -AC_PREREQ([2.69]) +AC_PREREQ([2.71]) # ------------------------------------------------------------------------- # Prepare to generate the following header files # # This one is autogenerated by autoheader. -AC_CONFIG_HEADER(mk/config.h) +AC_CONFIG_HEADERS([mk/config.h]) # This one is manually maintained. -AC_CONFIG_HEADER(compiler/ghc-llvm-version.h) +AC_CONFIG_HEADERS([compiler/ghc-llvm-version.h]) dnl manually outputted above, for reasons described there. -dnl AC_CONFIG_HEADER(rts/include/ghcversion.h) +dnl AC_CONFIG_HEADERS([rts/include/ghcversion.h]) # No, semi-sadly, we don't do `--srcdir'... if test x"$srcdir" != 'x.' ; then @@ -146,7 +146,7 @@ if test "$EnableDistroToolchain" = "YES"; then fi AC_ARG_ENABLE(asserts-all-ways, -[AC_HELP_STRING([--enable-asserts-all-ways], +[AS_HELP_STRING([--enable-asserts-all-ways], [Usually ASSERTs are only compiled in the DEBUG way, this will enable them in all ways.])], [FP_CAPITALIZE_YES_NO(["$enableval"], [EnableAssertsAllWays])], @@ -881,9 +881,6 @@ AC_CHECK_HEADERS([sys/cpuset.h], [], [], dnl ** check whether a declaration for `environ` is provided by libc. FP_CHECK_ENVIRON -dnl ** check if it is safe to include both <time.h> and <sys/time.h> -AC_HEADER_TIME - dnl ** do we have long longs? AC_CHECK_TYPES([long long]) diff --git a/m4/ax_compare_version.m4 b/m4/ax_compare_version.m4 index ffb4997e8b..1fc97febf1 100644 --- a/m4/ax_compare_version.m4 +++ b/m4/ax_compare_version.m4 @@ -145,8 +145,7 @@ x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` B=`echo "$B" | sed "s/\(\([[0-9]]\{4\}\)\{m4_substr($2,2)\}\).*/\1/"` ], [.+],[ - AC_WARNING( - [invalid OP numeric parameter: $2]) + m4_warn([syntax], [invalid OP numeric parameter: $2]) ],[]) # Pad zeros at end of numbers to make same length. @@ -162,7 +161,7 @@ x$B" | sed 's/^ *//' | sort -r | sed "s/x${A}/true/;s/x${B}/false/;1q"` [ne],[ test "x$A" != "x$B" && ax_compare_version=true ],[ - AC_WARNING([invalid OP parameter: $2]) + m4_warn([syntax], [invalid OP parameter: $2]) ]) ]) diff --git a/m4/fp_check_alignment.m4 b/m4/fp_check_alignment.m4 index a000c42582..7ff64aae8d 100644 --- a/m4/fp_check_alignment.m4 +++ b/m4/fp_check_alignment.m4 @@ -4,7 +4,7 @@ # given type. Defines ALIGNMENT_TYPE. AC_DEFUN([FP_CHECK_ALIGNMENT], [AS_LITERAL_IF(m4_translit([[$1]], [*], [p]), [], - [AC_FATAL([$0: requires literal arguments])])[]dnl + [m4_fatal([$0: requires literal arguments])])[]dnl AC_CHECK_TYPE([$1], [], [], [$3])[]dnl m4_pushdef([fp_Cache], [AS_TR_SH([fp_cv_alignment_$1])])[]dnl AC_CACHE_CHECK([alignment of $1], [fp_Cache], diff --git a/m4/fp_check_timer_create.m4 b/m4/fp_check_timer_create.m4 index e698885065..3860d6523d 100644 --- a/m4/fp_check_timer_create.m4 +++ b/m4/fp_check_timer_create.m4 @@ -15,7 +15,7 @@ then else AC_CACHE_CHECK([for a working timer_create(CLOCK_REALTIME)], [fptools_cv_timer_create_works], - [AC_TRY_RUN([ + [AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <stdio.h> #if defined(HAVE_STDLIB_H) #include <stdlib.h> @@ -99,9 +99,10 @@ int main(int argc, char *argv[]) exit(0); } - ], + ]])], [fptools_cv_timer_create_works=yes], - [fptools_cv_timer_create_works=no]) + [fptools_cv_timer_create_works=no], + []) ]) case $fptools_cv_timer_create_works in yes) AC_DEFINE([USE_TIMER_CREATE], 1, diff --git a/m4/fp_set_cflags_c99.m4 b/m4/fp_set_cflags_c99.m4 index b9644efe66..269f692278 100644 --- a/m4/fp_set_cflags_c99.m4 +++ b/m4/fp_set_cflags_c99.m4 @@ -6,31 +6,35 @@ # $3 is name of CPP flags variable (augmented if needed) AC_DEFUN([FP_SET_CFLAGS_C99], [ - dnl save current state of AC_PROG_CC_C99 + AC_PROG_CC FP_COPY_SHELLVAR([CC],[fp_save_CC]) FP_COPY_SHELLVAR([CFLAGS],[fp_save_CFLAGS]) FP_COPY_SHELLVAR([CPPFLAGS],[fp_save_CPPFLAGS]) FP_COPY_SHELLVAR([ac_cv_prog_cc_c99],[fp_save_cc_c99]) + dnl set local state CC="$$1" CFLAGS="$$2" CPPFLAGS="$$3" unset ac_cv_prog_cc_c99 + dnl perform detection - AC_PROG_CC_C99 + AC_PROG_CC fp_cc_c99="$ac_cv_prog_cc_c99" case "x$ac_cv_prog_cc_c99" in x) ;; # noop - xno) AC_MSG_ERROR([C99-compatible compiler needed]) ;; + xno) AC_MSG_ERROR([$CC does not appear to be C99-compatible]) ;; *) $2="$$2 $ac_cv_prog_cc_c99" $3="$$3 $ac_cv_prog_cc_c99" ;; esac + dnl restore saved state FP_COPY_SHELLVAR([fp_save_CC],[CC]) FP_COPY_SHELLVAR([fp_save_CFLAGS],[CFLAGS]) FP_COPY_SHELLVAR([fp_save_CPPFLAGS],[CPPFLAGS]) FP_COPY_SHELLVAR([fp_save_cc_c99],[ac_cv_prog_cc_c99]) + dnl cleanup unset fp_save_CC unset fp_save_CFLAGS diff --git a/rts/posix/ticker/Pthread.c b/rts/posix/ticker/Pthread.c index 7d39fd1b10..c0160a9fc5 100644 --- a/rts/posix/ticker/Pthread.c +++ b/rts/posix/ticker/Pthread.c @@ -44,17 +44,10 @@ #include "Schedule.h" #include "posix/Clock.h" -/* As recommended in the autoconf manual */ -# if defined(TIME_WITH_SYS_TIME) -# include <sys/time.h> -# include <time.h> -# else -# if defined(HAVE_SYS_TIME_H) -# include <sys/time.h> -# else -# include <time.h> -# endif -# endif +#if defined(HAVE_SYS_TIME_H) +#include <sys/time.h> +#endif +#include <time.h> #if defined(HAVE_SIGNAL_H) # include <signal.h> diff --git a/rts/posix/ticker/Setitimer.c b/rts/posix/ticker/Setitimer.c index 816d603db3..1dcd07b2c2 100644 --- a/rts/posix/ticker/Setitimer.c +++ b/rts/posix/ticker/Setitimer.c @@ -15,17 +15,10 @@ #include "posix/Clock.h" #include "posix/Signals.h" -/* As recommended in the autoconf manual */ -# if defined(TIME_WITH_SYS_TIME) -# include <sys/time.h> -# include <time.h> -# else -# if defined(HAVE_SYS_TIME_H) -# include <sys/time.h> -# else -# include <time.h> -# endif -# endif +#if defined(HAVE_SYS_TIME_H) +#include <sys/time.h> +#endif +#include <time.h> #if defined(HAVE_SIGNAL_H) # include <signal.h> |