4743e1
diff -up cups-1.5b1/scheduler/conf.c.serverbin-compat cups-1.5b1/scheduler/conf.c
4743e1
--- cups-1.5b1/scheduler/conf.c.serverbin-compat	2011-05-20 06:24:54.000000000 +0200
4743e1
+++ cups-1.5b1/scheduler/conf.c	2011-05-23 17:20:33.000000000 +0200
4743e1
@@ -491,6 +491,9 @@ cupsdReadConfiguration(void)
a1088d
   cupsdClearString(&ServerName);
a1088d
   cupsdClearString(&ServerAdmin);
69289f
   cupsdSetString(&ServerBin, CUPS_SERVERBIN);
69289f
+#ifdef __x86_64__
69289f
+  cupsdSetString(&ServerBin_compat, "/usr/lib64/cups");
69289f
+#endif /* __x86_64__ */
69289f
   cupsdSetString(&RequestRoot, CUPS_REQUESTS);
69289f
   cupsdSetString(&CacheDir, CUPS_CACHEDIR);
69289f
   cupsdSetString(&DataDir, CUPS_DATADIR);
4743e1
@@ -1378,7 +1381,12 @@ cupsdReadConfiguration(void)
69289f
     * Read the MIME type and conversion database...
69289f
     */
69289f
 
69289f
+#ifdef __x86_64__
69289f
+    snprintf(temp, sizeof(temp), "%s/filter:%s/filter", ServerBin,
69289f
+	     ServerBin_compat);
cb06f2
+#else
69289f
     snprintf(temp, sizeof(temp), "%s/filter", ServerBin);
69289f
+#endif
cb06f2
     snprintf(mimedir, sizeof(mimedir), "%s/mime", DataDir);
69289f
 
4743e1
     MimeDatabase = mimeNew();
4743e1
diff -up cups-1.5b1/scheduler/conf.h.serverbin-compat cups-1.5b1/scheduler/conf.h
4743e1
--- cups-1.5b1/scheduler/conf.h.serverbin-compat	2011-04-22 19:47:03.000000000 +0200
4743e1
+++ cups-1.5b1/scheduler/conf.h	2011-05-23 15:34:25.000000000 +0200
529334
@@ -105,6 +105,10 @@ VAR char		*ConfigurationFile	VALUE(NULL)
69289f
 					/* Root directory for scheduler */
69289f
 			*ServerBin		VALUE(NULL),
69289f
 					/* Root directory for binaries */
69289f
+#ifdef __x86_64__
69289f
+			*ServerBin_compat	VALUE(NULL),
69289f
+					/* Compat directory for binaries */
69289f
+#endif /* __x86_64__ */
69289f
 			*StateDir		VALUE(NULL),
69289f
 					/* Root directory for state data */
69289f
 			*RequestRoot		VALUE(NULL),
4743e1
diff -up cups-1.5b1/scheduler/env.c.serverbin-compat cups-1.5b1/scheduler/env.c
4743e1
--- cups-1.5b1/scheduler/env.c.serverbin-compat	2011-01-11 04:48:42.000000000 +0100
4743e1
+++ cups-1.5b1/scheduler/env.c	2011-05-23 17:07:17.000000000 +0200
4743e1
@@ -218,8 +218,13 @@ cupsdUpdateEnv(void)
4743e1
   set_if_undefined("LD_PRELOAD", NULL);
4743e1
   set_if_undefined("NLSPATH", NULL);
4743e1
   if (find_env("PATH") < 0)
69289f
+#ifdef __x86_64__
4743e1
+    cupsdSetEnvf("PATH", "%s/filter:%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR
4743e1
+                         ":/bin:/usr/bin", ServerBin, ServerBin_compat);
69289f
+#else /* ! defined(__x86_64__) */
4743e1
     cupsdSetEnvf("PATH", "%s/filter:" CUPS_BINDIR ":" CUPS_SBINDIR
4743e1
 			 ":/bin:/usr/bin", ServerBin);
