This is the mail archive of the gcc-bugs@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]

Re: Build failure due to java libraries if java not built


On , 13 December 2000, 02:55:50 -0200, aoliva@redhat.com wrote:

> On Dec 13, 2000, Tim Josling <tej@melbpc.org.au> wrote:
> 
> > I built the latest build on Intel Linux, and it fails. I do not
> > bvuild java, but it unconditionally buulds the java libraries;
> > they blow up if you haven't built gjc, Workaround is to patch out
> > the java from the Makefile.in.
> 
> Or to update and configure --enable-languages=c,c++,f77,objc

Or to add a proper check to libjava's configure script if the
required compiler has been built at all; libstdc++-v3 shares the
same problem. Similar checks are already in libf2c, libio, libstdc++
and libobjc.

OK to install?

Cheers.

l8er
manfred

2000-12-16  Manfred Hollstein  <manfredh@redhat.com>

	* configure.in (compiler_name): Add check to detect if this
	language's compiler has been built.
	* configure: Regenerate.

diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-20001216.orig/libjava/configure.in gcc-20001216/libjava/configure.in
--- gcc-20001216.orig/libjava/configure.in	Mon Dec 11 09:40:28 2000
+++ gcc-20001216/libjava/configure.in	Sat Dec 16 16:02:01 2000
@@ -4,6 +4,34 @@ AC_INIT(java/lang/System.java)
 dnl Can't be done in LIBGCJ_CONFIGURE because that confuses automake.
 AC_CONFIG_AUX_DIR(..)
 
+# If the language specific compiler does not exist, but the "gcc" directory 
+# does, we do not build anything. Note, $r is set by the top-level Makefile.
+# Note that when we look for the compiler, we search both with and without
+# extension to handle cross and canadian cross builds. 
+compiler_name=jc1
+rm -f skip-this-dir
+AC_MSG_CHECKING(if compiler $compiler_name has been built)
+AC_CACHE_VAL(jc1_cv_compiler_exists,
+[jc1_cv_compiler_exists=yes
+if test -n "$r"; then
+  if test -d "$r"/gcc; then
+    if test -f "$r"/gcc/$compiler_name \
+       || test -f "$r"/gcc/$compiler_name.exe; then
+      true
+    else
+      jc1_cv_compiler_exists=no
+      echo "rm -f config.cache config.log multilib.out" > skip-this-dir
+    fi
+  fi
+fi
+])
+AC_MSG_RESULT($jc1_cv_compiler_exists)
+if test x$jc1_cv_compiler_exists = xno
+then
+  rm -f Makefile conftest* confdefs* core
+  exit 0
+fi
+
 AC_CANONICAL_SYSTEM
 AC_PROG_LN_S
 
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-20001216.orig/libjava/configure gcc-20001216/libjava/configure
--- gcc-20001216.orig/libjava/configure	Wed Dec 13 14:35:08 2000
+++ gcc-20001216/libjava/configure	Sat Dec 16 16:03:32 2000
@@ -589,6 +589,39 @@ ac_config_sub=$ac_aux_dir/config.sub
 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
 
