]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - Ada95/configure.in
ncurses 5.7 - patch 20100626
[ncurses.git] / Ada95 / configure.in
index 27f7735a43b502f89c87680ed6466bbd729df321..9abe8ab917079ffda1bd1c0f1d6987ed3d88d455 100644 (file)
@@ -28,14 +28,14 @@ dnl***************************************************************************
 dnl
 dnl Author: Thomas E. Dickey
 dnl
-dnl $Id: configure.in,v 1.12 2010/06/12 18:47:38 tom Exp $
+dnl $Id: configure.in,v 1.15 2010/06/26 21:27:05 tom Exp $
 dnl Process this file with autoconf to produce a configure script.
 dnl
 dnl See http://invisible-island.net/autoconf/ for additional information.
 dnl
 dnl ---------------------------------------------------------------------------
 AC_PREREQ(2.13.20020210)
-AC_REVISION($Revision: 1.12 $)
+AC_REVISION($Revision: 1.15 $)
 AC_INIT(gen/gen.c)
 AC_CONFIG_HEADER(include/ncurses_cfg.h:include/ncurses_cfg.hin)
 
@@ -481,85 +481,22 @@ CF_HELP_MESSAGE(Ada95 Binding Options:)
 
 dnl Check for availability of GNU Ada Translator (GNAT).
 dnl At the moment we support no other Ada95 compiler.
-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
-if test        "$cf_cv_prog_gnat_correct" = yes; then
-   ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
-
-   AC_MSG_CHECKING(if GNAT pragma Unreferenced works)
-   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])
-   AC_MSG_RESULT($cf_cv_pragma_unreferenced)
-
-   # 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_ARG_WITH(ada-compiler,
-       [  --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)],
-       [cf_ada_compiler=$withval],
-       [cf_ada_compiler=gnatmake])
-
-   cf_ada_package=terminal_interface
-
-   AC_SUBST(cf_ada_make)
-   AC_SUBST(cf_ada_compiler)
-   AC_SUBST(cf_ada_package)
-   AC_SUBST(ADAFLAGS)
-   AC_SUBST(cf_compile_generics)
-   AC_SUBST(cf_generic_objects)
-   AC_SUBST(PRAGMA_UNREF)
-
-   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)
-
-   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)
+if test "$cf_with_ada" != "no" ; then
+       CF_PROG_GNAT
+       if test "$cf_cv_prog_gnat_correct" = yes; then
+               CF_ADD_ADAFLAGS(-O3 -gnatpn)
+
+               CF_GNAT_PRAGMA_UNREF
+
+               CF_WITH_ADA_COMPILER
 
+               cf_ada_package=terminal_interface
+               AC_SUBST(cf_ada_package)
+
+               CF_WITH_ADA_INCLUDE
+               CF_WITH_ADA_OBJECTS
+               CF_WITH_ADA_SHAREDLIB
+       fi
 fi
 
 ################################################################################
@@ -624,6 +561,9 @@ AC_SUBST(cross_compiling)
 TEST_ARG2=
 AC_SUBST(TEST_ARG2)
 
+TEST_LIBS2=
+AC_SUBST(TEST_LIBS2)
+
 dnl for separate build, this is good enough for "sh $(top_srcdir)/misc/shlib"
 NCURSES_SHLIB2="sh -c"
 AC_SUBST(NCURSES_SHLIB2)
@@ -654,7 +594,9 @@ AC_SUBST(EXTERNAL_TREE)
 
 AC_OUTPUT( \
        $SUB_MAKEFILES \
-       Makefile,,[
+       Makefile,[
+$AWK -f $srcdir/mk-1st.awk <$srcdir/src/modules >>src/Makefile
+],[
 ### Special initialization commands, used to pass information from the
 ### configuration-run into config.status