Skip to contentSkip to conversation

bison: fix builds with gettext 0.20.x

PATCH In review Changqing Li 2 participants 2 messages Jan 16, 2020 – Feb 3, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bison: fix builds with gettext 0.20.x

From: Changqing Li <[email protected]>

Fix configure error like:
error: possibly undefined macro: gl_AC_HEADER_STDINT_H

---
 recipes-devtools/bison/bison/bison-2.3_m4.patch | 121 ++++++++++++------------
 1 file changed, 61 insertions(+), 60 deletions(-)
recipes-devtools/bison/bison/bison-2.3_m4.patch +61 -60
index 348ce1d..626bc42 100644
@@ -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 <inttypes.h> does not exist.
++# Define uintmax_t to 'unsigned long' or 'unsigned long long'
++# if it is not already defined in <stdint.h> or <inttypes.h>.
 +
-+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 <inttypes.h> and <stdint.h> don't define.])
++    AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
++      [Define to unsigned long or unsigned long long
++       if <stdint.h> and <inttypes.h> don't define.])
++  else
++    AC_DEFINE([HAVE_UINTMAX_T], [1],
++      [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
 +  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 <stdint.h> exists,
 +# doesn't clash with <sys/types.h>, 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 <sys/types.h>
-+#include <stdint.h>],
-+    [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 <stdint.h> exists, doesn't clash with <sys/types.h>,
-+   and declares uintmax_t. ])
++  AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
++    [AC_COMPILE_IFELSE(
++       [AC_LANG_PROGRAM(
++          [[#include <sys/types.h>
++            #include <stdint.h>]],
++          [[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 <stdint.h> exists, doesn't clash with <sys/types.h>,
++       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 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,29 @@
++# inttypes_h.m4 serial 10 (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_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
 +# doesn't clash with <sys/types.h>, and declares uintmax_t.
 +
-+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
++AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
 +[
-+  AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
-+  [AC_TRY_COMPILE(
-+    [#include <sys/types.h>
-+#include <inttypes.h>],
-+    [uintmax_t i = (uintmax_t) -1;],
-+    jm_ac_cv_header_inttypes_h=yes,
-+    jm_ac_cv_header_inttypes_h=no)])
-+  if test $jm_ac_cv_header_inttypes_h = yes; then
-+    AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
-+[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
-+   and declares uintmax_t. ])
++  AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
++    [AC_COMPILE_IFELSE(
++       [AC_LANG_PROGRAM(
++          [[
++#include <sys/types.h>
++#include <inttypes.h>
++          ]],
++          [[uintmax_t i = (uintmax_t) -1; return !i;]])],
++       [gl_cv_header_inttypes_h=yes],
++       [gl_cv_header_inttypes_h=no])])
++  if test $gl_cv_header_inttypes_h = yes; then
++    AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
++      [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
++       and declares uintmax_t. ])
 +  fi
 +])
 --- /dev/null
Signature · 1 line
2.7.4
#1 lore raw

Ping :)

Alex

Quoted 187 lines · Changqing Li

From: Changqing Li <[email protected]>

Fix configure error like:
error: possibly undefined macro: gl_AC_HEADER_STDINT_H

---
 recipes-devtools/bison/bison/bison-2.3_m4.patch | 121
++++++++++++------------
 1 file changed, 61 insertions(+), 60 deletions(-)
recipes-devtools/bison/bison/bison-2.3_m4.patch +10 -15
index 348ce1d..626bc42 100644
@@ -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 <inttypes.h> does not exist.
++# Define uintmax_t to 'unsigned long' or 'unsigned long long'
++# if it is not already defined in <stdint.h> or <inttypes.h>.
 +
-+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 <inttypes.h> and <stdint.h> don't define.])
++ AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
++ [Define to unsigned long or unsigned long long
++ if <stdint.h> and <inttypes.h> don't define.])
++ else
++ AC_DEFINE([HAVE_UINTMAX_T], [1],
++ [Define if you have the 'uintmax_t' type in <stdint.h> or
<inttypes.h>.])
+ fi
+])
--- /dev/null

recipes-devtools/bison/bison/bison-2.3_m4.patch +3 -8
@@ -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 <stdint.h> exists, +# doesn't clash with <sys/types.h>, 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 <sys/types.h>
-+#include <stdint.h>],

-+    [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 <stdint.h> exists, doesn't clash with <sys/types.h>,
-+ and declares uintmax_t. ])
++ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[#include <sys/types.h>
++ #include <stdint.h>]],
++ [[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 <stdint.h> exists, doesn't clash with <sys/types.h>,
++ 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 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,29 @@
++# inttypes_h.m4 serial 10 (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_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, +# doesn't clash with <sys/types.h>, and declares uintmax_t. +
-+AC_DEFUN([jm_AC_HEADER_INTTYPES_H], ++AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
-+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h, -+ [AC_TRY_COMPILE(
-+ [#include <sys/types.h>
-+#include <inttypes.h>],

-+    [uintmax_t i = (uintmax_t) -1;],
-+    jm_ac_cv_header_inttypes_h=yes,
-+    jm_ac_cv_header_inttypes_h=no)])

-+ if test $jm_ac_cv_header_inttypes_h = yes; then
-+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
-+[Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
-+ and declares uintmax_t. ])
++ AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
++ [AC_COMPILE_IFELSE(
++ [AC_LANG_PROGRAM(
++ [[
++#include <sys/types.h>
++#include <inttypes.h>
++ ]],
++ [[uintmax_t i = (uintmax_t) -1; return !i;]])],
++ [gl_cv_header_inttypes_h=yes],
++ [gl_cv_header_inttypes_h=no])])
++ if test $gl_cv_header_inttypes_h = yes; then
++ AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
++ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
++ and declares uintmax_t. ])
+ fi
+])
--- /dev/null
--
2.7.4