This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PR 38867: unexpanded prefix in LIBGCJ_PREFIX


When the user does not specify --prefix to configure, LIBGCJ_PREFIX
ends up containing the string "NONE", bogusly.  See the PR.  The patch
below fixes that, and a couple of other instances that might get that
string otherwise.

I don't see what breakage the NONE causes in the end for the user, so
I'm unsure about proper testing.  I remade configure-target-libjava,
with and without --prefix passed to toplevel configure, and checked the
result.  What other tests should I be doing?  Otherwise, OK for trunk?

Thanks,
Ralf

Work with defaulted $prefix (NONE) in libjava.

libjava/ChangeLog:
2009-11-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>

	PR bootstrap/38867
	* configure.ac (expanded_prefix): New variable, set to the
	default prefix if none was passed on the command line.
	* configure: Regenerate.

diff --git a/libjava/configure.ac b/libjava/configure.ac
index bfd33fd..3356e0f 100644
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -366,7 +366,12 @@ AM_CONDITIONAL(X_AWT, test "$use_x_awt" = yes)
 
 AC_DEFINE_UNQUOTED(AWT_TOOLKIT, "$TOOLKIT", [Name of default AWT toolkit])
 
-AC_DEFINE_UNQUOTED(LIBGCJ_PREFIX, "$prefix", [Installation prefix])
+expanded_prefix=$prefix
+if test "X$prefix" = XNONE; then
+  expanded_prefix=${ac_default_prefix}
+fi
+
+AC_DEFINE_UNQUOTED(LIBGCJ_PREFIX, "$expanded_prefix", [Installation prefix])
 
 # Create standard.omit based on decisions we just made.
 cp $srcdir/standard.omit.in standard.omit
@@ -1435,7 +1440,7 @@ if test ! -f gnu/classpath/Configuration.java; then
   test -d gnu || mkdir gnu
   test -d gnu/classpath || mkdir gnu/classpath
   # Note that it is not crucial that all the values here be correct.
-  sed -e "s,@prefix@,$prefix," \
+  sed -e "s,@prefix@,$expanded_prefix," \
       -e "s,@VERSION@,$VERSION," \
       -e "s,@LIBDEBUG@,false," \
       -e "s,@INIT_LOAD_LIBRARY@,false," \
@@ -1773,10 +1778,10 @@ then
   # Needed for installing Python modules during make install.
   python_mod_dir="\${prefix}/share/python"
   # Needed for substituting into aot-compile*
-  python_mod_dir_expanded="${prefix}/share/python"
+  python_mod_dir_expanded="${expanded_prefix}/share/python"
 else
   python_mod_dir="\${prefix}${with_python_dir}"
-  python_mod_dir_expanded="${prefix}${with_python_dir}"
+  python_mod_dir_expanded="${expanded_prefix}${with_python_dir}"
 fi
 AC_MSG_RESULT(Python modules dir: ${python_mod_dir_expanded});
 AC_SUBST(python_mod_dir)
@@ -1954,7 +1959,7 @@ then
   LIBDIR=$libdir
   if test "x${exec_prefix}" = "xNONE"
   then
-      lib_exec_prefix=$prefix
+      lib_exec_prefix=$expanded_prefix
   else
       lib_exec_prefix=$exec_prefix
   fi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]