changeset 1135:0a1e75999e5a

Make native ecj optional. 2008-10-20 Andrew John Hughes <gnu_andrew@member.fsf.org> * Makefile.am: Use GCJ if not equal to no instead of being empty. * acinclude.m4: (AC_CHECK_WITH_GCJ): New macro. * configure.ac: Use AC_CHECK_WITH_GCJ in preference to just checking for GCJ.
author Andrew John Hughes <gnu_andrew@member.fsf.org>
date Mon, 20 Oct 2008 16:05:49 +0100
parents 7f335937eca4
children 7c8cf9c74cfa
files ChangeLog Makefile.am acinclude.m4 configure.ac
diffstat 4 files changed, 31 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Oct 20 13:48:45 2008 +0100
+++ b/ChangeLog	Mon Oct 20 16:05:49 2008 +0100
@@ -1,3 +1,14 @@
+2008-10-20  Andrew John Hughes  <gnu_andrew@member.fsf.org>
+
+	* Makefile.am:
+	Use GCJ if not equal to no instead
+	of being empty.
+	* acinclude.m4:
+	(AC_CHECK_WITH_GCJ): New macro.
+	* configure.ac:
+	Use AC_CHECK_WITH_GCJ in preference to
+	just checking for GCJ.
+
 2008-10-20  Andrew John Hughes  <gnu_andrew@member.fsf.org>
 
 	* Makefile.am:
--- a/Makefile.am	Mon Oct 20 13:48:45 2008 +0100
+++ b/Makefile.am	Mon Oct 20 16:05:49 2008 +0100
@@ -1099,7 +1099,7 @@
 
 stamps/native-ecj.stamp: 
 	mkdir -p stamps ; \
-	if test "x${GCJ}" != x; then \
+	if test "x${GCJ}" != "xno"; then \
 	  ${GCJ} ${CFLAGS} -Wl,-Bsymbolic -o native-ecj \
 	    --main=org.eclipse.jdt.internal.compiler.batch.Main ${ECJ_JAR} ; \
 	fi ; \
--- a/acinclude.m4	Mon Oct 20 13:48:45 2008 +0100
+++ b/acinclude.m4	Mon Oct 20 16:05:49 2008 +0100
@@ -895,3 +895,21 @@
   AC_MSG_RESULT(${ALT_CACAO_SRC_ZIP})
   AC_SUBST(ALT_CACAO_SRC_ZIP)
 ])
+
+AC_DEFUN([AC_CHECK_WITH_GCJ],
+[
+  AC_MSG_CHECKING([whether to compile ecj natively])
+  AC_ARG_WITH([gcj],
+	      [AS_HELP_STRING(--with-gcj,location of gcj for natively compiling ecj)],
+  [
+    GCJ="${withval}"
+  ],
+  [ 
+    GCJ="no"
+  ])
+  AC_MSG_RESULT([${GCJ}])
+  if test "x${GCJ}" = xyes; then
+    AC_PATH_TOOL([GCJ],[gcj])
+  fi
+  AC_SUBST([GCJ])
+])
--- a/configure.ac	Mon Oct 20 13:48:45 2008 +0100
+++ b/configure.ac	Mon Oct 20 16:05:49 2008 +0100
@@ -32,8 +32,7 @@
 FIND_TOOL([GAWK], [gawk])
 AC_PATH_TOOL([HG],[hg])
 AC_SUBST([HG])
-AC_PATH_TOOL([GCJ],[gcj])
-AC_SUBST([GCJ])
+AC_CHECK_WITH_GCJ
 
 AC_MSG_CHECKING([for a JDK home directory])
 AC_ARG_WITH([gcj-home],