X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=aclocal.m4;h=3a9457760b393d7a70e7a38cf33e25a52e1da5f5;hp=ed61a677e9695edaa85c8bf8a2da3c378b4b8cf0;hb=362db2575aed6b2c7a8d3928b39af51544502876;hpb=9776951416d7fb862b9dca1f4c9f8031a5c9059b diff --git a/aclocal.m4 b/aclocal.m4 index ed61a677..3a945776 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -28,7 +28,7 @@ dnl*************************************************************************** dnl dnl Author: Thomas E. Dickey 1995-on dnl -dnl $Id: aclocal.m4,v 1.550 2011/03/19 18:48:42 tom Exp $ +dnl $Id: aclocal.m4,v 1.552 2011/03/28 00:21:01 tom Exp $ dnl Macros used in NCURSES auto-configuration script. dnl dnl These macros are maintained separately from NCURSES. The copyright on @@ -1769,10 +1769,12 @@ rm -rf conftest* AC_SUBST(EXTRA_CFLAGS) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GNAT_GENERICS version: 1 updated: 2010/11/13 14:15:18 +dnl CF_GNAT_GENERICS version: 2 updated: 2011/03/23 20:24:41 dnl ---------------- AC_DEFUN([CF_GNAT_GENERICS], [ +AC_REQUIRE([CF_GNAT_VERSION]) + AC_MSG_CHECKING(if GNAT supports generics) case $cf_gnat_version in #(vi 3.[[1-9]]*|[[4-9]].*) #(vi @@ -1826,28 +1828,92 @@ fi AC_SUBST(PRAGMA_UNREF) ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GNAT_PROJECTS version: 1 updated: 2010/11/13 14:15:18 +dnl CF_GNAT_PROJECTS version: 2 updated: 2011/03/23 20:24:41 dnl ---------------- +dnl GNAT projects are configured with ".gpr" project files. +dnl GNAT libraries are a further development, using the project feature. AC_DEFUN([CF_GNAT_PROJECTS], [ +AC_REQUIRE([CF_GNAT_VERSION]) + +cf_gnat_libraries=no +cf_gnat_projects=no + AC_MSG_CHECKING(if GNAT supports project files) case $cf_gnat_version in #(vi 3.[[0-9]]*) #(vi - cf_gnat_projects=no ;; *) case $cf_cv_system_name in #(vi cygwin*) #(vi - cf_gnat_projects=no ;; *) - cf_gnat_projects=yes + mkdir conftest.src conftest.bin conftest.lib + cd conftest.src + rm -rf conftest* *~conftest* + cat >>library.gpr <>confpackage.ads <>confpackage.adb <&AC_FD_CC 2>&1 ) ; then + cf_gnat_projects=yes + fi + cd .. + if test -f conftest.lib/confpackage.ali + then + cf_gnat_libraries=yes + fi + rm -rf conftest* *~conftest* ;; esac ;; esac AC_MSG_RESULT($cf_gnat_projects) +if test $cf_gnat_projects = yes +then + AC_MSG_CHECKING(if GNAT supports libraries) + AC_MSG_RESULT($cf_gnat_libraries) +fi + if test "$cf_gnat_projects" = yes then USE_OLD_MAKERULES="#" @@ -1857,8 +1923,63 @@ else USE_GNAT_PROJECTS="#" fi +if test "$cf_gnat_libraries" = yes +then + USE_GNAT_LIBRARIES="" +else + USE_GNAT_LIBRARIES="#" +fi + AC_SUBST(USE_OLD_MAKERULES) AC_SUBST(USE_GNAT_PROJECTS) +AC_SUBST(USE_GNAT_LIBRARIES) +])dnl +dnl --------------------------------------------------------------------------- +dnl CF_GNAT_SIGINT version: 1 updated: 2011/03/27 20:07:59 +dnl -------------- +dnl Check if gnat supports SIGINT, and presumably tasking. For the latter, it +dnl is noted that gnat may compile a tasking unit even for configurations which +dnl fail at runtime. +AC_DEFUN([CF_GNAT_SIGINT],[ +AC_CACHE_CHECK(if GNAT supports SIGINT,cf_cv_gnat_sigint,[ +CF_GNAT_TRY_LINK([with Ada.Interrupts.Names; + +package ConfTest is + + pragma Warnings (Off); -- the next pragma exists since 3.11p + pragma Unreserve_All_Interrupts; + pragma Warnings (On); + + protected Process is + procedure Stop; + function Continue return Boolean; + pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT); + private + Done : Boolean := False; + end Process; + +end ConfTest;], +[package body ConfTest is + protected body Process is + procedure Stop is + begin + Done := True; + end Stop; + function Continue return Boolean is + begin + return not Done; + end Continue; + end Process; +end ConfTest;], + [cf_cv_gnat_sigint=yes], + [cf_cv_gnat_sigint=no])]) + +if test $cf_cv_gnat_sigint = yes ; then + USE_GNAT_SIGINT="" +else + USE_GNAT_SIGINT="#" +fi +AC_SUBST(USE_GNAT_SIGINT) ])dnl dnl --------------------------------------------------------------------------- dnl CF_GNAT_TRY_LINK version: 3 updated: 2011/03/19 14:47:45 @@ -1919,7 +2040,7 @@ fi rm -rf conftest* *~conftest* ])dnl dnl --------------------------------------------------------------------------- -dnl CF_GNAT_VERSION version: 16 updated: 2010/11/13 14:15:18 +dnl CF_GNAT_VERSION version: 17 updated: 2011/03/23 20:24:41 dnl --------------- dnl Verify version of GNAT. AC_DEFUN([CF_GNAT_VERSION], @@ -1939,9 +2060,6 @@ case $cf_gnat_version in #(vi cf_cv_prog_gnat_correct=no ;; esac - -CF_GNAT_GENERICS -CF_GNAT_PROJECTS ]) dnl --------------------------------------------------------------------------- dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07