Index: configure.in
===================================================================
RCS file: /cvs/gnome/file-roller/configure.in,v
retrieving revision 1.82
diff -u -r1.82 configure.in
--- configure.in	31 Jan 2004 17:17:30 -0000	1.82
+++ configure.in	10 Feb 2004 15:27:28 -0000
@@ -91,6 +91,83 @@
 
 dnl ******************************
 
+AC_ARG_WITH(arj-path,AC_HELP_STRING([--with-arj-path],
+                                    [set path to arj (default is "arj")]),
+            PATH_ARJ=${withval},PATH_ARJ=tar)
+AC_SUBST(PATH_ARJ)
+
+AC_ARG_WITH(bzip-path,AC_HELP_STRING([--with-bzip-path],
+                                     [set path to bzip (default is "bzip")]),
+            PATH_BZIP=${withval},PATH_BZIP=bzip)
+AC_SUBST(PATH_BZIP)
+
+AC_ARG_WITH(bzip2-path,AC_HELP_STRING([--with-bzip2-path],
+                                     [set path to bzip2 (default is "bzip2")]),
+            PATH_BZIP2=${withval},PATH_BZIP2=bzip2)
+AC_SUBST(PATH_BZIP2)
+
+AC_ARG_WITH(gzip-path,AC_HELP_STRING([--with-gzip-path],
+                                     [set path to gzip (default is "gzip")]),
+            PATH_GZIP=${withval},PATH_GZIP=gzip)
+AC_SUBST(PATH_GZIP)
+
+AC_ARG_WITH(lha-path,AC_HELP_STRING([--with-lha-path],
+                                    [set path to lha (default is "lha")]),
+            PATH_LHA=${withval},PATH_LHA=lha)
+AC_SUBST(PATH_LHA)
+
+AC_ARG_WITH(lzop-path,AC_HELP_STRING([--with-lzop-path],
+                                     [set path to lzop (default is "lzop")]),
+            PATH_LZOP=${withval},PATH_LZOP=lzop)
+AC_SUBST(PATH_LZOP)
+
+AC_ARG_WITH(rar-path,AC_HELP_STRING([--with-rar-path],
+                                    [set path to rar (default is "rar")]),
+            PATH_RAR=${withval},PATH_RAR=rar)
+AC_SUBST(PATH_RAR)
+
+AC_ARG_WITH(rpm2cpio-path,AC_HELP_STRING([--with-rpm2cpio-path],
+                                         [set path to rpm2cpio (default is "rpm2cpio")]),
+            PATH_RPM2CPIO=${withval},PATH_RPM2CPIO=rpm2cpio)
+AC_SUBST(PATH_RPM2CPIO)
+
+AC_ARG_WITH(tar-path,AC_HELP_STRING([--with-tar-path],
+                                    [set path to GNU tar (default is "tar")]),
+            PATH_TAR=${withval},PATH_TAR=tar)
+AC_SUBST(PATH_TAR)
+
+AC_ARG_WITH(uncompress-path,AC_HELP_STRING([--with-uncompress-path],
+                                           [set path to uncompress (default is "uncompress")]),
+            PATH_UNCOMPRESS=${withval},PATH_UNCOMPRESS=uncompress)
+AC_SUBST(PATH_UNCOMPRESS)
+
+AC_ARG_WITH(unrar-path,AC_HELP_STRING([--with-unrar-path],
+                                      [set path to unrar (default is "unrar")]),
+            PATH_UNRAR=${withval},PATH_UNRAR=unrar)
+AC_SUBST(PATH_UNRAR)
+
+AC_ARG_WITH(unstuff-path,AC_HELP_STRING([--with-unstuff-path],
+                                        [set path to unstuff (default is "unstuff")]),
+            PATH_UNSTUFF=${withval},PATH_UNSTUFF=unstuff)
+AC_SUBST(PATH_UNSTUFF)
+
+AC_ARG_WITH(unzip-path,AC_HELP_STRING([--with-unzip-path],
+                                      [set path to unzip (default is "unzip")]),
+            PATH_UNZIP=${withval},PATH_UNZIP=unzip)
+AC_SUBST(PATH_UNZIP)
+
+AC_ARG_WITH(zip-path,AC_HELP_STRING([--with-zip-path],
+                                    [set path to zip (default is "zip")]),
+            PATH_ZIP=${withval},PATH_ZIP=zip)
+AC_SUBST(PATH_ZIP)
+
+AC_ARG_WITH(zoo-path,AC_HELP_STRING([--with-zoo-path],
+                                    [set path to zoo (default is "zoo")]),
+            PATH_ZOO=${withval},PATH_ZOO=zoo)
+AC_SUBST(PATH_ZOO)
+
+dnl ******************************
+
 AC_OUTPUT([
 Makefile
 file-roller.spec
Index: src/Makefile.am
===================================================================
RCS file: /cvs/gnome/file-roller/src/Makefile.am,v
retrieving revision 1.21
diff -u -r1.21 Makefile.am
--- src/Makefile.am	14 Jan 2004 14:24:29 -0000	1.21
+++ src/Makefile.am	10 Feb 2004 15:27:29 -0000
@@ -25,6 +25,21 @@
 	-DPIXMAPSDIR=\""$(datadir)/pixmaps"\"		\
 	-DGLADEDIR=\""$(gladedir)"\" 			\
 	-DICONDIR=\""$(datadir)/file-roller/icons"\"	\
+	-DPATH_ARJ=\""$(PATH_ARJ)"\"			\
+	-DPATH_BZIP=\""$(PATH_BZIP)"\"			\
+	-DPATH_BZIP2=\""$(PATH_BZIP2)"\"		\
+	-DPATH_GZIP=\""$(PATH_GZIP)"\"			\
+	-DPATH_LHA=\""$(PATH_LHA)"\"			\
+	-DPATH_LZOP=\""$(PATH_LZOP)"\"			\
+	-DPATH_RAR=\""$(PATH_RAR)"\"			\
+	-DPATH_RPM2CPIO=\""$(PATH_RPM2CPIO)"\"		\
+	-DPATH_TAR=\""$(PATH_TAR)"\"			\
+	-DPATH_UNCOMPRESS=\""$(PATH_UNCOMPRESS)"\"	\
+	-DPATH_UNRAR=\""$(PATH_UNRAR)"\"		\
+	-DPATH_UNSTUFF=\""$(PATH_UNSTUFF)"\"		\
+	-DPATH_UNZIP=\""$(PATH_UNZIP)"\"		\
+	-DPATH_ZIP=\""$(PATH_ZIP)"\"			\
+	-DPATH_ZOO=\""$(PATH_ZOO)"\"			\
 	$(DISABLE_DEPRECATED)				\
 	$(FR_CFLAGS)
 
Index: src/fr-command-arj.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-arj.c,v
retrieving revision 1.6
diff -u -r1.6 fr-command-arj.c
--- src/fr-command-arj.c	8 Feb 2004 10:31:30 -0000	1.6
+++ src/fr-command-arj.c	10 Feb 2004 15:27:30 -0000
@@ -163,7 +163,7 @@
 				      list__process_line,
 				      comm);
 
-	fr_process_begin_command (comm->process, "arj");
+	fr_process_begin_command (comm->process, PATH_ARJ);
 	fr_process_add_arg (comm->process, "v");
 	fr_process_add_arg (comm->process, "-y");
 	fr_process_add_arg (comm->process, "-");
@@ -183,7 +183,7 @@
 {
 	GList *scan;
 
-	fr_process_begin_command (comm->process, "arj");
+	fr_process_begin_command (comm->process, PATH_ARJ);
 
 	fr_process_add_arg (comm->process, "a");
 
@@ -229,7 +229,7 @@
 {
 	GList *scan;
 
-	fr_process_begin_command (comm->process, "arj");
+	fr_process_begin_command (comm->process, PATH_ARJ);
 	fr_process_add_arg (comm->process, "d");
 
 	fr_process_add_arg (comm->process, "-i");
@@ -255,7 +255,7 @@
 {
 	GList *scan;
 
-	fr_process_begin_command (comm->process, "arj");
+	fr_process_begin_command (comm->process, PATH_ARJ);
 
 	if (junk_paths)
 		fr_process_add_arg (comm->process, "e");
@@ -299,7 +299,7 @@
 fr_command_arj_test (FRCommand   *comm,
 		     const char  *password)
 {
-	fr_process_begin_command (comm->process, "arj");
+	fr_process_begin_command (comm->process, PATH_ARJ);
 	fr_process_add_arg (comm->process, "t");
 	if (password != NULL) {
 		char *swtch = g_strconcat ("-g/", password, NULL);
Index: src/fr-command-cfile.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-cfile.c,v
retrieving revision 1.8
diff -u -r1.8 fr-command-cfile.c
--- src/fr-command-cfile.c	8 Feb 2004 10:31:30 -0000	1.8
+++ src/fr-command-cfile.c	10 Feb 2004 15:27:31 -0000
@@ -95,7 +95,7 @@
 					      list__process_line,
 					      comm);
 
-		fr_process_begin_command (comm->process, "gzip");
+		fr_process_begin_command (comm->process, PATH_GZIP);
 		fr_process_add_arg (comm->process, "-l");
 		fr_process_add_arg (comm->process, "-q");
 		fr_process_add_arg (comm->process, comm->e_filename);
@@ -207,7 +207,7 @@
 		break;
 		
 	case FR_COMPRESS_PROGRAM_GZIP:
-		fr_process_begin_command (comm->process, "gzip");
+		fr_process_begin_command (comm->process, PATH_GZIP);
 		fr_process_add_arg (comm->process, "-f");
 		fr_process_add_arg (comm->process, "-d");
 		fr_process_add_arg (comm->process, temp_file);
@@ -215,7 +215,7 @@
 		break;
 
 	case FR_COMPRESS_PROGRAM_BZIP:
-		fr_process_begin_command (comm->process, "bzip");
+		fr_process_begin_command (comm->process, PATH_BZIP);
 		fr_process_add_arg (comm->process, "-f");
 		fr_process_add_arg (comm->process, "-d");
 		fr_process_add_arg (comm->process, temp_file);
@@ -223,7 +223,7 @@
 		break;
 
 	case FR_COMPRESS_PROGRAM_BZIP2:
-		fr_process_begin_command (comm->process, "bzip2");
+		fr_process_begin_command (comm->process, PATH_BZIP2);
 		fr_process_add_arg (comm->process, "-f");
 		fr_process_add_arg (comm->process, "-d");
 		fr_process_add_arg (comm->process, temp_file);
@@ -231,14 +231,14 @@
 		break;
 
 	case FR_COMPRESS_PROGRAM_COMPRESS: 
-		fr_process_begin_command (comm->process, "uncompress");
+		fr_process_begin_command (comm->process, PATH_UNCOMPRESS);
 		fr_process_add_arg (comm->process, "-f");
 		fr_process_add_arg (comm->process, temp_file);
 		fr_process_end_command (comm->process);
 		break;
 
 	case FR_COMPRESS_PROGRAM_LZOP:
-		fr_process_begin_command (comm->process, "lzop");
+		fr_process_begin_command (comm->process, PATH_LZOP);
 		fr_process_set_working_dir (comm->process, temp_dir);
 		fr_process_add_arg (comm->process, "-d");
 		fr_process_add_arg (comm->process, "-fU");
Index: src/fr-command-lha.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-lha.c,v
retrieving revision 1.9
diff -u -r1.9 fr-command-lha.c
--- src/fr-command-lha.c	8 Feb 2004 10:31:30 -0000	1.9
+++ src/fr-command-lha.c	10 Feb 2004 15:27:31 -0000
@@ -203,7 +203,7 @@
 				      process_line,
 				      comm);
 
-	fr_process_begin_command (comm->process, "lha");
+	fr_process_begin_command (comm->process, PATH_LHA);
 	fr_process_add_arg (comm->process, "lq");
 	fr_process_add_arg (comm->process, comm->e_filename);
 	fr_process_end_command (comm->process);
@@ -221,7 +221,7 @@
 {
 	GList *scan;
 
-	fr_process_begin_command (comm->process, "lha");
+	fr_process_begin_command (comm->process, PATH_LHA);
 	if (base_dir != NULL) 
 		fr_process_set_working_dir (comm->process, base_dir);
 	if (update)
@@ -241,7 +241,7 @@
 {
 	GList *scan;
 
-	fr_process_begin_command (comm->process, "lha");
+	fr_process_begin_command (comm->process, PATH_LHA);
 	fr_process_add_arg (comm->process, "d");
 	fr_process_add_arg (comm->process, comm->e_filename);
 
@@ -264,7 +264,7 @@
 	char   options[5];
 	int    i = 0;
 
-	fr_process_begin_command (comm->process, "lha");
+	fr_process_begin_command (comm->process, PATH_LHA);
 	
 	if (dest_dir != NULL) 
 		fr_process_set_working_dir (comm->process, dest_dir);
Index: src/fr-command-rar.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-rar.c,v
retrieving revision 1.8
diff -u -r1.8 fr-command-rar.c
--- src/fr-command-rar.c	8 Feb 2004 10:31:30 -0000	1.8
+++ src/fr-command-rar.c	10 Feb 2004 15:27:31 -0000
@@ -45,14 +45,18 @@
 static gboolean
 fr_command_rar_have_rar (void)
 {
-	char *path;
+	char *path = PATH_RAR;
 	gboolean retval;
 	
-	retval = FALSE;
-	path = g_find_program_in_path ("rar");
-	if (path)
+	if (path[0] == '/') {
 		retval = TRUE;
-	g_free (path);
+	} else {
+		retval = FALSE;
+		path = g_find_program_in_path (PATH_RAR);
+		if (path)
+			retval = TRUE;
+		g_free (path);
+	}
 	
 	return retval;
 }
@@ -174,9 +178,9 @@
 				      comm);
 
 	if (fr_command_rar_have_rar ())
-		fr_process_begin_command (comm->process, "rar");
+		fr_process_begin_command (comm->process, PATH_RAR);
 	else
-		fr_process_begin_command (comm->process, "unrar");
+		fr_process_begin_command (comm->process, PATH_UNRAR);
 	fr_process_add_arg (comm->process, "v");
 	fr_process_add_arg (comm->process, "-c-");
 
@@ -199,7 +203,7 @@
 {
 	GList *scan;
 
-	fr_process_begin_command (comm->process, "rar");
+	fr_process_begin_command (comm->process, PATH_RAR);
 
 	if (base_dir != NULL) 
 		fr_process_set_working_dir (comm->process, base_dir);
@@ -238,7 +242,7 @@
 {
 	GList *scan;
 
-	fr_process_begin_command (comm->process, "rar");
+	fr_process_begin_command (comm->process, PATH_RAR);
 	fr_process_add_arg (comm->process, "d");
 
 	/* stop switches scanning */
@@ -264,9 +268,9 @@
 	GList *scan;
 
 	if (fr_command_rar_have_rar ())
-		fr_process_begin_command (comm->process, "rar");
+		fr_process_begin_command (comm->process, PATH_RAR);
 	else
-		fr_process_begin_command (comm->process, "unrar");
+		fr_process_begin_command (comm->process, PATH_UNRAR);
 
 	fr_process_add_arg (comm->process, "x");
 
Index: src/fr-command-rpm.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-rpm.c,v
retrieving revision 1.3
diff -u -r1.3 fr-command-rpm.c
--- src/fr-command-rpm.c	8 Feb 2004 10:31:30 -0000	1.3
+++ src/fr-command-rpm.c	10 Feb 2004 15:27:32 -0000
@@ -130,7 +130,7 @@
 				      list__process_line,
 				      comm);
 
-	fr_process_begin_command (comm->process, "rpm2cpio");
+	fr_process_begin_command (comm->process, PATH_RPM2CPIO);
 	fr_process_add_arg (comm->process, comm->e_filename);
 	fr_process_add_arg (comm->process, "| cpio --list --force-local --verbose");
 	fr_process_end_command (comm->process);
@@ -149,7 +149,7 @@
 {
 	GList *scan;
 
-	fr_process_begin_command (comm->process, "rpm2cpio");
+	fr_process_begin_command (comm->process, PATH_RPM2CPIO);
 	if (dest_dir != NULL)
                 fr_process_set_working_dir (comm->process, dest_dir);
 	fr_process_add_arg (comm->process, comm->e_filename);
Index: src/fr-command-tar.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-tar.c,v
retrieving revision 1.13
diff -u -r1.13 fr-command-tar.c
--- src/fr-command-tar.c	8 Feb 2004 10:31:30 -0000	1.13
+++ src/fr-command-tar.c	10 Feb 2004 15:27:32 -0000
@@ -176,7 +176,7 @@
 				      process_line,
 				      comm);
 
-	fr_process_begin_command (comm->process, "gtar");
+	fr_process_begin_command (comm->process, PATH_TAR);
 	fr_process_add_arg (comm->process, "--force-local");
 	fr_process_add_arg (comm->process, "-tvf");
 	fr_process_add_arg (comm->process, comm->e_filename);
@@ -234,7 +234,7 @@
 				      process_line__add,
 				      comm);
 
-	fr_process_begin_command (comm->process, "gtar");
+	fr_process_begin_command (comm->process, PATH_TAR);
 	fr_process_add_arg (comm->process, "--force-local");
 	fr_process_add_arg (comm->process, "-v");
 
@@ -285,7 +285,7 @@
 				      process_line__delete,
 				      comm);
 
-	fr_process_begin_command (comm->process, "gtar");
+	fr_process_begin_command (comm->process, PATH_TAR);
 	fr_process_set_begin_func (comm->process, begin_func__delete, comm);
 	fr_process_add_arg (comm->process, "--force-local");
 	fr_process_add_arg (comm->process, "-v");
@@ -322,7 +322,7 @@
 				      process_line__extract,
 				      comm);
 
-	fr_process_begin_command (comm->process, "gtar");
+	fr_process_begin_command (comm->process, PATH_TAR);
 	fr_process_add_arg (comm->process, "--force-local");
 	fr_process_add_arg (comm->process, "-v");
 	fr_process_add_arg (comm->process, "-xf");
Index: src/fr-command-unstuff.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-unstuff.c,v
retrieving revision 1.7
diff -u -r1.7 fr-command-unstuff.c
--- src/fr-command-unstuff.c	8 Feb 2004 10:31:30 -0000	1.7
+++ src/fr-command-unstuff.c	10 Feb 2004 15:27:32 -0000
@@ -190,7 +190,7 @@
 				      process_line,
 				      comm);
 
-	fr_process_begin_command (comm->process, "unstuff");
+	fr_process_begin_command (comm->process, PATH_UNSTUFF);
 	fr_process_add_arg (comm->process, "--trace");
 
 	/* Actually unpack everything in a temporary directory */
@@ -226,7 +226,7 @@
 #endif
 	char  *filename;
 
-	fr_process_begin_command (comm->process, "unstuff");
+	fr_process_begin_command (comm->process, PATH_UNSTUFF);
 	fr_process_add_arg (comm->process, "x");
 
 	if (dest_dir != NULL) {
Index: src/fr-command-zip.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-zip.c,v
retrieving revision 1.13
diff -u -r1.13 fr-command-zip.c
--- src/fr-command-zip.c	8 Feb 2004 10:31:30 -0000	1.13
+++ src/fr-command-zip.c	10 Feb 2004 15:27:32 -0000
@@ -220,7 +220,7 @@
 				      list__process_line,
 				      comm);
 
-	fr_process_begin_command (comm->process, "unzip");
+	fr_process_begin_command (comm->process, PATH_UNZIP);
 	fr_process_add_arg (comm->process, "-qq");
 	fr_process_add_arg (comm->process, "-v");
 	fr_process_add_arg (comm->process, "-l");
@@ -263,7 +263,7 @@
 				      process_line__common,
 				      comm);
 
-	fr_process_begin_command (comm->process, "zip");
+	fr_process_begin_command (comm->process, PATH_ZIP);
 
 	if (base_dir != NULL) 
 		fr_process_set_working_dir (comm->process, base_dir);
@@ -309,7 +309,7 @@
 				      process_line__common,
 				      comm);
 
