summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac31
1 files changed, 30 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index bed60bcaf72..2de381fe863 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1406,6 +1406,7 @@ int main() {}])],
fi
ACX_PROG_GNAT
+ACX_PROG_GDC
ACX_PROG_CMP_IGNORE_INITIAL
AC_ARG_ENABLE([bootstrap],
@@ -2087,6 +2088,22 @@ if test -d ${srcdir}/gcc; then
;;
esac
+ # Disable D if no preexisting GDC is available.
+ case ${add_this_lang}:${language}:${have_gdc} in
+ yes:d:no)
+ # Specifically requested language; tell them.
+ AC_MSG_ERROR([GDC is required to build $language])
+ ;;
+ all:d:no)
+ AC_MSG_WARN([GDC is required to build $language])
+ add_this_lang=unsupported
+ ;;
+ *:d:no)
+ # Silently disable.
+ add_this_lang=unsupported
+ ;;
+ esac
+
# Disable jit if -enable-host-shared not specified
# but not if building for Mingw. All code in Windows
# is position independent code (PIC).
@@ -2154,7 +2171,7 @@ directories, to avoid imposing the performance cost of
*) stage1_languages="${stage1_languages}${language}," ;;
esac
# We need to bootstrap any supporting libraries.
- bootstrap_target_libs="${bootstrap_target_libs}${target_libs},"
+ bootstrap_target_libs=`echo "${bootstrap_target_libs}${target_libs}," | sed "s/ /,/g"`
;;
esac
;;
@@ -2837,6 +2854,16 @@ if echo " ${target_configdirs} " | grep " libvtv " > /dev/null 2>&1 &&
bootstrap_target_libs=${bootstrap_target_libs}target-libvtv,
fi
+# If we are building libatomic and the list of enabled languages includes the
+# D frontend, bootstrap it.
+if echo " ${target_configdirs} " | grep " libatomic " > /dev/null 2>&1; then
+ case ,${enable_languages}, in
+ *,d,*)
+ bootstrap_target_libs=${bootstrap_target_libs}target-libatomic,
+ ;;
+ esac
+fi
+
# Determine whether gdb needs tk/tcl or not.
# Use 'maybe' since enable_gdbtk might be true even if tk isn't available
# and in that case we want gdb to be built without tk. Ugh!
@@ -3505,6 +3532,8 @@ AC_SUBST(CC)
AC_SUBST(CXX)
AC_SUBST(CFLAGS)
AC_SUBST(CXXFLAGS)
+AC_SUBST(GDC)
+AC_SUBST(GDCFLAGS)
# Target tools.
AC_ARG_WITH([build-time-tools],