--- ./Makefile.in.orig	2014-03-10 14:44:40.000000000 +0100
+++ ./Makefile.in	2014-03-10 14:56:40.000000000 +0100
@@ -413,7 +413,7 @@
 	prnt/hpcups/dj600ColorMaps.cpp prnt/hpcups/dj970ColorMaps.cpp \
 	prnt/hpcups/dj8xxColorMaps.cpp prnt/hpcups/dj4100ColorMaps.cpp \
 	prnt/hpcups/BreakTables.cpp prnt/hpcups/PrinterCommands.h \
-	prnt/hpcups/Utils.cpp prnt/hpcups/Utils.h \
+	prnt/hpcups/HPCupsUtils.cpp prnt/hpcups/HPCupsUtils.h \
 	prnt/hpcups/SystemServices.cpp prnt/hpcups/SystemServices.h \
 	prnt/hpcups/CommonDefinitions.h prnt/hpcups/hpjbig_wrapper.h \
 	prnt/hpcups/apPrintModes.h prnt/hpcups/dj400PrintModes.h \
@@ -4415,14 +4415,14 @@
 @HPLIP_BUILD_TRUE@dist_rulessystem_DATA = data/rules/hplip-printer@.service
 
 # hpmud.rules
-@HPLIP_BUILD_TRUE@rulesdir = /etc/udev/rules.d
+@HPLIP_BUILD_TRUE@rulesdir = @PREFIX@/etc/udev/rules.d
 @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_FALSE@dist_rules_DATA = data/rules/56-hpmud.rules
 @HPLIP_BUILD_TRUE@@UDEV_SYSFS_RULES_TRUE@dist_rules_DATA = data/rules/56-hpmud_sysfs.rules
 @HPLIP_BUILD_TRUE@halpredir = /usr/share/hal/fdi/preprobe/10osvendor
 @HPLIP_BUILD_TRUE@dist_halpre_DATA = data/rules/20-hplip-devices.fdi
 
 # hplip.conf
-@HPLIP_BUILD_TRUE@hplip_confdir = /etc/hp
+@HPLIP_BUILD_TRUE@hplip_confdir = @PREFIX@/etc/hp
 @HPLIP_BUILD_TRUE@hplip_conf_DATA = hplip.conf
 
 #pstotiff filter
@@ -4430,7 +4430,7 @@
 @HPLIP_BUILD_TRUE@pstotiff_SCRIPTS = fax/filters/pstotiff
 
 # hplip.state
-@HPLIP_BUILD_TRUE@hplip_statedir = /var/lib/hp
+@HPLIP_BUILD_TRUE@hplip_statedir = @PREFIX@/var/lib/hp
 @HPLIP_BUILD_TRUE@dist_hplip_state_DATA = 
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@cmddir = $(hplipdir)
@@ -4692,7 +4692,7 @@
 @HPCUPS_INSTALL_TRUE@	prnt/hpcups/Halftoner.cpp prnt/hpcups/Halftoner.h prnt/hpcups/Scaler.cpp prnt/hpcups/Scaler.h prnt/hpcups/resources.h \
 @HPCUPS_INSTALL_TRUE@	prnt/hpcups/dj400ColorMaps.cpp prnt/hpcups/dj600ColorMaps.cpp prnt/hpcups/dj970ColorMaps.cpp prnt/hpcups/dj8xxColorMaps.cpp \
 @HPCUPS_INSTALL_TRUE@	prnt/hpcups/dj4100ColorMaps.cpp \
