--- configure.in.orig	2011-01-19 06:19:05.000000000 +0100
+++ configure.in	2011-02-16 23:02:25.362188054 +0100
@@ -37,15 +37,13 @@
 AC_PROG_INSTALL
 AC_PROG_LIBTOOL
 
-# Checks for required libraries, don't set global -lpthread, -lm, -ljpeg, ... here, set in Makefile.
+# Checks for required libraries, don't set global -lpthread, -lm, ... here, set in Makefile.
 AC_CHECK_LIB([pthread], [pthread_create], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libpthread support], 7)])
 AC_CHECK_LIB([m], [pow], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libm math support], 10)])
-AC_CHECK_LIB([jpeg], [jpeg_set_defaults],[LIBS="$LIBS"], [AC_MSG_ERROR(["cannot find libjpeg support"], 102)])
 AC_CHECK_LIB([dl], [dlopen], [LIBS="$LIBS" AC_DEFINE([HAVE_LIBDL])], [AC_MSG_ERROR(["cannot find libdl support"], 104)])
 
 # Checks for required header files.
 AC_CHECK_HEADERS(pthread.h,, [AC_MSG_ERROR([cannot find pthread-devel support], 7)])
-AC_CHECK_HEADERS(jpeglib.h,, [AC_MSG_ERROR([cannot find libjpeg-devel support], 103)])
 
 # Checks for typedefs, structures, and compiler characteristics.
 AC_C_BIGENDIAN(,[APDK_ENDIAN_FLAG="-DAPDK_LITTLE_ENDIAN"])
@@ -494,8 +492,6 @@
 fi
 
 if test "$hpijs_only_build" = "no"; then
-   AC_CHECK_LIB([cups], [cupsDoFileRequest], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libcups support], 9)])
-   AC_CHECK_HEADERS(cups/cups.h, ,[AC_MSG_ERROR([cannot find cups-devel support], 3)])
    AC_CHECK_LIB([usb], [usb_init], [LIBS="$LIBS"], [AC_MSG_ERROR([cannot find libusb support], 2)])
    AC_CHECK_HEADERS(usb.h, ,[AC_MSG_ERROR([cannot find libusb-devel support], 11)])
 fi
--- hplip.conf.in.orig	2011-01-19 06:18:26.000000000 +0100
+++ hplip.conf.in	2011-02-16 23:02:25.362188054 +0100
@@ -5,14 +5,6 @@
 
 [dirs]
 home=@abs_datadir@/hplip
-run=/var/run
-ppd=@abs_hpppddir@
-ppdbase=@abs_ppddir@
-doc=@abs_docdir@
-icon=@icondir@
-cupsbackend=@cupsbackenddir@
-cupsfilter=@cupsfilterdir@
-drv=@abs_drvdir@
 
 # Following values are determined at configure time and cannot be changed.
 [configure]
--- scan/sane/hpaio.c.orig	2011-01-19 06:16:27.000000000 +0100
+++ scan/sane/hpaio.c	2011-02-16 23:02:25.370188054 +0100
@@ -40,7 +40,6 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <ctype.h>
-#include <cups/cups.h>
 #include "sane.h"
 #include "saneopts.h"
 #include "common.h"
@@ -114,45 +113,6 @@
    return 0;
 }
 
-static int AddCupsList(char *uri, char ***printer)
-{
-   int i, stat=1;
-
-   /* Look for hp network URIs only. */
-   if (strncasecmp(uri, "hp:/net/", 8) !=0)
-      goto bugout;
-
-   if (*printer == NULL)
-   {
-      /* Allocate array of string pointers. */
-      *printer = malloc(sizeof(char *) * MAX_DEVICE);
-      memset(*printer, 0, sizeof(char *) * MAX_DEVICE);
-   }
-
-   /* Ignor duplicates (ie: printer queues using the same device). */
-   for (i=0; (*printer)[i] != NULL && i<MAX_DEVICE; i++)
-   {
-      if (strcmp((*printer)[i], uri) == 0)
-         goto bugout;
-   }
-
-   /* Find empty slot in array of pointers. */
-   for (i=0; i<MAX_DEVICE; i++)
-   {
-      if ((*printer)[i] == NULL)
-      {
-         (*printer)[i] = strdup(uri);
-         break;
-      }
-   }
-
-   stat = 0;
-
-bugout:
-
-   return stat;
-}
-
 /* Parse URI record from buf. Assumes one record per line. All returned strings are zero terminated. */
 static int GetUriLine(char *buf, char *uri, char **tail)
 {
@@ -185,58 +145,6 @@
    return i;
 }
 
