Blame SOURCES/powerpc-utils-autoconf.patch

956c23
2009-10-29  Stepan Kasal  <skasal@redhat.com>
956c23
956c23
Make build with autoconf 2.59.
956c23
956c23
diff -urN powerpc-utils-1.2.2.orig/configure.ac powerpc-utils-1.2.2/configure.ac
956c23
--- powerpc-utils-1.2.2.orig/configure.ac	2009-10-22 21:00:13.000000000 +0200
956c23
+++ powerpc-utils-1.2.2/configure.ac	2009-10-29 15:41:58.000000000 +0100
956c23
@@ -1,8 +1,9 @@
956c23
 #                                               -*- Autoconf -*-
956c23
 # Process this file with autoconf to produce a configure script.
956c23
 
956c23
-AC_PREREQ([2.63])
956c23
-AC_INIT([powerpc-utils], [1.2.0], [nfont@austin.ibm.com])
956c23
+AC_PREREQ([2.59])
956c23
+m4_include([ac_type_uint.m4])
956c23
+AC_INIT([powerpc-utils], [1.2.2], [nfont@austin.ibm.com])
956c23
 AM_INIT_AUTOMAKE
956c23
 AC_CONFIG_SRCDIR([src/rtas_ibm_get_vpd.c])
956c23
 