-@HPCUPS_INSTALL_TRUE@	prnt/hpcups/BreakTables.cpp prnt/hpcups/PrinterCommands.h prnt/hpcups/Utils.cpp prnt/hpcups/Utils.h \
+@HPCUPS_INSTALL_TRUE@	prnt/hpcups/BreakTables.cpp prnt/hpcups/PrinterCommands.h prnt/hpcups/HPCupsUtils.cpp prnt/hpcups/HPCupsUtils.h \
 @HPCUPS_INSTALL_TRUE@	prnt/hpcups/SystemServices.cpp prnt/hpcups/SystemServices.h prnt/hpcups/CommonDefinitions.h prnt/hpcups/hpjbig_wrapper.h \
 @HPCUPS_INSTALL_TRUE@	prnt/hpcups/apPrintModes.h prnt/hpcups/dj400PrintModes.h prnt/hpcups/dj540PrintModes.h prnt/hpcups/dj600PrintModes.h \
 @HPCUPS_INSTALL_TRUE@	prnt/hpcups/dj630PrintModes.h prnt/hpcups/dj690PrintModes.h prnt/hpcups/dj850PrintModes.h prnt/hpcups/dj890PrintModes.h \
@@ -7233,19 +7233,19 @@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
 @am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -c -o hpcups-BreakTables.obj `if test -f 'prnt/hpcups/BreakTables.cpp'; then $(CYGPATH_W) 'prnt/hpcups/BreakTables.cpp'; else $(CYGPATH_W) '$(srcdir)/prnt/hpcups/BreakTables.cpp'; fi`
 
-hpcups-Utils.o: prnt/hpcups/Utils.cpp
-@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -MT hpcups-Utils.o -MD -MP -MF $(DEPDIR)/hpcups-Utils.Tpo -c -o hpcups-Utils.o `test -f 'prnt/hpcups/Utils.cpp' || echo '$(srcdir)/'`prnt/hpcups/Utils.cpp
+hpcups-Utils.o: prnt/hpcups/HPCupsUtils.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -MT hpcups-Utils.o -MD -MP -MF $(DEPDIR)/hpcups-Utils.Tpo -c -o hpcups-Utils.o `test -f 'prnt/hpcups/HPCupsUtils.cpp' || echo '$(srcdir)/'`prnt/hpcups/HPCupsUtils.cpp
 @am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/hpcups-Utils.Tpo $(DEPDIR)/hpcups-Utils.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='prnt/hpcups/Utils.cpp' object='hpcups-Utils.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='prnt/hpcups/HPCupsUtils.cpp' object='hpcups-Utils.o' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -c -o hpcups-Utils.o `test -f 'prnt/hpcups/Utils.cpp' || echo '$(srcdir)/'`prnt/hpcups/Utils.cpp
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -c -o hpcups-Utils.o `test -f 'prnt/hpcups/HPCupsUtils.cpp' || echo '$(srcdir)/'`prnt/hpcups/HPCupsUtils.cpp
 
-hpcups-Utils.obj: prnt/hpcups/Utils.cpp
-@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -MT hpcups-Utils.obj -MD -MP -MF $(DEPDIR)/hpcups-Utils.Tpo -c -o hpcups-Utils.obj `if test -f 'prnt/hpcups/Utils.cpp'; then $(CYGPATH_W) 'prnt/hpcups/Utils.cpp'; else $(CYGPATH_W) '$(srcdir)/prnt/hpcups/Utils.cpp'; fi`
+hpcups-Utils.obj: prnt/hpcups/HPCupsUtils.cpp
+@am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -MT hpcups-Utils.obj -MD -MP -MF $(DEPDIR)/hpcups-Utils.Tpo -c -o hpcups-Utils.obj `if test -f 'prnt/hpcups/HPCupsUtils.cpp'; then $(CYGPATH_W) 'prnt/hpcups/HPCupsUtils.cpp'; else $(CYGPATH_W) '$(srcdir)/prnt/hpcups/HPCupsUtils.cpp'; fi`
 @am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/hpcups-Utils.Tpo $(DEPDIR)/hpcups-Utils.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='prnt/hpcups/Utils.cpp' object='hpcups-Utils.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='prnt/hpcups/HPCupsUtils.cpp' object='hpcups-Utils.obj' libtool=no @AMDEPBACKSLASH@
 @AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -c -o hpcups-Utils.obj `if test -f 'prnt/hpcups/Utils.cpp'; then $(CYGPATH_W) 'prnt/hpcups/Utils.cpp'; else $(CYGPATH_W) '$(srcdir)/prnt/hpcups/Utils.cpp'; fi`
