X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=acinclude.m4;h=7e262c561d4b579def9052e66016eb5e1e4c1599;hb=44865eced89408cf217088517ee407c0ddd7d517;hp=98864ea5bc2bfbc2dbc5e6e5fd12cce78449eac2;hpb=ea411b6c81ab5895051535a4730210a66d4be388;p=pspp diff --git a/acinclude.m4 b/acinclude.m4 index 98864ea5bc..7e262c561d 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -75,8 +75,6 @@ AC_DEFUN([PSPP_PERL_MODULE], [PSPP_REQUIRED_PREREQ([Config::Perl::V Perl module (or use --without-perl-module)])]) CHECK_PERL_MODULE([Text::Diff], [], [PSPP_OPTIONAL_PREREQ([Text::Diff Perl module for running Perl tests])]) - CHECK_PERL_MODULE([Memory::Usage], [], - [PSPP_OPTIONAL_PREREQ([Memory::Usage Perl module for running Perl tests])]) fi]) dnl Check that Python 3 is available. @@ -96,7 +94,7 @@ dnl Check whether the given C compiler OPTION is accepted. dnl If so, execute ACTION-IF-ACCEPTED, otherwise ACTION-IF-REJECTED. AC_DEFUN([PSPP_CHECK_CC_OPTION], [ - m4_define([pspp_cv_name], [pspp_cv_[]m4_translit([$1], [-], [_])])dnl + m4_define([pspp_cv_name], [pspp_cv_[]m4_translit([$1], [-=], [__])])dnl AC_CACHE_CHECK([whether $CC accepts $1], [pspp_cv_name], [pspp_save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $1" @@ -349,14 +347,27 @@ dnl PSPP_ENABLE_WERROR AC_DEFUN([PSPP_ENABLE_WERROR], [AC_ARG_ENABLE( [Werror], - [AC_HELP_STRING([--enable-Werror], [Add -Werror to CFLAGS])], + [AS_HELP_STRING([--enable-Werror], [Add -Werror to CFLAGS])], [], [enable_Werror=no]) AC_CONFIG_COMMANDS_PRE( [if test "X$enable_Werror" = Xyes; then CFLAGS="$CFLAGS -Werror -Wno-error=deprecated-declarations" # gnulib needs this, for now: CFLAGS="$CFLAGS -Wno-error=attributes" - fi])]) + fi]) + + dnl Gnulib triggers the following error for me with GCC 12.x: + dnl + dnl In function 'convert_to_decimal', + dnl inlined from 'scale10_round_decimal_decoded' at ../gl/vasnprintf.c:1368:12: + dnl ../gl/vasnprintf.c:939:26: error: argument 1 value '18446744073709551615' exceeds maximum object size 9223372036854775807 [-Werror=alloc-size-larger-than=] + dnl 939 | char *c_ptr = (char *) malloc (xsum (xsum (extra_zeroes, c_len), 1)); + dnl | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + dnl + dnl I prefer to just disable the error because I think the warning is wrong. + if test "X$enable_Werror" = Xyes; then + PSPP_ENABLE_OPTION([-Wno-error=alloc-size-larger-than=]) + fi]) # The following comes from Open vSwitch: # ----------------------------------------------------------------------