ca53cd4
diff -up cups-1.4rc1/scheduler/conf.c.serverbin-compat cups-1.4rc1/scheduler/conf.c
ca53cd4
--- cups-1.4rc1/scheduler/conf.c.serverbin-compat	2009-05-26 16:41:04.000000000 +0100
ca53cd4
+++ cups-1.4rc1/scheduler/conf.c	2009-06-17 11:03:24.286442640 +0100
ca53cd4
@@ -490,6 +490,9 @@ cupsdReadConfiguration(void)
a1088d0
   cupsdClearString(&ServerName);
a1088d0
   cupsdClearString(&ServerAdmin);
69289fd
   cupsdSetString(&ServerBin, CUPS_SERVERBIN);
69289fd
+#ifdef __x86_64__
69289fd
+  cupsdSetString(&ServerBin_compat, "/usr/lib64/cups");
69289fd
+#endif /* __x86_64__ */
69289fd
   cupsdSetString(&RequestRoot, CUPS_REQUESTS);
69289fd
   cupsdSetString(&CacheDir, CUPS_CACHEDIR);
69289fd
   cupsdSetString(&DataDir, CUPS_DATADIR);
ca53cd4
@@ -1320,7 +1323,12 @@ cupsdReadConfiguration(void)
69289fd
     * Read the MIME type and conversion database...
69289fd
     */
69289fd
 
69289fd
+#ifdef __x86_64__
69289fd
+    snprintf(temp, sizeof(temp), "%s/filter:%s/filter", ServerBin,
69289fd
+	     ServerBin_compat);
cb06f24
+#else
69289fd
     snprintf(temp, sizeof(temp), "%s/filter", ServerBin);
69289fd
+#endif
cb06f24
     snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
69289fd
 
cb06f24
     MimeDatabase = mimeLoadTypes(NULL, mimedir);
ca53cd4
diff -up cups-1.4rc1/scheduler/conf.h.serverbin-compat cups-1.4rc1/scheduler/conf.h
ca53cd4
--- cups-1.4rc1/scheduler/conf.h.serverbin-compat	2009-05-11 23:46:01.000000000 +0100
ca53cd4
+++ cups-1.4rc1/scheduler/conf.h	2009-06-17 11:03:24.287442308 +0100
ca53cd4
@@ -106,6 +106,10 @@ VAR char		*ConfigurationFile	VALUE(NULL)
69289fd
 					/* Root directory for scheduler */
69289fd
 			*ServerBin		VALUE(NULL),
69289fd
 					/* Root directory for binaries */
69289fd
+#ifdef __x86_64__
69289fd
+			*ServerBin_compat	VALUE(NULL),
69289fd
+					/* Compat directory for binaries */
69289fd
+#endif /* __x86_64__ */
69289fd
 			*StateDir		VALUE(NULL),
69289fd
 					/* Root directory for state data */
69289fd
 			*RequestRoot		VALUE(NULL),
ca53cd4
diff -up cups-1.4rc1/scheduler/env.c.serverbin-compat cups-1.4rc1/scheduler/env.c
ca53cd4
--- cups-1.4rc1/scheduler/env.c.serverbin-compat	2008-06-18 23:31:26.000000000 +0100
ca53cd4
+++ cups-1.4rc1/scheduler/env.c	2009-06-17 11:03:24.288442597 +0100
69289fd
@@ -86,8 +86,13 @@ cupsdInitEnv(void)
69289fd
   cupsdSetEnv("LD_LIBRARY_PATH", NULL);
69289fd
   cupsdSetEnv("LD_PRELOAD", NULL);
69289fd
   cupsdSetEnv("NLSPATH", NULL);
69289fd
+#ifdef __x86_64__
69289fd
+  cupsdSetEnvf("PATH", "%s/filter:%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR
69289fd
+                       ":/bin:/usr/bin", ServerBin, ServerBin_compat);
69289fd
+#else /* ! defined(__x86_64__) */
69289fd
   cupsdSetEnvf("PATH", "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR
69289fd
                        ":/bin:/usr/bin", ServerBin);
