Commit e4c9c075 by Paolo Bonzini Committed by Nathanael Nerode

(top level)

2004-03-08  Paolo Bonzini  <bonzini@gnu.org>

	PR ada/14131
	Move language detection to the top level.
	* configure.in: Find default values for the tools as
	soon as possible.  Disable ada if GNAT is not found.
	Emit error message about missing languages.  Expand
	--enable-languages=all for the gcc subdirectory.

(config)
2004-03-08  Paolo Bonzini  <bonzini@gnu.org>

	PR ada/14131
	Move language detection to the top level.
	* acx.m4 (ACX_PROG_GNAT): New macro, moved here
	from the gcc subdirectory.
(gcc)
2004-03-08  Paolo Bonzini  <bonzini@gnu.org>

	PR ada/14131
	Move language detection to the top level.
	* configure.ac: Remove code to detect languages,
	it now lives exclusively in the top level.
	* aclocal.m4 (gcc_AC_PROG_GNAT): Moved to the
	top level, renamed to ACX_PROG_GNAT.

(gcc/ada)
2004-03-08  Paolo Bonzini  <bonzini@gnu.org>

	PR ada/14131
	Move language detection to the top level.
	* config-lang.in: Build by default.

From-SVN: r79299
parent e46e9f82
2004-03-08 Paolo Bonzini <bonzini@gnu.org>
PR ada/14131
Move language detection to the top level.
* configure.in: Find default values for the tools as
soon as possible. Disable ada if GNAT is not found.
Emit error message about missing languages. Expand
--enable-languages=all for the gcc subdirectory.
2004-03-10 Ben Elliston <bje@gnu.org>
* MAINTAINERS: Update my email address.
......
2004-03-08 Paolo Bonzini <bonzini@gnu.org>
PR ada/14131
Move language detection to the top level.
* acx.m4 (ACX_PROG_GNAT): New macro, moved here
from the gcc subdirectory.
2004-03-09 Hans-Peter Nilsson <hp@axis.com>
* accross.m4 (AC_C_BIGENDIAN_CROSS): Compile endian probe with
......
......@@ -155,3 +155,38 @@ AC_DEFUN([AC_PROG_CPP_WERROR],
[AC_REQUIRE([AC_PROG_CPP])dnl
m4_define([AC_CHECK_HEADER],m4_defn([_AC_CHECK_HEADER_OLD]))
ac_c_preproc_warn_flag=yes])# AC_PROG_CPP_WERROR
# Test for GNAT.
# We require the gnatbind program, and a compiler driver that
# understands Ada. We use the user's CC setting, already found.
#
# Sets the shell variable have_gnat to yes or no as appropriate, and
# substitutes GNATBIND.
AC_DEFUN([ACX_PROG_GNAT],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
AC_REQUIRE([AC_PROG_CC])
AC_CHECK_TOOL(GNATBIND, gnatbind, no)
AC_CACHE_CHECK([whether compiler driver understands Ada],
acx_cv_cc_gcc_supports_ada,
[cat >conftest.adb <<EOF
procedure conftest is begin null; end conftest;
EOF
acx_cv_cc_gcc_supports_ada=no
# There is a bug in old released versions of GCC which causes the
# driver to exit successfully when the appropriate language module
# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
# Therefore we must check for the error message as well as an
# unsuccessful exit.
errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
if test x"$errors" = x; then
acx_cv_cc_gcc_supports_ada=yes
break
fi
rm -f conftest.*])
if test x$GNATBIND != xno && test x$acx_cv_gcc_supports_ada != xno; then
have_gnat=yes
else
have_gnat=no
fi
])
2004-03-08 Paolo Bonzini <bonzini@gnu.org>
PR ada/14131
Move language detection to the top level.
* configure.ac: Remove code to detect languages,
it now lives exclusively in the top level.
* aclocal.m4 (gcc_AC_PROG_GNAT): Moved to the
top level, renamed to ACX_PROG_GNAT.
2004-03-10 Richard Henderson <rth@redhat.com>
* c-pch.c (c_common_no_more_pch): Update for gt_pch_use_address
......
......@@ -295,41 +295,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
AC_SUBST(INSTALL_DATA)dnl
])
dnl Test for GNAT.
dnl We require the gnatbind program, and a compiler driver that
dnl understands Ada. We use the user's CC setting, already found.
dnl
dnl Sets the shell variable have_gnat to yes or no as appropriate, and
dnl substitutes GNATBIND.
AC_DEFUN([gcc_AC_PROG_GNAT],
[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
AC_REQUIRE([AC_PROG_CC])
AC_CHECK_TOOL(GNATBIND, gnatbind, no)
AC_CACHE_CHECK([whether compiler driver understands Ada],
gcc_cv_cc_supports_ada,
[cat >conftest.adb <<EOF
procedure conftest is begin null; end conftest;
EOF
gcc_cv_cc_supports_ada=no
# There is a bug in old released versions of GCC which causes the
# driver to exit successfully when the appropriate language module
# has not been installed. This is fixed in 2.95.4, 3.0.2, and 3.1.
# Therefore we must check for the error message as well as an
# unsuccessful exit.
errors=`(${CC} -c conftest.adb) 2>&1 || echo failure`
if test x"$errors" = x; then
gcc_cv_cc_supports_ada=yes
break
fi
rm -f conftest.*])
if test x$GNATBIND != xno && test x$gcc_cv_supports_ada != xno; then
have_gnat=yes
else
have_gnat=no
fi
])
dnl GCC_PATH_PROG(VARIABLE, PROG-TO-CHECK-FOR [, VALUE-IF-NOT-FOUND [, PATH]])
dnl like AC_PATH_PROG but use other cache variables
AC_DEFUN([GCC_PATH_PROG],
......
2004-03-08 Paolo Bonzini <bonzini@gnu.org>
PR ada/14131
Move language detection to the top level.
* config-lang.in: Build by default.
2004-03-05 Robert Dewar <dewar@gnat.com>
* 56taprop.adb, 5ataprop.adb: Remove unneeded unchecked conversions
......
......@@ -39,9 +39,3 @@ gtfiles="\$(srcdir)/ada/ada-tree.h \$(srcdir)/ada/gigi.h \$(srcdir)/ada/decl.c \
outputs=ada/Makefile
target_libs="target-libada"
# The logic for determining whether there is a bootstrap Ada compiler
# available needs to be moved from gcc/configure to the toplevel configure,
# so that target-libada is not built when there is no bootstrap Ada compiler.
# Until then disable building this language by default.
build_by_default=no
......@@ -300,13 +300,6 @@ if test $ac_cv_c___int64 = yes; then
AC_COMPILE_CHECK_SIZEOF(__int64)
fi
# -----------------
# Find Ada compiler
# -----------------
# See if GNAT has been installed
gcc_AC_PROG_GNAT
# ---------------------
# Warnings and checking
# ---------------------
......@@ -613,6 +606,53 @@ esac],
[onestep=""])
AC_SUBST(onestep)
# Sanity check enable_languages in case someone does not run the toplevel
# configure # script.
AC_ARG_ENABLE(languages,
[ --enable-languages=LIST specify which front-ends to build],
[case ,${enable_languages}, in
,,|,yes,)
# go safe -- we cannot be much sure without the toplevel
# configure's
# analysis of which target libs are present and usable
enable_languages=c
;;
*,all,*)
AC_MSG_ERROR([only the toplevel supports --enable-languages=all])
;;
*,c,*)
;;
*)
enable_languages=c,${enable_languages}
;;
esac],
[enable_languages=c])
subdirs=
for lang in ${srcdir}/*/config-lang.in
do
case $lang in
# The odd quoting in the next line works around
# an apparent bug in bash 1.12 on linux.
changequote(,)dnl
${srcdir}/[*]/config-lang.in) ;;
*)
lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
if test "x$lang_alias" = x
then
echo "$lang doesn't set \$language." 1>&2
exit 1
fi
case ",$enable_languages," in
*,$lang_alias,*)
subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`" ;;
esac
;;
changequote([,])dnl
esac
done
# -------------------------
# Checks for other programs
# -------------------------
......@@ -2661,131 +2701,6 @@ if test x$with_sysroot = x && test x$host = x$target \
[Define to PREFIX/include if cpp should also search that directory.])
fi
# Figure out what language subdirectories are present.
# Look if the user specified --enable-languages="..."; if not, use
# the environment variable $LANGUAGES if defined. $LANGUAGES might
# go away some day.
# NB: embedded tabs in this IF block -- do not untabify
if test x"${enable_languages+set}" != xset; then
if test x"${LANGUAGES+set}" = xset; then
enable_languages="${LANGUAGES}"
AC_MSG_WARN([setting LANGUAGES is deprecated, use --enable-languages instead])
else
enable_languages=all
fi
else
if test x"${enable_languages}" = x \
|| test x"${enable_languages}" = xyes;
then
AC_MSG_ERROR([--enable-languages needs at least one language argument])
fi
fi
enable_languages=`echo "${enable_languages}" | sed -e 's/[[ ,]][[ ,]]*/,/g' -e 's/,$//'`
# First scan to see if an enabled language requires some other language.
# We assume that a given config-lang.in will list all the language
# front ends it requires, even if some are required indirectly.
for lang in ${srcdir}/*/config-lang.in
do
case $lang in
# The odd quoting in the next line works around
# an apparent bug in bash 1.12 on linux.
changequote(,)dnl
${srcdir}/[*]/config-lang.in)
;;
*)
lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
this_lang_requires=`sed -n -e 's,^lang_requires=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^lang_requires=\([^ ]*\).*$,\1,p' $lang`
for other in $this_lang_requires
do
case ,${enable_languages}, in
*,$other,*)
;;
*,all,*)
;;
*,$lang_alias,*)
enable_languages="$enable_languages,$other"
;;
esac
done
;;
changequote([,])dnl
esac
done
expected_languages=`echo ,${enable_languages}, | sed -e 's:,: :g' -e 's: *: :g' -e 's: *: :g' -e 's:^ ::' -e 's: $::'`
found_languages=
subdirs=
for lang in ${srcdir}/*/config-lang.in
do
case $lang in
# The odd quoting in the next line works around
# an apparent bug in bash 1.12 on linux.
changequote(,)dnl
${srcdir}/[*]/config-lang.in) ;;
*)
lang_alias=`sed -n -e 's,^language=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^language=\([^ ]*\).*$,\1,p' $lang`
this_lang_libs=`sed -n -e 's,^target_libs=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^target_libs=\([^ ]*\).*$,\1,p' $lang`
build_by_default=`sed -n -e 's,^build_by_default=['"'"'"'"]\(.*\)["'"'"'"'].*$,\1,p' -e 's,^build_by_default=\([^ ]*\).*$,\1,p' $lang`
if test "x$lang_alias" = x
then
echo "$lang doesn't set \$language." 1>&2
exit 1
fi
case ${build_by_default},${enable_languages}, in
*,$lang_alias,*) add_this_lang=yes ;;
no,*) add_this_lang=no ;;
*,all,*) add_this_lang=yes ;;
*) add_this_lang=no ;;
esac
found_languages="${found_languages} ${lang_alias}"
if test x"${add_this_lang}" = xyes; then
case $lang in
${srcdir}/ada/config-lang.in)
if test x$have_gnat = xyes ; then
subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
fi
;;
*)
subdirs="$subdirs `echo $lang | sed -e 's,^.*/\([^/]*\)/config-lang.in$,\1,'`"
;;
esac
fi
;;
changequote([,])dnl
esac
done
missing_languages=
for expected_language in ${expected_languages} ..
do
if test "${expected_language}" != ..; then
missing_language="${expected_language}"
if test "${expected_language}" = "c" \
|| test "${expected_language}" = "all"; then
missing_language=
fi
for found_language in ${found_languages} ..
do
if test "${found_language}" != ..; then
if test "${expected_language}" = "${found_language}"; then
missing_language=
fi
fi
done
if test "x${missing_language}" != x; then
missing_languages="${missing_languages} ${missing_language}"
fi
fi
done
if test "x$missing_languages" != x; then
AC_MSG_ERROR([
The following requested languages were not found:${missing_languages}
The following languages were available: c${found_languages}])
fi
# Find out what GC implementation we want, or may, use.
AC_ARG_WITH(gc,
[ --with-gc={page,zone} choose the garbage collection mechanism to use
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment