]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - aclocal.m4
ncurses 5.7 - patch 20100717
[ncurses.git] / aclocal.m4
index ab860daba8d6a6b4c6c6ef1baf58fbaf7edfb7b4..e890c8f6335d2247192be13bcff5af8254ed3792 100644 (file)
@@ -28,7 +28,7 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey 1995-on
 dnl
-dnl $Id: aclocal.m4,v 1.532 2010/06/05 21:11:54 tom Exp $
+dnl $Id: aclocal.m4,v 1.537 2010/07/03 21:15:56 tom Exp $
 dnl Macros used in NCURSES auto-configuration script.
 dnl
 dnl These macros are maintained separately from NCURSES.  The copyright on
@@ -86,6 +86,14 @@ fi
 AC_SUBST(ACPPFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_ADD_ADAFLAGS version: 1 updated: 2010/06/19 15:22:18
+dnl ---------------
+dnl Add to $ADAFLAGS, which is substituted into makefile and scripts.
+AC_DEFUN([CF_ADD_ADAFLAGS],[
+       ADAFLAGS="$ADAFLAGS $1"
+       AC_SUBST(ADAFLAGS)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_ADD_CFLAGS version: 10 updated: 2010/05/26 05:38:42
 dnl -------------
 dnl Copy non-preprocessor flags to $CFLAGS, preprocessor flags to $CPPFLAGS
@@ -1760,6 +1768,35 @@ rm -f conftest*
 AC_SUBST(EXTRA_CFLAGS)
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_GNAT_PRAGMA_UNREF version: 1 updated: 2010/06/19 15:22:18
+dnl --------------------
+dnl Check if the gnat pragma "Unreferenced" works.
+AC_DEFUN([CF_GNAT_PRAGMA_UNREF],[
+AC_CACHE_CHECK(if GNAT pragma Unreferenced works,cf_cv_pragma_unreferenced,[
+CF_GNAT_TRY_LINK([procedure conftest;],
+[with Text_IO;
+with GNAT.OS_Lib;
+procedure conftest is
+   test : Integer;
+   pragma Unreferenced (test);
+begin
+   test := 1;
+   Text_IO.Put ("Hello World");
+   Text_IO.New_Line;
+   GNAT.OS_Lib.OS_Exit (0);
+end conftest;],
+       [cf_cv_pragma_unreferenced=yes],
+       [cf_cv_pragma_unreferenced=no])])
+
+# if the pragma is supported, use it (needed in the Trace code).
+if test $cf_cv_pragma_unreferenced = yes ; then
+       PRAGMA_UNREF=TRUE
+else
+       PRAGMA_UNREF=FALSE
+fi
+AC_SUBST(PRAGMA_UNREF)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_GNAT_TRY_LINK version: 1 updated: 2004/08/21 19:02:08
 dnl ----------------
 dnl Verify that a test program compiles/links with GNAT.
@@ -1818,7 +1855,7 @@ fi
 rm -f conftest*
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_GNAT_VERSION version: 12 updated: 2006/10/14 15:23:15
+dnl CF_GNAT_VERSION version: 13 updated: 2010/06/19 15:22:18
 dnl ---------------
 dnl Verify version of GNAT.
 AC_DEFUN([CF_GNAT_VERSION],
@@ -1836,6 +1873,7 @@ case $cf_gnat_version in
      cf_cv_prog_gnat_correct=no
      ;;
 esac
+
 case $cf_gnat_version in
   3.[[1-9]]*|[[4-9]].*)
       cf_compile_generics=generics
@@ -1845,6 +1883,23 @@ case $cf_gnat_version in
       cf_generic_objects=
       ;;
 esac
+
+case $cf_gnat_version in
+  3.[[0-9]]*)
+    USE_OLD_MAKERULES=""
+    USE_GNAT_PROJECTS="#"
+    ;;
+  *)
+    USE_OLD_MAKERULES="#"
+    USE_GNAT_PROJECTS=""
+    ;;
+esac
+
+AC_SUBST(cf_compile_generics)
+AC_SUBST(cf_generic_objects)
+
+AC_SUBST(USE_OLD_MAKERULES)
+AC_SUBST(USE_GNAT_PROJECTS)
 ])
 dnl ---------------------------------------------------------------------------
 dnl CF_GNU_SOURCE version: 6 updated: 2005/07/09 13:23:07
@@ -4341,6 +4396,39 @@ AC_SUBST(PROG_EXT)
 test -n "$PROG_EXT" && AC_DEFINE_UNQUOTED(PROG_EXT,"$PROG_EXT")
 ])dnl
 dnl ---------------------------------------------------------------------------
