diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | aclocal/prog-gnat.m4 | 26 |
2 files changed, 30 insertions, 0 deletions
@@ -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.* +]) |