956c23
diff -urN powerpc-utils-1.2.2.orig/ac_type_uint.m4 powerpc-utils-1.2.2/ac_type_uint.m4
956c23
--- powerpc-utils-1.2.2.orig/ac_type_uint.m4	1970-01-01 01:00:00.000000000 +0100
956c23
+++ powerpc-utils-1.2.2/ac_type_uint.m4	2009-10-29 16:04:41.000000000 +0100
956c23
@@ -0,0 +1,119 @@
956c23
+AC_DEFUN([AC_TYPE_INT8_T], [_AC_TYPE_INT(8)])
956c23
+AC_DEFUN([AC_TYPE_INT16_T], [_AC_TYPE_INT(16)])
956c23
+AC_DEFUN([AC_TYPE_INT32_T], [_AC_TYPE_INT(32)])
956c23
+AC_DEFUN([AC_TYPE_INT64_T], [_AC_TYPE_INT(64)])
956c23
+AC_DEFUN([AC_TYPE_UINT8_T], [_AC_TYPE_UNSIGNED_INT(8)])
956c23
+AC_DEFUN([AC_TYPE_UINT16_T], [_AC_TYPE_UNSIGNED_INT(16)])
956c23
+AC_DEFUN([AC_TYPE_UINT32_T], [_AC_TYPE_UNSIGNED_INT(32)])
956c23
+AC_DEFUN([AC_TYPE_UINT64_T], [_AC_TYPE_UNSIGNED_INT(64)])
956c23
+
956c23
+# _AC_TYPE_INT(NBITS)
956c23
+# -------------------
956c23
+AC_DEFUN([_AC_TYPE_INT],
956c23
+[
956c23
+  AC_CACHE_CHECK([for int$1_t], [ac_cv_c_int$1_t],
956c23
+    [ac_cv_c_int$1_t=no
956c23
+     for ac_type in 'int$1_t' 'int' 'long int' \
956c23
+	 'long long int' 'short int' 'signed char'; do
956c23
+       AC_COMPILE_IFELSE(
956c23
+	 [AC_LANG_BOOL_COMPILE_TRY(
956c23
+	    [AC_INCLUDES_DEFAULT],
956c23
+	    [[0 < ($ac_type) (((($ac_type) 1 << ($1 - 2)) - 1) * 2 + 1)]])],
956c23
+	 [AC_COMPILE_IFELSE(
956c23
+	    [AC_LANG_BOOL_COMPILE_TRY(
956c23
+	       [AC_INCLUDES_DEFAULT],
956c23
+	       [[($ac_type) (((($ac_type) 1 << ($1 - 2)) - 1) * 2 + 1)
956c23
+		 < ($ac_type) (((($ac_type) 1 << ($1 - 2)) - 1) * 2 + 2)]])],
956c23
+	    [],
956c23
+	    [AS_CASE([$ac_type], [int$1_t],
956c23
+	       [ac_cv_c_int$1_t=yes],
956c23
+	       [ac_cv_c_int$1_t=$ac_type])])])
956c23
+       test "$ac_cv_c_int$1_t" != no && break
956c23
+     done])
956c23
+  case $ac_cv_c_int$1_t in #(
956c23
+  no|yes) ;; #(
956c23
+  *)
956c23
+    AC_DEFINE_UNQUOTED([int$1_t], [$ac_cv_c_int$1_t],
956c23
+      [Define to the type of a signed integer type of width exactly $1 bits
956c23
+       if such a type exists and the standard includes do not define it.]);;
956c23
+  esac
956c23
+])# _AC_TYPE_INT
956c23
+
956c23
+# _AC_TYPE_UNSIGNED_INT(NBITS)
956c23
+# ----------------------------
956c23
+AC_DEFUN([_AC_TYPE_UNSIGNED_INT],
956c23
+[
956c23
+  AC_CACHE_CHECK([for uint$1_t], [ac_cv_c_uint$1_t],
956c23
+    [ac_cv_c_uint$1_t=no
956c23
+     for ac_type in 'uint$1_t' 'unsigned int' 'unsigned long int' \
956c23
+	 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
956c23
+       AC_COMPILE_IFELSE(
956c23
+	 [AC_LANG_BOOL_COMPILE_TRY(
956c23
+	    [AC_INCLUDES_DEFAULT],
956c23
+	    [[($ac_type) -1 >> ($1 - 1) == 1]])],
956c23
+	 [AS_CASE([$ac_type], [uint$1_t],
956c23
+	    [ac_cv_c_uint$1_t=yes],
956c23
+	    [ac_cv_c_uint$1_t=$ac_type])])
956c23
+       test "$ac_cv_c_uint$1_t" != no && break
956c23
+     done])
956c23
+  case $ac_cv_c_uint$1_t in #(
956c23
+  no|yes) ;; #(
956c23
+  *)
956c23
+    m4_bmatch([$1], [^\(8\|32\|64\)$],
956c23
+      [AC_DEFINE([_UINT$1_T], 1,
956c23
+	 [Define for Solaris 2.5.1 so the uint$1_t typedef from
956c23
+	  <sys/synch.h>, <pthread.h>, or <semaphore.h> is not used.
956c23
+	  If the typedef were allowed, the #define below would cause a
956c23
+	  syntax error.])])
956c23
+    AC_DEFINE_UNQUOTED([uint$1_t], [$ac_cv_c_uint$1_t],
956c23
+      [Define to the type of an unsigned integer type of width exactly $1 bits
956c23
+       if such a type exists and the standard includes do not define it.]);;
956c23
+  esac
956c23
+])# _AC_TYPE_UNSIGNED_INT
956c23
+
956c23
+
956c23
+# AS_CASE(WORD, [PATTERN1], [IF-MATCHED1]...[DEFAULT])
956c23
+# ----------------------------------------------------
956c23
+# Expand into
956c23
+# | case WORD in
956c23
+# | PATTERN1) IF-MATCHED1 ;;
956c23
+# | ...
956c23
+# | *) DEFAULT ;;
956c23
+# | esac
956c23
+m4_define([_AS_CASE],
956c23
+[  $1[)] m4_default([$2], [:]) ;;
956c23
+])
956c23
+m4_define([_AS_CASE_DEFAULT],
956c23
+[  *[)] $1 ;;
956c23
+])
956c23
+m4_defun([AS_CASE],
956c23
+[m4_ifval([$2$3],
956c23
+[case $1 in
956c23
+m4_transform_pair([_$0], [_$0_DEFAULT], m4_shift($@))dnl
956c23
+esac
956c23
+])dnl
956c23
+])# AS_CASE
956c23
+
956c23
+
956c23
+# m4_transform_pair(EXPRESSION, [END-EXPR = EXPRESSION], ARG...)
956c23
+# --------------------------------------------------------------
956c23
+# Perform a pairwise grouping of consecutive ARGs, by expanding
956c23
+# EXPRESSION([ARG1], [ARG2]).  If there are an odd number of ARGs, the
956c23
+# final argument is expanded with END-EXPR([ARGn]).
956c23
+#
956c23
+# For example:
956c23
+#   m4_define([show], [($*)m4_newline])dnl
956c23
+#   m4_transform_pair([show], [], [a], [b], [c], [d], [e])dnl
956c23
+#   => (a,b)
956c23
+#   => (c,d)
956c23
+#   => (e)
956c23
+#
956c23
+# Please keep foreach.m4 in sync with any adjustments made here.
956c23
+m4_define([m4_transform_pair],
956c23
+[m4_if([$#], [0], [m4_fatal([$0: too few arguments: $#])],
956c23
+       [$#], [1], [m4_fatal([$0: too few arguments: $#: $1])],
956c23
+       [$#], [2], [],
956c23
+       [$#], [3], [m4_default([$2], [$1])([$3])[]],
956c23
+       [$#], [4], [$1([$3], [$4])[]],
956c23
+       [$1([$3], [$4])[]$0([$1], [$2], m4_shift(m4_shift3($@)))])])
956c23
+