shithub: jbig2

Download patch

ref: f12873269a2ab271026afa7640bbba2a73a6a5a7
parent: ab76b7e32ea5c79915b5ebe94a84ae8b4b29ee78
author: giles <giles@ded80894-8fb9-0310-811b-c03f3676ab4d>
date: Tue May 7 22:27:29 EDT 2002

Autoheader and configure fixups.


git-svn-id: http://svn.ghostscript.com/jbig2dec/trunk@51 ded80894-8fb9-0310-811b-c03f3676ab4d

--- a/configure.ac
+++ b/configure.ac
@@ -10,7 +10,7 @@
 AM_INIT_AUTOMAKE([$package], [$version])
 AM_CONFIG_HEADER(config.h)
 
-AC_REVISION([$Revision: 1.1 $])
+AC_REVISION([$Revision: 1.2 $])
 
 # Checks for programs.
 AC_PROG_CC
@@ -17,8 +17,11 @@
 AC_PROG_RANLIB
 
 # Checks for libraries.
-AC_CHECK_LIB([png], [png_check_sig])
-AC_CHECK_LIB([z], [deflate])
+AC_CHECK_LIB([png], [png_check_sig], [
+	AC_DEFINE(HAVE_LIBPNG,,[Define if libpng is available (-lpng)])
+	LIBOBJS="$LIBOBJS jbig2_image_png.o"
+	AC_CHECK_LIB([z], [deflate])
+])
 
 # Checks for header files.
 AC_HEADER_STDC
@@ -34,10 +37,12 @@
 AC_CHECK_FUNCS([memset strdup])
 
 dnl use our included getopt if the system doesn't have getopt_long()
-AC_SUBST(LIBOJBS)
-AC_CHECK_FUNC(getopt_long, [AC_DEFINE(HAVE_GETOPT_LONG)],
-	[LIBOBJS="$LIBOBJS getopt.o getopt1.o"])
+AC_CHECK_FUNC(getopt_long, 
+	[AC_DEFINE(HAVE_GETOPT_LONG,,[Define if the local libc includes getopt_long()])],
+	[LIBOBJS="$LIBOBJS getopt.o getopt1.o"]
+)
 
 # generate output
+AC_SUBST(LIBOJBS)
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT