From e0a13e7b3043411ba80b578fcf320a98024c376a Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Fri, 13 Sep 2002 12:00:04 +0000 Subject: [PATCH] * configure.ac: Require 2.54. s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/. s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/. * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4: Remove, provided by Autoconf macros. --- ChangeLog | 8 ++++++++ configure.ac | 6 +++--- m4/Makefile.am | 6 +++--- m4/c-bs-a.m4 | 29 ----------------------------- m4/malloc.m4 | 40 ---------------------------------------- m4/mbstate_t.m4 | 32 -------------------------------- m4/realloc.m4 | 40 ---------------------------------------- 7 files changed, 14 insertions(+), 147 deletions(-) delete mode 100644 m4/c-bs-a.m4 delete mode 100644 m4/malloc.m4 delete mode 100644 m4/mbstate_t.m4 delete mode 100644 m4/realloc.m4 diff --git a/ChangeLog b/ChangeLog index 862b4746..6e34ac31 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2002-09-13 Akim Demaille + + * configure.ac: Require 2.54. + s/jm_FUNC_MALLOC/AC_FUNC_MALLOC/. + s/jm_FUNC_REALLOC/AC_FUNC_REALLOC/. + * m4/c-bs-a.m4, m4/malloc.m4, m4/mbstate_t.m4, m4/realloc.m4: + Remove, provided by Autoconf macros. + 2002-09-12 Akim Demaille * m4/prereq.m4: Update, from Coreutils 4.5.1. diff --git a/configure.ac b/configure.ac index 60415917..2a2f915a 100644 --- a/configure.ac +++ b/configure.ac @@ -18,7 +18,7 @@ # 02111-1307 USA # We need a recent Autoconf to run a recent Autotest. -AC_PREREQ(2.53) +AC_PREREQ(2.54) AC_INIT([GNU Bison], [1.49c], [bug-bison@gnu.org]) AC_CONFIG_AUX_DIR(config) @@ -95,8 +95,8 @@ AC_CHECK_FUNCS(setlocale) AC_CHECK_DECLS([getenv, getopt, free, stpcpy, strchr, strspn, strnlen, malloc, memchr, memrchr]) AC_REPLACE_FUNCS(stpcpy strchr strspn memchr memrchr) -jm_FUNC_MALLOC -jm_FUNC_REALLOC +AC_FUNC_MALLOC +AC_FUNC_REALLOC jm_PREREQ_QUOTEARG jm_PREREQ_ERROR jm_PREREQ_TEMPNAME diff --git a/m4/Makefile.am b/m4/Makefile.am index 8928b239..c888b5c4 100644 --- a/m4/Makefile.am +++ b/m4/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to produce Makefile.in -*-Makefile-*- EXTRA_DIST = \ - c-bs-a.m4 dmalloc.m4 error.m4 \ - m4.m4 malloc.m4 mbrtowc.m4 mbstate_t.m4 mkstemp.m4 \ - prereq.m4 realloc.m4 strerror_r.m4 timevar.m4 warning.m4 \ + dmalloc.m4 error.m4 \ + m4.m4 mbrtowc.m4 mkstemp.m4 \ + prereq.m4 strerror_r.m4 timevar.m4 warning.m4 \ gettext.m4 iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 progtest.m4 diff --git a/m4/c-bs-a.m4 b/m4/c-bs-a.m4 deleted file mode 100644 index 1c7eb1c4..00000000 --- a/m4/c-bs-a.m4 +++ /dev/null @@ -1,29 +0,0 @@ -# c-bs-a.m4 serial 4 (fileutils-4.1.3) -dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -dnl From Paul Eggert. - -AC_DEFUN([AC_C_BACKSLASH_A], -[ - AC_CACHE_CHECK([whether backslash-a works in strings], ac_cv_c_backslash_a, - [AC_TRY_COMPILE([], - [ -#if '\a' == 'a' - syntax error; -#endif - char buf['\a' == 'a' ? -1 : 1]; - buf[0] = '\a'; - return buf[0] != "\a"[0]; - ], - ac_cv_c_backslash_a=yes, - ac_cv_c_backslash_a=no)]) - if test $ac_cv_c_backslash_a = yes; then - AC_DEFINE(HAVE_C_BACKSLASH_A, 1, - [Define if backslash-a works in C strings.]) - fi -]) diff --git a/m4/malloc.m4 b/m4/malloc.m4 deleted file mode 100644 index f6d43c91..00000000 --- a/m4/malloc.m4 +++ /dev/null @@ -1,40 +0,0 @@ -#serial 7 - -dnl From Jim Meyering. -dnl Determine whether malloc accepts 0 as its argument. -dnl If it doesn't, arrange to use the replacement function. -dnl - -AC_DEFUN([jm_FUNC_MALLOC], -[ - dnl xmalloc.c requires that this symbol be defined so it doesn't - dnl mistakenly use a broken malloc -- as it might if this test were omitted. - AC_DEFINE(HAVE_DONE_WORKING_MALLOC_CHECK, 1, - [Define if the malloc check has been performed. ]) - - AC_CACHE_CHECK([whether malloc(0) returns a non-NULL pointer], - jm_cv_func_working_malloc, - [AC_TRY_RUN([ - char *malloc (); - int - main () - { - exit (malloc (0) ? 0 : 1); - } - ], - jm_cv_func_working_malloc=yes, - jm_cv_func_working_malloc=no, - dnl When crosscompiling, assume malloc(0) returns NULL. - jm_cv_func_working_malloc=no) - ]) - if test $jm_cv_func_working_malloc = yes; then - AC_DEFINE([HAVE_MALLOC], 1, - [Define to 1 if your system has a working `malloc' function, - and to 0 otherwise.]) - else - AC_DEFINE([HAVE_MALLOC], 0) - AC_LIBOBJ(malloc) - AC_DEFINE(malloc, rpl_malloc, - [Define to rpl_malloc if the replacement function should be used.]) - fi -]) diff --git a/m4/mbstate_t.m4 b/m4/mbstate_t.m4 deleted file mode 100644 index a07f51bc..00000000 --- a/m4/mbstate_t.m4 +++ /dev/null @@ -1,32 +0,0 @@ -# mbstate_t.m4 serial 9 -dnl Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc. -dnl This file is free software, distributed under the terms of the GNU -dnl General Public License. As a special exception to the GNU General -dnl Public License, this file may be distributed as part of a program -dnl that contains a configuration script generated by Autoconf, under -dnl the same distribution terms as the rest of that program. - -# From Paul Eggert. - -# BeOS 5 has but does not define mbstate_t, -# so you can't declare an object of that type. -# Check for this incompatibility with Standard C. - -# AC_TYPE_MBSTATE_T -# ----------------- -AC_DEFUN([AC_TYPE_MBSTATE_T], - [AC_CACHE_CHECK([for mbstate_t], ac_cv_type_mbstate_t, - [AC_COMPILE_IFELSE( - [AC_LANG_PROGRAM( - [AC_INCLUDES_DEFAULT -# include ], - [mbstate_t x; return sizeof x;])], - [ac_cv_type_mbstate_t=yes], - [ac_cv_type_mbstate_t=no])]) - if test $ac_cv_type_mbstate_t = yes; then - AC_DEFINE([HAVE_MBSTATE_T], 1, - [Define to 1 if declares mbstate_t.]) - else - AC_DEFINE([mbstate_t], int, - [Define to a type if does not define.]) - fi]) diff --git a/m4/realloc.m4 b/m4/realloc.m4 deleted file mode 100644 index 966f0f54..00000000 --- a/m4/realloc.m4 +++ /dev/null @@ -1,40 +0,0 @@ -#serial 6 - -dnl From Jim Meyering. -dnl Determine whether realloc works when both arguments are 0. -dnl If it doesn't, arrange to use the replacement function. -dnl - -AC_DEFUN([jm_FUNC_REALLOC], -[ - dnl xmalloc.c requires that this symbol be defined so it doesn't - dnl mistakenly use a broken realloc -- as it might if this test were omitted. - AC_DEFINE(HAVE_DONE_WORKING_REALLOC_CHECK, 1, - [Define if the realloc check has been performed. ]) - - AC_CACHE_CHECK([whether realloc(0,0) returns a non-NULL pointer], - jm_cv_func_working_realloc, - [AC_TRY_RUN([ - char *realloc (); - int - main () - { - exit (realloc (0, 0) ? 0 : 1); - } - ], - jm_cv_func_working_realloc=yes, - jm_cv_func_working_realloc=no, - dnl When crosscompiling, assume realloc(0,0) returns NULL. - jm_cv_func_working_realloc=no) - ]) - if test $jm_cv_func_working_realloc = yes; then - AC_DEFINE([HAVE_REALLOC], 1, - [Define to 1 if your system has a working `realloc' function, - and to 0 otherwise.]) - else - AC_DEFINE([HAVE_REALLOC], 0) - AC_LIBOBJ(realloc) - AC_DEFINE(realloc, rpl_realloc, - [Define to rpl_realloc if the replacement function should be used.]) - fi -]) -- 2.45.2