Re: [yocto] [meta-gplv2][PATCH] bison: fix builds with gettext 0.20.x
Ping :) Alex On Thu, 16 Jan 2020 at 08:23, Changqing Li wrote: > From: Changqing Li > > Fix configure error like: > error: possibly undefined macro: gl_AC_HEADER_STDINT_H > > Signed-off-by: Changqing Li > --- > recipes-devtools/bison/bison/bison-2.3_m4.patch | 121 > > 1 file changed, 61 insertions(+), 60 deletions(-) > > diff --git a/recipes-devtools/bison/bison/bison-2.3_m4.patch > b/recipes-devtools/bison/bison/bison-2.3_m4.patch > index 348ce1d..626bc42 100644 > --- a/recipes-devtools/bison/bison/bison-2.3_m4.patch > +++ b/recipes-devtools/bison/bison/bison-2.3_m4.patch > @@ -76,34 +76,35 @@ Upstream-Status: Pending > +]) > --- /dev/null > +++ bison-1.875/m4/uintmax_t.m4 > -@@ -0,0 +1,29 @@ > -+# uintmax_t.m4 serial 6 (gettext-0.11) > -+dnl Copyright (C) 1997-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. > +@@ -0,0 +1,30 @@ > ++# uintmax_t.m4 serial 12 (gettext-0.20.1) > ++dnl Copyright (C) 1997-2004, 2007-2019 Free Software Foundation, Inc. > ++dnl This file is free software; the Free Software Foundation > ++dnl gives unlimited permission to copy and/or distribute it, > ++dnl with or without modifications, as long as this notice is preserved. > + > +dnl From Paul Eggert. > + > -+AC_PREREQ(2.13) > ++AC_PREREQ([2.13]) > + > -+# Define uintmax_t to `unsigned long' or `unsigned long long' > -+# if does not exist. > ++# Define uintmax_t to 'unsigned long' or 'unsigned long long' > ++# if it is not already defined in or . > + > -+AC_DEFUN([jm_AC_TYPE_UINTMAX_T], > ++AC_DEFUN([gl_AC_TYPE_UINTMAX_T], > +[ > -+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) > -+ AC_REQUIRE([jm_AC_HEADER_STDINT_H]) > -+ if test $jm_ac_cv_header_inttypes_h = no && test > $jm_ac_cv_header_stdint_h = no; then > -+AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) > -+test $ac_cv_type_unsigned_long_long = yes \ > ++ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) > ++ AC_REQUIRE([gl_AC_HEADER_STDINT_H]) > ++ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = > no; then > ++AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) > ++test $ac_cv_type_unsigned_long_long_int = yes \ > + && ac_type='unsigned long long' \ > + || ac_type='unsigned long' > -+AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, > -+ [Define to unsigned long or unsigned long long > -+ if and don't define.]) > ++AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], > ++ [Define to unsigned long or unsigned long long > ++ if and don't define.]) > ++ else > ++AC_DEFINE([HAVE_UINTMAX_T], [1], > ++ [Define if you have the 'uintmax_t' type in or > .]) > + fi > +]) > --- /dev/null > @@ -143,64 +144,64 @@ Upstream-Status: Pending > +) > --- /dev/null > +++ bison-1.875/m4/stdint_h.m4 > -@@ -0,0 +1,28 @@ > -+# stdint_h.m4 serial 2 (gettext-0.11.4) > -+dnl Copyright (C) 1997-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. > +@@ -0,0 +1,27 @@ > ++# stdint_h.m4 serial 9 (gettext-0.20.1) > ++dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, > Inc. > ++dnl This file is free software; the Free Software Foundation > ++dnl gives unlimited permission to copy and/or distribute it, > ++dnl with or without modifications, as long as this notice is preserved. > + > +dnl From Paul Eggert. > + > +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, > +# doesn't clash with , and declares uintmax_t. > + > -+AC_DEFUN([jm_AC_HEADER_STDINT_H], > ++AC_DEFUN([gl_AC_HEADER_STDINT_H], > +[ > -+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, > -+ [AC_TRY_COMPILE( > -+[#include > -+#include ], > -+[uintmax_t i = (uintmax_t) -1;], > -+jm_ac_cv_header_stdint_h=yes, > -+jm_ac_cv_header_stdint_h=no)]) > -+ if test $jm_ac_cv_header_stdint_h = yes; then > -+AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, > -+[Define if exists, doesn't clash with , > -+ and declares uintmax_t. ]) > ++ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], > ++[AC_COMPILE_IFELSE( > ++ [AC_LANG_PROGRAM( > ++ [[#include > ++#include ]], > ++ [[uintmax_t i = (uintmax_t) -1; return !i;]])], > ++ [gl_cv_header_stdint_h=yes], > ++ [gl_cv_header_stdint_h=no])]) > ++ if test $gl_cv_header_stdint_h = yes; then > ++
[yocto] [meta-gplv2][PATCH] bison: fix builds with gettext 0.20.x
From: Changqing Li Fix configure error like: error: possibly undefined macro: gl_AC_HEADER_STDINT_H Signed-off-by: Changqing Li --- recipes-devtools/bison/bison/bison-2.3_m4.patch | 121 1 file changed, 61 insertions(+), 60 deletions(-) diff --git a/recipes-devtools/bison/bison/bison-2.3_m4.patch b/recipes-devtools/bison/bison/bison-2.3_m4.patch index 348ce1d..626bc42 100644 --- a/recipes-devtools/bison/bison/bison-2.3_m4.patch +++ b/recipes-devtools/bison/bison/bison-2.3_m4.patch @@ -76,34 +76,35 @@ Upstream-Status: Pending +]) --- /dev/null +++ bison-1.875/m4/uintmax_t.m4 -@@ -0,0 +1,29 @@ -+# uintmax_t.m4 serial 6 (gettext-0.11) -+dnl Copyright (C) 1997-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. +@@ -0,0 +1,30 @@ ++# uintmax_t.m4 serial 12 (gettext-0.20.1) ++dnl Copyright (C) 1997-2004, 2007-2019 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + -+AC_PREREQ(2.13) ++AC_PREREQ([2.13]) + -+# Define uintmax_t to `unsigned long' or `unsigned long long' -+# if does not exist. ++# Define uintmax_t to 'unsigned long' or 'unsigned long long' ++# if it is not already defined in or . + -+AC_DEFUN([jm_AC_TYPE_UINTMAX_T], ++AC_DEFUN([gl_AC_TYPE_UINTMAX_T], +[ -+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) -+ AC_REQUIRE([jm_AC_HEADER_STDINT_H]) -+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then -+AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG]) -+test $ac_cv_type_unsigned_long_long = yes \ ++ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H]) ++ AC_REQUIRE([gl_AC_HEADER_STDINT_H]) ++ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then ++AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) ++test $ac_cv_type_unsigned_long_long_int = yes \ + && ac_type='unsigned long long' \ + || ac_type='unsigned long' -+AC_DEFINE_UNQUOTED(uintmax_t, $ac_type, -+ [Define to unsigned long or unsigned long long -+ if and don't define.]) ++AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type], ++ [Define to unsigned long or unsigned long long ++ if and don't define.]) ++ else ++AC_DEFINE([HAVE_UINTMAX_T], [1], ++ [Define if you have the 'uintmax_t' type in or .]) + fi +]) --- /dev/null @@ -143,64 +144,64 @@ Upstream-Status: Pending +) --- /dev/null +++ bison-1.875/m4/stdint_h.m4 -@@ -0,0 +1,28 @@ -+# stdint_h.m4 serial 2 (gettext-0.11.4) -+dnl Copyright (C) 1997-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. +@@ -0,0 +1,27 @@ ++# stdint_h.m4 serial 9 (gettext-0.20.1) ++dnl Copyright (C) 1997-2004, 2006, 2008-2019 Free Software Foundation, Inc. ++dnl This file is free software; the Free Software Foundation ++dnl gives unlimited permission to copy and/or distribute it, ++dnl with or without modifications, as long as this notice is preserved. + +dnl From Paul Eggert. + +# Define HAVE_STDINT_H_WITH_UINTMAX if exists, +# doesn't clash with , and declares uintmax_t. + -+AC_DEFUN([jm_AC_HEADER_STDINT_H], ++AC_DEFUN([gl_AC_HEADER_STDINT_H], +[ -+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h, -+ [AC_TRY_COMPILE( -+[#include -+#include ], -+[uintmax_t i = (uintmax_t) -1;], -+jm_ac_cv_header_stdint_h=yes, -+jm_ac_cv_header_stdint_h=no)]) -+ if test $jm_ac_cv_header_stdint_h = yes; then -+AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1, -+[Define if exists, doesn't clash with , -+ and declares uintmax_t. ]) ++ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h], ++[AC_COMPILE_IFELSE( ++ [AC_LANG_PROGRAM( ++ [[#include ++#include ]], ++ [[uintmax_t i = (uintmax_t) -1; return !i;]])], ++ [gl_cv_header_stdint_h=yes], ++ [gl_cv_header_stdint_h=no])]) ++ if test $gl_cv_header_stdint_h = yes; then ++AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1], ++ [Define if exists, doesn't clash with , ++ and declares uintmax_t. ]) + fi +]) --- /dev/null +++ bison-1.875/m4/inttypes_h.m4 -@@ -0,0 +1,28 @@ -+# inttypes_h.m4 serial 4 (gettext-0.11.4) -+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc. -+dnl