Hi all,

the attached patch adds a few more tools to FASTJAR detection code, and
fixes a build problem when using Sun's JDK 1.6 jar on Windows/Cygwin due
to the ' ' in C:\Program Files\one-thing-or-another path.

cheers,
dalibor topic

2007-12-28  Dalibor Topic  <[EMAIL PROTECTED]>

   * m4/acinclude.m4 (CLASSPATH_WITH_GLIBJ): Use
   AC_PATH_PROGS instead of AC_PATH_PROG to check
   for FASTJAR as fastjar, gjar or jar. Add braces
   to AC_PATH_PROGS arguments.

   * tools/Makefile.am (TOOLS_ZIP),
   lib/Makefile.am (collections.jar, glibj.zip):
   Quote FASTJAR in case it's in a path with
   whitespace.


Index: lib/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/lib/Makefile.am,v
retrieving revision 1.139
diff -u -r1.139 Makefile.am
--- lib/Makefile.am	4 Nov 2007 01:56:17 -0000	1.139
+++ lib/Makefile.am	26 Dec 2007 18:51:21 -0000
@@ -45,7 +45,7 @@
 	$(JCOMPILER) `$(FIND) $(COLLECTIONS_PREFIX) -name '*.java' -type f -print`
 #endif
 	if test "$(FASTJAR)" != ""; then \
-	  $(FASTJAR) cf $@ $(COLLECTIONS_PREFIX); \
+	  "$(FASTJAR)" cf $@ $(COLLECTIONS_PREFIX); \
 	else \
 	  echo "fastjar not found" > collections.jar; \
 	fi
@@ -94,7 +94,7 @@
 
 glibj.zip: classes compile-classes resources
 	if test "$(ZIP)" != ""; then $(ZIP) -r -D glibj.zip gnu java javax org sun META-INF > /dev/null; fi
-	if test "$(FASTJAR)" != ""; then $(FASTJAR) cf glibj.zip gnu java javax org sun META-INF; fi
+	if test "$(FASTJAR)" != ""; then "$(FASTJAR)" cf glibj.zip gnu java javax org sun META-INF; fi
 
 endif # USE_PREBUILT_GLIBJ_ZIP
 
Index: m4/acinclude.m4
===================================================================
RCS file: /sources/classpath/classpath/m4/acinclude.m4,v
retrieving revision 1.23
diff -u -r1.23 acinclude.m4
--- m4/acinclude.m4	16 Oct 2007 14:06:23 -0000	1.23
+++ m4/acinclude.m4	26 Dec 2007 18:51:21 -0000
@@ -275,7 +275,7 @@
 		FASTJAR=${withval}
 		AC_MSG_RESULT([${FASTJAR}])
 	      ],
-	      [AC_PATH_PROG(FASTJAR, fastjar)])
+	      [AC_PATH_PROGS([FASTJAR], [fastjar gjar jar])])
 dnl We disable ZIP by default if we find fastjar.
   if test x"${FASTJAR}" != x; then
     ZIP=""
Index: tools/Makefile.am
===================================================================
RCS file: /sources/classpath/classpath/tools/Makefile.am,v
retrieving revision 1.41
diff -u -r1.41 Makefile.am
--- tools/Makefile.am	12 Sep 2007 09:40:29 -0000	1.41
+++ tools/Makefile.am	26 Dec 2007 18:51:21 -0000
@@ -181,12 +181,12 @@
 ## First add classpath tools stuff.
 	(cd classes; \
 	if test "$(ZIP)" != ""; then $(ZIP) -r ../$(TOOLS_ZIP) .; fi; \
-	if test "$(FASTJAR)" != ""; then $(FASTJAR) cf ../$(TOOLS_ZIP) .; fi; \
+	if test "$(FASTJAR)" != ""; then "$(FASTJAR)" cf ../$(TOOLS_ZIP) .; fi; \
 	cd ..)
 ## Now add ASM classes.
 	(cd asm; \
 	if test "$(ZIP)" != ""; then $(ZIP) -u -r ../$(TOOLS_ZIP) .; fi; \
-	if test "$(FASTJAR)" != ""; then $(FASTJAR) uf ../$(TOOLS_ZIP) .; fi; \
+	if test "$(FASTJAR)" != ""; then "$(FASTJAR)" uf ../$(TOOLS_ZIP) .; fi; \
 	cd ..)
 	rm -rf classes
 

Reply via email to