69289f
+#endif
4743e1
   set_if_undefined("SERVER_ADMIN", ServerAdmin);
4743e1
   set_if_undefined("SHLIB_PATH", NULL);
4743e1
   set_if_undefined("SOFTWARE", CUPS_MINIMAL);
4743e1
diff -up cups-1.5b1/scheduler/ipp.c.serverbin-compat cups-1.5b1/scheduler/ipp.c
4743e1
--- cups-1.5b1/scheduler/ipp.c.serverbin-compat	2011-05-20 05:49:49.000000000 +0200
4743e1
+++ cups-1.5b1/scheduler/ipp.c	2011-05-23 16:09:57.000000000 +0200
4743e1
@@ -2586,9 +2586,18 @@ add_printer(cupsd_client_t  *con,	/* I -
c07f02
         * Could not find device in list!
c07f02
 	*/
c07f02
 
c07f02
+#ifdef __x86_64__
cb06f2
+	snprintf(srcfile, sizeof(srcfile), "%s/backend/%s", ServerBin_compat,
4f25cb
+		 scheme);
c07f02
+	if (access(srcfile, X_OK))
cb06f2
+	{
c07f02
+#endif /* __x86_64__ */
4743e1
 	send_ipp_status(con, IPP_NOT_POSSIBLE,
4743e1
                         _("Bad device-uri scheme \"%s\"."), scheme);
c07f02
 	return;
c07f02
+#ifdef __x86_64__
cb06f2
+	}
c07f02
+#endif /* __x86_64__ */
c07f02
       }
c07f02
     }
c07f02
 
4743e1
diff -up cups-1.5b1/scheduler/job.c.serverbin-compat cups-1.5b1/scheduler/job.c
4743e1
--- cups-1.5b1/scheduler/job.c.serverbin-compat	2011-05-20 05:49:49.000000000 +0200
4743e1
+++ cups-1.5b1/scheduler/job.c	2011-05-23 16:18:57.000000000 +0200
4743e1
@@ -1047,8 +1047,32 @@ cupsdContinueJob(cupsd_job_t *job)	/* I 
c07f02
        i ++, filter = (mime_filter_t *)cupsArrayNext(filters))
c07f02
   {
c07f02
     if (filter->filter[0] != '/')
c07f02
-      snprintf(command, sizeof(command), "%s/filter/%s", ServerBin,
c07f02
-               filter->filter);
c07f02
+      {
c07f02
+	snprintf(command, sizeof(command), "%s/filter/%s", ServerBin,
c07f02
+		 filter->filter);
c07f02
+#ifdef __x86_64__
c07f02
+	if (access(command, F_OK))
c07f02
+	  {
c07f02
+	    snprintf(command, sizeof(command), "%s/filter/%s",
c07f02
+		     ServerBin_compat, filter->filter);
c07f02
+	    if (!access(command, F_OK))
c07f02
+	      {
c07f02
+		/* Not in the correct directory, but found it in the compat
c07f02
+		 * directory.  Issue a warning. */
c07f02
+		cupsdLogMessage(CUPSD_LOG_INFO,
c07f02
+				"Filter '%s' not in %s/filter!",
c07f02
+				filter->filter, ServerBin);
c07f02
+	      }
c07f02
+	    else
c07f02
+	      {
c07f02
+		/* Not in the compat directory either; make any error
c07f02
+		 * messages use the correct directory name then. */
c07f02
+		snprintf(command, sizeof(command), "%s/filter/%s", ServerBin,
c07f02
+			 filter->filter);
c07f02
+	      }
c07f02
+	  }
c07f02
+#endif /* __x86_64__ */
02266b
+      }
c07f02
     else
c07f02
       strlcpy(command, filter->filter, sizeof(command));
c07f02
 
