aboutsummaryrefslogtreecommitdiff
path: root/libobjc/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'libobjc/configure.in')
-rw-r--r--libobjc/configure.in25
1 files changed, 25 insertions, 0 deletions
diff --git a/libobjc/configure.in b/libobjc/configure.in
index f3c7c5b1..73bdd0d 100644
--- a/libobjc/configure.in
+++ b/libobjc/configure.in
@@ -36,6 +36,31 @@ dnl This is needed for a multilibbed build in the source tree so
dnl that install-sh and config.sub get found.
AC_CONFIG_AUX_DIR($topsrcdir)
+# 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.
+compiler_name=cc1obj
+rm -f skip-this-dir
+AC_MSG_CHECKING(if compiler $compiler_name has been built)
+AC_CACHE_VAL(objc_cv_compiler_exists,
+ [objc_cv_compiler_exists=yes
+ if test -n "$r"; then
+ if test -d "$r"/gcc; then
+ if test -f "$r"/gcc/$compiler_name; then
+ true
+ else
+ objc_cv_compiler_exists=no
+ echo "rm -f config.cache config.log multilib.out" > skip-this-dir
+ fi
+ fi
+ fi
+ ])
+AC_MSG_RESULT($objc_cv_compiler_exists)
+if test x$objc_cv_compiler_exists = xno
+then
+ rm -f Makefile conftest* confdefs* core
+ exit 0
+fi
+
dnl Checks for programs.
# For ObjC we'll set CC to point at the built gcc, but this will get it into
# the makefiles