about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--common.mk4
-rw-r--r--converter/other/Makefile28
-rw-r--r--doc/HISTORY8
3 files changed, 34 insertions, 6 deletions
diff --git a/common.mk b/common.mk
index 66b34fa0..831619fa 100644
--- a/common.mk
+++ b/common.mk
@@ -45,6 +45,7 @@
 # CC: C compiler command 
 # CPPFLAGS: C preprocessor options
 # CFLAGS: C compiler general options
+# CFLAGS_TARGET: C compiler options for a particular target
 # LD: linker command
 # LINKERISCOMPILER: 'Y' if the linker invoked by LD is actually a compiler
 #   front end, so takes linker options in a different format
@@ -222,7 +223,8 @@ config:
 # assertion and crash the program if it isn't really true.  You can add
 # -UNDEBUG (in any of various ways) to override this.
 #
-CFLAGS_ALL =  -DNDEBUG $(CPPFLAGS) $(CFLAGS) $(CFLAGS_PERSONAL) $(CADD)
+CFLAGS_ALL = \
+  -DNDEBUG $(CPPFLAGS) $(CFLAGS) $(CFLAGS_TARGET) $(CFLAGS_PERSONAL) $(CADD)
 
 $(OBJECTS): %.o: %.c importinc
 #############################################################################
diff --git a/converter/other/Makefile b/converter/other/Makefile
index d94ca281..989475da 100644
--- a/converter/other/Makefile
+++ b/converter/other/Makefile
@@ -77,6 +77,18 @@ ifeq ($(TIFFLIB_NEEDS_Z),Y)
   endif
 endif
 
+# Pnmtops's "flate" compression function requires libz.  But if we don't
+# have libz, we still build Pnmtops; we just omit the flate compression
+# capability.
+ifeq ($(ZLIB),NONE)
+  PNMTOPS_ZLIB_OPT =
+  PNMTOPS_NOFLATE_OPT = -DNOFLATE
+else
+  PNMTOPS_ZLIB_OPT = $(ZLIB)
+  PNMTOPS_NOFLATE_OPT =
+endif
+
+
 PORTBINARIES =  avstopam bmptopnm fitstopnm \
 		gemtopnm giftopnm hdifftopam infotopam \
 		pamtoavs pamtodjvurle pamtofits pamtogif \
@@ -93,7 +105,15 @@ ifneq ($(DONT_HAVE_PROCESS_MGMT),Y)
   PORTBINARIES += pstopnm
 endif
 
-BINARIES = $(PORTBINARIES) pnmtorast rasttopnm pamtopdbimg pdbimgtopam srftopam pamtosrf
+BINARIES = \
+  $(PORTBINARIES) \
+  pamtopdbimg \
+  pamtosrf \
+  pdbimgtopam \
+  pnmtops \
+  pnmtorast \
+  rasttopnm \
+  srftopam \
 
 ifeq ($(HAVE_PNGLIB),Y)
   BINARIES += pnmtopng pngtopam pamrgbatopng
@@ -107,9 +127,6 @@ endif
 ifneq ($(URTLIB),NONE)
   BINARIES += rletopnm pnmtorle
 endif
-ifneq ($(ZLIB),NONE)
-  BINARIES += pnmtops
-endif
 
 ifneq ($(XML2_LIBS),NONE)
   BINARIES += svgtopam
@@ -132,6 +149,7 @@ endif
 OBJECTS = $(BINARIES:%=%.o) $(EXTRA_OBJECTS)
 MERGE_OBJECTS = $(MERGEBINARIES:%=%.o2) $(EXTRA_OBJECTS)
 
+pnmtops.o pnmtops.o2: CFLAGS_TARGET=$(PNMTOPS_NOFLATE_OPT)
 
 SCRIPTS = anytopnm pnmtoplainpnm
 
@@ -207,7 +225,7 @@ rletopnm pnmtorle: %: %.o $(NETPBMLIB) $(URTLIBDEP) $(LIBOPT)
 
 pnmtops: %: %.o $(NETPBMLIB) $(LIBOPT)
 	$(LD) -o $@ $@.o \
-	  $(shell $(LIBOPT) $(NETPBMLIB) $(ZLIB)) \
+	  $(shell $(LIBOPT) $(NETPBMLIB) $(PNMTOPS_ZLIB_OPT)) \
 	  $(MATHLIB) $(LDFLAGS) $(LDLIBS) $(RPATH) $(LADD)
 
 pnmtorast rasttopnm: %: %.o rast.o $(NETPBMLIB) $(LIBOPT)
diff --git a/doc/HISTORY b/doc/HISTORY
index 07009aa5..c9524a93 100644
--- a/doc/HISTORY
+++ b/doc/HISTORY
@@ -6,6 +6,9 @@ CHANGE HISTORY
 
 not yet  BJH  Release 10.56.00
 
+              pnmtops: Add PBM fast path.  Thanks Prophet of the Way
+              <afu@wta.att.ne.jp>.
+
               pnmtopng: fix bug: with -alpha specifying a mask which contains
               no fully transparent area, output PNG is fully opaque.
               Introduced in 10.29.
@@ -14,6 +17,11 @@ not yet  BJH  Release 10.56.00
               approximation if it is available.
 
               pnmquant: work with older Perl that doesn't have 3-argument open.
+              Thanks Slaven Rezic <srezic@iconmobile.com>.
+
+              Build: pnmtops: Instead of omitting pnmtops from the build when
+              there is no libz, just omit ability to create flate-compressed
+              output from pnmtops.
 
 11.06.29 BJH  Release 10.55.00