shithub: jbig2

Download patch

ref: 8e6b447d8bddabc0acd5834fa493110b1bb3e9c7
parent: 3c7c73d634dda170455d3cd7a1ef08a038e63cbb
author: Ralph Giles <giles@ghostscript.com>
date: Fri May 22 19:14:33 EDT 2009

Provide fallbacks in jbig2dec.c if PACKAGE and VERSION aren't defined.

Normally, the configure script defines PACKAGE and VERSION, based on
its initializers. However, config.h is in fact optional, so we shouldn't
assume these are set. Since we use these to implement the command
'jbig2dec --version', we provide fallbacks in the source file to
simplify compiling outside the autotools build.

--- a/jbig2dec.c
+++ b/jbig2dec.c
@@ -1,7 +1,7 @@
 /*
     jbig2dec
 
-    Copyright (C) 2001-2003 Artifex Software, Inc.
+    Copyright (C) 2001-2009 Artifex Software, Inc.
 
     This software is distributed under license and may not
     be copied, modified or distributed except as expressly
@@ -15,6 +15,13 @@
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
+#endif
+
+#ifndef PACKAGE
+#define PACKAGE "jbig2dec"
+#endif
+#ifndef VERSION
+#define VERSION "unknown-version"
 #endif
 
 #include <stdio.h>