diff -ru bjcups-2.4-0.orig/Makefile bjcups-2.4-0/Makefile
--- bjcups-2.4-0.orig/Makefile	2003-09-29 14:03:07.000000000 +0900
+++ bjcups-2.4-0/Makefile	2010-11-24 14:36:32.000000000 +0900
@@ -1,7 +1,7 @@
 dirs=bjcups filter ppd
 
 scripts=for dir in $(dirs); do\
-			pushd $$dir; make $$target; popd;\
+			cd $$dir; make $$target; cd ..;\
 		done
 
 all :
diff -ru bjcups-2.4-0.orig/bjcups/Makefile bjcups-2.4-0/bjcups/Makefile
--- bjcups-2.4-0.orig/bjcups/Makefile	2003-10-20 18:07:43.000000000 +0900
+++ bjcups-2.4-0/bjcups/Makefile	2010-11-24 14:41:03.000000000 +0900
@@ -1,6 +1,6 @@
 INSTALL_DIR = /usr/local/bin
 INSTALL_BIN = /usr/bin/install -c
-HDRPATH = -I ../include/cncl -I ../include/misc
+HDRPATH = -I ../include/cncl -I ../include/misc -I /usr/local/include
 
 TARGET = bjcups
 
@@ -8,7 +8,7 @@
 LFLAGS =
 
 OBJS = bjcups.o getipc.o bjutil.o
-LIBS = -lpopt -lcups -lparamlist
+LIBS = -L/usr/local/lib -lpopt -lcups -lparamlist
 
 .c.o : 
 	$(CC) $(CFLAGS) $(HDRPATH) $<
diff -ru bjcups-2.4-0.orig/filter/Makefile bjcups-2.4-0/filter/Makefile
--- bjcups-2.4-0.orig/filter/Makefile	2003-10-20 18:07:11.000000000 +0900
+++ bjcups-2.4-0/filter/Makefile	2010-11-24 14:42:54.000000000 +0900
@@ -1,14 +1,14 @@
-INSTALL_DIR = /usr/lib/cups/filter
+INSTALL_DIR = /usr/local/libexec/cups/filter
 INSTALL_BIN = /usr/bin/install -c
 HDRPATH =
 
 TARGET = pstocanonbj
 
-CFLAGS = -c -O2 -Wall
-LFLAGS =
+CFLAGS = -c -O2 -Wall -I/usr/local/include
+LFLAGS = 
 
 OBJS = pstocanonbj.o canonopt.o
-LIBS = -lcups -lbjexec -lparamlist
+LIBS = -L/usr/local/lib -lcups -lbjexec -lparamlist
 
 .c.o : 
 	$(CC) $(CFLAGS) $(HDRPATH) $<
diff -ru bjcups-2.4-0.orig/libs/Makefile bjcups-2.4-0/libs/Makefile
--- bjcups-2.4-0.orig/libs/Makefile	2002-03-27 15:46:49.000000000 +0900
+++ bjcups-2.4-0/libs/Makefile	2010-11-24 14:38:05.000000000 +0900
@@ -1,7 +1,7 @@
 dirs=bjexec paramlist
 
 scripts=for dir in $(dirs); do\
-			pushd $$dir; make $$target; popd;\
+			cd $$dir; make $$target; cd ..;\
 		done
 
 all :
diff -ru bjcups-2.4-0.orig/libs/bjexec/Makefile bjcups-2.4-0/libs/bjexec/Makefile
--- bjcups-2.4-0.orig/libs/bjexec/Makefile	2003-10-01 11:19:51.000000000 +0900
+++ bjcups-2.4-0/libs/bjexec/Makefile	2010-11-24 14:40:02.000000000 +0900
@@ -1,5 +1,5 @@
-INSTALL_DIR = /usr/lib
-INSTALL_HDR = /usr/include
+INSTALL_DIR = /usr/local/lib
+INSTALL_HDR = /usr/local/include
 INSTALL_LIB = /usr/bin/install -c -m 644
 INSTALL_DAT = /usr/bin/install -c -m 644
 
diff -ru bjcups-2.4-0.orig/libs/bjexec/bjexec.c bjcups-2.4-0/libs/bjexec/bjexec.c
--- bjcups-2.4-0.orig/libs/bjexec/bjexec.c	2003-11-26 14:22:44.000000000 +0900
+++ bjcups-2.4-0/libs/bjexec/bjexec.c	2010-11-24 14:38:27.000000000 +0900
@@ -22,7 +22,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <malloc.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 
diff -ru bjcups-2.4-0.orig/libs/paramlist/Makefile bjcups-2.4-0/libs/paramlist/Makefile
--- bjcups-2.4-0.orig/libs/paramlist/Makefile	2003-09-29 10:44:49.000000000 +0900
+++ bjcups-2.4-0/libs/paramlist/Makefile	2010-11-24 14:40:13.000000000 +0900
@@ -1,5 +1,5 @@
-INSTALL_DIR = /usr/lib
-INSTALL_HDR = /usr/include
+INSTALL_DIR = /usr/local/lib
+INSTALL_HDR = /usr/local/include
 INSTALL_LIB = /usr/bin/install -c -m 644
 INSTALL_DAT = /usr/bin/install -c -m 644
 
diff -ru bjcups-2.4-0.orig/libs/paramlist/paramlist.c bjcups-2.4-0/libs/paramlist/paramlist.c
--- bjcups-2.4-0.orig/libs/paramlist/paramlist.c	2003-11-26 14:23:08.000000000 +0900
+++ bjcups-2.4-0/libs/paramlist/paramlist.c	2010-11-24 14:38:47.000000000 +0900
@@ -21,7 +21,6 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <malloc.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 
diff -ru bjcups-2.4-0.orig/ppd/Makefile bjcups-2.4-0/ppd/Makefile
--- bjcups-2.4-0.orig/ppd/Makefile	2003-11-26 14:26:30.000000000 +0900
+++ bjcups-2.4-0/ppd/Makefile	2010-11-24 14:44:00.000000000 +0900
@@ -1,4 +1,4 @@
-INSTALL_DIR = /usr/share/cups/model
+INSTALL_DIR = /usr/local/share/cups/model
 INSTALL_DAT = /usr/bin/install -c -m 644
 
 FILES = canonpixus560i.ppd canonpixus860i.ppd canonpixus990i.ppd