+dnl CF_PROG_GNAT version: 1 updated: 2010/06/19 15:22:18
+dnl ------------
+dnl Check for gnatmake, ensure that it is complete.
+AC_DEFUN([CF_PROG_GNAT],[
+cf_ada_make=gnatmake
+AC_CHECK_PROG(gnat_exists, $cf_ada_make, yes, no)
+if test "$ac_cv_prog_gnat_exists" = no; then
+   cf_ada_make=
+else
+   CF_GNAT_VERSION
+   AC_CHECK_PROG(M4_exists, m4, yes, no)
+   if test "$ac_cv_prog_M4_exists" = no; then
+      cf_cv_prog_gnat_correct=no
+      echo Ada95 binding required program m4 not found. Ada95 binding disabled.
+   fi
+   if test "$cf_cv_prog_gnat_correct" = yes; then
+      AC_MSG_CHECKING(if GNAT works)
+      CF_GNAT_TRY_RUN([procedure conftest;],
+[with Text_IO;
+with GNAT.OS_Lib;
+procedure conftest is
+begin
+   Text_IO.Put ("Hello World");
+   Text_IO.New_Line;
+   GNAT.OS_Lib.OS_Exit (0);
+end conftest;],[cf_cv_prog_gnat_correct=yes],[cf_cv_prog_gnat_correct=no])
+      AC_MSG_RESULT($cf_cv_prog_gnat_correct)
+   fi
+fi
+
+AC_SUBST(cf_ada_make)
+])dnl
+dnl ---------------------------------------------------------------------------
 dnl CF_PROG_INSTALL version: 5 updated: 2002/12/21 22:46:07
 dnl ---------------
 dnl Force $INSTALL to be an absolute-path.  Otherwise, edit_man.sh and the