-	fr_process_begin_command (comm->process, "zip");
+	fr_process_begin_command (comm->process, PATH_ZIP);
 	fr_process_add_arg (comm->process, "-d");
 	add_filename_arg (comm);
 
@@ -338,7 +338,7 @@
 				      process_line__common,
 				      comm);
 
-	fr_process_begin_command (comm->process, "unzip");
+	fr_process_begin_command (comm->process, PATH_UNZIP);
 	
 	if (dest_dir != NULL) {
 		char *e_dest_dir = shell_escape (dest_dir);
@@ -376,7 +376,7 @@
 fr_command_zip_test (FRCommand   *comm,
 		     const char  *password)
 {
-	fr_process_begin_command (comm->process, "unzip");
+	fr_process_begin_command (comm->process, PATH_UNZIP);
 	fr_process_add_arg (comm->process, "-t");
 	add_password_arg (comm, password);
 	add_filename_arg (comm);
Index: src/fr-command-zoo.c
===================================================================
RCS file: /cvs/gnome/file-roller/src/fr-command-zoo.c,v
retrieving revision 1.5
diff -u -r1.5 fr-command-zoo.c
--- src/fr-command-zoo.c	8 Feb 2004 10:31:30 -0000	1.5
+++ src/fr-command-zoo.c	10 Feb 2004 15:27:32 -0000
@@ -226,7 +226,7 @@
 				      process_zoo_line,
 				      zoo_comm);
 
-	fr_process_begin_command (zoo_comm->process, "zoo");
+	fr_process_begin_command (zoo_comm->process, PATH_ZOO);
 	fr_process_add_arg (zoo_comm->process, "lq");
 	fr_process_add_arg (zoo_comm->process, zoo_comm->e_filename);
 	fr_process_end_command (zoo_comm->process);
@@ -246,7 +246,7 @@
 
 	/* Add files. */
 
-	fr_process_begin_command (comm->process, "zoo");
+	fr_process_begin_command (comm->process, PATH_ZOO);
 
 	fr_process_set_working_dir (comm->process, base_dir);
 
@@ -271,7 +271,7 @@
 
 	/* Delete files. */
 
-	fr_process_begin_command (comm->process, "zoo");
+	fr_process_begin_command (comm->process, PATH_ZOO);
 	fr_process_add_arg (comm->process, "DP");
 	fr_process_add_arg (comm->process, comm->e_filename);
 
@@ -292,7 +292,7 @@
 {
 	GList *scan;
 
-	fr_process_begin_command (comm->process, "zoo");
+	fr_process_begin_command (comm->process, PATH_ZOO);
 
 	if (overwrite)
 		fr_process_add_arg (comm->process, "xO");
@@ -315,7 +315,7 @@
 fr_command_zoo_test (FRCommand   *comm,
 		     const char  *password)
 {
-	fr_process_begin_command (comm->process, "zoo");
+	fr_process_begin_command (comm->process, PATH_ZOO);
 	fr_process_add_arg (comm->process, "-test");
 	fr_process_add_arg (comm->process, comm->e_filename);
 	fr_process_end_command (comm->process);