-static int GetCupsPrinters(char ***printer)
-{
-   http_t *http=NULL;     /* HTTP object */
-   ipp_t *request=NULL;  /* IPP request object */
-   ipp_t *response=NULL; /* IPP response object */
-   ipp_attribute_t *attr;     /* Current IPP attribute */
-   int cnt=0;
-
-   /* Connect to the HTTP server */
-   if ((http = httpConnectEncrypt(cupsServer(), ippPort(), cupsEncryption())) == NULL)
-      goto bugout;
-
-   /* Assemble the IPP request */
-   request = ippNew();
-
-   request->request.op.operation_id = CUPS_GET_PRINTERS;
-   request->request.any.request_id  = 1;
-
-   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_CHARSET, "attributes-charset", NULL, "utf-8");
-   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_LANGUAGE, "attributes-natural-language", NULL, "en");
-   ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD, "requested-attributes", NULL, "device-uri");
-
-   /* Send the request and get a response. */
-   if ((response = cupsDoRequest(http, request, "/")) == NULL)
-      goto bugout;
-
-   for (attr = response->attrs; attr != NULL; attr = attr->next)
-   {
-      /* Skip leading attributes until we hit a printer. */
-      while (attr != NULL && attr->group_tag != IPP_TAG_PRINTER)
-         attr = attr->next;
-
-      if (attr == NULL)
-         break;
-
-      while (attr != NULL && attr->group_tag == IPP_TAG_PRINTER)
-      {
-         if (strcmp(attr->name, "device-uri") == 0 && attr->value_tag == IPP_TAG_URI && AddCupsList(attr->values[0].string.text, printer) == 0)
-            cnt++;
-         attr = attr->next;
-      }
-
-      if (attr == NULL)
-         break;
-   }
-
-   ippDelete(response);
-
- bugout:
-   return cnt;
-}
-
 static int DevDiscovery(int localOnly)
 {
    struct hpmud_model_attributes ma;
@@ -245,7 +153,6 @@
    char model[HPMUD_LINE_SIZE];
    char *tail;
    int i, scan_type, cnt=0, total=0, bytes_read;  
-   char **cups_printer=NULL;     /* list of printers */
    enum HPMUD_RESULT stat;
 
    stat = hpmud_probe_devices(HPMUD_BUS_ALL, message, sizeof(message), &cnt, &bytes_read);
@@ -272,26 +179,6 @@
       }
    }
 
-   /* Ignore localOnly flag (used by saned) and always look for network all-in-one scan devices (defined by cups). */
-   cnt = GetCupsPrinters(&cups_printer);
-   for (i=0; i<cnt; i++)
-   {
-      hpmud_query_model(cups_printer[i], &ma);
-      if (ma.scantype > 0)
-      {
-         hpmud_get_uri_model(cups_printer[i], model, sizeof(model));
-         AddDeviceList(cups_printer[i], model, &DeviceList);
-         total++;
-      }
-      else
-      {
-         DBG6("unsupported scantype=%d %s\n", ma.scantype, cups_printer[i]);
-      }
-      free(cups_printer[i]);
-   }
-   if (cups_printer)
-      free(cups_printer);
-
 bugout:
    return total;
 }
--- Makefile.am.orig	2011-01-19 06:18:26.000000000 +0100
+++ Makefile.am	2011-02-16 23:02:25.366188054 +0100
@@ -8,10 +8,6 @@
 
 hplipdir = $(datadir)/hplip
 
-docdir = $(hpdocdir)
-doc_DATA = COPYING copyright prnt/hpijs/README_LIBJPG
-EXTRA_DIST = prnt/hpijs/gdevijs-krgb-1.5-gs8.61.patch prnt/hpijs/README_LIBJPG copyright
-
 dist_noinst_SCRIPTS =
 dist_noinst_DATA =
 noinst_PROGRAMS =
@@ -33,13 +29,6 @@
 
 if HPLIP_BUILD
 
-# hp backend.
-hpdir = $(cupsbackenddir)
-hp_PROGRAMS = hp
-hp_SOURCES = prnt/backend/hp.c
-hp_LDADD = libhpmud.la $(DBUS_LIBS)
-hp_CFLAGS = $(DBUS_CFLAGS)
-
 # hpaio sane backend
 if SCAN_BUILD
 libsane_hpaiodir = $(libdir)/sane
