jbig2dec (0.11+20120125-1) 1004_extract_infile_from_autogen-sh.patch

Summary

 autogen.sh        |    4 ----
 config_types.h.in |   19 +++++++++++++++++++
 2 files changed, 19 insertions(+), 4 deletions(-)

    
download this patch

Patch contents

Description: Extract header infile oddly embedded in autogen script.
Author: Jonas Smedegaard <dr@jones.dk>
Forwarded: no
Last-Update: 2012-02-10

--- a/autogen.sh
+++ b/autogen.sh
@@ -110,9 +110,6 @@
 
 echo "  autoheader"
 autoheader
-
-echo "  creating config_types.h.in"
-cat >config_types.h.in <<EOF
 /*
    generated header with missing types for the
    jbig2dec program and library. include this
@@ -132,7 +129,6 @@
     typedef signed @JBIG2_INT8_T@ int8_t;
 #  endif /* JBIG2_REPLACE_STDINT */
 #endif /* HAVE_STDINT_H */
-EOF
 
 echo "  $AUTOMAKE --add-missing $AUTOMAKE_FLAGS"
 $AUTOMAKE --add-missing $AUTOMAKE_FLAGS
--- /dev/null
+++ b/config_types.h.in
@@ -0,0 +1,19 @@
+/*
+   generated header with missing types for the
+   jbig2dec program and library. include this
+   after config.h, within the HAVE_CONFIG_H
+   ifdef
+*/
+
+#ifndef HAVE_STDINT_H
+#  ifdef JBIG2_REPLACE_STDINT_H
+#   include <@JBIG2_STDINT_H@>
+#  else
+    typedef unsigned @JBIG2_INT32_T@ uint32_t;
+    typedef unsigned @JBIG2_INT16_T@ uint16_t;
+    typedef unsigned @JBIG2_INT8_T@ uint8_t;
+    typedef signed @JBIG2_INT32_T@ int32_t;
+    typedef signed @JBIG2_INT16_T@ int16_t;
+    typedef signed @JBIG2_INT8_T@ int8_t;
+#  endif /* JBIG2_REPLACE_STDINT */
+#endif /* HAVE_STDINT_H */