69289fd
+#endif
69289fd
   cupsdSetEnv("SERVER_ADMIN", ServerAdmin);
69289fd
   cupsdSetEnv("SHLIB_PATH", NULL);
69289fd
   cupsdSetEnv("SOFTWARE", CUPS_MINIMAL);
ca53cd4
diff -up cups-1.4rc1/scheduler/ipp.c.serverbin-compat cups-1.4rc1/scheduler/ipp.c
ca53cd4
--- cups-1.4rc1/scheduler/ipp.c.serverbin-compat	2009-05-26 23:01:23.000000000 +0100
ca53cd4
+++ cups-1.4rc1/scheduler/ipp.c	2009-06-17 11:03:24.295443078 +0100
ca53cd4
@@ -2539,9 +2539,18 @@ add_printer(cupsd_client_t  *con,	/* I -
c07f027
         * Could not find device in list!
c07f027
 	*/
c07f027
 
c07f027
+#ifdef __x86_64__
cb06f24
+	snprintf(srcfile, sizeof(srcfile), "%s/backend/%s", ServerBin_compat,
4f25cbd
+		 scheme);
c07f027
+	if (access(srcfile, X_OK))
cb06f24
+	{
c07f027
+#endif /* __x86_64__ */
cb06f24
 	send_ipp_status(con, IPP_NOT_POSSIBLE, _("Bad device-uri scheme \"%s\"!"),
cb06f24
         	        scheme);
c07f027
 	return;
c07f027
+#ifdef __x86_64__
cb06f24
+	}
c07f027
+#endif /* __x86_64__ */
c07f027
       }
c07f027
     }
c07f027
 
ca53cd4
diff -up cups-1.4rc1/scheduler/job.c.serverbin-compat cups-1.4rc1/scheduler/job.c
ca53cd4
--- cups-1.4rc1/scheduler/job.c.serverbin-compat	2009-05-11 23:46:01.000000000 +0100
ca53cd4
+++ cups-1.4rc1/scheduler/job.c	2009-06-17 11:03:24.305442437 +0100
ca53cd4
@@ -972,8 +972,32 @@ cupsdContinueJob(cupsd_job_t *job)	/* I 
c07f027
        i ++, filter = (mime_filter_t *)cupsArrayNext(filters))
c07f027
   {
c07f027
     if (filter->filter[0] != '/')
c07f027
-      snprintf(command, sizeof(command), "%s/filter/%s", ServerBin,
c07f027
-               filter->filter);
c07f027
+      {
c07f027
+	snprintf(command, sizeof(command), "%s/filter/%s", ServerBin,
c07f027
+		 filter->filter);
c07f027
+#ifdef __x86_64__
c07f027
+	if (access(command, F_OK))
c07f027
+	  {
c07f027
+	    snprintf(command, sizeof(command), "%s/filter/%s",
c07f027
+		     ServerBin_compat, filter->filter);
c07f027
+	    if (!access(command, F_OK))
c07f027
+	      {
c07f027
+		/* Not in the correct directory, but found it in the compat
c07f027
+		 * directory.  Issue a warning. */
c07f027
+		cupsdLogMessage(CUPSD_LOG_INFO,
c07f027
+				"Filter '%s' not in %s/filter!",
c07f027
+				filter->filter, ServerBin);
c07f027
+	      }
c07f027
+	    else
c07f027
+	      {
c07f027
+		/* Not in the compat directory either; make any error
c07f027
+		 * messages use the correct directory name then. */
c07f027
+		snprintf(command, sizeof(command), "%s/filter/%s", ServerBin,
c07f027
+			 filter->filter);
c07f027
+	      }
c07f027
+	  }
c07f027
+#endif /* __x86_64__ */
02266be
+      }
c07f027
     else
c07f027
       strlcpy(command, filter->filter, sizeof(command));
c07f027
 
