Based on Debian patch, see http://patch-tracker.debian.org/patch/series/view/pdftk/1.45-1/customise_build_parameters diff -ruN pdftk-1.45-dist.orig/pdftk/Makefile.Base pdftk-1.45-dist/pdftk/Makefile.Base --- pdftk-1.45-dist.orig/pdftk/Makefile.Base 2012-12-06 19:57:36.000000000 +0100 +++ pdftk-1.45-dist/pdftk/Makefile.Base 2013-03-24 18:32:52.669492230 +0100 @@ -44,7 +44,7 @@ $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(JAVALIBPATH) pdftk.cc -c pdftk : pdftk.o attachments.o report.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL) - $(CXX) $(CXXFLAGS) attachments.o report.o pdftk.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL) $(LDLIBS) -o pdftk + $(CXX) $(LDFLAGS) $(CXXFLAGS) attachments.o report.o pdftk.o $(JAVALIB) $(GCJ_LOCAL_LIB_FULL) $(LDLIBS) -o pdftk install: /usr/bin/install pdftk /usr/local/bin diff -ruN pdftk-1.45-dist.orig/pdftk/Makefile.Debian pdftk-1.45-dist/pdftk/Makefile.Debian --- pdftk-1.45-dist.orig/pdftk/Makefile.Debian 2012-12-06 19:58:44.000000000 +0100 +++ pdftk-1.45-dist/pdftk/Makefile.Debian 2013-03-24 18:34:39.034540850 +0100 @@ -29,7 +29,7 @@ # tools # need direct path to libgcj for gcjh (starting in gcj 4.1.2 per Aurélien GÉRÔME) TOOLPATH= -export VERSUFF=-4.6 +export VERSUFF= export CXX= $(TOOLPATH)g++$(VERSUFF) export GCJ= $(TOOLPATH)gcj$(VERSUFF) export GCJH= $(TOOLPATH)gcjh$(VERSUFF) @@ -71,13 +71,13 @@ # only effects libraries following option on the command line # # -export CPPFLAGS= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers -export CXXFLAGS= -Wall -Wextra -Weffc++ -O2 -export GCJFLAGS= -Wall -Wextra -fsource=1.3 -O2 -export GCJHFLAGS= -force +export CPPFLAGS+= -DPATH_DELIM=0x2f -DASK_ABOUT_WARNINGS=false -DUNBLOCK_SIGNALS -fdollars-in-identifiers +export CXXFLAGS+= -Wall -Wextra -Weffc++ +export GCJFLAGS+= -fsource=1.3 +export GCJHFLAGS+= -force export LDLIBS= -lgcj include Makefile.Base # required packages (xubuntu 12.04) -# gcj-jdk, g++ \ Kein Zeilenumbruch am Dateiende. +# gcj-jdk, g++