@@ -5479,7 +5567,7 @@ AC_DEFUN([CF_UPPER],
 $1=`echo "$2" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_UTF8_LIB version: 6 updated: 2010/04/21 06:20:50
+dnl CF_UTF8_LIB version: 7 updated: 2010/06/20 09:24:28
 dnl -----------
 dnl Check for multibyte support, and if not found, utf8 compatibility library
 AC_DEFUN([CF_UTF8_LIB],
@@ -5501,7 +5589,7 @@ if test "$cf_cv_utf8_lib" = "add-on" ; then
        AC_DEFINE(HAVE_LIBUTF8_H)
        CF_ADD_INCDIR($cf_cv_header_path_utf8)
        CF_ADD_LIBDIR($cf_cv_library_path_utf8)
-       LIBS="$cf_cv_library_file_utf8 $LIBS"
+       CF_ADD_LIBS($cf_cv_library_file_utf8)
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
@@ -5639,7 +5727,76 @@ $1_ABI=$cf_cv_abi_version
 ])
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_DBMALLOC version: 6 updated: 2006/12/16 14:24:05
+dnl CF_WITH_ADA_COMPILER version: 2 updated: 2010/06/26 17:35:58
+dnl --------------------
+dnl Command-line option to specify the Ada95 compiler.
+AC_DEFUN([CF_WITH_ADA_COMPILER],[
+AC_MSG_CHECKING(for ada-compiler)
+AC_ARG_WITH(ada-compiler,
+       [  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
+       [cf_ada_compiler=$withval],
+       [cf_ada_compiler=gnatmake])
+AC_SUBST(cf_ada_compiler)
+AC_MSG_RESULT($cf_ada_compiler)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ADA_INCLUDE version: 2 updated: 2010/06/26 17:35:58
+dnl -------------------
+dnl Command-line option to specify where Ada includes will install.
+AC_DEFUN([CF_WITH_ADA_INCLUDE],[
+AC_MSG_CHECKING(for ada-include)
+CF_WITH_PATH(ada-include,
+   [  --with-ada-include=DIR  Ada includes are in DIR],
+   ADA_INCLUDE,
+   PREFIX/share/ada/adainclude,
+   [$]prefix/share/ada/adainclude)
+AC_SUBST(ADA_INCLUDE)
+AC_MSG_RESULT($ADA_INCLUDE)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ADA_OBJECTS version: 2 updated: 2010/06/26 17:35:58
+dnl -------------------
+dnl Command-line option to specify where Ada objects will install.
+AC_DEFUN([CF_WITH_ADA_OBJECTS],[
+AC_MSG_CHECKING(for ada-objects)
+CF_WITH_PATH(ada-objects,
+   [  --with-ada-objects=DIR  Ada objects are in DIR],
+   ADA_OBJECTS,
+   PREFIX/lib/ada/adalib,
+   [$]prefix/lib/ada/adalib)
+AC_SUBST(ADA_OBJECTS)
+AC_MSG_RESULT($ADA_OBJECTS)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_ADA_SHAREDLIB version: 2 updated: 2010/06/26 17:35:58
+dnl ---------------------
+dnl Command-line option to specify if an Ada95 shared-library should be built,
+dnl and optionally what its soname should be.
+AC_DEFUN([CF_WITH_ADA_SHAREDLIB],[
+AC_MSG_CHECKING(if an Ada95 shared-library should be built)
+AC_ARG_WITH(ada-sharedlib,
+       [  --with-ada-sharedlib=XX build Ada95 shared-library],
+       [with_ada_sharedlib=$withval],
+       [with_ada_sharedlib=no])
+AC_MSG_RESULT($with_ada_sharedlib)
+
+ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
+MAKE_ADA_SHAREDLIB="#"
+
+if test "x$with_ada_sharedlib" != xno
+then
+       MAKE_ADA_SHAREDLIB=
+       if test "x$with_ada_sharedlib" != xyes
+       then
+               ADA_SHAREDLIB="$with_ada_sharedlib"
+       fi
+fi
+
+AC_SUBST(ADA_SHAREDLIB)
+AC_SUBST(MAKE_ADA_SHAREDLIB)
+])dnl
+dnl ---------------------------------------------------------------------------
+dnl CF_WITH_DBMALLOC version: 7 updated: 2010/06/21 17:26:47
 dnl ----------------
 dnl Configure-option for dbmalloc.  The optional parameter is used to override
 dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
@@ -5650,11 +5807,11 @@ CF_NO_LEAKS_OPTION(dbmalloc,
 
 if test "$with_dbmalloc" = yes ; then
        AC_CHECK_HEADER(dbmalloc.h,
-               [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse($1,,[],[,$1]))])
+               [AC_CHECK_LIB(dbmalloc,[debug_malloc]ifelse([$1],,[],[,$1]))])
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------
-dnl CF_WITH_DMALLOC version: 6 updated: 2006/12/16 14:24:05
+dnl CF_WITH_DMALLOC version: 7 updated: 2010/06/21 17:26:47
 dnl ---------------
 dnl Configure-option for dmalloc.  The optional parameter is used to override
 dnl the updating of $LIBS, e.g., to avoid conflict with subsequent tests.
@@ -5665,7 +5822,7 @@ CF_NO_LEAKS_OPTION(dmalloc,
 
 if test "$with_dmalloc" = yes ; then
        AC_CHECK_HEADER(dmalloc.h,
-               [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse($1,,[],[,$1]))])
+               [AC_CHECK_LIB(dmalloc,[dmalloc_debug]ifelse([$1],,[],[,$1]))])
 fi
 ])dnl
 dnl ---------------------------------------------------------------------------