+# If the language specific compiler does not exist, but the "gcc" directory 
+# does, we do not build anything. Note, $r is set by the top-level Makefile.
+# Note that when we look for the compiler, we search both with and without
+# extension to handle cross and canadian cross builds. 
+compiler_name=jc1
+rm -f skip-this-dir
+echo $ac_n "checking if compiler $compiler_name has been built""... $ac_c" 1>&6
+echo "configure:651: checking if compiler $compiler_name has been built" >&5
+if eval "test \"`echo '$''{'jc1_cv_compiler_exists'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  jc1_cv_compiler_exists=yes
+if test -n "$r"; then
+  if test -d "$r"/gcc; then
+    if test -f "$r"/gcc/$compiler_name \
+       || test -f "$r"/gcc/$compiler_name.exe; then
+      true
+    else
+      jc1_cv_compiler_exists=no
+      echo "rm -f config.cache config.log multilib.out" > skip-this-dir
+    fi
+  fi
+fi
+
+fi
+
+echo "$ac_t""$jc1_cv_compiler_exists" 1>&6
+if test x$jc1_cv_compiler_exists = xno
+then
+  rm -f Makefile conftest* confdefs* core
+  exit 0
+fi
+
 
 # Do some error checking and defaulting for the host and target type.
 # The inputs are:
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-20001216.orig/libstdc++-v3/configure.in gcc-20001216/libstdc++-v3/configure.in
--- gcc-20001216.orig/libstdc++-v3/configure.in	Wed Dec 13 14:35:03 2000
+++ gcc-20001216/libstdc++-v3/configure.in	Sat Dec 16 16:05:11 2000
@@ -5,6 +5,34 @@ AC_PREREQ(2.13)
 AC_INIT(src/complex.cc)
 AC_CONFIG_AUX_DIR(..)
 
+# If the language specific compiler does not exist, but the "gcc" directory 
+# does, we do not build anything. Note, $r is set by the top-level Makefile.
+# Note that when we look for the compiler, we search both with and without
+# extension to handle cross and canadian cross builds. 
+compiler_name=cc1plus
+rm -f skip-this-dir
+AC_MSG_CHECKING(if compiler $compiler_name has been built)
+AC_CACHE_VAL(cxx_cv_compiler_exists,
+[cxx_cv_compiler_exists=yes
+if test -n "$r"; then
+  if test -d "$r"/gcc; then
+    if test -f "$r"/gcc/$compiler_name \
+       || test -f "$r"/gcc/$compiler_name.exe; then
+      true
+    else
+      cxx_cv_compiler_exists=no
+      echo "rm -f config.cache config.log multilib.out" > skip-this-dir
+    fi
+  fi
+fi
+])
+AC_MSG_RESULT($cxx_cv_compiler_exists)
+if test x$cxx_cv_compiler_exists = xno
+then
+  rm -f Makefile conftest* confdefs* core
+  exit 0
+fi
+
 # Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc.
 AC_CANONICAL_SYSTEM
 
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el gcc-20001216.orig/libstdc++-v3/configure gcc-20001216/libstdc++-v3/configure
--- gcc-20001216.orig/libstdc++-v3/configure	Wed Dec 13 14:35:03 2000
+++ gcc-20001216/libstdc++-v3/configure	Sat Dec 16 16:06:17 2000
@@ -585,6 +585,39 @@ ac_config_sub=$ac_aux_dir/config.sub
 ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
 
 
+# If the language specific compiler does not exist, but the "gcc" directory 
+# does, we do not build anything. Note, $r is set by the top-level Makefile.
+# Note that when we look for the compiler, we search both with and without
+# extension to handle cross and canadian cross builds. 
+compiler_name=cc1plus
+rm -f skip-this-dir
+echo $ac_n "checking if compiler $compiler_name has been built""... $ac_c" 1>&6
+echo "configure:651: checking if compiler $compiler_name has been built" >&5
+if eval "test \"`echo '$''{'cxx_cv_compiler_exists'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cxx_cv_compiler_exists=yes
+if test -n "$r"; then
+  if test -d "$r"/gcc; then
+    if test -f "$r"/gcc/$compiler_name \
+       || test -f "$r"/gcc/$compiler_name.exe; then
+      true
+    else
+      cxx_cv_compiler_exists=no
+      echo "rm -f config.cache config.log multilib.out" > skip-this-dir
+    fi
+  fi
+fi
+
+fi
+
+echo "$ac_t""$cxx_cv_compiler_exists" 1>&6
+if test x$cxx_cv_compiler_exists = xno
+then
+  rm -f Makefile conftest* confdefs* core
+  exit 0
+fi
+
 # Gets and sets build, host, target, *_vendor, *_cpu, *_os, etc.
 
 # Do some error checking and defaulting for the host and target type.

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