diff --git a/widget/src/gtk2/Makefile.in b/widget/src/gtk2/Makefile.in index bce6a7a399e..88332aa9fbf 100644 --- a/widget/src/gtk2/Makefile.in +++ b/widget/src/gtk2/Makefile.in @@ -108,11 +108,16 @@ CPPSRCS = \ nsPrintOptionsGTK.cpp \ nsImageToPixbuf.cpp \ nsAccessibilityHelper.cpp \ - nsPrintJobFactoryGTK.cpp \ - nsPrintJobGTK.cpp \ nsIdleServiceGTK.cpp \ $(NULL) +ifdef MOZ_ENABLE_POSTSCRIPT +CPPSRCS += \ + nsPrintJobFactoryGTK.cpp \ + nsPrintJobGTK.cpp \ + $(NULL) +endif + # build our subdirs, too ifdef ACCESSIBILITY REQUIRES += accessibility diff --git a/widget/src/gtk2/nsDeviceContextSpecG.cpp b/widget/src/gtk2/nsDeviceContextSpecG.cpp index 616551529bf..915b95ecf14 100644 --- a/widget/src/gtk2/nsDeviceContextSpecG.cpp +++ b/widget/src/gtk2/nsDeviceContextSpecG.cpp @@ -412,7 +412,10 @@ NS_IMETHODIMP nsDeviceContextSpecGTK::GetSurfaceForPrinter(gfxASurface **aSurfac DO_PR_DEBUG_LOG(("\"%s\", %f, %f\n", path, width, height)); - nsresult rv = nsPrintJobFactoryGTK::CreatePrintJob(this, mPrintJob); + nsresult rv = NS_ERROR_FAILURE; +#ifndef MOZ_ENABLE_POSTSCRIPT + nsPrintJobFactoryGTK::CreatePrintJob(this, mPrintJob); +#endif if (NS_FAILED(rv)) return rv;