@@ -56,7 +45,7 @@
 libsane_hpaio_la_LDFLAGS = -version-info 1:0:0
 endif
 # The following is a interlibrary dependency that must be compiled first.
-libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -lcups -ldl
+libsane_hpaio_la_LIBADD = libhpip.la libhpmud.la $(DBUS_LIBS) -ldl
 #libsane_hpaio_la_CFLAGS = -DWITH_NONAMESPACES -DSOAP_DEBUG
 libsane_hpaio_la_CFLAGS = $(DBUS_CFLAGS)
 endif # SCAN_BUILD
@@ -83,36 +72,10 @@
 	ip/xbi2gray.c ip/xcolrspc.c ip/xfakemono.c ip/xgray2bi.c ip/xinvert.c ip/xjpg_enc.c ip/xmatrix.c ip/xpnm.c ip/xscale.c ip/xthumb.c ip/xyxtract.c \
 	ip/hpip.h ip/ipdefs.h ip/xform.h ip/xjpg_dct.h ip/xjpg_huf.h ip/xjpg_mrk.h
 
-# hp-mkuri.
-hp_mkuridir = $(bindir)
-hp_mkuri_PROGRAMS = hp-mkuri
-hp_mkuri_SOURCES = io/hpmud/hp-mkuri.c
-hp_mkuri_LDADD = -ldl libhpmud.la
-hp_mkuri_CFLAGS = -DCONFDIR=\"$(hplip_confdir)\"
-
-# hpmud.rules
-rulesdir = /etc/udev/rules.d
-dist_rules_DATA = data/rules/56-hpmud_support.rules
-if UDEV_ACL_RULES
-dist_rules_DATA += data/rules/40-hplip.rules
-else
-dist_rules_DATA += data/rules/55-hpmud.rules
-endif
-halpredir = /usr/share/hal/fdi/preprobe/10osvendor
-dist_halpre_DATA = data/rules/20-hplip-devices.fdi
-
 # hplip.conf
-hplip_confdir = /etc/hp
+hplip_confdir = /etc/default.hplip
 hplip_conf_DATA = hplip.conf
 
-#pstotiff filter
-pstotiffdir = $(cupsfilterdir)
-pstotiff_SCRIPTS = fax/filters/pstotiff
-
-# hplip.state
-hplip_statedir = /var/lib/hp
-dist_hplip_state_DATA = hplip.state
-
 if FULL_BUILD
 
 dist_hplip_SCRIPTS = hpssd.py __init__.py hpdio.py
@@ -325,13 +288,6 @@
 dist_policykit_policy_DATA = data/policykit/com.hp.hplip.policy
 endif
 
-# hppgsz
-noinst_PROGRAMS += hppgsz
-hppgsz_SOURCES = prnt/hpijs/PrinterProperties.cpp prnt/hpijs/PrinterProperties.h prnt/hpijs/bug.h
-hppgsz_CXXFLAGS = $(libapdk_la_CXXFLAGS)
-hppgsz_CFLAGS = $(libapdk_la_CFLAGS)
-hppgsz_LDADD = libapdk.la -ljpeg -ldl
-
 # hplip.desktop
 hplip_desktopdir = $(icondir)
 hplip_desktop_DATA = hplip.desktop
@@ -358,45 +314,6 @@
 dist_rip_SCRIPTS = prnt/hpijs/foomatic-rip-hplip
 endif
 