4743e1
@@ -1199,6 +1223,28 @@ cupsdContinueJob(cupsd_job_t *job)	/* I 
4743e1
     {
a1088d
       cupsdClosePipe(job->back_pipes);
a1088d
       cupsdClosePipe(job->side_pipes);
c07f02
+#ifdef __x86_64__
c07f02
+      if (access(command, F_OK))
c07f02
+	{
c07f02
+	  snprintf(command, sizeof(command), "%s/backend/%s", ServerBin_compat,
0b0e73
+		   scheme);
c07f02
+	  if (!access(command, F_OK))
c07f02
+	    {
c07f02
+	      /* Not in the correct directory, but we found it in the compat
c07f02
+	       * directory.  Issue a warning. */
c07f02
+	      cupsdLogMessage(CUPSD_LOG_INFO,
0b0e73
+			      "Backend '%s' not in %s/backend!", scheme,
c07f02
+			      ServerBin);
c07f02
+	    }
c07f02
+	  else
c07f02
+	    {
c07f02
+	      /* Not in the compat directory either; make any error
c07f02
+		 messages use the correct directory name then. */
c07f02
+	      snprintf(command, sizeof(command), "%s/backend/%s", ServerBin,
0b0e73
+		       scheme);
c07f02
+	    }
c07f02
+	}
c07f02
+#endif /* __x86_64__ */
c07f02
 
a1088d
       close(job->status_pipes[1]);
a1088d
       job->status_pipes[1] = -1;
4743e1
diff -up cups-1.5b1/scheduler/printers.c.serverbin-compat cups-1.5b1/scheduler/printers.c
4743e1
--- cups-1.5b1/scheduler/printers.c.serverbin-compat	2011-05-20 05:49:49.000000000 +0200
4743e1
+++ cups-1.5b1/scheduler/printers.c	2011-05-23 17:09:04.000000000 +0200
4743e1
@@ -1030,9 +1030,19 @@ cupsdLoadAllPrinters(void)
69289f
 	    * Backend does not exist, stop printer...
69289f
 	    */
69289f
 
c07f02
+#ifdef __x86_64__
69289f
+	    snprintf(line, sizeof(line), "%s/backend/%s", ServerBin_compat,
69289f
+		     p->device_uri);
ca53cd
+	    if (access(line, 0))
69289f
+	      {
69289f
+#endif /* __x86_64__ */
69289f
+
69289f
 	    p->state = IPP_PRINTER_STOPPED;
69289f
 	    snprintf(p->state_message, sizeof(p->state_message),
69289f
 	             "Backend %s does not exist!", line);
c07f02
+#ifdef __x86_64__
69289f
+	      }
c07f02
+#endif /* __x86_64__ */
69289f
 	  }
69289f
         }
c07f02
 
4743e1
@@ -3621,8 +3631,20 @@ add_printer_filter(
4743e1
     else
4743e1
       snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin, program);
69289f
 
c07f02
+#ifdef __x86_64__
4743e1
+    if (_cupsFileCheck(filename, _CUPS_FILE_CHECK_PROGRAM, !RunUser,
4743e1
+                       cupsdLogFCMessage, p) == _CUPS_FILE_CHECK_MISSING) {
69289f
+      snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin_compat,
4743e1
+               program);
4743e1
+      if (_cupsFileCheck(filename, _CUPS_FILE_CHECK_PROGRAM, !RunUser,
4743e1
+                         cupsdLogFCMessage, p) == _CUPS_FILE_CHECK_MISSING)
529334
+        snprintf(filename, sizeof(filename), "%s/filter/%s", ServerBin,
529334
+                 program);
4743e1
+    }
4743e1
+#else /* ! defined(__x86_64__) */
4743e1
     _cupsFileCheck(filename, _CUPS_FILE_CHECK_PROGRAM, !RunUser,
4743e1
                    cupsdLogFCMessage, p);
4743e1
+#endif 
4743e1
   }
c07f02
 
4743e1
  /*