summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2002-08-28 17:42:44 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2002-08-28 17:42:44 +0000
commit6c15108b602f267771f142e16a2c02e18f4dcb3b (patch)
treed0ebd6ee353b2d412c6e7b232d158c8d1ea23cfa
parentb29709d450938793e6927ae8da5d8a5d05d9e8ef (diff)
downloadrtems-6c15108b602f267771f142e16a2c02e18f4dcb3b.tar.bz2
2002-08-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/prog-gnat.m4: New.
-rw-r--r--ChangeLog4
-rw-r--r--aclocal/prog-gnat.m426
2 files changed, 30 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cec7b7548a..dc8fa3b154 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2002-08-28 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
+
+ * aclocal/prog-gnat.m4: New.
+
2002-08-11 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* aclocal/bsp-configure.m4: Fix small typo in comment.
diff --git a/aclocal/prog-gnat.m4 b/aclocal/prog-gnat.m4
new file mode 100644
index 0000000000..3e5ceb1dd0
--- /dev/null
+++ b/aclocal/prog-gnat.m4
@@ -0,0 +1,26 @@
+## $Id$
+##
+## 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_ARG_VAR([GNATMAKE],[GNATMAKE compiler command])
+AC_ARG_VAR([ADAFLAGS],[ADA compiler flags])
+
+RTEMS_CHECK_TOOL([GNATMAKE],[gnatmake],[])
+AS_IF([test -z "$GNATMAKE"],[AC_MSG_ERROR([No GNATMAKE found])])
+
+AC_MSG_CHECKING([whether $GNATMAKE works])
+rm -f conftest.*
+cat >conftest.adb <<EOF
+procedure conftest is begin null; end conftest;
+EOF
+
+AS_IF([$GNATMAKE -c conftest.adb 1>>config.log 2>&1],
+ [HAVE_GNAT=yes],
+ [HAVE_GNAT=no])
+AC_MSG_RESULT([$HAVE_GNAT])
+rm -f conftest.*
+])