-# apdk
-noinst_LTLIBRARIES = libapdk.la
-libapdk_la_SOURCES = prnt/hpijs/models.cpp prnt/hpijs/breaks_open.cpp \
-	prnt/hpijs/dj9xxvip.cpp prnt/hpijs/dj9xx.cpp prnt/hpijs/capture.cpp prnt/hpijs/colormatch.cpp prnt/hpijs/colormatcher_open.cpp \
-	prnt/hpijs/compression.cpp prnt/hpijs/context2.cpp prnt/hpijs/create_so.cpp prnt/hpijs/creator.cpp \
-	prnt/hpijs/dj600.cpp prnt/hpijs/dj630.cpp prnt/hpijs/dj660.cpp prnt/hpijs/dj690.cpp prnt/hpijs/dj6xx.cpp prnt/hpijs/dj8xx.cpp prnt/hpijs/dj600_maps.cpp \
-	prnt/hpijs/dj660_maps.cpp prnt/hpijs/dj690_maps.cpp prnt/hpijs/dj895_maps.cpp prnt/hpijs/dj895_maps2.cpp prnt/hpijs/dj970_maps.cpp \
-	prnt/hpijs/dj970_maps2.cpp prnt/hpijs/dj970_maps3.cpp prnt/hpijs/filterhpa.cpp prnt/hpijs/apollo21xx.cpp prnt/hpijs/apollo2560.cpp prnt/hpijs/apollo2xxx.cpp \
-	prnt/hpijs/dj8x5.cpp prnt/hpijs/psp100.cpp prnt/hpijs/phobos_cmaps.cpp prnt/hpijs/dj350.cpp prnt/hpijs/halftoner.cpp prnt/hpijs/halftoner_open.cpp \
-	prnt/hpijs/globals.cpp prnt/hpijs/header2.cpp prnt/hpijs/htmtxhi.cpp prnt/hpijs/pmselect.cpp \
-	prnt/hpijs/job.cpp prnt/hpijs/printer.cpp prnt/hpijs/registry.cpp prnt/hpijs/scaler.cpp \
-	prnt/hpijs/scaler_open.cpp prnt/hpijs/script.cpp prnt/hpijs/systemservices.cpp \
-	prnt/hpijs/translator.cpp prnt/hpijs/version.cpp prnt/hpijs/versioncode.cpp \
-	prnt/hpijs/djgenericvip.cpp prnt/hpijs/dj540.cpp prnt/hpijs/dj850.cpp prnt/hpijs/dj850_maps.cpp prnt/hpijs/dj890.cpp \
-	prnt/hpijs/apollo21xx.h prnt/hpijs/apollo2560.h prnt/hpijs/apollo2xxx.h prnt/hpijs/colormatch.h prnt/hpijs/colormatcher_open.h \
-	prnt/hpijs/compression.h prnt/hpijs/config.h prnt/hpijs/context.h prnt/hpijs/dj350.h prnt/hpijs/dj400.h prnt/hpijs/dj540.h \
-	prnt/hpijs/dj600.h prnt/hpijs/dj630.h prnt/hpijs/dj660.h prnt/hpijs/dj690.h prnt/hpijs/dj6xx.h prnt/hpijs/dj8x5.h prnt/hpijs/dj8xx.h \
-	prnt/hpijs/dj850.h prnt/hpijs/dj890.h prnt/hpijs/dj9xx.h prnt/hpijs/dj9xxvip.h \
-	prnt/hpijs/ernieplatform.h prnt/hpijs/filterhpa.h prnt/hpijs/global_types.h prnt/hpijs/halftoner.h prnt/hpijs/font.h prnt/hpijs/debug.h \
-	prnt/hpijs/halftoner_open.h prnt/hpijs/header.h prnt/hpijs/hpprint_c_api.h \
-	prnt/hpijs/hpprintapi.h prnt/hpijs/hptypes.h prnt/hpijs/htfed.h prnt/hpijs/internal.h \
-	prnt/hpijs/interp.h prnt/hpijs/interp_data_50.h prnt/hpijs/io_defs.h prnt/hpijs/job.h prnt/hpijs/models.h prnt/hpijs/modes.h prnt/hpijs/pmselect.h \
-	prnt/hpijs/printer.h prnt/hpijs/psp100.h prnt/hpijs/psp470.h prnt/hpijs/resources.h prnt/hpijs/scaler_open.h prnt/hpijs/scaler_prop.h prnt/hpijs/script.h \
-	prnt/hpijs/systemservices.h prnt/hpijs/unistd_.h prnt/hpijs/djgenericvip.h prnt/hpijs/ljmono.h prnt/hpijs/ljmono.cpp \
-	prnt/hpijs/dj3320.cpp prnt/hpijs/dj3320.h prnt/hpijs/dj3320_cmap.cpp prnt/hpijs/dj3600.cpp prnt/hpijs/dj3600.h prnt/hpijs/dj3600_cmap.cpp prnt/hpijs/dj4100.h prnt/hpijs/djd2600.h \
-	prnt/hpijs/dj4100_cmap.cpp prnt/hpijs/ldlencap.h prnt/hpijs/ljcolor.cpp prnt/hpijs/ljcolor.h prnt/hpijs/pscript.h \
-	prnt/hpijs/printerproxy.cpp prnt/hpijs/printerfactory.cpp prnt/hpijs/printerproxy.h prnt/hpijs/printerfactory.h \
-	prnt/hpijs/ljjetready.cpp prnt/hpijs/ljjetready.h prnt/hpijs/jdatadbf.c prnt/hpijs/jccolor.c prnt/hpijs/ljfastraster.cpp prnt/hpijs/ljfastraster.h \
-	prnt/hpijs/jinclude.h prnt/hpijs/jpegint.h prnt/hpijs/dj55xx.h prnt/hpijs/hpijsfax.h prnt/hpijs/ojprokx50.h \
-	prnt/hpijs/ljzjs.cpp prnt/hpijs/ljzjs.h prnt/hpijs/ljzjsmono.cpp prnt/hpijs/ljm1005.cpp prnt/hpijs/ljm1005.h \
-	prnt/hpijs/ljzjsmono.h prnt/hpijs/hpjbig_wrapper.h prnt/hpijs/quickconnect.cpp prnt/hpijs/quickconnect.h prnt/hpijs/ljp1xxx.h prnt/hpijs/ljzjscolor.cpp prnt/hpijs/ljzjscolor.h
-libapdk_la_CXXFLAGS = -DAPDK_DJ660 -DAPDK_DJ6xx -DAPDK_DJ6xxPhoto -DAPDK_DJ8xx -DAPDK_DJ9xx -DAPDK_DJ9xxVIP -DAPDK_DJ630 \
-	-DAPDK_APOLLO2XXX -DAPDK_APOLLO21XX -DAPDK_APOLLO2560 -DAPDK_DJ600 -DAPDK_DJ350 -DAPDK_DJ8x5 -DAPDK_PSP100 -DAPDK_AUTODUPLEX \
-	-DAPDK_HIGH_RES_MODES -DAPDK_LJMONO -DAPDK_DJ540 -DAPDK_DJ850 -DAPDK_DJ890 -DAPDK_DJ3320 -DAPDK_LJCOLOR -DAPDK_DJGENERICVIP \
-	-DAPDK_LJJETREADY  -DAPDK_LJFASTRASTER -DAPDK_BUFFER_SEND -DAPDK_LDL_COMPRESS -DAPDK_EXTENDED_MEDIASIZE \
-	-DAPDK_MLC_PRINTER -DAPDK_DJ3600 -DAPDK_LJZJS_MONO -DAPDK_LJZJS_COLOR -DAPDK_LJM1005 -DAPDK_QUICKCONNECT \
-                $(APDK_ENDIAN_FLAG) $(APDK_AUTO_INCLUDE_FLAG) -DAPDK_LINUX -DNDEBUG $(DBUS_CFLAGS)
-libapdk_la_CFLAGS = $(libapdk_la_CXXFLAGS) -Iprnt/hpijs
-
 if HPIJS_INSTALL
 # hpijs
 bin_PROGRAMS = hpijs