ca53cd4
@@ -1119,6 +1143,28 @@ cupsdContinueJob(cupsd_job_t *job)	/* I 
a1088d0
       cupsdClosePipe(job->print_pipes);
a1088d0
       cupsdClosePipe(job->back_pipes);
a1088d0
       cupsdClosePipe(job->side_pipes);
c07f027
+#ifdef __x86_64__
c07f027
+      if (access(command, F_OK))
c07f027
+	{
c07f027
+	  snprintf(command, sizeof(command), "%s/backend/%s", ServerBin_compat,
c07f027
+		   method);
c07f027
+	  if (!access(command, F_OK))
c07f027
+	    {
c07f027
+	      /* Not in the correct directory, but we found it in the compat
c07f027
+	       * directory.  Issue a warning. */
c07f027
+	      cupsdLogMessage(CUPSD_LOG_INFO,
c07f027
+			      "Backend '%s' not in %s/backend!", method,
c07f027
+			      ServerBin);
c07f027
+	    }
c07f027
+	  else
c07f027
+	    {
c07f027
+	      /* Not in the compat directory either; make any error
c07f027
+		 messages use the correct directory name then. */
c07f027
+	      snprintf(command, sizeof(command), "%s/backend/%s", ServerBin,
c07f027
+		       method);
c07f027
+	    }
c07f027
+	}
c07f027
+#endif /* __x86_64__ */
c07f027
 
a1088d0
       close(job->status_pipes[1]);
a1088d0
       job->status_pipes[1] = -1;
ca53cd4
diff -up cups-1.4rc1/scheduler/printers.c.serverbin-compat cups-1.4rc1/scheduler/printers.c
ca53cd4
--- cups-1.4rc1/scheduler/printers.c.serverbin-compat	2009-05-16 22:49:57.000000000 +0100
ca53cd4
+++ cups-1.4rc1/scheduler/printers.c	2009-06-17 11:08:13.888317742 +0100
ca53cd4
@@ -1015,9 +1015,19 @@ cupsdLoadAllPrinters(void)
69289fd
 	    * Backend does not exist, stop printer...
69289fd
 	    */
69289fd
 
c07f027
+#ifdef __x86_64__
69289fd
+	    snprintf(line, sizeof(line), "%s/backend/%s", ServerBin_compat,
69289fd
+		     p->device_uri);
ca53cd4
+	    if (access(line, 0))
69289fd
+	      {
69289fd
+#endif /* __x86_64__ */
69289fd
+
69289fd
 	    p->state = IPP_PRINTER_STOPPED;
69289fd
 	    snprintf(p->state_message, sizeof(p->state_message),
69289fd
 	             "Backend %s does not exist!", line);
c07f027
+#ifdef __x86_64__
69289fd
+	      }
c07f027
+#endif /* __x86_64__ */
69289fd
 	  }
69289fd
         }
c07f027
 
ca53cd4
@@ -3549,6 +3559,12 @@ add_printer_filter(
69289fd
 
a1088d0
     if (stat(filename, &fileinfo))
69289fd
     {
c07f027
+#ifdef __x86_64__
69289fd
+      snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin_compat,
69289fd
+	       program);
ca53cd4
+      if (stat(filename, &fileinfo))
ca53cd4
+      {
69289fd
+#endif /* __x86_64__ */
ca53cd4
       memset(&fileinfo, 0, sizeof(fileinfo));
ca53cd4
 
69289fd
       snprintf(p->state_message, sizeof(p->state_message),
ca53cd4
@@ -3557,6 +3573,9 @@ add_printer_filter(
ca53cd4
       cupsdSetPrinterReasons(p, "+cups-missing-filter-warning");
c07f027
 
69289fd
       cupsdLogMessage(CUPSD_LOG_ERROR, "%s", p->state_message);
69289fd
+#ifdef __x86_64__
ca53cd4
+      }
69289fd
+#endif /* __x86_64__ */
69289fd
     }
c07f027
 
a1088d0
    /*