summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cpukit/ChangeLog5
-rw-r--r--cpukit/aclocal/prog-gnat.m445
-rw-r--r--cpukit/configure.ac7
3 files changed, 57 insertions, 0 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 79c14002be..c81809fd67 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-22 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * aclocal/prog-gnat.m4: New.
+ * configure.ac: Add ada subdir handling.
+
2002-08-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/bsp-alias.m4: Remove.
diff --git a/cpukit/aclocal/prog-gnat.m4 b/cpukit/aclocal/prog-gnat.m4
new file mode 100644
index 0000000000..6e169a8dc7
--- /dev/null
+++ b/cpukit/aclocal/prog-gnat.m4
@@ -0,0 +1,45 @@
+## $Id$
+##
+## Partially borrowed from gcc-3.2
+##
+## WARNING: All the stuff below is pretty immature.
+
+AC_DEFUN([RTEMS_PROG_GNAT],
+[AC_REQUIRE([AC_CHECK_TOOL_PREFIX])
+AC_REQUIRE([RTEMS_PROG_CC_FOR_TARGET])
+
+AC_CHECK_TOOL([GNATMAKE],[gnatmake],[])
+AC_CACHE_CHECK([for compiler driver that understands Ada],
+ [rtems_cv_prog_CCADA],
+[cat >conftest.adb <<EOF
+procedure conftest is begin null; end conftest;
+EOF
+rtems_cv_prog_CCADA=
+# Have to do ac_tool_prefix and user overrides by hand.
+user_ccada=$CCADA
+user_cc=$CC
+for cand in ${ac_tool_prefix}$user_ccada $user_ccada \
+ ${ac_tool_prefix}$user_cc $user_cc \
+ ${ac_tool_prefix}gcc gcc \
+ ${ac_tool_prefix}cc cc \
+ ${ac_tool_prefix}gnatgcc gnatgcc \
+ ${ac_tool_prefix}gnatcc gnatcc \
+ ${ac_tool_prefix}adagcc adagcc \
+ ${ac_tool_prefix}adac adac ; do
+ # There is a bug in all 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=`($cand -c conftest.adb) 2>&1 || echo failure`
+ AS_IF([test -z "$errors"],
+ [rtems_cv_prog_CCADA=$cand
+ break])
+done
+rm -f conftest.*])
+AC_SUBST([CCADA],[$rtems_cv_prog_CCADA])
+
+AS_IF([test -n "$GNATMAKE" && test -n "$CCADA"],
+ [HAVE_GNAT=yes],
+ [HAVE_GNAT=no])
+])
diff --git a/cpukit/configure.ac b/cpukit/configure.ac
index 70e5dc3508..0422376179 100644
--- a/cpukit/configure.ac
+++ b/cpukit/configure.ac
@@ -83,6 +83,13 @@ AC_MSG_RESULT([$LIBRPC])
])
AM_CONDITIONAL(LIBRPC,[test "$LIBRPC" = "yes"])
+AC_ARG_ENABLE([ada],[enable ada support])
+AS_IF([test x"$enable_ada" = x"yes"],[
+ AS_IF([test -d ${srcdir}/ada],[
+ AC_CONFIG_SUBDIRS([ada])
+ ])
+])
+
RTEMS_DEFINE_POSIX_API
RTEMS_DEFINE_ITRON_API
RTEMS_DEFINE_MULTIPROCESSING