@@ -473,37 +390,8 @@
 endif # HPCUPS ONLY
 endif # HPCUPS_INSTALL
 
-# PPDs
-ppddir = $(hpppddir)
-dist_ppd_DATA = $(foomatic_ps_printers)
-if FOOMATIC_PPD_INSTALL
-dist_ppd_DATA += $(foomatic_ppd_printers)
-endif
-if FOOMATIC_DRV_INSTALL
-cupsdrvdir = $(drvdir)
-cupsdrv_DATA = $(foomatic_drv)
-endif
-if CUPS_PPD_INSTALL
-dist_ppd_DATA += $(cups_ppd_printers)
-endif
-if CUPS_DRV_INSTALL
-cupsdrv2dir = $(drvdir)
-cupsdrv2_DATA = $(cups_drv)
-endif
-
 install-data-hook:
 if HPLIP_BUILD
-#	   If scanner build, add hpaio entry to sane dll.conf.
-	if [ "$(scan_build)" = "yes" ]; then \
-	   $(mkinstalldirs) $(DESTDIR)/etc/sane.d; \
-	   if [ ! -f $(DESTDIR)/etc/sane.d/dll.conf ]; then \
-		  touch $(DESTDIR)/etc/sane.d/dll.conf; \
-	   fi; \
-	   if ! grep ^hpaio $(DESTDIR)/etc/sane.d/dll.conf >/dev/null 2>/dev/null ; then \
-		  echo "Adding hpaio entry to /etc/sane.d/dll.conf." ; \
-		  echo hpaio >>$(DESTDIR)/etc/sane.d/dll.conf ; \
-	   fi \
-	fi
 if FULL_BUILD
 #	   Create hp-xxx commands in bindir.
 	$(mkinstalldirs) $(DESTDIR)$(bindir)