+@am__fastdepCXX_FALSE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -c -o hpcups-Utils.obj `if test -f 'prnt/hpcups/HPCupsUtils.cpp'; then $(CYGPATH_W) 'prnt/hpcups/HPCupsUtils.cpp'; else $(CYGPATH_W) '$(srcdir)/prnt/hpcups/HPCupsUtils.cpp'; fi`
 
 hpcups-SystemServices.o: prnt/hpcups/SystemServices.cpp
 @am__fastdepCXX_TRUE@	$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(hpcups_CXXFLAGS) $(CXXFLAGS) -MT hpcups-SystemServices.o -MD -MP -MF $(DEPDIR)/hpcups-SystemServices.Tpo -c -o hpcups-SystemServices.o `test -f 'prnt/hpcups/SystemServices.cpp' || echo '$(srcdir)/'`prnt/hpcups/SystemServices.cpp
@@ -8814,13 +8814,13 @@
 install-data-hook:
 #	   If scanner build, add hpaio entry to sane dll.conf.
 @HPLIP_BUILD_TRUE@	if [ "$(scan_build)" = "yes" ]; then \
-@HPLIP_BUILD_TRUE@	   $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \
-@HPLIP_BUILD_TRUE@	   if [ ! -f $(DESTDIR)/etc/sane.d/dll.conf ]; then \
-@HPLIP_BUILD_TRUE@		  touch $(DESTDIR)/etc/sane.d/dll.conf; \
+@HPLIP_BUILD_TRUE@	   $(mkinstalldirs) $(DESTDIR)@PREFIX@/etc/sane.d; \
+@HPLIP_BUILD_TRUE@	   if [ ! -f $(DESTDIR)@PREFIX@/etc/sane.d/dll.conf ]; then \
+@HPLIP_BUILD_TRUE@		  touch $(DESTDIR)@PREFIX@/etc/sane.d/dll.conf; \
 @HPLIP_BUILD_TRUE@	   fi; \
-@HPLIP_BUILD_TRUE@	   if ! grep ^hpaio $(DESTDIR)/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
-@HPLIP_BUILD_TRUE@		  echo "Adding hpaio entry to /etc/sane.d/dll.conf." ; \
-@HPLIP_BUILD_TRUE@		  echo hpaio >>$(DESTDIR)/etc/sane.d/dll.conf ; \
+@HPLIP_BUILD_TRUE@	   if ! grep ^hpaio $(DESTDIR)@PREFIX@/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
+@HPLIP_BUILD_TRUE@		  echo "Adding hpaio entry to @PREFIX@/etc/sane.d/dll.conf." ; \
+@HPLIP_BUILD_TRUE@		  echo hpaio >>$(DESTDIR)@PREFIX@/etc/sane.d/dll.conf ; \
 @HPLIP_BUILD_TRUE@	   fi \
 @HPLIP_BUILD_TRUE@	fi
 #	   Create hp-xxx commands in bindir.
@@ -8828,7 +8828,7 @@
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@	for i in $(dist_cmd_SCRIPTS); do \
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@	   cmd=`basename $$i .py`; \
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@	   if [ ! \( "$$cmd" = "toolbox" -a "$(gui_build)" = "no" \) ]; then \
-@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@		  ln -sf ../share/$(PACKAGE)/$$i $(DESTDIR)$(bindir)/hp-$$cmd; \
+@FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@		  ln -sf ${datadir}/$(PACKAGE)/$$i $(DESTDIR)$(bindir)/hp-$$cmd; \
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@	   fi \
 @FULL_BUILD_TRUE@@HPLIP_BUILD_TRUE@	done
 #
